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

ABAP field name 'ITM_NUMBER' is not unique

$
0
0

Hello guys,

   

       Recently I had been creating a ODATA Service using standard bapi  i.e BAPI_SALESORDER_CREATEFROMDAT2 ..

and currently creating the data model via 'Import via RFC/BOR' ..

since I want to have two fields referencing same 'abap field' i.e 'ITM_NUMBER' in this case... but I am facing error .. it says

ABAP field name 'ITM_NUMBER' is not unique.

I have attached the error snapshot for clear idea..

1. Pic from properties section..

pic 1.JPG

 

2.Error

pic 2.JPG

a quick reply will be great..

 

Hearty Thanks for read.

 

Regards,

Pavan Golesar


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

"Wrong format of delivery address:" and "OData Client - notification to - - failed - HTTP" when sending Push Notifications via SAP Backend

$
0
0

Hi experts,

 

Recently I am trying out SMP Push Notifications using this documentation http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40ab6d83-b7b8-3010-65bc-d7a08f0f35f3?overridelayout=true

 

I believe many of the configurations is done. So I decided to try out the SAP Standard Demo Flight Service "RMTSAMPLEFLIGHT" starting page 14 in the document .

 

I did all the tasks from running SubscriptionCollections via rest client to running the sample standard program /IWBEP/R_MGW_PUSH_TEST in the program the sending was apparently successful but when I checked tcode SLG1 for the log I got these messages

 

 

I am not sure what these messages mean but in the case of the delivery address I am not sure why the format is incorrect. Since i tried both format specified in page 15 of the document:

  • urn:sap-com:channel :<RFC destination>:<request URI>
  • http(s)://<host>:<port>/..

 

Here are the records in table /IWBEP/D_MGW_SUB

 

 

 

 

 

I would like to hear from all of you soon


Regards

Issue with Data Model created

$
0
0

Hi Techies,

  Issue is "what should be name of navigation property, sales order items entityset".?????    Below is the snap of my structure of service...

ANY SUGGESTION AND CORRECTION WILL BE HELPFUL...

 

Please correct me wherever Its Needed...

fused1.JPG

Keeping in mind that I have implemented GET_EXPANDED_ENTITY,CRETE_DEEP_ENTITY.

ALSO GET_ENTITY ,GET ENTITYSET FOR BOTH (SALES ORDER HEADER AND ITEM).

 

 

METHOD /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY.  TYPES: TY_T_SOITEM TYPE STANDARD TABLE OF ZCL_ZSO_ALL_MPC_EXT=>TS_SALESORDERITEM WITH DEFAULT KEY,         TY_T_SCH TYPE STANDARD TABLE OF ZCL_ZSO_ALL_MPC_ext=>TS_SCHEDULE WITH DEFAULT KEY.
* REPRESENTS FULL SALES ORDER STRUCTURE - HEADER WITH ONE OF MORE ITEMS   TYPES: BEGIN OF TY_S_SO.            INCLUDE TYPE ZCL_ZSO_ALL_MPC_EXT=>TS_SALESORDER.            TYPES: SalesOrderItem TYPE TY_T_SOITEM.            TYPES: ScheduleLine   type TY_T_SCH,          END OF TY_S_SO.

 

 

 

BEST REGARDS,

PAVAN G

Issue with X509 single sign on (SSO) regarding ODATA Gateway Service, Visual Studio 2012 GWM Trial

$
0
0

Hello everbody!

 

We’ve started a project with SAP ODATA Gateway Service and Visual Studio 2012 with GWM Trial add-in. What we want to achieve is single sign on (SSO) using a X509 certificate.

The configuration on the SAP side seems to be ok, since we can open the specific ODATA service within a browser and I see my entityset data. From my perspective that also means that my client certificate matches the corresponding certificate on the SAP side.

 

But it doesn’t work from my c# project! We get an exception:

  1. SAP.IW.GWPAM.SSO.SSOException: The system cannot find the X509 user certificate

   bei SAP.IW.SSO.X509CertificateUtil.GetUserCertificate(String[] issuers)

 

I’ve set the keys in the app.config

<addkey="SSO" value="X509" />

<addkey="RootCASubjectName" value="CN = etc., DC = etc, DC = etc."/>

 

I copy and paste the string value for the RootCASubjectName key directly from certificate property and not only the issuer but also the subject name property. I did this for all nodes in the certificate path.

