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: 

Include object in sapscript

Former Member
0 Kudos
894

Hi friends,

I'm using an include statement in script as follows,

INCLUDE &OBJNAME& OBJECT 'EKPO' ID 'F03' PARAGRAPH IT

which returns material PO text.

How can I check if the text returned by the statement is blank, so that I can display something else in that place.

Thanks & Regards,

Netrey

1 ACCEPTED SOLUTION

Former Member
0 Kudos
444

Hi Netrey ,

Similar to sy-subrc , in script we use the varaible <b>SAPSCRIPT-SUBRC</b> .

It tells whether the text was included or not.

Here is some portion of the document from sap help.

<i>

The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:

0: the text include was successful.

1: the command could not be executed because it contained syntax errors.

2: the rules governing the text to be included were not followed (see above).

This value cannot occur if the command is used in a SAPscript form.

4: the specified text could not be found.

</i>

Hope this helps and reward points if helpful.

Regards

Arun

3 REPLIES 3

Former Member
0 Kudos
445

Hi Netrey ,

Similar to sy-subrc , in script we use the varaible <b>SAPSCRIPT-SUBRC</b> .

It tells whether the text was included or not.

Here is some portion of the document from sap help.

<i>

The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:

0: the text include was successful.

1: the command could not be executed because it contained syntax errors.

2: the rules governing the text to be included were not followed (see above).

This value cannot occur if the command is used in a SAPscript form.

4: the specified text could not be found.

</i>

Hope this helps and reward points if helpful.

Regards

Arun

Former Member
0 Kudos
444

Hi Netry

Check it using debugger

Reward all helpfull answers

Regards

Pavan

Former Member
0 Kudos
444

hi

good

write a hard coded break-point after the include statement and then you can check the value of text.

thanks

mrutyun^