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: 

FM to post IDOC

Former Member
0 Kudos

Hi,

I have a scenario where i need to create scheduling agreement (VA31) from ORDERS INBOUND IDOC. I am planning to do BDC for VA31.

now the question is, in program flow i am getting all EDIDC, EDIDD, EDIDS data. Is there any FM which can take these 3 segments post INBOUND IDOC?

Thanks

SB

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Thanks for your response. But this FM doesn't have status record. As I explained earlier I am planning to do BDC for VA31 and would be building EDIDS and I will be having EDIDC and EDIDD. I have tried below FM's nothing seems to be working. Could you please suggest

RBDAPP01 (Report)

APPLICATION_IDOC_POST_IMMEDIAT

idoc_inbound_aysnchronous

IDOC_START_INBOUND

IDOCS_PASS_TO_APPLICATION

EDI_DOCUMENT_OPEN_FOR_PROCESS

IDOC_STATUS_WRITE_TO_DATABASE

EDI_DOCUMENT_CLOSE_PROCESS

IDOC_SERIAL_POST

IDOCS_PROCESS

IDOC_INPUT

IDOC_INBOUND_FROM_FILE

IDOC_WRITE_AND_START_INBOUND

INBOUND_IDOC_PROCESS

BAPI_IDOC_INPUTP

BAPI_IDOC_INPUT1

Last 2 BAPI are at least close to my requirement but not able to make it work

I may be missing flow here like one after another above FM might need to used. I would appreciate if you can suggest.

again i will be getting ORDERS IDOC and would need to create VA31 scheduling agreement from ORDERS IDOC data and trigger IDOC also (ORDERS is the IDOC)

Thanks

SB

6 REPLIES 6

krishnendu_laha
Active Contributor
0 Kudos

Please check 'IDOC_INBOUND_ASYNCHRONOUS' function module....

Former Member
0 Kudos

Hi,

Thanks for your response. But this FM doesn't have status record. As I explained earlier I am planning to do BDC for VA31 and would be building EDIDS and I will be having EDIDC and EDIDD. I have tried below FM's nothing seems to be working. Could you please suggest

RBDAPP01 (Report)

APPLICATION_IDOC_POST_IMMEDIAT

idoc_inbound_aysnchronous

IDOC_START_INBOUND

IDOCS_PASS_TO_APPLICATION

EDI_DOCUMENT_OPEN_FOR_PROCESS

IDOC_STATUS_WRITE_TO_DATABASE

EDI_DOCUMENT_CLOSE_PROCESS

IDOC_SERIAL_POST

IDOCS_PROCESS

IDOC_INPUT

IDOC_INBOUND_FROM_FILE

IDOC_WRITE_AND_START_INBOUND

INBOUND_IDOC_PROCESS

BAPI_IDOC_INPUTP

BAPI_IDOC_INPUT1

Last 2 BAPI are at least close to my requirement but not able to make it work

I may be missing flow here like one after another above FM might need to used. I would appreciate if you can suggest.

again i will be getting ORDERS IDOC and would need to create VA31 scheduling agreement from ORDERS IDOC data and trigger IDOC also (ORDERS is the IDOC)

Thanks

SB

0 Kudos

Hi Sarath,

You need to use, "IDOC_INBOUND_ASYNCHRONOUS" i understand your concern about status records...but this is how the flow goes...the above FM will use the control record details and fetch the process code that you would have set in the partner profile...now the FM that you associate with the process code will need to have a standard interface you can copy the interface from any of the standard IDOC processing module ex "IDOC_INPUT_DELINS_START" now inside your custom FM you will add status specific to your application processing in this case "VA31" and any custom validations.

If you go through the FM "IDOC_INBOUND_ASYNCHRONOUS" in details you will see that it does internally add certain statuses to the IDOC, but these are mostly at the ALE layer and linking the ALE layer to you application...and i dont think you would want/need to add any messages here right?

You just need to update the statuses valid to your scenario or business use case.

Update the post if you have any further doubts

Regards,

Chen

Edited by: Chen K V on Jun 3, 2011 1:24 PM

0 Kudos

Hi,

You can use any inbound function module and copy the paramters to your custom function module. Even for BDC of VA31 you can use function module and write the BDC in the function module.You can prepare / modify the data record and can set the status in the custom function module.

Regards,

Nagaraj

Former Member
0 Kudos

Hi,

Please use the below FM

{

*--FM call to generate the IDOC

CALL FUNCTION 'IDOC_WRITE_AND_START_INBOUND'

EXPORTING

i_edidc = w_edidc

do_commit = c_x

IMPORTING

docnum = lv_docnum

error_before_call_application = lv_flag

TABLES

i_edidd = t_edidd.

}

Thanks,

Manish

Former Member
0 Kudos

Thanks Nagaraj. It worked i just papulated IDOC_STATUS and program flow took care of creating IDOC.