But still no success. So I got no ideas anymore. Does anybody have experience with this topic? I would gratefully appreciate any slightest hints.

 

Thanks in advance

 

Miles

SEGW - Import RFC (1 input parameter and return tables value)

$
0
0

Dear All,

 

I know the step to create SEGW project by importing RFC/BOR interface.

I try to import a FM which require 1 input parameter and return as tables value.

Import RFC .JPG

ORDER_NUMBER = input parameter

ES_ORDERNUMBER = return single structure

ET_COMPN_HIS[] = return table

 

EntitySet.JPG

EtCompnHisSet field = ET_COMPN_HIS[]

HistorySet field = ORDER_NUMBER + ES_ORDERNUMBER


 

When i execute the following URL in /iwfnd/gw_client/

/sap/opu/odata/SAP/ZTEST5_SRV/HistorySet(OrderNumber='1231238')  = respond status (OK)

/sap/opu/odata/SAP/ZTEST5_SRV/EtCompnHisSet(OrderNumber='1231238')  = respond status (Bad Request)

bad request.JPG

I suspect the error showing that the OrderNumber is not exist in EtCompnHisSet.

 

But my problem is I need to input OrderNumber as input and return EtCompnHisSet.


May i know how to achieve this?

 

Regards

Marcus

Virus check for ODATA services

$
0
0

Hello All,

 

Could you help me ,How to activate virus check for particular Odata service in Netweaver Gateway.

 

Issue:

 

I have RFC's defined in CRM system. I am trying to create ODATA service in Gateway and call the RFC.

 

In the RFC, We have written the logic for uploading the files.So we need to Scan the docs before uploaded into server.

 

Thanks.

Why SMP Server automatically stopped for a Sometime.

$
0
0

We have SMP 2.3.5 cluster environment with one data tier and two application nodes. In last two days server stopped two times for sometime and automatically started.we are not able to find out the root cause of it , can somebody suggest why it is happening.

Any help would be greatly appreciated.

 

Please find the Error which we found in the server logs:-

 

Thread-59 [com.sybase.djc.server.PartitionLock:default] [] [] Lease was not retained. Server will restart since loss of the lease is a non-recoverable condition.      

Thread-39686 [com.sybase.sup.server.Console] [] [] Stopping server...

 

 

Thread-11 [com.sybase.sup.server.Console] [] [] HTTP Listeners: http://MCCMRKSMPP02:8000,https://MCCMRKSMPP02:8001,http://MCCMRKSMPP02:5001

Thread-11 [com.sybase.sup.server.Console] [] [] IIOP Listeners: iiop://MCCMRKSMPP02:2000,iiops://MCCMRKSMPP02:2001906

Thread-11 [com.sybase.sup.server.Console] [] [] Starting services...


com.sybase.sup.server.Console] [] [] HTTP Listeners: http://MCCMRKSMPP02:8000,https://MCCMRKSMPP02:8001,http://MCCMRKSMPP02:5001

2015-07-09 03:35:01.894 CONSOLE MMS 

Thread-11 [com.sybase.sup.server.Console] [] [] IIOP Listeners: iiop://MCCMRKSMPP02:2000, iiops://MCCMRKSMPP02:2001

 

 

Thread-11 [com.sybase.djc.server.ApplicationServer:mccmrksmpp02] [] [] Cluster ID: 10.239.38.149:1

Thread-11 [com.sybase.djc.server.ApplicationServer:mccmrksmpp02] [] [] Java Startup Options:

Thread-11 [com.sybase.djc.server.ServiceComponent:ConnectorWorkManager] [] [] Starting

Thread-11 [com.sybase.djc.server.ServiceComponent:ConnectorWorkManager] [] [] Started

Thread-11 [com.sybase.djc.server.ServiceComponent:JaguarServer] [] [] Component com.sybase.jaguar.server.JaguarServer

Thread-11 [com.sybase.djc.server.ServiceComponent:JaguarServer] [] [] Starting

Thread-11 [com.sybase.djc.server.ServiceComponent:JaguarServer] [] [] Started

Thread-11 [com.sybase.djc.server.ServiceComponent:StartHandler] [] [] Component com.sybase.djc.mobilink.StartHandler

Thread-11 [com.sybase.sup.server.Console] [] [] Server Started

 

 

Thanks & Regards,

Jyoti Sahu


GW Redefine - Queries

$
0
0

