Você está na página 1de 5

ZBC480_99_UNIT2_DEMO1_INTF p26 Set up configuration and favorites

Create an interface: TXN SE80 or SFP Interface: ZBC480_99_D1_INTF

Add Description: Demo Press Save

Save to your Package and Press Save

Save to your request Select the task next to your user id in the drop down Press the green check mark

ZBC480_99_UNIT2_DEMO1_INTF p26 Determine the type of the interface Go to the Properties tab Select the ABAP Dictionary-Based Interface option

Choose the interface tab Double click on Import Create Import parameters that will be passed from the application program to the Form at runtime. On the Right side, Choose the white sheet of paper icon to append a new row. Create the following Import parameters: structure internal table optional parameter with company logo on a URL invoice sending country variable Parameter Name IS_FLIGHT IT_CONNECTIONS IV_IMAGE_URL IV_SENDING_COUNTRY Press Save TYPE TYPE TYPE TYPE TYPE Type Name SPFLI TY_CONNECTIONS STRING X ADRC-COUNTRY Opt Flag Pass Value Default X US

Export parameters only added to interfaces that are compatible with Smart Forms. They are passed from the Form to the application program.

ZBC480_99_UNIT2_DEMO1_INTF p26 Double click on Global Data Create Global data that cannot be accessed from outside of the interface. Choose the white sheet of paper icon to append a new row. Create the following Global Data: global constant global address variable using a defined text line Variable Name Const GC_COMPANY GT_ADDRESS Press Save Type TYPE TYPE Type Name TEXT20 TLINE_TAB Default Dupont X

Create the Initializing Code This is the area where the data can be changed before entering the Form Double click on Code Initialization Create the following Input parameters: (Read Access) IS_FLIGHT IV_SENDING_COUNTRY Create the following Output parameters: (Write Access) IV_IMAGE_URL GT_ADDRESS Result

ZBC480_99_UNIT2_DEMO1_INTF p26

Add the following code


* set the image url if not provided by the ABAP app pgm IF iv_image_url IS INITIAL. iv_image_url = 'http://wts.wdf.sap.corp:1080/portal/Image/sap_logo.gif'. ENDIF. * formated customer address CALL FUNCTION 'CUSTOMER_ADDRESS_TO_ITF' EXPORTING is_customer = is_flight iv_sending_country = iv_sending_country IMPORTING et_address = gt_address.

Press Pretty Printer Press the Syntax Error button Press Save Activate the Interface

Check the interface for correctness Using TXNs: SE80, SE38 or SA38 Execute report: SAPBC480_CHECK

ZBC480_99_UNIT2_DEMO1_INTF p26

Enter Interface: ZBC480_99_D1_INTF

Result, the red Icons are ok, this is just a demo This program is only part of the training environment

Você também pode gostar