cancel
Showing results for 
Search instead for 
Did you mean: 

inbound idoc(ie MBGMCR03) for GR posting in SAP - customized FM

Former Member
0 Kudos

Hello Gurus

I am getting GR data from legacy system, here i am using PI system as middleware system and i am trying to post GR in SAP ECC system. For doing this activity i am using the IDOC type MBGMCR03 and message type MBGMCR.. Here i am using the process code BAPI.. so when i am using the process code the relavent Function modules are triggered.

for example.

FM IDOC_INPUT_MBGMCR. This FM will call BAPI_GOODSMVT_CREATE and MB_CREATE_GOODS_MOVEMENT.

Now my requirement is as below

1. Since i am getting data from legacy system i am doing mapping in PI system but for some of the fields i need to extract data from the SAP system for the PO number passed by the legacy system and do the mapping.

So now my questing here is where should i write this code to retrieve the data from SAP for the PO passed by the interface and do the remaining mapping.

2. After completion of IDOC mapping and before posting of IDOC into SAP , i need to update a table in SAP with some IDOC values with status and do some relavent checking (ie as per my req).

So now my questing here is where should i write this code for updating the table and for doing the relavent checkings

before IDOC posting in SAP.

As per my understanding i need to copy the FM into 'Z' FM and add the correspding code which performs both the task and create own process code and link that 'Z' FM' to that process code and call our own process code. so that i can meet my requirement.

Please correct me if i am wrong.

Finally i would like to know which FM i need to copy as a cusotmized FM and add my code in that customized FM and let me know whether i need to create my own procees code to link my customized FM to it.

Please check and put your thoughts accordingly.

Regards

Sree

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

You may write the logic of picking data from SAP in the SAP system as an RFC and call it in PI itself using RFC lookup functionality.

As per my understanding i need to copy the FM into 'Z' FM and add the correspding code which performs both the task and create own process code and link that 'Z' FM' to that process code and call our own process code. so that i can meet my requirement.

This is a good approach.

You may use process code BAPI for inbound message type MBGMCR.

Regards,

Prateek

Former Member
0 Kudos

Hello

Thanks for your reply.

i cannot use the RFC module as a RFC lookup because i was told by my lead not to use RFC lookups.

I am using the BAPI process code only and as i mentioned the relavent FM's are called. now i want to know which FM i can copy into 'Z' and write my code there or is there any additonal way i need to do.

Please clarify.

Regards

Raj

Answers (0)