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

Error when adding an attribute to a redifined entity

$
0
0

Dear Gateway experts,

 

I have the following problem:

In the service builder I have successfully created and activated an OData Service with several entities. Now I have created a second service and have redefined one of the entities of the first service. Finally I have added one attribute to this entity in the second service. Also this service could be generated succesfully. But when calling the service I get the error message "Property [NEW ATTRIBUT] of data object [ENTITY] has no Internal type assigned."

 

In the MPC class of the second service I see, that the structure belonging to the entity has been updated with this new attribute.

But the exporting parameter ET_ENTITYSET of the DPC class refer to the structure definition of the MPC class of the first service (because the inherite from them) without the new attribute.

 

So my problem is now, hoc can I add an attribute to a redfined entity without getting this error and be able to fill the export table?

 

Thanks a lot in advance!

 

Regards,

Juergen


Reuse Entity Type in different Entity Sets

$
0
0

Hi,

 

Is it possible to reuse entity type in different entity sets?

I can do it in the Service Builder but when calling the service Gateway runtime gets confused.

 

Sample scenario:

Entity Types:

Request

Person

 

Entity Sets:

Employees (Person)

Managers (Person)

Requests (Request)

 

Navigation properties:

Request.Employee

Request.Manager

 

Associations

Request_Manager Principal Entity: Request, Dependent Person , Cardinality 1:1

Request_EmployeePrincipal Entity: Request, Dependent Person , Cardinality 1:1

 

Association Sets

Request_ManagerSet Principal Entity Set: Requests, Dependent Set Managers

Request_EmployeeSet Principal Entity Set: Requests, Dependent Set Employees

 

 

Call 1:

If I call Requests('123')/Manager MANAGERS_GET_ENTITY is called in DPC which is ok

Call 2:

If I call Requests('123')/Employee still MANAGERS_GET_ENTITY is called instead of EMPLOYEES_GET_ENTITY

 

 

Am I missing something?

 

 

If I copy Person to Person2 and point EntitySet Employee to Person2 then both calls are routed correctly. But I would like to avoid duplicate Entity Types.

Link of attribute labels to data elements gone on redefined service

$
0
0

Hi experts,

 

in the gateway service builder I've created a service and added an entity based on a structure of the ABAP dictionary.

Then I used the label editor to link the attributes to the labels of the corresponding data elements in the ABAP structure (in order to get the translated names from the ABAP elements as well).

 

Finally I have created another service and added the same entity by redefinition from the first service. But it seems that the links between the attributes and the labels of the data elements are not been imported by the redefinition.


Is this the normal behaviour or am I missing something?

 

Thanks for your help!

 

Regards,

Juergen

Internal error when redefinind service with entity types and associations

$
0
0

Dear gateway specialists,

 

I have created a gateway service with several entity types and several associations together with corresponding navigation properties.

Then I have created another service in which I want to redefine the first service with all the entity types and associations.

But the redefinition ends with an internal error (message no. /IWBEP/SBCM001) and the navigation properties are not imported (entities and associations seem to be o.k.).

 

What could be the reason for the error? And why might the navigations not be imported?

 

 

Thanks!

 

Regards,

Juergen

 

 

 

P.S. I found SAP note 2027049 "Service Builder Redefiniton - Extend of Odata service with Associations" which I've implemented, but without success

Error on Edm.Time attribute after redefinition

$
0
0

Dear Community,

 

I have created a NetWeaver Gateway project with one entity and a corresponding entityset, the entity is not related to a ABAP dictionary structure. Within the entity I have created one time related attribute, which I set to type Edm.Time with precision = 0, scale = 0, max length = 6. The ABAP field name is linked to the internal type TIME. The consistency check reports no error.

Edm.Time.PNG

 

Now I create a second project where I redefine the entity of the first service. Now something strange happens: The precision and the max length of the time related attribute in the second service are set to 8:

 

Edm.Time.ext.PNG

 

In some case this leads to an error in the consistency check and I can't create the runtime artifacts:

 

