Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all 2823 articles
Browse latest View live

CSRF token validation failed - ODATA

$
0
0

Hi Expert,

 

When i am fetching data  throw ODATA it's working fine.

 

 

When i am pushing data throw Gateway Client ( /IWFND/GW_CLIENT) . it's also working fine.

 

Below is screen Shot of /IWFND/GW_CLIENT tcode.


Below is CSRF Token.

HTTPReq.PNG

Below is Status after data pushing.

HTTPRes.PNG

 

 

But when i am pushing data throw .NET application it's showing error "CSRF token validation failed"

 

Below screen shot of .NET  Error.

HTTP Error.PNG

 

Below is C# (.NET) code for generating CSRF Token.

 

Method 1 .

CSRF Token.PNG

 

Method 2.

CRSF Token 2.PNG

 

above code is generating CSRF Token Successfully.

 

when pushing data throw .NET Application. it's throwing below error.

HTTP Error.PNG

 

 

i am trying multiple scenario but it's not working properly. throwing error on " Client.SaveChanges()  " or " Client.UpdateObject() "

 

 

Please help.

 

 

Thankx

Prakash


How to Transport Odata Service from DEV to QA

$
0
0

Hi Everyone,

 

We are in the development phase and trying to test moving the gateway service to QA and facing issues. Here is our landscape.:

 

We are using ECC DEV client for development ODATA service using SEGW and using Gateway Hub System Client 001 to register and expose the service from the ECC DEV. We have separate ECC QA system but using separate client 100 on the same Gateway Hub System to use it has a QA Gateway Hub.

 

Have moved the transports from ECC DEV to ECC QA. Try to do the SCC1 for the transports from Client 001 to Client 100 in the gateway system it says objects are not client dependent. When I log on the Gateway Hub in the client 100 it does not allow me to register the same service that is already there in the client 001. Not sure how to proceed. Do we need separate gateway hub for the QA ECC system too. Please advise.  If needed more info let me know. Appreciate your responses.

 

Thank you,

Rohit

How to stop logon pop-up window from gateway client ?

$
0
0

Hi, How to stop the logon pop-up appearing everytime I "Execute"  ? Thank you.

 

popup.jpg

How to set Qualifier in a SAP annotation

$
0
0

Hello:

 

I'm using annotations to create an Smart Filter Bar. I have created my annotation project on SEGW and I have added few annotations to my model, but I want to use multiple Search Helps on one field.

 

For example in the KUNNR field I want to add to Standard Search Helps, one more generic (SH_DEBIA) and the other one for search using de BKURS (SH_DEBID).

 

I have solved the issue using local annotations in my Fiori APP:

 

<Annotations xmlns="http://docs.oasis-open.org/odata/ns/edm" Target="ZUI5_SRV.Pos/Kunde">

                <Annotation Term="com.sap.vocabularies.Common.v1.ValueList">

                    <Record>

                        <PropertyValue Property="Label" String="Deudores general"/>

                        <PropertyValue Property="CollectionPath" String="SH_DEBIASet"/>

                        <PropertyValue Property="SearchSupported" Bool="true"/>

                        <PropertyValue Property="Parameters">

                            <Collection>

 

...

 

<Annotations xmlns="http://docs.oasis-open.org/odata/ns/edm" Target="ZUI5_SRV.Pos/Kunde" Qualifier="DEBID2">

                <Annotation Term="com.sap.vocabularies.Common.v1.ValueList">

                    <Record>

                        <PropertyValue Property="Label" String="Deudores por sociedad"/>

                        <PropertyValue Property="CollectionPath" String="SH_DEBIDSet"/>

...

 

When I create two or more annotations I have to use the Qualifier field on local XML Annotation File, but if I want to use SEGW I don't have this option, and I can't define same type annotations for a same field.

 

Any idea???

 

Best regards,

Didier

Upload document into DMS Server using Net Weaver Gateway

$
0
0

Scenario:

 

