Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Capture Messages while Inbound processing of IDOC

Former Member
0 Kudos

Hi ,

I have a scenario where in i have to upload a file from application server using inbound IDOC. I am using the program RSEINB00 (using submit) for this, The idoc is getting posted successfully but i need to capture the messages in form of a log so that i can find out what all IDOC numbers are generated and how many of them. In case any error is there. I need to display a log of it.

Timely help in this regard will be appreciated and rewarded suitably.

Rgds,

Kewal

P.S. : Please suggest if there is any other method to process inbound IDOC (accept we19 TX)

1 ACCEPTED SOLUTION

gajendra_bhakuni
Active Participant
0 Kudos

Hi Kewal,

You need to modify the FM IDOC_INBOUND_FROM_FILE (called within the program to suit your needs).

This FM reads each idoc (control and data record) and posts them within form one_idoc_store. After this call maybe you can check the status and according modify the code to store the failed idoc in a internal table which can later be displayed in an ALV report.

Inbound IDoc from file can be tested via WE16.

Hope this helps.

Regards,

Gajendra.

9 REPLIES 9

Former Member
0 Kudos

Hi Kewal,

Outbound messege status are automatically genrated, but inbound messege status are user defined message, we need to handle, the inbound messege status are strats from 50 to 71.

For inbound messege status we need to build the status records using the struture EDIDS and call the functional module MASTER_IDOC_DISTRIBUTE.

If u have any other issues regarding this, please give me replay.

Thanks and Regards

T.Narender Reddy

0 Kudos

Hi narender,

Thanks for suggesting a new approach. But i think MASTER_IDOC_DISTRIBUTE FM is used specifically for the outbound idoc.

Rgds,

Kewal.

0 Kudos

Hi Kewal,

By using this functional module, we can set even inbound messege status, but we need to write a program in SE38, this is one of the method, actually there are 6 outbound methods and only one inbound method ( inbound process code ).

Thanks and Regards

T.Narender Reddy

gajendra_bhakuni
Active Participant
0 Kudos

Hi Kewal,

You need to modify the FM IDOC_INBOUND_FROM_FILE (called within the program to suit your needs).

This FM reads each idoc (control and data record) and posts them within form one_idoc_store. After this call maybe you can check the status and according modify the code to store the failed idoc in a internal table which can later be displayed in an ALV report.

Inbound IDoc from file can be tested via WE16.

Hope this helps.

Regards,

Gajendra.

0 Kudos

Hi Gajendra,

Thanks for the approach suggested by you.

In another sdn post i could find that i need to run the program RSEINB00 (this sets the status to 64 i.e. idoc ready to be posted) followed by RBDAPP01 which then finally posts it setting the status 53. For this i have even set my partner profile as to be triggered by background program (instead of trigger immediately). But still, on running RSEINB00 it posts the IDOC and sets the status 53. Please advice if this approach is correct and if yes, then what setting i might be missing.

Rgds,

Kewal.

0 Kudos

Hi Kewal,

I had a look at the FM and found that it in turn calls FM - IDOC_INBOUND_WRITE_TO_DB. This FM posts the IDoc to the application (status 53) irrespective of the settings done in partner profile.

Regards,

Gajendra.

0 Kudos

Hi Gajendra,

I too had a look in the FM. I feel on customizing it we can find out the status of the idocs at various places and create a custom log for it. The best thing is it is reading one IDOC at a time. This was very useful to me.

In the mean time i could get the solution using the RSEINB00 and RBAPP01 program as i could find the log of the idocs along with the idoc number from the spool request number.

Thanks a ton for the inputs you gave.

Rgds,

Kewal.

Former Member
0 Kudos

Hi kewal ,

As per the scenario explained by you , I suggest you to do following steps

1.The program you are using is RSEINB00 , has a function mosule present named ' IDOC_ERROR_WORKFLOW_START'. This function module can gice yo the Error message log in case of Inboung IDOC processing fails.

2.You have two options , eithe you find out any user exit and atttach your own code to it or Complaetely cope that code into your z-program. Int he function module mentioned above , the export parameter ' G_MESSAGE_FIELDS ' wud give you the error message , error status , error no etc.

3. So for the INbound IDOC status messages starts with 51-70 , so depending upon ur logic , read all those message into an internal table .Then transfer that to a file .So an error log can be genearated.

I hope this solves ur problem.

Regards.

Note: Reward if useful.

Former Member
0 Kudos

The query is answered, it has two solutions one posted by gajendra and the other on which i was working on using the two reports.