cancel
Showing results for 
Search instead for 
Did you mean: 

Data Saving in forms with function module

Former Member
0 Kudos

I want to save my data in a table with the help of a function module.

Here are the steps, i should probably do:

1. Create a FM/BAPI which has the functionality to add data to your SAP table.

2. Now use service call to add the FM/BAPI fields as a context to your web dynpro component's context.

3. Now map it with the view where the adobe form is created.

4. Now use this context as the data source for the form.

5. Map the fields of the form with the attributes of the context.

6. Now create a button on the form or on your view which has a action event handler method.

7. Now in your Action method use code wizard to call the method created by service call to FM/BAPI.

I'm stuck at step 2. How do I add the fields of my function module?

I could only add strucutres and database tables in the create node functionality of the component controller.

How can I use here the fields of my function module?

Thanks, Peter

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Per Bag,

Do the following:

1. Right click on the web dynpro component.

2. Go to Create-->Service call.

3. Web dynpro wizard will appear. Click on continue.

4. Click radio button choose existing controller.

5. Select your component controller in controller option.

6. Press continue, and choose function module in the next screen.

7. Press continue and give the name of the function module.

8. Press continue and choose the fields of bapi/fm you want as data nodes.

9. Press continue.

10. The wizard automatically creates the method

Execute<Bapi/FM Name>.

11. Press continue and then press complete.

Thats all what is needed for service call.

Hope it will help.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Thanks, this was very helpful again

Answers (0)