Why and when we use DMS?


DMS is used to read the content of storage documents (external data server but not SAP content server).Here I am going to explain one of mine client requirement to upload the document after/while creating the Purchase requisition initem level. So in order to achieve the functionality we need to upload the file from non-SAP server into DMS (CV01N) using Gateway.

 

By Using this Blog, you can upload a wide range of documents like Word Documents,Excel Sheets, PDF, Text Files and Images and many more through Gateway service.

 

Procedure:

 

Goto SEGW TCode and Create Project as shown below.

 

1.png

Provide Project Details.

2.png


Create Entity Type with the required fields.

3.png


For Upload_Doc : Provide the following details.

4.png

Created Entity Type as shown below.

Double click on Entity Type created and put tick mark on Media type check box (mandatory).

5.png

6.png


Double click on Properties and Click on Insert Row to add fields.

7.png

Insert field and check as key field (mandatory).

8.png

Click on Save

9.png

Now click on Generate button.

10.png

 

Then we will get below screen, click on continue

11.png

It displays generated OBJECTS SUCCESSFULLY.

12.png

And at that time it generates all classes automatically.

13.png

Then Redefine the DEFINE method in the *MPC_EXT Class and add the below logic.

14.png

Method DEFINE.

 

super->DEFINE( ).
 

DATA: lo_entity     type REF TO  /IWBEP/IF_MGW_ODATA_ENTITY_TYP,

lo_property type REF TO  /IWBEP/IF_MGW_ODATA_PROPERTY.

 

lo_entity = model->GET_ENTITY_TYPE( IV_ENTITY_NAME = 'Upload_Doc' )."Entity Name

 

IF lo_entity is BOUND.

 

lo_property = lo_entity->GET_PROPERTY( IV_PROPERTY_NAME = 'DocName' )."Key Value(SLUG)

lo_property->SET_AS_CONTENT_TYPE( ).


ENDIF.

 

Endmethod.

 

Right Click on ZCL_ZUPLOAD_DOC_DMS_DPC_EXT class and select Go to ABAP Workbench.

15.png

 

Redefine CREATE_STREAM Method and implement the below logic to upload document into the DMS Server from ODATA Service.

16.png

 

Code:

 

method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_STREAM.
DATA ls_documentdata    TYPE  bapi_doc_draw2,
       ls_DOCUMENTNUMBER 
TYPE  BAPI_DOC_AUX-DOCNUMBER,
       ls_DOCUMENTTYPE   
TYPE  BAPI_DOC_AUX-DOCTYPE,
       ls_DOCUMENTPART   
TYPE  BAPI_DOC_AUX-DOCPART,
       ls_DOCUMENTVERSION
TYPE  BAPI_DOC_AUX-DOCVERSION,
       ls_RETURN         
TYPE  BAPIRET2,
       lv_filename       
TYPE DBMSGORA-FILENAME,
       lv_PURE_FILENAME  
TYPE SDBAH-ACTID,
       lv_PURE_EXTENSION 
TYPE SDBAD-FUNCT.

DATAlt_files           TYPE TABLE OF BAPI_DOC_FILES2,
       ls_files          
TYPE          BAPI_DOC_FILES2,
* Short Texts
       lt_drat           
TYPE TABLE OF bapi_doc_drat,
* Object links
       lt_drad           
TYPE TABLE OF bapi_doc_drad,
       LS_DOC            
TYPE ZCL_ZUPLOAD_DOC_DMS_MPC=>TS_UPLOAD_DOC.
* Pass SLUG value


lv_filename
= IV_SLUG.


* Function Module to split and get file name and extension


CALL FUNCTION 'SPLIT_FILENAME'
EXPORTING
long_filename       
= lv_filename
IMPORTING
PURE_FILENAME       
lv_PURE_FILENAME
PURE_EXTENSION      
lv_PURE_EXTENSION.

