Application Development and Automation 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 only

Idoc help

Former Member
0 Likes
784

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

5 REPLIES 5
Read only

Sm1tje
Active Contributor
0 Likes
704

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

Read only

Former Member
0 Likes
704

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

Read only

0 Likes
704

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

Read only

former_member404244
Active Contributor
0 Likes
704

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

Read only

Former Member
0 Likes
704

Closing question