‎2008 Nov 24 3:10 PM
Moderator message: please use a more informative subject in future
Hi
I want to add a condition in the below mentioend code :
If po_box is equal to blank then we need to check the zip code and if we have zip code data then print zip code .
if po_box is not equal to blank then print the po_box. and if both po_box and zip code has data then also print po_box .
That is PO_BOX will be dominating .
wa_bp-name = partner-xname.
wa_bp-fax_num = partner-fax_number.
wa_bp-fax_num_ext = partner-fax_extens.
IF wa_address-house_num1 IS INITIAL
AND wa_address-street IS INITIAL.
wa_bp-house_num = 'PO Box'.
wa_bp-street = wa_address-po_box.
ELSE.
wa_bp-house_num = wa_address-house_num1.
wa_bp-street = wa_address-street.
ENDIF.
wa_bp-city1 = wa_address-city1.
wa_bp-region = wa_address-region.
wa_bp-post_code = wa_address-post_code1.
CLEAR wa_bp-int.
Please suggest me how to go ?????
Thanks
Shweta
Edited by: Matt on Nov 24, 2008 4:45 PM
‎2008 Nov 24 3:30 PM
Hi Shweta,
If not po_box is initial. (as we need po_box in whatever condition)
print po_box.
else. (when po box is initial)
if not zip code is initial. (check whether zip code is available)
print zip code.
endif.
endif.
‎2008 Nov 24 3:30 PM
Hi Shweta,
If not po_box is initial. (as we need po_box in whatever condition)
print po_box.
else. (when po box is initial)
if not zip code is initial. (check whether zip code is available)
print zip code.
endif.
endif.
‎2008 Nov 24 3:30 PM
Since you have the PO Box has high preference on the Zip Code, try like this:
DATA: W_PRINT TYPE CHAR15.
IF ZIP_CODE IS NOT INITIAL.
W_PRINT = ZIP_CODE.
ENDIF.
IF PO_BOX IS NOT INITIAL.
W_PRINT = PO_BOX.
ENDIF.
Instead of printing PO_BOX or ZIP_CODE print the W_PRINT.
Regards,
Naimesh Patel
‎2008 Nov 24 3:46 PM