* Allocate document data
ls_documentdata
-documenttype    = 'DOC'.
ls_documentdata
-documentversion = '000'.
ls_documentdata
-documentpart    = '00'.

ls_documentdata
-wsapplication1 = lv_PURE_EXTENSION.
ls_documentdata
-wsapplication2 = lv_PURE_EXTENSION.

* Check original 1 into the SAP data base at the same time
REFRESH lt_files.
CLEAR lt_files.

ls_files
-originaltype       = '1'.
ls_files
-WSAPPLICATION      = lv_PURE_EXTENSION.
ls_files
-SOURCEDATACARRIER  = 'SAP-SYSTEM'.
ls_files
-docfile            = IV_SLUG.
APPEND ls_files to lt_files.

* BAPI to Upload document into DMS Server
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
DOCUMENTDATA              
= ls_documentdata
IMPORTING
DOCUMENTTYPE              
= ls_DOCUMENTTYPE
DOCUMENTNUMBER            
= ls_DOCUMENTNUMBER
DOCUMENTPART              
= ls_DOCUMENTPART
DOCUMENTVERSION           
= ls_DOCUMENTVERSION
RETURN                     = ls_RETURN
TABLES
DOCUMENTDESCRIPTIONS      
= lt_drat
OBJECTLINKS               
= lt_drad
DOCUMENTFILES             
= lt_files.
IF ls_return-type CA 'EA'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.

LS_DOC
-DOCNAME = ls_DOCUMENTNUMBER.

copy_data_to_ref
(
EXPORTING
is_data
LS_DOC
CHANGING
cr_data
= er_entity ).
ENDIF.

endmethod.


All input Values we have to get into the SLUG parameter from the UI Side. If you have multiple input parameter values then concatenate multiple parameter values with delimiter we have to get the values in SLUG parameter.


Testing Our Service:

 

Now we will test our service in Gateway Client transaction /IWFND/MAINT_SERVICE

 

17.png

Select the entityset and Upload a file through add file button which is on left side corner as shown in the below screen shot.

18.png

Pass SLUG values(mandatory) file name as shown in the below screen shot.

 

19.png

 

 

Now click on POST HTTP Methodand Execute.

20.png

 

Service Response:


It will generate a document number as shown below.

21.png

 

Successfully uploaded document in DMS Server.


Result:

Go to CV03N Transaction and provide document number and document type and click enter as shown below.

22.png

 

To open the file double click on it.

23.png

File got opened successfully as shown.

24.png

 

In the same way we can upload any type of document into DMS.

 

Thanks&Regards,

Prasanna Addula

Reg : Data is not displaying in ODATA

$
0
0

Hi,

 

Good Day!

 

Am very new to SAP UI5 and also in ODATA.

 

As I have created a  ODATA in SEGW Tcode and also I have imported the data from the Structure and also I have wrote the logic in the DPC EXT a Simple select Query.

 

Once I run the SERVICE MAINTENANCE -> Click on Gateway Client am not able to display the data.

/sap/opu service missing in SICF

$
0
0

I could not find the Odata related services in sicf. What might be the issue

 

gw.JPG

sicf.JPG

No Valid Source Context Supplied

$
0
0

Hi Experts,

 

While executing the Gateway service facing the  error."No Valid Context Supplied" what is the root cause of this error. find the screen snap for your reference.

 

Erro1.PNG

 

Error_Gateway.PNG

@Thanks in advance.

 

Regards,

Sai


D64: connection to partner ' ' broken - HELP

$
0
0

whenever i log on to SAP GUI using saplogon I get this message or the screen keeps on loading, Even at times it gets logged in I get the same error again. I don't know what to do. Help Please....??

 

Untitled1.png

How to create OData services manually?

$
0
0

I would like to learn on how to create OData services manually. There are plenty of articles on how to use SEGW TCode for OData service creation, However i think that way the developer looses lot of control.

 

Is there any article/tutorial on manual creation of OData services creation.

 

Thank you.

SAP NW Gateway - Network Connection Error

