cancel
Showing results for 
Search instead for 
Did you mean: 

Address Printing in SAP script

ramesh_putta
Participant
0 Kudos

Hello,

Iam working on a SAP script form where I am printing the delivery address using following.

/:ADDRESS PARAGRAPH AT

/:TITLE &SADR-ANRED&

/: NAME &SADR-NAME1&, &SADR-NAME2&, &SADR-NAME3&, &SADR-NAME4&

/: STREET &SADR-STRAS&

/: POSTCODE &SADR-PSTLZ&

/: CITY &SADR-ORT01&, &SADR-ORT02&

/: REGION &SADR-REGIO&

/: COUNTRY &SADR-LAND1&

/:ENDADDRESS

I know the address being printed is depends on the Country key. Here my Country is singapore.

And I would like to print the Postal Code after the Country.

Now the postal code is being printed after the City.

Any suggestions...?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ramesh

The format ADDRESS .. ENDADDRESS. will be controlled by SAP based on the country we have provided .

According to SAP , It will decide the order of the fields for display based on Country Standards ,

USA standard is street, unit, city, country ...

SAPscript makes an internal call to the ADDRESS_INTO_PRINTFORM function module for formatting the address

please have a look at the FM setting.

If you want to follow the order which you want don't use the format ADDRESS .. ENDADDRESS.

Directly you can provide the order.

Thanks

Hariharan

Answers (3)

Answers (3)

Former Member
0 Kudos

Well, if the address statement decides to print it in a certain way, it is actually the way which is predefined for the specified country.

Chances that this is correct are very high.

If you still need it otherwise i´d recommend doing it all yourself without adress statement.

ramesh_putta
Participant
0 Kudos

Thanks to all... Writing the address without Address..... End address works.

Appriciate your responces..

Former Member
0 Kudos

Hi Ramesh ,

Can you please paste the code so that I can know whether it is relavant to my issue.

Can you please send me the code or can you please let me know if we can modify the same solution to get the district.

Thanks

Raj


Former Member
0 Kudos

have you tried with the current address method,

/: ADDRESS

/: ADDRESSNUMBER &adrno_variable&

/: FROM COUNTRY &t001-land1& (usually)

/: ENDADDRESS....

Delivery defines the street address (instead of POB when it exists)

Priority: A - form of address, P - mandatory blank line 1, Q - Mandatory blank line 2

2 - Name2, 3-Name3, 4-Name4, L-country name, S-line for the street O-line for the city

Lines : how many lines are available for output in your form...this controls how SAPScript adjusts the address...

Or use a /: perform which calls the FM ADDRESS_INTO_PRINTFORM...adjust the settings on your parameters to see if you can get it to return the required format, and then use the old style /: address as you have written.

Edited by: DaveL on Aug 15, 2011 5:30 PM

Former Member
0 Kudos

Hi Davel,

I have a similar requirement in Address endaddress. I need your help.

The requirement is the district field is not coming when i am using address-endaddress.

The code which i have written was

/:  ADDRESS delivery paragraph as A

/: ADDRESSNUMBER &adrno_variable&

/: FROM COUNTRY &t001-land1& (usually)

/: ENDADDRESS...

As we know that Standard sap takes care of printing the address when we are passing the address number . How can i get the field district field (Ort02) . Are we maintaining the setting any where of what the address number needs to pick or the order which needs to be displayed..

What is the setting need to be made to get the district field in my form. If any setting please tell me where i need to make...

Please support me which is  highly appreciated?

Thanks

Raj

Former Member
0 Kudos

Hi Ramesh

See also the below example i have posted from doc - FM - ADDRESS_INTO_PRINTFORM

008: Postal code after the city (e.g. Singapore)

Note: The city line format is
"City Postal code".

Example:

Postal Services Group Telecoms

111 Somerset Road 05-06

Singapore 179433

Postal Services Group Telecoms

111 Somerset Road 05-06

SINGAPORE 179433

SINGAPORE

Short form:

Postal Services Group Telecoms / 111 Somerset Road 05-06 /

Singapore 179433

DME:

Singapore 179433

Singapore 179433 Singapore

Solution : remove the adress .. endaddress and use the order which you want

Thanks

Hariharan