cancel
Showing results for 
Search instead for 
Did you mean: 

ADDRESS ENDADDRESS IN SAPSCRIPT

Former Member
0 Kudos

Hi,

Can we rearrange the fields being printed in PO layout? The form used the ADDRESS ENDADDRESS syntax. Only the Addressnumber was populated. After printing the form, the arrangement of fields were

STREET CITY

COUNTRY POSTAL_CODE CITY2.

I want to rearrange it to be:

STREET

COUNTRY POSTAL_CODE CITY.

How can I do this? And where can I do this if this is possible?

Thanks in advance.

Lalyn

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

If you wnat to do it First copy the Form into another Zform then make the modifications according to your requirement. Acually ADDRESS and ENDADDRESS is used to display any Address in that particular Country Standards.

Former Member
0 Kudos

No. What I mean is, this will not be possible using the ADDRESS END ADDRESS syntax with the ADDRESSNUMBER given?

Lalyn

Former Member
0 Kudos

using ADDRESS ENDADDRESS . NO.

if u want to customise the layout, get invidual fields and print them, u can make use of this fm

ADDRESS_INTO_PRINTFORM

кu03B1ятu03B9к

Former Member
0 Kudos

Since SAP help says :

"The command ADDRESS - ENDADDRESS formats an address according to the postal standards of the destination country defined in the parameter COUNTRY"

Maybe you can try and set the value of COUNTRY before using the ADDRESS command so that it uses the format you want.

You first have to find the country for which the address format is the one you want...

It's just an idea, haven't tried it myself.

Edited by: Garin LE THUC on Apr 2, 2009 6:02 PM

Former Member
0 Kudos

Hi Frank,

So you mean, there is no way I can rearrange the position of the fields to be displayed? And you're telling me that this is not possible?

Lalyn

Former Member
0 Kudos

Hi

Ofcourse it is possible.

Only if you use standard SAP-script functionality then it will be difficult.

You can get the adres out of table ADRC yourself using the adresnumber

and put it in some fields.

This fields you can put on the form the way you want it.

You can get the values in the print program or

with an /: PERFORM

/: ENDPERFORM.

In both cases you has to use ABAP.

Gr., Frank

Former Member
0 Kudos

Hi,

the formatting of an adress depends on the value belonging tot COUNTRY.

SO i do not think the way you want is possible.

Below include some help. Read and take the best solution for it

ADDRESS: Formatting of addresses

The command ADDRESS - ENDADDRESS formats an address according to the postal standards of the destination country defined in the parameter COUNTRY. The reference fields are described in the structure ADRS. Both constants and symbols can be assigned to the parameters.

Syntax:

/: ADDRESS [DELIVERY] [PARAGRAPH a] [PRIORITY p] [LINES l]

/: TITLE title

/: NAME name1[,name2[,name3[,name4]]]

/: STREET street

/: POBOX PO box [CODE zip code]

/: POSTCODE zip code

/: CITY town1[,town2]

/: REGION region

/: COUNTRY country

/: FROMCOUNTRY from country

/: ENDADDRESS

Both formatting data and address data are parameters. Address data is formatted for output based on the COUNTRY, PRIORITY and LINES parameters. As the default, the P.O. Box is used, if it is available, rather than the street address.

 DELIVERY defines the street address.

 If this parameter is selected, the system prints the street address on the layout output instead of the P.O. Box.

 PARAGRAPH defines in which paragraph format the address is output.

 If the parameter is not defined, the address is output in the default paragraph format.

 PRIORITY defines which address lines can be omitted if there is not enough space on the output.

 You can enter a combination of the following values:

 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 define how many lines are available to format the address.

If the address data cannot be completely formatted due to an insufficient number of lines, the data entered in the parameter PRIORITY is omitted. If the LINES specification is missing and this command is in a form window whose type is not MAIN, the lines available for the address layout are automatically calculated with the current output line item and window size.

 TITLE is a required form of address.

 NAME means that up to four separate names, separated by commas, can be defined.

 STREET means the street specification, including address number.

 POBOX is the Post Office box number.

 CODE is the P.O. box, postal, or zip code, if this code is different from the postal code of the city.

 POSTCODE is cityu2019s postal, or zip, code.

 CITY means that up to two place names can be defined.

 REGION determines the administrative area.

 COUNTRY specifies the country based on specific postal standards and the address format.

 FROMCOUNTRY defines in which language the destination countryu2019s name is formatted. In EEC countries, only the international country identification letter is placed, with a hyphen, before the postal code.

Gr., Frank