Skip to Content
avatar image
Former Member

Suppress blank lines in scripts

Hi All,

How do we suppress blank lines in scripts.

I need to display 3 fields fld1, fld2 and fld3 repectively. and while Im displaying them if any of these fields has no value then a blank line is displayed. How do we avoid that.

I have tried using conditons also,

1st line : * &fld1&

Condition: /: if &fld2& ne space (I have also used if not initial)

2nd line : / &fld2& (also tried * &fld2&)

/: endif

3rd line: * &fld3&

But inspite of this Im getting the blank line, any ideas/help how to solve this??

One more thing, in my script in the address itz defined currently in the std format as address paragraph as...endaddress...There is no priority mentioned, I tried moving around the fields with their order and things but it doesnt work. Kindly let me know how to change this.

Existing:

/: ADDRESS PARAGRAPH AS

/: TITLE &REGUH-ZANRE&

/: NAME &REGUH-NAME1&, &REGUH-NAME2&

/: STREET &REGUH-STRAS&

/: POBOX &REGUH-ZPFAC& CODE &REGUH-ZPST2& CITY &REGUH-ZPFOR&

/: POSTCODE &REGUH-ZPSTL&

/: REGION &REGUH-ZREGI&

/: CITY &REGUH-ZORT1&, &REGUH-ZORT2&

/: COUNTRY &REGUH-ZLAND&

/: FROMCOUNTRY &T001-LAND1

/: ADDRESSNUMBER &REGUH-ZADNR&

/: ENDADDRESS

My desired output is (In the same order and positions, also my above query to suppress blank lines is also related to the issue below):

&REGUH-ZNME1&&REGUH-ZNME2& (Same line)

&REGUH-STRAS&

&REGUH-ZORT2(I)&

&REGUH-ZORT1(I)&

&LV_COUNT(I)&&REGUH-PSTLZ&(Same line)

&REGUH-ZTLFX&&REGUH-ZTELF&(Same line)

Kindly let me know how to do this

Regards,

Narendra.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 12, 2008 at 10:23 AM

    in se71 Define pargraph graph format

    in that paragraph format

    in standard attributes

    check the option <No Blank Lines >

    use this paragraph format where ever u dont want to print balnk lines.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 12, 2008 at 11:41 AM

    Hi Nagendra,

    User new Paragraph -> Standard-> No Blank lines check box..It will fix this issue.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 12, 2008 at 03:02 AM

    U can use this command.....

    &SYMBOL(C)&

    This is similar to Abap Command CONDENSE.

    example....

    Assume 'SAP Script' as Symbol.

    &SYMBOL& -


    > SAP Script.

    where as....

    &SYMBOL(C)& -


    > SAPScript

    Assuming ' Albert Einstein ' is the symbol value,

    &symbol& -> Albert Einstein

    &symbol(C)& -> Albert Einstein

    OR...................

    in SE71 under the paragraph formats, in the standard attributes u have an option called NO BALNK LINES.

    If u want to do it in the driver program then use CONDENSE keyword

    Reward points..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 12, 2008 at 03:59 AM

    hi

    insted of SPACE u r using in script

    try to user BALANK ( ' ' )

    like :

    1st line : * &fld1&

    Condition: /: if &fld2& ne ' ' (I have also used if not initial)

    2nd line : / &fld2& (also tried * &fld2&)

    /: endif

    3rd line: * &fld3&

    this may help

    reward if helpful.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 13, 2008 at 02:09 AM

    Done

    Add comment
    10|10000 characters needed characters exceeded