cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Script: dynamic hide fields.

Former Member
0 Kudos

Hi,

I have a question about how to hide some no value fields.Need your help

Now,in form ,I write:

Description1:&text1&

&text2&

&text3&

Result: ok.

if all three fields have value,no problem,but if &text2&,&text3& are empty,the layout is:

Description1: aaaaaaaaaa

(blank)

(blank)

Result: ok.

I want to hide two blank lines,show like this:

Description1: aaaaaaaaaa

Result: ok.

How do I implement it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Do the coding as follows in the script,

IF &text1& <> ' '

Description1:&text1&

endif

IF &text2& <> ' '

&text2&

endif

IF &text3& <> ' '

&text3&

endif

Result: ok.

Please check and let me know if u face any problem.

Regards

Sandeep_Kumar
Advisor
Advisor
0 Kudos

Hi,

Try this :It will ensure no blank lines are printed irrespective of their position.

IF &text1& <> ' '

Description1:&text1&

ELSEIF &text2& <> ' '

&text2&

ELSEIF &text3& <> ' '

&text3&

endif

Result: ok.

Hope this helps!

Sandeep

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks for your help.

The problem has solved.