$
0
0

Hi All,

 

I am facing an issue with the SAP Netweaver GW connectivity via Eclipse Juno 2.0

I have the SAP NW Gateway components and installed and configured on SAP Netweaver 7.0 Ehp 2 (CRM System).

 

When I create a new connection it errors with the message 'Network Connection Error' .

 

I have tried creating a connection through Eclipse to the SAP Demo Gateway server it's showing error "Network Connection Error".

 

 

This is the Log File:

 

 

Message:

Network connection error

 

Exception stack trace:

com.sap.nw.gateway.odata.client.exceptions.RestClientException

    at com.sap.nw.gateway.odata.client.connectivity.impl.RestClientBase.execute(RestClientBase.java:54)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.testConnection(ConfigurationValidator.java:138)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.testConnection(ConfigurationValidator.java:118)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.validateConfiguration(ConfigurationValidator.java:84)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.validateCreatedObject(ConfigurationValidator.java:37)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.validateCreatedObject(ConfigurationValidator.java:1)

    at com.sap.gw.oc.eclipse.preferences.ui.AbstractGatewayConfigurationDialog.getDialogStatus(AbstractGatewayConfigurationDialog.java:546)

    at com.sap.gw.oc.eclipse.preferences.ui.AbstractGatewayConfigurationDialog.okPressed(AbstractGatewayConfigurationDialog.java:560)

    at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)

    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at com.sap.gw.oc.eclipse.preferences.PreferencesController.createNewConfiguration(PreferencesController.java:76)

    at com.sap.gw.oc.eclipse.preferences.GatewayPreferencePage$AddConfigSelectionListener.widgetSelected(GatewayPreferencePage.java:323)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)

    at com.sap.odata.dt.framework.sap.dialogs.ServiceCatalogProvider$5.linkActivated(ServiceCatalogProvider.java:440)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at com.sap.iw.gw.oc.eclipse.component.exploration.page.ExplorationPage$4.widgetSelected(ExplorationPage.java:427)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)

    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)

    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)

    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)

    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:180)

    at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)

    at org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:535)

    at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)

    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)

    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)

    at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)

    at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)

    at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)

    at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)

    at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)

    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)

    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)

    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)

    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)

    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)

    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)

    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

 

 

Session Data:

eclipse.buildId=M20130204-1200

java.version=1.7.0_21

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_IN

Framework arguments:  -product org.eclipse.epp.package.jee.product

Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

 

 

and also attached screenshot...

 

 

Could someone help in case I am missing something here.

 

Thanks,

Raj kishor

BW on Gateway - metadata cache lock, very long duration for GW backend overhead

$
0
0

Hi Experts,

 

We have this performance issue where there appears to be 'locking' or 'hold' for the metadata table /IWBEP/I_MGW_CTC whenever there is a lot of load or parallel calls to the same service/URI. The BW team has already performed several optimizations on their end enough to bring down the application run time to 22 seconds. However the gateway layer still has 90~160 seconds run time which is too long to be of any practical use.


The service model is generated by SAP_BW 7.4 SP10 (w/Gateway Add-on SAP_GWFND 7.4 SP12) HANA on-premise. There is no more setup in SEGW for this. Once the BW enables a query for ODATA, it will generate a service model which we can see in /IWFND/MAINT_SERVICE. We then just set a system alias for the service and activate it.

BEX.png

The issue is very intermittent so I did a test with my small team of 5 different users accessing the same service. Notice below how for after every instance, the duration for GET_META_DATA becomes longer.

small team.png

If we look closely at the perf trace, we can see it spends a lot of time on the GET_META_DATA. Line 14 would be the application/generated class from the BW query.

deep.png

 

Our BASIS team found the 'hold' on the application layer (but it's hard to spot this during run time)...

hold.png

but you can see it as logs on the HANA DB layer in the view M_EXPENSIVE_STATEMENTS, note the small difference between duration and lock_wait.

db.png


We did some steps after those findings:

1) Implemented SAP Note 2224957.

