Replies: 2 comments 7 replies
-
Hello Noah, sorry for the late answer, but I was on holiday. Yes, that' s possible. return context.CallFunction("BAPI_DOCUMENT_GETDETAIL2",
Input: f => f
.SetField("DOCUMENTTYPE", documentId.Type)
.SetField("DOCUMENTNUMBER", documentId.Number)
.SetField("DOCUMENTPART", documentId.Part)
.SetField("DOCUMENTVERSION", documentId.Version)
.SetField("GETDOCFILES", "X")
Output: f =>
from documentData in f.MapStructure("DOCUMENTDATA", s => s.ToDictionary())
from files in f.MapTable("DOCUMENTFILES", s => s.ToDictionary())
select new Document
{
DocumentData = documentData,
Files = files
}); If you would like to dynamically evaluate all fields of the function you can use the IRfcRuntime interface to query fields of function module with YaNco/src/YaNco.Core/Structure.cs Lines 15 to 27 in e7e4303 Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Hi @fw2568, one year later I found the time to try it finally ^^ ... Your example showed to work with known structures. My issue is that I want to have something generic. There are different structures and I just want to build a generic json structure from it whatever it is. Is that possible? |
Beta Was this translation helpful? Give feedback.
-
The examples show how we can output specific Fields from an RFC request. How can I achieve outputting every fields that get returned from a RFC request?
Beta Was this translation helpful? Give feedback.
All reactions