Quantcast
Channel: SCN : All Content - SAP NetWeaver Gateway Developer Center
Viewing all 750 articles
Browse latest View live

SAP NetWeaver pass function import but couldn't get two or more out table

$
0
0

Hi Expert,

 

I have rfc function. I send import parameter from sapui5 app.I get a out table dpc_ext class excetu action method  but I want to get two or out table. I try to create deep structure but I couldn't do it. How can I get tables?

 

Thnks...


The server is refusing to process the request because the entity has a unsupported format

$
0
0

hi,

 

I am facing issue when i am doing Post.

 

I am getting Error message as follow:

 

 

PostError.png

 

I am not getting what i made mistake

 

Please help me solving this problem.

 

Thanks,

Supriya

Short Dump CX_SADL_ENTITY

$
0
0

Hi Experts,

 

while implementing an OData service in transaction SEGW, I am constantly getting a short dump in the following situation:

In Service Implementation I tried to map my entity set to a CDS View. After selecting my (active, correct, working) CDS View, the short dump occurs.

dump.PNG

When looking at the exception class CX_SADL_ENTITY, there is a missing text for exception ID "CX_SADL_ENTITY".

CX_SADL_ENTITY.PNG

 

Has anyone of you ever come across this?

Any suggestions on how to cope with this?

 

Best,

Dominik

Uploading Web Cam Images as GOS Attachments for Work Orders

$
0
0

Problem :

There is a scenario in Asset Manager application where the captured images from webcam will be sent to the back-end and saved to the GOS.

We are able to upload the images but can’t open them. IMHO, The issue is with the format.

 

Steps taken :

  • A similar thing was developed where normal attachments(any extension) were uploaded to the GOS without much challenges.
  • But the same approach failed for the Webcam captured images.
  • We tried various encoding/decoding techniques and conversions in the backend but that did not work.
  • We get Base 64 encoded string from the UI which currently we are trying to validate if corrupted.
  • The base 64 is decoded, converted to XString and then to binary and finally uploaded to GOS.

 

We have Used FM  SSFC_BASE64_DECODE to decode the Base64 encoded image data. However even that seems not to be working.

 

We will keep trying other ways from our side but if somebody has idea on how to get this done , that you know of, please help .

Hybrid OData Implementation Example

$
0
0

Hello Fellow SCNers,

 

I am writing this blog to demonstrate an example of how we can use Hybrid Odata in our Backend Developments for a POST(create) scenario.

This demonstration uses NetWeaver Gateway Foundation 7.4 SP 0008.

 

 

What is Hybrid OData?

Generally when we need to create/post multiple data records in a single backend table(like create multiple Sales Orders, multiple Purchase Orders, etc.) we use a 'Batch' and encapsulate multiple POST request payloads in it. When there are few records say around 1K then also due to huge data traffic the UI user can sense the latency in processing. Imagine what will be the case when its something like mass creation on materials, users, etc. in the system where data records can easily exceed by at least 10 times.

 

For such cases we can also explore the Hybrid OData development approach. It means sending the huge data (may be an entire file contents with thousands of records) to a single string property in an OData entity. This can be done by stringifying the data from file into JSON format and sending. Then a single POST on this entity can create all the records.

 

Example

 

Scenario: Here I have a flat file which has user details which the end user can upload from user interface and at backend the users (records from that file) should be created. They should be visible in SU01 transaction. Also for every user we need to assign/revoke authorizations for multiple applications.

 

OData Service -

 

Create a service (here ZCDP_ASSESSMENT_MANAGE_USERS).

SEGW - OData Service.png

 

Create an entity(here UserUpload)

 

SEGW - Entity Details.png

 

The entity has a single property of data type 'String'. This will hold the stringified JSON sent from user interface.This is shown below-

SEGW - Entity Property Details.png

The corresponding data dictionary structure is (here ZCDP_ASSMNT_S_USER_DET) is

Entity Structure.png

 

Now one needs to read this Stringified JSON data and convert its contents to Internal Table so that further processing can be undertaken.

