cancel
Showing results for 
Search instead for 
Did you mean: 

How not to print a record if one field does not have a value?

Former Member
0 Kudos

Dear all,

I have my requirement something in this way .

The line items of the script will be in some tabular form now my question is if any of the field doesnt have value in it then the text also should not be displayed.

eg:


Material No    material grp   Quantity       date                  Time
 1                                           10          12.09.2009         14:30

here since material grp doesnot have value material group then that should not printed on the form

KIndly help.

Regards,

Sana.

Edited by: Julius Bussche on Oct 11, 2009 7:22 PM

Please use meaningfull subject titles

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the form painter put if condition to display the output.

Regards,

Anil

Answers (3)

Answers (3)

Sandra_Rossi
Active Contributor
0 Kudos

Next time, use a meaningful title (you must summarize what problem you have with sapscripts, i.e. "conditional display of text in sapscript"). Abuse reported to moderators

Former Member
0 Kudos

Hi

Declare a FLAG variable in your Driver program and set this variable to X if all the variables have a values and if atleast one variable is blank then FLAG = '' and use this FLAG in the script IF &FLAG& = 'X' then Print else not.

or if you are calling using WRITE_FORM in a ELEMENT then based on the condition call the element or not..

surya

Former Member
0 Kudos

Hi,

In this case you wil have to creat the window of same size as your current window

and in that do not add 'material group'.

on write_form for window put the condition

IF material group NE space.

write_form for old window

else.

write_form for newly created window.