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

#7 How To... Implement End-to-End Push Notifications with HCPms and SAP Gateway

$
0
0

#7.pngThis is a part of the implementation details of How To... Implement End-to-End Push Notifications with HCPms and SAP Gateway.


 

Steps to Test

11.png

Testing the push report


Let's test if your test push message can really create a queue. First thing is to "subscribe" a specific OData collection. Start your REST Client. (This example uses Firefox REST Client)


Set those parameters for the client:


Method - GET

URL - https://<hcmps server>/<your app id>

Headers - X-CSRF-Token = Fetch

          X-SMP-APPCID = <your app connection id on HCPms>

          Content-Type = application/atom+xml; charset=UTF-8

6.21.png

The URL maps to the Service Document of the Gateway service that was configured on HCPms.


As an extra security measure, Gateway services guard against Cross-Site Request Forgery (CSRF) by requiring a Gateway-supplied token in all modifying requests (for example, POST). To retrieve a token, use the GET method to set the header “X-CSRF-TOKEN” with value “Fetch” on one of the given service’s read operations. This also applies when you are accessing the service document.

 

The service document is shown in the response. Take a look at the various collections (for example, “SubscriptionCollection”).

 

You can obtain the CSRF token (valid throughout a session) from the Response Headers tab:

6.22.png

Set up the REST Client with the following parameters:


Method - POST

URL - https://<hcmps server>/<your app id>/SubscriptionCollection

Headers - X-CSRF-Token = <the value obtained>

          X-SMP-APPCID = <your app connection id on HCPms>

          Content-Type = application/atom+xml; charset=UTF-8

Body - The XML body contains the payload needed for the subscription request. You can use the sample subscription payload (but be sure to replace the value of deliveryAddress):


-- test payload --

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

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

  <atom:id />

  <atom:title>Subscription for sample user</atom:title>

  <atom:author />

  <atom:updated />

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

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

      <d:deliveryAddress>urn:sap-com:channel:HCPMS_PUSH:db4dcf68-d511-40fd-91f6-88e49e8b1441</d:deliveryAddress>

      <d:collection>FlightCollection</d:collection>

      <d:filter></d:filter>

      <d:select>*</d:select>

      <d:persistNotifications>false</d:persistNotifications>

      <d:changeType>created</d:changeType>

    </m:properties>

  </atom:content>

</atom:entry>

-- test payload --


For the detailed explanation of this payload, have a read at the appendix section, but in a nutshell, here's the format of <d:deliveryAddress>:


urn:sap-com:channel:<HTTP destination of HCPms defined in SM59>:<application connection id of HCPms>


6.24.png

Click Send. A successful request results in an HTTP “201 Created” response.

6.25.png

Run the transaction code SE11. You can verify this in the ABAP table “/IWBEP/D_MGW_SUB”. You should be able to confirm a newly created subscription entry.

6.27.png

Remark>Make sure "SOURCE SYSTEM ID" in the /IWBEP/D_MGW_SUB table equals with "Destination System" value in SPRO path "SAP NetWeaver" > "Gateway Service Enablement" > "Backend OData Channel" > "Connection Settings to SAP NetWeaver Gateway" > "SAP NetWeaver Gateway Settings".

6.11.png

Here you'll find the current setting - and the value of "Destination System" has to be the same with the value of "SOURCE SYSTEM ID" in the table "/IWBEP/D_MGW_SUB". If you don't have the value, create a new one with System Alas = LOCAL and RFC Destination = NONE.

6.26.png


Now you can run the test report /IWBEP/R_MGW_PUSH_TEST in the transaction code SE38!


(Be sure to have the flight service & data exist - the FLIGHT data can be generated via transaction code SE38 with the program name "SAPBC_DATA_GENERATOR".)

6.28.png

Enter the value ID/1. Execute. You won't get neither successful nor error message (unless you debug the code one line by one)... time to check the queue!

6.29.png

Check the queue via the transaction code SBGRFCMON. The queue should be created.

6.30.png

You don't find it? Yes you might not be able to find it. That's because it is created so fast and deleted if the queue was transferred successfully to HCPms. So it is actually a good idea to post a subscription with a wrong value, such as:


--

<d:deliveryAddress>urn:sap-com:channel:DUMMY ENDPOINT</d:deliveryAddress>

--


