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: 

Read IDOC WMMBID02 information and compare inventory data with SAP

Former Member
0 Kudos

Hi All,

Here is an explanation of the issue:

I need to read the data from an inbound IDOC, status 64, of standard type WMMBID02 and message type WMMBXY. I do not want to post the IDOC, but only read the IDOC information which is mainly the material number, batch, status(INSMK), quantity and unit. This data I have to compare with SAP data and see if it is same for the selected material numbers. Now to read and process the inbound IDOC we have a program RBDAPP01 (BD20 Transaction) which calls the process code WMMB (WE42 transaction) which in turn calls the function module L_IDOC_INPUT_WMMBXY. This FM posts the IDOC. I have created a function module with the same import, export and tables parameters like this FM and have attached it to a custom process code ZWMMB. This function module should just read the data of the IDOC and put it in the table TB_IDOC_DATA like EDIDD (IDOC data records). I then loop into this table, extract SDATA and split it into the 3 segments of WMMBID02 and then extract my required data, MATNR, CHARG, INSMK, MENGE & MEINS.

My Question:

How do I trigger the process code ZWMMB so that I can read the IDOC data when it is fired (status 64), just like program RBDAPP01. Is there any standard code that can be copied and modified or how to do it???

I have tried to be very clear with the question, please reply if the question is not clear. If I am clear, please help

Thanks Anirban

3 REPLIES 3

Former Member
0 Kudos

hi,

i think u can use the FM 'EDI_DOCUMENT_OPEN_FOR_EDIT' to read the contents of the IDOC..

0 Kudos

I am able to read the contents of the IDOC, but I need to run the FM when I fire the IDOC of message type ZWMMBXY. I have created a custome FM which will behave as a stndard FM for inbound IDOC processing.

0 Kudos

Hi Rakesh, I used WE19 Transaction to solve the problem, I can call my custom FM from there