IDOC_INBOUND_SYNCHRONOUS

I am using this FM to create IDOCs to post immediately to application. I have the 'Trigger immediately' option set on the partner profiles for customers.
But while creating the order, the IDOC fails to commit and ends up with status 51. The message is the last message the application throws while creating the order. Does anyone have any clue ?
I have set the parameter 'ONLINE' to 1, basically anything other than 'O'. Is that right ?


amar21nathAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jonvaughanCommented:

It is more usual in IDOC processing to use the FM IDOC_INBOUND_ASYNCHRONOUS for posting idocs.


However that said - what you describe is normal.
You are posting an IDOC and it is failing with an application error.

A status 51 means that the application has not created the IDOC - usually because you have incorrect data.

What document are you trying to create and what is the error you are getting ?



amar21nathAuthor Commented:
Sales order IDocs in stat 51. The messages are :-
---No goods accepted on the specified delivery date
---Check if A/R summary has exceeded time limit:exceeded by days/hours 22 11

These are messages that we get while creating a sales order in the system. They are either info or warning messages. Thru' the GUI, when we get these messages, we would normally hit the enter key and proceed to save the order. I would imagine the same should happen when I create orders thru' process code 'ORDE'. But they error out with the above messages.
To set the whole thing up, I did the following :-
1. Setup partner profile : type KU, message type ORDERS, process code ORDE for inbound. Trigger Immediately and 'Error while synatx check'.
2. Setup a file port
3. Made the ISO code for EA as the primary unit. SPRO->Enterprise structure-> Maintain UOM - > UOM.

Using FM IDOC_INBOUND_SYNCHRONOUS as follows :-

 Submit IDOC for online immediate processing
    CALL FUNCTION 'IDOC_INBOUND_SYNCHRONOUS'
      EXPORTING
        int_edidc                     = s_dc
        online                        = 'O'
      IMPORTING
        docnum                        = v_docnum
        error_before_call_application = v_checkx
      TABLES
        int_edidd                     = i_dd
      EXCEPTIONS
        idoc_not_saved                = 1
        OTHERS                        = 2.

Am I missing out on some config that says to ignore application messages ( all types W / S / I )  for inbound Idocs and proceed to commit  and save the document ?
jonvaughanCommented:
If you look at the 51 status record you can see the messages - is it returning an Error or a Warning.

I am not sure but i believe you are getting these because you are using the IDOC_INBOUND_SYNCHRONOUS if you are doing a synchronous call you would be expected to handle the failure and message in your application.

If you process asynchronously the info and warnign messages are ignored.

As for the online flag. I think you need it set on ' O' as it triggers the commit at the end of the transations.
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

amar21nathAuthor Commented:
These are messages while creating an order.  The messages can be of any type, W and I, I would understand if it were an E, that would be a genuine error. But the Ws, Is and Ss, should not stop be from saving the order. The worst part is I have it working just fine in our sandbox system (different client on the same box) but it doesn't work in other clients. I am now scanning the config to search for anything that is client specific. I also have SAP looking into the matter. Will update their reply.

Thank you.
Amar
amar21nathAuthor Commented:
Apparantly there was nothing wrong with the FM. It was a userexit that was hampering the order save. A valuable lesson learnt.
CetusMODCommented:
PAQed with points refunded (500)

CetusMOD
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Enterprise Software

From novice to tech pro — start learning today.