Quantcast
Channel: SCN : Popular Discussions - SAP Gateway
Viewing all 1195 articles
Browse latest View live

Create Deep Entity Method

$
0
0

Hello Experts ,

 

I would like to know the possibility to create 2 deep-Insert methods for a single project in SEGW .As a project will have single Deep_Insert method in Data Provider extension Class how can we Implement 2methods for different purposes . For Both SalesOrder and Quotation creation there will be Header and Items where it can be implemented only in Deep_Insert method . Please let me know the possibility.

 

 

Appreciate your Help.

 

 

Thanks,

Uday.


SAP NetWeaver Gateway

$
0
0

Unable to install SAPNetWeaverGatewayPluginForEclipse_2.6.400.

 

Below is the error message.

 

"Cannot complete the install because one or more required items could not be found.

Software currently installed: SAP NetWeaver Gateway – Android Toolkit 2.6.400.201211111632 (com.sap.iw.gw.oc.eclipse.android.feature.feature.group 2.6.400.201211111632)

Missing requirement: Dalvik Debug Monitor Service 20.0.3.v201208082019-427395 (com.android.ide.eclipse.ddms 20.0.3.v201208082019-427395) requires 'bundle com.android.ide.eclipse.base 0.0.0' but it could not be found

Cannot satisfy dependency:

From: Hierarchy Viewer 20.0.3.v201208082019-427395 (com.android.ide.eclipse.hierarchyviewer 20.0.3.v201208082019-427395)

To: bundle com.android.ide.eclipse.ddms 0.0.0

Cannot satisfy dependency:

From: SAP NetWeaver Gateway – Android Toolkit 2.6.400.201211111632 (com.sap.iw.gw.oc.eclipse.android.feature.feature.group 2.6.400.201211111632)

To: com.android.ide.eclipse.hierarchyviewer 11.0.0"

$filter from UI5 - Filter Property name does not match model property

$
0
0


Hello,

 

we have quite a strange requirement. Due to some drill-downs from other applications it's not possible to specify the sPath of the filter in the filter object properly --> this means the parameter we will hand over will not always match the properties defined in the Odata Model.

 

We thought of some kind of workaround which might can help us. I have defined a dummy "FILTER" property in the model, which will contain a separate  filter string

 

--> e.g.

l_filter_string = "$filter=substringof(%27Source_Loc%27,SOURCE_LOC)%20and%20substringof(%27Act_Loc%27,ACT_LOC)%20and%20substringof(%27Del_no%27,DEL_NR)%20and%20substringof(%27Product_ID%27,PRODNR)%20and%20substringof(%27TRACKING_ID%27,TRXID)%20and%20substringof(%27PO_NO%27,PO_NR)%20and%20substringof(%27REason%27,REASON_CODE)%20and%20substringof(UPSsad9999hflhasdfjh,FILTER)%20and%20ONTIME_STATUS%20eq%20%27NOT_OK";

 

when receiving the data in the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET I will evaluate the it_filter_select_options which will be used to contruct the select to the DB. Is there a possibility to somehow append and split this filter string in a way that we get the separate values in the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET I will evaluate the it_filter_select_options table.

 

at the moment I receive the filter string in the Property "FILTER"

it_filter_select_options.jpg

 

this is what I want to split up and add to the it_filter_select_options table as separate properties:

it_filter_select_options_String.jpg

 

Thanks for your help.

Regards Marco

Fetching csrf token for create service

$
0
0

hi,

i have implemented a create service which is binded with front-end , but it gives error csrf token validation failed. i have read previous posts on csrf fetching,but those methods didn't work.

I dont want to disable csrf token from backend (using ~CHECK_CSRF_TOKEN = 0 ).
How can i fetch csrf token value ?

if We can use read service to fetch csrf token then how can i get the token in frontend?

 

 

thanks

No response from Batch during Query Operation

$
0
0

Hello Experts,


I am Performing a Batch Operation to Query as described below.

But i am unable to see the content in the response.


I have followed the standard way to implement Batch operation as per suggested by Gateway experts in this forum.

Still i am unable to get the content in the response of the batch.


I Kindly request all Gateway experts to provide your valuable inputs to resolve this issue and suggest/guide me if anything is wrong from my side so that i can correct.


The below are the details :


Both /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN & /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_END are redefined.


METHOD -


 

URL -

 

http://********/sap/opu/odata/sap/< My Service Name >/$batch

 

HEADER -

 

Authorization: SAP ID & PASSWORD

x-csrf-token:   Enter Token

Content-Type: multipart/mixed; boundary=batch


BODY -


​--batch

Content-Type: application/http

Content-Transfer-Encoding: binary

Accept: application/json

 

GET get_rec_types1?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1

 

 

