2006 Oct 13 5:35 PM
Hi, Expert:
I have a assignement on Idoc. I finished all configuration. and wrote a customer program ZGenerate_IDoc. within this program I call MASTER_IDOC_DISTRIBUTE function module.
I just want to know. after calling this function module.
IDoc Data automatic sends out. or I need more process.
Thanks in advance.
2006 Oct 13 5:42 PM
After calling the FM MASTER_IDOC_DISTRIBUTE, commit the work. Read the IDoc number(Docnum). And check the status of IDOC in WE02. If it is 03 it is sucess, else check the control record which u r passing to the FM.
Regards,
Prakash.
2006 Oct 13 5:42 PM
Hi,
Check the FM documentation..
This function module is the interface from the application to the ALE
layer on the outbound side. The application can pass an IDoc, the
so-called master IDoc, as an internal table using the parameters
MASTER_IDOC_CONTROL and MASTER_IDOC_DATA.
This IDoc is then converted into one or communcation IDocs and stored in
the ALE layer. IDocs for which no errors occurred are passed to
dispatch control.
In the table parameter COMMUNICATION_IDOC_CONTROL the header records
for the communication IDocs created are retturned. You can tell whether
processing was successful from the field STATUS.
A COMMIT WORK must be dispatched in the calling program, otherwise the
IDocs may not be dispatched.
Thanks,
Naren
2006 Oct 13 5:49 PM
Thanks for reply quickly.
Can you tell me if IDoc generat successful. it's automactic sent to Partner side or not? or need other application to trigger to send out?
2006 Oct 13 5:54 PM
Check what is the middleware in ur project. In my project middleware is XI, so whenever the IDOC are created XI people will map the IDOC to the receiver. Same hapenns for Inbound too.
Regards,
Prakash.
2006 Oct 13 6:00 PM
Thanks, Prakash Ramu. If I configure to send out to a specific directory. After I call MASTER_IDOC_DISTRIBUTE function. It's automatic go there or not?
2006 Oct 13 6:09 PM
Yunfa if the configuraion is correct, it will automatiacally goes to the specified directory. You can check in WE02 that the IDOC status is 03( Green ) or not.
If it is green, it has reached the destination.
Reward all helpfull point.
Regards,
Prakash.
2006 Oct 13 7:40 PM
Hi Yunfa,
The sending of IDOCs depends on the way your configuration. If you say 'process idocs immediately' then it will go to the partner. If you select 'collect idocs' then you have to run the application RSEOUT00. This application will collect all the IDOCs which are ready to process and send to the client.
Once it is processed, you can check the IDOCs status in WE02 for that particular message type.
shylesh
2006 Oct 13 5:51 PM
Hi,
I believe there must be some external tool that will pick up the IDOCs created from SAP and will send them to the the corresponding partner..
Thanks,
Naren
2006 Oct 13 6:21 PM
Hi Yunfa,
After calling the FM, check the sy-subrc..if its '0', then use COMMIT WORK.
This program will act like as a Selection program to create an IDOC automatically(Hope the settings are already done in this case).
Thanks
Eswar