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: 

Changing the Status of IDoc to Error Status

Former Member
0 Kudos

Hi,

I have a situation where I need to change the Status of the IDoc to Error Status "26", if some of the Mandatory Fields / Segments missing when Shipment is created (VT01N). In fact, the IDoc is created successfully with Status 03. But I want the IDoc to be errored out with Status 26, if I miss to give Special Processing Indicator or Shipping Conditions which are mandatory fields in the Shipment Document. I am using an Exit EXIT_SAPLV56K_002. Is it the right Exit to use?

I am using basic Type SHPMNT05 and Message Type SHPMNT. The Function Module is IDOC_OUTPUT_SHPMNT.

Somebody please help me.

Thanks,

Venkat.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use user exits EXIT_SAPLV56K_002 for validation purposes.

Regards,

Ferry Lianto

4 REPLIES 4

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use user exits EXIT_SAPLV56K_002 for validation purposes.

Regards,

Ferry Lianto

0 Kudos

Can it be used for Changing the Status of the IDoc? That means, updating the Status Record of the IDoc?

Please let me know.

Thanks,

Venkat.

ferry_lianto
Active Contributor
0 Kudos

Hi,

You just need to raise an exception i.e. DATA_NOT_RELEVANT_FOR_SENDING in user exits EXIT_SAPLV56K_002 when the validation is not matched.

Regards,

Ferry Lianto

0 Kudos

I have tried raising both the exceptions but they dont work. At the end, all I need to get is, when I go to WE05, I should see the IDoc with Status 26. Is there anyway, we can do it from RSNASTED?

Thanks,

Venkat.