06-02-2011 7:39 PM
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
06-02-2011 11:52 PM
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
06-02-2011 11:35 PM
06-02-2011 11:52 PM
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
06-03-2011 8:54 AM
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
06-03-2011 9:06 AM
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
06-03-2011 8:59 AM
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
06-08-2011 12:14 AM
Thanks Nagaraj. It worked i just papulated IDOC_STATUS and program flow took care of creating IDOC.