--batch

Content-Type: application/http

Content-Transfer-Encoding: binary

Accept: application/json

 

GET get_rec_types1?$filter=ImWhttype eq 'XX' and ImCountry eq 'IN' HTTP/1.1

 

 

 

--batch--​

 

RESPONSE -

 

 

RESPONSR BODY -

 

 

Thanks & Regards,

Ashwin

Gateway Namespace & System Alias Issue

$
0
0

Hello Experts,

 

I ran into a small issue where I was able to execute the metadata but couldn't execute the service with the collection . We are having 2 servers one for Gateway and one for ECC . In gateway, I created a 'Z' project and maintained a System Alias which points to ECC for accessing backend RFC's. So here I am getting error as "No service found for namespace /SAP/ , eventhough I use "Z" objects ". Could anyone let me know what could be the issue .

 

Note: In System Alias Maintenance Local Gateway & Local App are not checked.

 

 

 

Thanks.

Please Clarify on $filter, $expand, $Read $Query

$
0
0


Hello Every One,

 

I have a requirement of passing multiple inputs and getting output as multiple structures.

 

Suppose like, if i am giving cust no, company code, credit control area as input and in the output i am getting results in two structures in my custom RFC, till here it is working fine.......the same output how can we replicate in gateway service builder

 

i know that we cannot do query operation as it allows only single input or filter can be applied on the same input.

 

I assume that this can be done using Read and Expand operations. Please guide me how to proceed further, or any othe possible ways to achieve this.

 

Passing multiple inputs and getting multiple structures as output using SEGW?

 

 

Thanks,

Vijay

How to implement read and query operation together in segw?

$
0
0

Hi,

 

I am trying to implement read operation which exports table as query result.

I have done the same using SE80 shown below.

 

 

Capture.PNG

 

Is there any step by step guidelines to do this?

What is association in segw?


Edm.DateTime format and conversion error.

$
0
0

Hi,

 

What is the correct way to define Date fieldsin Gateway services? I defined a field as Edm.DateTime in SEGW made it nullable but am getting runtime exception.

I tried defining a precision but then the runtime artifact generation fails saying Gateway field and RFC (DATS) field mapped to it are incompatible. Without precision the runtime artifacts are generated but failing at runtime with XML Serialization error.

 

Please let me know if we have to do anything special to map/define Date /DateTime fields of Gateway service.

 

Thanks,

Avishek.

 

P.S. We are on SP6 so hoping the earlier issues of SEGW mapping validation for DateTime fields is taken care of (Note: 1763390).

Issue with Deep Insert ...

$
0
0

Hello Experts,

 

I am using DeepInsert Method for Creating Return Order Header and Items Creation(Parent and Child) relation that too based on a Existing Return order creation RFC. I am getting 500 internal server error as "No valid source context supplied" and In gateway error log "DeSerialization of XML Failed via transformation 'ID'" . Also I tried to keep the edm core type abap field for date as Nullable & Internal type as Date , decimal values with Packed but it's not accepting to change the datatype as it is different from Abap Type.

 

In Detail:-

I have 5 Entitysets for Header,Partner,Items,Conditions,Schedues.

