Skip to Content

Passing Internal table as an input to OData Service

Hi,

I want to create an OData service which takes Internal Table as an Input.

Can someone help me how to do the same Step by Step for creating the OData Service and Testing it.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 11, 2015 at 01:01 PM

    Hi Samir,

    Follow links provided by Ashwin. For different operations:

    1. Create: a normal create would take only single entry. Use $Batch for creating multiple records.
    2. Update: a normal update would take only single entry. Use $Batch for updating multiple records.
    3. Delete: use can delete only one record at a time. Use $batch for multiple delete.
    4. Read: since it returns only one record at a time which is selected by the key properties, you can take only key in the filters.
    5. Query: you can pass multiiple filters. If you have the requirement of filling an internal table(one coloum) as i/p parameter of FM, you can change this to range and that is supported by query filters of OData. Otherwise use $batch as mentioned.
    6. Deep Entity: In this case, you can receive multiple line items in input. This method is used for create operation. The multiple line items are in relation with some header level. If you do not have header level in your requirement, create a dummy entity and associate it with item level. This way you can receive multiple line items.


    Regards,
    Ekansh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 11, 2015 at 11:42 AM

    OData service does not take any input.


    an OData service which takes Internal Table as an Input.

    There may not be direct options to achieve what you want . Batch can be a candidate where you may pass multiple entries. Deep Entity or $expand also support multiple items in a Parent - child relationship.

    However you need to do the modelling carefully.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2015 at 10:29 AM

    Hello Samir,

    Below will help ->

    For CRUD operation you can use BATCH.

    How To Batch Multiple Operations Into A Single Request

    If you have Header Item relation ship during Create, You can implement Create_Deep_Entity Method inside DPC_EXT Class.

    Step by Step development for CREATE_DEEP_ENTITY operation

    Regards,

    Ashwin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.