Skip to Content
author's profile photo Former Member
Former Member

How to pass Date range as imporing parameter to function import

I have a funtion import within which I will be calling a method with date range as the importing paramter.

importing parameter for the backed method is a range table.

What should be EDM Core Type against the date in the Function Import parameters?

How can I pass multiple values for date in the URI while testing?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 16, 2014 at 05:35 AM

    It is very simple you can create a range table to do that

    You can check the standard bapi for example to do so

    'BAPI_CUSTOMER_GETCONTACTLIST parameter name is customerrange

    Hope it helps

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Vivek,

      For Date, you can use the EDM type as edm.datetime or edm.datetime offset.

      Please have a look at the below thread for whole discussion on this:

      And when you want to pass date in URI, you may pass date like below:

      ?$filter= Bldat eq datetime'2014-01-01T00:00:00' and Budat eq datetime'2014-01-01T00:00:00'


      Regards

      Gaurav K

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2014 at 04:01 PM

    Hello Vivek,

    Check the below ->

    Please have a look in the PART 2 at the section

    Testing the CancelBooking Action in the Booking Provider Class which shows how to pass date.

    .../CancelBooking?AirlineId=AA&ConnectionNo=0017&FlightDate=20111221&BookingId=00002152

    How To Write an OData Channel Gateway Service. Part 1 - The Model Provider Class

    How to Write an OData Channel Gateway Service. Part 2 - The Runtime Data Provider Class

    Inside Execute_Action method of your DPC_EXT class, Read entries from IT_PARAMETER table and create Range Table manually and then use that in the query/pass to your logic.

    Regards,

    Ashwin


    FIMP.png (9.3 kB)
    unassignmodel1.png (49.5 kB)
    unassignmodel1.png (49.5 kB)
    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.