cancel
Showing results for 
Search instead for 
Did you mean: 

How to select parameters of BAPI while creating a service layer

Former Member
0 Kudos

Hello All,

While creating a service layer and specifying a BAPI, I come across a screen where I have to select the parameters of the method. But I dont get any checkbox to select the parameters. How shall I specify that which all paramters I require for my method.

Regards,

Abhishek

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Abhishek,

You have to select the import parameter only via slection screen given via wizard to you.

Creating a Service Call for BAPI BAPI_FLIGHT_GETLIST

With the help of the service call function it is possible to call an existing function module from within a Web Dynpro component.To create a service call, you have an easy-to-use wizard at your disposal within the Web Dynpro tools in the ABAP Workbench.

Procedure

...

1. Starting the Wizard

To start the wizard, position the cursor on the Web Dynpro component to be edited in the object list at the left margin of the workbench window. Open its context menu and choose the entry Create->Service Call. The wizard is started and leads you through the creation process.

Web Dynpro for ABAP: Tutorial 2 u2013 BAPI Usage 6

19.12.2005

Press Continue.

2. Choice of Controller

On the second dialog window of the wizard, you can choose whether the service call is to be embedded in an existing controller or whether a new controller is to be created for this purpose. Service calls can only always be embedded in global controllers u2013 that is, in the component controller or in additionally created custom controllers. It is not possible, to embed service calls in view controllers.

a. Select radio button Use Existent Controller

b. Do not change the default entry for component: ZZ_00_BAPIFLIGHT

c. Enter for controller COMPONENTCONTROLLER

d. Press Continue.

3. Service Type and Service Selection

a. You now select, which service type should be used for this service call. Select radio button Function Module. Leave Destination blank. Press Continue.

b. Select the service: for Function Module enter BAPI_FLIGHT_GETLIST. Press Continue.

4. The Required Methods and Context Elements

On the two subsequent dialog windows, default values are listed for giving names to the context nodes and attributes required by the service call as well as to the required methods. The proposed names are based on the names of the embedded service, but you can change them as required. However, heed the respective notes in the corresponding dialog box.

a. Adapt Context: Select from Nodes/Attributes Names DESTINATION_FROM, DESTINATION_TO and FLIGHT_LIST. Press Continue.

Web Dynpro for ABAP: Tutorial 2 u2013 BAPI Usage 7

19.12.2005

b. Specify Method Name: leave all entries as provided: Component: ZZ_00_BAPIFLIGHT Controller: COMPONENTCONTROLLER Method: EXCUTE_BAPI_FLIGHT_GETLIST Press Continue.

5. Completing the Choice

When you have confirmed the last dialog box, the generation is triggered. Afterwards you now have the required methods and contexts at your disposal for using them within your Web Dynpro component.

Result

The component controller context now contains

Former Member
0 Kudos
Former Member
0 Kudos

see if dont select anything then at the end, I get an empty node with just the BAPI name.

With reference to your example, I am not getting Importing and Changing parameters but just the "BAPI_FLIGHT_GETLIST" node

Former Member
0 Kudos

Hi

In the wizard you mentioned there is no checkbox option but there is a column named 'object type' with the drop down values, in that you select 'context/attribute' for the parameters you want in the context

Hope this helps U

Regards

Tamil

Former Member
0 Kudos

yeah that seems to do the trick.

Just one small issue remains pending. The parameters which I wanted under "Importing" are coming under changing

Former Member
0 Kudos

Hi Abishek,

After entering the Function Module the next step is Adapt Context.Here you will see the all the Importing,Exporting and changing parameters.Observe Prarameter Group and Parameters under node type to know the importing and changing parameters.Now change the Object type of parameters context to controller attribute .Thats all you will get the context attributes in component controller