‎2009 Oct 12 3:16 PM
HI All,
Process Code is BAPI .
An IDOC is being created . The Inbound IDOC is being triggered using Process Code BAPI . This Process Code triggers a Function Module associated with the IDOC .
Where is the Function Module linked up with Indound IDOC .
Thanks in Advance,
Ry
‎2009 Oct 12 4:49 PM
‎2009 Oct 12 4:15 PM
Hi,
go to t-code
we41 for outbound process codess and function modules linked
we42for intbound process codess and function modules linked
check in the above t-codes if you founf your process code then selecxt the process code and press detail(f2)..
and see the functio module attached..
regards,
Prabhudas
‎2009 Oct 12 4:49 PM
‎2009 Oct 12 4:54 PM
Mathew,
Thanks for the reply , There is a Custom Function Module assigned to the Custom IDOC and is using the Proces Code BAPI.
What i want to understand is how is the BAPI and its Corresponding Function Module triggeres this Custom Function Module which is associated with Custom IDOC .
Thanks
Ry
‎2009 Oct 12 6:52 PM
Hi,
This bapi function modules fetches the entry of custom function module linked to custom idoc from one of the two tables.
Either TBDBE or TBDBA.
Inside this bapi function module the custom function module fetched from any of the table mentioned above is executed and data is passed to the function module.
KR Jaideep,
‎2009 Oct 12 7:25 PM
Hi,
see the Table TEDE1 by padding function module you will come to know what are all idoc type are using this function moduel
and Bapi's..
Prabhudas
‎2009 Oct 12 7:29 PM
Hi Jaideep,
That was very helpful . But how are these assigned in the first place ,can you please explain.
Regards,
Ry
‎2009 Oct 12 8:25 PM
Your question is very simple.
In partner profile you maintain the Type of the IDoc (Message Type) and you will also maintain Process code.
So for that partner, IDoc type (Custom IDoc Type) and Process Code (Custom Function Module) are linked.
Thus it triggers that Function Module.
I hope this information helps.
‎2009 Oct 12 8:31 PM
Yeah , But for Process Code : BAPI how do we assign the Custom Function Module . I understand that in Inbound Parameters i assign the Custiom IDOC message type to Process Code . But the Assignment of Custom Function Module to the Process code i a m confused.
Thanks .
Ry
‎2009 Oct 12 8:42 PM
Go to WE42.
Click on Display/change
Click on position : Key in BAPI
Double click on BAPI Process code.
Change the FM to Custom FM and Save
‎2009 Oct 12 8:49 PM
Here is the Scenario : IDOC : XYZ calls FM : XYZ1. Message type XYZ2.
Process Code BAPI has FM u2013 BAPI_IDOC_INPUT1.
When we define Partner Profiles we assign the Corresponding Message Type XYZ2 to Proces Code BAPI which in Turn Calls BAPI_IDOC_INPUT1 which calls the FM XYZ1.
My Question is How is The FM BAPI_IDOC_INPUT1 calls the FM XYZ1.
Please let me know.
Regards,
Ry
‎2009 Oct 12 8:54 PM
You are not understanding the point.
Func Module will not invoke IDoc type.
IDoc is Flat file - where in the control record contain certain parameters.
These parameters look for correct matching partner profile.
The partner profile contains the process which invokes FM linked to it.
This is the process.
As soon as the FM is invoked it reads all the segments from the IDoc file and processes it. Whatever code is defined in the FM, it behaves accordingly.
‎2009 Oct 12 8:59 PM
" As soon as the FM is invoked it reads all the segments from the IDoc file and processes it. Whatever code is defined in the FM, it behaves accordingly."
My Confuson here is As soon as the FM BAPI_IDOC_INPUT1 for PRocess Code BAPI is trigereed for the Partner , how does it execute the logic associated in the Custom Function Module that is Assigned to The IDOC Type .
Regards,
Ry
‎2009 Oct 12 9:05 PM
There won't be two FMs for 1 process code.
For process code BAPI std FM is BAPI_IDOC_INPUT1. Are you using this FM or ur Custom FM in WE42??
If you use Customer FM, that will have the code to process the custom IDoc type.
If you use Std FM, your IDoc will error out as it cannot handle ur custom IDoc type
‎2009 Oct 13 10:11 AM
Hi ,
The appropriate Function module to process an IDOC of a particular message type is stored in the table : TBDBE .
The entry is actually generated by the system . I.e., for a given BO and method.
Say , If the entry is missing, We can use transaction : BDBG and generate the function module for a given Object type and method.
Eg : To explain further , Access T.code : BDBG on a typical SAP ECC 6.0
Business Object : BUS2054
You can find that SAP has by deault defined only couple of methods and assigned a function module to it. You can choose a method for which an ALE interface is not generated by SAP . ( Eg : GETINFO )
When you choose to create SAP automatically generates the function module ( prompts for a name ) .
Hope this helps.
regards
Raghu V