Out of them I am using Header Entityset in the POST URL(http://host:port/sap/opu/odata/ZRETURNS_SRV/HeaderCollection)

and passing Header, Items,Partners,conditions,schedules inline entries via rest client based on http://scn.sap.com/docs/DOC-22305 .

 

Is that approach correct of having 5entity sets and passing only HeaderSet in URL ? The below Request Body shows the Inline entries belonging to all the Entitysets. So here the doubt arise , the way of passing the Inline entries is correct or any other approach for different entitysets.

 

URL:-http://host:port/sap/opu/odata/ZRETURNS_SRV/HeaderCollection

RequestBody:-

<?xml version="1.0" encoding="UTF-8"?>

<atom:entry

xmlns:atom="http://www.w3.org/2005/Atom"

xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"

xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<atom:content type="application/xml">

<m:properties>

<d:DocType>RE</d:DocType>

<d:SalesOrg>1000</d:SalesOrg>

<d:DistrChan>10</d:DistrChan>

<d:Division>10</d:Division>

<d:DateType>1</d:DateType>

<d:OrdReason>101</d:OrdReason>

<d:PartnRole>AG</d:PartnRole>

<d:PartnNumb>0000000011</d:PartnNumb>

</m:properties>

</atom:content>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOItems"

type="application/atom+xml;type=feed"

title="Header_Items">

<m:inline>

<atom:feed>

<atom:entry>

<atom:content type="application/xml">

<m:properties>

<d:ItmNumber>000010</d:ItmNumber>

<d:Material>P500042</d:Material>

<d:Plant>1000</d:Plant>

<d:StoreLoc>1000</d:StoreLoc>

<d:TargetQty>5.000</d:TargetQty>

<d:TargetQu>EA</d:TargetQu>

<d:ShortText>JACK DANIELS WHISKEY</d:ShortText>

<d:MatlGroup>50200000</d:MatlGroup>

<d:CondStNo>011</d:CondStNo>

<d:CondCount>01</d:CondCount>

<d:CondType>PR00</d:CondType>

<d:Currency>USD</d:Currency>

<d:ReqDate>11-11-2013</d:ReqDate>

<d:ReqQty>5.000</d:ReqQty>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

<atom:content type="application/xml">

<m:properties>

<d:ItmNumber>000020</d:ItmNumber>

<d:Material>P500042</d:Material>

<d:Plant>1000</d:Plant>

<d:StoreLoc>1000</d:StoreLoc>

<d:TargetQty>5.000</d:TargetQty>

<d:TargetQu>EA</d:TargetQu>

<d:ShortText>BRANDY</d:ShortText>

<d:MatlGroup>50200000</d:MatlGroup>

<d:CondStNo>011</d:CondStNo>

<d:CondCount>01</d:CondCount>

<d:CondType>PR00</d:CondType>

<d:Currency>USD</d:Currency>

<d:ReqDate>11-11-2013</d:ReqDate>

<d:ReqQty>5.000</d:ReqQty>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

</atom:entry>

 

Appreciate your help.

 

 

Thanks,

Uday.

Success/Error/Info Message in return of Odata Service response from ECC

$
0
0

Hi All,

 

I am working on Odata services and want to return messages to front end application which is designed in HTML5, which provide status of update/delete or create operation. I want to return error type and description to front end.

 

I am using  class - /iwbep/if_message_container to return message and tried with following methods:

 

      lo_message_container = mo_context->get_message_container( ).

       ls_return-type = 'S'.

       ls_return-id   = 'ZTEST'.

       ls_return-number = '000'.

*      ls_return-log_no = '111'.

       ls_return-message = 'Data Available in Update Method'.

       APPEND ls_return TO lt_return.

***

       lo_message_container->add_messages_from_bapi(

         it_bapi_messages         = lt_return

         iv_determine_leading_msg = /iwbep/if_message_container=>gcs_leading_msg_search_option-first


Its not showing up in response of request to front end and response body is empty . if i raise exceptions /IWBEP/CX_MGW_BUSI_EXCEPTION or /IWBEP/CX_MGW_TECH_EXCEPTION response will come with error code - 404.


Please suggest any better way to send response to front end.


Regards,

Rajesh

Resource not found for segment

$
0
0

Hi,

 

I succesfully created a service  but when I try out the get_entity method it would prompt out "Resource not found for segment".

The get_entityset is working fine but not the get entity method. I also manage to get the metadata for the entities.

How can I debug for this problem ? I tried to put a external break point in my getentity code but it doesn't have any response.

I  tried to delete the redefintion of get_entity method and redefine it again then leave it blank, I got the same error message(Resource not found for segment 'week').

I am out of idea why I would get this exception, can anyone please give me an idea on possibility of this error message and how can I debug on the code ?

 

URL to get_entityset (working)

httyp://abc.abc.com/sap/opu/odata/sap/timesheetserv/weeks

 

 

URL to get_entity (not working)

httyp://abc.abc.com/sap/opu/odata/sap/timesheetserv/weeks('2012-04-23')

 

 

 

This is my get_entity for runtime data

1.gif

 

This is the code for the specific entity get_entity code. Please click on the picture to see the code clearer.

specific entities.gif

Input Parameters for Odata Service

$
0
0

Hello Experts ,

 

    I would like to generate an Odata Service based on Remote Enabled Function Module . But the Issue here is where we need to Provide/Mark the fields as Input and Output Parameters . And Do we have to write Anycode in the Get_entity_set method .Even I tried with the Mapping to Data source for the fields as Input and Output Parameters.But coming to service , I'm not able to get the output.

 

Can Anyone help me in getting this solved .Also please share any documents related to Odata .

 

 

 

Appreciate your help.

 

 

 

 

 

 

 

Thanks,

Uday.

Can anyone tell me more about the compatibility of SAP Netweaver Gateway with underlying system

$
0
0

Hi everyone,

 

Can anyone tell me more about the compatibility of SAP Netweaver Gateway system if implemented in embedded or hub deployment ?

i.e, if I have a SAP R/3 Enterprise 4.7 system, can I install the gateway in embedded or hub deployment ?

 

I read about the compatibility based on its components like IW_FND, GW_CORE, IW_BEP, and IW_HDB which is very confusing. What I want to know is, whether we could deploy SAP Netweaver Gateway irrespective of the underlying system in any of the deployment method.

 

Thank you in advance for your help.

 

Regards,

Tijesh

CSRF Data with token but missing cookie

$
0
0

Hello everybody,

 

I'm working on a way to create and update entities with OData and Netweaver Gateway using the generated sources of the XCode Developer Tool.

 

When requesting the CRSF token and cookie, I only retrieve the token, the cookie is not present.

 

Can someone help?

 

Cheers,

Johannes


Unable to setup SAP NetWeaver Gateway in Eclipse

$
0
0

Hi ,

I have developed some android application using eclipse juno 4.2 but, these application do not consume data from sap system.

Now i wanted to connect to sap system and get data to use in my application.

 

After searching i came across this awesome post by Gal Roter but, somehow i am not able to get the thing done.

 

List of things i have installed,

 

1) Installed Eclipse Juno .

2) SDK manager

