Hi,
Are there any reports to monitor csrf tokens generated?
Reports for
1. CSRF token generated in a period
2. List of CSRF tokens active currently
3. Services & REST method with which a CSRF token was used
regards
Nitesh
Hi,
Are there any reports to monitor csrf tokens generated?
Reports for
1. CSRF token generated in a period
2. List of CSRF tokens active currently
3. Services & REST method with which a CSRF token was used
regards
Nitesh
Hi Experts,
We are trying to create a gateway Service through SEGW.
After Creating data Model and entities, i have generated the objects.
When I am trying to register the service, I can see the RFC destination is also generated, but that destination is created/Maintained nowhere.Please check the
attachment.This new RFC destination generation is standard behaviour?
When I tried to change the RFC destination also, my OK button is also disabled.
Have anyone faced this kind of issue.
Thanks and Regards,
Peter Dinesh.
Hi experts!
I have a CDS View with parameter that i want to publish as an oData service.
My view have two parameters:
- GJAHR:GJAHR --> CHAR 04
- AFABE:AFABE_D --> CHAR 02
How i publish this CDS View in SEGW?
When i used an import by reference, it recognize the parameters, but when generating the class, i have an error (the class is generated with a blank type).
Ex.:
TYPES:
BEGIN OF tt_zcds_parameters.
INCLUDE TYPE . "no type is specified, and this generated an error in the class activating
Thanks!
Matheus Goulart
Hello,
I have the following scenario:
I not know why but I can't update the model Z1_ANNOTATIONS to recognize the new entity. The only way is destroy all notations and import the full service again - and it is not acceptable.
Anyone has another solution to update the annotation reference service with the new entity without lost all current annotations?
Hi,
I have a requirement to display the JSON Response using a nested structure rather than a flat structure.
Kindly provide a solution for the same.
Thanks & Regards,
Thejus Singh J
Ph no. (91)9686557664
Hi there.
I'm trying to create my first fiori app using scn tutorials.
I've created a Odata service in "/IWFND/MAINT_SERVICE - Activate and Maintain Services", the system put it there
sap/opu/odata/sap/ZGW_RE_BU01_SRV
When i try to access it i get an error in chrome:
Call of service /sap/opu/odata/sap/zgw_re_bu01_srv terminated because of an error. The following error text was processed in system SID : Syntax error in program /IWFND/CL_SODATA_HTTP_HANDLER=CP .The error occurred on the application server SERVER. The termination type was: RABAX_STATE.If the termination type is RABAX_STATE, you will find more information on the cause of termination in system SID in transaction ST22. If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server SERVERin transaction SM21. If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process in transaction ST11 on the application server . You may also need to analyze the trace files of other work processes. If you do not yet have a user ID, contact your system adminmistrator.
I've checked ST22 and found, then method HANDLE_CSRF_TOKEN is not inheritaded.
My service inheritate "Logon procedure" from upward service sap/opu/
I tried to deactivate ~CHECK_CSRF_TOKEN=0 but has no result.
Also i checked parameters in profiles:
login/accept_sso2_ticket = 1
login/create_sso2_ticket = 2
login/ticket_only_by_https = 0
my system is
SAP_GWFND 740 0004
What should i try next to have access to service? its local system, so i dont bother about security.
Thank you!
Hello Experts,
I am new to OData service creation and looking for sample code which can be used in order to implement GET_ENTITYSET function.
I am using BAPI- BAPI_CUSTOMER_GETLIST and scenario here is to filter certain set of customers from KNA1 table to display output.
Can any of you please help me with sample code to implement this method? I have below code which needs to be populated properly.
Thanks,
Megha
Hi All,
We developed a service to create customer in SAP. While trying to create customer using HTTP, we are able to create new customer using POST method. But, when we try to create customer using HTTPS using POST method, we are getting status_code 403.
HTTPS 'GET' is working but not 'PUT' and 'POST' methods.
HTTP 'GET', 'PUT' and 'POST' methods are working fine.
Here are the error Screenshots.
While checking in Error Log.
Instead of Service Name we are getting 'OPU' while using the HTTPS.
Please help us to resolve the HTTPS issue while using 'POST' and 'PUT' methods.
Thank you in advance.
HariKrishna M
Hi Friends,
I am trying to redefine a BEx query in Netweaver Gateway system using SEGW transaction, and MDX query option. I am getting the following error after step 2 (step 1 is selecting the catalog and query name, and step 2 is assigning model/service name) :
Could not retrieve the Model Name 'Z_ODATASERVICE_2_MDL' and Version '0001' |
I have already created one test odata service by redefining another query from the same system, but I was able to do it successfully. Any help on the error would be appreciated !
This blog would have not been possible, but for the awesome community that is SCN. I would like to thank every contributor ever for helping me out in my hours of need!.
I had tremendous help in navigating through my current requirement thanks to the below blog posts.
How to consume an OData service using OData Services Consumption and Integration (OSCI)
Thank you. Andre Fischer
Consuming an External RESTful Web Service with ABAP in Gateway
both these blogs helped me understand the intricacies of the functionality that is Consuming an OData Service.
this Blog can be considered as an extension of the Blog by Paul J. Modderman.
we can consume a data service by using the method CREATE_BY_URL of the class CL_HTTP_CLIENT, but when authentication is involved this method was ill suited for it.
The CREATE_BY_DESTINATION method however enables us to store the Credentials in a more standard and secured fashion.
The Requirement:-
I needed to access an OData service that was exposed by HANA . It is required that we trigger this service from the ECC system and process the result.
The user would be logging in to ECC directly and not via portal, thus it would require the use of an RFC destination Login Credentials.
The Process:-
Step 1.
we have to create the RFC connection in SM59 as below.
Step2.
Now that we have created the RFC connection we proceed to the creation of the HTTP client .
to create the client we use the attached code. CL_HTTP_CLIENT.txt.
DATA: lo_http_client TYPE REF TO if_http_client,
lv_service TYPE string,
lv_result TYPE string.
"xml variables
DATA: lo_ixml TYPE REF TO if_ixml,
lo_streamfactory TYPE REF TO if_ixml_stream_factory,
lo_istream TYPE REF TO if_ixml_istream,
lo_document TYPE REF TO if_ixml_document,
lo_parser TYPE REF TO if_ixml_parser,
lo_weather_element TYPE REF TO if_ixml_element,
lo_weather_nodes TYPE REF TO if_ixml_node_list,
lo_curr_node TYPE REF TO if_ixml_node,
lv_value TYPE string,
lv_node_length TYPE i,
lv_node_index TYPE i,
lv_node_name TYPE string,
lv_node_value TYPE string.
************************************************************************
* lv_ destination will be name of the RFC destination we created in SM59
************************************************************************
CALL METHOD cl_http_client=>create_by_destination
EXPORTING
destination = lv_destination
IMPORTING
client = lo_http_client
EXCEPTIONS
argument_not_found = 1
destination_not_found = 2
destination_no_authority = 3
plugin_not_active = 4
internal_error = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*************************************************************************************************
* we need to build the URI, this is the part in the OData Service that comes after the port number
* This includes the Path and Query string for the service that is being called on the host.
* lv_uri holds the path and query string
*************************************************************************************************
CALL METHOD cl_http_utility=>set_request_uri
EXPORTING
request = lo_http_client->request
uri = lv_uri.
lo_http_client->receive(
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3 ).
**************************************************
* Making sense of the result parsing the XML
**************************************************
lv_result = lo_http_client->response->get_cdata( ).
lo_ixml = cl_ixml=>create( ).
lo_streamfactory = lo_ixml->create_stream_factory( ).
lo_istream = lo_streamfactory->create_istream_string(
lv_result ).
lo_document = lo_ixml->create_document( ).
lo_parser = lo_ixml->create_parser(
stream_factory = lo_streamfactory
istream = lo_istream
document = lo_document ).
"This actually makes the XML document navigable
lo_parser->parse( ).
DATA: lv_name TYPE string.
"Navigate XML to nodes we want to process
*lo_weather_element = lo_document->get_root_element( ).
lv_name = 'content'.
lo_weather_element = lo_document->find_from_name( lv_name ).
lo_weather_nodes = lo_weather_element->get_children( ).
"Move through the nodes and assign appropriate values to export
lv_node_length = lo_weather_nodes->get_length( ).
lv_node_index = 0.
WHILE lv_node_index < lv_node_length.
lo_curr_node = lo_weather_nodes->get_item( lv_node_index ).
lv_node_name = lo_curr_node->get_name( ).
lv_node_value = lo_curr_node->get_value( ).
ADD 1 TO lv_node_index.
ENDWHILE.
Hope this Helps!, let me know if i can clarify further.
Peace!!!!
Hi all,
I have a requirement to make my SAP OData service receive JSON payload as well ?
How can i achieve this?
Thanks & Regards,
Thejus Singh J
Hi guys, well, the thing is this. We are in a mobile development project with a mobile application that works offline most of the time.
In this app, the employee fills the business partner data (not yet created in backend) and then fills the opportunity data (also not yet created in the backend) and relates the opportunity to 1:N business partners. The thing is that the request is handled in batch request, first are sent the business partners requests to the backend and then the request related to the opportunity, the thing is that the business partner should be validated in a business workflow in CRM before the creation of the opportunity and this business partner validation could take 1 day, that means, the opportunity request are sent milisenconds after the business partners requests but in most of the cases I don´t have a business partner created yet. How do I orchestrate this? should we use something standard from GW or do we need to build a custom queue system or something like that.
Any help will be appreciated.
Thanks .
Now that annotations are making UI5 development easier by using Smart controls, it is important to learn how to add these annotations to your service. SEGW does not yet allow you to add most of the annotations. Till SEGW inherently provides that feature, here is how you can do it using code.
Step 1. Goto you MPC_EXT class
Step 2. Redefine Define method.
Step 3. Write this code.
super->define( ). "Ensure you call the parent metadata
lo_entity_type = model->get_entity_type( iv_entity_name = 'EmpDetail'). "Your Entity Name
lo_property = lo_entity_type->get_property( iv_property_name = 'DateOfHire'). "Property inside your Entity
lo_annotation = lo_property-/iwbep/if_mgw_odata_annotatabl~create_annotation( /iwbep/if_mgw_med_odata_types=>gc_sap_namespace ). "SAP's annotations
lo_annotation->add( iv_key = 'display-format' iv_value = 'Date' ). "Specific annotation you want to add.
This will result in
Hello experts,
for a Fiori SmartFilterBar I need an Edm.DateTime attribute to be recognized as a Date field.
Intention: From the annotation the Filterbar recognizes, that a Datepicker needs to be displayed.
I got the idea with the Annotation from here:
Re: Rules for OData datetime properties
The Annotation (display-format) is of course mentioned here:
SAP Annotations for OData Version 2.0
I do not see any option to set this Annotation for my attribute in transaction segw.
The explanations on the second link confused me quite a bit.
Any hints appreciated.
Hello together,
I transported a service with system alias to Quality System and the Model is in the View /IWFND/V_MGDPIM and has the same name like in the developement system. If I test the service I got nevertheless this error message:
<code>SY/530</code>
No service found for namespace ...
What did I forgot?
Hi,
I have created a gateway project and have implemented the DPC_ EXT method of getentityset. While testing in Gateway client I am getting status 200 for the service call [/sap/opu/odata/sap/ZTEST_SRV/EmpolyeeadressSet?$filter=Pernr eq'00000012'], but there is no data in results object. I have put external debugger for my user in the DPC_EXT ->EmployeeadressSet_getentityset method, but not getting triggered even as iam testing the service with my userid. (Gateway is implemented as Hub. Trusted RFC connection has login user configured. Was able to debug gateway services of standard fiori apps previously in the same way ).
thanks in advance
Hi Experts,
I have created a SAPUI5 application which mock json data, the master page is in tree structure as shown in image, image1 which is working fine.
The excel sheet snapshot is my mock json representation, using this data only i am creating my mock json.
Now the same application has to be build using odata service as backend(without using mock json data). How could i able to give my master page view as a tree structure in a odata service. Please guide me and help me.
Hello Team,
I am using SPS 10 ODATA service . From HTML perspective, the link which i am generating is GET method .
Sample link : https://<hostname>/<path>/<odata file name>.xsodata/InputParams(<input parameters)/Results?$format=json
In the above mentioned link has input parameters also. Instead of this , How to pass the input parameters in the HTML body which is like POST method ?
Note : In future, we no need to modify this link if there is an addition / removal of parameters .
Thanks
Saravanan TN
This blog shares our experience of upgrading a 3-tier NetWeaver Gateway landscape, pointing out the challenges we faced and how we were able to solve them.
Existing 3-tier landscape with NetWeaver Gateway 2.00 SP 07 (NetWeaver 7.31 SP 09) in a central hub deployment model. Applications are connecting to a CRM 7.0 EHP1 system with NetWeaver Gateway 2.00 SP 07 backend components.
Existing 3-tier landscape with SAP Gateway 7.40 SP 13 in a central hub deployment model. No changes to backend systems.
Execute a in-place upgrade. Start with sandbox systems, which are recent copies of respective production systems.
According to SAP note 1830198 systems can be independently upgraded, upgrading Gateway doesn't require one to upgrade the backend components of the connected backend systems, assuming sufficient SP levels exist both in the Gateway and the backend systems. In our case we met the SP level requirements. The plan was not to upgrade the backend components.
As soon as we had upgraded sandbox, we realized that our existing Gateway services didn't work anymore. More specifically, none of the services leveraging filter functionality worked. In addition there were issues with currencies that used to work that no longer worked.
Debugging the filter problem we found out that passing filter values got broken by the upgrade, values were being truncated. Looking into it in detail, we found SAP note 2205402 which we applied on both the Gateway system as well as the backend system, as instructed by the SAP note. This however wasn't sufficient. Since the corrections are partly contained in 740/13, we had to also implement SAP notes 2232883 and 2241188 on the Gateway system. Even that wasn't sufficient, we had to also implement SAP note 2245413 in the backend system.
Applying the SAP notes fixed the issues with filter functionality. The issue with currencies is explained in SAP note 2028852. We chose to change the applications in order to avoid the decimal problems described in the SAP note.
In order to apply the SAP notes required to fix the issues with filtering, we had to also update the backend components to 2.00 SP 11. The new plan is to execute the in-place upgrade of NetWeaver Gateway and update the backend components.
I'm sure breaking compatibility or interoperability wasn't on SAP's radar but it happened. I have contacted SAP Gateway Product Management but I haven't yet been provided with an official explanation. In our case a simple technical upgrade of NetWeaver Gateway turned into a full-fledged upgrade project.
Take everything with a grain of salt, even official information can't be trusted. Test and validate everything yourself, preferably in a sandbox environment.
We are currently executing the new plan in our development landscape. I will update this blog should we run into other issues.
(This is part 1 of a 3 part series. See Part 2 and Part 3 for the whole story.)
Did you ever have a late night instant message conversation that went something like this:
It’s no fun to be in that conversation. You know you’re stuck sitting in front of a screen for at least the next 10 minutes. And since it’s your work laptop you know that the corporate internet police won’t even let you browse reddit for cat pictures while you wait for VPN and SAP GUI to load up. More so, you know that whatever this person is yelling about is probably not your fault.
I’ve been there, trust me.
What if your conversation could look like this, instead:
Did you notice Commander Data interject in that exchange? More on that later.
As nerds our jobs often involve performing routine technical tasks for people who use our systems. Maybe you reset a lot of passwords, check the status of integrations, or respond to a support inbox. You probably have loads of different communication tools at your disposal. Chat, email, carrier pigeons…whatever gets the job done. If someone needs your help they’ll generally find a way to get in front of you. Digitally or otherwise.
One of the coolest communication tools I’ve worked with in the last couple years is Slack. It’s got individual conversations, group chats, categories, and anything you’d expect from a team chat tool. It’s quickly overtaken email as my preferred method of talking with colleagues.
Except it’s way more than chat. Slack allows you to use pre-built integrations to look at your Jira tasks, GitHub commits, and thousands of other things. What’s even better: you can make your own integrations that interact with its web API. Which makes it the perfect thing to plug into your SAP Gateway to make use of the REST APIs you’ve already created for other purposes.
In my next couple posts, I’ll show you how to make exactly what I did above using (nearly) free tools.
If you're not using Slack already, you can get a free account. It's very simple and straightforward. Once you've got an account, follow these steps to set up the Slack end of this chain:
What you just did set it up so that Slack will respond to any message that starts with "/ask-sap" by sending an HTTP POST to the URL you provided in the settings. The format of the POST it sends will look like the "Outgoing Data" section that you saw in the setup process. For this demo, the most important pieces are the token and text fields.
That's it! You now have a Slash Command available in any of your Slack channels. It won't do anything yet, but that's what we'll set up in the next section.
On to Part 2!