cancel
Showing results for 
Search instead for 
Did you mean: 

passing multiple records from a form to a BAPI/function module

Former Member
0 Kudos

Hi,

I'm trying to figure out how to pass multiple records from a form to a BAPI or function module, but do not find an easy how-to or example. I found a how-to on 1 this links (https://www.sdn.sap.com/irj/sdn/visualcomposer?rid=/webcontent/uuid/91b3bb34-0c01-0010-ef94-b74567074bdf [original link is broken]) with the title How to Pass Multiple Records from a Form to a BAPI. This how-to assumes you already have the control design model FIN_HCM_CORPORATE_GOVERNANCE_DESIGN. The thing is that I do not have this model and neither find the BAPI with which they work.

Can someone help me out on this?

thanks in advance!

Tom

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

From where u r passing multiple records to BAPI, is it form or table view, my guess it must be table view

if that is the case u need to set two important properties of a table view

first open u r table view in configure elemten window

and set selection mode == multiple, and check the keep select row option and set editing mode as editable.

Note::make sure that ur bapi has a logic of updating multiple records at a time.

hope this will solve u r problem

regards

srinivas

Former Member
0 Kudos

thank you. I read on some threads that you have to flip the BAPI ports to allow mapping on the VC tables. Why and how should this be done?

thank you,

Tom

Former Member
0 Kudos

Hi,

ya you need to flip the ports

You can flip the ports like this

select the data service at the right side u can see the ports.

select the required ports right click and select flip port

hope this works

Regards

Srinivas

Former Member
0 Kudos

Hi Tom,

this is quite simple. You have to flip port the port for your table parameters. A BAPI/RFC function module has import and export parameters for single values. Then you have also table parameters for passing a whole table or as you have written for passing multiple records. If you drag a BAPI/RFC function module on VC storyboard the table parameters are by default output ports, but they could be both, input and output ports.

Ok for passing multiple values, you should have a table and set the selection mode to multiple. Then connect the output port of your table with the input port (which you have flipped the port before) of the BAPI/RFC function module. The you have to configure the line between table and BAPI/RFC function module. Set the mapping scope to all data rows.

This should work, but it depends on your SPS. You need SPS10.

Also have a look here:

<a href="https://wiki.sdn.sap.com/wiki/display/VC/Selectingmultiplevalues">https://wiki.sdn.sap.com/wiki/display/VC/Selectingmultiplevalues</a>

Best Regards,

Marcel

Former Member
0 Kudos

Hey,

I've been able to pass the values, but the only thing that's going wrong is that it doesn't make a difference whether I select 1 line or 5 lines or all lines, all data is passed to the function module...

How can I make it pass only the selected values?

thanks,

Tom

Former Member
0 Kudos

hi tom,

set the table view property

i.e please check the check box "keep selected rows" option in the table view

regards

srinivas

Lisi
Advisor
Advisor
0 Kudos

Hi Tom,

If you want to pass only the selected rows you have to ser the mapping scope to "selected rows" instead of "all dada rows".

Regards,

Lisi

Former Member
0 Kudos

checking the checkbox didn't work.

when I choose Elizabeths suggestion, I get a deployment failure. Anyone knows why this happens?

thank you,

Tom

Answers (0)