2) Deactivated metadata cache via SPRO.

3) Cleaned up cache via /IWBEP/CACHE_CLEANUP.

 

Results:

1) The long backend overhead duration is still there.

2) I've read here in SCN that you cannot really deactivate the 'backend' IW_BEP metadata cache. We still saw the work process trying to update the metadata cache.

3) Since backend metadata cache cannot be deactivated, the table /IWBEP/I_MGW_CTC gets filled up again right after clean up.

 

I did some spot checks afterwards for 1 user and noticed the GET_META_DATA part is no longer showing. It's unclear whether it wasn't picked up because the logic did not pass there anymore or if the time spent on that method was no longer long enough to be picked up by the trace. In a perfect scenario this should be how the gateway should perform:

normal.png

I asked our Java team to run a test case of 50 parallel calls to the same URI using a single user. We normally have a BG user setup for the service(s) in SICF which will be then used by the front-end UI, so this scenario will be realistic when it moves to production.

 

Checking the traces, the application run time seems to be hovering at 22k~23k milliseconds, while for the gateway framework backend overhead it was 29K milliseconds at the start then after every instance it grew almost exponentially until it peaked at 171k milliseconds.

trace res.png

For the later instances you can see the large discrepancy between the application time and the gateway backend overhead. Still, there is no more GET_META_DATA entry in the trace.

large.png

However, we still have the locking as shown in the HANA DB layer in the view M_EXPENSIVE_STATEMENTS which coincides with our test case.

hana lock.png

It appears there are metadata logic updating /IWBEP/I_MGW_CTC inside the processing of GET_ENTITY_SET. So I looked for that and found some for GET_CACHED_MODEL and SET_CACHED_MODEL. I think it has to do with the set cache more which is in the form of EXPORT... TO DATABASE which I'm not familiar with. Though I noticed the cache key will be the same for each instance of the 50 parallel calls.

lock.png

I also looked into the main method which is long running /IWBEP/CL_MGW_LOCAL_HANDLER->GET_ENTITY_SET. It calls a BADI /IWBEP/BD_MGW_SRV_RUNTIME so I looked for how it was instantiated. The GET BADI uses filters, which is again the same for each of the 50 parallel calls.

badi.png

My question is how can we get rid of the metadata lock/wait or atleast reduce the backend overhead?

Does the metadata locking have to do with how the SAP standard methods are designed/are they working as expected?

 

 

Thanks and Best Regards,

Francis

ODATA service based on RFC (Have multiple Table Parameters as output)

$
0
0

Hi

 

I need to develop the ODATA service based on RFC. It has 5 table parameters. In that  first  Table parameter in that one of the attributes take the userid as input and return as output as all the 5 table parameters including the first table parameter.

 

For example: (Following Table parameters in RFC)

 

TableParam1 has  has fields userId, name, Dept

TableParam2 has  has fields A, B, C

TableParam3 has  has fields D, E, F

TableParam4 has  has fields X, Y, Z

TableParam5 has  has fields K, L, M

 

I have created the ODATA service using RFC/BOR option. I have created five entity's using the above five table params and created the 5 EntitySets corresponding each Entity.

 

I done the service  implementation for  first  EntitySet(TablePraram1) I have done the map to Data source for  GetentityRead() for passing the user id (for one of the attribute). when i generated, code got generated. When i run the service, i am getting the output as only first table parameter alone. I need to get as output for the rest of the five entitysets's also.

 

Do i need to  do he Association between EntitySets?  Also userId attribute exist in only first  table parameters not in all the table parameters.  To do the association, do i need have userId in all the Table prams as attribute?

 

Please confirm how to get all the entitySets data as output by passing only userId for the  first table parameter in ODATA service?

 

is it possible to get all the entitySets with out writing any custom code in ODATA service end?

 

 

 

Thanks

How to use OData service from Development and Quality using single gateway server.

$
0
0

