Skip to Content
avatar image
Former Member

Sapscript with ST text

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 07, 2009 at 08:29 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 07, 2009 at 08:30 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 07, 2009 at 09:52 AM

    really thanks both of you!

    Add comment
    10|10000 characters needed characters exceeded