Customer Bap i Example

17
CUSTOMER BAPI EXAMPE 2015-02-17 1 1.1. Customer BAPI Exampe 1.1.1. Start Personas In this example I will show you how to exctract data from a BAPI. We will be using a customer BAPI where we will input the customer number, and get back Name, City and Country. (1) Click . 1.1.2. Create a New Flavor (1) The Create New Flavor is clicked.

description

Customer Bap i Example

Transcript of Customer Bap i Example

Page 1: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 1

1.1. Customer BAPI Exampe

1.1.1. Start Personas

In this example I will show you how to exctract data from a BAPI. We will be using a customer BAPI where we will input the customer number, and get back Name, City and Country.

(1) Click .

1.1.2. Create a New Flavor

(1) The Create New Flavor is clicked.

Page 2: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 2

1.1.3. Enter Name and Description

(1) Click Enter Name and Description.

1.1.4. Click Create

(1) Click Create .

1.1.5. Hide Tree, HTML viewer and Splitter Shell

(1) Selet Tree, HTML Viewer and Splitter Shell and Click here Hide.

Page 3: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 3

.

1.1.6. Select Tool Bar and Hide

(1) Select Tool Bar and Click Hide .

1.1.7. Change the Text on the Title Bar

(1) Change Title Bar .

1.1.8. Display Customer Data

(1) Enter Display Customer Data and Click .

Page 4: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 4

1.1.9. Insert Text Field

(1) Click here Text Field.

1.1.10. Insert Label

(1) Click Insert Label .

1.1.11. Insert Label

Insert 3 more labels, one for Name, City and Country.

(1) Click Insert Label .

Page 5: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 5

1.1.12. Change Background of Container

(1) Click .

1.1.13. SAP Easy Access - User Menu for I810477 - Google Chrome

(1) Click .

Page 6: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 6

1.1.14. Change color of Title Bar

(1) Click .

1.1.15. SAP Easy Access - User Menu for I810477 - Google Chrome

(1) Click .

1.1.16. Insert Label

Page 7: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 7

In total you will have 3 Labels each one with a "?" will be a holding place for the data you will receive from the RFC. Please note, you can't write read only data into a Text Box, so to display Read-Only data please use the Label field.

(1) Click Insert Label .

1.1.17. Save Flavor

(1) Click Save .

1.1.18. Launch Transaction SE37

(1) The field is filled out.

1.1.19. Enter the Name of the BAPI

(1) Enter the name of BAPI and Click .

Page 8: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 8

1.1.20. Click Import Tab

CustomerNo is our input field.

(1) Click .

1.1.21. Click Export Tab

(1) The output will be customer address variable .

1.1.22. Click on Associated Type

(1) is double-clicked.

Page 9: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 9

1.1.23. Export Fields: Name, City

(1) Export Fields Name and City.

1.1.24. Export Field: Country

(1) Click .

1.1.25. Click Back button to Go Back to Flavor

(1) Click Back .

Page 10: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 10

1.1.26. Start Personas

(1) Click .

1.1.27. Start Scripting

(1) Click Scripting .

1.1.28. Enter a new Script Name

(1) Click .

Page 11: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 11

1.1.29. Click object Picker and Select Customer Number text Field

(1) Click Customer Number Text Field .

1.1.30. Define Variable for Customer Number

(1) Use the object ID and define a variable.

1.1.31. Define RFC from which Data will come

(1) Define RFC:

There is a set of empty brackets behind the comma. If the RFC resided on a different server, you would have to specify the location of the RFC in those brackets.

Page 12: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 12

1.1.32. Define the variable going into the RFC

(1) Define variable going into RFC:

1.1.33. Define the Variable coming from RFC

(1) Define variable coming from RFC:

1.1.34. Send the RFC

(1) Send RFC:

Page 13: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 13

1.1.35. Parse the Customer Address to get Name, City and Country

(1) Parse the Customer Address:

1.1.36. Define where the Variables will Go

(1) Click Object Picker and select Name label.

1.1.37. Define Name

(1) Define Name;

Page 14: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 14

1.1.38. SAP Easy Access - User Menu for I810477 - Google Chrome

Do the same for City and Country.

(1) Add City and Country.

Click Save the Script .

1.1.39. Enter Customer Number

(1) The field is filled out.

Page 15: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 15

1.1.40. Execute the Script

(1) Click Execute .

1.1.41. Close the Scripting Window

(1) Click Save and Close .

1.1.42. Edit Flavor

(1) Click Edit .

Page 16: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 16

1.1.43. Insert Script Button

(1) Click Script Button .

1.1.44. Attach Script Event

(1) Click Script Events and attach the Script you created.

1.1.45. Save and Exit

(1) Click Save and Exit .

Page 17: Customer Bap i Example

CUSTOMER BAPI EXAMPE

2015-02-17 17

1.1.46. Test Script

(1) The field is filled out.

1.1.47. Test Script

(1) Click .

1.1.48. Finished Script