cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress blank lines in scripts

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

Done

Former Member
0 Kudos

Hi Nagendra,

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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..

Former Member
0 Kudos

Hi,

The usage of (C) will not help as that just compresses the spaces if any, but usage of paragraph format may help. Shall try it out.

Thanks n Regards,

Narendra.

Former Member
0 Kudos

Hi Narendra,

Before passing the variable to Script, Use CONDENSE in the driver program.

Regards,

Mayank