Open ghost opened 9 years ago
I'm this project is helping you.
This issue made me confused. I always thought that nested strcuture was not supported on Remote Function Call, but I don't know why, because I can't find any reference in SAP docs.
I'll leave this issue open and work on it when I get some time. If you have urgency, I suggest looking for a workaround for now.
Nested structures/tables (with theoretically infinite depth) are supported by the new SAP NW RFC SDK besides other things like UTF8, STRING/XSTRING and SSO. With this the serialization transformation to XML for ABAP-OO is now also compatible with RFC calls.
For example FM CTS_WBO_API_READ_REQUESTS_RFC results in a table CTS_REQUESTS of structure CTS_REQUEST, which itself includes another structure CTS_REQ_HEADER and two nested tables CTS_REQ_ATTRS and CTS_TASK_HEADERS.
SharpSapRfc is a great helper for calling SAP functions and getting the retrieved data mapped. Great work.
Using it in a real project, I ran into a problem handling nested XML "tables".
By calling an SAP Function Module using SoapSapRfcConnection.ExecuteFunction(), I get an XML from SAP that looks like:
I want to map this XML into an object structure like:
Using
RfcResult.GetTable<WfUser>("CT_WF_USERS")
, I am not able to achieve this. The reason is, thatGetTable<>()
does not handle the inner items list correctly, but simply treats it as a string.Looking at you code in
SoapRfcStructureMapper.FromXml<T>()
I figured out thatSetProperty()
is always called passing theInnerText
of an XML node. In short, it does not consider inner XML "tables".Is there a chance to get this functionality added to your component? Otherwise, I would have to create a workaround in order to get this case working.
I'm looking forward to your feedback.