cancel
Showing results for 
Search instead for 
Did you mean: 

returncode from include command in sap scipt

Former Member
0 Kudos

HI,

If I include a textelemt with the /: include command I can not identify if that textelement was available or not. So I would like to check a returncode after my include. Is there any way to do so?

Because I try to do following as final version:

include header_customer_no

if include fail

include header_material_no

if include fail

include header_default.

Any hints how I can do so?

Thanks

Jens

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I'm not sure if you can check for this in the SAPScript itself, however, what you could do (if the print program is a Z program) is to add logic to determine if the text exists in table STXH, using the text name, object, id and language. Based on the results of the select, you could move on to the next STXH until you either get a match or not. Then you could set global variables to hold the object, id, name and language and pass those to a single INCLUDE statement in the SAPScript element.

If your print program is not a Z program then you can achieve the same effect by using the /: PERFORM statement to call a subroutine in a Z program object and use this to determine and return the object, id and name.

Hope this makes sense.

Regards, Andy

Former Member
0 Kudos

HI Andy,

thanks for your comments. Sure that make sense.

No I don't have a Z-Programm in that special case.

I could do that with an additional perform to check for the right text element.

I had the hope to get that solved without an additonal program and perform. So a simple change would not required a new transport flow.

Greetings

Jens

Edited by: Jens Hoene on Oct 7, 2010 8:58 PM