‎2009 Feb 25 12:10 PM
Hi guys,
I currently have a program which takes in an input file (text) and then uses the following BAPIs to either change a Purchase Order or to do a Goods Movement:-
BAPI_PO_CHANGE
BAPI_GOODSMVT_CREATE
I know want to change this functionality to use idocs instead,
The input file will remain the same but instead of calling these BAPIs, I want to simulate an inbound idoc coming in.
Can someone please advise whether there are idocs for this and if so, how I go about programatically generating an inbound idoc for these?
Thanks,
Ruby
‎2009 Feb 25 12:33 PM
Beside the usual (inbound) configuration which can best be done via area menu 'WEDI', you can call the 'default' function module for generating IDoc's. I thought it was called something like 'MASTER_IDOC_DISTRIBUTE'. By using this, Idoc's will be generated. But you will have to find out which IDoc should be used for this. Do a search in WE30, to find the basic IDoc types for this.
BTW: It is also possible that these function modules are part of the same function group as the above mentioned BAPI's.
Edited by: Micky Oestreich on Feb 25, 2009 1:33 PM
‎2009 Feb 25 1:55 PM
Thanks,
I have used FM MASTER_IDOC_DISTRIBUTE in the past for sending outbound idocs but as this time I want to create an inbound idoc, I wasn't sure if there was a differen FM for this.
I have also found FM IDOC_INPUT. Do you know what this is for?
Thanks,
Ruby
‎2009 Feb 25 3:57 PM
Hi,
You have to use FM IDOC_WRITE_AND_START_INBOUND to simulate an inbound idoc.
The steps are:
1- read your .txt file
2- fill the idoc control and the idoc data and to call IDOC_WRITE_AND_START_INBOUND
3- In this point it is like if an idoc is incoming (in fact, you can see it in WE05 transaction) so you have to have parametrized the standard idoc message/type in WE20 transaction
Regards,
Manel
‎2009 Feb 25 12:44 PM
Hi,
the basic type for po ->ORDERS05 and for goods movement->MBGMCR03.
u can use the FM'IDOC_INPUT_ORDERS' for Po and 'BAPI_IDOC_INPUT1' for goods movement.
Regards,
Nagaraj
‎2010 Apr 26 4:00 PM