Skip to Content
author's profile photo Former Member
Former Member

Address-EndAddress in SAPSCRIPT.

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 09, 2014 at 02: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 29, 2014 at 11:54 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.