This can be done by using Transformations (http://help.sap.com/abapdocu_70/en/abapcall_transformation.htm))

 

Code as below -

 

In the Data Provider Extension Class, in the Create method of entity code as

DPC_EXT code.png

 

 

The data should look like below in debug mode -

 

Debug Data.png

 

[I will give payload details below]

 

Till this step we have read the data sent from UI. Now as mentioned we need to convert this to the Internal table so that normal ABAP processing can be done.

The type ZCDP_ASSMNT_S_USER_LIST will be shown below.

Convert Stringified JSON to Internal Table.png

 

Now we will see the parsed data in debug mode. Also, I have used a nested scenario that is every user record has multiple applications records whose access can be given/withdrawn from the user.

 

Table Contents.png

Nested Internal Table.png

 

and nested table contents for a user

 

Nested Internal Table contents.png

 

The actual table structures used above is ZCDP_ASSMNT_S_USER_LIST shown below

 

Actual File structure 1.png

and nested table structure is

 

Actual File structure 2.png

 

Post this all the contents in an internal table and normal ABAP processing can be done.

 

 

In case one needs to re-convert the internal table to stringified JSON and pass to UI, use below transformation code -

 

Declare the object of XML Writer class

Data Declartion Rev Trans 1.png

Instantiate the object

Instantiate  Rev Trans 2.png

Do the reverse transformation and parse the internal table into XString.

Then convert the XString to a string and pass back to UI.

Code Rev Trans 3.png

*--------------------------------------------------------------------- That's It Folks -----------------------------------------------------------------*

The Payload used for testing is

 

{

"UsersDetails": "{\"USER_DET\":[{\"BNAME\": \"EMP9000\",\"MANAGER\": \"ABCD111\",\"KOSTL\": \"1100110011\",\"T_LEVEL\": \"EMP\",\"FIRSTNAME\": \"Employee\", \"LASTNAME\": \"9000\",\"FULLNAME\": \"Employee9000\",\"SMTP_ADDR\": \"EMP9000@DUMMY.COM\",\"LOCATION\": \"GURGAON\",\"DISABLED\": \"X\",\"PROCESSING_STATUS\": \"\",\"ERROR_TEXT\": \"\",\"APPLICATIONS\": [{\"BNAME\": \"EMP9000\",\"APP_ID\": \"MANAGE_CATEGORIES\",\"APP_MODE_INDICATOR\": \"X\",\"PROCESSING_STATUS\": \"\",\"ERROR_TEXT\": \"\"},{\"BNAME\": \"EMP9000\",\"APP_ID\": \"ASSIGN_EVALUATORS\",\"APP_MODE_INDICATOR\": \"X\",\"PROCESSING_STATUS\": \"E\",\"ERROR_TEXT\": \"Error ASSIGN_EVALUATORS\"}]},{\"BNAME\": \"EMP9901\",\"MANAGER\": \"ABCD111\",\"KOSTL\": \"1100110011\",\"T_LEVEL\": \"EXE\",\"FIRSTNAME\": \"Employee\", \"LASTNAME\": \"9901\",\"FULLNAME\": \"Employee9901\",\"SMTP_ADDR\": \"EMP9901@DUMMY.COM\",\"LOCATION\": \"GURGAON\",\"DISABLED\": \"X\",\"PROCESSING_STATUS\": \"\",\"ERROR_TEXT\": \"\",\"APPLICATIONS\": [{\"BNAME\": \"EMP9901\",\"APP_ID\": \"MANAGE_CATEGORIES\",\"APP_MODE_INDICATOR\": \"X\",\"PROCESSING_STATUS\": \"\",\"ERROR_TEXT\": \"\"},{\"BNAME\": \"EMP9901\",\"APP_ID\": \"ASSESSMENT_RESULTS\",\"APP_MODE_INDICATOR\": \"X\",\"PROCESSING_STATUS\": \"E\",\"ERROR_TEXT\": \"Error in user 2 ASSIGN_EVALUATORS\"}]}]}"

}

 

* Points to note - The double quotes is a special character in JSON and it needs to be escaped. This is done by backslash character(\).

 

Hope this infuses some new development ideas. Looking forward for valuable feedback.

How many gateway services used in real project scenario for 1 application?

$
0
0

Hi all,

 

Lets say i have ui5 app which involves transaction business process so is it necessary to have one gateway service for one sapui5 application.

 

My assumption:There may be n no of service depending on the application built like one service can be to get the f4 help of the input field other to get the text details used in the screen and another to handle the business process.

 

Please help me understand.

Role Templates missing for NW Gateway (NW 7.40)

$
0
0


Hello everybody,

 

I have sucessfully installed NW 7.40 but during configuration of the NW Gateway (SAP_GWFND) I miss some role templates.

 

e.g.: /IWFND/RT_BOR_DEV; /IWCNT/RT_USER_WF; /IWBEP/RT_MGW_DSP

 

Any ideas? Thanks for ur  help.

 

BR, René.

Unable to access Netweaver Gateway

$
0
0

Hi ,

 

unable to access net weaver gateway system its asking authorizations. please give me suggestions hoo to activate it

 

Thanks

Sangamesh


Error faced while executing URL in SAP Netweaver gateway client

$
0
0

Hi Experts,

 

 

We are facing an issue while passing URL as given in the attachment with error in the conversion routine "CONVERSION_EXIT_EXCRT_OUTPUT".

Please let us know if there exists a sap note to fix the given problem.

 

Detailed screenshots of the problem have been attached.

 

Regards,

Saritha

SAP NetWeaver pass function import but couldn't get two or more out table

$
0
0

Hi Expert,

 

I have rfc function. I send import parameter from sapui5 app.I get a out table dpc_ext class excetu action method  but I want to get two or out table. I try to create deep structure but I couldn't do it. How can I get tables?

 

Thnks...

Access Permission Error in OData Service method while Uploading File to SAP Application Layer

$
0
0

Hi all,

 

I am trying to upload file from SAPUI5 app to SAP Application layer by using OData Service.

 

I am using the SAP function module "ARCHIVFILE_CLIENT_TO_SERVER"  to achieve this requirement.

 

But when i tried to use this function module inside odata service method, i didn't get the popup which gives permission to access local file.

Please find the attached screenshot(Access Permission popup). Because of missing this popup i am getting SY-SUBRC = 1 "Access error on File" from the function module.

 

I can successfully upload files when i tried the same in Report program,there i got this permission access popup.


is there any way to set this permission as ALLOW without this popup?

 

Can any one give me an advice to solve this?

 

Regards,

Ranjani Sekar.

How to create WebService which has EntitySets inside EntitySet

$
0
0

Hi, I have an application which creates new employees in a company. For that I have a form with multiple form containers (sapui5). Each form container corresponds to a certain abap table in sap system. I would like to know how can I import and map a WebService In NW GW which corresponds to the following entity relationships:

<EmployeeCollection>     <Employee>          <MainDetails>               <Empfirstname></Empfirstname>               <Emplastname></Emplastname>                                   ........          </MainDetails>          <ContactDetails>               <Email></Email>               <Workphone></Workphone>                              ........          </ContactDetails>          <FamilyMemberCollection>               <FamilyMember>                    <Firstname></Firstname>                    <Lastname></Lastname>                              ........               </FamilyMember>                              ........          </FamilyMemberCollection>     </Employee>               .....</EmployeeCollection>

I have Employee collection which can have 0...* Employees. Employee has Entities like MainDetails and ContactDetails AND also Collections like FamilyMembers which can have 0...* FamilyMember entities.

 

In SAP I dont have a table for Employees, all employee related details are held in different abap tables like MainDetails, ContactDetails or FamilyMembers. The tables are related by Formid field. Now FamilyMember table can have multiple lines with the same Formid (family members of an employee).

 

I can map a CREATE operation in SEGW for this, IF everything is singular.


What do i need to do differently in GW or Function module to be able to handle insertion of multiple family members into the FamilyMember abap table? 

 

Also, how can I map GetEntity and GetEntitySet oprations so it would output me the kind of structure as i illustrated in the above code?

Failed to generate the backend operation proxy for RFC

$
0
0

Hi,

 

some times when the Gateway project is activated, i am getting the below error, when i asking ABAPer to delete RFC and re create it might work ,

 

Failed to generate the backend operation proxy for RFC <name of the RFC>

&ZIF_Z_360_PAYER_INFO6& is locked in request/task &K2DK900046&

 

not able to understand where the issue is.. can some one tell me the root cause of this issue?

 

-Madhav

SEGW: Navigation Property and Parameters

$
0
0

Dear development team,

 

I would like to enhance an existing SEGW-project; the project contains several navigation properties for the calendar handling.

One of the navigation property should be take over a parameter for a reference date.

 

We have the different navigation properties:

 

  • /sap/opu/odata/sap/<service>/StoreProducts(StoreID=<StoreID>,ProductID=<ProductID>)/Weeks
  • /sap/opu/odata/sap/<service>/StoreProducts(StoreID=<StoreID>,ProductID=<ProductID>)/WeeksLastPromotion
  • /sap/opu/odata/sap/<service>/StoreProducts(StoreID=<StoreID>,ProductID=<ProductID>)/WeeksLastYear

 

Is it possible to implement the SEGW-project in that way, that an parameter set at level of navigation property?

 

  • /sap/opu/odata/sap/<service>/StoreProducts(StoreID=<StoreID>,ProductID=<ProductID>)/WeeksLastYear(DateRef=<reference date>)

 

The idea is to set up a reference date for a particular navigation property.

 

Thank you for your feedback.

 

Best regards,

Kurt

SY/530 Data object ' ' not found

$
0
0

Hi,

 

I'm just starting up with gateway development and I'm trying to get a simplest thing working. I'm using SEGW transaction to create a simplest project that I could see on the net (SFLIGHTS) from DDIC. I'm using /IWFND/MAINT_SERVICE -> Explore Service to test it out. Testing the "Get Service Metadata" for the service, no problem at all. Everything showing as it should. But Get entity sets scenario will always give the SY/530 Data Object '' not found. BTW, the generated codes were all local. Next, I copied the codes that I have into backend ECC. The same exact codes seems to work fine from backend ECC.

 

I have tried to debug it, it seems to stop at /IWBEP/CL_MGW_ABS_DATA=>CREATE_KEY_CONVERTERS, the cs_request_context--technical_request structure have an empty values and causes the error.

 

I'm pretty new to gateway development, so, if anyone has come across this error, please let me know how to resolve the issue. I've checked all the oss notes available and non seems to be applicable to the gateway version. BTW, from the status, the version that I have:

 

SAP_BASIS Rel 731, PL 3

GW_CORE Rel 200, PL 3

IW_BEP     Rel 200, PL 10

IW_FND     Rel 350, PL 3

 

Thanks in advance for any help.

 

Regards,

Hamid


SEGW - Method 'X_GET_ENTITYSET' not implemented in data provider class

$
0
0

Dear All,

 

My server environment is IWBEP IWFND in the SAP ECC server, I create a gateway project by importing Login RFC interface with the following parameters:

 

Input parameters

Username (text)

Password (text)

Ztype (text)

 

Export Parameters

EsTechnDetail (structure)

EsMsg (text)

SEGW Project.JPG

 

I tried to request the LoginCollection EntitySet on Gateway Client occurs the error as display on the below;

 

URL on Gateway Client : /sap/opu/odata/SAP/ZTEST3_SRV/LoginCollection


Error :

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

 

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

 

 

<code>/IWBEP/CM_MGW_RT/021</code>

 

 

<message xml:lang="en">Method 'LOGINCOLLECTION_GET_ENTITYSET' not implemented in data provider class.</message>

 

 

-<innererror>

 

 

<transactionid>557FEF69E2CD27DFE100000083010A17</transactionid>

 

 

<timestamp>20150623093428.0969950</timestamp>

 

 

-<Error_Resolution>

 

 

<SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details</SAP_Transaction>

 

 

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

 

</Error_Resolution>

 

-<errordetails>

 

 

-<errordetail>

 

 

<code>/IWBEP/CX_MGW_NOT_IMPL_EXC</code>

 

 

<message>Method 'LOGINCOLLECTION_GET_ENTITYSET' not implemented in data provider class</message>

 

 

<propertyref/>

 

 

<severity>error</severity>

 

 

<target/>

 

</errordetail>

</errordetails>

</innererror>

</error>


Please help.


Regards

Choong

Integration of Sharepoint to SOLMAN containing TREX search engine

$
0
0

Hi All,

 

We are creating a new portal in SharePoint 2013 .

We want to integrate SAP search results with SharePoint 2013 search results.

We are using TREX search Engine for SAP Search, can we integrate TREX search result in SharePoint.

Can we use TRex API (using WebServices)to get TRex results, if yes please let me know how to fetch the Search Results OR is it possible to integrate using NW Gateway Service in order to fetch the results keeping TREX in mind?

Requesting you to give a word of advise regarding this integration.

Thanks in advance,

Regards,

Chaitanya

SAP Netweaver Gateway Demo System

EDM name validation failed for value *******

$
0
0

Hi Experts,

 

I want to create gateway service.

I import two parameter to function and export a value.

Firstly I try mapping data query operation but I couldnt succed.Because I get error "no output table is mapped in the query operation".

Then I try to mapping data read operation then, I create funcion import and EXECUTE_ACTION redefination.

But I get error "EDM name validation failed for value *******"

 

 

Plss help me,

Association/Navigation without key properties

$
0
0

Hi Experts,

 

 

I'm trying to make an association/navigation to another Entity, but this for a property without being marked as a key.

 

Example the EPM test service from http://scn.sap.com/docs/DOC-31221

The model: http://scn.sap.com/servlet/JiveServlet/showImage/102-44073-2-246387/Relationen.png

 

I already builded the SalesOrder association/navigation to the SalesOrderItem.

But I cannot seem to create the association/navigation from SalesOrderItem to the Product, in SEGW I always have to define the referential constraint with the key of the Entity. In SalesOrderItem, the productId property is not a key, and I can't imagine that I have to set it as a key.

 

Thanks in advance

 

 

Regards,

Wouter

Viewing all 750 articles
Browse latest View live