error.PNG

 

Since the the attribute comes from the redefinition I can't change it.

 

What can I do to avoid this?

My only idea is to use Edm.String instead - which of course is not recommended.

 

Thanks,

 

 

Regards,

Juergen

How to generate the services when i have IWBEP and GW_CORE in 2 systems.

$
0
0

Hello Experts.

Problem:

I am able to entity, entitysets, association and navigations but unable to generate service.

SEGW : Copy Project vs Redefine(OData Service)

$
0
0

Dear Friends,

 

This is regarding the differences between various modeling approaches in SEGW

 

1. An Existing Project ( and Technical Service , say, Parent 1.0 ) is live

2. A new Project ( and Technical Service , say, Child 1.0) is to be implemented.

 

What is the real difference between

(A) ... copying the existing project "Parent" to  "Child" and publishing the Technical service as "Child 1.0"

(B) ...copying the existing project "Parent" to  "Child" and publishing the Technical service as "Parent 2.0"

(C) ...Redefining the "Parent 1.0" in a new project "Child" and "Overwrite Base/Extend the Service" ...which publishes the Technical Service as "Parent 1.0"

(D) ...Redefining the "Parent 1.0" in a new project "Child" ..without "Overwrite Base/Extend the Service" .. and publish the Technical Service as "Child 1.0"

...

 

In other words, what really is the idea of "Redefine >OData Service (GW)" ...( with / without "Overwrite Base/Extend the Service" )

 

Many thanks for your patience

 

Suresh

External Service registration on SAP Net weaver Gateway

$
0
0

Hello

 

I have deployed net weaver gateway "Hub architecture with development on the server" and my issue is the RFC is getting executed on Hub server only it does not go to Back end to get this resolve I tried to create Alias for Back end system and registration of service with that Back end system Alias but not happening getting below Error.

 

Could not connect to the selected system. Check log for details.

Message no. /IWBEP/CM_SBLMTOOLS015

Diagnosis

The following errors might have occurred while connecting to the selected Gateway hub system:

 

  • Communication failure, System failure

 

System Response

Could not connect to the selected system..

Procedure

 

Check the error log in the current system using the transaction /IWBEP/ERROR_LOG.

Contact your system administrator.

 

So what's the right approach to get this resolved?


Assignments of ABAP types to entity attributes gone on redifined services

$
0
0

Hi there,

 

in my service I assigned ABAP types (both internal types and data elements) to the attributes of my entity using the ABAP type editor.

 

When I now create a new project and redefine the service from the first project all those assignments are gone (in the new project). The assignments are set back to 'Determination by Runtime Object Generator'.

 

A little bit different is the behaviour of date fields (both Edm.DateTime and Edm.DateTimeOffset): They are always re-set to ABAP data element 'TIMESTAMP' (length 15), which means that I need to do some conversion on my date values in the DPC_EXT class.

 

Seems to be a similar problem as the one regarding assignment of labels I described in a recent post:

Link of attribute labels to data elements gone on redefined service

 

Does anybody have similar problems - or even a solution to keep the original assignments?

 

Thank you!

 

Best regards,

Juergen

Binding multiple entityset

$
0
0

Hi Expert,

 

 

I have created 4 entityset (A,B,C,D). we are using one RFC which return all 4 internal table for 4 entityset data in one call.

 

suppose If I call this RFC in A_GET_ENTITYSET method then we can only bind data to 'A' entityset not 'B,C,D'.

 

is there any way to bind all 4 entityset in one entity GET_ENTITYSET method?

Problem creating an OData service with RFC-/BOR Import.

$
0
0

Hi Experts,

 

i am running always into the same problem

 

I want to create an Odata Channel with "SEGW" and Datamodel with an RFC import.

RFC si GET_CPU_ALL

 

but I am running always into the same problem when I want to generate the runtime.

 

Bildschirmfoto 2014-09-25 um 18.03.42.png

I don´t know why.

 

Error: ... _DPC was generated with syntax errors....

 

