cancel
Showing results for 
Search instead for 
Did you mean: 

Show Space in Print layout

Former Member
0 Kudos

Hi all,

if there a value in the variable then print it else how to leave that much blank space in layout .

Regards,

Mohsin

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

In smartform if you want to print a blank then use an alternative with the condition as the field is not initial in the general atttributes of the alternative.

Print the field in the true part.

Print a blank text in the flase part.

Regards,

Ram

Former Member
0 Kudos

hi,

From your post it appears that the length of the variables are same.

BETTER GO WITH UNDER OPTION WITH WRITE STATEMENT

CHECK THE EXTRACT BELLOW FROM sap help

... UNDER g 



Effect 
Output of the field f begins at the column from which the field g was output. If this happens in the same output line, the output of the field g is overwritten. 



Note 
After UNDER, the field g must be written exactly as the reference field in the previous WRITE statement, i.e. with an offset and length if necessary. The exception to this rule is if g is a text symbol. In this case, the reference field is determined by the number of the text symbol (not by the text stored there). 



Example 
Align output to the reference fields: 



FIELD-SYMBOLS <FNAME>. 
ASSIGN 'First Name' TO <FNAME>. 

WRITE: /3 'Name'(001), 15 <FNAME>, 30 'RoomNo', 40 'Age'(002). 
... 
WRITE: /   'Peterson' UNDER 'Name'(001), 
           'Ron'      UNDER <FNAME>, 
           '5.1'      UNDER 'RoomNo', 
       (5) 24         UNDER TEXT-002.

REGARDS,

ANIRBAN

Former Member
0 Kudos

Hi,

If it is sapscript, use two commas for a tab.

You can write a IF stmt to chk if it is blank then place two commas or else display the field.

Regards,

Subramanian

bpawanchand
Active Contributor
0 Kudos

Hi

All you can do is place that variable explicitly ina separate window and if there is no value then by default that space is left blank

I hope it gives you an idea

Regards

pavan