cancel
Showing results for 
Search instead for 
Did you mean: 

want output to fail

Former Member
0 Kudos

Hi

I have a situation where I create an idoc as an output from my billing document.

I have my own logic to populate some of the fields in the idoc. This has been done by use of customer suer exit (EXIT_SAPLVEDF_002).

Under certain circumstances I would like the output to fail and write an error message to the output.

By this I mean that the output should get the status 'incorrectly processed'.

Furthermore I would like to write a message text in the processing log.

How can I do this?

Best regards

Jesper Dueholm

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183879
Active Contributor
0 Kudos

Hi,

May be this is not possible through routines, as routine only passes either SY-SUBRC as 0 or 4 and only if it is 0, the output will be processed.

In NACE, for the output type, the checkbox "Dont write processing log" should not be ticked.

Then, you only have to enable your functionality in the program which fills the IDOC segement fields. If your validation fails, you should pass the NAST-VSTAT as 2, which means the output is incorrectly processed. This can serve your purpose.

Former Member
0 Kudos

Hi

I think you are right regarding VSTAT but how can I opdate the processing log with my own message text.

Best regards

Jesper Dueholm

Shiva_Ram
Active Contributor
0 Kudos

Under certain circumstances I would like the output to fail and write an error message to the output.

You can write a routine in t.code VOFM ->Requirements->output control with relevant checks. Then assign this routine for the output type in the output determination procedure at SPRO-> Sales and distribution ->basic function ->output control->output determination ->output determination using condition technique ->Maintain output detremination for billing documents->Maintain output detrermination procedure.

If the output fails, then in the NAST table, the system puts the relevant status in the status column.

Regards,