07-09-2014 12:04 PM
Hi All,
One of my SAPSCRIPT is using Address-EndAddress to print addresses. The problem with this statement is that it prints country only when sender and receiver countries are different. However, our requirement is that it should print country, whatever the case may be. How to achieve that? Any inputs would be of great help.
07-09-2014 3:24 PM
Hi Imran,
I believe, country name is printing for those countries for whom, t005-xaddr = 'X'.
And not printing for those whose t005-xaddr is blank.
If we still want to print country name, get country name of vendor from kna1-land1 passing adrnr to kna1 table.
Then get landx from t005t by passing land1 value.
Write the above logic in driver program and call it in sap script using
Perform<perform_name> in program <driver_name>
Thanks,
Anil
07-09-2014 3:24 PM
Hi Imran,
I believe, country name is printing for those countries for whom, t005-xaddr = 'X'.
And not printing for those whose t005-xaddr is blank.
If we still want to print country name, get country name of vendor from kna1-land1 passing adrnr to kna1 table.
Then get landx from t005t by passing land1 value.
Write the above logic in driver program and call it in sap script using
Perform<perform_name> in program <driver_name>
Thanks,
Anil
07-10-2014 10:34 AM
Hi Anil,
I have already declared a variable to prints country outside address-endaddress. But the problem is, in some cases address-endaddress also prints country. So country gets printed twice. Is there any method where country will always in Address-EndAddress whatever the case may be.
07-14-2014 10:20 AM
Hi All,
Please provide your valuable inputs. Is it possible that Address-EndAddress prints country, whatever the case may be?
Regards,
Imran Kundan.
07-29-2014 12:54 PM
Hi Imran,
like you said, the country will only be printed if sender and receiver country are different. So there is a simple trick:
Between ADDRESS and ENDADDRESS you can use FROMCOUNTRY to set the sender country. So if you set the from country to a country that doesn't exist, you have the difference every time. For example:
ADDRESS PARAGRAPH AS
.....
FROMCOUNTRY 'XX'
.....
ENDADDRESS
Hope this will help you
Bye
Marcel