3) Android version4.1.2( Jelly Bean )

4) Then i downloaded SAP NetWeaver Gateway plugin for eclipse.

 

Here is the problem i am facing,

 

I try to create new project using SAP NetWeaver Gateway under that i selected Starter application project

 

I enter all the details like: project name, project for android ,application name ,pacakage etc..

but, i am not able to select the Build Target dropdown because that dropdown is empty.

 

What to do..? How to go ahead..???

 

I have attached the snapshot of the error i am getting.

 

 

Thanks in advance,

Vishesh

Edm.DateTime format and conversion error.

$
0
0

Hi,

 

What is the correct way to define Date fieldsin Gateway services? I defined a field as Edm.DateTime in SEGW made it nullable but am getting runtime exception.

I tried defining a precision but then the runtime artifact generation fails saying Gateway field and RFC (DATS) field mapped to it are incompatible. Without precision the runtime artifacts are generated but failing at runtime with XML Serialization error.

 

Please let me know if we have to do anything special to map/define Date /DateTime fields of Gateway service.

 

Thanks,

Avishek.

 

P.S. We are on SP6 so hoping the earlier issues of SEGW mapping validation for DateTime fields is taken care of (Note: 1763390).

$filter from UI5 - Filter Property name does not match model property

$
0
0


Hello,

 

we have quite a strange requirement. Due to some drill-downs from other applications it's not possible to specify the sPath of the filter in the filter object properly --> this means the parameter we will hand over will not always match the properties defined in the Odata Model.

 

We thought of some kind of workaround which might can help us. I have defined a dummy "FILTER" property in the model, which will contain a separate  filter string

 

--> e.g.

l_filter_string = "$filter=substringof(%27Source_Loc%27,SOURCE_LOC)%20and%20substringof(%27Act_Loc%27,ACT_LOC)%20and%20substringof(%27Del_no%27,DEL_NR)%20and%20substringof(%27Product_ID%27,PRODNR)%20and%20substringof(%27TRACKING_ID%27,TRXID)%20and%20substringof(%27PO_NO%27,PO_NR)%20and%20substringof(%27REason%27,REASON_CODE)%20and%20substringof(UPSsad9999hflhasdfjh,FILTER)%20and%20ONTIME_STATUS%20eq%20%27NOT_OK";

 

when receiving the data in the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET I will evaluate the it_filter_select_options which will be used to contruct the select to the DB. Is there a possibility to somehow append and split this filter string in a way that we get the separate values in the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET I will evaluate the it_filter_select_options table.

 

at the moment I receive the filter string in the Property "FILTER"

it_filter_select_options.jpg

 

this is what I want to split up and add to the it_filter_select_options table as separate properties:

it_filter_select_options_String.jpg

 

Thanks for your help.

Regards Marco

SAP Fiori - PO Approval issue in workflow & Gateway

$
0
0

Hi Experts,

  

        I developed a custom workflow for PO approval applicaiton in Fiori.

 

In workflow am using the user decision step to approve/reject.For this step standard itself proving the task 'TS00008267'.

 

By using this task we cant able to fetch the PO related value while running the PO approval application from the URL.

 

Because the table 'SWW_WI2OBJ' dosent hold the values for the user deciosn task id.

 

Am getting the error like the 'Purchase order not found for the woritem 00000123326'

 

Thanks in advance

 

 

Regards,

Myilraja

Fetching csrf token for create service

$
0
0

hi,

i have implemented a create service which is binded with front-end , but it gives error csrf token validation failed. i have read previous posts on csrf fetching,but those methods didn't work.

I dont want to disable csrf token from backend (using ~CHECK_CSRF_TOKEN = 0 ).
How can i fetch csrf token value ?

if We can use read service to fetch csrf token then how can i get the token in frontend?

 

 

thanks

Viewing all 1195 articles
Browse latest View live


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