Skip to content

"RFC_READ_TABLE" #90

Answered by fw2568
siasty asked this question in Q&A
Discussion options

You must be logged in to vote

try this example:

var clientTable = await context.CallFunction("RFC_READ_TABLE",
    Input: f => f.SetField("QUERY_TABLE", "T000"),
    Output: f => 
        from fields in f.MapTable("FIELDS", s=>
            from fieldname in s.GetField<string>("FIELDNAME")
            from offset in s.GetField<int>("OFFSET")
            from length in s.GetField<int>("LENGTH")
            select new { fieldname, offset, length }
            )
        from lines in f.MapTable("DATA", s=>s.GetField<string>("WA"))
        select lines.Map(line =>
            fields.ToDictionary(field => field.fieldname, field =>
                {
                    //special handling for last field, as nwrfc truncates st…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by fw2568
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #84 on May 25, 2021 14:13.