I would really appreciate if someone could help me.

 

Thanks

Session management in UI5

$
0
0

Hi Experts,

 

 

I am developing a desktop application with the following architecture

 

 

SAP UI5->N/w Gateway->HANA

 

 

My question is basically how is session management  done in this architecture?

I can see that during the first logon the gateway service returns an SAP session id

in the cookie. Will browser take care of using this session id and take care of

session management automatically?

not possible to generate Data Model

$
0
0

Hi,

 

I ave an issue while generating Data Model. Basically I'm getting couple of red messages in the log:

 

GW_data_model_generation_issue.png

 

this is what I see as long text of these errors:

 

Additional information

    SAP System object ID:

    Message details:

    No development license for user BCUSER

 

My user BCUSER is registered as developer (table BCUSER). So is there any other license that is needed for SAP Gateway development?

 

PS: my system is: SAP EHP 2 for SAP NetWeaver 7.0 PL11, GW PL04

 

thanks,

m./

How to remove unnecessary metadata in the gateway service output? Pls help!

$
0
0

Hi Experts,

 

   In the output of my gateway service I can see lot of metadata (shown in BOLD below) included.

 

   My client application that consumes or calls the service do not want these metadata. They want plain json format as shown the expected format below. What I have to do in Gateway code or configuration to remove these meta data?

 

 

Current output:

 

