02-18-2006 4:03 PM
TYPES: BEGIN OF szadr_printform_table_line,
line_type TYPE ad_line_tp,
address_line LIKE adrs-line0,
END OF szadr_printform_table_line.
TYPES: szadr_printform_table TYPE szadr_printform_table_line OCCURS 0.
DATA: gt_line TYPE szadr_printform_table_line.
DATA: gt_address TYPE szadr_printform_table.
CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
ADDRESS_TYPE = '1'
ADDRESS_NUMBER = '0000022786'
SENDER_COUNTRY = 'US'
NUMBER_OF_LINES = '1678SITHO'
IMPORTING
ADDRESS_PRINTFORM_TABLE = gt_address[].
But the address does not get sorted according to Line priority I am defining here ?
02-20-2006 7:02 AM
Hi Tushar,
Function ADDRESS_INTO_PRINFORM' work like ADDRESS ENDADRESS of SAPSCRIPT.
PRIORITY
Specifies which of the address lines may be omitted should this be necessary. Any combination of the following codes may be specified. The order in which you list the codes determines the order in which address lines are left out.
The codes are as follows:
A Title
P Mandatory empty line
4 Name4
3 Name3
R Region
T Neighborhood, administrative section of a city (CITY2)l
D Department
L Country name
C Post code or zip code
2 Name2
B P.O. Box (Japan only)
S Street name and number or P.O. Box, depending upon DELIVERY parameter
N Name and form of address of natural person (PERSON and TITLE)
I Location information in LOCATION
O City
Just have look into blow link it may useful.
http://help.sap.com/saphelp_46c/helpdata/en/d1/803238454211d189710000e8322d00/frameset.htm
Regard,
Vinod