Skip to content

Multiple Sales Document Item line #183

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

You must be logged in to vote

Hi,
sure.
The second argument of SetTable (inputList) is a IEnumerable<TInput>. TInput could be any type.
SetTable will create a row in the function table for each entry in inputList.

So you simple fill a array or list or any other enumerable with the data you would like to be mapped to the function table.

For example:

 // partner data
  var partners = new[]
  {
      new { Role = "AG", No = "4711" },
      new { Role = "WE", No = "4712" }
  };

// later in function definition: 
....
    .SetTable("SALES_PARTNERS", partners, (s, partner) => s  //this function will be called for each entry in partners
        .SetField("PARTN_ROLE", partner.Role)
        .SetField("PARTN_NUMB", partner.No)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ROLLS123
Comment options

Answer selected by fw2568
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