You are on page 1of 6

ZBC480_99_UNIT2_EX1 p21 Business Example: A travel agency wants to print customer flight bookings invoices using the forms

tool. Design the interface for a form. Model solution: BC480. Task 1: Create Interface

Using TXN SE80 or SFP, create the interface ZBC480_## Create interface: TXN: SE80 or SFP

Enter a description: BC480 Interface Exercise 1

Save to Package

Save to Request/Task

ZBC480_99_UNIT2_EX1 p21 Task 2: Determine the type of the interface

Go to the properties tab Choose the Interface type: ABAP Dictionary-Based Interface

Task 3:

Create Import parameters

Choose the interface tab Double click on Import Choose the white sheet of paper icon to append a new row Create the following Import parameters: Parameter Name IS_CUSTOMER IT_BOOKINGS IV_IMAGE_URL IV_SENDING_COUNTRY Run Syntax check Press Save TYPE TYPE TYPE TYPE TYPE Type Name SCUSTOM TY_BOOKINGS STRING ADRC-COUNTRY Opt Flag X Pass Value Default X US

ZBC480_99_UNIT2_EX1 p21 Task 4: Create Global data

Double click on Global Data. Choose the white sheet of paper icon to append a new row Create the following Global Data: **The solution looks for the Default Value Dupont not DUPONT Variable Name TYPE Type Name Default Const GC_CLERK TYPE TEXT20 Dupont GT_ADDRESS TYPE TLINE_TAB Run Syntax check Press Save

Task 5:

Create Code Initialization

Double click on Code Initialization Goto the Input and Output parameters section Choose the white sheet of paper icon to append a new row Create the following: Input parameters: IS_CUSTOMER IV_SENDING_COUNTRY Output parameters: IV_IMAGE_URL GT_ADDRESS

ZBC480_99_UNIT2_EX1 p21

In the Code area: Set up a condition statement to determine the company logo URL if there isnt one Call the function module CUSTOMER_ADDRESS_TO_ITF to retrieve the formatted customer address. *ABAP CODE*
* set image url if not provided by the ABAP application pgm IF iv_image_url IS INITIAL. iv_image_url = ''. ENDIF. ************************************************************** * formated customer address CALL FUNCTION 'CUSTOMER_ADDRESS_TO_ITF' EXPORTING is_customer = is_customer iv_sending_country = iv_sending_country IMPORTING et_address = gt_address.

Press Pretty Printer Run a Syntax check Press Save

ZBC480_99_UNIT2_EX1 p21

Task 6:

Activate the interface and check the interface for correctness

Activate the Interface Using TXNs: SE80, SE38 or SA38 Execute report: SAPBC480_CHECK

Enter the Interface: ZBC480_99


ZBC480_99_UNIT2_EX1 p21