2014 Jul 15 5:14 PM
Hi,
In address window, I am displaying customer title, name1, name2, street1, street2, postal code and country code.
My requirement is if Street1 or street2 has no value then that line will not be printed as blank. Instead postal code and country code will go to that place .
Regards
PP
2014 Jul 15 5:33 PM
Pujarini,
usually we insert the logic in main program,
but for simple conditions (IF) it's possible to make in sapscript:
Example, check if some field(s) has value, or check if some field is blank...to determine the fields printed:
/: IF &street1& = ' ' or &street2& = ' '
postal code, country code
/: ELSE
title, name1, name2, street1, street2, postal code and country code
/: ENDIF
2014 Jul 15 7:56 PM
Hi,
Pujarini,
In the code it can easily be accomplished by using conditional statements.
Here is the logic :-
(PI is the paragraph format)
PI &title&
PI &name1&
PI &name1&
😕 IF &street1& NE ' ' OR &street2& NE ' ' "the negetion logic is correct one
PI &street1&
PI &street2&
PI &country_code&
PI &postal_code&
😕 ELSE
PI &country_code&
PI &postal_code&
😕 ENDIF.
Based on the requirement you can print in a single line also like this
PI &name1&,,&name2&