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

SAPScript: How to sort address...

naimkhans_babi
Active Participant
0 Likes
515

Hi....

My problem is that Address in layout sets should be according to the address of from where it is created.. just like a mail merge...can any one help me in that regards to sort out this problem,,,,,

thanking you....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
494

Hi,

The ADDRESS-ENDADDRESS command formats addresses according to the postal norms of the recipient's country, as defined in the country parameter.

/: ADDRESS DELIVERY PARAGRAPH AD

/: NAME &KNA1-NAME&

/: STREET &KNA1-STRAS&

/: POSTCODE &KNA1-PSTLZ&

/: CITY &KNA1-ORT01&

/: COUNTRY &KNA1-LAND1&

/: FROMCOUNTRY 'DE'

/: ENDADDRESS

Hope this helps.

Regards,

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
494

Sort the data in the internal table and then process it in the sapscript.

Is that what you want.

Read only

Former Member
0 Likes
495

Hi,

The ADDRESS-ENDADDRESS command formats addresses according to the postal norms of the recipient's country, as defined in the country parameter.

/: ADDRESS DELIVERY PARAGRAPH AD

/: NAME &KNA1-NAME&

/: STREET &KNA1-STRAS&

/: POSTCODE &KNA1-PSTLZ&

/: CITY &KNA1-ORT01&

/: COUNTRY &KNA1-LAND1&

/: FROMCOUNTRY 'DE'

/: ENDADDRESS

Hope this helps.

Regards,

Sudheer

Read only

0 Likes
494

What are you printing? How do you want to sort?

If you are using a standard program in SAP, some of them allow you to sort. Some have selection field parameters, some have configuration. Options could be by customer numbers, customer name, or zip code, or country/state/city.

If you are using a custom Z print program, you can sort the data in the program. As suggested, either in an internal table, or with an ORDER BY in the SQL statement.