Hi Team,

 

Few queries in GW service redefintion

 

  • Addition filed in GW
    • Is that mandatory to redefine the opertaion methods to populate the value for New fields added in Entity Type(with DDIC structure reference). For populating the value need to redefine the methods in DPC_EXT and copy the existing code and append one line. Is there a way to achieve without the redefine process
  • Changing Function Module for an Entity Type
    • As mentionded in the previous point, need to redefine the method and change the function module name. Is there a way to do the Mapping in Service implementation

 

Regards,

Satish

Automatic "GET" calls after "CREATE" - how to avoid this?

$
0
0

In my FIORI application, we are calling the oData service to CREATE a new entry in the backend, like in the below code. But after successful "CREATE" I can see through the F12 Network tab in Chrome, that a "GET" call is happening automatically. How can this be stopped? We want to avoid this "GET" call to backend.

 

var CallHistoryModel=this.getView().getModel(),context="",flag="no",passResponse="";

  CallHistoryModel.create("/CallHistorySet",oCallHistory,null,

  function success(oData,Response){

  passResponse=Response;

  CONSTANT.attendees=oData;

  flag="yes";

  context="CallHistorySet(Activityid='"+oData.Activityid+"',Accountid='"+oData.Accountid+"',Employid='"+oData.Employid+"')";

  },

SEGW Error when testing gateway client

$
0
0

Hi ,

 

i have create a odata service in t-code segw  , when we test the odata service or click on the Gateway Client the error comes .

error = http receiving fail .

http receving failed in T-CODE SEGW

$
0
0

hi ,

 

while executing the odata service using segw , after that clicking on gateway client and then press execute button. System is showing following error .

 

 

 

error.png

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?

http receving failed in T-CODE SEGW

$
0
0

hi ,

 

while executing the odata service using segw , after that clicking on gateway client and then press execute button. System is showing following error .

 

 

 

error.png

SAP Netweaver Gateway Project/Entity/Service with Offline Data

$
0
0

Hello,

 

I have some doubdts about Odata Services when we need to use Offline Data in the device.

 

It´s possible to have an individual project for each Service (several metadatas) that we have to create to get que offline app working?  or we have to use an individual Project for N services with a unique metadata for serveral services.

 

Which is the best practice for generate a new version of an Odata for future maintenance? For example if we have to extend a field in a RFC is prefered to have a new version of the service? or create a new project to have totally independent all changes.

 

Is recomended to have only one project with several services/metadatas for each application development? (for example a Sales app where we have customers, materials, prices, stock, open items, etc.).

 

For now we have each service with an individual project but we are not sure if this can be like that.

Service1:

Projecto GW: ZPRO5

URI Request: /sap/opu/odata/SAP/ZPRO5_SRV/?$format=xml

EntitySet: CodigosSet

URL de consumo con parametros de entrada: http://<ServerIP>:<Port>/sap/opu/odata/SAP/ZPRO5_SRV/CodigosSet/?$filter=UsuarioIn%20eq%27VESCOBAR%27&$format=json

 

Servicio 2:

Proyecto GW: ZPRO_FERIADOS

URI Request: /sap/opu/odata/SAP/ZPRO_FERIADOS_SRV/?$format=xml

EntitySet: FeriadoSet

URL de consumo con parametros de entrada: http://<ServerIP>:<Port>/sap/opu/odata/SAP/ZPRO_FERIADOS_SRV/FeriadoSet/?$filter=YearF%20eq%272015%27%20and%20Ident%20eq%27CL%27&$format=json

 

Servicio 3:

Proyecto GW: ZGWFI_R_BANCOS

URI Request: /sap/opu/odata/SAP/ZGWFI_R_BANCOS_SRV/?$format=xml

EntitySet: BancosSet

URL de consumo con parametros de entrada: http://<ServerIP>:<Port>/sap/opu/odata/SAP/ZGWFI_R_BANCOS_SRV/bancosSet/?$format=json

 

Any help to clarify this concepts is welcome.Thanks.


Required Bapi Info

$
0
0

Hi experts,

I am currently working on Odata services and need to know the working BAPI's for the below business process in SAP...

Any kind of help will be appreiciated....

I had also check the standard list of  bapi's from here

list required.JPG

 

regards,

Pavan

Erroneous JSON-Timestamps?

$
0
0

Dear fellow developers,

 

I developed an OData service which contains entity types with Edm.DateTime properties. Using that service I receive erroneous results for timestamps when requesting JSON responses, which differ from the result received when requesting XML.

 

Did anyone of you ever experience that?

 

Example request:

..._SRV/MaintenanceNotifications?$filter=ChangeTimestamp ge datetime'2015-07-10T09:00:00'

 

XML response:

...<d:ChangeTimesamp>2015-07-14T09:22:48</(d:ChangeTimesamp>

 

JSON response (request sent with header Accept = application/json):

..."ChangeTimestamp" : "\/Date(1436865768000)\/"...

 

The timestamp from the JSON response corresponds to 2015-07-14 at 11:22:48, which is 2 hours aheadof the value in the XML response.

 

2 hours is also the time zone difference between UTC and CET summertime. System time zone and user time zone are both set to CET.

However, that should not make a difference, as XML responses are already correct?!

 

The System is on NetWeaver 7.4 with SAP_GWFND 740 SP 8.

 

Thank you for any helpful hints,

best regards,

 

Ringo

 

Message was edited by: Ringo Liebscher - added missing example request and responses.

SEGW - Create transport request entry for whole project

Extend oData Services for My Travel & Expenses Fiori App - Part 1

$
0
0

1 Business Requirement - Why we need to extend standard app ?

The fields delivered in standard SAP Fiori app for "My Travel & Expenses" does not suffice the business needs.

  1. Changes required
    1. Document No required as input on screen so that user can enter original receipt no to it and save the same
    2. No of Employee is required for meal expenses so that user can enter no of employee attending the business dinner/lunch outing. Adding names of each employee is difficult job. And when you have around 150 attendees then it's kind of waste of effort.
    3. %Lobby is also needed on the screen for input
    4. Per diem region has to be hidden, it's no longer required

1.1 Extend Fiori App "My Travel and Expenses"

Current Situation

Target Situation

1. Document no. is not available in the standard screen of expenses types in My Travel & Expenses of SAP FioriExtend1.png

Extend2.jpg

2. No. of Employees is not available in the standard screen of
    My Travel & Expenses in SAP Fiori

Extend3.jpg

Extend4.jpg

3. Lobby % is not available in the standard screen of
    My Travel & Expenses in SAP FioriExtend5.jpg

Extend6.jpg

4. Per Diem Region is not required as per the business requirement

Can be handled by UI Extensibility no OData extension is required for hiding Per Diem Region

Extend7.jpg

2 Fiori app extension has two part

2.1 Extending front-end of Fiori App (UI Extensibility)

  1. Screen and section to which field has to be added is identified and extended.
  2. Entity name which will be used to map data to new fields is also identified

 

2.2 Extending oData service on backend system

Front end developers confirm the entities which has to be extended and also the respective new custom field names.

 

For this scenario entity name provided by frontend developer is "EXPENSES"

Fields to be added are “DocumentNo”, “NoOfEmployees” & “LobbyPercentage

 

2.2.1 oData service is extended using below step

  1. Identify the oData service name for standard app
  2. Identify the corresponding ABAP DDIC structures for entities to be extended
  3. Create custom gateway project & Redefine the standard oData service
  4. Add custom field to entities confirmed for extension
  5. Implement BADI for fetching and manipulating new Data
  6. Regenerate & Register the new service

3 Identify oData Service name of standard Fiori app

 

  1. Go To Fiori Reference App Library
  2. Search for My Travel & Expenses App (Direct Link for My Travel & Expenses Fiori App)
  3. Click on tab "Implementation Information"
  4. Navigate to Configuration
  5. Check for oData service name

Extend8.jpg

 

PAOC_TRV_SRV is oData service for "My Travel & Expenses" Fiori App

 

Note:This information can also be provided by front end developers, they can locate it in Controller section of fiori app .

4 Extend corresponding ABAP structure

Entity name confirmed for this requiremnt is "Expense" and fields to be added are:

  1. “DocumentNo” (type=edm.String; MaxLength=20 ; )
  2. “NoOfEmployees” (type=edm.Decimal; MaxLength=3 ; )
  3. “LobbyPercentage” (type=edm.Decimal; MaxLength=3 ; )


4.1 Identify the corresponding abap structure

  1. Go to transaction "SEGW"
  2. Click on open project
    Extend9.jpg

  3. Enter the project name and execute (In general if we remove _SRV from technical service or oData servive then we will get name of standard gateway project or you can do search like PAOC_TRV* after removing _SRV  from oData service name)
    Extend10.jpg
  4. Navigate to Data Model->Entity Types and get structure name for EXPENSE entity
    Extend11.jpg

 

4.2 Add custom field to identified structure

 

  1. Go to transaction "SE11"
  2. Enter structure name and click on display
    Extend12.jpg
  3. Click on Append Structure
    Extend14.jpg
  4. Click on create append
    Extend15.jpg
  5. Enter name of new append structure and hit enter
    Extend16.jpg
  6. Add field to new structure and activate
    Extend17.jpg.png
  7. Now new fields are added to standard structure

Extend18.jpg

5 Redefine oData Service

  1. Go to transaction "SEWG"
  2. Click on Create Project
    Extend19.png
  3. Enter Project Name, Description and Package Name. Then hit enter
    Extend20.png
  4. Right Click on Data Model and select Redefine -> oData Service
    Extend21.png
  5. Enter standard oData Service name "PAOC_TRV_SRV" then hit enter
    Extend22.png
  6. Now all the Standard project objects are copied to custom project and new Z*  runtime artifacts are created
    Extend23.png




6 Add custom field to Entity Types

  1. Navigate to Data Model -> Entity Types -> Expense . Double click on Properties
    Extend24.png
  2. Click on Append Row
    Extend25.png
  3. Blank row will added to bottom please enter Property Name ( e.g "DocumentNumber" )

Extend26.png

    1. Select Edm Core Type ( You can type in Edm.String or select from F4 help ) 
      Extend27.png
    2. Check for the operation needed on this field, refer screen shot in step 6.3 . For e.g. Creatable, Updatable, Sortable, Nullable

    3. You can enter label for this field click on Label Help ( marked as red box 1 in step 6.3 )
      Extend28.png
    4. Select reference ABAP field . CLick on corresponding ABAP field blank space and press F4
      Extend29.png
    5. Save the changes

 

  1. Similarly add other fields NoOfEmployee, PercentLobby and save the changes to project

  2. Now select Project name and Generate Runtime Objects
    Extend30.png



7 Find & Implement BADI for My Travel and Expenses App

  Refer  Section 3. there we can find details about extesniblity in extensibility node, and also link to
"My Travel & Expenses" Extensibilty HelpIn this help page you can find the name of BADI.
  Extend31.png

  1. Go to transaction "SE18" and open the BADI PAOC_MY_TRAVEL_EXPENSES_BADI in display mode
    2015-08-05_14h04_48.png
  2. Copy the Enhancement Spot Name and Go to "SE19" .
    Create implementation for Enhancement Spot PAOC_MY_TRAVEL_EXPENSES
    2015-08-05_14h07_49.png
  3. Enter Implementation Name , Description and hit enter
    2015-08-05_14h10_41.png
  4. Enter Implementation name, implementing Class Name , Select BAdI and hit enter
    2015-08-05_14h12_32.png
  5. Select Create Empty Implementation
    2015-08-05_14h29_12.png
  6. Select Sample Class and Click Copy Sample Class
    2015-08-05_14h34_45.png
    Activate BAdI implementation.
  7. Go to transaction SE24 and change implementing class ZCL_HR_NA_PAOC_MTE_EXTEND.
    2015-08-05_14h47_46.png
    Check & remove any pre-existing unwanted code copied from sample class methods.
    Activate the implementing class

8 Logic to read & manipulate Entity Information

 

Extend oData Services for My Travel & Expenses Fiori App - Part 2

$
0
0

Extend oData Services for My Travel & Expenses Fiori App - Part 1

1 Logic to read & manipulate Entity Information

In this scenario we are only extending Expense entity type. Therefore we will have to provide logic to read and manipulate only Expense Type data.


Identified Methods:

2015-08-05_14h47_46.png

Note:
GET_ENTITY in Super Class of standard method calls GET_ENTITY_SET for individual entity read. Therefore we dont have to take care of GET_ENTITY in extension

 

 

1.1 Logical flow for EXPENSES_GET_ENTITYSET
2015-08-05_14h51_18.png

1.2 Logical flow for EXPENSES_UPDATE_ENTITY
2015-08-05_14h56_31.png

1.3 Logical flow for EXPENSES_CREATE_ENTITY

2015-08-05_15h04_06.png

Viewing all 750 articles
Browse latest View live


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