on 06-08-2015 6:20 AM
Hi All,
I am working on soap to RFC synchronous scenario.The RFC response structure is similar to the below structure
RFC Response structure
ContactDetails(0 to unbounded)
{
--EmployeeID
--contact
--address
etc
} repeats for each Employee
ErrorDetails(0 to unbounded)
{
--EmployeeID
--ErroMsg
} repeats for each Employee
FamilyDetails (0 to unbounded)
{
--EmployeeID
--familyType
--familymemberName
etc
}repeats for each Employee
But the third party requires the below format
XMLStructure
EmployeeDetails
{
--EmployeeID
--contactDetails
--ErrorDetails
--FamilyDetails repeat for each family member
} repeat for each Employee.
Is it possible to convert the above RFC response structure to the required format as mentioned above.Please help me in mapping the above two structures.
Thanks,
Ramya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
None of the above solutions is working.Please guide me in mapping the target structures.I can't use sort/sort by Key because values are optional from the input.
Thanks,
Ramya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And Even if all the values exist getting the error details are getting wrongly populated.
For example consider employee IDs 1,2,0000,3 are coming in the input.0000 is not available and has error details.The error details of 0000 are getting populated in employee ID 1 in the target structure.Cant use sort by key as the error details exists only if the employee ID is not available.
Thanks,
Ramya
Hi Ramya,
Can you try using exist function to check if the employee ID exists, if yes then sort employee id and map to target else pass data as u want. Similarly sort other fields by sort by key,for other fields also you should use exists function to check if employee id is present.
Thanks
Shivdutt
have you checked with the team if the system sending the response can structure this as it is easier for maintenance too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramya,
For this specific case, you can make use of multi-mappings, i.e., 2 graphical mappings.
In the first one, map the Employee ID of contact details to contact_EMPID.
Similarly, Employee ID of Error details to Error_EMPID and Employee ID of Family Details to Family_EMPID.
In the second mapping, use the condition "IF contact_EMPID equalS Error_EMPID AND contact_EMPID equalS Family_EMPID" then map employee id to employee id of target, also map contact details, error details and family details to the respective target segments via remove context.
Regards,
Souvik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Souvik,
If all the segments have same set of employee ids the above mapping works.But in my scenario if the employee ID does not exist in RFC then it will send only error details and if the Employee ID is available in RFC then it will send all the details except error details.All the employee ids are maintained in pdata(personal data).
Thanks,
--Swetha
Hi Ramya,
Then in that case, you can maintain in FCC set.structuretitle as lets say "Record" for the response structure. This will then maintain a title for every occurring structure. Maintain its occurrence as 0..unbounded. And within "Record" maintain the occurrence in each Employee ID as 1..1.
This should work then.
Regards,
Souvik
Hi souvik ,
Already structure is maintained as above.And I am using sort for employee id and sort by key for details.But for a few employee ids data is not maintained in RFC then error details only will be coming from RFC.
for example there are 1,2,3 employee ids...1 has all the data ,2 is not present in ECC hence only error data and 3 has all the data.Now the values corresponding to 3 are getting populated in 2.
Thanks,
--Ramya
Hi Ramya,
Ok, then in the first mapping out of the two which I had previously suggested you can map Employee ID of source to Employee ID of target via "map with Default" UDF. This will then not suppress any empty employee id field in the first mapping.
Next, in the second mapping you can pass the Employee ID field through a custom UDF which checks whether the Employee ID field is equal to constant [] or not. If yes the custom UDF will throw an error else it will simply display as required. For custom UDFs via JAVA mapping there are several threads which you can follow. In this case it will be a simple one.
Regards,
Souvik
Hi All,
Please let me know the udf to sort the values of EmployeeID.
The employeeID comes from
Contactdetails(0-unbounded)
FamilyDetails(0-unbounded)
ErrorDetails(0-unbounded).
Thanks in advance,
Ramya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ramya,
Check this one. It talks about similar example.Look at the second example.
Also check Comment by Roberto Villadarez in the same blog.
--
Sendhil
Hi Sendhil,
Thanks for sharing the above link.But my requirement is bit complex.If my structure has only one type of details(like contact details) I can refer the above link.
But has Contact details,error details,....l(total of 9 structures).
So guide me in mapping the above strcuture.
Regards,
Ramya
Hi Ramya,
You can try using the sort function to sort the data as per the employee id and then using sort by key you can sort the other details. It would be helpful if you can share the mapping you have implemented.
Thanks
Shivdutt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shivduttsinh,
How the target structure will be developed based on the Employee ID.The rrequirement is as below
The employee details may come with Family details/Contact details/Error message details.since the occurence is 0 to unbounded.
For example
ContactDetails
Item
1
Contact1
Item
3
Contact3
ErrorDetails
Item
2
Errordetails of 2
Familydetails
Item
2FamilyDetails
Item
3FamilyDetails
The above structure needs to converted to
1Strucutre--Employeedetails
{
Item
1
Contact1
}
2ndStructure--Employeedetails
{
Item
2
Errordetails of 2
2FamilyDetails
}
3rd Structure--Employeedetails
{
Item
3
Contcat3
3Familydetails
}
The structures must be generated besed on the employee ID and the corresponding data of Employee ID must be present in it.I am still developing the mapping.
Thanks,
--Ramya
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.