Note - The DUMMY_ENDPOINT is the value that actually does exists in SM59, but it contains the wrong value (such as the host name doesn't exist). So the queue should be created and be there with the error status messages. In this way you can ensure if the queue is really created or not. You need to make sure the DUMMY_ENDPOINT exists in SM59, otherwise the message doesn't stop at the queue, but only shows up in the Gateway Error Log.

6.31.png

Other useful error log location for troubleshooting:


  • Gateway Backend Error Log: tx code /IWBEP/ERROR_LOG
  • Gateway Error Log: tx code /IWFND/ERROR_LOG
  • Application Log: tx code SLG1 (Object = /IWBEP/* for Backend info, /IWFND/* for Gateway Hub info)


Once you confirm the queue is successfully created, let's check how it goes to HCPms side.


Tip - An ABAP report "SRT_ADMIN_CHECK" with a "Check bgrfc configuration" checkbox shows the current status of bgRFC config.

rep.png


Check the HCPms push log. Go to the log console of HCPms - typically the Mobile Service Cockpit URL is like https://hcpmsadmin-<id>trial.dispatcher.hanatrial.ondemand.com.  Find and click "Logs" icon.

7.1.1.png

Click on "Log Settings" and change the log level for the Push component with Debug/Enabled. It should be a good idea to disable all the other components so that you can focus on the Push message only.

7.1.2.png

After you run the push test report and ensure the queue is successfully created and transferred to HCPms, check the log file. You should be able to find log information for Notification, which indicates the pushed messages are coming in and HCPms is communicating with Push Provider.

7.1.3.png

Check the device for push notification. The push messages shall come in!


Note - If you're so sure that it will work by confirming the HCPms log but the message doesn't come in the device, please be aware of the fact that the subscription should be made with the app connection id, which is currently alive on the device. That means every time an app gets installed after the uninstallation, it registers with a new app connection id. You might forgot this during your active app development cycle.



What's next? If you need the ERP backend in addition to a single Gateway Hub box, wire the Gateway Hub and ERP backend.



#8 How To... Implement End-to-End Push Notifications with HCPms and SAP Gateway



Appendix:


Details of the subscription payload


(Note - formal help document: Subscription Push Scenario - SAP NetWeaver Gateway - SAP Library)


OData services exposed by SAP Gateway are not automatically enabled for subscription. Confirm this by calling the Gateway service document URL and checking the collections that are exposed. A “SubscriptionCollection” indicates that you can subscribe to the collections of a given service. For more information about enabling subscription for a Gateway service, see the SAP help portal.

 

The demo Flight service (RMTSAMPLEFLIGHT) that is included with an SAP Gateway server is enabled for subscriptions out-of-the-box.

 

In general, to subscribe for notifications, the app must send a subscription request that specifies the following:

 

  • User (specified in the HTTP header)
  • Delivery address
  • OData collection
  • Select
  • Change type
  • Filter

 

deliveryAddress

 

The delivery address is the location to which the notification is sent from Gateway. The delivery address must use the format:

 

urn:sap-com:channel:<HTTP destination of HCPms>:<application connection id of HCPms>

 

In the sample request, suppose this delivery address is used:


<d:deliveryAddress>urn:sap-com:channel:HCPMS_PUSH:db4dcf68-d511-40fd-91f6-88e49e8b1441</d:deliveryAddress>

 

An HTTP destination of type G called “SMP_PUSH” is referenced (defined in tx SM59), followed by the application connection ID given by the HCPms.

 

collection

 

The collection is the name of the business object collection for which the subscription is being created, in this case, “FlightCollection”. The service document of the OData service shows the collections that are available for the service.

 

select

 

The select attribute must follow the OData $select notation. This attribute allows the subscriber to control the notification format by specifying the subset of the business object hierarchy sent along with the notification. Currently only two values are supported:


<d:select></d:select> (empty or missing attribute) A short (base) notification without a business object is sent to the subscriber.

<d:select>*</d:select> The complete hierarchy of the business object is sent.

 

changeType

 

The changeType attribute allows you to subscribe to notifications based on a particular operation that is performed in the SAP back end, and must be one of:“created”, “updated”, “failed”, or “deleted”. . For example, to subscribe notifications only for create operations, use a change type of “created”. However, you must also develop application specific handling for sending notifications in the back end based on the subscribed changeType.

 

filter

 

A filter is where the device user can specify whether to subscribe to all business object instances or to only a specific business object instance. Adhere to theOData $filter syntax and combine any fields using only the AND operation. The only filter criteria that SAP Gateway evaluates is business object ID.


Uploading files via gateway refused if content-type header not set

$
0
0

Hi,

 

I have a media entity in my service which I use to upload files from my UI5 webapplication to the SAP ERP backend and connected content servers.

 

On the client I use a sap.m.UploadCollection control for the file upload. I don't know if it's the control or the browser which sets the content-type header for the POST request.

 

I have some file types like .mpp or .pages for which no MIME-type is determined and thus the content-type header is not transmitted.

Since gateway checks the submitted content-type it refuses to upload files which have not set the content-type header.

 

According to this discussion no content-type header should be submitted by the sender if the MIME type is unknown.

 

What can I do about it?

Why does gateway do this check and why does it refuse files without content-type header?

 

20160118_150552_GW_No_content-type.png

How to prevent extra space being removed by SAP Gateway

$
0
0

Hello Experts,

 

Thank you for reading this.

 

I have a simple SAP GW scenario where I have implemented Get Entity Set method to get data via a RFC call to backend. In the return structure of the RFC we have a field(char80) which bears double spaces, for certain input. Example, 'Xyz &  abc', mind the double space between '&' and 'abc'.

I need the output to be similar. But, GW response shows output as 'Xyz & abc', i.e., without the extra space, but I need it exactly as it comes from backend.

After debugging I found out that RFC call is fine and also content of lr_entityset at the end of GET ENTITY SET method, also has the extra space, as desired. Somewhere later this may be operated on.

Could not find exactly where this extra space is getting removed.

I would like to know if there is a way to prevent this, especially without trying to modify/enhance any standard code.

 

Regards,

Addy

Edm.Boolean error in Odata Service

$
0
0

Hi Experts,

I developed 1 O-data Service, with function import.

Import contains 1 parameter, of Edm.Boolean type.

When I am trying to execute my Service in Gateway Client, I am getting below Error.

"Invalid Function Import parameter type 'E_full'. Expected Type is 'Edm.Boolean'.

 

Screen Shots from service

Capture1.PNG

Capture2.PNG

Capture3.PNG

 

Request you to please help me out.

 

-Regards

Rohit

invalid or no mapping to system data types found.

$
0
0

Hello Netweaver gurus.

 

One of my client faces this issue. Has anybody come across similar error types ?

 

Regards,

Nitin Koushik

SAP Annotations for OData Version 2.0

$
0
0

Introduction

OData services provide a uniform interface for interacting with their resources, and in addition are self-describing:
  • The service document (located at the service root) lists the available top-level resources, and
  • The service metadata document (located at the address $metadata relative to the service root) describes the structure of all resources in the service.
This structural metadata makes it easy to understand a service, and human-readable documentation can be directly embedded into the metadata document, helping developers consume an OData service.
This alone is a huge benefit, yet metadata can be taken one step further by embedding machine-readable additional metadata that can be leveraged by development tools, client libraries, and generic clients to better interact with the service.
One area are semantic annotations that tell which of the OData properties contain e.g. a phone number, a part of a name or address, or something related to a calendar event or an analytic query. This is important for apps running on mobile devices that want to seamlessly integrate into contacts, calendar, and telephony.
The next area are capability annotations that describe which of the possible interactions defined by OData's uniform interface are supported by which parts of a concrete service. These annotations will e.g. tell whether an entity set allows inserts, updates, or deletes, whether it requires a filter, and which properties can be used in filter expressions. They also advertise capabilities that go beyond the base set defined by OData, e.g. whether an entity set allows free-text search via an SAP-defined query option.

Contents

AtomPub Service Document

AtomPub allows extending the service document with elements and attributes from XML namespaces other than AtomPub. The following sections describe which elements of the service document (namespace prefix app) can be annotated with attributes and elements from the namespace http://www.sap.com/Protocols/SAPData (namespace prefix sap) and from the namespace http://www.w3.org/2005/Atom (namespace prefix atom), and what these annotations mean.

Element app:service

The app:service element can be annotated with two elements from the atom namespace:
  • <atom:link rel="self" href="..."/> contains the link to this service document, and
  • <atom:link rel="latest-version" href="..."/> contains the link to latest version of this service.
If the latest-version link deviates from the self link, a client may inspect the newer version of the service and decide (probably after asking its user) to switch over to the newer service version.

Element app:collection

The app:collection element can be annotated with three elements:

It can also contain the attribute sap:addressable with the same value as for the corresponding entity set in the metadata document.

 

Metadata Document

OData's Conceptual Schema Definition Language (CSDL) allows annotating most model elements with XML attributes or elements from foreign XML namespaces. The following sections describe which elements of the metadata document (namespace prefix edm) can be annotated with attributes and elements from the namespace http://www.sap.com/Protocols/SAPData (namespace prefix sap), and what these annotations mean. For binary attributes the meaning is desribed for the value "true".

 

Element edm:Schema

Schemas can be annotated with the following attributes. If not stated explicitly, consumers can assume them to have the default value listed in the second column. This default value reflects the "normal" behavior.

Attribute NameDefault ValueMeaning
schema-version0000

A non-negative number indicating the version of the schema. This can be considered a sub/minor version of the service version. It should be incremented whenever additive changes are made in a subsequent shipment of the same service version, and it can be used by clients to detect whether the service meets their minimal data provisioning needs.

Element edm:EntityContainer

Entity containers can be annotated with the following attributes. If not stated explicitly, consumers can assume them to have the default value listed in the second column. This default value reflects the "normal" behavior.

Attribute NameDefault ValueMeaning
supported-formatsatom json

A white-space separated list of format shortnames. Possible list items:

  • atom
  • json
  • xlsx

The default is sap:supported-formats="atom json".

use-batchfalse

Wrap all requests to resources of this service in batch requests; only the service document and the metadata document can be accessed unwrapped.This avoids exposing sensitive data in URLs (even with HTTPS URLs can be visible in log files)

 

Element edm:EntitySet

Entity sets can be annotated with the following attributes. If not stated explicitly, consumers can assume them to have the default value listed in the second column. This default value reflects the "normal" behavior that can be expected from any OData service.
Attribute NameDefault ValueMeaning
label-Description, will also be used as atom:title in the service document
creatabletrueNew entities can be created in this set
updatabletrueEntities in this set can be updated
updatable-path-Entities in this set can be updated or not depending on their state. The value of this attribute is a path expression that identifies a Boolean property in the context of the entity type of the entity set. The value of this property indicates whether the entity can be updated or not.
deletabletrueEntities can be deleted from this set
deletable-path-Entities in this set can be deleted or not depending on their state. The value of this attribute is a path expression that identifies a Boolean property in the context of the entity type of the entity set. The value of this property indicates whether the entity can be deleted or not.
searchablefalseSupports custom query option search
pageabletrueSupports system query options $top and $skip
topabletrueSupports system query option $top
countabletrueSupports system query option $inlinecount=allpages and path suffix /$count
addressabletrueUse “false” if this entity set can only be accessed within its containing entity, e.g. SalesOrderItems within SalesOrders through SalesOrders(4711)/Items. Direct access to non-addressable entity collections will result in a 404 response code. The set may however allow access to single entities identified by their key properties values, e.g. SalesOrderItems(OrderID=4711,ItemID=3)
requires-filterfalseUse “true” if this set cannot be queried without providing a $filter expression. If accessed without a filter expression, it will respond with a human-readable error message explaining which kinds of filter expressions are required as a minimum
change-trackingfalseChanges to entities of this set can be tracked. Consumers can subscribe by adding an HTTP Prefer header odata.track-changes to the request. The response will then include a delta link for requesting information about changes in the future.
maxpagesize-Maximum number of entities returned in an OData response. If more entities are included in the result of an OData request, the service applies server-driven paging.
delta-link-validity-The maximum duration in seconds a delta link in an OData response remains valid. Afterwards, resources associated with the change tracking subscription may be cleaned up and will be no longer available.
semantics-See table below

Attribute sap:semantics

This attribute can take the following values in the context of  an entity type:

ValueMeaning
aggregateThe entities of this set are automatically aggregated if the query option $select is specified. Each property listed in $select is treated according to its aggregation role, see description of attribute sap:aggregation-role below
fixed-valuesThe entity set represents a list of fixed values, i.e. it is unlikely to change often, and the list is typically short

 

Element edm:EntityType

Entity types can be annotated with the following attributes:
Attribute NameMeaning

label

Description, will also be used as sap:member-title in the service document

semantics

See table below

 

Attribute sap:semantics

This attribute can take the following values in the context of  an entity type:
ValueMeaning
vcardEntities of this type contain contact information following the vCard standard, see values for sap:semantics on property level
veventEntities of this type contain event/appointment information following the iCalendar standard, see values for sap:semantics on property level

vtodo

Entities of this type contain todo/task information following the iCalendar standard, see values for sap:semantics on property level
parametersThis entity type represents parameters for an analytical query
aggregate
Entity sets with this type return result feeds with aggregated values for properties annotated with sap:aggregation-role="measure".
The aggregation takes into account the dimension properties specified in the $select system query option of the request. See also description of annotation sap:aggregation-role.
variantThis entity type represents query selection variants bundling parameter selections and filter expressions for obtaining specific query results

Element edm:Property

The annotation sap:labelis required for properties. All other annotations are optional.
Attribute NameDefault ValueMeaning
label-A short, human-readable text suitable for labels and captions in UIs
heading-A short, human-readable text suitable for column headings in UIs
quickinfo-A human-readable text suitable for tool tips in UIs
semantics-See table below
creatabletrueValues for this property can be chosen by client when creating an instance. “False” if value is always set by the server, e.g. document number from number range.
updatabletrueValues of this property can be changed. Must be “false” if it is “false” at entity set level. If updatability can change per entity or based on the entities' state, do not use this static annotation and use sap:field-control instead.
sortabletrueCan be used in $orderby system query option.
filterabletrueCan be used in $filter system query option.
required-in-filterfalseMust be used in $filter system query option.
filter-restriction-See table below
text-A path expression that identifies a property in the context of the entity type containing a human-readable text for the value of this property.
unit-A path expression that identifies a property in the context of the entity type containing the currency code or unit of measure for a numeric value.
precision-A path expression that identifies a property in the context of the entity type containing the number of significant decimal places for a numeric value.
visibletrueValues of this property are typically visible to end users. If visibility can change per entity or based on the entities' state, do not use this static annotation and use sap:field-control instead.
field-control3

A path expression that identifies a property containing a numeric value that controls visibility:

  • 0 = hidden,
  • 1 = read-only,
  • 3 = optional,
  • 7 = mandatory

See section below for details

validation-regexp-Values for this property have to match the specified regular expression. The regular expression is a JavaScript Regular Expression.
display-format-

There are currently three possible values:

  • “Date” indicates that only the date part of an Edm.DateTime value is relevant
  • "NonNegative" indicates that only non-negative numeric values are provided and persisted, other input will lead to errors
  • "UpperCase" indicates that uppercase values are provided and persisted, lowercase input will be converted
lower-boundary-
A property holding the upper boundary of a value range includes this attribute. The value of this attribute is always the name of another property in the same type.  It points to the property holding the related lower boundary.
upper-boundary-
A property holding the lower boundary of a value range includes this attribute. The value of this attribute is always the name of another property in the same type.  It points to the property holding the related upper boundary.
aggregation-role-See table below
super-ordinate-
If values of this property are meaningful (unique) only in the context provided by the value of another property, then this attribute holds the name of the context-providing property. The value of this attribute is always the name of another property in the same type.
attribute-for-
A property representing an attribute of another property includes this attribute. The value of this attribute is always the name of another property in the same type.  It points to the property for which this property is an attribute.
hierarchy-node-for-A property holding node IDs for a hierarchy structure of values of some other property includes this attribute.  The value of this attribute is always the name of another property in the same type. It points to the property for whose values the hierarchy is defined.
hierarchy-node-external-key-for-A property holding the external key of a hierarchy node includes this attribute. The external key is a human-readable identification of a node. The value of this attribute is always the name of another property in the same type. It points to the related property holding the hierarchy node ID.
hierarchy-level-for-A property holding level numbers for a hierarchy structure of values of some other property includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the related property holding the hierarchy node ID. A property holding level numbers has an integer data type. The root node of the hierarchy is at level 0.
hierarchy-parent-node-for-A property holding parent node IDs for a hierarchy structure of values of some other property includes this attribute. The value of this attribute is always the name of another property in the same type. It points to the related property holding the hierarchy node ID. For the root node of the hierarchy the parent node ID is null.
hierarchy-parent-navigation-for-A navigation property for accessing the parent entity of a node. It offers an alternative method for accessing the parent node ID, if the entity type does not have a dedicated property for that.
hierarchy-drill-state-for-A property holding the drill state of a hierarchy node includes this attribute. The drill state is indicated by one of the following values: collapsed, expanded, leaf. The value of this attribute is always the name of another property in the same type. It points to the related property holding the hierarchy node ID. For an expanded node, its children are included in the result collection. For a collapsed node, the children are included in the entity set, but they are not part of the result collection. Retrieving them requires a relaxed filter expression or a separate request filtering on the parent node ID with the ID of the collapsed node. A leaf does not have any child in the entity set.
hierarchy-node-descendant-count-for-A property holding the descendant count for a hierarchy node includes this attribute. The descendant count of a node is the number of its descendants in the hierarchy structure of the result considering only those nodes matching any specified $filter and $search. The value of this attribute is always the name of another property in the same type. It points to the related property holding the hierarchy node ID. A property holding descendant counts has an integer data type.
parameter-See table below
is-annotationfalseRepresents an instance annotation.
updatable-path-

If a property can be updated or not depending on the state of its entity, it can be annotated with this attribute. The value of this attribute is always a path expression that identifies a Boolean property in the context of the entity type. This related property indicates whether the annotated property can be updated for the containing entity or not.

Note: if used in addition to the more expressive field-control annotation, the values of the two must be in sync.

preserve-flag-for-See below
filter-for-A property whose value is a $filter expression includes this attribute. The $filter expression must be valid for the entity type specified in this attribute.

 

Attributes sap:unit and sap:precision

Amounts in a currency or absolute measures MUST be represented as simple properties with an appropriate numeric Edm type, preferably Edm.Decimal. These numeric properties SHOULD refer to a string property containing the ISO currency or unit of measure with the sap:unit attribute. They MAY refer to a numeric property containing the (non-negative) number of decimal places to be used for displaying the amount or measure with the sap:precision attribute.

Example in metadata document:

 

<Property Name="OrderedQuantity" Type="Edm.Int16"
         
sap:unit="OrderedUnit" />
<Property Name="OrderedUnit" Type="Edm.String"

          sap:semantics="unit-of-measure" />

<Property Name="Price" Type="Edm.Decimal" Precision="10" Scale="3"
         
sap:unit="Currency" sap:precision="DisplayScale" />
<Property Name="DisplayScale" Type="Edm.Byte" />

<Property Name="Currency" Type="Edm.String"

          sap:semantics="currency-code" sap:text="CurrencyText" />

<Property Name="CurrencyText" Type="Edm.String" />

 

Example in Atom entry:

 

<d:OrderedQuantity>50</d:OrderedQuantity>
<d:OrderedUnit>KGM</d:OrderedUnit>
<d:Price>86.9</d:Price>

<d:DisplayScale>2</d:DisplayScale>

<d:Currency>EUR</d:Currency>
<d:CurrencyText>Euro</d:CurrencyText>

 

Using a reference attribute instead of predefined complex types like Measure or Money with amount and unit properties allows several amounts to share the same unit. Transporting the amounts as “raw” numeric values instead of preformatted strings allows clients to format them according to device-specific settings (that may well differ from the server-side user settings) or process them on the client (if e.g. the client is Excel).

Attribute sap:field-control

Whether a property can or must contain a value may depend on the state of its entity, so it is impossible to express this up-front via metadata annotations. In these cases the "edit state" of the property can be expressed via a separate "field control" property, and the link between data properties and their field-control properties is expressed with the sap:field-control attribute.

Example in metadata document:

 

<Property Name="Street" Type="Edm.String"

          sap:field-control="Address_fc" />

<Property Name="City" Type="Edm.String"

          sap:field-control="Address_fc" />

<Property Name="Address_fc" Type="Edm.Byte"/>


The field-control property can be in the same type as shown above, or it can be in a nested complex type, or in an entity type that is associated 1:1. This allows separating field-control data from "real" data. If for example the field-control property is contained in a complex property or navigation property named fc, the attribute value is a path relative to the parent of the annotated property, e.g. sap:field-control="fc/Address".


The possible values for a field-control property are:

ValueMeaning
7Mandatory - property must contain a value
3Optional - property may contain a null value
1Read-only - property cannot be changed
0Hidden - property should not be visible on user interfaces

 

Attribute sap:semantics

The possible values in the context of a property are:

ValueMeaning
telTelephone number
tel;type=cell,workWork cellphone number; see explanation below table for more values
tel;type=faxFax number
emailEmail address
email;type=prefPreferred email address
urlWeb URL
nameFormatted text of the full name
givennameFirst name or given name of a person
middlenameMiddle name of a person
familynameLast name or family name of a person
nicknameDescriptive name given instead of or in addtion to the one marked as "name"
honorificTitle of a person (Ph.D., Dr., ...)
suffixSuffix to the name of a person
noteSupplemental information or a comment that is associated with the vCard
photoURL of a photo of a person
cityAddress: city
streetAddress: street
countryAddress: country
regionAddress: state or province
zip
Address: postal code
poboxAddress: post office box
orgOrganization name
org-unitOrganizational unit
org-roleOrganizational role
titleJob title
bdayBirth date
summaryCalendar: summary of a calendar component
descriptionCalendar: description of a calendar component, detailing the summary
categoriesCalendar: comma-separated list of categories for a calendar component
dtstartCalendar: the date and time that a calendar component starts
dtendCalendar: the date and time that a calendar component ends
durationCalendar: duration as an alternative to dtend, see xs:duration
dueCalendar: the date and time that a to-do is expected to be completed
completedCalendar: the date and time that a to-do was actually completed
priorityCalendar: the relative priority for a calendar component, 0 for undefined, 1 for highest, ... 9 for lowest
classCalendar: access classification for a calendar component
statusCalendar: overall status or confirmation for the calendar component
percent-completeCalendar: percent completion of a to-do., ranging from 0 to 100 (integer)
contactCalendar: contact information or alternatively a reference to contact information associated with the calendar component
locationCalendar: the intended venue for the activity defined by a calendar component
transpCalendar: defines whether or not an event is transparaent to busy time searches
fbtypeCalendar: free/busy time type, see [iCalendar, Section 3.2.9]
wholedayCalendar: "true" or "false, depending on whether an event is scheduled for an entire day
yearCalendar: year as string following the regex pattern (-?)YYYY(Y*) consisting of an optional minus sign for years B.C. followed by at least four digits
yearmonthCalendar: year and month as string following the regex pattern (-?)YYYY(Y*)MM consisting of an optional minus sign for years B.C. followed by at least six digits, the last two digits are a number between 01 and 12 representing the months January to December
yearmonthdayCalendar: year, month and day as string following the logical pattern (-?)YYYY(Y*)MMDD consisting of an optional minus sign for years B.C. followed by at least eight digits, where the last four digits represent the months January to December (MM) and the day of the month (DD). The string matches the regex pattern -?([1-9][0-9]{3,}|0[0-9]{3})(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01]) The regex pattern does not reflect the additional constraint for "Day-of-month Values": The day value must be no more than 30 if month is one of 04, 06, 09, or 11, no more than 28 if month is 02 and year is not divisible by 4, or is divisible by 100 but not by 400, and no more than 29 if month is 02 and year is divisible by 400, or by 4 but not by 100
fromMail: author of message, see [RFC5322, section 3.6.2]
senderMail: mailbox of agent responsible for actual transmission
toMai: comma-separated list of primary recipients, see [RFC5322, section 3.6.3]
ccMail: carbon copy, comma-separated
bccMail: blind carbon copy, comma-separated
subjectMail: topic of the message
bodyMail: message body
keywordsMail: comma-separated list of important words and phrases that might be useful for the recipient
receivedMail: DateTime the message was received
geo-lonGeolocation: longitude
geo-latGeolocation: latitude
currency-codeISO currency code
unit-of-measureUnit of measure, preferably ISO
countAggregation: the number of leaf entities that have been aggregated into the response entity (count(*) in SQL). Only valid for one property of an entity type that is annotated with sap:semantics="aggregate".
For “tel” the type values are (see [vCard, section 6.4.1]):
  • "home" to indicate a telephone number associated with a residence
  • "work" to indicate a telephone number associated with a place of work
  • “pref" to indicate a preferred-use telephone number
  • "text" to indicate a telephone number supporting text messages (SMS)
  • "voice" to indicate a voice telephone number
  • "fax" to indicate a facsimile telephone number
  • "cell" to indicate a cellular telephone number
  • "video" to indicate a video conferencing telephone number
  • "pager" to indicate a paging device telephone number
  • "textphone" to indicate a telecommunication device for people with hearing or speech difficulties
For “email” the type values are:
  • "home" to indicate an email address associated with a residence
  • "work" to indicate an email address associated with a place of work
  • “pref" to indicate a preferred-use email address
For “url” and constituents of an address the type values are:
  • "home" to indicate an address associated with a residence
  • "work" to indicate an address associated with a place of work
  • “org" to indicate an address associated with the organization
  • “pref” to indicate a preferred address “other” to indicate some other address
These type values can be specified as a value list (like "type=work,pref").

Attribute sap:filter-restriction

A property can be annotated with this attribute, if filter restrictions exist. The attribute can take the following values:
ValueMeaning
single-valueOnly a single “eq”clause is possible.
multi-valueSeveral  “eq” clauses, separated by or, are possible.
intervalAt most one “ge” and one “le” clause, separated by “and”, alternatively a single “eq” clause.

Attribute sap:aggregation-role

A property can be annotated with this attribute, if it has an aggregation role. The attribute can take the following values:
ValueMeaning
dimensionThe property represents the key of a dimension. Only valid for properties of an entity type that is annotated with sap:semantics=“aggregate“.
measureThe property represents a measure whose values will be aggregated according to the aggregating behavior of the containing entity type. Only valid for properties of an entity type that is annotated with sap:semantics=“aggregate“.
totaled-properties-listThe property value is a comma-separated list of totaled dimension property names.

Attribute sap:parameter

A property can be annotated with this attribute, if it represents a parameter. The attribute can take the following values:
ValueMeaning
mandatoryA value must be supplied for this parameter.
optional
A value for this parameter can be left out by specifying an empty string (applicable only for parameter properties of type Edm.String). A value for this parameter can be left out by specifying an empty string (applicable only for parameter properties of type Edm.String). For parameters of other types, the default value conveyed in the metadata should be assigned, if the parameter shall be omitted.

 

Attribute sap:preserve-flag-for

A property holding the preservation state for another property includes this attribute.
The preservation state is a Boolean flag indicating whether or not the value of a named entity property is protected against updates causedby side-effects of updates to the entity set.
Example:
Consider an entity set holding order items with unit price, quantity, and total amount. All three properties supports preservation, as shown here for the unit price:
<Property Name="UnitPrice" Type="Edm.Decimal"/>
<Property Name="UnitPricePreserveFlag" Type="Edm.Boolean"
          sap:preserve-flag-for="UnitPrice"/>
For a given order item, a consumer can set the preservation flag for the total amount and update the unit price. This would instruct the provider to recalculate the quantity instead of the total amount.

Element edm:NavigationProperty

Attribute NameDefault ValueMeaning
filterabletrueCan be used as a path segment for properties in $filter system query option

 

Element edm:FunctionImport

Attribute NameMeaning
action-forValue is the qualified name of an entity type in scope. Indicates that the function or action operates on instances of that entity type. The function import MUST have a required parameter for each key property of that entity type. Parameter name and type must be identical to the name and type of the corresponding key property.
applicable-pathValue is a path to a Boolean property in the entity type named in the action-for attribute. The property indicates whether the function import can be invoked for the entity. The path can be the name of a Boolean property, or the name of a complex property followed by a forward slash and the path to a Boolean property in the complex type.
labelDescription
planning-functionThis function processes or generates plan data that may be exposed by entity sets of aggregate entity types in the same service. Its logic may have side-effects on these entity sets.
Example: a function import that allows approving a leave request. The LeaveRequest entity type has a single key property ID and a complex property ControlData with a Boolean property NeedsApproval that controls the applicability of two alternative actions, approval and rejection:

    <FunctionImport Name="LeaveRequestApproval"

                    ReturnType="ThisModel.ApprovalResult"

                    m:HttpMethod="POST"
                   
sap:label="Approve"      
                    sap:action-for="ThisModel.LeaveRequest"
                    sap:applicable-path="ControlData/NeedsApproval"
>

      <Parameter Name="ID" Type="Edm.Guid" Mode="In" />

    </FunctionImport>


    <FunctionImport Name="LeaveRequestRejection"
                    ReturnType="ThisModel.ApprovalResult"

                    m:HttpMethod="POST"

                    sap:label="Reject"
                    sap:action-for="ThisModel.LeaveRequest"
                    sap:applicable-path="ControlData/NeedsApproval"
>

      <Parameter Name="ID" Type="Edm.Guid" Mode="In" />

      <Parameter Name="Reason" Type="Edm.String" Mode="In" />

    </FunctionImport>

A function import can optionally include an annotation with an sap:value-constraint element.

Element sap:value-constraint

This element describes a dependency of function import parameters to key properties of an entity set, comparable to a referential constraint.
Example: For a function import with two parameters for country and region, the possible arguments can be determined via some Regions entity set.

    <sap:value-constraint set="Regions">

          <sap:parameter-ref name="Country"/>

          <sap:parameter-ref name="Region"/>

    </sap:value-constraint>

 

It has a set attribute that identifies the entity set containing the list of allowed parameter value combinations.

 

Nested sap:parameter-ref elements link the function import parameters specified with the name attribute to a key property of the entity type of the specified entity set. The sequence of sap:parameter-ref elements matches the sequence of the edm:PropertyRef elements of the Key element.

 

Element edm:Parameter

Attribute NameMeaning
labelDescription

Element edm:AssociationSet

Attribute NameDefault ValueMeaning
creatabletrueRelations can be created
updatabletrueRelations can be changed
deletabletrueRelations can be deleted

Instance Annotations

An annotation of an element in the OData metadata document adds information at the structural level of the service. Sometimes extra pieces of information are needed in the OData response for individual entities and their properties. To distinguish these two cases the former are called metadata annotations, while annotations of the entities in the OData response are called instance annotations.
Metadata annotations add information to the model structure. They are fully described by adding the appropriate AnnotationElement or AnnotationAttribute to a model element.
For instance annotations, this is different, because it must be possible to add different annotation values for every entity or every entity property, respectively. Therefore, if instance annotations are relevant for instances of some entity type, the structure of the entity type gets extended by properties specifically added for the purpose of holding annotation values in the result entities. These extra properties are also annotated with sap:is-annotation=”true” to identify them as
annotation holders and separate them from the other properties of the entity type.
A single entity can have multiple instance annotations, for each of which an extra property gets added to the underlying type:
  • Zero or more for the entity itself.
  • Zero or more for every property contained in the entity.
Properties representing instance annotations are always introduced by AnnotationAttributes in the metadata document. The following sections describe the possible occurrences.
Example:
<Property Name="Street" Type="Edm.String" Nullable="true"
          sap:field-control="Address_FC"/>
<Property Name="City" Type="Edm.String" Nullable="true"
          sap:field-control="Address_FC"/>
<Property Name="Address_FC" Type="Edm.Byte" Nullable="true"
          sap:is-annotation="true"/>

Query Option search

Modern user interfaces typically feature a search box for entering a free-text search term, and how exactly this search term is used to find "matching" things is up to the application. The custom query option search is intended exactly for passing such a free-text search term to the backend and let the backend decide against which properties of each entity in the entity set the term is matched, and how. It may also be matched against properties of related entities, e.g.
    GET ~/Orders?search=blue
to find all orders with items that refer to a blue product. Service implementations using SAP NetWeaver Gateway OData Channel will receive the search term in the parameter IV_SEARCH_STRING of method GET_ENTITYSET, see http://help.sap.com/saphelp_gateway20sp06/helpdata/en/7b/7ea4676342455c99072ce8815f799d/frameset.htm for details.
Note that search works similar to $filter: it will return a subset of the entities that are returned when no search term is specified. And it combines with $filter, returning only entities that fulfill both conditions.

Soft State Active But Disabled

$
0
0

Use NW gateway 740.

I configurate soft-state.It is active but disable.

When I connect to application create session after than navigate another page , create another session.

So Data get incorrect.

 

How can configure this?

Problems with multi-origin in SAP NetWeaver 740 SP13 ... and how to solve them

$
0
0

Today I came accross a problem that can occur if you use the multi origin feature of SAP Gateway and if you have upgraded to SAP NetWeaver 740 SP13.

 

Strictly speaking it would also occur if you have upgraded solely the software component SAP_GWFND to the Support Package Level SAPK-74013INSAPGWFND.

 

A request such as /sap/opu/odata/sap/gbapp_poapproval;mo/WorkflowTaskCollection in this case does not return any data.

 

On the other hand $count would still return a result when running the following request in the SAP Gateway Client /sap/opu/odata/sap/gbapp_poapproval;mo/WorkflowTaskCollection/$count.


As a result of this strange behavior SAP Fiori applications such as the MyInbox would not work correctly.

 

Fortunately there is a solution .

 

Simply apply SAP Note 2250491 - OData request does not return entity set data in case of multi-origin composition to your system.

 

Best regards,

Andre


Another 'How do I lock resource with Gateway' Question - and SAP UX roadmap 2015Q3

$
0
0

Hi Experts,

 

So far, based on various discussions/blogs in SCN, it looks like future direction application development is going to be sap Fiori UX (i.e. gateway/UI5 combo).

 

So what is going to happen to state-full application development in the future ?

I am not sure if this means we have to ditch state-full application development or Gatway/UI5 is going to support State-full application development.

What is going to be the direction for complex standard SAP applications that requires pessimistic locking ? will SAP use fiori or FPM ?

Every time I see discussions about concurrency control with Gateway/UI5 - only answer seems to be convincing customers to use optimistic locking or tricking soft state to make application state-full.

 

I did notice this slide in SAP UX roadmap 2015Q3

  • SAPUI5
    • Creation of consumer-grade, stateless apps
  • Floorplan Manager / Web Dynpro ABAP
    • Creation of functional, stateful apps

 

Meanwhile Fiori floor plans have details on how to display locked records.

https://experience.sap.com/fiori-design/floorplans/edit-with-subpages/

(look for pessimistic locking at the bottom of the page). This is really confusing.

 

So My question is

For complex state-full applications that requires locking, should I still stick with Floor Plan Manager ?

Or is there a new feature or option coming in the future to support complex state-full application in sap Fiori (i.e. gateway/ui5)?

Is there any SAP document that gives clear distinctions for these kind of UX decisions (specifically for developers) ?

 

Thanks

Austin

How to show file name when calling GET_STREAM

$
0
0

This document is about how to enhancement our OData service  - Download File.


Currently base on training material, we usually redefine GET_STREAM method and pass mime type and stream value to the result.

ls_stream-mime_type = output-return-MIME_TYPE .
ls_stream
-value= output-return-DOCUMENT_STREAM .
copy_data_to_ref
( EXPORTING is_data = ls_stream
CHANGING  cr_data = er_stream ).

This works, however the problem is if you trigger the service in Chrome. You can only get a document with named ‘entity’.

 

1.png

Problem

  • What if customer has already stored file name in ECM or in Database? They want to see the real name.
  • What if customer don't want to direct download, they may want to review the file before download.

Solution

Solution to this is to set a header to http framework. I attached code below.

DATA ls_lheader TYPE ihttpnvp.
"DATA lv_filename TYPE string.
"lv_filename = escape( val = lv_filename format = cl_abap_format=>e_url ).
ls_lheader
-name = 'Content-Disposition'.
ls_lheader
-value= 'outline; filename="Mobile.pdf";'.
set_header
( is_header = ls_lheader ).

ls_stream
-mime_type = output-return-MIME_TYPE .
ls_stream
-value = output-return-DOCUMENT_STREAM .
copy_data_to_ref
( EXPORTING is_data = ls_stream
CHANGING  cr_data = er_stream ).

Let’s test the result now:

2.PNG

If customer want to preview the document instead of directly download, please change code as below.

ls_lheader-value= 'inline; filename="Mobile.pdf";'.

Let’s test the result:

A new page was opened for preview, you can right click and choose to save. File name ‘Mobile.pdf’ comes up.

3.PNG

A problem on the implementation of DPC_EXT.(GET_ENTITY Method) Resource not found for segment 'PROJE'

$
0
0

Hello all,

 

I have problem with GET_ENTITY Method. When I wrote code on ABAP for my method GET_ENTITYSET there is no problem I can get data for my entityset but for single entity I failed.

 

I wrote this code on GET_ENTITY method :

 

DATA : lt_proj TYPE STANDARD TABLE OF proj,             ls_proj TYPE                   proj,             ls_key_tab   TYPE /iwbep/s_mgw_name_value_pair,             lv_pspid   TYPE proj-pspid.      READ TABLE it_key_tab WITH KEY name = 'PspID' INTO ls_key_tab.       lv_pspid = ls_key_tab-value. SELECT SINGLE * FROM proj INTO ls_proj WHERE pspid = lv_pspid.        MOVE-CORRESPONDING ls_proj TO er_entity.

But I have an error like this:


<errordetail>

 

<code>/IWBEP/CX_MGW_BUSI_EXCEPTION</code>

 

<message>Resource not found for segment 'PROJE'</message>

<propertyref/>

<severity>error</severity>

<target/>

</errordetail>



Could you please help me for get data for GET_ENTITY method.


Thank you,

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

Deep Entity Throwing an Error "No Create Entity implemented"

$
0
0

Hi,

 

I have created a Relation between two entities to implement Deep Entity method as below.

 

Header Structure with Navigation

 

Model Header.png

 

Item Structure with navigation:

Model Item.png

 

Redefined Deep Entity and written below code :

 

TYPES: ty_t_mmitem TYPE STANDARD TABLE OF zcl_ztest_coolpit_mpc=>ts_model_mod_item   WITH DEFAULT KEY.

 

     TYPES: BEGIN OF ty_mod_modify.

             INCLUDE TYPE zcl_ztest_coolpit_mpc=>ts_model_mod_header.

     TYPES: model_mod_itemSet TYPE ty_t_mmitem,

            END OF ty_mod_modify.


     TYPES: cx_mgw_busi_exception TYPE REF TO /iwbep/cx_mgw_busi_exception.

     DATA: ls_mmitem         TYPE ty_mod_modify,

           ls_mitem          TYPE zcl_ztest_coolpit_mpc=>ts_model_mod_item,

           lv_compare_result TYPE

          /iwbep/if_mgw_odata_expand=>ty_e_compare_result.

 

     CONSTANTS: lc_items TYPE string VALUE 'Model_Mod_ItemSet'.

 

     lv_compare_result = io_expand->compare_to( lc_items ).

 

* Upon match, access data from IO_DATA_PROVIDER

     IF lv_compare_result EQ /iwbep/if_mgw_odata_expand=>gcs_compare_result-match_equals.

       io_data_provider->read_entry_data( IMPORTING es_data = ls_mmitem ).

 

     ENDIF.

 

 

Error while tested in Gateway Client:

 

Create Entity method is not implemented:

 

Payload tried for Reference.

 

 

<?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:Matnr>1758848</d:Matnr>

</m:properties>

</atom:content>

<atom:link

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

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

title="ZTEST_COOLPIT_SRV.Model_Mod_ItemSet">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

   <d:Matnr>1758848</d:Matnr>

   <d:Matkl>13</d:Matkl>

   <d:Attyp>01</d:Attyp>

   <d:Char_prof>PCCOLOR</d:Char_prof>

   <d:Makt_FR>TEST</d:Makt_FR>

   <d:Makt_EN>TEST CIF APO</d:Makt_EN>

   <d:Brand>ADID</d:Brand>

   <d:For_Range>Z002</d:For_Range>

   <d:TargClient/>

   <d:Zdsm>000000009900000106</d:Zdsm>

   <d:Zbegindate>43.2015</d:Zbegindate>

   <d:Zenddate>51.2015</d:Zenddate>

   <d:Maabc> </d:Maabc>

   <d:Zcomment>TEST SHAIK 1</d:Zcomment>

   <d:Zpc_Model>PCCOLOR</d:Zpc_Model>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

   <d:Matnr>1758848</d:Matnr>

   <d:Matkl>13</d:Matkl>

   <d:Attyp>01</d:Attyp>

   <d:Char_prof>PCCOLOR</d:Char_prof>

   <d:Makt_FR>TEST</d:Makt_FR>

   <d:Makt_EN>TEST CIF APO</d:Makt_EN>

   <d:Brand>ADID</d:Brand>

   <d:For_Range>Z002</d:For_Range>

   <d:TargClient/>

   <d:Zdsm>000000009900000106</d:Zdsm>

   <d:Zbegindate>43.2015</d:Zbegindate>

   <d:Zenddate>51.2015</d:Zenddate>

   <d:Maabc> </d:Maabc>

   <d:Zcomment>TEST SHAIK 1</d:Zcomment>

   <d:Zpc_Model>PCCOLOR</d:Zpc_Model>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

</atom:entry>

 

Thanks

Shaik

[Urgent]Issue with passing xml as input to OData service - Malformed URI literal syntax

$
0
0

Dear Experts,

 

I have developed an OData service in my Gateway system. I have created a function import in the service.

 

I have a requirement to pass xml as data to import parameter of this function import.

Below is my xml data which i am passing to import parameter i_xml_value

 

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

<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">

     <asx:values>

          <DATA SEMANTIC_OBJECT="Recommendation-maintainScenario&amp;/Scenarios/SAP_CROSS_SELL_WEB_CHECKOUT "                         COMPLETE_URL="">

          </DATA>

     </asx:values>

</asx:abap>

 

Below is the complete call

 

/sap/opu/odata/sap/MyServiceName/MyFunctionImportName?I_XML_VALUE='

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

<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><DATA SEMANTIC_OBJECT="Recommendation-maintainScenario&amp;/Scenarios/SAP_CROSS_SELL_WEB_CHECKOUT " COMPLETE_URL=""></DATA></asx:values></asx:abap>

'

 

I am getting repose as "Malformed URI literal syntax" (please find attachment), Could you please guide me about how can i send xml as input value to my service function import.

 

Help is much appreciated.

 

Thanks,

Anurag.

Resource not found for the segment

$
0
0

Hi
In Gateway, I want to get header and item data of my PO from ERP, on behalf of the PO number.

In transaction /IWFND/GW_CLIENT I execute the http method GET for

 

/sap/opu/odata/sap/ZGW_BD_PURCH_SRV/

 

and
/sap/opu/odata/sap/ZGW_BD_PURCH_SRV/$metadata

 

I got a http status 200 return – which is fine 


In the ERP that I am calling, there is a purchase order with no. '3000000006'

But when I execute the service for following url: /sap/opu/odata/sap/ZGW_BD_PURCH_SRV/PurchaseOrderCollection('3000000006')

 

But I got this error:

 

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

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

<code>005056A509B11ED199D891D139C92103</code>

<message xml:lang="en">Resource not found for the segment 'PurchaseOrderCollection('3000000006')'.</message>

</error>

 

My settings are like this:
Entity types is created:
PurchaseOrders (PoNumber is key) + PurchaseOrdersItems (PoNumber+PoItem are keys)

EntityTypes_PurchaseOrders_Properties.png

EntityTypes_PurchaseOrdersItems_Properties.png

 

 

Entity Sets is created:
PurchaseOrderCollection (assigned to PurchaseOrders) + Purchaseorderitem (assigned to PurchaseOrdersItems)

In the Service Implementation the PurchaseOrderCollection has following mappings:
ServiceImple_mapping_purchaseOrderCollection_GetEntityRead.png

ServiceImple_mapping_purchaseOrderCollection_GetEntityQuery.png

And for Purchaseorderitem I have following mappings:

ServiceImple_mapping_purchaseOrderItem_GetEntityQuery.png

The only BAPI that we are using is: BAPI_PO_GETITEMS

 

Any ideas?

 

Thanks,


how to create Annotations in odata

$
0
0

how to create annotation in o data ?? can any one explane  with screen short ???

help full answare will be rewarded..

RABAX_STATE error with Odata ?$format=JSON

$
0
0

Hello,

 

I get this error HTTP/500/E/Internal Server Error  RABAX_STATE

when i try calling my oData in format=JSON

 

here are a screenshot of the error i get

RABAX_state.PNG

 

But when i tried with XML format in end its working !!

/sap/opu/odata/sap/ZDEMO_READ_IMAGE_SRV/EmployeeDataSet/?$format=XML

 

Is it a problem with the reimplementation of the methods

EPMPRODUCTSET_GET_ENTITY , EPMPRODUCTSET_GET_ENTITYSET

 

Or Authorization ?


Thanks

Backend ODATA channel missing

$
0
0

Hi,

 

I have installed all the required components for the SAP Netweaver Gateway 2.0 on Solution Manager systme in my landscape. Now as per the process  i need to go to:  In transaction SPRO open the SAP Reference IMG and navigate to: SAP NetWeaver -> Gateway Service Enablement -> and search for  "Backend OData Channel ", but there I can not see anything like that.... Do I need to install anything more??

 

NW.JPG

 

Please suggest....

Error on registering a service on SEGW - Function module "/IWFND/FM_ACTIVATE_SERVICE" not found.

$
0
0

Hi folks,

 

I am facing a problem trying to register a service on SEGW. I appreciate very much any kind of help.

 

I have an ABAP server for Netweaver Gateway (dgw.multipla.local - 00 - DGW) and another ABAP server (192.168.1.214 - 00 - DVR), that is the SAP ERP.

 

So I have a RFC function in my ERP server: ZCO_FIORI_RESULTS_OBRA

 

So I did the configurations of this guide: Step-by-step guide to build an OData Service based on RFCs – Part 1

 

But I still facing error messages as you can see :

 

Capturar.PNG

If you click on button Register:

 

Capturar.PNG

So, those are the error messages:

Capturar.PNG

Gateway implementation question

$
0
0

I am aware of Gateway use case around implementing Fiori however one of our customers simply webservice communication. At the moment their E-commerce portal talks to CRM via a webservice. They want to understand how SAP Gateway can simply the current process.

 

Can anyone point me to standard presentation or documentation of use cases around Gateway. Bear in mind though there are no need for multiple UI elements like Fiori. Please advise.

 

Regards

Kalyan

Viewing all 2823 articles
Browse latest View live


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