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 ?

Who is Participating?
PAQed with points refunded (500)

Community Support Moderator

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.


 Submit IDOC for online immediate processing
        int_edidc                     = s_dc
        online                        = 'O'
        docnum                        = v_docnum
        error_before_call_application = v_checkx
        int_edidd                     = i_dd
        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 ?
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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.
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.
amar21nathAuthor Commented:
Apparantly there was nothing wrong with the FM. It was a userexit that was hampering the order save. A valuable lesson learnt.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.