Skip to Content

POST ODATA Return Table using SEGW

I have a requirement to use a POST request with a body but then return a table.

Example in the body I need to send just the key fields in JSON format

{

KEY1:"1234",

KEY2:"4567"

}

But then on the return I need to return structure with nested table for example KEY1 and KEY2 is the structure but with nested table BAPIRET2.

KEY1

KEY2

----BAPIRET2

----BAPIRET2

----BAPIRET2

----etc.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 20, 2017 at 11:33 AM

    Multiple steps:

    1)For the Return fields, you need to create a separate Entity, say "Results".

    2)Make an association with the entity what you want to post to "Results" entity.

    3) Implement the entity create logic in the "CREATE_DEEP_ENTITY" method of your DPC_EXT class.

    4) Create an internal table with what results you want to return

    5) Create a dynamic reference to this table and pass to Export parm "ER_DEEP_ENTITY"

    Add comment
    10|10000 characters needed characters exceeded