In this step, you will map the READ operation using the GetDetail BOR method in the User object from the data source.
The READ operation obtains the details of a particular business object.
In the list of USER methods in the data source view, select GetDetail.
Click Create Mapping.
In Operation Type, select Read.
The GetDetail BOR method contains a large number of structure and table parameters.
SAP Gateway is capable of simplifying such complex SAP interfaces, so that external clients can easily consume SAP business data.
Since there are many nodes that will not be used, it will be easier to deselect everything and then select only the ones you want to use.
Click the root node, GetDetail, to remove the selection.
A warning message is displayed, click Yes to continue.
Select only the following:
Expand the Address node and select the attribute TITLE_P and then click Change Mapping Route.
Change the name of the attribute, TITLE_P to TITLE in Property Name, and map it directly under the root node.
To flatten the attribute, select the root node, and then click the check mark to map it directly under the root node.
Click the check mark to continue.
Select FIRSTNAME, LASTNAME, and FULLNAME.
Under the Mapping Route column, there is no hierarchy information preceding the changed name, because these fields are matched and mapped automatically to existing Properties that are directly under the root node. These exist because they are already mapped in the QUERY operation.
Flatten the following attributes in the node, ADDRESS, by changing the mapping routes so that they fall under the root node and not within the ADDRESS node.
Also, rename them to the mapping route value if they have different names, (see steps 7 to 9 above).
LANGU_P: change to LANGUAGE.
DEPARMENT: no change, leave it as is DEPARMENT.
BUILDING_P: change to BUILDING.
FLOOR_P: change to FLOOR.
ROOM_NO_P: change to ROOM.
COMM_TYPE: no change, leave it as is COMM_TYPE.
TEL1_NUMBR: change to TELEPHONE.
FAX_NUMBER: no change, leave it as is FAX_NUMBER.
E_MAIL: no change, leave it as is E_MAIL.
The final result for the Address node should look as shown in the image below:
Expand the ACTIVITYGROUPS and PROFILES nodes, rename and set their properties as shown below.
Notice that they are renamed but are kept under their respective nodes.
Click the check mark to close the Map Operation window.
Within the Data Model section on the lower right, scroll to the bottom to find the ACTIVITYGROUPS and PROFILES object nodes with cardinality 0..n.
Set a key for Properties with cardinality 0..n.
Expand ACTIVITYGROUPS, right-click on ROLE and choose Set Key.
Do the same for PROFILES by setting PROFILE as the key.
Generate and save your Data Model.
You have successfully mapped attributes for the Read operation from your data source to Properties in the Data Model.
Continue with Add the Data Model to a Consumption Model.