Академический Документы
Профессиональный Документы
Культура Документы
If our application makes no use of the Business Address Services but you still want to have country-specific
addresses, we must use ABAP coding to achieve this. It is possible to do this in the application program or in the
initialization coding of the interface.
TYPES:
BEGIN OF ty_adr_printform_table_line,
line_type TYPE ad_line_tp,
address_line LIKE adrs-line0,
END OF ty_adr_printform_table_line.
TYPES:
ty_adr_printform_table TYPE TABLE OF ty_adr_printform_table_line.
Step 4: Define Global Work Areas and Internal Tables under Global definition as shown below.
Step 5: Write the below code in code initialization part. Check for errors and activate the interface.
SELECT SINGLE *
FROM scustom
INTO is_scustom
WHERE id EQ is_customer_id.
is_address-title_text = is_scustom-form.
is_address-name1 = is_scustom-name.
is_address-street = is_scustom-street.
is_address-po_box = is_scustom-postbox.
is_address-post_code1 = is_scustom-postcode.
is_address-city1 = is_scustom-city.
is_address-region = is_scustom-region.
is_address-country = is_scustom-country.
* Address Format According to Post Office Guidelines
* Note : Refer Function module documentation for more information.
CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
address_1 = is_address
address_type = '1' "normal/company
sender_country = is_country
number_of_lines = 8
IMPORTING
address_printform_table = it_address_lines.
Step 9: In Interface we will find the data that was created in the interface. We need to drag the elements
that need to be displayed in output into the content area.
Step 11: Drag the static text from the library into the form and provide the descriptions of the fields.
Step 12: Set the Border properties of Address text field as shown below.
Step 13: Set the Object properties of Address text field as shown below.
Step 14: Wrap the address field into Subform as shown below.