cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript with ST text

Former Member
0 Kudos

Hi all,

In the sapscript

i have an include standard text as below

C1 Text 1

/: INCLUDE Z_TEST OBJECT TEXT ID SDVD PARAGRAPH C1

C1 Text 2

the problem is if the Z_TEST is empty , it will auto supress the line with Z_TEST

result is :

Text 1

Text 2

However , i would like to have a result with a blank line in bewteen

expected result

Text 1

<blank line>

Text 2

PS: Paragraph C1 has already uncheck "no blank lines" option

Would anyone give me some tricks for doing the above requirements

Thanks in advance

David Tai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can test if this include exist or not.

&SAPSCRIPT-SUBRC&

After executing an INCLUDE statement, this contains a value that indicates whether the INCLUDE was found or not. This value can be queried with IF....

INCLUDE found = 0 and INCLUDE not found = 4

So you must do the following

C1 Text 1

i/: INCLUDE Z_TEST OBJECT TEXT ID SDVD PARAGRAPH C1

/: if &SAPSCRIPT-SUBRC& eq 4

/: endif.

C1 Text 2

Answers (2)

Answers (2)

Former Member
0 Kudos

really thanks both of you!

former_member585060
Active Contributor
0 Kudos

Hi,

Goto SO10 Tcode, Open your Z_TEST

In the text give space, by pressing Alt Key + 255( Ascii format which is equal to a Space)

So the text in Standard text will be blank but as it is a ASCII space in output it will not take as a blank line, so your requirment will work. i tested it, it is working fine.

For testing Just open Notepad and press following

ALT key + 85 = U

ALT key + 86 = V

ALT key + 255 = Space

Regards

Bala Krishna

Edited by: Bala Krishna on Aug 7, 2009 2:01 PM