Skip to Content

Replicate the selected Target Group ID into a custom BO, and display number of members of the selected Target Group.

Technical analysis on the topic:
Place an Embedded Component as a facet in the standard Target Group TI screen, replicate Target Group ID into custom BO, and provide an Button to display number of members in the selected Target Group.

————————————————–Part A: Developing————————————————-

  1. Log in to SAP Cloud Applications Studio/SDK and create/edit a solution.
  2. Create Custom BO “”

import AP.Common.GDT as apCommonGDT;

businessobject CustomTG {


element CustTGID: ID;


element MembersCount : IntegerValue;

action UpdateMembers;


CustTGID will store the Target Group ID,
Transient element MembersCount to display number of members in the Target Group, this would not be persisted,
action UpdateMembers to trigger population of transient element MembersCount.

3. Implement Action to calculate Members count:

4. Create an Embedded Component (EC)
Go to the DataModel tab and create 2 structures
CustomTG to map fields from Custom BO
InportStr to map to the Inport from standard UI

Set “Work Protect Relevant” property for element MembersCount to False, since we do not want to save this element.

5. Create EventHandler “ReadorCreate” to save Target Group ID into the Custom BO:

a. Read to see if the Target Group ID is already saved

b. Condition to see if the Target Group ID is not yet saved:

c. Configure Operation on the above condition:
Create operation: To save data into the custom BO:

DataOperation: To copy data from the Inport into the EC structure:

6. Create an Inport to fire the above Event:

7. Fields on the EC with mapping information:

8. Event UpdateMembers: Mapped to the BO Action

9. In the UI Designer, navigate to the standard UI:

Select button “Add View with embedded Component”: to place the EC as a facet

10.Select the EC:

11. Bind: Map the Public Outport of the standard UI with the Inport of the Custom UI:

————————————————–Part B: Testing————————————————-

12. Log into the application UI

a.Navigate to the Target Group TI:

You would notice that:
New facet is added to the standard UI,
EC is displayed,
Target Group ID from the standard UI is replicated into the Custom BO

b. Selecting the button “Members Count” will determine the number of Members of the selected Target Group:


Please Zoom In to see images clearly wherever required.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply