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: 

To Append Custom Status Messages to IDOC

Former Member
0 Kudos

Hi

I have to update some custom messages to Status record in IDOC.

I am making use of the EXIT_SAPLV55K_020 but this particular exit has only IDOC_CONTROL as a Changing parameter and also

IDOC_DATA in the Tables field. I have also predefined exception DO_NOT_PROCESS_IDOC. Now when my code that is written in the include ZXTRKU09 for the EXIT_SAPLV55K_020 is fired the business logic that is written works.

My problem is that i need to update some predefined custom messages to Status records when we check the same with the tcode WE02.Also as per my requirement i need to raise the exception also . I have given the following code

MESSAGE e170(Message Class) WITH idoc_control-idoctp RAISING do_not_process_idoc.

The moment when it sees this statement it raises the above exception but i also needs the custom messages to be appended to the status records.

can any one please help me sort it out.

Regards

K.Nadesh Kumar

6 REPLIES 6

brad_bohn
Active Contributor
0 Kudos

You can't do both from that exit without using a field-symbol to access the status table for the current IDOC.

tushar_shukla
Active Participant
0 Kudos

Nadesh,

In function group XTRK, you'll find another customer exit EXIT_SAPLV55K_022. This FM has changing parameter 'E_LOGFILE' . Pass the message information (message class, no,type and positional parameter ..) correctly. This will be picked during error processing and appended to status record.

0 Kudos

No, you can't do that. That exit is called well after the check for whether or not the IDOC should be processed so it doesn't meet his requirement...

Former Member
0 Kudos

Solved

0 Kudos

Hello Nadesh,

Can you pls. let me know how the issue is solved.? Which exit you have used.?

Regards,

Imran.    

salah_zinet
Participant
0 Kudos

Hi All,

I know that this thread is old, but I want to add this link:

Modify IDOC Status by Program - ABAP Development - SCN Wiki

It can help visitors of this thread.

Regards.