Application Development and Automation 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: 
Read only

Address-EndAddress in SAPSCRIPT.

Former Member
0 Likes
1,546

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.

1 ACCEPTED SOLUTION
Read only

former_member202771
Contributor
0 Likes
1,227

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

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.

4 REPLIES 4
Read only

former_member202771
Contributor
0 Likes
1,228

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

Read only

0 Likes
1,227

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.

Read only

0 Likes
1,227

Hi All,

Please provide your valuable inputs. Is it possible that Address-EndAddress prints country, whatever the case may be?

Regards,

Imran Kundan.

Read only

Former Member
0 Likes
1,227

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