Quantcast
Channel: SCN: Message List - SAP Gateway
Viewing all 6105 articles
Browse latest View live

Re: Batch service passing multiple values as filters

$
0
0

Hi Ashwin,

 

Thanks for the multiple values query.

 

However, I tried removing the space earlier itself, it was giving error.

' invalid token detected at position number 24 ' in the error log.


Without the date fields it's working fine now. I am getting the filter values. So I am seeing the datetime field passing.

 

After doing the complete change with datetime, it is giving the error.

Invalid parametertype used at function 'eq' (Position: 11) in the error log.

 

Below is the new query

 

--batch

Content-Type: application/http

Content-Transfer-Encoding: binary

Accept: application/xml

 

GET ztotal_EmpSet/?$filter=StartDate+eq+datetime'2016-08-24T00:00:00'+and+EndDate+eq+datetime'2016-08-28T23:00:00'+and+Unit+eq+'50006636'+and+DateField+eq+'BASIC'+and+Id+eq+'1' HTTP/1.1

 

 

--batch--

 

Regards,

Gopa


Implement Sorting in SAP Gateway

$
0
0

Is there any recommended way to implement sorting functionality via ODAta in Gateway. Since using an OData model which is server side implementation for sorting a request is to be made now to gateway to fetch and bind the results in UI.

 

 

Are there any samples or tutorials to implement sorting at Gateway

Re: Batch service passing multiple values as filters

$
0
0

Sorry i am unable to get whats the exact issue now. For which Parameter & Value you are facing the issue ?

Can you please explain again ?

Re: Batch service passing multiple values as filters

$
0
0

I just checked the entity type.

 

StartDate and EndDate both are of type string i.e. edm.string not datetime..

 

I am getting all the five values in the filter if I pass the get like...

 

GET ztotal_EmpSet/?$filter=StartDate+eq+'24.08.2016T00:00:00'+and+EndDate+eq+'28.08.2016T23:00:00''+and+Unit+eq+'50006636'+and+DateField+eq+'BASIC'+and+Id+eq+'1'HTTP/1.1

 

However, I want to pass the Start date as 24.08.2016 00:00:00 with a space as a string using something like

 

GET ztotal_EmpSet/?$filter=StartDate+eq+'24.08.2016 00:00:00'+and+EndDate+eq+'28.08.2016 23:00:00''+and+Unit+eq+'50006636'+and+DateField+eq+'BASIC'+and+Id+eq+'1'HTTP/1.1


So the batch request is not taking the space here.


Can you tell me how can I pass the date as a string with space?


Gopa



Re: Batch service passing multiple values as filters

$
0
0

I would recommend to use Edm.DateTime only for Date fields in the GW model.

Re: Batch service passing multiple values as filters

$
0
0

Thank you Ashwin.

 

I used Edm.DateTime instead of string and getting the required data in the filters.

 

The following thread also tells about the standard ways to do it.

Rules for OData datetime properties

 

Regards,

Gopa

How to create ODATA services in S4HANA

$
0
0

Can I get any link or steps to create odata service on S4HANA. any suggetions.

Re: Implement Sorting in SAP Gateway

$
0
0

Hello Steve,

 

Parameter on which we would like to sort can be sent as part of URL as below.

 

/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/FlightCollection?$orderby=carrid desc

Where result set is sorted on carrid in descending order.

 

We need to manual implement sorting logic in the DPC_EXT class by using importing parameter IT_ORDER of the method Get_EntitySet to get all the sort parameters which are sent as part of URL.

 

Regards,

Ashwin


Re: SAP Gateway - C#.NET HTTP WebRequest Post - "The remote server returned an error: (403) Forbidden."

$
0
0

Hi you may try storing your session cookies.

Odata backend progress indicator

$
0
0

Hi,

 

I was wondering whether it is possible to send some sort of progress indicator from the backend to the frontend.

 

My situation is as follows:

In my application i have a button which triggers an odata function import that has to sequentially create (and test) a bunch of rfc connections in the backend.

Now due to the fact that testing an rfc (using rfc_ping) might take some time the entire operation can take over a minute to complete.

 

Thus my question whether i could for example after every rfc-test trigger some sort of action to notify the user of the progress.

Then my busydialog in the frontend would become something like:

 

"Testing rfc 1 of x"

next: "testing rfc 2 of x"

etc...

 

Is this possible using only one function call, or do i have to split it into x completely seperate odata calls and implement the counting/looping logic in my frontend?

 

Kind regards,

Pieter Verhoeven

Re: getting error that --> '/IWFND/OM_MED_CATAL_ODC_0002_BE' '01' 'DEFAULT' does not exist

$
0
0

Hello Martin,

 

Thanks for your reply. Using /IWFND/MAINT_SERVICE, I checked the service "/IWFND/SG_MED_CATALOG" Version 002 using "SAP Gateway client".

 

URL "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/?$format=xml" executed good with no errors. But when I selected one of the entitysets (Example: Annotations) and try to execute, it fails with same error message "No System Alias found for Service '/IWFND/SG_MED_CATALOG_0002' and user 'XXXX'

 

Can you please help?

How to Pass table as input parameter in Function Import

$
0
0

Hi,


I would like to know, how to pass table or multiple values for same field in "Function Import" as an input parameter.

As of now, I came to know, it's not possible in standard way.


Is there any direct/indirect way to pass table as input parameter?


Thanks,

Shubhrajit

