‎2011 Mar 29 6:47 AM
Hi All,
Process code is :BAPI and standard function module is BAPI_IDOC_INPUT1.
I am coding all the logic for the INBOUND IDOC in the Z-Function module ZIDOC_INPUT_ZGOODSMOVEMENTOIL.
My requirement is:
Process code fires the inbound function module BAPI_IDOC_INPUT1, this in turn call the function module ZIDOC_INPUT_ZGOODSMOVEMENTOIL.
How can i call ZIDOC_INPUT_ZGOODSMOVEMENTOIL from BAPI_IDOC_INPUT1 to process the idoc.
Thanks in Advance.
Regards,
Umesh
‎2011 Mar 29 7:11 AM
You cannot directly call the Z-function module from Standading processing FM "BAPI_IDOC_INPUT1" (See lines 30 to 36). For that you have to create a Custom BAPI object & Method, and link the Z-function module to the BAPI method. Read SAP Documentation on [Maintaining BAPI-ALE Interfaces |http://help.sap.com/saphelp_nw70ehp2/helpdata/en/78/21740f51ce11d189570000e829fbbd/frameset.htm] for more details.
‎2011 Mar 29 6:49 AM
Hi
Why can't u go for Custom Process code and attach ur custom ZIDOC_INPUT_ZGOODSMOVEMENTOIL.
to the custom process code as you are not want to fire the standard FM.
Regards,
Sreeram
‎2011 Mar 29 6:56 AM
Hi,
aht happens, if you give your fm "ZIDOC_INPUT_ZGOODSMOVEMENTOIL" as parameter INPUT_METHOD on call of BAPI_IDOC_INPUT1?
Regards,
Klaus
‎2011 Mar 29 7:11 AM
You cannot directly call the Z-function module from Standading processing FM "BAPI_IDOC_INPUT1" (See lines 30 to 36). For that you have to create a Custom BAPI object & Method, and link the Z-function module to the BAPI method. Read SAP Documentation on [Maintaining BAPI-ALE Interfaces |http://help.sap.com/saphelp_nw70ehp2/helpdata/en/78/21740f51ce11d189570000e829fbbd/frameset.htm] for more details.
‎2011 Mar 31 1:13 PM
Hi,
Thanks everyone for your reply.
I developed Z-Function module and generated ALE-BAPI interface making BOR object through BDBG transcation.
So, How it will trigger inbound function module do i have to do any cofiguration to link Process code,Message type and idoc type also how it gets linked to BAPI_IDOC_INPUT1.
regards,
umesh
‎2011 Mar 31 4:19 PM
Hi Umesh,
Just you need to add your custom Message Type in Partner Profile WE20 and set the process code as BAPI.
Since you have generated BAPI ALE Interface via BDBG,The system will fetch the Inbound function module which was generated by BDBG based on Message type from Table TBDBE or TBDBA.
No need to set custom process code.
Hope I have answered your question.
Thanks,
Krush
‎2011 Apr 01 8:38 AM
Hi Krush,
Thanks for your reply,
Now i can trigger the idoc.
I have one more problem that if i want to add another z-segment to the attached idoc type its not allowing me its saying that it is already generated and cannot be changed.
if i am generating the BDBG transaction its not asking for specific segment and it automatically takes the segment and generates the function module.
How i can add an additinal z-segment to the idoc type and it generate through BDBG transaction to include in inbound function module?
Thanks in Advance.
Regards,
Umesh
‎2011 Apr 01 6:10 PM
Hi Umesh,
We can not change the Idoc type using WE30 which is generated by BDBG.if you want to add new z segment to your existing Idoc type.Then you have to add the fields/structure in the BAPI/BOR first and regenerate idoc type using BDBG.The new segments will be added to the existing idoc type.
hope I have answered your question.
Thanks,
Krush
‎2011 Apr 04 2:23 PM
‎2012 Mar 05 4:05 AM
Hi,
Can we just use custom message type with the standard idoc MBGMCR03?
‎2011 Mar 30 7:54 AM
HI Umesh,
You can try with the implicit enhancement available at the beginning of the BAPI, if you are on an older version and do not have the enhancement framework the only option left is go to with a custom process code.
Regards,
Chen