cancel
Showing results for 
Search instead for 
Did you mean: 

idoc status messages

Former Member
0 Kudos

Hello,

Iam using MBGMCR/MBGMCR02 for posting the GR on receipt of an EDI.My problem is when the material document is created the idoc status is not giving me the material document number.Is there any way to bring the material document number in the status messages of idoc?

Thanks,

Larry

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi!

As Srinivas said, "material Document Number is returned in the RETURN_VARIABLES tables parameter of IDOC_INPUT_MBGMCR function module."

So you can:

- create Z_IDOC_INPUT_MBGMCR with the same interface as IDOC_INPUT_MBGMCR

- call IDOC_INPUT_MBGMCR with all input parameters in it

- read RETURN_VARIABLES with material document number info and pass this data as extra line to IDOC_STATUS table

Certainly you have to make your own process code and corresponding settings just as it done for the standard one - by copying and changing handler FM.

Hope it helps.

Regards,

Maxim.

Former Member
0 Kudos

Thanks for the replies,

As Bala said it the function module does not have a userexit...is there any other way other than cloning the function module....

Thanks

Larry

Former Member
0 Kudos

The material Document Number is returned in the RETURN_VARIABLES tables parameter of IDOC_INPUT_MBGMCR function module. I just don't know how you can finally read this.

Former Member
0 Kudos

I don't find any User-Exits to access the status record in Function module "IDOC_INPUT_MBGMCR". Moreover GR is posting using a BAPI.

My suggestion is to clone the function module "IDOC_INPUT_MBGMCR" to include your custom code to get the required Status Message.

Rashid_Javed
Contributor
0 Kudos

Sorry could not give you the exact answer (right now i don't have access to SAP system) but did you check the code of function module that is actually posting IDOC? Is there a user exit in it? Also how is it creating GR? normally if it is call transaction, than check for system variables SY-MSGV1, SY-MSGV2, SY-MSGV3, SY-MSGV4 normally the doc no is in one of these variables.

If this is notthe situation and you manage to find a userexit in function module, perhaps you can search GR table using Idoc fields (such as material no, PO no, date etc) to search data in i think MKPF and MSEG and if you find it you can try modifying system fields Sy-msgv1,2,3,4 with this value because normally the status record updates get values from these fields.

I hope this will give you a direction to work upon...