Re: How a field of table type is got separated from a zstructure while creating a odataservice

SAP Gateway Exception

$
0
0

Hi everybody.

 

I'm starting with sap gateway and i'd like to custom my error response when i'm calling the exception.

 

It would be possible? For example:

 

 

The original response:

 

{

  "error": {

    "code": "SY/530",

    "message": {

      "lang": "pt",

      "value": "MESSAGE I"

    },

    "innererror": {

      "application": {

        "component_id": "BC",

        "service_namespace": "/SAP/",

        "service_id": "ZGW_PLANNING_PRODUCTION_SRV_01",

        "service_version": "0001"

      },

      "transactionid": "57CE749CDC2E533AE1000000AC0C0CD0",

      "timestamp": "",

      "Error_Resolution": {

        "SAP_Transaction": "",

        "SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"

      },

      "errordetails": [

        {

          "code": "",

          "message": "MESSAGE I.",

          "propertyref": "",

          "severity": "error",

          "target": ""

        },

        {

          "code": "",

          "message": "MESSAGE II.",

          "propertyref": "",

          "severity": "error",

          "target": ""

        },

        {

          "code": "/IWBEP/CX_MGW_BUSI_EXCEPTION",

          "message": "",

          "propertyref": "",

          "severity": "error",

          "target": ""

        }

      ]

    }

  }

}

 

I'd like to receive the following structure:


{

      "errordetails": [

        {

          "code": "",

          "message": "MESSAGE I",

          "propertyref": "",

          "severity": "error",

          "target": ""

        },

        {

          "code": "XX",

          "message": "MESSAGE II",

          "propertyref": "",

          "severity": "error",

          "target": ""

        }

      ]

}


Re: How a field of table type is got separated from a zstructure while creating a odataservice

$
0
0

Hi Lakshman,

 

Thanks for your reply.

 

As you said, i am using deep structure .I have tried to use the method of create_deep_entity to display all the entities associated with main entity set. But i got stuck.

Below is the information about my objects i created .

 

ztest_str1  -- parent structure(contains child) , ztest_str2  -- child strucutre

 

strucutres.JPG

 

ztest_deep -- rfc fm

 

FM.JPG

 

and i have created association between the parent and child strucutre (but there are  no matching keys)

 

I modified Define Method in MPC_EXT and created deep structure in TYPES as below.

 

define method.JPG

define structre fields in mpc_ext.JPG

 

 

 

i redefined create_deep_entity method in DPC_EXT and written the below code

 

data :

            ls_output type ZCL_ZTEST_DEEP_MPC_EXT=>ts_new ,

            lt_output type table of ZCL_ZTEST_DEEP_MPC_ext=>ts_new ,

            ls_name3  type ZCL_ZTEST_DEEP_MPC_EXT=>ts_name3,

            lt_name3  type table of ZCL_ZTEST_DEEP_MPC_EXT=>ts_name3.

 

     data : ls_str1 type ztest_str1.

* Upon match, access data from IO_DATA_PROVIDER

 

     io_data_provider->read_entry_data( IMPORTING es_data = ls_output ).

 

* Move data into  structure

  " Header data

     ls_output-id = '1' .

     ls_output-name1 = 'ABCDEF'.

     ls_output-name2 = 'XYZ123'.

  "Item data

     ls_name3-value1 = '1234'.

     ls_name3-value2 = '5678'.

     ls_name3-value3 = '9876'.

     ls_name3-value4 = '1111'.

     append ls_name3 to lt_name3.

 

*DATA LS_STR1  TYPE ZTEST_STR1.

*DATA LT_NAME3 TYPE STANDARD TABLE OF ZTEST_STR2.

 

    CALL FUNCTION 'ZTEST_DEEP'

      EXPORTING

        ls_str1        = ls_str1

      TABLES

        lt_name3       = lt_name3

              .

 

 

      copy_data_to_ref(

  EXPORTING

  is_data = ls_output

  CHANGING

  cr_data = er_deep_entity

  ).


While trying to execute the gateway, i got no values found in entityset.


Did i miss anything in expanding the entity or  FM declaration ?


Please help


Re: SAP Gateway Exception

$
0
0

Hi Enio,

 

Is there some reason you would want to reduce the amount of information that is returned?  The error payload is in a straightforward JSON string format that can easily be converted into a JavaScript object with one line of code.  Likely any attempt to intercept the message output for an exception and override the value would require a number of standard code changes.

 

 

 

Regards,

Ryan Crosby

Login form same server and instance

$
0
0

    Dear Sir,

 

I have a dev client in 301 and 370

it uses same ip address and same instance

 

I also have created odata service in 301, register the service and add system alias.

I also done same in 370 (register the service and add system alias)

 

But whenever I call the url in 370, it always prompted a login screen for client 301.

the url that I generate in 370 also the same one in 301.

 

How do I set so that when in 370 I can load data from 370 and not 301.

 

Thanks

Re: Login form same server and instance

$
0
0

The RFC destination in the Logon and security TAB is already point to 370

but when I try to Remote logon, it still point to 301

 

any idea?

My Leave Request attachment Error

$
0
0

Hi Experts,

 

Anyone of you please help me on this issue,My leave request application while  send a leave request with attachment we are facing the below error.

Attachment error.png

@Thanks in Advance

Re: Batch service passing multiple values as filters

$
0
0

Hi,

 

Can we pass a batch request to get_expanded_entityset?

 

Regards,

Gopa

Viewing all 6105 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>