All my DPC and MPC classes are residing in backend system and alias are maintained in GW frontend system.

In order to save installation cost, my client wants to use same GW system in Quality as well.

The problem when I add service using RFC dest. for Development that service disappears from the Quality system. So, it either works for Development or Quality. How can I make it work for both? 

Association/navigation for non-key fields of entities

$
0
0

Dear Experts,

 

I am building a service for Sales order. My structure as follows -

Entities:

     1. VBAK

               Key :           vbeln

               non-key :      kunnr

               -- there is no matnr

     2. VBAP

               Key :           vbeln

               non-key:      matnr

               -- there is no kunnr

     3. KNA1

                Key :           kunnr

     4. MARA

                Key :           matnr

 

We have association exist already for VBAP and VBAK.

 

now my requirement is to get VBAK and its corresponding KNA1. Similar way VBAP --> MARA

 

 

How can we do the association/navigation using non-key fields?

 

Thank you,

Murali


$Batch Operation, Chageset_process method missing

$
0
0

Dear Gurus,

 

I have developed a batch Odata in a client and using Cofiles and datafiles I have imported the developments into another client. Now the problem is when I activate the SEGW project it gives an error that the method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_PROCESS does not exist. On further research I found SAP help document.

 

I assumed this has something to do with Gateway version it was SPS 08 and after my request the Basis consultant upgraded it to SPS 15. But still it says the method does not exist, I tried reimporting the cofiles and datafiles it does not help.

 

FYI, the architecture is kind of like a HUB, the gateway is on one client and the SEGW projects is on another. The basis has upgraded the Gateway client to sps15.

 

Can someone help me what to do now, because I can't change the Odata.

 

Here is the screenshot of the Gateway client status

 

 

GW.JPG 

 

Here is the screen shot of the client where (SEGW) projects are developed

SEGW.JPG

 

Please advice.

Call odata with /iwfnd/cl_mgw_fac_facade=>get_entity with expand parameter

$
0
0

Hi Experts,

 

We have a service which is used to transform the result of an odata service to a custom xml format. To get the data from the mentioned odata service (implemented in the backend) we use  /iwfnd/cl_mgw_fac_facade=>get_entity. We would like to get complex data from this service, but I'm unable to pass the ?&expand=... parameter for it.

 

Any ideas how to acheive this?

 

David

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

$
0
0

hi all

 

while accessing gateway from sap webide getting error that

 

Value    Data Provider implementation '/IWFND/OM_MED_CATAL_ODC_0002_BE' '01' 'DEFAULT' does not exist

 

 

please give need full information

Assert condition violated while using Gateway Service Builder

$
0
0

Hello Experts,

 

We are developing an mobile application using SMP and it is calling services built using Gateway Service Builder.

 

we already created many services using the same steps as this service, but this is the first time we get this error:

 

The ASSERT condition was violated

1.PNG

 

the error is on CL_IFL_TYPE_ANALYZER "PROCESS" on this line of code :

 

ASSERT  NOT lr_root IS INITIAL.

 

It seems there is something wrong with mapping or datatypes, but I'm new with service builder and my background is totally mobile development, we just get the BAPI name from another team then we create a service for it and map the input and output parameters to our data model that we just created using "Import from RFC".

 

Can you please help us on this ? what we should do to prevent this error and also how can we know more details about such an error and how can we know what is exactly the parameter or data type that is making this error ?

 

Attached short dump

 

Thanks

Hossam

 

 


JSON Date Format

$
0
0

Hi,

We have a Gateway service with some date fields (ABAP datatype DATS converted to Edm.DateTime or Edm.DateTimeOffset).

When service is called with output format JSON, date values are represented in MicrosoftDateFormat format (e.g. "/Date(1448841600000)/").

In contrary, when output format is XML, dates are in ISO-8601 format: YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00).

Is there any way to change the JSON date format, either in field level or system level?

Viewing all 2823 articles
Browse latest View live