Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Script to dispaly the fields only when they are having values

Former Member
0 Kudos

in my script i have some fields which will be dispalyed based on, if there are values in it only.

Other wise they should not be dispalyed on the screen.

/ <I0>Status         ,,<I0><I0><H2>&CAUFVD-
/ <I0>Equipment      ,,<I0><I0><H2>&RIWO1-EQUNR(Z)&</></></></> ,,<H0>
=  &RIWO1-EQTXT&</>
/ <I0>Assembly      </> ,,<H2>&RIWO1-BAUTL(Z)&</> ,,<H0>&RIWO1-BAUTX&</>

eg. here in one report i want to display status and equipment in other status and assembly in third it can be status equipment and assembly.. depending if there are values in these fields , they should be displayed other wise they should not be.

Please help !!

1 ACCEPTED SOLUTION

former_member186143
Active Contributor
0 Kudos

use command function if to check for values


/:	 	IF &MARD-LGPBE& NE ''
I2	 	magazijnlokatie,,: &MARD-LGPBE&
/:	 	ENDIF

kind regards

arthur de smidt

Edited by: A. de Smidt on Sep 9, 2008 11:43 AM

4 REPLIES 4

former_member186143
Active Contributor
0 Kudos

use command function if to check for values


/:	 	IF &MARD-LGPBE& NE ''
I2	 	magazijnlokatie,,: &MARD-LGPBE&
/:	 	ENDIF

kind regards

arthur de smidt

Edited by: A. de Smidt on Sep 9, 2008 11:43 AM

JozsefSzikszai
Active Contributor
0 Kudos

hi,

you have to code like this in the SAPScript (this is example for Equipment):

/: IF &RIWO1-EQUNR& NE space.
/ ... Equipment ... &RIWO1-EQUNR(Z)& ...
/: ENDIF.

hope this helps

ec

Former Member
0 Kudos

Hi,

Do like this -

&'Connid:' w_connid&.

If we &'.....', value& ie if we enclose the value to be written with in & and & then if this value is empty then it will not be printed.

Regards

Lekha

Former Member
0 Kudos

Check if field is initial or not.

if field ne space.

"->display field

endif.

Regards,

Aparna Gaikwad