Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member202465
Contributor
0 Kudos

To the 7.1+ version

A common scenario is for the user to select several entries from a table. In some cases, we need to pass all selections as one Data Field.

An example application might look this way: after pressing Submit and getting the bank list from Service 1, the user selects the bank names to pass to Service 2 (the bottommost Form is added for testing purposes):

1. Add relevant Data Services to the model. Connect input and output for the first Data Service to get the results table:

2. Add a Data Store element.

3. Add a Text Field called selection to the Data Store.

4. Add a check box column to the result Table from service 1. This table should also be made editable (Editing Condition == TRUE):

5. The Assign Action on the check box column is as follows - the Source Expression is:

IF(@BOOL1==true,STORE@selection&@BANK_NAME&';',REPLACE(STORE@selection,@BANK_NAME&';',''))

  • If value is true - add to the selection the current value concatenated to ';' as delimiter.
  • If value is false - in the selections Field replace the current value with an empty string.

Note: Our use of REPLACE() removes all occurrences of the value. In case repetitions are relevant the solution should be revised.

6. The Button added to the Toolbar activates the PASS_SELECTION event:

7. In the mapping to the 2nd service the Assign Value is taken from the Data Store, where our selection field is defined. The event name is the one triggered by our new Toolbar Button:

To the 7.1+ version

1 Comment