cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Form problem with address layout

torsten_braun2
Explorer
0 Kudos

Hello everyone,

I need your help please for a smart form problem. We need the address layout for great britain with street1, street2 etc. but currently street2 is alligned before street1.

We are using the FM ADDRESS_INTO_PRINTFORM (SAP standard address node) and according to the documenation the layout for GB is different as we see it currently.

We have checked the sold-to and all contact persons, they have as country GB and language EN maintained.

In customizing for address screen layout there is nothing chosen (tested to set up Europe, but did not change anything).

For the customizing 'specify my countries...' we have maintained GB as country with the address layout key 006, vehicle country key GB and language key EN.

For the described setting shouldn't there be designed the address in our smart forms according to 006? Anyhting in customizing we missed?

Thanks a lot for your answers.

Torsten

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try to use line priority of FM, below is a brief of documentation. You can read it more in FM documentation:

Control Parameters

See also the parameter documentation.

ADDRESS_TYPE - Address type (from 3.0C)

There are three types of address:

Address type '1': addresses of firms or organizations; the address

structure which is used in most SAP applications as 'Address'.

Address type '2': address of a person

Address type '3': work address, usually the address of a contact person

in a company

The default value SPACE for the address type is handled like type '1',

and is needed for the upwards-compatibility of the function module.

Which parameters are used for which address type is explained in the

ADDRESS_TYPE parameter documentation.

The three character "address layout key" of the recipient country (LAND1) controls which of the available country-specific routines is used to format addresses for the country in question. This key is stored in field T005-ADDRS and is entered in Customizing under Global settings -> Set countries -> Define countries, on the detail screen under "Address layout key".

Keys for customer routines in the SAP enhancement SZAD0001 can be

maintained via the transaction SM30 (extended table maintenance),table

name T005A, in the customer name range, and be assigned in country customizing.

The address attributes are passed in the structures ADDRESS1 (type 1), ADDRESS2 (type 2), ADDRESS3 (type 3) or ADRSWA_IN (type SPACE).

NUMBER_OF_LINES (ADRSWA_IN-ANZZL)

The number of lines available for the address layout. If the number of

lines is not sufficient for the complete layout of an address, then

lines are consecutively suppressed according to the rules of the country in question. Use the parameter LINE_PRIORITY (ADRSWA_IN-PRIOR) overrules the standard sequence in which the output lines are to be suppressed.

LINE_PRIORITY (ADRSWA_IN-PRIOR)

If not equal to SPACE, this field overwrites the standard sequence in

which the lines are suppressed if the available number of lines ANZZL is

insufficient.

The standard sequence is defined as follows:

Type 1: 'AP43HRT7I86LC2BS5O' (GB: 'APRT4327I86CBS5LO')

Type 2: 'APHRT7I86LCBS5O' (GB: 'PRT7I86CBS5LO')

Type 3: 'APF43HR7I86TLC2BSND5O' (GB: 'APRT4327I86CBS5LNDIO')

where (if they occupy a line of their own):

A = Title

P = Mandatory empty line 1

F = Function of the contact person in the company

4 = Name 4

3 = Name 3

H = Different city

R = Region

T = District

L = Name of country

C = Postal code

T = District

7 = Street 3 (field STR_SUPPL2)

I = Street 5 (field LOCATION)

8 = Street 4 (field STR_SUPPL3)

6 = Street 2 (field STR_SUPPL1)

L = Country

C = Postal code

2 = Name 2

B = PO Box

S = Street or PO Box

5 = c/o name

N = Name (and title) of a person

D = Department

O = City

Which of these attributes are available for maintenance can vary. All

fields exist in Business Address Services.

STREET_HAS_PRIORITY (ADRSWA_IN-WAREN)

'X': Street has priority over PO Box (delivery address for example)

' ': PO Box has priority over street. This is the default value.

regards,

torsten_braun2
Explorer
0 Kudos

Hi Thien,

I have read the documenation, but if I understood it correctly, then I cannot change the order of the field i want to see in my address with the field PRIORITY_OF_LINES.

In my example: Our setting show the address street2, street1, street3, street4. We need to populate at least 3 of them, but to change to order back to street1. street2 etc.

Former Member
0 Kudos

you are working way too complex, make a address node and provide adressnumber and country_from.

torsten_braun2
Explorer
0 Kudos

I will try to explain a bit more: we are using an address node, simply SAP standard in the form. No changes via user exit.

Our needed fields from customer master data:

technical field names from the component workbench:

STANDARDADDRESS/STRUCT.STREET

STANDARDADDRESS/STRUCT.STR_SUPPL1

STANDARDADDRESS/STRUCT.STR_SUPPL2

STANDARDADDRESS/STRUCT.STR_SUPPL3

and they are displayed in the form via SAP standard address node in the following order for 006 GB:

STANDARDADDRESS/STRUCT.STR_SUPPL1

STANDARDADDRESS/STRUCT.STREET

STANDARDADDRESS/STRUCT.STR_SUPPL2

STANDARDADDRESS/STRUCT.STR_SUPPL3

according to the documenation this order is incorrect and we want the order as seen in master data for the UK address.

Former Member
0 Kudos

at first: adresses are normally formatted in the style of the country FROM which the letter is sent, not WHERE TO.

If you provide not only adressnumber but COUNTRY_FROM as well your adress wil automatically get formatted in the way it needs to be.

If that still doesnt satisfy your needs, well then why dont you just select your data and print it manually?

Then you have full control over what happens.

nabheetscn
Active Contributor
0 Kudos

Just create a address node and pass the adressnumber toit..It will automatically format the same.

Nabheet