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

Inbound IDOC - Function Module Link

Former Member
0 Likes
8,933

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,528

BAPI_IDOC_INPUT1

14 REPLIES 14
Read only

Former Member
0 Likes
4,528

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

Read only

Former Member
0 Likes
4,529

BAPI_IDOC_INPUT1

Read only

0 Likes
4,528

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

Read only

0 Likes
4,528

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,

Read only

0 Likes
4,528

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

Read only

0 Likes
4,528

Hi Jaideep,

That was very helpful . But how are these assigned in the first place ,can you please explain.

Regards,

Ry

Read only

0 Likes
4,528

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.

Read only

0 Likes
4,528

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

Read only

0 Likes
4,528

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

Read only

0 Likes
4,528

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

Read only

0 Likes
4,528

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.

Read only

0 Likes
4,528

" 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

Read only

0 Likes
4,528

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

Read only

Former Member
0 Likes
4,528

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