Function modules: Name and Address

ADDRESS_INTO_PRINTFORM

Function module ADDRESS_INTO_PRINTFORM formats an address for printing. The address is formated according to the postal regulations of recipient countries. Note that the country specific formatting of the address is decided by the 3 character country code in field LAND1 in the input address.

The functiom module is well documented in the on-line help.

Example:

REPORT adr.

TYPE-POOLS: szadr.


DATA:
  g_address_1                    LIKE adrs1,

  gi_address_printform_table     TYPE szadr_printform_table,
  g_address_printform_table_line TYPE szadr_printform_table_line.


START-OF-SELECTION.
  g_address_1-name1       = 'My Name'.
  g_address_1-street      = 'My Street'.
  g_address_1-house_num1  = '351'.
  g_address_1-city1       = 'Mycity'.
  g_address_1-post_code1  = 'XLS2530'.
  g_address_1-country     = 'GB'.


  CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
   EXPORTING
*    ADRSWA_IN                            =

     address_1                            = g_address_1
*    ADDRESS_2                            =
*    ADDRESS_3                            =
     address_type                         = '1'
*    ADDRESS_NUMBER                       = ' '
*    ADDRESS_HANDLE                       = ' '
*    PERSON_NUMBER                        = ' '
*    PERSON_HANDLE                        = ' '
     sender_country                       = 'US'
*    RECEIVER_LANGUAGE                    = ' '

*    NUMBER_OF_LINES                      = 10
*    STREET_HAS_PRIORITY                  = ' '
*    LINE_PRIORITY                        = ' '
*    COUNTRY_NAME_IN_RECEIVER_LANGU       = ' '
*    LANGUAGE_FOR_COUNTRY_NAME            = ' '
*    NO_UPPER_CASE_FOR_CITY               = ' '
  IMPORTING
*   ADRSWA_OUT                           =
*   ADDRESS_PRINTFORM                    =
*   ADDRESS_SHORT_FORM                   =
*   ADDRESS_SHORT_FORM_S                 =

*   ADDRESS_DATA_CARRIER                 =
*   ADDRESS_DATA_CARRIER_0               =
*   NUMBER_OF_USED_LINES                 =
*   NAME_IS_EMPTY                        =
*   ADDRESS_NOT_FOUND                    =
     address_printform_table              =  gi_address_printform_table.
  .

END-OF-SELECTION.
*Linetype can have the following values:
* A     FormOfAddr
* P     Compulsory empty line
* F     Contact person function
* 4     Name4
* 3     Name3
* R     Region
* 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 name
* 5     c/o name
* N     Name (and form of address) of a natural person
* D     Department
* O     City line
* 1     Name1


 LOOP AT gi_address_printform_table INTO g_address_printform_table_line.

    WRITE:/ g_address_printform_table_line-line_type,
            g_address_printform_table_line-address_line.

 ENDLOOP.



Result:


1 My Name          
S 351 My Street    
O MYCITY           
C XLS2530          
L GREAT BRITAIN    

 

 

 

Converted from CHM to HTML with chm2web Standard 2.7 (unicode)