Application Development 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: 

Update Idoc status in User exit to 52

former_member600419
Discoverer
0 Kudos
1,995

Dear Experts,

I am using Customer EXIT MWMIDO08 (FM L_IDOC_INPUT_WMMBXY calling in custom Inbound FM). In this EXIT, I am manipulating the data in IMSEG. the requirement is such that if any error comes, I have to update the IDOC status to 52 and not 51. Also, the following process (eg. MB_goods_mvt after the exit) must not happen. How can I achieve this step. If I use Message e(XXX) inside the EXIT, the status is updated to 51 and remaining steps does not happen. As IDOC_STATUS table is not passed , can you help me achieve this?

1 ACCEPTED SOLUTION

lutzi3
Participant
0 Kudos
642

Hello,

A remark to the process: status 52 is a final status. You cannot process this Idoc any further. In this sense it is like status 53 and unlike 51 where you can retry the IDoc processing via transaction BD87 for instance.

If you think that status 52 fits your requirement and inbound process
I would suggest to create an ALE Inbound wrapper in your customer name space to handle the status setting as follows:

  • Create a new function module Z... with the same parameters / signature like L_IDOC_INPUT_WMMBXY.
    In the inside you call your standard module L_IDOC_INPUT_WMMBXY (passing all parameters). At the end depending on the outcome of the processing you set the IDOC_STATUS parameter table accordingly to 51/52/53. (Insert a line with docnum and status filled at least)
  • To activate the new module:
  • Maintain attributes of function module (tx BD51)
  • Assign IDoc type and message type (tx WE57)
  • Create your own so called process type (tx WE42), copy the existing one WMMB
  • Add the process type to TBD52 (sm30 - TBD52) to enable it for ALE.

Then you can use the process type in WE20 (partner profiles) in the inbound processing.

Hope this helps,

Kind regards

Lutz

2 REPLIES 2

lutzi3
Participant
0 Kudos
643

Hello,

A remark to the process: status 52 is a final status. You cannot process this Idoc any further. In this sense it is like status 53 and unlike 51 where you can retry the IDoc processing via transaction BD87 for instance.

If you think that status 52 fits your requirement and inbound process
I would suggest to create an ALE Inbound wrapper in your customer name space to handle the status setting as follows:

  • Create a new function module Z... with the same parameters / signature like L_IDOC_INPUT_WMMBXY.
    In the inside you call your standard module L_IDOC_INPUT_WMMBXY (passing all parameters). At the end depending on the outcome of the processing you set the IDOC_STATUS parameter table accordingly to 51/52/53. (Insert a line with docnum and status filled at least)
  • To activate the new module:
  • Maintain attributes of function module (tx BD51)
  • Assign IDoc type and message type (tx WE57)
  • Create your own so called process type (tx WE42), copy the existing one WMMB
  • Add the process type to TBD52 (sm30 - TBD52) to enable it for ALE.

Then you can use the process type in WE20 (partner profiles) in the inbound processing.

Hope this helps,

Kind regards

Lutz

0 Kudos
642

Thanks Lutz Rosenpflanzer .This really helped.

Regards,

Vikrant