Hi, I have an application which creates new employees in a company. For that I have a form with multiple form containers (sapui5). Each form container corresponds to a certain abap table in sap system. I would like to know how can I import and map a WebService In NW GW which corresponds to the following entity relationships:
<EmployeeCollection> <Employee> <MainDetails> <Empfirstname></Empfirstname> <Emplastname></Emplastname> ........ </MainDetails> <ContactDetails> <Email></Email> <Workphone></Workphone> ........ </ContactDetails> <FamilyMemberCollection> <FamilyMember> <Firstname></Firstname> <Lastname></Lastname> ........ </FamilyMember> ........ </FamilyMemberCollection> </Employee> .....</EmployeeCollection>
I have Employee collection which can have 0...* Employees. Employee has Entities like MainDetails and ContactDetails AND also Collections like FamilyMembers which can have 0...* FamilyMember entities.
In SAP I dont have a table for Employees, all employee related details are held in different abap tables like MainDetails, ContactDetails or FamilyMembers. The tables are related by Formid field. Now FamilyMember table can have multiple lines with the same Formid (family members of an employee).
I can map a CREATE operation in SEGW for this, IF everything is singular.
What do i need to do differently in GW or Function module to be able to handle insertion of multiple family members into the FamilyMember abap table?
Also, how can I map GetEntity and GetEntitySet oprations so it would output me the kind of structure as i illustrated in the above code?