{

"d" : {

    "__metadata" : {

      "id" : "http://xyz.com:1234/sap/opu/odata/sap/YBLS_DN_SRV/DNHeaderCollection('1902001206')",

      "uri" : "http://xyz.com:1234/sap/opu/odata/sap/YBLS_DN_SRV/DNHeaderCollection('1902001206')",

      "type" : "YBLS_DN_SRV.HEADER_DATA",

      "properties" : {

        "RESPONSE" : {

          "associationuri" : "http://xyz.com:1234/sap/opu/odata/sap/YBLS_DN_SRV/DNHeaderCollection('1902001206')/$links/RESPONSE"

        },

        "ITEM_DATA" : {

          "associationuri" : "http://xyz.com:1234/sap/opu/odata/sap/YBLS_DN_SRV/DNHeaderCollection('1902001206')/$links/ITEM_DATA"

        },

        "SENDER_INPUT" : {

          "associationuri" : "http://xyz.com:1234/sap/opu/odata/sap/YBLS_DN_SRV/DNHeaderCollection('1902001206')/$links/SENDER_INPUT"

        }

      }

    },

 

    "DELIVERY_NUMBER" : "1902001206",

    "SHIP_TO_TYPE" : "",

    "ORIGINATOR" : "STEVENS, M",

    "WWID" : "",

    "FROM_COMPANY_NAME" : "XYZ corp",

    "FROM_SITE" : "MIDDLER",

    "FROM_BUILDING" : "ADC",

    "FROM_STREET" : "",

    "FROM_CITY1" : "MIDDLER",

    "FROM_REGION" : "",

    "FROM_POST_CODE1" : "",

    "FROM_COUNTRY" : "US",

    "AUTHORIZED_BY" : "",

    "FROM_TEL_NUMBER" : "",

    "FROM_MAIL_STOP" : "2134",

    "FROM_EMAIL" : "myemail@email.com",

    "FROM_COST_CENTER" : "",

    "FROM_COMPANY_CODE" : "",

    "CREATED_BY" : "",

    "DELIVER_TO" : "",

    "ATTENTION" : "ABC-23",

    "TO_TEL_NUMBER" : "",

    "TO_TEL_EXTENS" : "",

    "TO_COMPANY_CODE" : "",

    "TO_COUNTRY" : "MY",

    "TO_EMAIL" : "",

    "TO_COMPANY" : "CHZ corp.",

    "TO_BUILDING" : "",

    "TO_SITE" : "",

    "TO_STREET" : "Simple street",

    "TO_CITY" : "Penang",

    "TO_REGION" : "",

    "TO_LAND1" : "MY",

    "TO_POST_CODE1" : "1300",

    "TO_MAIL_STOP" : ""

}

 

 

Expected output

 

{

 

 

    "DELIVERY_NUMBER" : "1902001206",

    "SHIP_TO_TYPE" : "",

    "ORIGINATOR" : "STEVENS, M",

    "WWID" : "",

    "FROM_COMPANY_NAME" : "XYZ corp",

    "FROM_SITE" : "MIDDLER",

    "FROM_BUILDING" : "ADC",

    "FROM_STREET" : "",

    "FROM_CITY1" : "MIDDLER",

    "FROM_REGION" : "",

    "FROM_POST_CODE1" : "",

    "FROM_COUNTRY" : "US",

    "AUTHORIZED_BY" : "",

    "FROM_TEL_NUMBER" : "",

    "FROM_MAIL_STOP" : "2134",

    "FROM_EMAIL" : "myemail@email.com",

    "FROM_COST_CENTER" : "",

    "FROM_COMPANY_CODE" : "",

    "CREATED_BY" : "",

    "DELIVER_TO" : "",

    "ATTENTION" : "ABC-23",

    "TO_TEL_NUMBER" : "",

    "TO_TEL_EXTENS" : "",

    "TO_COMPANY_CODE" : "",

    "TO_COUNTRY" : "MY",

    "TO_EMAIL" : "",

    "TO_COMPANY" : "CHZ corp.",

    "TO_BUILDING" : "",

    "TO_SITE" : "",

    "TO_STREET" : "Simple street",

    "TO_CITY" : "Penang",

    "TO_REGION" : "",

    "TO_LAND1" : "MY",

    "TO_POST_CODE1" : "1300",

    "TO_MAIL_STOP" : ""

}

Upload .CSV file through UI5 and return data back to UI5

$
0
0

Hi Experts,

 

Our requirement is to upload .CSV file provided by UI5.The content of file(multiple records) should be returned back to UI5 by gateway.

 

Limitations are:-

1. We can't store file data in database(temporary/Permanent). So we have to upload and return data in same call.

2. As we need to validate content we can't read .csv file data in Ui5. Also file may contain a lot of records so we cannot upload file directly using browser tools.

 

Is there any option where we can return the file data in the same call in which the file is getting posted (POST request)?

 

 

Thanks in advance for the response.

 

Regards


How to get Multiple Rows as Response using Create_Deep_Entity

$
0
0

Hello Experts,

 

I have a question regarding displaying Multiple rows as Output in XML Response using Create_Deep_Entity method. How to achieve that? Below is the procedure i followed and I am able to return only last record of the table in XML Response.

 

I have 2 Entity Types PurchaseHeader and PurchaseItem with fields as mentioned below and also maintained Associations and Navigation's between 2 Entity types. Also Implemented Create_Deep_Entity method in Data Provider class.

 

PurchaseHeader:-

PurchaseDoc

DocumentNum

 

PurchaseItem:-

PurchaseDoc

PurchaseItem

Quantity

DocDate

PostDate

StockType

DocumentNum

 

From a GoodsRecipt Post BAPI, I will be getting Material document Numbers as Output for each Item of a Purchase Document from a table i.e Item_doc table. I am looping that table and passing it to copy_data_to_ref, but I am able to get only final record(MaterialDoc) in the XML Response Output. I want to fetch all Material docs for each item in Response payload.

 

Loop at Item_doc into wa_item_doc.

ls_gr_item-DocumentNum = wa_mat_doc-DocumentNum.

ls_gr_item-PurchaseDoc = wa_mat_doc-PurchaseDoc.

 

copy_data_to_ref(
EXPORTING
is_data
= ls_gr_item
CHANGING
cr_data
= er_deep_entity
).
endloop.

 

 

 

Thanks.

Gateway Service for Function Module with Table as input.

$
0
0

I have tried creating service for the function module that having single value as input but not yet done any example with internal table as input.Can any one suggest a Step by step method of doing the same

 

regards,

Vishnu

Vesna: Spring framework functionality for ABAP OO

$
0
0

Yes that's not the April Fools' Day and yes, if you were missing Spring Framework in ABAP OO, your longing is over:

Vesna Framework Add-On 100_702 has been released and it provides Spring look and feel in ABAP OO environment, enriched with some SAP NetWeaver-specific features.

Vesna is not a literal port of Spring Framework, far more a "spiritual" one since it brings functionality of Spring to ABAP OO world but the technology behind it has much more in common with .NET Castle framework, implemented in ABAP OO-specific manner.

First productive use case of Vesna refers to coolOrange PowerGate, being a brilliant, OData-based integration platform for Autodesk and SAP environments. Come and visit us at Autodesk AU in Darmstadt 23-24.10 to see PowerGate and Vesna in action!

Right now you can watch a webcast showing an example use case of for Vesna: one of SAP NetWeaver Gateway services from PowerGate stables.This webcast concentrates on the benefits brought to GW services by Vesna usage: native extensibility, greatly enhanced testability and cutting-edge OO design.

This specific webcast concentrates on application composition with Vesna. However, current version of the Vesna Framework (100_702) includes also AOP support. And yes, AOP stands here for nothing short of Aspect Oriented Programming! Quite soon I hope to be able to show you a more involving demo of Vesna AOP as well.

If the webcast captured your attention, wait no longer: go and grab a copy for yourself off the Arcona Labs S.A. web presence. Vesna Framework is free for research and non-commercial use and a full commercial license incl. lifetime upgrades costs as little as 1000 EUR one time fee.

How to remove { "results":... } tag in Entity Sets of OData GET JSON ?

$
0
0

Hi Experts,

 

I have build OData service in Gateway 7.4 SP5.

The service is basically to call Backend RFC calls and has associations to build Master-Detail pagination model

 

I was trying to consume the service in json format in SAPUI5.

The service when appended with ...&$format=json, the response body is as follows.

 

==========================================

 

{

  "d": {

  "results": [{

  "__metadata": {

  "id": "

  .

  .

  .

  },

  "Year": "2014",

  "Company": "SAP",

  "EntitySet1": {

  "results": [{

  "__metadata": {

  "id": "

  .

  .

  .

  },

  "Country": "USA",

  "Recordid": "1100",

 

 

  }]

  },

  "EntitySet2": {

  "results": [{

  "__metadata": {

  "id": "

  .

  .

  .

  },

  "Rowid": "0001",

  "Currency": "USD",

  "EntitySet3": {

  "__deferred": {

  .

  .

  .

==========================================================

 

I would like to remove the {"results" : tags from every EntitySets and would like to get the data as follows.

-------------------------------------------------------------

{

  "d": {

  "results": [{

  "__metadata": {

  "id": "

  .

  .

  .

  },

  "Year": "2014",

  "Company": "SAP",

  "EntitySet1": {

     "Country": "USA",

  "Recordid": "1100",

  }

  "EntitySet2": {

     "Rowid": "0001",

  "Currency": "USD",

  "EntitySet3": {

  .

  .

 

---------------------------------------------------------------------------------------

 

 

I have already gone through the following links but not able to find a solution to get a cleaner Json format of the OData service.

Posting data in Json format in OData services

Deep entity in JSON

 

Since we are in the latest version and SP, dont know if there any latest SAP notes as well.

Is there any config or DPC method implementation to omit "results" tags.

Please help me.

 

Thanks!

Praveen

How to move Fiori services D->Q->P

$
0
0

Hi,

we have standalone gateway system for each businnes suite system in our landscape (dev, q and prod). Now I want to know, how to move added Fiori services from Dev gateway system to Q gateway system? Or should I add them as I did in dev system using /IWFND/MAINT_SERVICE  t-code?

It requested transport request when I added services in Dev system, but when I move this TR to Q, the business system will be different right?

 

 

Thanks Jiri

Viewing all 750 articles
Browse latest View live


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