zbc480_99_unit2_ex1 p27

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 1

Upload: x3phyrhunt3r

Post on 09-Feb-2016

30 views

Category:

Documents


3 download

DESCRIPTION

SAP Adobe Forms course unit 2

TRANSCRIPT

Page 1: ZBC480_99_UNIT2_EX1 p27

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

1

Page 2: ZBC480_99_UNIT2_EX1 p27

ZBC480_99_UNIT2_EX1 p21

Task 2: Determine the type of the interface

Go to the properties tabChoose the Interface type: ABAP Dictionary-Based Interface

Task 3: Create Import parameters

Choose the interface tabDouble click on Import

Choose the white sheet of paper icon to append a new rowCreate the following Import parameters:

Opt PassParameter Name TYPE Type Name Flag Value DefaultIS_CUSTOMER TYPE SCUSTOMIT_BOOKINGS TYPE TY_BOOKINGSIV_IMAGE_URL TYPE STRING X XIV_SENDING_COUNTRY TYPE ADRC-COUNTRY ‘US’

Run Syntax checkPress Save

2

Page 3: ZBC480_99_UNIT2_EX1 p27

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 rowCreate the following Global Data:

**The solution looks for the Default Value ‘Dupont’ not ‘DUPONT’Variable Name TYPE Type Name Default

ConstGC_CLERK TYPE TEXT20 ‘Dupont’ XGT_ADDRESS TYPE TLINE_TAB

Run Syntax checkPress Save

Task 5: Create Code Initialization

Double click on Code Initialization

Goto the Input and Output parameters sectionChoose the white sheet of paper icon to append a new row

Create the following:Input parameters: Output parameters:IS_CUSTOMER IV_IMAGE_URLIV_SENDING_COUNTRY GT_ADDRESS

3

Page 4: ZBC480_99_UNIT2_EX1 p27

ZBC480_99_UNIT2_EX1 p21

In the Code area:Set up a condition statement to determine the company logo URL if there isn’t oneCall 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 pgmIF iv_image_url IS INITIAL. iv_image_url = 'http://wts.wdf.sap.corp:1080/portal/Image/sap_logo.gif'.ENDIF.*************************************************************** formated customer addressCALL FUNCTION 'CUSTOMER_ADDRESS_TO_ITF' EXPORTING is_customer = is_customer iv_sending_country = iv_sending_country IMPORTING et_address = gt_address.

Press Pretty PrinterRun a Syntax checkPress Save

4

Page 5: ZBC480_99_UNIT2_EX1 p27

ZBC480_99_UNIT2_EX1 p21

Task 6: Activate the interface and check the interface for correctness

Activate the InterfaceUsing TXNs: SE80, SE38 or SA38

Execute report: SAPBC480_CHECK

Enter the Interface: ZBC480_99

Result

5

Page 6: ZBC480_99_UNIT2_EX1 p27

ZBC480_99_UNIT2_EX1 p21

6