https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/NW-ABAP-Web-Services-blog-posts.xml SAP Community - NW ABAP Web Services 2024-05-20T11:11:22.986401+00:00 python-feedgen NW ABAP Web Services blog posts in SAP Community https://community.sap.com/t5/technology-blogs-by-members/how-to-send-data-from-ecc-to-pi-using-a-consumer-proxy-web-service/ba-p/13437444 How to send data from ECC to PI using a Consumer Proxy (Web Service) 2020-01-27T18:45:34+01:00 anirban_pwc https://community.sap.com/t5/user/viewprofilepage/user-id/153556 There could be times when your organization has multiple PI/PO servers for different geographical locations connected to different SAP ECC servers, or they might have acquired a new company which already had another SAP PI/PO middleware into the play (you got the point).<BR /> <BR /> Now, you're asked to develop a new interface that will cater to all geographic locations integrated with all back-end ECC systems. In those scenarios you have 3 options:<BR /> <OL><BR /> <LI>Consolidate all interfaces into one PI/PO server so that you can integrate other ECC boxes into one central PI/PO System Landscape Directory (SLD) - this is the best option, but also time consuming and may not be suitable for meeting the business timelines.</LI><BR /> <LI>Create different types of interfaces - one Proxy type for the ECC systems already integrated with the PI/PO server, another RFC type for the ones not yet integrated. This will create overhead in PI/PO development and maintenance and also to note that RFC is not recommended over Proxy.</LI><BR /> <LI>And the last option is the one that I'm going to illustrate in this blog where you'll have a single Operation Mapping in the Enterprise Service Repository and use the Proxy communication for the integrated ECC systems and Web Service for the non-integrated ECC systems.</LI><BR /> </OL><BR /> Here are the steps you need to follow in the ABAP system to consume the Web Service stood up in the PI/PO system (I'm assuming you're aware of the steps to create the basic PI/PO interface):<BR /> <UL><BR /> <LI>Configure the ICO in PI and get the WSDL</LI><BR /> <LI>Open the WSDL in browser and save in your local disk as a WSDL file</LI><BR /> <LI>Go to SE80 &gt; Repository Browser and select the Package option</LI><BR /> <LI>Right click on Enterprise Services &gt; Create</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/1-104.png" /><BR /> <UL><BR /> <LI>Select Service Consumer</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/2-38.png" /><BR /> <UL><BR /> <LI>Select External WSDL/Schema</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/3-30.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>Select Local File</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/4-23.png" /><BR /> <UL><BR /> <LI>Locate the saved WSDL file</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/5-29.png" /><BR /> <UL><BR /> <LI>Add Package, Transport Request and a Prefix</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/6-28.png" /><BR /> <UL><BR /> <LI>Click on Complete</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/7-20.png" /><BR /> <UL><BR /> <LI>This will create a new Service Consumer. You need to save and activate it.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/8-19.png" /><BR /> <UL><BR /> <LI>The class object will have all the methods that you need to use to send data. But before that you need complete the following configurations in SOAMANAGER (in many companies those are Basis tasks – remember this is a client dependent configuration).</LI><BR /> </UL><BR /> &nbsp;<BR /> <UL><BR /> <LI>Select Service Administration &gt; Web Service Configuration</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/9-17.png" /><BR /> <UL><BR /> <LI>Search it with the ABAP Class name:</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/10-14.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>Select the object and in next screen Create a Logical Port selecting the Manual Configuration option.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/11-15.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>Input a meaningful Port Name and description and don’t forget to select the Logical Port as Default</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/12-12.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>Select appropriate Authentication method to login to PI from ECC.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/13-12.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>Input URL Access Path (get it from the WSDL and remove all “amp;”), Access URL (PI server URL without the HTTP:// and w/o the Port#), Port of Access URL (PI Port#).</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/14-10.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>Leave the SOAP Protocol as default.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/15-10.png" /><BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI>No input in Identifiable Business Context.</LI><BR /> <LI>The operation should come up automatically, you just need to input the highlighted Transport Binding.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/16-6.png" /><BR /> <UL><BR /> <LI>Finish to complete the configuration and make sure it’s in Active state.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/17-5.png" /><BR /> <UL><BR /> <LI>Then display the service and Ping test it.</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/18-6.png" /><BR /> <UL><BR /> <LI>Your service is now ready to be consumed. Next you need program it to call the proxy.</LI><BR /> <LI>Sample code:</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/19-4.png" /><BR /> <BR /> &nbsp; 2020-01-27T18:45:34+01:00 https://community.sap.com/t5/technology-blogs-by-members/developing-graphql-api-on-abap-graphqladmin-web-interface/ba-p/13437267 Developing GraphQL API on ABAP: GraphQLAdmin Web Interface 2020-03-23T04:41:20+01:00 hareeshbabu82gmail_com https://community.sap.com/t5/user/viewprofilepage/user-id/295697 <IMG class="aligncenter" src="https://marmelab.com/images/blog/graphql/logo.png" alt="Image result for graphql logo" width="323" height="113" /><BR /> <BR /> With the success of the initial version of <STRONG>GraphQL ABAP implementation</STRONG> and usage analysis over several APIs, though the APIs can be built and used with ease, I felt an urge to improve the efficiency of developing APIs with an easier and standardized way.<BR /> <BR /> &nbsp;<BR /> <BR /> I have started working in my free time on the next version of the GraphQL ABAP implementation, which I will try to present first hand in this Blog Post, in hope of suggestions and comments.<BR /> <BR /> &nbsp;<BR /> <BR /> Please find my earlier blog posts on the previous version of GraphQL ABAP implementation to gain some background.<BR /> <BR /> <A href="https://medium.com/@hareeshbabu82/graphql-sap-abap-the-inspiration-eb6d4f305681" target="_blank" rel="nofollow noopener noreferrer">GraphQL + SAP ABAP: The Inspiration</A><BR /> <BR /> <A href="https://medium.com/@hareeshbabu82/graphql-sap-abap-demo-and-technical-details-92a511ed8e4a" target="_blank" rel="nofollow noopener noreferrer">GraphQL + SAP ABAP: Architecture and Technical Details</A><BR /> <BR /> &nbsp;<BR /> <BR /> Thoughts and Improvements:<BR /> <UL><BR /> <LI>GraphQL Schema<BR /> <UL><BR /> <LI>But where is the Graph?</LI><BR /> <LI>How can we visualize the Data Model it exposes?</LI><BR /> </UL><BR /> </LI><BR /> <LI>Schema Development<BR /> <UL><BR /> <LI>Defining schema using ABAP code takes significant efforts and error-prone</LI><BR /> <LI>How can we standardize the Schema Definition process</LI><BR /> <LI>How can we decrease the efforts of managing the Schemas available across systems</LI><BR /> <LI>How can we reuse existing Business logic efficiently with minimal efforts</LI><BR /> <LI>How can we quickly go from Schema to API</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> Out of these above thoughts, I have started designing a <B>GraphQL Admin (</B>Web Application) with features like:<BR /> <UL><BR /> <LI>Maintain all Schemas available in the system with a simple and refreshing interface<BR /> <UL><BR /> <LI>List the schemas</LI><BR /> <LI>Create/Edit/Delete the schemas</LI><BR /> </UL><BR /> </LI><BR /> <LI>Use the <B>Schema Definition Language</B> (<A href="http://spec.graphql.org/" target="_blank" rel="nofollow noopener noreferrer">SDL</A>) of GraphQL<BR /> <UL><BR /> <LI>Instead of creating the schema using repetitive ABAP code scattered across Classes, provide an in-place editor for the whole schema</LI><BR /> </UL><BR /> </LI><BR /> <LI>Instead of resolving only by ID<BR /> <UL><BR /> <LI>Provide more context to the Resolvers to be able to improve efficiency by Schema awareness</LI><BR /> <LI>Resolve the ABAP executable code like Function Modules and Classes</LI><BR /> </UL><BR /> </LI><BR /> <LI>Defining the Mapping between GraphQL and ABAP using Directives</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> Let us dive deep into the features of the Web Application with few Screenshots instead of my boring theory.<BR /> <BR /> &nbsp;<BR /> <UL><BR /> <LI><B>Dashboard</B> (is now left empty)<BR /> <UL><BR /> <LI>can be used to show statistics like the number of schemas available, the number of requests per schema, active calls per hour and critical messages and so on...</LI><BR /> </UL><BR /> </LI><BR /> <LI><B>Schemas</B> Menu Option: for CRUD operations on Schemas<BR /> <UL><BR /> <LI>Creating a New Schema<BR /> <UL><BR /> <LI>takes unique Schema ID, description and SICF path of the schema in SAP</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-001.png" height="257" width="463" /><BR /> <UL><BR /> <LI>Creating related SICF node in SAP with just <STRONG>ZGQLCL_API_SERVICE_BASE</STRONG> as the superclass</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-002.png" height="254" width="420" /><BR /> <UL><BR /> <LI>List of Schemas<BR /> <UL><BR /> <LI>the operations for each tile contains Edit Schema Header, Delete and Visual Editor in sequence</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-003.png" height="261" width="469" /><BR /> <UL><BR /> <LI>New Schema created will be stored into <STRONG>SAP tables</STRONG><BR /> <UL><BR /> <LI><EM>Fun Fact:</EM> The API for this Application is also running on GraphQL ABAP Implementation and maintained using this Web APP and can be seen in the above screenshot as <EM>GQL_ADMIN</EM> tile</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <UL><BR /> <LI>Visualizing/Updating the Schema using GraphQL Editor<BR /> <UL><BR /> <LI>Adding new functionality into new Schema using GraphQL Editor</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-004.png" height="306" width="543" /><BR /> <UL><BR /> <LI>Note: Thanks to the <STRONG><A href="https://graphqleditor.com/" target="_blank" rel="nofollow noopener noreferrer">GraphQL Editor</A></STRONG> Open Source library, which is used to edit the Schema generated from GraphQL ABAP Implementation<BR /> <UL><BR /> <LI>SAP will generate the SDL required for GraphQL Editor</LI><BR /> <LI>WebAPP will pull this SDL from SAP and render using GraphQL Editor library</LI><BR /> <LI>Once the Editing is done in WebAPP, Saving will convert the updated SDL to config tables of SAP</LI><BR /> </UL><BR /> </LI><BR /> <LI>Please head over to the <A href="https://graphqleditor.com/" target="_blank" rel="nofollow noopener noreferrer">GraphQL Editor</A> site to check out how cool the idea of editing the Graph online is</LI><BR /> <LI>The Left side Icon Menu comes with GraphQL Editor library standard Operations for searching within Schema<BR /> <UL><BR /> <LI>with additional custom Save icon at the bottom for saving the updated Schema into SAP</LI><BR /> </UL><BR /> </LI><BR /> <LI>The top bar is to navigate between<BR /> <UL><BR /> <LI>GraphQL Editor</LI><BR /> <LI>Dashboard with Schema List</LI><BR /> <LI>Creating a New Schema</LI><BR /> <LI>Importing ABAP DDIC objects</LI><BR /> </UL><BR /> </LI><BR /> <LI>Editor pane on the left is the <STRONG>SDL Syntax highlighted text editor</STRONG> which will render the SDL generated by ABAP Server</LI><BR /> <LI>The right panel is the Visual representation of the Graph for given SDL which also allows<BR /> <UL><BR /> <LI>Adding, Deleting, Updating of the Nodes in the Graph visually</LI><BR /> <LI>Scrolling, Panning and Zooming into the Graph</LI><BR /> </UL><BR /> </LI><BR /> <LI>Finally, <STRONG><A href="https://github.com/prisma-labs/graphql-playground" target="_blank" rel="nofollow noopener noreferrer">GraphQL Playground</A></STRONG> tool used to execute/test the GraphQL queries against ABAP server showing the initial schema created</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-005.png" /><BR /> <UL><BR /> <LI>Note: URLs of the Web Application and GraphQL Playground are showing "<A href="http://localhost" target="_blank" rel="nofollow noopener noreferrer">http://localhost</A>" since these are running proxy servers locally to connect to local SAP Netweaver 7.52 instance distributed free for developers, huge Thanks to SAP for the same</LI><BR /> </UL><BR /> &nbsp;<BR /> <UL><BR /> <LI><STRONG>Directives</STRONG><BR /> <UL><BR /> <LI>Here is another idea I have admired from <STRONG><A href="https://www.graphile.org/postgraphile/" target="_blank" rel="nofollow noopener noreferrer">PostGraphile</A></STRONG> library showing efficient usage of Directives to bridge the Operations between Data model and GraphQL language</LI><BR /> <LI>I have tried to implement the same for the GraphQL ABAP implementation to integrate and invoke existing executable business logic available in SAP</LI><BR /> <LI>I see the Directives as a way to provide additional information either at Design time or Execution time for different elements of the Schema ex. Fields, Types, ENUMs</LI><BR /> <LI>Following basic Directives are defined as standard into the GraphQL ABAP implementation<BR /> <UL><BR /> <LI><BR /> <DIV><BR /> <TABLE style="width: 514px"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 100px"><STRONG>@abapName</STRONG></TD><BR /> <TD style="width: 414px">for mapping GraphQL name to SAP name</TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 100px"><STRONG>@abapValue</STRONG></TD><BR /> <TD style="width: 414px">for mapping GraphQL Enum value to SAP Domain value</TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 100px"><STRONG>@resolver</STRONG></TD><BR /> <TD style="width: 414px">to support legacy RESOLVER by ID functionality</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV></LI><BR /> </UL><BR /> </LI><BR /> <LI>Additional Directives can be defined and added to the Schema generator using a simple implementation of Interface <B>ZGQLIF_CUSTOM_DIRECTIVE</B><BR /> <UL><BR /> <LI><BR /> <DIV><BR /> <TABLE style="width: 515px"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 137px"><STRONG>@functionModule</STRONG></TD><BR /> <TD style="width: 378px">to execute the ABAP function module using&nbsp; GraphQL data</TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 137px"><STRONG>@class</STRONG></TD><BR /> <TD style="width: 378px">to execute ABAP Class and Method using GraphQL data</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV></LI><BR /> </UL><BR /> </LI><BR /> <LI><B>Import</B> functionality can be used to generate base SDL for these directives to be added to Editor and adjusted to the needs</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> &nbsp;<BR /> <UL><BR /> <LI>Working with <STRONG>Schema Editor</STRONG> to define GraphQL Schema<BR /> <UL><BR /> <LI>Adding operations into Schema using simple Import Function Modules<BR /> <UL><BR /> <LI>Function or Class imports will be generating simple SDL for the main operation and supporting SDL types, Inputs based on ABAP Imports and Exports.</LI><BR /> <LI>This allows us to define or customize as desired, rather framework deciding all on its own, which will mostly not be sufficient for ever-changing API contracts</LI><BR /> <LI>Imports support Basic Data Types, Structures and Table Types</LI><BR /> <LI>FM with Type Ref To is not supported, as we can't send references through API</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-006.png" height="163" width="190" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-007.png" height="140" width="503" /><BR /> <UL><BR /> <LI>bellow we can see an operation <STRONG>zgqlfmTestStringRes</STRONG> has been added to Query type</LI><BR /> <LI>with <STRONG>@functionModule</STRONG> directive and <STRONG>attribute "name"</STRONG> with FM name for resolver execution</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-008.png" height="240" width="508" /><BR /> <UL><BR /> <LI>executing the above query after saving the Schema</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-009.png" height="178" width="556" /><BR /> <UL><BR /> <LI>We can modify the names of the generated schema fields from <STRONG>"zgqlfmTestStringRes"</STRONG> to <STRONG>"fetchStringResource"</STRONG>, which will have no effect on the execution of the Function</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-010.png" height="232" width="497" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-011.png" height="157" width="498" /><BR /> <UL><BR /> <LI>But in order to change the field names generated, we need to use the <STRONG>@abapName</STRONG> directive to map to original SAP parameter names, ex <STRONG>"evStr"</STRONG> export parameter is renamed to <STRONG>"sampleString"</STRONG></LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-012.png" height="141" width="403" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-013.png" height="126" width="423" /><BR /> <UL><BR /> <LI>Here is the actual Function Module from SAP looks like</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-014.png" height="182" width="373" /><BR /> <UL><BR /> <LI>Let us try to change the logic to return dynamic values from EV_STR with Time Stamp</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-015.png" height="166" width="373" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-016.png" height="135" width="446" /><BR /> <UL><BR /> <LI>Import also supports <STRONG>Class Methods</STRONG> import as well with few limitations<BR /> <UL><BR /> <LI>Class Constructor with Required parameters are not supported</LI><BR /> <LI>Static and Public Instance methods are only exported as GraphQL operations</LI><BR /> </UL><BR /> </LI><BR /> <LI>Sample Import of a Class results SDL as</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-017.png" height="150" width="478" /><BR /> <UL><BR /> <LI>Above the Importer provides the Static and Public Instance methods of the bellow sample class</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-018.png" height="156" width="426" /><BR /> <UL><BR /> <LI>Operations in Schema<BR /> <UL><BR /> <LI>bellow we can see 3 operations <STRONG>getSeed1</STRONG>, <STRONG>staticMethod</STRONG> and <STRONG>testMulitExport</STRONG> have been added to Query</LI><BR /> <LI>getSeed1 has <STRONG>@class-&gt;name</STRONG> as Class name and <STRONG>@class-&gt;method</STRONG> as Class Method name for resolving</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-019.png" height="378" width="389" /><BR /> <UL><BR /> <LI>Execution of Class Methods is same as calling operations</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-020.png" height="189" width="476" /><BR /> <H3 id="toc-hId-1060803004">Building Sample Demo GraphQL API using <STRONG>SFLIGHT</STRONG>&nbsp;BAPIs</H3><BR /> <UL><BR /> <LI>Search for Flights - FM - <STRONG>BAPI_FLIGHT_GETLIST</STRONG></LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-021.png" height="166" width="459" /><BR /> <UL><BR /> <LI>SDL with <STRONG>"searchFlights"</STRONG> operation, includes all the Import and Export parameters from FM</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-022.png" height="438" width="326" /><BR /> <UL><BR /> <LI>Executing BAPI from GraphQL</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-023.png" height="305" width="438" /><BR /> <UL><BR /> <LI>Now we need Details of the Flights we fetched, we can use FM - <STRONG>BAPI_FLIGHT_GETDETAIL</STRONG><BR /> <UL><BR /> <LI>we will define the details operation both as<BR /> <UL><BR /> <LI>dependent on Search - when we want sub information at the time of search within the single API call</LI><BR /> <LI><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-024.png" height="317" width="306" /></LI><BR /> <LI>root operation - when we know all required information on the flight (without performing Search)</LI><BR /> <LI><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-025.png" height="244" width="314" /></LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <UL><BR /> <LI>The difference above is to remove Required parameters when including under Search operation as the values from Search results will be automatically passed down to Details operation when the input parameter of the child operation is the same as Output field of the parent. Ex. "airlineid", "connectionid", "flightdate"</LI><BR /> </UL><BR /> <UL><BR /> <LI>Executing Flight Details operation<BR /> <UL><BR /> <LI>as Root operation when Flight details are known</LI><BR /> <LI><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-026.png" height="188" width="417" /></LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <UL><BR /> <LI style="list-style-type: none"><BR /> <UL><BR /> <LI>as Search dependent operation to pull the details along with Search</LI><BR /> <LI><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/03/gql-027.png" height="314" width="443" /></LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-735206780">Advantages &amp; Conclusions:</H2><BR /> <UL><BR /> <LI>Using the SDL for managing the Schema is a great way to improve the Developer experience in building the APIs</LI><BR /> <LI>SDLs can be managed in Source Controls like GitHub or Bitbucket at a central location for review and tracking the changes across Teams</LI><BR /> <LI>This is a faster way of building the APIs and will need less technical knowledge of the internal logic of the server itself</LI><BR /> <LI>As this does not rely on any functionality of the SAP Modules and is purely implemented in ABAP, this could be used across all SAP Systems</LI><BR /> <LI>Using the Directive Resolvers will reduce the amount of SAP code to build Schema significantly</LI><BR /> <LI>GraphQL Admin Web App can be used as a gateway to maintaining GraphQL Schemas across different SAP systems with minimal changes and can be integrated with Source Control systems for version management on SDL</LI><BR /> <LI>The new system is designed to provide more context to the Resolvers and better Error handling</LI><BR /> <LI>This mainly reduces/eliminate the code we need to write for Schema development itself, which will shift the focus on API development and design instead</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> Although this is nowhere near to finish, I see it has a lot of potential and scope to reduce Development costs and increase the efficiency of building APIs.<BR /> <BR /> &nbsp;<BR /> <BR /> The source is not exported as of now for this implementation, as it is under constant changes. Once this is finalized will probably share the code here. Anyone wants to see this in action, reach out to me for a discussion on what I have built so far.<BR /> <BR /> Thanks for your interest and for reading through the blog post. Stay safe amid COVID-19. 2020-03-23T04:41:20+01:00 https://community.sap.com/t5/technology-blogs-by-members/improve-the-performance-of-an-sap-fiori-application-by-implementing-quot/ba-p/13427520 Improve the performance of an SAP FIORI application by implementing "Delta Token" mode in SAP Netweaver Gateway Odata 2020-04-14T18:45:58+02:00 lecaplain https://community.sap.com/t5/user/viewprofilepage/user-id/664092 In a mobility context, it is often necessary to develop an application that will be used online and offline.<BR /> <BR /> To avoid performance problems, it is necessary to implement the various features offered by the components of the application architecture.<BR /> <BR /> The large amount of data to be processed is often the first area of improvement.&nbsp; In this article, we offer a guide to implementing Delta Token mode at the webservice level on the SAP Gateway platform.<BR /> <H1 id="toc-hId-801716797">SAP Gateway &amp; Delta Token</H1><BR /> When the app is initially login, for a given user, to the ECC backend, it is necessary to load all the useful data to work offline.<BR /> <BR /> One of the main problems in the field of mobility is to limit the amount of data that migrates from the backend to the final medium.<BR /> <BR /> The network is not necessarily accessible (white zone), speed may not be up to the needs, significantly slowing down data recovery or transfer, and then blocking the application for a time that can sometimes take several minutes.<BR /> <BR /> To overcome these constraints, the use of <STRONG>"Delta mode"</STRONG>is recommended for all web services.<BR /> <H2 id="toc-hId-734286011">How "Delta" Mode Works</H2><BR /> During a call to a webservice, supporting the "Delta" mode, a "token" is generated by the latter and returned, along with the expected data collection, to the frontend.<BR /> <BR /> This token, if used in successive calls, allows the backend to calculate a delta of the data and return only the data from the collection that has undergone changes since the previous call (creation, modification, deletion of values or data). This limits the amount of data that passes through the network and contributes to improved performance.<BR /> <BR /> The "Delta" mode is interesting about methods returning a collection, as are the so-called "Query" methods.<BR /> <BR /> In practical terms, these are the methods (visible via the SEGW transaction) known as "GetEntitySet"; Their principle is to return a list of objects that meet certain criteria (e.g. all "materials" available within the plant); it is this list that is called "collection."<BR /> <H2 id="toc-hId-537772506">Delta Mode Implementation</H2><BR /> <BR /> <HR /><BR /> <BR /> <H3 id="toc-hId-470341720">Creating a list-generating RFC module</H3><BR /> <BR /> <HR /><BR /> <BR /> <H4 id="toc-hId-402910934">The ZRFC_READ_ALL function</H4><BR /> Our RFC contains only two parameters: two tables<BR /> <BR /> ALL&nbsp; --&gt; contains all the results compatible with the query<BR /> <BR /> SEL_ALL_USER&nbsp; --&gt; allows you to submit one or more filtering values<BR /> <H4 id="toc-hId-206397429">The structure of the function tables</H4><BR /> ALL&nbsp;: This table contains all the fields you want to transmit via webservice<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/RFC1.jpg" /></P><BR /> &nbsp;<BR /> <BR /> SEL_ALL_USER&nbsp;: This table contains the filter values, its structure is always the same (the length of the "low" and "high" components can vary to adapt to the filter's needs<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/RFC2.jpg" /></P><BR /> &nbsp;<BR /> <H4 id="toc-hId-9883924">The function algorithm</H4><BR /> In the function code, we take into account the filter table if informed, otherwise we make a simple query.<BR /> <BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/RFC3.jpg" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px">Our function is ready to return the expected results!</P><BR /> <BR /> <BR /> <HR /><BR /> <BR /> <H3 id="toc-hId--315712300">Creation of an Odata project</H3><BR /> <BR /> <HR /><BR /> <BR /> On the SAP Gateway server, execute the <STRONG>SEGW</STRONG> transaction<BR /> <H4 id="toc-hId--383143086">The structure of the "ZGCG11_DEMO" project</H4><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/oData1.png" /></P><BR /> &nbsp;<BR /> <BR /> The "Data model" was generated based on the composition of the RFC (without considering the filter table), as well as:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/oData2.png" height="161" width="685" /></P><BR /> &nbsp;<BR /> <BR /> Name of "Data Model" --&gt;&nbsp; <STRONG>"All_Delta"</STRONG><BR /> <BR /> Associated "Entity Set" name --&gt; <STRONG>"All_Delta_Set"</STRONG><BR /> <BR /> &nbsp;<BR /> <H4 id="toc-hId--579656591">Implementation of the "Query" method</H4><BR /> Mapping is simply done between the areas of the results table and those of the Odata project entityset.<BR /> <BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/query1.jpg" height="145" width="781" /></P><BR /> &nbsp;<BR /> <BR /> Webservice will return all results associated with this RFC module code (if no filter is provided):<BR /> <BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/Query2.jpg" /></P><BR /> &nbsp;<BR /> <BR /> It is thus possible to recover the result via the "IWFND/GW_CLIENT" transaction with this query:<BR /> <BR /> <STRONG>--&gt; /sap/opu/odata/SAP/ZGCG11_DEMO_SRV/All_Delta_Set</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> As well:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/Query3.jpg" height="523" width="668" /></P><BR /> <BR /> <H4 id="toc-hId--1273887191"><A name="_Toc30001523" target="_blank"></A>Redefining the "Query" method via ABAP</H4><BR /> The redefinition of a method of your Odata project is achieved via a right click on the name of this method and then:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/Query5.jpg" height="232" width="322" /></P><BR /> The screen we access can also be found via the SE80 transaction.<BR /> <BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/Query6.jpg" /></P><BR /> &nbsp;<BR /> <BR /> The tree of "methods" must then be unfolded until the "Query" method associated with the Entity Set is found, which always ends with an "ENTITYSET" and:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/Query7.jpg" height="20" width="235" /></P><BR /> This "Query" method is the one that will be called by default if you don't specify a token, i.e. when the application is initialized or when you need a complete refresh, for example.<BR /> <BR /> All you have to do is right click on it and choose to "redefine."<BR /> <BR /> You will then need to report the following data elements:<BR /> <PRE class="language-abap"><CODE> DATA : lo_dp_facade TYPE REF TO /IWBEP/IF_MGW_DP_FACADE,<BR /> lv_delta_token TYPE string.<BR /> </CODE></PRE><BR /> &nbsp;<BR /> <BR /> <U>Method</U> algorithm:<BR /> <PRE class="language-abap"><CODE>* Appel de la RFC<BR /> CALL FUNCTION 'ZRFC_READ_ALL'<BR /> TABLES<BR /> ALL = et_entityset.<BR /> <BR /> CHECK sy-subrc EQ 0.<BR /> <BR /> * Get the data provider facade<BR /> TRY.<BR /> lo_dp_facade = /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).<BR /> CATCH /iwbep/cx_mgw_tech_exception. <BR /> RAISE EXCEPTION TYPE /iwbep/cx_mgw_tech_exception.<BR /> ENDTRY.<BR /> <BR /> <BR /> * Call the delta token functionality<BR /> TRY.<BR /> CALL METHOD /iwbep/cl_query_result_log=&gt;create_update_log_entry_hash<BR /> EXPORTING<BR /> io_tech_request_context = io_tech_request_context<BR /> io_dp_facade = lo_dp_facade<BR /> ir_service_document_name = mr_service_document_name<BR /> ir_service_version = mr_service_version<BR /> it_entityset = et_entityset<BR /> CHANGING<BR /> ev_delta_token = lv_delta_token.<BR /> <BR /> CATCH /iwbep/cx_qrl_locked. <BR /> RAISE EXCEPTION TYPE /iwbep/cx_qrl_locked.<BR /> <BR /> CATCH /iwbep/cx_qrl_delta_unavailabl. <BR /> RAISE EXCEPTION TYPE /iwbep/cx_qrl_delta_unavailabl.<BR /> ENDTRY.<BR /> <BR /> * export the delta token<BR /> es_response_context-deltatoken = lv_delta_token.<BR /> </CODE></PRE><BR /> &nbsp;<BR /> <BR /> Explanation:<BR /> <BR /> The method starts by calling the RFC in a standard way, it returns all the results.<BR /> <BR /> Two objects are then required:<BR /> <OL><BR /> <LI>The data provider facade allows data to be stored in a hashed table based on the structure of the associated model</LI><BR /> <LI>The "delta token"</LI><BR /> </OL><BR /> After recovering the data from our RFC, a data provider facade is created; then the two are combined in the call of the method allowing data storage and token generation.<BR /> <BR /> The Webservice call then returns all the values as well as the token that will be used in successive calls in order to only trace the difference in results.<BR /> <BR /> &nbsp;<BR /> <H4 id="toc-hId--1470400696">Redefining the "Query Delta" method via ABAP</H4><BR /> &nbsp;<BR /> <BR /> A second method must now be redefined to allow the use of the "delta" mode.<BR /> This is the method:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/delta1.jpg" /></P><BR /> &nbsp;<BR /> <BR /> This method is used by all the "Entities" in your Odata project.<BR /> <BR /> You will need to report the following data elements ....<BR /> <PRE class="language-abap"><CODE> DATA : lv_entity_set_name TYPE string,<BR /> lv_delta_token TYPE string,<BR /> lo_dp_facade TYPE REF TO /iwbep/if_mgw_dp_facade.<BR /> </CODE></PRE><BR /> &nbsp;<BR /> <BR /> ....As well ase &nbsp;tables, based on the structure of &nbsp;those powered by your RFC,to collect the "created/modified" and "deleted" data identified by the "delta" token method.<BR /> <PRE class="language-abap"><CODE> TYPES : BEGIN OF wlst_users,<BR /> ZUSER Type XUBNAME,<BR /> ZMAIL Type AD_SMTPADR,<BR /> END OF wlst_users.<BR /> <BR /> DATA : lt_users TYPE STANDARD TABLE OF wlst_users<BR /> WITH NON-UNIQUE DEFAULT KEY<BR /> INITIAL SIZE 0.<BR /> <BR /> DATA : lt_deleted_users TYPE STANDARD TABLE OF wlst_users<BR /> WITH NON-UNIQUE DEFAULT KEY<BR /> INITIAL SIZE 0.<BR /> </CODE></PRE><BR /> &nbsp;<BR /> <BR /> We are only interested here in one "EntitySet", so we have to identify it:<BR /> <PRE class="language-abap"><CODE>* get the EntitySet name in progress<BR /> lv_entity_set_name = io_tech_request_context-&gt;get_entity_set_name( ).<BR /> <BR /> * If it's an EntitySet that we manage in delta mode<BR /> CASE lv_entity_set_name.<BR /> WHEN 'All_Delta_Set'.<BR /> * Appel de la RFC<BR /> CALL FUNCTION 'ZRFC_READ_ALL'<BR /> TABLES<BR /> all = lt_users.<BR /> <BR /> <BR /> * get the data provider facade<BR /> TRY.<BR /> lo_dp_facade = /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).<BR /> CATCH /iwbep/cx_mgw_tech_exception.<BR /> RAISE EXCEPTION TYPE /iwbep/cx_mgw_tech_exception.<BR /> ENDTRY.<BR /> <BR /> * Calculation of differences between delta tokens and updating of information<BR /> TRY.<BR /> CALL METHOD /iwbep/cl_query_result_log=&gt;create_update_log_entry_hash<BR /> EXPORTING<BR /> io_tech_request_context = io_tech_request_context<BR /> io_dp_facade = lo_dp_facade<BR /> ir_service_document_name = mr_service_document_name<BR /> ir_service_version = mr_service_version<BR /> it_entityset = lt_users<BR /> IMPORTING<BR /> et_deleted_entityset = lt_deleted_users<BR /> et_entityset = lt_users<BR /> CHANGING<BR /> ev_delta_token = lv_delta_token.<BR /> <BR /> CATCH /iwbep/cx_qrl_locked. <BR /> RAISE EXCEPTION TYPE /iwbep/cx_qrl_locked.<BR /> <BR /> CATCH /iwbep/cx_qrl_delta_unavailabl. <BR /> RAISE EXCEPTION TYPE /iwbep/cx_qrl_delta_unavailabl.<BR /> ENDTRY.<BR /> <BR /> <BR /> * Export of new delta token<BR /> es_response_context-deltatoken = lv_delta_token.<BR /> <BR /> <BR /> * Export of deleted datas<BR /> copy_data_to_ref( EXPORTING is_data = lt_deleted_users<BR /> CHANGING cr_data = er_deleted_entityset ).<BR /> <BR /> * Export of modified or created datas<BR /> copy_data_to_ref( EXPORTING is_data = lt_users<BR /> CHANGING cr_data = er_entityset ).<BR /> <BR /> <BR /> WHEN OTHERS.<BR /> * Do nothing<BR /> <BR /> <BR /> ENDCASE.<BR /> ENDMETHOD.<BR /> </CODE></PRE><BR /> &nbsp;<BR /> <H1 id="toc-hId--786705180">Data persistence</H1><BR /> There is a constraint to the use of the "Delta" mode: the weight of the data!<BR /> <BR /> Each call using this mode generates logs in SAP, only if the result of that call differs from the previous one. These logs are like a snapshot of the result of the query. They are therefore fundamental to the operation of the "Delta" mode because they are the elements on which SAP relies to determine the existence of differences.<BR /> <BR /> These logs are stored in two tables:<BR /> <UL><BR /> <LI><STRONG>/IWBEP/D_QRL_HDR</STRONG></LI><BR /> <LI><STRONG>/IWBEP/D_QRL_ITM</STRONG></LI><BR /> </UL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/purge3.jpg" /></P><BR /> &nbsp;<BR /> <BR /> The first, contains the head data, while the second contains the detail, the signature, of each line returned.<BR /> <BR /> <STRONG>These records are specific to the user generating the</STRONG> call of the webservice.<BR /> <BR /> Thus, over time, these tables will contain more and more "unnecessary" data since obsolete. To avoid losing performance as a result of this data, it will be necessary to carry out a regular purge.<BR /> <BR /> &nbsp;<BR /> <BR /> There is a standard tool, provided by SAP:<BR /> <BR /> Report <STRONG>« /IWBEP/R_CLEAN_UP_QRL”</STRONG><BR /> <BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/04/purge2.jpg" /></P><BR /> <STRONG>Attention! </STRONG><BR /> If this table no longer contains the data you want to access (via the Delta Token), then the webservice will have to make a new call from the webservice but in "full" mode, i.e. without referring to the Delta Token (which will involve a longer processing time than in delta mode).<BR /> <BR /> That said, this full mode will trigger new logs that will be used in subsequent delta mode calls.<BR /> <BR /> &nbsp;<BR /> <BR /> <EM>Find more informations here about SAP GATEWAY and OData : <A href="https://help.sap.com/doc/saphelp_nw74/7.4.16/en-US/ec/aeea50ca692309e10000000a445394/content.htm?no_cache=true" target="_blank" rel="noopener noreferrer">https://help.sap.com/doc/saphelp_nw74/7.4.16/en-US/ec/aeea50ca692309e10000000a445394/content.htm?no_cache=true</A></EM><BR /> <BR /> &nbsp; 2020-04-14T18:45:58+02:00 https://community.sap.com/t5/technology-blogs-by-members/remediation-of-uncalled-active-icf-services/ba-p/13435159 Remediation of uncalled active ICF services 2020-06-18T10:23:53+02:00 JoeGoerlich https://community.sap.com/t5/user/viewprofilepage/user-id/2716 <H3 id="toc-hId-1060742432">Web applications and web services to rule them all</H3><BR /> &nbsp;<BR /> <H6 id="toc-hId-1251477084">Updates:<BR /> 2022-11-07: Added hint for new secure-by-default logs.</H6><BR /> <BR /> <HR /><BR /> <BR /> The time of SAP GUI as a proprietary interface for every user interaction seems to be over soon. SAP is moving towards serving more and more applications as web applications or web services - be it SAP Fiori, be it the Webgui utilising Screen Personas or OData or REST APIs.<BR /> <BR /> While this change counts in for sure to better user experience or using open standards for interfaces (e.g. towards cloud services), it also effects the SAP Basis Administrator:<BR /> A SAP basis administrator nowadays need to have a deep understanding of web technologies (additionally to understanding the SAP application server, the database as well as to the operating system like linux).<BR /> <BR /> I will not go into detail about the journey from the integration of Internet Communication Manager (ICM) as web server into SAP NW AS ABAP/Java or what to consider in general when operating a web server within your ERP system - maybe even exposed to the internet.<STRONG><BR /> In this blogpost I would like to catch up a topic which is more related to the content served by the Internet Communication Framework (ICF) through the ICM</STRONG>.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-667715422">“Please activate one or the other ICF service - it is urgent!”</H3><BR /> &nbsp;<BR /> <BR /> In the early days - before "Secure by Default" was a claim - SAP NetWeaver AS ABAP based systems were <STRONG>shipped with certain ICF services in status "activated".</STRONG> In addition to that, SAP Basis Administrators often where asked on short notice to quickly activate one or the other service in transaction SICF until some urgent needed functionality works. So it happened that there were more ICF service activated then ever needed, especially in the production system.<BR /> <BR /> While in the meantime SAP released many security notes to fix vulnerabilities in the SAP standard ICF services, <STRONG>in many systems a number of 500 up to more than 3000 ICF services are still enabled although they are not needed nor called</STRONG>.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-471201917">Bring some light into the darkness</H3><BR /> <SPAN style="color: #ff0000"><STRONG>Please note: As of SAP S/HANA-Version 2022 / ABAP Platform 2022 the so called <EM>secure-by-default logs</EM> for ICF calls are collected. These logs can be evaluated in transaction SBDLOG. Those can be used to activate all ICF services that have ever been logged or deactivate services that were not logged by choosing '<SPAN class="ph menucascade"><SPAN class="ph uicontrol">Menu' -&gt; '</SPAN><SPAN class="ph uicontrol">ICF Integration' in transaction SBDLOG</SPAN></SPAN>. With this, the manual steps described below can be omitted.</STRONG></SPAN><BR /> <BR /> &nbsp;<BR /> <BR /> At first lets export a list of the active ICF services of <STRONG>all of your systems (Dev, Int, Prod)</STRONG>&nbsp;by the following steps:<BR /> <OL><BR /> <LI>Go to transaction SE38.</LI><BR /> <LI>Execute report RS_ICF_SERV_ADMIN_TASKS.</LI><BR /> <LI>Choose “Export of Active Services to CSV File” and execute to save the file, e.g. as &lt;SID&gt;_active_services.csv<BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.03.29.png" height="391" width="403" /></LI><BR /> <LI>Again. Repeat these steps for every system in your landscape.</LI><BR /> </OL><BR /> To give yourself an overview about the active ICF services in your systems take a look at the exported lists. By screening every list you will figure out that <STRONG>the active services in the various systems of a system landscape will be different from system to system</STRONG>.<BR /> <BLOCKQUOTE>Please be aware <STRONG>for some services there is a good reason to be active in development or integration system only!</STRONG> There are services used for development purposes or there might be services for features which are not yet released to production. Besides that, there are web applications used only for one time tasks or initial setup. Or active services differ simply due to configuration drift.</BLOCKQUOTE><BR /> The main purpose of this lists is to use it a) <STRONG>as a template</STRONG> for the deactivation of uncalled ICF services in the next steps and b) <STRONG>as a backup</STRONG> to quickly mass re-activate all former active services in emergency case.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-274688412">What about service usage?</H3><BR /> &nbsp;<BR /> <BR /> It is strictly advisable to activate ICF services only if they are necessary for business needs in order <STRONG>to reduce the attack surface</STRONG>. Often there is no documentation which services are involved in what business functionality, some of them are even involved in more than one since they provide a framework&nbsp; functionality (e.g. for Webdynpro ABAP or BSP). So it might be hard for you to determine which service is truly needed in the first.<BR /> <BR /> As a quick win you could analyse how often each service were called in <STRONG>each of your systems</STRONG>. To do so there are at least three methods:<BR /> <OL><BR /> <LI>extract the relevant info from the HTTP access log of the ICM (parameter icm/HTTP/logging_&lt;xx&gt;).</LI><BR /> <LI>enable and evaluate the ICF trace using report RS_ICF_SERV_ADMIN_TASKS as mentioned in SAP note 2430473.</LI><BR /> <LI>evaluate the Web Statistics.</LI><BR /> </OL><BR /> Method 1 might be time consuming to gather all log files and grep and normalize the relevant parts.<BR /> <BR /> Method 2 could have a performance impact as of SAP note 1611713.<BR /> <BR /> Since Web Statistics are collected by default I recommend to use <STRONG>method 3</STRONG>. However, I like to advise to prolong the retention period of Web Statistics for this purpose in advance by following these steps:<BR /> <OL><BR /> <LI>Go to transaction ST03.</LI><BR /> <LI>Go to Collector and Performance DB -&gt; Performance Database -&gt; Workload Collector Database -&gt; Reorganization -&gt; Control.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.12.55.png" height="371" width="283" /></LI><BR /> <LI>Adjust retention period for the WEB statistics, e.g. TOTAL Monthly Aggregates Retention Period for `VC` and `VD`.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.15.03.png" height="195" width="722" /></LI><BR /> <LI>Again: Repeat these steps for every system in your landscape.</LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> <STRONG>After a reasonable time frame</STRONG> in which the Web Statistics for relevant phases (month end closing or alike) have been collected, the statistics can be exported by following these steps:<BR /> <OL><BR /> <LI>Go to transaction ST03.</LI><BR /> <LI>Expand Workload -&gt; Total -&gt; Month -&gt; and perform for each available month the following steps.</LI><BR /> <LI>Expand Analysis Views -&gt; Web Statistics -&gt; WEB Server Statistics.</LI><BR /> <LI>Switch to tab “URL”.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.20.05.png" /><SPAN style="font-size: 1rem"><B>Note:</B> The Web Statistics may contain entries for services which are not even present in the system but are requested for example by a scanning server.<BR /> <B>Hint: </B>You may have noticed the column “Protocol” indicates if a service is called via HTTP or HTTPS.</SPAN></LI><BR /> <LI>Export the list of URLs as spreadsheet (“Excel (in Office 2007 XLSX Format)“) using the “Export” button. (Note: available as of SAP_BASIS 7.02).</LI><BR /> <LI>Again: Repeat these steps for every system in your landscape.</LI><BR /> </OL><BR /> &nbsp;<BR /> <H3 id="toc-hId-78174907">Put the puzzle together</H3><BR /> &nbsp;<BR /> <BR /> Now it is time to compare the list of active services with the list of called services to prepare the cleanup.<BR /> <BR /> You can also think of comparing the lists across your system landscape. As already stated, for your development and integration system you should consider that there are indeed services active which are necessary for development purposes only or services which are in acceptance test and not yet set productive. These should be evaluated for the relevant systems. Talk to the developer team!<BR /> <BR /> Besides that there may also be web applications activated which are used only for initial setup tasks, e.g. SAML2 configuration or troubleshooting e.g. sec_diag_tool. You should consider to activate these only at configuration time or as long as needed.<BR /> <BR /> There may also be services which are actively used in the production system but are not activated in one or another system of the system landscape. It's time to <STRONG>eliminate this configuration drift</STRONG>.<BR /> <BR /> Ok, lets start the preparation:<BR /> <OL><BR /> <LI>Copy the export of active services CSV file as a template.</LI><BR /> <LI>Remove all lines which have an entry in column REF_PATH. These are aliases which point to a service node. Aliases can not be deactivated, but they will stop working if the original service is disabled.</LI><BR /> <LI>Remove all lines for called services and their parent paths from the list so that you end up with a list of ICF services which can be deactivated in the relevant system.</LI><BR /> <LI>Make sure no parent node stays in the list to be deactivated while it has sub nodes which should remain active. This would lead to so called "stale nodes" and non-working services. For example if /sap/bc/echo should stay active remove /sap, /sap/bc and /sap/bc/echo from the list.</LI><BR /> <LI>Save this list of your to-be-deactivated services as CSV file.</LI><BR /> <LI>Again: Repeat these steps for every system in your landscape.</LI><BR /> </OL><BR /> &nbsp;<BR /> <H3 id="toc-hId--118338598">Time to cleanup</H3><BR /> &nbsp;<BR /> <BR /> Now you can start deactivating unused services in each system with your processed templates by following these steps:<BR /> <OL><BR /> <LI>Open the list of active ICF services, e.g. &lt;SID&gt;_acvite_services.csv and doublecheck if it holds only to-be-deactivated ICF services.</LI><BR /> <LI>Go to transaction SE38.</LI><BR /> <LI>Execute report RS_ICF_SERV_MASS_PROCESSING.</LI><BR /> <LI>Select “Deactivate ICF Services for All Virtual Hosts Listed in CSV File” and execute.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.21.16.png" height="470" width="359" /></LI><BR /> <LI>Confirm the popup and upload the list to deactivate all services in the list.</LI><BR /> <LI>Again: Repeat these steps for every system in your landscape.</LI><BR /> </OL><BR /> Did you reveal a configuration drift? Activate the missing services in the relevant systems either manually in transaction SICF or by preparing a CSV file for mass activation.<BR /> <BR /> Maybe you have overlooked some parent paths during creation of the list and they have now been deactivated accidentally. This is not that fatal. You simply can perform a fresh "Export of Active Services to CSV File" and use this to “Activate ICF Services for All Virtual Hosts Listed in CSV File”. The activation logic of the report will then take care of activating also all necessary parent nodes.<BR /> <BR /> Keep in mind if something goes totally wrong you have also the initial export of active services as a backup which can be used to mass activate everything again as it was before.<BR /> <BR /> &nbsp;<BR /> <BR /> <EM>Just as a side note:</EM><BR /> <EM>The UCON HTTP whitelist scenario or former HTTP_WHITELIST does not serve for the same purpose as the UCON RFC Basic scenario. Meaning it does not affect the general reachability of certain paths through ICM! But this is a topic for another blogpost.</EM><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--314852103">Whats next?</H3><BR /> &nbsp;<BR /> <BR /> After finishing the deactivation in all systems, I recommend to "Export of Active Services to CSV File" once again. With this list you should <STRONG>start documenting your web services and their business need</STRONG>.<BR /> <BR /> I started to collect information about SAP standard ICF services in <A href="https://github.com/J-Goerlich/Standard_ICF_services" target="_blank" rel="nofollow noopener noreferrer">https://github.com/J-Goerlich/Standard_ICF_services</A> which may give you a hint if a service is needed in your scenario.<BR /> <BR /> &nbsp; 2020-06-18T10:23:53+02:00 https://community.sap.com/t5/technology-blogs-by-sap/500-internal-server-error-this-browser-is-not-supported-error-in-enterprise/ba-p/13475600 500 Internal Server Error. This browser is not supported - Error in Enterprise Portal in IE 11 2020-11-04T11:02:54+01:00 former_member189925 https://community.sap.com/t5/user/viewprofilepage/user-id/189925 <STRONG>Overview</STRONG><STRONG>&nbsp;:</STRONG><BR /> <BR /> A Webdynpro application is integrated in the Enterprise Portal to display the backend application to the end user<BR /> <BR /> Recently, on upgrading/updating ECC or backend and on launching WD ABAP application in portal error is seen as <STRONG>500 Internal Server Error. This browser is not supported, </STRONG>on launching from Internet Explorer 11.<BR /> <BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/QuirksBrowser.png" height="154" width="496" /></P><BR /> &nbsp;<BR /> <BR /> <STRONG>Environment&nbsp;:</STRONG><BR /> <UL><BR /> <LI>Enterprise Portal on SAP NetWeaver Java</LI><BR /> <LI>WebDynpro ABAP</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> <STRONG>Cause</STRONG><STRONG>&nbsp;:</STRONG><BR /> <BR /> The issue is caused by the application running in Quirks mode and going forward it will support Standards mode of rendering.<BR /> <BR /> &nbsp;<BR /> <BR /> Refer KBA # <A href="https://launchpad.support.sap.com/#/notes/2398889" target="_blank" rel="noopener noreferrer">2398889 - Internet Explorer support for Enterprise Portal</A><BR /> <BR /> As a limitation from Microsoft, IE11 can not render 2 contents using different document modes (quirks/standards) in the same frame/window<BR /> <BR /> (This scenario works fine for Chrome and Firefox).<BR /> <BR /> <STRONG>Solution</STRONG><STRONG>&nbsp;:</STRONG><BR /> <BR /> The KBA # <STRONG><A href="https://launchpad.support.sap.com/#/notes/2424773" target="_blank" rel="noopener noreferrer">2424773 - Display and Rendering issue in IE 11 in Portal</A> </STRONG>has the&nbsp;steps to solve the issue.<BR /> <BR /> The KBA has a quick test in the Cause Part, to check the requirement of the application in the browser via Console tab of the browser.<BR /> <BR /> To solve the issue one of the below solution can be implemented in Portal<BR /> <OL><BR /> <LI>To make the portal run in standards mode by making use of the framework page - Ajax standards mode framework.</LI><BR /> <LI>Changing the Launch in New Window" attribute (for iviews/pages) to "Display in separate headerless portal window (standards mode)"</LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> <STRONG>End of Quirks Mode Support for Internet Explorer :</STRONG><BR /> <BR /> Starting from NetWeaver 7.52 and/or SAP Kernel 753 and/or SAP_UI 7.52 used in lower NetWeaver AS ABAP versions, Quirks Mode (IE 5.5 rendering mode)&nbsp;of Internet Explorer is no longer supported by SAP for all SAP UI technologies (the SAP release date is planned for the end of Q3/2017) and cannot be executed anymore.<BR /> <BR /> If you use Enterprise Portal 7.50, change your framework page to Ajax Framework Page standards mode (AFP Standards) or Fiori Framework Page.<BR /> Refer Blog: <A href="https://blogs.sap.com/2017/04/02/bye-bye-quirks/" target="_blank" rel="noopener noreferrer">Bye Bye Quirks</A><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Additional Resources :</STRONG><BR /> <BR /> <A href="https://launchpad.support.sap.com/#/notes/2398889" target="_blank" rel="noopener noreferrer">2398889 - Internet Explorer support for Enterprise Portal</A><BR /> <BR /> <A href="https://launchpad.support.sap.com/#/notes/1672817" target="_blank" rel="noopener noreferrer">1672817 - Browser: Microsoft Legacy Edge and Internet Explorer Support Policy Note</A><BR /> <BR /> <A href="https://wiki.scn.sap.com/wiki/display/WDABAP/Browser+supporting" target="_blank" rel="noopener noreferrer">Web Dynpro ABAP - Browser supporting</A><BR /> <BR /> <A href="https://wiki.scn.sap.com/wiki/display/WDABAP/Internet+Explorer+document+modes" target="_blank" rel="noopener noreferrer">Internet Explorer document modes</A><BR /> <BR /> &nbsp; 2020-11-04T11:02:54+01:00 https://community.sap.com/t5/technology-blogs-by-sap/introducing-the-srt-moni-generic-search-framework-gsf-a-new-way-of/ba-p/13470416 Introducing the SRT_MONI Generic Search Framework (GSF) - a new way of filtering SOAP Web Service Messages by content 2020-11-30T22:33:12+01:00 former_member229976 https://community.sap.com/t5/user/viewprofilepage/user-id/229976 <STRONG>Introduction:</STRONG><BR /> <BR /> The transaction SRT_MONI is used to monitor ABAP-Web-Service-Messages (WS Messages). This transaction enables you to search for WS Messages, and filter them based on criteria like date, time, message ID, sender-, and receiver information etc. However, it is so far missing the functionality to filter the messages based on their content easily (transaction SRT_MONI also provides the possibility to search for content values, but that is more complex and can’t be run in background.<BR /> <BR /> Therefore, the SRT MONI Generic Search Framework (GSF) was developed. It introduces a new modular way to filter the messages based on the information extracted from their corresponding XML data. The goal of this development is to create an easy and customizable way to filter WS Messages based on their content.<BR /> <BR /> Details on the technical background can be found in the article <A href="https://blogs.sap.com/2020/12/03/extension-and-enhancement-of-the-srt_moni-generic-search-framework-gsf/" target="_blank" rel="noopener noreferrer">Extension and enhancement of the SRT_MONI Generic Search Framework (GSF)&nbsp;</A><BR /> <BR /> The new functionality is available by transaction code: <STRONG>SRT_MONI_GSF</STRONG><BR /> <BR /> To run this transaction the user needs to have the authorization to run transaction SRT_MONI.<BR /> <BR /> <STRONG>User Interface</STRONG><BR /> <BR /> Figure 1 shows a screenshot of the User Interface. So far, the user interface consists of two major sections. The standard selection criteria, which is not customizable, and the enhanced selection criteria, which is customizable using the GSF. The customization is explained below.<BR /> <BR /> The standard selection criteria are used to pre-select messages as shown in Figure 2 (the uppermost box). The section containing the enhanced selection criteria is used to browse the content of the WS message. The two dropdown menus “Search Object”, and “Selection Parameter” are used to group the technical names into different categories. The “Search Object” defines herby the generic term (e.g. Business Partner, Customer, Vendor etc.). The “Selection parameter” defines the subcategory (e.g. ID, Name etc.). Every Selection Parameter corresponds to an unlimited number of technical names. The grouping of the technical names is further explained in the enhanced technical description of Transaction SRT_MONI_GSF.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/fig_1_srt_moni_gsf.png" /></P><BR /> <STRONG>Figure 1 – User Interface</STRONG><BR /> <BR /> The pushbutton "Service Selection" provides the user with a popup (Figure 2) on which they can select the webservices they want to search for. By default, all webservices are selected. It is mandatory to select at least one webservice.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/select_deselect_services.png" /></P><BR /> <STRONG>Figure 2 – Select / De-select Services</STRONG><BR /> <BR /> In the field “Value(s)”, enter the values you want to search for, e.g. different Business Partner IDs. After all fields are filled, the search can be started either by pressing <STRONG>F8</STRONG>, by clicking the button "Execute" in the lower right corner, or by choosing "More" -&gt; "Program" -&gt; "Execute". The search starts in the foreground. The screen is locked until the program is done. An example of a result list is shown in Figure 3.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/search_results.png" /></P><BR /> <STRONG>Figure 3 – Example of a result list</STRONG><BR /> <BR /> The performance can be low due to a high number of messages that need to be extracted and analyzed. For that reason, foreground processing might not be useful. To offer more utility, background processing is available in the SRT Moni Generic Search Framework. By choosing "More" -&gt; "Program" -&gt; "Execute in Background", the search gets submitted as a job. You can display the running Job e.g. using transaction <STRONG>SM37 </STRONG>or via "More" -&gt; "System" -&gt; "Own Jobs". After the job has finished, the message IDs found are displayed in the print job log as shown in Figure 4.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/print_log.png" /></P><BR /> <STRONG>Figure 4 – Example of a result list as job log</STRONG><BR /> <BR /> The message IDs can be easily copied and transported for further analysis to transaction <STRONG>SRT_MONI</STRONG>.<BR /> <BR /> <STRONG>Delivery and initial usage hints</STRONG><BR /> <BR /> The new transaction is available via the following SAP notes:<BR /> <A href="https://launchpad.support.sap.com/#/notes/2971973" target="_blank" rel="noopener noreferrer">2971973</A> - SRT_MONI_GSF Creation of package<BR /> <A href="https://launchpad.support.sap.com/#/notes/2972601" target="_blank" rel="noopener noreferrer">2972601</A> - SRT_MONI_GSF Interface Note<BR /> <A href="https://launchpad.support.sap.com/#/notes/2972602" target="_blank" rel="noopener noreferrer">2972602</A> - SRT_MONI_GSF Application Note Business Partner<BR /> <A href="https://launchpad.support.sap.com/#/notes/2980590" target="_blank" rel="noopener noreferrer">2980590</A>&nbsp;- SRT_MONI_GSF Application Note T100 Messages<BR /> <BR /> The SAP notes have to be applied in the given order.<BR /> <BR /> Per default the new functionality is delivered for mainly Business Partner Services searching the name, number of the Business Partner or the number of the customer / supplier. Technically the supplier ID is listed as Vendor ID for historical reasons.<BR /> <BR /> The search itself for the names of the Business Partner does support wildcard search - the standard SAP search parameters are provided.<BR /> <BR /> Additionally all Services are used for an error message search. The error message search is very broad and should be provided with the following syntax:<BR /> <BR /> (R11)046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (see Figure 5)<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/message_search.png" /></P><BR /> <STRONG>Figure 5 – Syntax for searching for message within the service messages</STRONG><BR /> <BR /> The message search also provides Wildcard search as well as a search containing only the corresponding message number.<BR /> <BR /> <STRONG>Final remarks</STRONG><BR /> <BR /> As this is a very new functionality which hopefully enables easier acess to data echange via Web Services, a follow up Blog post will be provided to explain the technical bckground in more dtail and also will provide a step-by-step description of the very easy to use enhancement concept.<BR /> <BR /> In case an error occurs you would need to raise an incident on application component LO-MD-BP-WS.<BR /> <BR /> <EM>We have taken all measures possible to make this post as accurate as possible, but things sometimes fall through the cracks. In case you find any errors or inconsistencies please let us know.<BR /> The above given dates and times might change without notice and/or reflection in this blog. For latest accurate dates and times, please check out the referenced, and non-referenced information available from SAP</EM><BR /> <H3 id="toc-hId-1064290317"><EM>Update:</EM></H3><BR /> With SAP Notes <A href="https://launchpad.support.sap.com/#/notes/3101750" target="_blank" rel="noopener noreferrer">3101750</A> and <A href="https://launchpad.support.sap.com/#/notes/3101780" target="_blank" rel="noopener noreferrer">3101780&nbsp;</A>also the sender interface name is introduced. The purpose and usage is analogues to the receiver (e.g. instead of receivernametable use sendernametable) interface name. 2020-11-30T22:33:12+01:00 https://community.sap.com/t5/technology-blogs-by-sap/extension-and-enhancement-of-the-srt-moni-generic-search-framework-gsf/ba-p/13481693 Extension and enhancement of the SRT_MONI Generic Search Framework (GSF) 2020-12-03T09:15:42+01:00 felixmoehler https://community.sap.com/t5/user/viewprofilepage/user-id/698777 <STRONG>Introduction:</STRONG><BR /> <BR /> This blog post describes the technical background of the SRT_MONI Generic Search Framework (GSF) and explains how to create your own enhanced searches. For more general information on the SRT_MONI GSF please check out <A href="https://blogs.sap.com/2020/11/30/introducing-the-srt_moni-generic-search-framework-gsf-a-new-way-of-filtering-soap-web-service-messages-by-content/" target="_blank" rel="noopener noreferrer">Introducing the SRT_MONI Generic Search Framework</A>.<BR /> <BR /> The transaction is accessible via these SAP notes:<BR /> <BR /> <A href="https://launchpad.support.sap.com/#/notes/2971973" target="_blank" rel="noopener noreferrer">2971973</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SRT_MONI_GSF Creation of package (mandatory)<BR /> <A href="https://launchpad.support.sap.com/#/notes/2972601" target="_blank" rel="noopener noreferrer">2972601</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SRT_MONI_GSF Interface Note (mandatory)<BR /> <A href="https://launchpad.support.sap.com/#/notes/2972602" target="_blank" rel="noopener noreferrer">2972602</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SRT_MONI_GSF Application Note Business Partner (optional)<BR /> <A href="https://launchpad.support.sap.com/#/notes/2980590" target="_blank" rel="noopener noreferrer">2980590</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SRT_MONI_GSF Application Note T100 Messages (optional)<BR /> <A href="https://launchpad.support.sap.com/#/notes/3000261" target="_blank" rel="noopener noreferrer">3000261</A>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Documentation for Report "Web Service Utilities: Generic Search Framework" (optional)<BR /> <BR /> New functionality:<BR /> <BR /> <A href="https://launchpad.support.sap.com/#/notes/3101750" target="_blank" rel="noopener noreferrer">3101750</A>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp; The SRT_MONI Generic Search Framework does not offer the sender name of the service as filter criteria<BR /> <BR /> <STRONG>Content of a WS message</STRONG><BR /> <BR /> The SRT_MONI GSF is used to filter Webservice (WS) messages based on it's content. So let's start by taking a look at how this content is structured (Figure 1) :<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/ContentOfWSMessages.png" /></P><BR /> <P style="text-align: center"><EM>Figure 1 – Content of a WS Message</EM></P><BR /> A WS message usually is structured very simple, since it just consists of a column called NAME, and a column called VALUE. We will call the values inside the NAME column “technical names” and the values from the VALUE column the “corresponding values”.<BR /> <BR /> <STRONG>Technical Background</STRONG><BR /> <BR /> Before handing out a step-by-step guide on how to create own enhanced searches it is useful to know how the algorithm works.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/SearchAlgorithmDiagramNewUI.png" /></P><BR /> <P style="text-align: center"><EM>Figure 2 – Search Algorithm</EM></P><BR /> In Figure 2, the search algorithm is shown in detail. At first, the messages are selected based on the information extracted from the UI and the constructor of the specific subclass (e.g. time, date, processing status group, webservice name). The gathered messages are then extracted one by one and are filtered by their technical names and the corresponding values. If the search is successful, the message ID is saved, and the next message is analyzed until all messages have been browsed. If either the technical names or the corresponding values do not fit to the search parameters, the algorithm ignores the message, returns, and goes to the next message. After all messages have been analyzed, the saved message IDs are used to show a list of all found messages.<BR /> <BR /> Please be aware that the search can take some time, since the algorithm needs to extract and analyze all messages found after the “Pre-Selection” (the uppermost box in figure 2). It is recommended to narrow down the search criteria as much as possible.<BR /> <BR /> The SRT Moni Generic Search Framework also offers Background Processing as explained in <A href="https://blogs.sap.com/2020/11/30/introducing-the-srt_moni-generic-search-framework-gsf-a-new-way-of-filtering-soap-web-service-messages-by-content/" target="_blank" rel="noopener noreferrer">Introducing the SRT_MONI Generic Search Framework</A><BR /> <P style="overflow: hidden;margin-bottom: 0px"><STRONG>Enhancement of the User Interface (UI)</STRONG></P><BR /> Figure 3 shows you the area of the UI that can be defined by the user. This includes the two dropdown menus "Search Object" and "Selection Parameter" and the button "Service Selections".<BR /> <P style="overflow: hidden;margin-bottom: 0px"><STRONG><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/UIcustomization-1.png" /></STRONG></P><BR /> <P style="text-align: center"><EM>Figure 3 – Enhancement Area of the UI</EM></P><BR /> The dropdown menus are used to combine the technical names in logical units. You can find a further explanation to this concept in chapter <STRONG>Grouping of technical names</STRONG>. The button offers the possibility to select from a customized list of webservices. This is further described in chapter <STRONG>Enhancement of the GSF</STRONG>.<BR /> <BR /> <STRONG>Grouping of technical names</STRONG><BR /> <BR /> The grouping of the technical names is shown in Figure 7 as an example for the “Search Object” Business Partner. In this example the Business Partner has two “Selection Parameters”: ID and Name. Please note that this example is just for demonstration purposes!<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/GroupingNew-1.png" /></P><BR /> <P style="text-align: center"><EM>Figure 4 – Grouping of the Technical Names as an Example for the “Search Object” Business Partner</EM></P><BR /> The “Selection Parameter” ID has two technical names beneath it:<BR /> <UL><BR /> <LI>‘----InternalID’</LI><BR /> <LI>‘----ReceiverInternalID’</LI><BR /> </UL><BR /> The “Selection Parameter” Name has five technical names beneath it:<BR /> <UL><BR /> <LI>‘-------GivenName’</LI><BR /> <LI>‘-------MiddleName’</LI><BR /> <LI>‘-------FamilyName’</LI><BR /> <LI>‘-------AdditionalFamilyName’</LI><BR /> <LI>‘-------BirthName’</LI><BR /> </UL><BR /> Please be aware that this example is just to demonstrate that different quantities (with no limit) of technical names can be assigned to one “Selection Parameter”.<BR /> <BR /> During runtime, the values corresponding to the technical names are compared to the values entered in the field “Value(s)”. It is an select-option field and therefore the input of several values is possible, when you extend the field.<BR /> <BR /> <STRONG>Enhancement of the GSF</STRONG><BR /> <BR /> But enough with the background information. Lets have a look at how you can create and implement your own searches. In this chapter you can find a step-by-step guide on how to enhance the GSF to use your own “Search Object”, “Selection Parameter” with corresponding technical names, and “Service Selection”. We tried to make this as user-friendly as possible.<BR /> <BR /> The most important prerequisite is that you have imported and implemented at least the mandatory SAP notes mentioned in chapter&nbsp;<STRONG>Introduction</STRONG>.<BR /> <BR /> This example will create a demo class.<BR /> <P style="text-align: center"><EM><STRONG>Step 1</STRONG></EM></P><BR /> Create a new subclass of CL_SRT_MONI_GSF and press Save.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/DemoClassCreate.png" height="177" width="237" /></P><BR /> <P style="text-align: center"><EM>Figure 5 - Creation of a Demo Class as Subclass of CL_SRT_MONI_GSF</EM></P><BR /> <P style="text-align: center"><STRONG><EM>Step 2</EM></STRONG></P><BR /> Define and implement the constructor of this class by clicking on Constructor.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/ConstructorCreation.png" /></P><BR /> <P style="text-align: center"><EM>Figure 6 - Definition of the Constructor</EM></P><BR /> <P style="text-align: center"><EM><STRONG>Step 3</STRONG></EM></P><BR /> In the constructor, maintain the following attributes:<BR /> <UL><BR /> <LI>IF_SRT_MONI_GSF~IDENTIFIER TYPE STRING<BR /> <UL><BR /> <LI>Defines the name of the “Search Object" in this case DEMO</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/SearchObjectDemo.png" height="52" width="156" /></P><BR /> <P style="text-align: center"><EM>Figure 7 - Enhanced Search Object Dropdown</EM></P><BR /> <BR /> <UL><BR /> <LI>IF_SRT_MONI_GSF~TECHNICALSEARCHCRITERIA TYPE TT_SRT_MONI_GSF_SEL_IDENT<BR /> <UL><BR /> <LI>Defines the name of the “Selection Parameter” and the corresponding technical names</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/DemoSelectionParameter.png" height="64" width="182" /></P><BR /> <P style="text-align: center"><EM>Figure 8 - Enhanced Selection Parameter Dropdown</EM></P><BR /> You can use method IF_SRT_MONI_GSF~PROVIDE_TECSELCRIT_TO_CONSTRUC( ) to assist with the correct filling of the IF_SRT_MONI_GSF~TECHNICALSEARCHCRITERIA. To do so, call the method with the following parameters:<BR /> <UL><BR /> <LI>Importing Parameter: IV_SELECTION_IDENTIFIER TYPE STRING<BR /> <UL><BR /> <LI>Specifies the name of the selection identifier</LI><BR /> </UL><BR /> </LI><BR /> <LI>Changing Parameter: CT_SEARCH_PARAMETERS TYPE TT_SRT_MONI_TEC_PARAMS<BR /> <UL><BR /> <LI>Specifies the names of the technical names</LI><BR /> <LI>TYPE TABLE OF STRING</LI><BR /> </UL><BR /> </LI><BR /> <LI>The function must be called once for every entry in the selection parameter dropdown. So, in order to produce the dropdown as shown in Figure 8, you must call the method two times.</LI><BR /> </UL><BR /> <P style="text-align: center"><STRONG><EM>Step 4 (optional)</EM></STRONG></P><BR /> The constructor is already complete. After saving and activation the class is already usable. However, you can narrow down the search criteria further. This might be useful for certain Webservices. In the constructor, you can maintain optional attributes as shown below:<BR /> <UL><BR /> <LI>IF_SRT_MONI_GSF~RECEIVERNAMESINGLE TYPE STRING<BR /> <UL><BR /> <LI>Specifies a single interface receiver name (e.g. wildcard ‘BusinessPartner*’)</LI><BR /> </UL><BR /> </LI><BR /> <LI>IF_SRT_MONI_GSF~RECEIVERNAMETABLE TYPE IF_SRT_MONI_GSF~TT_SRT_MONI_GSF_SERVICE<BR /> <UL><BR /> <LI>Specifies multiple interface receiver names</LI><BR /> <LI>If this table is filled, it is used by default. If the table is not filled, the value from IF_SRT_MONI_GSF~RECEIVERNAMESINGLE is used</LI><BR /> <LI>Table Type TT_SRT_MONI_GSF_SERVICES</LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> In this example both IF_SRT_MONI_GSF~RECEIVERNAMESINGLE and IF_SRT_MONI_GSF~RECEIVERNAMETABLE are filled, so the programs logic will only show the values specified inside IF_SRT_MONI_GSF~RECEIVERNAMETABLE.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/12/ServiceSelectionUI.png" /></P><BR /> <P style="text-align: center"><EM>Figure 9 - Enhanced Service Selection Pop Up</EM></P><BR /> With SAP Note <A href="https://launchpad.support.sap.com/#/notes/3101750" target="_blank" rel="noopener noreferrer">3101750</A> also the sender interface name is introduced. The purpose and usage is analogues to the receiver interface name (e.g. instead of receivernametable use sendernametable). You can find the complete constructor of our example class DEMO below:<BR /> <PRE class="language-abap"><CODE> METHOD constructor.<BR /> DATA: lt_tecsearch_param TYPE if_srt_moni_gsf~tt_srt_moni_gsf_tec_params,<BR /> ls_receivernametable TYPE if_srt_moni_gsf~st_srt_moni_gsf_services.<BR /> super-&gt;constructor( ).<BR /> <BR /> * Fill value for own name - used in first dropdown<BR /> if_srt_moni_gsf~identifier = 'DEMO'.<BR /> <BR /> * Fill value for object specific search values which are checked in the XMLs and group them if necessary<BR /> <BR /> APPEND 'DEMOTechnicalName1' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName2' TO lt_tecsearch_param.<BR /> <BR /> if_srt_moni_gsf~provide_tecselcrit_to_construc(<BR /> EXPORTING<BR /> iv_selection_identifier = 'DEMOSelectionParameter1'<BR /> CHANGING<BR /> ct_search_parameters = lt_tecsearch_param ).<BR /> <BR /> APPEND 'DEMOTechnicalName3' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName4' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName5' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName6' TO lt_tecsearch_param.<BR /> <BR /> if_srt_moni_gsf~provide_tecselcrit_to_construc(<BR /> EXPORTING<BR /> iv_selection_identifier = 'DEMOSelectionParameter2'<BR /> CHANGING<BR /> ct_search_parameters = lt_tecsearch_param ).<BR /> <BR /> * Fill filter on receiver webservice name<BR /> * Logic is: If table filter is set, use ONLY these services. If not and single is set, use this one.<BR /> * If both are not set, display all<BR /> * Using single value only will increase the performance<BR /> <BR /> if_srt_moni_gsf~receivernamesingle = 'DEMOWebService*'.<BR /> <BR /> ls_receivernametable-name = 'DEMOWebService1'.<BR /> ls_receivernametable-selected = abap_true.<BR /> <BR /> APPEND ls_receivernametable TO if_srt_moni_gsf~receivernametable.<BR /> <BR /> ls_receivernametable-name = 'DEMOWebService2'.<BR /> APPEND ls_receivernametable TO if_srt_moni_gsf~receivernametable.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> Explanation: At first two attributes are declared. Afterwards, the constructor of the superclass is called. Then the name of the “Search Object” is defined, in this case, the name is ‘DEMO’. The dropdown menu “Selection Parameter” is filled by the two method calls. The table LT_TECSEARCH_PARAM is holding the technical names. In this example, the table was filled using an APPEND statement. Inside the method call IF_SRT_MONI_GSF~PROVIDE_TECSELCRIT_TO_CONSTRUC this table gets cleared, so it can be reused for the second method call. You can append an unlimited number of technical names to this table. In this state, the constructor will already be working. However, you can optionally fill in the receiver names as demonstrated in the code snippet. Note that there would be no need to fill the “receivernamesingle” here, because the “receivernametable” is filled automatically. By specifying<BR /> <PRE class="language-abap"><CODE>ls_receivernametable-selected = abap_true.</CODE></PRE><BR /> the Webservice appended to the "receivernametable" will be set to selected by default when starting the transaction.<BR /> <BR /> Besides enhancing the UI and the search criteria in the constructor, you can also implement your own authorization and plausibility checks. To implement a customized authorization or plausibility check, the methods IF_SRT_MONI_GSF~AUTHORIZATION_CHECK and IF_SRT_MONI_GSF~OBJECT_PLAUSIBILITY_CHECK need to be redefined inside the Object Class.<BR /> <BR /> <STRONG>Conclusion</STRONG><BR /> <BR /> In this blog post, an overview of how to extend the SRT_MONI GSF by customized searches was given. In addition, you learned about the search algorithm that is used by the framework. I hope that the SRT_MONI GSF will assist you when working with ABAP Web Service Messages.<BR /> <BR /> In case an error occurs please raise an incident on application component LO-MD-BP-WS.<BR /> <BR /> <EM>We have taken all measures possible to make this post as accurate as possible, but things sometimes fall through the cracks. In case you find any errors or inconsistencies please let us know.<BR /> The above given dates and times might change without notice and/or reflection in this blog post. For latest accurate dates and times, please check out the referenced, and non-referenced information available from SAP.</EM> 2020-12-03T09:15:42+01:00 https://community.sap.com/t5/spend-management-blogs-by-members/how-to-send-multiple-erp-systems-master-data-ecc-to-ariba-on-demand/ba-p/13475414 How to send multiple ERP systems master data (ECC) to ARIBA On-Demand 2020-12-03T20:19:15+01:00 srikanth_j4 https://community.sap.com/t5/user/viewprofilepage/user-id/191500 /ARBA/MASTER_DATA_EXPORT using this program we can upload master data&nbsp; to ARIBA Cloud from ECC<BR /> <OL><BR /> <LI>The program /ARBA/MASTER_DATA_EXPORT should be set up to run on a desired schedule to extract information&nbsp; from the relevant SAP tables for the objects</LI><BR /> <LI>&nbsp;The output of the program is a .CSV file containing the information necessary for the update</LI><BR /> <LI>&nbsp;The file automatically transmitted to the Ariba on -Demand application through&nbsp; an HTTP post</LI><BR /> <LI>&nbsp;The file is received by the Ariba on-demand application processed by a receiving job that is triggered at the time the data is transmitted( Immediate processing in Ariba)</LI><BR /> <LI>The values in Ariba on -Demand are updated with any errors noted in the processing log of the Ariba on-Demand administration console</LI><BR /> </OL><BR /> <UL><BR /> <LI><STRONG>Full load</STRONG></LI><BR /> <LI><STRONG>Incremental Load&nbsp;</STRONG></LI><BR /> </UL><BR /> Following data can be transferred to Ariba Cloud<BR /> <UL><BR /> <LI>General ledger</LI><BR /> <LI>InternalOrder</LI><BR /> <LI>Costcenter</LI><BR /> <LI>Wbselement</LI><BR /> <LI>Asset</LI><BR /> <LI>Supplier related data</LI><BR /> <LI>Remittance location</LI><BR /> <LI>Purchaseorg</LI><BR /> <LI>User related data</LI><BR /> <LI>User and User group</LI><BR /> <LI>Companycode</LI><BR /> </UL><BR /> Overview for multiple systems:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/ariba-multi-system.png" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px">To differentiate Master Data&nbsp; from all the ERP(ECC) systems , We have to do prefix specific to system&nbsp; for the following data</P><BR /> Example : Supplier Number : 123456 , if we add&nbsp; prefix to suppplier&nbsp; it will be - ERP1_123456 like wise , we have to do for each and every system..<BR /> <UL><BR /> <LI>General ledger</LI><BR /> <LI>InternalOrder</LI><BR /> <LI>Costcenter</LI><BR /> <LI>Wbselement</LI><BR /> <LI>Asset</LI><BR /> <LI>Supplier related data</LI><BR /> <LI>Remittance location</LI><BR /> <LI>Purchaseorg</LI><BR /> <LI>User related data</LI><BR /> <LI>User and User group</LI><BR /> <LI>Companycode</LI><BR /> <LI>Plant</LI><BR /> </UL><BR /> How to do a prefix for master data ?<BR /> <P style="overflow: hidden;margin-bottom: 0px">Following&nbsp; BADI&nbsp; will be implemented,&nbsp; &nbsp;prefix&nbsp; will be added in the runtime, send the data to Ariba <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/ariba-badi-1.png" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px">This Badi has multiple methods <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/11/ariba-badi2-1.png" /></P><BR /> each method is relevant&nbsp; for specific data like Company code , Plant ...using this methods we can enhance and&nbsp; &nbsp;prefix the master data<BR /> <BR /> Example : prefixing Vendor Purchase group information<BR /> <BR /> Code :<BR /> <PRE class="language-abap"><CODE>Data :lt_SYSTID_MAP type STANDARD TABLE OF /ARBA/SYSTID_MAP,<BR /> ls_SYSTID_MAP type /ARBA/SYSTID_MAP,<BR /> ls_vendor_info type /arba/vendor,<BR /> ls_vendor_PORG_INFO type /arba/vendor_Po,<BR /> lv_lifnr(20) type c,<BR /> lv_lifnr1(20) type c,<BR /> lv_ekorgx(20) type c,<BR /> lv_namex(50) type c,<BR /> lv_purcsx(20) type c,<BR /> lv_sidx(20) type c,<BR /> lv_tbix type sy-tabix,<BR /> lv_system(4) type c,<BR /> lv_value TYPE tvarv_val,<BR /> lv_name TYPE rvari_vnam VALUE 'ERP_ID'.<BR /> <BR /> <BR /> SELECT SINGLE low " will read value from buffer<BR /> INTO lv_value<BR /> FROM tvarvc<BR /> WHERE name = lv_name.<BR /> IF sy-subrc = 0.<BR /> lv_system = lv_value.<BR /> ENDIF.<BR /> CLEAR : lv_lifnr,lv_namex.<BR /> LOOP AT vendor_info[] INTO ls_vendor_info.<BR /> lv_tbix = sy-tabix.<BR /> <BR /> CONCATENATE lv_system ls_vendor_info-lifnr INTO<BR /> lv_lifnr.<BR /> CONCATENATE lv_system ls_vendor_info-name1 INTO<BR /> lv_namex.<BR /> CONCATENATE lv_system ls_vendor_info-systemid INTO<BR /> lv_sidx.<BR /> <BR /> ls_vendor_info-lifnrx = lv_lifnr.<BR /> ls_vendor_info-namex = lv_namex.<BR /> ls_vendor_info-sidx = lv_sidx.<BR /> <BR /> MODIFY vendor_info from ls_vendor_info INDEX lv_tbix.<BR /> ENDLOOP.<BR /> <BR /> LOOP AT vendor_PORG_info[] INTO ls_vendor_porg_info.<BR /> lv_tbix = sy-tabix.<BR /> <BR /> CONCATENATE lv_system ls_vendor_porg_info-lifnr INTO<BR /> lv_lifnr.<BR /> CONCATENATE lv_system ls_vendor_porg_info-ekorg INTO<BR /> lv_ekorgx.<BR /> <BR /> ls_vendor_porg_info-lifnrx = lv_lifnr.<BR /> ls_vendor_porg_info-ekorgx = lv_ekorgx.<BR /> <BR /> <BR /> MODIFY vendor_porg_info from ls_vendor_porg_info INDEX lv_tbix.<BR /> ENDLOOP<BR /> </CODE></PRE><BR /> &nbsp;<BR /> <BR /> Conclusion : This way , We can send multiple ERP system data to ARIBA Cloud .<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2020-12-03T20:19:15+01:00 https://community.sap.com/t5/technology-blogs-by-members/sap-netweaver-googleauthenticator-freeotp-for-fiori-launchpad-using/ba-p/13466557 SAP Netweaver GoogleAuthenticator/FreeOTP for Fiori Launchpad using Keycloak (on Premise) 2021-01-30T20:05:58+01:00 shankar_gomare https://community.sap.com/t5/user/viewprofilepage/user-id/721486 In this article we will learn to configuring Multi-factor Authentication (MFA) or 2 Factor Authentication(2FA) for on premise Fiori Launchpad using <STRONG>Keycloak;</STRONG>&nbsp;an open source Identity and Access Management tool.<BR /> <BR /> <IFRAME width="560" height="315" src="https://www.youtube.com/embed/_QmMRTdAr6I" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></IFRAME><BR /> <BR /> <EM>Image icons courtesy SAP and Keycloak</EM><BR /> <BR /> Things required for this configurations:<BR /> <OL><BR /> <LI>Keycloak</LI><BR /> <LI>Fiori Launchpad on SAP Netweaver</LI><BR /> <LI>Google Authenticator or FreeOTP</LI><BR /> </OL><BR /> Keycloak is available as free to download (Apache license) in multiple deployment options, I will be using standalone server deployment for this purpose but the configuration steps will not change based on deployment options. This article covers configuration aspect of Keycloak, and installation is beyond scope of this article, though standalone installation is fairly simple and it requires just a single command.<BR /> <BR /> The SAML configuration steps are nearly identical in all SAP Netweaver versions, I will be using 7.52 for this article.<BR /> <BR /> We will be using Keycloak as Identity Provider (IdP) and SAP Netweaver as Service Provider(SP). First step is to configure SAP Netweaver as SP, so head over to SAP GUI and launch SAML configuration using transaction code "SAML2". This will launch SAML configuration web page (if you see an error, activate SAML2 service in SICF) which looks like below:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-03-42.png" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-05-16.png" /></P><BR /> Click on "Enable SAML 2.0 Support" and select "Create SAML 2.0 Local Provider" option.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-06-38.png" /></P><BR /> On next screen enter provider name, usually FQDN is preferred for better understanding but it is not mandatory to do so, any name would work.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-10-03.png" /></P><BR /> Click next to continue.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-11-20.png" /></P><BR /> Everything can be left as default, however, if you prefer not see IdP selection page before redirecting to IdP login page, select "Automatically", and click finish.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-16-35.png" /></P><BR /> Congratulations! you have successfully configured SAP Netweaver as Service Provider(SP). isn't that easy?<BR /> <BR /> Now head-over to Keycloak, after successful login Keycloak configuration page looks like below:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-21-30.png" /></P><BR /> We need SAML2 certificate and metadata to setup trust relationship between SAP Netweaver and Keycloak. Click on "SAML 2.0 Identity Provider Metadata" next to "Endpoints" and save it as ".xml" file.<BR /> <BR /> Now, we have to upload metadata and SAML2 certificate in SAP Netweaver, switch back to SAP Netweaver SAML2 configuration page.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-26-05.png" /></P><BR /> Click on "Trusted Providers" tab and add "Upload Metadata Files".<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-28-27.png" /></P><BR /> Upload metadata file downloaded earlier from Keycloak configuration page.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-30-06.png" /></P><BR /> Click next to continue, if alias configured on this page, it will be shown on IdP selection before redirecting to IdP login page.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-31-56.png" /></P><BR /> Click next to continue, if this is production installation make sure to change "Digest Algorithm" to higher value possibly SHA-256.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-34-30.png" /></P><BR /> Click next to continue<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-35-14.png" /></P><BR /> Click next to continue<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-35-52.png" /></P><BR /> Click next to continue<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-36-39.png" /></P><BR /> Keycloak user will be mapped using email attribute, so select "Comparison Method" "Minimum" and add "PasswordProtectedTransport" in "List of Requested Authentication Context". These are bare minimum settings required to use user mapping, if this is production install I would recommend to use better "Comparison Method"<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-41-07.png" /></P><BR /> The configuration wizard will finish on this page, next we need to map Keycloak user attribute to SAP Netweaver user.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-42-22.png" /></P><BR /> Click edit and add email in "Supported NameID Formats" and change "User ID Mapping Mode" to "Logon Alias".<BR /> <BR /> In this step, we will map Keycloak user attribute "Email" to SAP Netweaver user attribute "Logon Alias", make sure to maintain both email and logon alias in respective systems.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-45-26.png" /></P><BR /> Save and Enable.<BR /> <BR /> Congratulations! another mile stone, we have successfully setup trust relationship between Keycloak and SAP Netweaver. However, Keycloak does not recognise SAP Netweaver system as a client yet. So, let's download metadata from our Service provider i.e SAP Netweaver.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-49-54.png" /></P><BR /> Switch to "Local Provider" tab and click on "Metadata" button, a prompt will show Metadata download option, download to local drive.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-52-15.png" /></P><BR /> Switch back to Keycloak configuration page and select "Clients". Create a new client using "Create" button on right.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-56-30.png" /></P><BR /> Import SAP Netweaver metadata file downloaded earlier and save the configuration. We have successfully completed bidirectional trust relationship between Keycloak and SAP Netweaver.<BR /> <BR /> Last step is to create users in both the systems and assign their mapping attributes. i,e E-mail ID and Logon Alias in Keycloak and SAP Netweaver respectively.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-19-59-57.png" /></P><BR /> Click on "Users" and create a new user with email ID. Unlikely Tony Stark will use Keycloak, let's assume JARVIS controls everything though SSO.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-20-01-58.png" /></P><BR /> Save user and make sure to maintain password on "Credentials" page (turnoff "Temporary" switch to make sure system doesn't prompt for password change)<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-20-05-57.png" /></P><BR /> Create a new user in SAP with logon alias as email ID created earlier in Keycloak, this is a last step in our configuration.<BR /> <BR /> Now, it's time to test our brand new configuration, run "/n/UI2/FLP" transaction in SAP GUI to launch Fiori Launchpad and copy the URL. Open launchpad URL in another browser or in a new private mode tab. If you had selected "Identity Provider Discovery: Common Domain Cookie" earlier as automatic you will be redirected to Keycloak login page else you need to click continue on SAP Netweaver login page and the system will redirect to Keycloak login page as below:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-20-11-22.png" /></P><BR /> Now it is time to test our user, enter username and password and click "Log in", on successful authentication the login page will redirect to Fiori Launchpad.<BR /> <BR /> Next step is to activate MFA, switch back to Keycloak and edit user "Tony" or whatever user you had created earlier.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-20-21-40.png" /></P><BR /> Select "Configure OTP" under "Required User Actions". On next logon, the system will prompt to link you mobile device using "FreeOTP" or "Google Authenticator" OTP app, follow the instructions.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/01/Screenshot-from-2020-11-29-20-26-46.png" /></P><BR /> That's it, Congratulations! You have MFA enabled Fiori Launchpad.<BR /> <BR /> &nbsp;<BR /> <BR /> <EM>If you like this article, feel free to share, tweet, like or follow me for new articles.</EM> 2021-01-30T20:05:58+01:00 https://community.sap.com/t5/technology-blogs-by-sap/extension-and-enhancement-of-sxi-monitor-generic-search-framework/ba-p/13500127 Extension and enhancement of SXI_MONITOR Generic Search Framework 2021-05-17T19:38:40+02:00 m_keskin https://community.sap.com/t5/user/viewprofilepage/user-id/745461 <STRONG>Introduction</STRONG><BR /> <BR /> This blog post describes the technical background of the SXI_MONITOR Generic Search Framework and explains how to create your own enhanced searches. For more general information on the SXI_MONITOR_GSF please check out <A href="https://blogs.sap.com/?p=1337335&amp;preview=true&amp;preview_id=1337335" target="_blank" rel="noopener noreferrer">Introducing the SXI_MONITOR Generic Search Framework.</A><BR /> <BR /> The new transaction is available via the following SAP notes:<BR /> <UL><BR /> <LI><A href="https://launchpad.support.sap.com/#/notes/2971973" target="_blank" rel="noopener noreferrer">2971973</A> - SRT_MONI_GSF Creation of package</LI><BR /> <LI><A href="https://launchpad.support.sap.com/#/notes/3035719" target="_blank" rel="noopener noreferrer">3035719</A> - Generic Search Framework for SXI_MONITOR - Interface Note</LI><BR /> <LI><A href="https://launchpad.support.sap.com/#/notes/3035724" target="_blank" rel="noopener noreferrer">3035724 </A>- Generic Search Framework for SXI_MONITOR_GSF - Application Note BP</LI><BR /> </UL><BR /> <STRONG>Content of an XML message</STRONG><BR /> <BR /> The SXI_MONITOR Generic Search Framework is used to filter XML message based on its content. The following figure shows how an XML message is structured.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/structur-xml2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 1: Content of a XML Message with Organization Data</P><BR /> An XML message as shown above consists of elements, attributes, their value assignments, and the content of the elements. The fields marked in red in the above example are called "technical names", and the corresponding values marked in green are called "corresponding values".<BR /> <BR /> <STRONG>Technical Background</STRONG><BR /> <BR /> Before we look at how the extension and enhancement of the SXI_MONITOR Generic Search Framework can be carried out, let's take a closer look at how the algorithm works.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/Prasentatio2.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 2: Search Algorithm</P><BR /> The figure above shows the search algorithm in detail. The first step is to filter the XML messages based on the information specified on the user interface and in the constructor of the subclass. The filter consists of various information such as: Date, time, status group or name of the service. The gathered XML messages are then extracted one by one and are filtered by their technical names and the corresponding values. If there is an XML message that fits to the technical names and corresponding values, the message ID is saved. If there is no XML message that not fit to the search parameter, the algorithm ignores the message and goes to the next XML message. All these steps are carried out until all XML messages have been processed. Finally, the XML messages that are found and stored with the message ID are show as a list.<BR /> <BR /> Please be aware that the search can take some time, since the algorithm needs to extract and analyze all messages found after the “Pre-Selection”. It is recommended to narrow down the search criteria as much as possible.<BR /> <BR /> The SXI_MONITOR Generic Search Framework also offers Background Processing as explained in Introducing the SXI_MONITOR Generic Search Framework.<BR /> <BR /> <STRONG>Enhancement of the User Interface</STRONG><BR /> <BR /> Below you can see the user interface of SXI_MONITOR Generic Search Framework, which can be defined by the user. This includes the two dropdown menus “Search Object” and “Selection Parameter” and the button “Service Selections”.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/enhancement1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 3: Enhancement Area of the User Interface</P><BR /> <STRONG>Grouping of technical names</STRONG><BR /> <BR /> The grouping of the technical names is shown as an example for the “Search Object” Business Partner. In this example the Business Partner has two “Selection Parameters”: ID and Name. Please note that this example is just for demonstration purposes!<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/grouping1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 4: Grouping of the Technical Names as an Example for the “Search Object” Business Partner</P><BR /> The “Selection Parameter” ID has three technical names beneath it:<BR /> <UL><BR /> <LI>‘PartyID’</LI><BR /> <LI>‘BusinessPartnerInternalID’</LI><BR /> <LI>RelationshipBusinessPartnerInternalID’</LI><BR /> <LI>The “Selection Parameter” Name has 10 technical names beneath it:</LI><BR /> <LI>‘Name1’</LI><BR /> <LI>‘Name2’</LI><BR /> <LI>‘Name3’</LI><BR /> <LI>‘Name4’</LI><BR /> <LI>‘GivenName’</LI><BR /> <LI>‘SecondName’</LI><BR /> <LI>‘FamilyName’</LI><BR /> <LI>‘BirthName’</LI><BR /> <LI>‘MiddleName’</LI><BR /> <LI>‘PreferredGivenName’</LI><BR /> </UL><BR /> Please be aware that this example is just to demonstrate that different number of technical names can be assigned to one “Selection Parameter”.<BR /> <BR /> During runtime, the values corresponding to the technical names are compared to the values entered in the field “Value(s)”. It is an select-option field and therefore the input of several values is possible.<BR /> <BR /> <STRONG>Enhancement of the Generic Search Framework</STRONG><BR /> <BR /> In this part of the blog post we will take a step-by-step look at how to enhance the Generic Search Framework for your own “Search Object”, “Selection Parameter” with corresponding technical names, and “Service Selection”. We tried to make this as user-friendly as possible. The most important prerequisite is that you have imported and implemented at least the mandatory SAP notes mentioned in chapter introduction. This example will create a demo class.<BR /> <BR /> <EM>Step 1:</EM><BR /> <BR /> Create a new subclass of CL_SXI_MONITOR_GSF and save it.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/create-class.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 5: Creation of a Demo Class as Subclass of CL_SXI_MONITOR_GSF</P><BR /> <EM>Step 2:</EM><BR /> <BR /> Define and implement the constructor of this class by clicking on Constructor.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/create-constructor.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 6: Definition of the Constructor</P><BR /> <EM>Step 3:</EM><BR /> <BR /> In the constructor, maintain the following attributes:<BR /> <UL><BR /> <LI>IF_SXI_MONITOR_GSF~IDENTIFIER, which defines the name of the “Search Object”</LI><BR /> </UL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/search-object-dd.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 7: Enhanced Search Object Dropdown</P><BR /> <BR /> <UL><BR /> <LI>IF_SXI_MONITOR_GSF~TECHNICALSEARCHCRITERIA, which defines the name of the “Selection Parameter” and the corresponding technical names</LI><BR /> </UL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/selection-parameter-dd2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 8: Enhanced Selection Parameter Dropdown</P><BR /> For the correct filling of “Selection Parameter” you can use the method IF_SXI_MONITOR_GSF~PROVIDE_TECSELCRIT_TO_CONSTRUC( ). To do so, call the method with the following parameters:<BR /> <UL><BR /> <LI>Importing Parameter: IV_SELECTION_IDENTIFIER, which specifies the names of the selection identifier</LI><BR /> <LI>Changing Parameter: CT_SEARCH_PARAMETERS, which specifies the names of the technical names</LI><BR /> </UL><BR /> The function must be called once for every entry in the selection parameter dropdown. So, to produce the dropdown as shown in Figure, you must call the method three times<BR /> <BR /> <EM>Step 4 (optional):</EM><BR /> <BR /> An optional enhancement can still be added, which can narrow down the search criteria. This is the “Service Selection”, which is also added in the constructor. To do this, the following steps should be carried out:<BR /> <UL><BR /> <LI>IF_SXI_MONITOR_GSF~SENDERNAMESINGLE, which specifies a single interface sender name (e.g. wildcard ‘*BusinessPartner*’).</LI><BR /> <LI>IF_SXI_MONITOR_GSF~SENDERNAMETABLE, which specifies multiple interface sender names. If this table filled, it is used by default.</LI><BR /> <LI>IF_SXI_MONITOR_GSF~RECEIVERNAMESINGLE, which specifies a single interface receiver name.</LI><BR /> <LI>IF_SXI_MONITOR_GSF~RECEIVERNAMETABLE, which specifies multiple interface receiver names. If this table filled, it is used by default.</LI><BR /> </UL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/demo.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Figure 9: Enhanced Service Selection Pop Up</P><BR /> You can find the complete constructor of our example class DEMO below:<BR /> <PRE class="language-abap"><CODE>METHOD constructor.<BR /> DATA: lt_tecsearch_param TYPE if_sxi_monitor_gsf~tt_sxi_monitor_gsf_tec_params,<BR /> ls_sendernametable TYPE if_sxi_monitor_gsf~st_sxi_monitor_gsf_services,<BR /> ls_receivernametable TYPE if_sxi_monitor_gsf~st_sxi_monitor_gsf_services.<BR /> <BR /> <BR /> super-&gt;constructor( ).<BR /> <BR /> * Fill value for own name - used in first dropdown<BR /> if_sxi_monitor_gsf~identifier = 'DEMO'.<BR /> <BR /> * Fill value for object specific search values which are checked in the XMLs and group them if necessary<BR /> <BR /> APPEND 'DEMOTechnicalName1' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName2' TO lt_tecsearch_param.<BR /> <BR /> if_sxi_monitor_gsf~provide_tecselcrit_to_construc(<BR /> EXPORTING<BR /> iv_selection_identifier = 'DEMOSelectionParameter1'<BR /> CHANGING<BR /> ct_search_parameters = lt_tecsearch_param ).<BR /> <BR /> APPEND 'DEMOTechnicalName3' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName4' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName5' TO lt_tecsearch_param.<BR /> APPEND 'DEMOTechnicalName6' TO lt_tecsearch_param.<BR /> <BR /> if_sxi_monitor_gsf~provide_tecselcrit_to_construc(<BR /> EXPORTING<BR /> iv_selection_identifier = 'DEMOSelectionParameter2'<BR /> CHANGING<BR /> ct_search_parameters = lt_tecsearch_param ).<BR /> <BR /> if_sxi_monitor_gsf~provide_tecselcrit_to_construc(<BR /> EXPORTING<BR /> iv_selection_identifier = 'DEMOSelectionParameter3'<BR /> CHANGING<BR /> ct_search_parameters = lt_tecsearch_param ).<BR /> <BR /> * Fill filter on sender webservice name<BR /> * Logic is: If table filter is set, use ONLY these services. If not and single is set, use this one.<BR /> * If both are not set, display all<BR /> * Using single value only will increase the performance<BR /> <BR /> if_sxi_monitor_gsf~sendernamesingle = 'DEMOSenderService*'.<BR /> if_sxi_monitor_gsf~receivernamesingle = 'DEMOReceiverService*'.<BR /> <BR /> ls_sendernametable-name = 'DEMOService1'.<BR /> ls_sendernametable-selected = abap_true.<BR /> <BR /> APPEND ls_sendernametable TO if_sxi_monitor_gsf~sendernametable.<BR /> <BR /> ls_sendernametable-name = 'DEMOService2'.<BR /> APPEND ls_sendernametable TO if_sxi_monitor_gsf~sendernametable.<BR /> <BR /> ls_sendernametable-name = 'DEMOService3'.<BR /> APPEND ls_sendernametable TO if_sxi_monitor_gsf~sendernametable.<BR /> <BR /> ls_receivernametable-name = 'DEMOReceiverService4'.<BR /> ls_receivernametable-selected = abap_true.<BR /> <BR /> APPEND ls_receivernametable TO if_sxi_monitor_gsf~receivernametable.<BR /> <BR /> ls_receivernametable-name = 'DEMOReceiverService5'.<BR /> APPEND ls_receivernametable TO if_sxi_monitor_gsf~receivernametable.<BR /> <BR /> ls_receivernametable-name = 'DEMOReceiverService6'.<BR /> APPEND ls_receivernametable TO if_sxi_monitor_gsf~receivernametable.<BR /> ENDMETHOD.</CODE></PRE><BR /> <EM>Explanation:</EM><BR /> <BR /> First, two data elements are declared that are necessary for the technical search criteria and for the service selection. Then the constructor of the superclass is called. The next step is to define the name of the search object, in this case the search object has the name DEMO. There are two method calls that are responsible for filling the selection parameters. The associated technical names were added to the table LT_TECSEARCH_PARAM with the APPEND command. In the lower part of the coding you can optionally specify the service selections. With IF_SXI_MONITOR_GSF~SENDERNAMESINGLE and/or IF_SXI_MONITOR_GSF~RECEIVERNAMESINGLE you can define a service. With IF_SXI_MONITOR_GSF~SENDERNAMETABLE and/or IF_SXI_MONITOR_GSF~RECEIVERNAMETABLE you have the possibility to create several services. Besides enhancing the UI and the search criteria in the constructor, you can also implement your own authorization and plausibility checks. To implement a customized authorization or plausibility check, the methods IF_SXI_MONITOR_GSF~AUTHORIZATION_CHECK and IF_SXI_MONITOR_GSF~OBJECT_PLAUSIBILITY_CHECK need to be redefined inside the Object Class.<BR /> <BR /> <STRONG>Conclusion</STRONG><BR /> <BR /> In this blog post I have given you an overview of how you can expand SXI_MONITOR Generic Search Framework using self-defined search objects. You also saw briefly how the algorithm of the Generic Search Framework works. I hope that the SXI_MONITOR GSF can help you with working with XML messages.<BR /> <BR /> In case an error occurs please raise an incident on application component LO-MD-BP-WS.<BR /> <BR /> <EM>We have taken all measures possible to make this post as accurate as possible, but things sometimes fall through the cracks. In case you find any errors or inconsistencies please let us know.</EM><BR /> <BR /> <EM>The above given dates and times might change without notice and/or reflection in this blog post. For latest accurate dates and times, please check out the referenced, and non-referenced information available from SAP.</EM> 2021-05-17T19:38:40+02:00 https://community.sap.com/t5/technology-blogs-by-sap/introducing-the-sxi-monitor-generic-search-framework/ba-p/13500077 Introducing the SXI_MONITOR Generic Search Framework 2021-05-18T08:24:44+02:00 m_keskin https://community.sap.com/t5/user/viewprofilepage/user-id/745461 <STRONG>Introduction</STRONG><BR /> <BR /> The transaction SXI_MONITOR is used to monitor XML-Messages. This transaction enables you to search for XML-Messages, and filter them based on criteria like date, time, message ID, sender-, and receiver information etc. However, it is so far missing the functionality to filter the messages based on their content easily (transaction SXI_MONITOR also provides the possibility to search for content values, but that is more complex and can’t be run in background).<BR /> <BR /> Therefore, the SXI Monitor Generic Search Framework (GSF) was developed. It introduces a new modular way to filter the messages based on the information extracted from their corresponding XML data. The goal of this development is to create an easy and customizable way to filter XML-Messages based on their content.<BR /> <BR /> Details on the technical background can be found in the article <A href="https://blogs.sap.com/?p=1337360&amp;preview=true&amp;preview_id=1337360" target="_blank" rel="noopener noreferrer">Extension and enhancement of the SXI_MONITOR Generic Search Framework.</A><BR /> <BR /> The new functionality is available by transaction code: <STRONG>SXI_MONITOR_GSF</STRONG><BR /> <BR /> <STRONG>User Interface</STRONG><BR /> <BR /> Figure 1 shows a screenshot of the User Interface. So far, the user interface consists of two major sections. The standard selection criteria, which is not customizable, and the enhanced selection criteria, which is customizable using the GSF. The customization is explained below.<BR /> <BR /> The standard selection criteria are used to pre-select messages as shown in Figure 1 (the uppermost box). The section containing the enhanced selection criteria is used to browse the content of the XML-message. The two dropdown menus “Search Object”, and “Selection Parameter” are used to group the technical names into different categories. The “Search Object” defines herby the generic term (e.g. Business Partner, Customer, Vendor etc.). The “Selection parameter” defines the subcategory (e.g. ID, Name etc.). Every Selection Parameter corresponds to an unlimited number of technical names. The grouping of the technical names is further explained in the enhanced technical description of Transaction SXI_MONITOR_GSF.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/user-interface-1-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">Figure 1: User Interface</P><BR /> The pushbutton “Service Selection” provides the user with a popup (Figure 2) on which they can select the webservices they want to search for. By default, all webservices are selected. It is mandatory to select at least one webservice.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/service-selection-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">Figure 2: Select/De-select Services</P><BR /> In the field “Value(s)”, enter the values you want to search for, e.g. different Business Partner IDs. After all fields are filled, the search can be started either by pressing F8, by clicking the button “Execute” in the lower right corner, or by choosing “More” -&gt; “Program” -&gt; “Execute”. The search starts in the foreground. The screen is locked until the program is done. An example of a result list is shown in Figure 3<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/search-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">Figure 3: Example of a result list</P><BR /> The performance can be low due to a high number of messages that need to be extracted and analyzed. For that reason, foreground processing might not be useful. To offer more utility, background processing is available in the SXI Monitor Generic Search Framework. By choosing “More” -&gt; “Program” -&gt; “Execute in Background”, the search gets submitted as a job. You can display the running Job e.g. using transaction <STRONG>SM37</STRONG> or via “More” -&gt; “System” -&gt; “Own Jobs”. After the job has finished, the message IDs found are displayed in the print job log as shown in Figure 4.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/05/background-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic;font-family: 'SAPRegular', 'Helvetica Neue', Arial, sans-serif">Figure 4: Example of a result list as job log</P><BR /> The message IDs can be easily copied and transported for further analysis to transaction <STRONG>SXI_MONITOR</STRONG>.<BR /> <BR /> <STRONG>Delivery and initial usage hints</STRONG><BR /> <BR /> The new transaction is available via the following SAP notes:<BR /> <UL><BR /> <LI><A href="https://launchpad.support.sap.com/#/notes/2971973" target="_blank" rel="noopener noreferrer">2971973</A> - SRT_MONI_GSF Creation of package</LI><BR /> <LI><A href="https://launchpad.support.sap.com/#/notes/3035719" target="_blank" rel="noopener noreferrer">3035719</A> - Generic Search Framework for SXI_MONITOR - Interface Note</LI><BR /> <LI><A href="https://launchpad.support.sap.com/#/notes/3035724" target="_blank" rel="noopener noreferrer">3035724</A> - Generic Search Framework for SXI_MONITOR_GSF - Application Note</LI><BR /> </UL><BR /> The SAP notes have to be applied in the given order.<BR /> <BR /> Per default the new functionality is delivered for mainly Business Partner Messages searching the name, number of the Business Partner or the number of the customer / supplier.<BR /> <BR /> The search itself for the Business Partner does support wildcard search – the standard SAP search parameters are provided.<BR /> <BR /> <STRONG>Final remarks</STRONG><BR /> <BR /> As this is a very new functionality which hopefully enables easier access to data exchange via XML-Messages, a follow up Blog post will be provided to explain the technical background in more detail and also will provide a step-by-step description of the very easy to use enhancement concept.<BR /> <BR /> In case an error occurs, you would need to raise an incident on application component LO-MD-BP-WS.<BR /> <BR /> <EM>We have taken all measures possible to make this post as accurate as possible, but things sometimes fall through the cracks. In case you find any errors or inconsistencies please let us know.</EM><BR /> <BR /> <EM>The above given dates and times might change without notice and/or reflection in this blog. For latest accurate dates and times, please check out the referenced, and non-referenced information available from SAP</EM> 2021-05-18T08:24:44+02:00 https://community.sap.com/t5/technology-blogs-by-members/using-webservices-to-transfer-data-to-sap-bw-soa-manager-and-soap/ba-p/13544492 Using WebServices to transfer data to SAP BW- SOA Manager and SOAP Configurations 2022-01-31T21:57:58+01:00 former_member212011 https://community.sap.com/t5/user/viewprofilepage/user-id/212011 <STRONG>Introduction-</STRONG><BR /> <BR /> WebService is one of the <STRONG>RDA</STRONG> (Realtime Data Access) techniques that can be used as a <STRONG>Push</STRONG> mechanism to transfer from data in the form of XMLs to SAP BW and HANA systems.<BR /> <BR /> Web Services are mostly used to transfer the data in SAP BW/ HANA environments when the data mostly resides on web portals or on some external servers which are non-compatible or can not directly communicate with SAP, then by enabling the SAP's SOAP services this form of data can be pushed to SAP BW and HANA system's staging and architected data marts or any other layer which is used for reporting purpose.<BR /> <BR /> Basically the data in SAP BW is received in the form of requests either through <STRONG>Pull or Push</STRONG> mechanisms. Pull mechanism is active when the data is residing in the Delta Queues and BW daemon jobs or ODP extractors or normal InfoPackages bring them through the IDOCs to BW PSA or ADSOs respectively.<BR /> <BR /> Through the Push mechanism also data gets fetched in SAP BW only but External system plays the role of controlling the data transfer either in a scheduled manner or on adhoc basis.<BR /> <BR /> Both form of data can be tracked using the Request IDs in SAP.<BR /> <BR /> <STRONG>Detailed Overview and Steps</STRONG> -<BR /> <BR /> Now that we are clear with the basic understanding of the scenario when to enable the WebServices for pushing data to SAP BW lets find the detailed steps which are mandatory for such type of data extractions.<BR /> <OL><BR /> <LI>Check for soap services whether it is active or not in tcode SICF. Click execute button.</LI><BR /> </OL><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">TCode- SICF</P><BR /> 2. Drilldown as per below to find soap –<BR /> Default_host -&gt; sap -&gt; bw -&gt; xml -&gt; soap.<BR /> <BR /> If soap is not active, right click on it and activate it.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS2.jpg" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS3.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Soap in SICF</P><BR /> 3. Create a Data Source with the file format provided by any non-sap system under <SPAN style="text-decoration: underline">Web Services Source System</SPAN>.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/Ss4.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Data Source Creation in SAP BW</P><BR /> 4. Navigate to SOAMANAGER tcode. Open below highlighted-<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS5.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">SOA Management</P><BR /> 5. Click on the required function module for the data source created.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS6.jpg" /></P><BR /> 6. Click on Create Service.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS7.jpg" /></P><BR /> 7. Enter details with meaningful texts and click Next.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS8.jpg" /></P><BR /> 8. Select as per below-<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS9.jpg" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS10.jpg" /></P><BR /> 9. Click Next-<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS11.jpg" /></P><BR /> 10. Click Finish-<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss12.jpg" /></P><BR /> 11. You will find the Service is activated.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS13.jpg" /></P><BR /> 12. Click on below highlighted button.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS14.jpg" /></P><BR /> 13. Below URL will get generated.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/SS15.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">WSDL URL</P><BR /> 14. Click on below highlighted button.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss16-1.jpg" /></P><BR /> 15. You may find below error for incorrect Port and Host Name.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss17.jpg" /></P><BR /> 16. Go back to main screen of SOAMANAGER and Open below.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss18.jpg" /></P><BR /> 17. Open Web Services Navigator and maintain entries for Hostname and Port name (This information needs to be provided by the external system’s Administrator or SAP Basis.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss19.jpg" /></P><BR /> 18. Navigate to the path in SICF shown in automated URL which was generated while creating the Service.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss20.jpg" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss21.jpg" /></P><BR /> 19. If wsdl is inactive, right click , activate and then right click again and Test.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/01/ss22.jpg" /></P><BR /> 20. The result will show in a web page when you execute the WSDL url in an XML page format showing the data from backend source table.<BR /> <BR /> &nbsp;<BR /> <BR /> This way you can configure the WebServices to push the data from the external source tables in to SAP BW system's staging layers. From the PSA it can either be pulled manually to other data marts or schedule the load via process chains.<BR /> <BR /> &nbsp; 2022-01-31T21:57:58+01:00 https://community.sap.com/t5/technology-blogs-by-members/integrate-sap-tm-ecc-by-enhancing-standard-webservice-without-pi/ba-p/13538022 Integrate SAP TM-ECC by Enhancing Standard Webservice Without PI 2022-05-02T10:26:33+02:00 poulamidas https://community.sap.com/t5/user/viewprofilepage/user-id/801487 <STRONG>Introduction</STRONG><BR /> <BR /> SAP TM or Transport Management System is used to optimize logistics by managing all aspects of Transportation processes within a company. Not only it streamlines the logistics businesses by improving efficiency, but it also helps in reducing cost of business. One of the key aspects of implementing SAP TM is its integration with ECC system. In many cases, data is replicated using Service Interfaces. It is also quite common that customized structures or attributes need to be replicated from SAP TM to ECC.<BR /> <BR /> Accommodate the custom attributes, the webservice need to be enhanced. This enhancement can be done with or without involving PI as a middleware.<BR /> <BR /> In this blogpost, I have shared the solution to enhance webservices via Point-to-Point connection using SOAMANAGER technology. Using Backend Metadata Repository, the enhancement can be achieved.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Requirement</STRONG><BR /> <BR /> Shipments can be created in ECC from Freight Order in SAP TM. The shipment created in ECC does not have the vehicle type. Therefore, we will enhance the webservice to send the Vehicle Type through a custom attribute from TM to ECC.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Prerequisites</STRONG><BR /> <UL><BR /> <LI>Access to SAP TCodes like SPROXY, SRT_MONI, SPXNGENAPPL</LI><BR /> <LI>Knowledge of SAP ABAP, BOPF coding.</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> <STRONG>Solution&nbsp;&nbsp; </STRONG><BR /> <BR /> <STRONG>Step 1: Create Custom Namespace in TM System</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> Go to TCode <STRONG>SPXNGENAPPL</STRONG> to create the custom namespace under which the enhancement will be created.<BR /> <BR /> Create an entry for the custom namespace (Format: <A href="http://CompanyName/xi/RelevantName" target="_blank" rel="nofollow noopener noreferrer">http://CompanyName/xi/RelevantName</A>). Choose the option Backend Metadata Repository from the dropdown from the right column.<BR /> <BR /> Save the entry. It does not get captured in TR. We must create the entry manual in higher environments.<BR /> <BR /> To easy identification, use the namespace of the Standard Webservice and append some meaningful name at the end separated by ‘/.’ <STRONG>The custom namespace name is critical</STRONG>. X`<BR /> <P style="overflow: hidden;margin-bottom: 0px"><STRONG> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic1-4.png" /></STRONG></P><BR /> <STRONG>The same namespace will be present under namespaces in SPROXY, and the enhanced nodes and structures will be saved there.</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>Step 2: Enhance Standard Webservice in TM System</STRONG><BR /> <OL><BR /> <LI><STRONG>Locate the Webservice.</STRONG></LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> Now go to TCode <STRONG>SPROXY</STRONG>. Find the Service to be enhanced. Double click on it. The Service Consumer details will display on the right. Go to <STRONG>Internal View</STRONG> Tab.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic2-5.png" /></P><BR /> &nbsp;<BR /> <BR /> We will use the following webservices in TM and in ECC, respectively.<BR /> <BR /> <STRONG>TM: TransportationOrderSCMExecutionRequest_Out (Service Consumer)</STRONG><BR /> <BR /> <STRONG>ECC: TransportationOrderSCMExecutionRequest_In (Service Provider)</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <OL start="2"><BR /> <LI><STRONG>Find the Node to be Enhanced</STRONG></LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> Here, we will be enhancing the node <STRONG>TRANSPORTATION_ORDER_EXECUTION</STRONG> and adding custom attributes to it.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic3-4.png" /></P><BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> Click on the node <STRONG>TRANSPORTATION_ORDER_EXECUTION </STRONG>and once the window on the appears, double click on the ABAP Name (Here, <STRONG>/SCMTMS/CPX_TOR_SCMEXR_TOREXE</STRONG>) under Global Data Type with Elements.<BR /> <BR /> &nbsp;<BR /> <BR /> The node structure will open. Go to <STRONG>Proxy Editor</STRONG>.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic4-4.png" /></P><BR /> &nbsp;<BR /> <BR /> Click on <STRONG>Create Enhancement</STRONG> to create Data Type Structure. A wizard will appear.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic5-4.png" /></P><BR /> &nbsp;<BR /> <BR /> Provide Enhancement Name as per the naming conventions followed by the organisation. In the namespace, provide the namespace name you have maintained earlier for the MDR. Next, click on Continue button at the bottom.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic6-3.png" /></P><BR /> In the next step, maintain <STRONG>Package</STRONG>, <STRONG>Transport Request</STRONG> No and <STRONG>Prefix </STRONG>name. The prefix is for internal attributes. If TR number is not known, check Local Button.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic7-3.png" /></P><BR /> Click on Continue and Finish. Once done, click on SAVE button to save the changes.<BR /> <BR /> Now go to External View to add custom attributes to the structure environment. You can add individual attributes, or you can add a custom data type to the enhancement.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic8-3.png" /></P><BR /> To add an attribute or element, right click on the Enhancement Name and choose attribute or element.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic9-3.png" /></P><BR /> &nbsp;<BR /> <BR /> If you want to add a custom data type, choose <STRONG>Add Element,</STRONG> and provide appropriate name starting with YY or ZZ.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic10-5.png" /></P><BR /> &nbsp;<BR /> <BR /> Now, right click on the Element Name and choose <STRONG>Set Global Type Reference</STRONG> to create custom reference for the datatype.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic11-4.png" /></P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic12-3.png" /></P><BR /> &nbsp;<BR /> <BR /> Here you can create your own reference or use existing ones. Creating reference will open a wizard like the previous one. Once you have created the reference, add maximum length and type to the elements.<BR /> <BR /> After creation of custom fields, save and activate the changes.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 3: Add Custom Code for Custom Attributes in ECC</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG>We need to add our own custom code to perform data mapping for the custom attributes. This will allow the system to send the data from the system to the XML message.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>BADI in TM System: /SCMTMS/TOR_SE_SHPMNT_REQ</STRONG><BR /> <BR /> <STRONG>Interface: /SCMTMS/TOR_IF_SE_SHPMNT_REQ</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG>Create BADI Implementation and add your code to complete the mappings of the attribute.<BR /> <BR /> The data present in the <STRONG>OUT </STRONG>structure is finally send to the XML message. Therefore, the data manipulation or data population of the custom attributes should be done in the <STRONG>OUT</STRONG> structure.<BR /> <BR /> &nbsp;<BR /> <BR /> In TM system, every document acts like an Object. Therefore, BOPF coding might be required the required value.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic13-3.png" /></P><BR /> &nbsp;<BR /> <BR /> After replication, the XML message can be checked in SRT_MONI TCode to display XML messages. You can check whether the XML message has been successfully processed in the system. This is visible both in Source and Target System.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/04/pic14-4.png" /></P><BR /> &nbsp;<BR /> <BR /> <STRONG>Step 4: Create Custom Namespace in ECC System</STRONG><BR /> <BR /> Repeat Step 1 in ECC system as well. Be extra careful to maintain the exact Namespace name as it was maintained in TM system.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>This is crucial as identical mappings and names in source and target will ensure that XML is mapped properly, and data is flowing between the system successfully.</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 5: Enhance Standard Webservice in ECC</STRONG><BR /> <BR /> <STRONG>Webservice Name in ECC: TransportationOrderSCMExecutionRequest_In (Service Provider)</STRONG><BR /> <BR /> Follow the same steps as they were in step 2. Keep the names in every step identical in both source and Target system. So, the enhancement name, structure name, attribute name as well as the data types should be identical in both systems.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>And most importantly, the Custom Namespace (MDR) name should be identical, even upper case and lower case. </STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>Step 5: Add Custom Code for Custom Attributes in ECC</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> Like the Source system, the custom attributes need to be mapped to the correct fields in the Target system for further usage.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>BADI in ECC is:&nbsp; TRA_SE_TO_SHPMNT_RQ_IN</STRONG><BR /> <BR /> <STRONG>Interface: IF_TRA_SE_TO_SHPMNT_RQ_IN</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> Here, the incoming data from the XML message will be stored in the IN structure. The data received from TM system can be stored in Standard Table as well Custom table to be used later.<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Conclusion</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> In this blog post, we have enhanced a standard webservice by addition of custom attributes without involving PI system. This Point-to-Point communication system can be used in multiple scenarios without involving any middleware or third parties. It is synchronous and efficient and highly effective.<BR /> <BR /> <STRONG>&nbsp;</STRONG> 2022-05-02T10:26:33+02:00 https://community.sap.com/t5/technology-blogs-by-members/abap-rest-api-http-service-call-from-postman-json-to-abap-data/ba-p/13545948 ABAP REST API http Service call from Postman: JSON to ABAP data 2022-05-10T09:42:07+02:00 former_member751941 https://community.sap.com/t5/user/viewprofilepage/user-id/751941 <H3 id="toc-hId-1090302760"><STRONG>This blog post will describe the steps of <EM>how to expose REST API and handle REST API request from SAP ECC 6.0 without installing SAP Gateway service builder component. It will also help to convert json data to ABAP data. In this blog post I have described how to build web server service in ECC application server of Rest APIs using JSON data format. </EM></STRONG></H3><BR /> Prerequisite JSON data format, SAP logon and postman.<BR /> <UL><BR /> <LI><STRONG><EM><U>Define JSON structure:</U></EM></STRONG></LI><BR /> </UL><BR /> JSON is a text-based data format which follow JavaScript object syntax. It stores the value in form of key value pair. Each of the property and value is separated with colon (:).<BR /> <BR /> In ABAP define JSON structure which will be posted though POST request body and will be handled by HANDLE_REQUEST method. In se11 create JSON structure.<BR /> <BR /> JSON structure and Table Type:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/JSONStructure.png" /></P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/JSONTableType.png" /></P><BR /> <BR /> <UL><BR /> <LI><STRONG><EM><U>Implement http Request handle Method inside handling class:</U></EM></STRONG></LI><BR /> </UL><BR /> Create a class ZMG_TEST_JSON with public instantiation using t-code se24 and add HANDLE_REQUEST standard method.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/ClassMethod-HANDLE_REQUEST.png" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/IF_HTTP_EXTENSION.png" /><BR /> <BR /> Inside the class, Implement HANDLE_REQUEST standard method of interface IF_HTTP_EXTENSION. Implemented method will process POST request with JSON body which will be posted through postman. Request can also be triggered from AZURE or any other third-party.<BR /> <UL><BR /> <LI><STRONG><EM><U>Maintain Service: ICF Hierarchy service:</U></EM></STRONG></LI><BR /> </UL><BR /> Internet Communication Framework (ICF) services&nbsp;is an integrated component of Application server which allows us to communicate with SAP systems using internet standard protocol HTTP, HTTPs SMTP etc.<BR /> <BR /> <STRONG>SICF t-code to create independent service ZMG_TEST_SRV in ICF hierarchy.</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/ZMG_TEST_SRV-sicf-Service.png" /></P><BR /> <STRONG>To link handler class with created service, in service's hander list tab add created handler class (ZMG_TEST_JSON) and save.</STRONG><BR /> <BR /> <EM>Adding ZMG_TEST_JSON class in service:</EM><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/Adding-ZMG_TEST_JSON-class-in-service.png" /></P><BR /> <STRONG>Service will be created in the selected path. Right click and activate the service.</STRONG><BR /> <P style="text-align: left;overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/Activate_ServicePath.png" /></P><BR /> <EM>Activate Service:</EM><BR /> <BR /> <EM><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/Activate_Service.png" /></EM><BR /> <BR /> <STRONG>Right click and test the service. Server URL will be generated.</STRONG><BR /> <BR /> <EM>Service URL:</EM><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/RESTServiceURL.png" /></P><BR /> In SAP ECC, put a debugger in implemented HANDLE_REQUEST method of ZMG_TEST_JSON.<BR /> <UL><BR /> <LI><STRONG><EM><U>Http Post in REST API:</U></EM></STRONG></LI><BR /> </UL><BR /> POST is a request method supported by HTTP used by the World Wide Web. By design, the POST request method requests that a <STRONG>web server accept the data enclosed in the body of the request</STRONG> <STRONG>message</STRONG>. It is often used when uploading a file or when submitting a file in request body. Submitting the request with JSON body.<BR /> <BR /> Open Postman and paste the generated URL. Check header parameters, paste JSON body and send the request.<BR /> <BR /> <EM>Postman Collection:</EM><BR /> <P style="text-align: left;overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/Postman-URL.png" /></P><BR /> <EM>Send request to server for process:</EM><BR /> <P style="text-align: left;overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/Postman-Request-Json-1.png" /></P><BR /> <EM>HTTP request methods (GET, POST, PUT, DELETE, COPY …) are embedded in header field with the name '~request_method' uri service path of request header with the name '~request-uri'</EM><BR /> <UL><BR /> <LI><STRONG><EM><U>ABAP built for converting JSON data format to ABAP data format:</U></EM></STRONG></LI><BR /> </UL><BR /> As per implemented method posted json will be parsed and will be stored in sap internal table.<BR /> <BR /> HANDLE_REQUEST_Implementation:<BR /> <PRE class="language-abap"><CODE>METHOD if_http_extension~handle_request.<BR /> TYPES: BEGIN OF ly_emp,<BR /> number TYPE char7,<BR /> dateofjoining TYPE char40,<BR /> name TYPE char40,<BR /> END OF ly_emp.<BR /> TYPES: BEGIN OF ly_post_res,<BR /> departmentcode TYPE char10,<BR /> departmentname TYPE char50,<BR /> employee TYPE ly_emp,<BR /> END OF ly_post_res.<BR /> DATA:<BR /> lv_request_uri TYPE string,<BR /> lv_request_method TYPE string,<BR /> lv_content_type TYPE string,<BR /> lv_req_body TYPE string.<BR /> DATA: cl_fdt_json TYPE REF TO cl_fdt_json,<BR /> lx_root TYPE REF TO cx_root,<BR /> ls_data TYPE zmg_json_struct,<BR /> lt_final TYPE TABLE OF zmg_json_struct.<BR /> <BR /> lv_request_uri = server-&gt;request-&gt;get_header_field( name = '~request_uri' ).<BR /> lv_request_method = server-&gt;request-&gt;get_header_field( name = '~request_method' ).<BR /> lv_content_type = server-&gt;request-&gt;get_header_field( name = 'content-type' ).<BR /> <BR /> lv_req_body = server-&gt;request-&gt;get_cdata( ).<BR /> <BR /> IF lv_req_body IS NOT INITIAL.<BR /> REPLACE ALL OCCURRENCES OF REGEX '[^[:print:]]' IN lv_req_body WITH space.<BR /> REPLACE ALL OCCURRENCES OF REGEX '#' IN lv_req_body WITH space.<BR /> CONDENSE lv_req_body.<BR /> CREATE OBJECT cl_fdt_json.<BR /> TRY.<BR /> CALL METHOD cl_fdt_json=&gt;json_to_data<BR /> EXPORTING<BR /> iv_json = lv_req_body<BR /> CHANGING<BR /> ca_data = ls_data.<BR /> CATCH cx_root INTO lx_root.<BR /> ENDTRY.<BR /> ENDIF.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> JSON data to ABAP data:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/JsonBodyToABAPdata.png" /><BR /> <BR /> <EM>Parsing JSON header data:</EM><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/JSON_Header-2.jpg" /><BR /> <BR /> <EM>Parsing JSON Item data:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/05/JSON_Item-2.jpg" /></EM><BR /> <BR /> By following above steps, we can covert json data to ABAP data and store it into table.<BR /> <UL><BR /> <LI><STRONG><U>Summary:</U></STRONG></LI><BR /> </UL><BR /> During one of our projects requirements, I have gone through several REST API documents. Most of the documents, blog post and articles describes the ways of REST API call which convert ABAP data to JSON data, not vice versa. From my learning and SAP-Non-SAP integration experience I have organized REST API call from JSON format to ABAP format without having SAP_GWFND (SAP Gateway Foundation) component or Separate Gateway server installed in landscape.<BR /> <BR /> Please do like the blog post, if you find the content helpful. Also, do share your comments and inputs, if any. 2022-05-10T09:42:07+02:00 https://community.sap.com/t5/technology-blogs-by-members/sap-webdispatcher-webadm-user-got-deleted/ba-p/13552676 SAP Webdispatcher webadm user got deleted!! 2022-10-24T20:32:05+02:00 manojsomkuwar https://community.sap.com/t5/user/viewprofilepage/user-id/657691 Hi All,<BR /> <BR /> &nbsp;<BR /> <BR /> Recently I came across a very weird situation where after installation of SAP Web Dispatcher and setting up of SSL I found that I wasn't able to login to Admin page, the credentials of webadm user weren't working.<BR /> <BR /> There were lots of messages in /usr/sap/SID/W00/work/dev_webdisp as below:<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>[Thr 139921060026112] Sun Oct 23 09:55:29:304 2022</STRONG><BR /> <STRONG>[Thr 139921060026112] *** ERROR =&gt; HttpAdmHandleReq: authorization failed for user: webadm [http_adm.cpp 2596</STRONG>]<BR /> <BR /> &nbsp;<BR /> <BR /> So, as a normal practice, I tried to go ahead with resetting the webadm password as per <A href="https://me.sap.com/notes/0001987484" target="_blank" rel="noopener noreferrer"><STRONG>Note:1987484&nbsp;-&nbsp;Forget password for SAP webdispatcher web Administration Interface</STRONG></A><BR /> <H1 data-toc-skip="" id="toc-hId-832968678"></H1><BR /> What I found weird is that first of all icmauth.txt authentication file didn't exist in <STRONG>/usr/sap/SID/SYS/global/security/data</STRONG> directory.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/Global_data_directory_does_not_contain_icmauth_file.png" /></P><BR /> <STRONG>Hence, I followed below steps to recreate the webadm user and for reset of the password.</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Stop the Webdispatcher.</STRONG><BR /> <BR /> Go to the webdispatcher executable folder.<BR /> <BR /> For example, /usr/sap/&lt;WDP SID&gt;/&lt;WDP instance name&gt;/exe<BR /> <BR /> There you can find the wdispmon executable.<BR /> <BR /> Run "<STRONG>wdispmon -a pf=&lt;x:\path to webdispatcher profile\instance_profile&gt;</STRONG>".<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/File_does_not_exist_recreate.png" /></P><BR /> As the file somehow didn't exist, I recreated it.<BR /> <BR /> So, give "y" to continue (<STRONG>without quotes</STRONG>) and you'll see below screen for maintenance of icmauth authentication file<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/maintain_Icmauth_file.png" /></P><BR /> If I do<STRONG> l - list users of set</STRONG> here, it doesn't show anything. Normally it shows webadm user here.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/webadm_is_not_here.png" /></P><BR /> Go ahead with re-creating the user.<BR /> <BR /> For this, select <STRONG>a - add user</STRONG> <STRONG>to set</STRONG> option.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/new_entries.png" /></P><BR /> GIve username as webadm, Your new password, Confirm your new password, Group name as admin and <SPAN style="text-decoration: underline">as my SAPSSLC.PSE was signed, I gave the Subject Name associated with it</SPAN>.<BR /> <BR /> After this, Press Enter to continue and execute&nbsp; <STRONG>s - save changes of set to file</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/changes_saved.png" /></P><BR /> After saving,<BR /> <BR /> <STRONG>Stop sapstartsrv process, start sapstartsrv process and start Webdispatcher instance</STRONG>.<BR /> <BR /> This creates the required entry in icmauth.txt file and after this you'd be able to successfully login to Webdispatcher Administration Interface!<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/10/Finally_able_to_login.png" /></P><BR /> &nbsp;<BR /> <BR /> Please let me know your thoughts in the comment section below.<BR /> <BR /> For such more technical articles, please follow the tag Basis Technology (<A href="https://answers.sap.com/tags/7bf2eaed-4604-44ae-bad7-d2d2d5c58c54" target="_blank" rel="noopener noreferrer">https://answers.sap.com/tags/7bf2eaed-4604-44ae-bad7-d2d2d5c58c54</A>), and read other posts on the topic (<A href="https://blogs.sap.com/tags/7bf2eaed-4604-44ae-bad7-d2d2d5c58c54/" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/tags/7bf2eaed-4604-44ae-bad7-d2d2d5c58c54/</A>)<BR /> <BR /> Please follow my profile for similar content that I'll publish in the near future.<BR /> <BR /> &nbsp;<BR /> <BR /> Regards,<BR /> <BR /> Manoj Somkuwar<BR /> <BR /> &nbsp; 2022-10-24T20:32:05+02:00 https://community.sap.com/t5/technology-blogs-by-members/download-zip-package-through-netweaver-gateway-with-odata/ba-p/13548736 Download ZIP Package through NetWeaver Gateway with Odata 2022-12-15T09:54:16+01:00 nitinksh1 https://community.sap.com/t5/user/viewprofilepage/user-id/45127 <H2 id="toc-hId-961307459">Introduction</H2><BR /> In this blog, I would like to show you how to download a ZIP package stored on an application server via Odata call in very simple steps.<BR /> <BR /> I have tried not to add any additional logic apart from downloading the ZIP package from the Odata service.<BR /> <H2 id="toc-hId-764793954">Steps</H2><BR /> 1. Table creation.<BR /> <BR /> 2. Create an oData service.<BR /> <BR /> 3. Redefine methods of DPC extension class GET_ENTITYSET, /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_STREAM.<BR /> <BR /> 4. Redefine methods of MPC extension class DEFINE.<BR /> <BR /> 5. Register the oData service.<BR /> <BR /> 6. Test<BR /> <H2 id="toc-hId-568280449">Implementation</H2><BR /> Let's begin the development step by step.<BR /> <H3 id="toc-hId-500849663">Step 1</H3><BR /> 1. Create a table where we will have the package name stored.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Table.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Table</P><BR /> <BR /> <H3 id="toc-hId-304336158"></H3><BR /> <H3 id="toc-hId-107822653">Step 2</H3><BR /> 2.1. Create an Odata service.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Odata-Service.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Odata service</P><BR /> &nbsp;<BR /> <BR /> 2.2. Create an entity with an entity set.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Entity.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Entity</P><BR /> &nbsp;<BR /> <BR /> 2.3. Add table name to ABAP structure and also <STRONG>mark Media checkbox as true. </STRONG>Do remember to mark the Media as true.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Add-Structure.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Add Structure</P><BR /> &nbsp;<BR /> <BR /> 2.4. Import Properties/fields from the custom table.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Import-Properties-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Import Properties</P><BR /> &nbsp;<BR /> <BR /> 2.5. Now it's time to generate the service.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Generate-Service.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Generate Service</P><BR /> &nbsp;<BR /> <H3 id="toc-hId--88690852">Step 3</H3><BR /> 3.1. Go to the DPC extension class, redefine the <EM>GET_ENTITYSET</EM> method and add logic to get data from the custom table. This is required so that we can fetch data from the table to get the package name.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/DPC_EXT-Fetch-Data.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">DPC_EXT Fetch Data</P><BR /> 3.2. In the DPC extension, redefine method <EM>/IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_STREA</EM>M and add the logic to get filename, convert it to xstring and pass it back to Odata.<BR /> <PRE class="language-abap"><CODE> METHOD /iwbep/if_mgw_appl_srv_runtime~get_stream.<BR /> <BR /> TYPES:<BR /> "! &lt;p class="shorttext synchronized" lang="en"&gt;Media Type Information&lt;/p&gt;<BR /> BEGIN OF ty_s_media_resource.<BR /> INCLUDE TYPE /iwbep/if_mgw_core_srv_runtime=&gt;ty_s_media_resource.<BR /> TYPES:END OF ty_s_media_resource .<BR /> <BR /> TYPES: BEGIN OF ty_package,<BR /> docnr TYPE zzdocnr,<BR /> filename TYPE zzfilename,<BR /> END OF ty_package.<BR /> <BR /> DATA:ls_key_tab TYPE /iwbep/s_mgw_name_value_pair,<BR /> ls_package TYPE ty_package,<BR /> ls_stream TYPE ty_s_media_resource,<BR /> lv_docnr TYPE zzdocnr,<BR /> lo_meco TYPE REF TO /iwbep/if_message_container,<BR /> ls_lheader TYPE ihttpnvp,<BR /> lv_xstring TYPE xstring.<BR /> <BR /> READ TABLE it_key_tab INTO ls_key_tab INDEX 1.<BR /> IF sy-subrc EQ 0.<BR /> lv_docnr = ls_key_tab-value.<BR /> ENDIF.<BR /> <BR /> SELECT SINGLE docnr,<BR /> filename<BR /> FROM zzip_package INTO @ls_package<BR /> WHERE docnr = @lv_docnr.<BR /> <BR /> <BR /> DATA(lv_path) = '.\SamplePackage.zip'.<BR /> OPEN DATASET lv_path FOR INPUT IN BINARY MODE. "#EC CI_USE_WANTED<BR /> IF sy-subrc = 0.<BR /> READ DATASET lv_path INTO lv_xstring. "#EC CI_USE_WANTED<BR /> ENDIF.<BR /> <BR /> CLOSE DATASET lv_path. "#EC CI_USE_WANTED<BR /> <BR /> IF sy-subrc = 0.<BR /> ls_stream-mime_type = 'application/x-zip-compressed'. "mime type<BR /> ls_stream-value = lv_xstring. "content<BR /> ls_lheader-name = 'Content-Disposition'(001).<BR /> <BR /> CONCATENATE 'attachment; filename="'(002)<BR /> ls_package-filename<BR /> '";'<BR /> INTO ls_lheader-value.<BR /> <BR /> set_header( is_header = ls_lheader ).<BR /> <BR /> ls_lheader-name = 'Content-Length'(003).<BR /> <BR /> DATA(lv_len) = xstrlen( ls_stream-value ).<BR /> ls_lheader-value = lv_len.<BR /> set_header( is_header = ls_lheader ).<BR /> copy_data_to_ref( EXPORTING is_data = ls_stream<BR /> changing cr_data = er_stream ).<BR /> <BR /> ELSE. "error when file not found<BR /> <BR /> lo_meco = mo_context-&gt;get_message_container( ).<BR /> lo_meco-&gt;add_message_text_only(<BR /> EXPORTING<BR /> iv_msg_type = 'E'<BR /> iv_msg_text = 'File Not Found'(004) " Message Text<BR /> iv_add_to_response_header = abap_true " Flag for adding or not the message to the response header<BR /> ).<BR /> <BR /> ENDIF.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--285204357">Step 4</H3><BR /> 4.1. Now redefine the method <EM>DEFINE</EM> of MPC extension class. Add your Entity name and field which contains the zip package.<BR /> <PRE class="language-abap"><CODE>METHOD define.<BR /> super-&gt;define( ).<BR /> <BR /> DATA: lo_entity TYPE REF TO /iwbep/if_mgw_odata_entity_typ,<BR /> lo_property TYPE REF TO /iwbep/if_mgw_odata_property.<BR /> <BR /> lo_entity = model-&gt;get_entity_type( iv_entity_name = 'Package' ).<BR /> <BR /> IF lo_entity IS BOUND.<BR /> lo_property = lo_entity-&gt;get_property( iv_property_name = 'Filename').<BR /> lo_property-&gt;set_as_content_type( ).<BR /> ENDIF.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--481717862">Step 5</H3><BR /> 5.1. Now it's time to register the Odata service from /IWFND/MAINT_SERVICE tcode.<BR /> <BR /> 5.2. Once, the service is registered let's see if the metadata is loaded properly.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Metadata.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Metadata</P><BR /> &nbsp;<BR /> <H3 id="toc-hId--678231367">Step 6</H3><BR /> 6.1. Lets us now upload the zip file to the application server.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Upload-Package.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Upload Package</P><BR /> 6.2. Contents of the package. There are 52 notepad files in it.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/Package-Contents-2.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Package contents</P><BR /> &nbsp;<BR /> <BR /> 6.3. Let us execute the Odata service to get the ZIP Package. Select the HTTP method as GET and pass the below URI.<BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/ZZIPPACKAGE_DOWNLOAD_SRV/PackageSet('0001')/$value</CODE></PRE><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px">6.4. Below is the HTTP response.</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/URI-Result.jpg" />.</P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Response</P><BR /> &nbsp;<BR /> <BR /> 6.5. Here comes the final step, click on the "Response in Browser" and let us see the uploaded ZIP package.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/ZIP-Package-1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Downloaded ZIP Package</P><BR /> Hurray! the same ZIP package is downloaded.<BR /> <H3 id="toc-hId--949976241">Conclusion</H3><BR /> In this way, we can download the ZIP package from the Odata service. UI developers can use the same service and trigger to download the package from the frontend button. Thank you for reading the blog post on ZIP Package download. I hope that you found the information useful and that it has provided you with some valuable insights.<BR /> <BR /> If you have any thoughts or questions on the topic, please feel free to leave a comment below. I would love to hear from you.<BR /> <BR /> <EM>If you found this post helpful, please like and share it with your network <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></EM><BR /> <BR /> &nbsp;<BR /> <BR /> Kind Regards,<BR /> <BR /> Nitin Sharma 2022-12-15T09:54:16+01:00 https://community.sap.com/t5/technology-blogs-by-members/generate-dynamic-qr-code-from-odata/ba-p/13564848 Generate Dynamic QR code from oDATA 2023-01-09T20:05:10+01:00 nitinksh1 https://community.sap.com/t5/user/viewprofilepage/user-id/45127 <H2 id="toc-hId-963036331"><STRONG>Introduction</STRONG></H2><BR /> QR (Quick Response) codes are two-dimensional barcodes that are widely used for storing and sharing information. They are particularly useful because they can be read quickly and easily by a smartphone or other device equipped with a camera and a QR code reader app.<BR /> <BR /> If we can add a QR code to our app/oData call, it can open a wide area of fields for implementation.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-895605545"><STRONG>Step-by-Step Procedure:</STRONG></H3><BR /> &nbsp;<BR /> <BR /> 1. Create a page format as of QR size: If we do not create a page format then the QR will be shown in the whole A4 size page and a lot of space will be left empty. Use tcode SPAD for creating.<BR /> <BR /> 2. Create a Barcode: We will use SE73 to create a barcode.<BR /> <BR /> 3. Create a smartstyle: To create a character format for QR.<BR /> <BR /> 4. Create a smartform: To display the<BR /> <BR /> 5. Create a class: To convert text to xstring. This xstring will be passed to the oData call.<BR /> <BR /> 6. Table Creation: Create a table to store the data to be displayed in form of a QR code via oData.<BR /> <BR /> 7. Create oData Service: Finally, we will be creating an oData service.<BR /> <BR /> 8. Publish and test the Odata service.<BR /> <BR /> &nbsp;<BR /> <BR /> Let's start the development now in the steps mentioned above.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-699092040"><STRONG>STEP 1:</STRONG>&nbsp;Create a page format: Go to tcode SPAD.</H3><BR /> 1.1 Click on the full administrator and go to the tab Device Types and click on display.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-1-SPAD-landing-screen-1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 1- SPAD landing screen</P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-2-SPAD-Page-Format-2.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 2- SPAD Page Format</P><BR /> &nbsp;<BR /> <BR /> 1.2 Click on the pencil button to come to change mode and then click Create to create a new page format.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-3-Create-Page-Format-1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 3- Create Page Format</P><BR /> &nbsp;<BR /> <BR /> 1.3 Save the page format with the below settings. One thing to notice is that depending on the data, the QR code can increase its size a bit as it has to hold more data in it. Play and change these settings as required.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-4-Save-Page-Format-1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 4- Save Page Format</P><BR /> &nbsp;<BR /> <BR /> 1.4 Our first step completes here.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-502578535"><STRONG>STEP 2: </STRONG>Create a barcode.</H3><BR /> &nbsp;<BR /> <BR /> 2.1 Go to tcode SE73 and create a new Barcode.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-5-SE73-2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 5 - SE73</P><BR /> &nbsp;<BR /> <BR /> 2.2 Create a new barcode.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-6-New-Barcode-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 6 - New Barcode</P><BR /> &nbsp;<BR /> <BR /> 2.3 Use the below setting to create the barcode.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-7-New-Barcode-Setting-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 7 - New Barcode Setting</P><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-8-New-Barcode-Setting-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 8 - New Barcode Setting</P><BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-9-New-Barcode-Setting-2.png" /><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 9 - New Barcode Setting</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-10-New-Barcode-Setting-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 10 - New Barcode Setting</P><BR /> &nbsp;<BR /> <BR /> 2.4 QR Code is created. Now it's time to test the QR code. Place your cursor on the new barcode, in our case it is ZQRDISP, and hit F6 (execute barcode). I guess we all are excited to see the QR code in this development for the first time.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-11-Test-Barcode-From-SE73-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 11 - Test Barcode From SE73</P><BR /> &nbsp;<BR /> <BR /> 2.5 Execute the report with any text.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-12-Execute-Report-2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 12 - Execute Report</P><BR /> &nbsp;<BR /> <BR /> 2.6 Tada! Our QR code is ready.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-13-QR-Code-from-SE73-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 13 - QR Code from SE73</P><BR /> &nbsp;<BR /> <H3 id="toc-hId-306065030"><STRONG>STEP 3 : Create Smartstyle<BR /> </STRONG></H3><BR /> Let's create a smartstyle on the top of created barcode.<BR /> <BR /> 3.1 Create a smartstyle with character format as the created barcode. Also, create a default paragraph to add to the header data.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-14-Smartsyles.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 14 - Smartsyles</P><BR /> &nbsp;<BR /> <H3 id="toc-hId-109551525"><STRONG>STEP 4: Create Smartform<BR /> </STRONG></H3><BR /> Let's move on to create a smartform.<BR /> <BR /> 4.1 This smartform will have an input parameter of type string and we will pass this parameter to the text element so that it can be displayed as a QR code. Add recently created smartsytle via the output options tab of the text element.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-15-Smartform.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 15 - Smartform</P><BR /> 4.2 Save and activate it.<BR /> <BR /> 4.3 It's time to execute the smartform, let's see what the output looks like. Pass any text to input field. Voila, we got a QR code!<span class="lia-unicode-emoji" title=":man_dancing:">🕺</span><span class="lia-unicode-emoji" title=":man_dancing:">🕺</span><span class="lia-unicode-emoji" title=":man_dancing:">🕺</span><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-16-Smartform-Output.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 16 - Smartform Output</P><BR /> 4.4 Do scan the QR code and it will take you to like to read another oData blog.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--86961980"><STRONG>STEP 5: Create Class<BR /> </STRONG></H3><BR /> &nbsp;<BR /> <BR /> 5.1 Create a class that will take a string as an input. It will take that string and pass it to smartform, generate the QR from it, and then finally the QR will be converted to pdf xstring. As oData can not process images directly, we are converting it to xstring.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-17-Class.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 17 - Class</P><BR /> &nbsp;<BR /> <BR /> 5.2 Below is the snippet of the code. We are performing the below activities in the code:<BR /> <UL><BR /> <LI>Get Device type.</LI><BR /> <LI>Set relevant output options of the smartform.</LI><BR /> <LI>Call smartform.</LI><BR /> <LI>Convert the smartform output to OTF format.</LI><BR /> <LI>Pass back the OTF xstring as a returning parameter.</LI><BR /> </UL><BR /> <PRE class="language-abap"><CODE> METHOD display.<BR /> <BR /> DATA :<BR /> lv_fm_name TYPE rs38l_fnam,<BR /> ls_output_options TYPE ssfcompop,<BR /> lv_language TYPE tdspras,<BR /> ls_control_parameters TYPE ssfctrlop,<BR /> ls_output_data TYPE ssfcrescl,<BR /> lv_pdf_len TYPE i,<BR /> lv_pdf_xstring TYPE xstring,<BR /> lt_lines TYPE TABLE OF tline,<BR /> lv_devtype TYPE rspoptype,<BR /> lt_tstotf TYPE tsfotf.<BR /> <BR /> * language<BR /> lv_language = sy-langu.<BR /> TRANSLATE lv_language TO UPPER CASE.<BR /> ls_control_parameters-langu = lv_language.<BR /> <BR /> * set control parameters to get the output text format (OTF) from Smart Forms<BR /> ls_control_parameters-no_dialog = 'X'.<BR /> ls_control_parameters-getotf = 'X'.<BR /> ls_control_parameters-preview = space. "No preview<BR /> <BR /> * get device type from language<BR /> CALL FUNCTION 'SSF_GET_DEVICE_TYPE'<BR /> EXPORTING<BR /> i_language = lv_language<BR /> * i_application = 'SAPDEFAULT'<BR /> IMPORTING<BR /> e_devtype = lv_devtype<BR /> EXCEPTIONS<BR /> no_language = 1<BR /> language_not_installed = 2<BR /> no_devtype_found = 3<BR /> system_error = 4<BR /> OTHERS = 5.<BR /> <BR /> * set device type in output options<BR /> ls_output_options-tdprinter = lv_devtype.<BR /> <BR /> * Set relevant output options<BR /> ls_output_options-tdnewid = 'X'. "Print parameters,<BR /> ls_output_options-tddelete = space. "Print parameters<BR /> <BR /> CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'<BR /> EXPORTING<BR /> formname = 'ZQRDISPLAY' "Smartform name<BR /> IMPORTING<BR /> fm_name = lv_fm_name<BR /> EXCEPTIONS<BR /> no_form = 1<BR /> no_function_module = 2<BR /> OTHERS = 3.<BR /> <BR /> * Call Smartform generated FM<BR /> CALL FUNCTION lv_fm_name<BR /> EXPORTING<BR /> control_parameters = ls_control_parameters<BR /> output_options = ls_output_options<BR /> user_settings = space<BR /> gv_text = iv_barcode_data<BR /> IMPORTING<BR /> job_output_info = ls_output_data<BR /> EXCEPTIONS<BR /> formatting_error = 1<BR /> internal_error = 2<BR /> send_error = 3<BR /> user_canceled = 4<BR /> OTHERS = 5.<BR /> <BR /> APPEND LINES OF ls_output_data-otfdata[] TO lt_tstotf[].<BR /> <BR /> * Convert to OTF<BR /> CALL FUNCTION 'CONVERT_OTF'<BR /> EXPORTING<BR /> format = 'PDF'<BR /> IMPORTING<BR /> bin_filesize = lv_pdf_len<BR /> bin_file = lv_pdf_xstring " binary file<BR /> TABLES<BR /> otf = lt_tstotf<BR /> lines = lt_lines<BR /> EXCEPTIONS<BR /> err_max_linewidth = 1<BR /> err_format = 2<BR /> err_conv_not_possible = 3<BR /> err_bad_otf = 4<BR /> OTHERS = 5.<BR /> <BR /> IF sy-subrc = 0.<BR /> rv_image_data = lv_pdf_xstring.<BR /> ENDIF.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--283475485"><STRONG>STEP 6: Create a Table</STRONG></H3><BR /> 6.1 This table will store the data information and also will be used while creating the oData service.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-18-Table.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 18 - Table</P><BR /> <BR /> <H3 id="toc-hId--479988990"><STRONG>STEP 7: Create an oData service<BR /> </STRONG></H3><BR /> 7.1 Finally we reached the step where we will be creating the oData service. If it's your first oData service then I would recommend visiting <A href="https://blogs.sap.com/2021/05/06/a-step-by-step-process-to-create-odata-services-in-sap-sap-hana-system/" target="_blank" rel="noopener noreferrer">A Step by Step process to create Odata services</A>.<BR /> <BR /> 7.2 Once the oData service is created, import the table created.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-19-oData-Service.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 19 - oData Service</P><BR /> 7.3 Do remember to check the checkbox "Media".<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-20-oData-Media-Check.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 20 - oData Media Check</P><BR /> &nbsp;<BR /> <BR /> 7.4 Now we are all set to generate the oData service. Once oData is generated, goto DPC extension class and redefine method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_STREAM.<BR /> <PRE class="language-abap"><CODE> METHOD /iwbep/if_mgw_appl_srv_runtime~get_stream.<BR /> <BR /> DATA:<BR /> lt_keys TYPE /iwbep/t_mgw_tech_pairs,<BR /> ls_key TYPE /iwbep/s_mgw_tech_pair,<BR /> lv_customer TYPE s_customer,<BR /> lv_xstring TYPE xstring,<BR /> ls_stream TYPE ty_s_media_resource.<BR /> <BR /> lt_keys = io_tech_request_context-&gt;get_keys( ).<BR /> <BR /> * docno is the specified key<BR /> READ TABLE lt_keys WITH KEY name = 'DOCNO' INTO ls_key.<BR /> IF sy-subrc IS INITIAL.<BR /> <BR /> * We will convert field LINK as QR code<BR /> SELECT SINGLE link FROM zstoreqrdetails INTO @DATA(lv_link)<BR /> WHERE docno = @ls_key-value.<BR /> <BR /> * Method display of Class zcl_qrcode will convert the data to QR to xstring<BR /> lv_xstring = zcl_qrcode=&gt;display( iv_barcode_data = lv_link ).<BR /> <BR /> ls_stream-value = lv_xstring.<BR /> <BR /> ls_stream-mime_type = 'application/pdf'.<BR /> <BR /> * Pass the QR's xstrinh back to oData<BR /> copy_data_to_ref( EXPORTING is_data = ls_stream<BR /> CHANGING cr_data = er_stream ).<BR /> <BR /> ENDIF.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> &nbsp;<BR /> <BR /> 7.5 In this step we will goto MPC extension class and redefine method DEFINE.<BR /> <PRE class="language-abap"><CODE> METHOD define.<BR /> <BR /> DATA:<BR /> lo_entity TYPE REF TO /iwbep/if_mgw_odata_entity_typ,<BR /> lo_property TYPE REF TO /iwbep/if_mgw_odata_property.<BR /> <BR /> super-&gt;define( ).<BR /> <BR /> * QR_Detail is the entity name<BR /> lo_entity = model-&gt;get_entity_type( iv_entity_name = 'QR_Detail' ).<BR /> <BR /> IF lo_entity IS BOUND.<BR /> * Field Link will be converted to media<BR /> lo_property = lo_entity-&gt;get_property( iv_property_name = 'Link' ).<BR /> lo_property-&gt;set_as_content_type( ).<BR /> ENDIF.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> &nbsp;<BR /> <BR /> 7.6 That's it. We are done with the development. In the next step, we will test it.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--676502495"><STRONG>STEP 8: Testing</STRONG></H3><BR /> &nbsp;<BR /> <BR /> 8.1 Register your oData service.<BR /> <BR /> 8.2 Once registered, let's see if metadata is loaded.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-21-Metadata.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 21 - Metadata</P><BR /> &nbsp;<BR /> <BR /> 8.3 Guys, please open your QR scanners as we are now going to get them. Execute the below URL and we will get the QR code as output.<BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/ZSHOW_QRINFO_SRV/QR_DetailSet('0001')/$value</CODE></PRE><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-22-Test1.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 22 - Test1</P><BR /> 8.4 Let's execute another case.<BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/ZSHOW_QRINFO_SRV/QR_DetailSet('0002')/$value</CODE></PRE><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/Image-23-Test2.jpg" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Image 23 - Test2</P><BR /> <BR /> <H2 id="toc-hId--654844362"><STRONG>Conclusion</STRONG></H2><BR /> As we come to the end of this post, I hope you have a better understanding of how to display QR codes via oData call.<BR /> <BR /> I hope that you found the information useful and that it has provided you with some valuable insights. If you have any thoughts or questions on the topic, please feel free to leave a comment below. I would love to hear from you.<BR /> <BR /> <EM>If you found this post helpful, please share it with your network <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></EM><BR /> <BR /> &nbsp;<BR /> <BR /> Thanks,<BR /> <BR /> Nitin Sharma<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2023-01-09T20:05:10+01:00 https://community.sap.com/t5/technology-blogs-by-members/implementing-all-odata-query-uri-options-part-2/ba-p/13549957 Implementing All OData Query/URI Options - Part 2 2023-03-26T13:54:17+02:00 nitinksh1 https://community.sap.com/t5/user/viewprofilepage/user-id/45127 <H2 id="toc-hId-961339235">Introduction</H2><BR /> In the previous blog, we have discussed about the URI calls which do not require any custom implementation. In this blog, we will go through the URI's which do require custom implementation.<BR /> <H2 id="toc-hId-764825730">Steps</H2><BR /> We can divide OData URI to 2 parts:<BR /> <OL><BR /> <LI><STRONG>Do Not Need Custom Implementation (<A href="https://blogs.sap.com/2023/03/26/implementing-all-odata-query-uri-options-part-1/" target="_blank" rel="noopener noreferrer">Implementing All OData Query/URI Options – Part 1</A>)<BR /> </STRONG><BR /> <OL><BR /> <LI>$select</LI><BR /> <LI>$count</LI><BR /> <LI>$expand</LI><BR /> <LI>$format</LI><BR /> <LI>$links</LI><BR /> <LI>$value</LI><BR /> </OL><BR /> </LI><BR /> <LI><STRONG>Need Custom Implementation </STRONG>(This Blog)<BR /> <OL><BR /> <LI>$orderby</LI><BR /> <LI>$top</LI><BR /> <LI>$skip</LI><BR /> <LI>$filter</LI><BR /> <LI>$inlinecount</LI><BR /> <LI>$skiptoken</LI><BR /> </OL><BR /> </LI><BR /> </OL><BR /> &nbsp;<BR /> <H2 id="toc-hId-568312225">Implementation</H2><BR /> <STRONG>1. $orderby: </STRONG>The $orderby option is used to specify a sort order for the results of a query. It is used in the URL of an OData service to indicate how the results should be sorted.<BR /> <BR /> The syntax for the $orderby option is as follows: <EM>$orderby=propertyName [asc|desc]</EM>, where propertyName is the name of the property by which the results should be sorted, and "asc" or "desc" is used to specify the sort order (ascending or descending, respectively).<BR /> <BR /> For example, if we want to retrieve a list of customers and sort them by last name in descending order, the URL would look like this:<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$orderby=LastName" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$orderby=LastName</A> desc</CODE></PRE><BR /> It is also possible to sort by multiple properties using the $orderby option, by separating each property with a comma.<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$orderby=LastName" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$orderby=LastName</A> desc, FirstName asc</CODE></PRE><BR /> &nbsp;<BR /> <BR /> The code the $orderby can be written as:<BR /> <PRE class="language-abap"><CODE> METHOD ekkoset_get_entityset.<BR /> <BR /> *- To get data from DB<BR /> SELECT * FROM ekko INTO TABLE @DATA(lt_ekko) UP TO 10 ROWS.<BR /> <BR /> *- Check the $orderby in the Odata Query<BR /> READ TABLE it_order INTO DATA(ls_order) INDEX 1.<BR /> IF sy-subrc IS INITIAL.<BR /> IF ls_order-order = 'desc'.<BR /> SORT lt_ekko BY (ls_order-property) DESCENDING.<BR /> ELSE.<BR /> SORT lt_ekko BY (ls_order-property) ASCENDING.<BR /> ENDIF.<BR /> ENDIF.<BR /> <BR /> *- Check the size of the table for $inlinecount<BR /> IF io_tech_request_context-&gt;has_inlinecount( ) = abap_true.<BR /> DESCRIBE TABLE lt_ekko LINES DATA(lv_size).<BR /> es_response_context-inlinecount = lv_size.<BR /> ENDIF.<BR /> <BR /> MOVE-CORRESPONDING lt_ekko TO et_entityset.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> &nbsp;<BR /> <P style="overflow: hidden;margin-bottom: 0px">Below is the output:</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/1.-orderby.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">1. $orderby.jpg</P><BR /> Another better way to use the $orderby can be the standard way of using it, displayed below:<BR /> <PRE class="language-abap"><CODE>*- Check the $orderby in the Odata Query<BR /> /iwbep/cl_mgw_data_util=&gt;orderby(<BR /> EXPORTING<BR /> it_order = it_order " the sorting order<BR /> CHANGING<BR /> ct_data = lt_ekko<BR /> ).</CODE></PRE><BR /> &nbsp;<BR /> <BR /> <STRONG>2. $top: </STRONG>The $top option is used to specify the maximum number of results that should be returned in a query. It is used in the URL of an OData service to indicate how many results should be returned. The syntax for the $top option is as follows: $top=n, where n is an integer indicating the number of results that should be returned.<BR /> <BR /> For example, if we want to retrieve the top 10 customers, the URL would look like this:<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$top=10" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$top=10</A></CODE></PRE><BR /> The $top option can be used in combination with other options such as $filter, $select and $orderby to further refine the results of a query.<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country</A> eq 'US'&amp;$top=5&amp;$orderby=LastName desc</CODE></PRE><BR /> It's important to note that the $top option is used to limit the number of records returned in one response and not to restrict the total number of records returned by the OData service.<BR /> <BR /> &nbsp;<BR /> <PRE class="language-abap"><CODE> METHOD ekkoset_get_entityset.<BR /> <BR /> *- To get data from DB<BR /> SELECT * FROM ekko INTO TABLE @DATA(lt_ekko) UP TO 10 ROWS.<BR /> <BR /> *- Check the $orderby in the Odata Query<BR /> /iwbep/cl_mgw_data_util=&gt;orderby(<BR /> EXPORTING<BR /> it_order = it_order " the sorting order<BR /> CHANGING<BR /> ct_data = lt_ekko<BR /> ).<BR /> <BR /> *- For paging i.e. $top and $skip<BR /> /iwbep/cl_mgw_data_util=&gt;paging(<BR /> EXPORTING<BR /> is_paging = is_paging " paging structure<BR /> CHANGING<BR /> ct_data = lt_ekko<BR /> ).<BR /> <BR /> *- Check the size of the table for $inlinecount<BR /> IF io_tech_request_context-&gt;has_inlinecount( ) = abap_true.<BR /> DESCRIBE TABLE lt_ekko LINES DATA(lv_size).<BR /> es_response_context-inlinecount = lv_size.<BR /> ENDIF.<BR /> <BR /> MOVE-CORRESPONDING lt_ekko TO et_entityset.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> We can use it as below:<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/2.-top-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">2. $top.jpg</P><BR /> <STRONG>3. $skip: </STRONG>The $skip option is used to specify the number of results that should be skipped before returning the results in a query. It is used in the URL of an OData service to indicate how many results should be skipped. The syntax for the $skip option is as follows: $skip=n, where n is an integer indicating the number of results that should be skipped.<BR /> <BR /> For example, if we want to retrieve all customers but skip the first 10, the URL would look like this:<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$skip=10" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$skip=10</A></CODE></PRE><BR /> The $skip option can be used in combination with other options such as $top, $filter, $select, and $orderby to further refine the results of a query.<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country</A> eq 'US'&amp;$skip=5&amp;$top=5&amp;$orderby=LastName desc</CODE></PRE><BR /> It's important to note that the $skip option is used to skip the records from the beginning of the result set, so it is typically used in combination with the $top option to retrieve a specific page of results.<BR /> <BR /> Same code of paging(used in 3. $top). The below snippet is showing the second 2nd record as it is fetching the 1st record after skipping 1st one.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/3.-skip-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">3. $skip.jpg</P><BR /> &nbsp;<BR /> <BR /> <STRONG>4. $filter: </STRONG>The $filter option is used to specify filter criteria for the results of a query. It is used in the URL of an OData service to indicate which results should be returned based on certain conditions. The syntax for the $filter option is as follows: $filter=condition, where the condition is a logical expression that evaluates to true or false.<BR /> <BR /> The condition can be built using comparison and logical operators (eq, ne, gt, ge, lt, le, and, or, not).<BR /> <BR /> For example, if we want to retrieve all customers whose last name starts with "S", the URL would look like this:<BR /> <PRE class="language-abap"><CODE>http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=startswith(LastName,'S')</CODE></PRE><BR /> If we want to retrieve all customers whose last name starts with "S" and whose first name is "John", the URL would look like this:<BR /> <PRE class="language-abap"><CODE>http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=startswith(LastName,'S') and FirstName eq 'John'</CODE></PRE><BR /> The $filter option can be used in combination with other options such as $top, $skip, $select, and $orderby to further refine the results of a query.<BR /> <PRE class="language-abap"><CODE> METHOD ekkoset_get_entityset.<BR /> <BR /> *- To get data from DB<BR /> *- it_filter_select_options will have filter values for $filter keyword<BR /> IF it_filter_select_options IS INITIAL.<BR /> SELECT * FROM ekko INTO TABLE @DATA(lt_ekko) UP TO 10 ROWS.<BR /> ELSE.<BR /> READ TABLE it_filter_select_options INTO DATA(ls_sopt)<BR /> WITH KEY property = 'Ebeln'.<BR /> IF sy-subrc IS INITIAL.<BR /> SELECT * FROM ekko INTO TABLE @lt_ekko WHERE ebeln IN @ls_sopt-select_options.<BR /> ENDIF.<BR /> ENDIF.<BR /> <BR /> *- Check the $orderby in the Odata Query<BR /> /iwbep/cl_mgw_data_util=&gt;orderby(<BR /> EXPORTING<BR /> it_order = it_order " the sorting order<BR /> CHANGING<BR /> ct_data = lt_ekko<BR /> ).<BR /> <BR /> *- For paging i.e. $top and $skip<BR /> /iwbep/cl_mgw_data_util=&gt;paging(<BR /> EXPORTING<BR /> is_paging = is_paging " paging structure<BR /> CHANGING<BR /> ct_data = lt_ekko<BR /> ).<BR /> <BR /> *- Check the size of the table for $inlinecount<BR /> IF io_tech_request_context-&gt;has_inlinecount( ) = abap_true.<BR /> DESCRIBE TABLE lt_ekko LINES DATA(lv_size).<BR /> es_response_context-inlinecount = lv_size.<BR /> ENDIF.<BR /> <BR /> MOVE-CORRESPONDING lt_ekko TO et_entityset.<BR /> <BR /> ENDMETHOD.</CODE></PRE><BR /> <P style="overflow: hidden;margin-bottom: 0px">We can test the above code as:</P><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/4.-filter.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">4. $filter.jpg</P><BR /> <STRONG>5. $inlinecount:</STRONG> It is used to include the total count of all the matching results in the response. It is used in the URL of an OData service to indicate that the total count of the matching results should be included in the response. The syntax for the $inlinecount option is as follows: $inlinecount=allpages, where "allpages" is a keyword indicating that the total count should be included.<BR /> <BR /> For example, if we want to retrieve all customers and include the total count of customers in the response, the URL would look like this:<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$inlinecount=allpages" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$inlinecount=allpages</A></CODE></PRE><BR /> The $inlinecount option can be used in combination with other options such as $filter, $top, $skip, $select and $orderby to further refine the results of a query.<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country</A> eq 'US'&amp;$top=5&amp;$skip=5&amp;$orderby=LastName desc&amp;$inlinecount=allpages</CODE></PRE><BR /> It's important to note that the $inlinecount option will include the count of the matching results in the response, the count will be included in the ".count" attribute of the response.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/5.-filter.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">5. $filter.jpg</P><BR /> <STRONG>6. $skiptoken:</STRONG> The $skiptoken option is used with the $top option to retrieve a specific page of results by providing a token that represents the position in the result set from where the next set of results should be retrieved. When a partial response is returned by the server, the $skiptoken value is included in the __next link of the response, allowing clients to easily retrieve the next set of results without having to construct or interpret the $skiptoken value themselves.<BR /> <BR /> The syntax for the $skiptoken option is as follows: $skiptoken=token, where the token is a string value representing the position in the result set from where the next set of results should be retrieved.<BR /> <BR /> For example, if we want to retrieve the next set of 10 customers starting from the 11th customer, the URL would look like this:<BR /> <PRE class="language-abap"><CODE>http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$top=10&amp;$skiptoken='11'</CODE></PRE><BR /> The $skiptoken option can be used in combination with other options such as $filter, $top, $select and $orderby to further refine the results of a query.<BR /> <PRE class="language-abap"><CODE><A href="http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;/sap/opu/odata/sap/&lt;service&gt;/Customers?$filter=Country</A> eq 'US'&amp;$top=5&amp;$skiptoken='11'&amp;$orderby=LastName desc</CODE></PRE><BR /> It's important to note that the $skiptoken option is used to navigate through the result set in a pagination manner, and it should be used in conjunction with $top option and the result set should be sorted in the same order as in the query that generated the skiptoken.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/6.-skiptoken.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">6. $skiptoken.jpg</P><BR /> &nbsp;<BR /> <BR /> The $skip and $skiptoken looks same in first look but they are some difference. To know further about $skip and $skiptoken you can visit this blog: <A href="https://blogs.sap.com/2023/03/26/difference-between-skip-and-skiptoken-in-odata/" target="_blank" rel="noopener noreferrer">Difference between $skip and $skiptoken in Odata</A><BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-371798720">Conclusion</H2><BR /> SAP has provided us multiple options to play with for real-time requirements with a little effort. I would recommend you to try these query options and debug to see how it works. The blog was divided into the following parts.<BR /> <UL><BR /> <LI>$orderby: sorts data by one or more fields.</LI><BR /> <LI>$top and $skip: enable server-side paging.</LI><BR /> <LI>$filter: retrieves specific data from an entity set based on a set of criteria.</LI><BR /> <LI>$inlinecount: provides the total number of records in an entity set.</LI><BR /> <LI>$skiptoken: enables server-side paging using a continuation token.</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> <HR /><BR /> <BR /> Edit 1: Thanks <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/12545">@gregorw</a> for helping to enrich the blog.<BR /> <BR /> In the world of Odata services, there are two types of services -<BR /> <UL><BR /> <LI>Those created from SEGW</LI><BR /> <LI>Those based on CDS views</LI><BR /> </UL><BR /> When creating Odata services from SEGW, custom implementation is required for the $orderby, $top, $skip, $filter, and $inlinecount query options. However, this is not the case when the Odata service is based on a CDS view. In this scenario, SAP provides these query options without the need for implementation, making the development process simpler and more efficient.<BR /> <BR /> It’s important to note that this difference exists because of the fundamental architectural differences between SEGW and CDS views. SEGW generates ABAP code based on metadata, whereas CDS views are defined in the ABAP repository and translated into Open SQL. By leveraging the capabilities of CDS views, developers can benefit from SAP’s pre-built query options and focus on delivering value to their customers.<BR /> <BR /> If you have any thoughts or questions on the topic, please feel free to leave a comment below. I would love to hear from you.<BR /> <BR /> <HR /><BR /> <BR /> &nbsp;<BR /> <BR /> <EM>If you found this post helpful, please like and share it with your network <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></EM><BR /> <BR /> &nbsp;<BR /> <BR /> Kind Regards,<BR /> <BR /> Nitin Sharma<BR /> <DIV><BR /> <DIV><CODE class="!whitespace-pre-wrap hljs language-perl"></CODE></DIV><BR /> </DIV> 2023-03-26T13:54:17+02:00 https://community.sap.com/t5/technology-blogs-by-members/difference-between-skip-and-skiptoken-in-odata/ba-p/13560047 Difference between $skip and $skiptoken in Odata 2023-03-26T13:57:47+02:00 nitinksh1 https://community.sap.com/t5/user/viewprofilepage/user-id/45127 <H2 id="toc-hId-962909478">Introduction</H2><BR /> When working with large datasets in SAP OData, server-side paging can be a useful technique for improving performance and reducing the amount of data that needs to be transmitted over the network. Two commonly used parameters for server-side paging are <CODE>$skip</CODE> and <CODE>$skiptoken</CODE>. While they may seem similar, they serve different purposes and have different use cases.<BR /> <BR /> In this technical blog, we will explore the difference between <CODE>$skip</CODE> and <CODE>$skiptoken</CODE> in SAP OData and provide examples of how they can be used in different scenarios. We will also discuss best practices for using these parameters and provide tips for optimizing performance when working with large datasets.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>What is <CODE>$skip</CODE> :</STRONG> Please refer to this blog for more details about <CODE>$skip</CODE> - <A href="https://blogs.sap.com/2023/03/26/implementing-all-odata-query-uri-options-part-2/" target="_blank" rel="noopener noreferrer">Implementing All OData Query/URI Options – Part 2</A><BR /> <BR /> <STRONG>What is <CODE>$skiptoken</CODE>:</STRONG> Please refer to this blog for more details about <CODE>$skiptoken</CODE>&nbsp;<A href="https://blogs.sap.com/2023/03/26/implementing-all-odata-query-uri-options-part-2/" target="_blank" rel="noopener noreferrer">Implementing All OData Query/URI Options – Part 2</A><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-895478692"><SPAN style="text-decoration: underline">Difference between <CODE>$skip</CODE> and <CODE>$skiptoken</CODE>:</SPAN></H3><BR /> $skip is used to skip a specified number of items in a collection of data before returning the remaining results. For example, if we want to retrieve all employees after skipping the first 10 employees, we would use the following query:<BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/&lt;service_name&gt;/Employees?$skip=10</CODE></PRE><BR /> This query would skip the first 10 employees and return the remaining employees in the "Employees" entity set.<BR /> <BR /> On the other hand, $skiptoken is used to enable efficient server-side paging of query results when the size of the data set is too large to be retrieved in a single request. When a server returns a limited number of results along with a $skiptoken value, the client can use this token in a subsequent request to retrieve the next set of results. The $skiptoken value serves as an identifier of the last result returned by the server and helps the server to skip to the next set of results efficiently.<BR /> <BR /> For example, suppose we want to retrieve the first 100 orders from an "Orders" entity set that contains 500 orders. We can use the following query:<BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/&lt;service_name&gt;/Orders?$top=100</CODE></PRE><BR /> This query would retrieve the first 100 orders. However, if we want to retrieve the next 100 orders, we would need to use $skiptoken. When the server returns the first 100 orders, it would also return a $skiptoken value that identifies the last order returned. We can then use this $skiptoken value in a subsequent request to retrieve the next 100 orders:<BR /> <DIV><BR /> <DIV><BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/&lt;service_name&gt;/Orders?$top=100&amp;$skiptoken=&lt;skiptoken_value&gt;</CODE></PRE><BR /> </DIV><BR /> </DIV><BR /> In this query, <CODE>&lt;skiptoken_value&gt;</CODE> is the $skiptoken value returned by the server in the previous response. The server would skip the first 100 orders and return the next 100 orders after the order is identified by the $skiptoken value.<BR /> <BR /> Few interesting examples that we could use in an SAP OData technical blog about server-side paging using $skip and $skiptoken:<BR /> <OL><BR /> <LI><STRONG>Retrieving large amounts of data efficiently:</STRONG> Imagine we have an entity set containing a large number of records, such as a sales order entity set that contains thousands of orders. Instead of retrieving all the orders in a single request, we can use $skip and $skiptoken to retrieve them in smaller, more manageable batches. This can significantly improve performance and reduce the load on the server.</LI><BR /> <LI><STRONG>Implementing infinite scrolling:</STRONG> With server-side paging, we can implement infinite scrolling, where data is loaded dynamically as the user scrolls down a page. This can provide a better user experience and prevent the need to load all the data at once, which can be slow and resource-intensive.</LI><BR /> <LI><STRONG>Combining $skip and $filter to retrieve specific data:</STRONG> We can combine $skip and $filter to retrieve specific data from an entity set. For example, if we have an employee entity set and we want to retrieve all the employees in the sales department after skipping the first 10 employees, we can use the following query:<BR /> <PRE class="language-abap"><CODE>/sap/opu/odata/sap/&lt;service_name&gt;/Employees?$skip=10&amp;$filter=Department eq 'Sales'</CODE></PRE><BR /> </LI><BR /> <LI>Using $skiptoken with SAP Gateway: SAP Gateway provides built-in support for $skiptoken, allowing us to easily implement server-side paging in our OData services. We can use the <CODE>go_paging</CODE> method in our Gateway class to handle $skiptoken values and efficiently retrieve large amounts of data.</LI><BR /> </OL><BR /> <H3 id="toc-hId-698965187"><STRONG>Conclusion:</STRONG></H3><BR /> In conclusion, understanding the difference between <CODE>$skip</CODE> and <CODE>$skiptoken</CODE> in SAP OData is crucial when working with large datasets. By using these parameters effectively, developers can improve the performance and scalability of their OData services and provide a better user experience for their customers. By following best practices and optimizing their queries, developers can ensure that their OData services are performing at their best and delivering value to their users.<BR /> <BR /> <EM>If you found this post helpful, please like and share it with your network <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></EM><BR /> <BR /> &nbsp;<BR /> <BR /> Kind Regards,<BR /> <BR /> Nitin Sharma 2023-03-26T13:57:47+02:00 https://community.sap.com/t5/technology-blogs-by-sap/request-s-n-from-external-system-and-respond-to-corporate-serialization/ba-p/13571226 Request S/N from External System and respond to Corporate Serialization 2023-11-06T23:36:34+01:00 chun_jiang https://community.sap.com/t5/user/viewprofilepage/user-id/775467 <H2 id="toc-hId-963864649"><STRONG>1. Introduction:</STRONG></H2><BR /> In this article, I will describe the way for serial number management. Basiclly, there are four variants. I would like to emphasis following two patterns. Both of them management S/N at Exteral System(e.g. Non-SAP) but in different way. I will focun on the differences on setting and operation.<BR /> <UL><BR /> <LI>SAP CorS Managed (External)</LI><BR /> <LI>SAP CorS Tracked (with MD reference)</LI><BR /> </UL><BR /> In addition, I will also introduce encoding/decoding Badi for well explain how S/N can be request from external and integration to CorS by utilizing customer own numbering rule.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/画像1-1.png" /></P><BR /> &nbsp;<BR /> <H2 id="toc-hId-767351144"><STRONG>2. Contents:</STRONG></H2><BR /> <STRONG>Pattern1. SAP CorS Managed (External)---Take SAP CorS as subordinate management system</STRONG><BR /> <UL><BR /> <LI>Approach1: Request of Serial Numbers from Cors -&gt; External</LI><BR /> <LI>Approach2: Upload Serial Number from CorS directly</LI><BR /> </UL><BR /> <STRONG>Pattern2. SAP CorS Tracked (with MD reference)---S/N is not management at SAP CorS, take CorS as S/N tracking system</STRONG><BR /> <UL><BR /> <LI>Approach: Posting S/N with EPCIS event directly from using Warehouse Toolbox</LI><BR /> </UL><BR /> &nbsp;<BR /> <H2 id="toc-hId-570837639"><STRONG>3. SAP CorS Managed (External): </STRONG></H2><BR /> <BLOCKQUOTE><BR /> <H6 id="toc-hId-890655010"><EM><A href="https://help.sap.com/docs/SAP_CORPORATE_SERIALIZATION/0954280172964ef3afa9d711d4cc1846/59bd79c40cf648e3a047aa78d3367538.html?locale=en-US" target="_blank" rel="noopener noreferrer">Serial Number Request and Distribution | SAP Help Portal</A></EM></H6><BR /> <H6 id="toc-hId-694141505"><EM><A href="https://help.sap.com/docs/SAP_CORPORATE_SERIALIZATION/0954280172964ef3afa9d711d4cc1846/a907bc6e3bbd456d8efec94c6c8856a4.html?locale=en-US&amp;q=request%20serial%20number%20external" target="_blank" rel="noopener noreferrer">Request Serial Numbers from an External System | SAP Help Portal</A></EM></H6><BR /> <H6 id="toc-hId-497628000"><EM><A href="https://help.sap.com/docs/SAP_CORPORATE_SERIALIZATION/0954280172964ef3afa9d711d4cc1846/99a9575f7caf462993a9a0576fd205ee.html?locale=en-US&amp;version=1.1&amp;q=%2FCORS%2FSNR_UPLOAD" target="_blank" rel="noopener noreferrer">Upload Serial Numbers | SAP Help Portal</A></EM></H6><BR /> <H6 id="toc-hId-301114495"><EM><A href="https://help.sap.com/docs/SAP_CORPORATE_SERIALIZATION/0954280172964ef3afa9d711d4cc1846/0f896c67a45445a7aca9e7ad602a4af4.html?locale=en-US&amp;q=request%20serial%20number%20external" target="_blank" rel="noopener noreferrer">Serial Number Request Services | SAP Help Portal</A></EM></H6><BR /> </BLOCKQUOTE><BR /> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<BR /> <H3 id="toc-hId--282647167"><STRONG>●Approach1: Request of Serial Numbers from External -&gt; CorS</STRONG></H3><BR /> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-09_12-28-03.jpg" /></P><BR /> <BR /> <H4 id="toc-hId--350077953"></H4><BR /> <H4 id="toc-hId--546591458"><STRONG>■Operation&nbsp; ※Take "List Managed S/N" as Example</STRONG></H4><BR /> <STRONG>1. &lt;External&gt;&nbsp; &nbsp; &nbsp; Generate S/N at External System(e.g. 300 List Managed S/N)</STRONG><BR /> <STRONG>2. &lt;SAP CorS&gt;&nbsp; &nbsp;Request S/N from Cors -&gt; External(e.g.10 List Managed S/N)<EM>   </EM></STRONG><BR /> Trcd:「/CORS/SNR_REQUEST - Request of Serial Numbers」<BR /> <STRONG>3. &lt;External&gt;&nbsp; &nbsp; &nbsp; S/N will be sent from External -&gt; CorS(e.g.10 List Managed S/N)</STRONG><BR /> <BR /> <EM>&nbsp;=&gt;As a result, CorS will recieve S/N and S/N Status:1-Create</EM><BR /> <BR /> <STRONG>4. &lt;SAP CorS&gt;&nbsp; &nbsp;Encoding S/N for GTIN</STRONG><BR /> Trcd: DataCockpit-&gt;Serial Numbers Node-&gt;Create Serial Number Request<BR /> BAdi here is possible.<BR /> <BR /> <EM>=&gt;As a result, S/N Status:2-Assign</EM><BR /> <BR /> <STRONG>5. &lt;SAP CorS&gt;&nbsp; &nbsp;Decoding S/N for Serialization Object</STRONG><BR /> Trcd:「/CORS/POSTEVENT - Post Manual Event 」or using Warehouse Toolbox.<BR /> BAdi here is possible.<BR /> <BR /> <EM>=&gt;As a result, S/N Status:3-Commission</EM><BR /> <BR /> &nbsp;<BR /> <H4 id="toc-hId--1240822058"><STRONG>■Setting</STRONG></H4><BR /> <B>1. Set up </B><B>Range Definition/Range (=Range Definition is must in this Pattern)</B><BR /> <BR /> ① Rng.Def.Origin.Ind=1(External)<BR /> ② Ener External System Name into Range Definition Origin tab<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-09_01-17-15.jpg" /></P><BR /> <B style="font-size: 1rem">2. Assign </B><B style="font-size: 1rem">External </B><B style="font-size: 1rem">Range to </B><B style="font-size: 1rem">Product, </B><B style="font-size: 1rem">Serial Number Management Type</B><B style="font-size: 1rem">=</B><B style="font-size: 1rem">E</B><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-09_17-06-24.jpg" /></P><BR /> <STRONG>3. Maintain External System Master</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-09_17-05-22.jpg" /></P><BR /> <STRONG>4. Set up Web Service Binding</STRONG><BR /> <BR /> <STRONG>-For SAP CorS system</STRONG><BR /> <BR /> Following SAP standard web service is used for external S/N request, which need to be setup by SOAMANAGER.<BR /> <UL><BR /> <LI>Service Definition: /CORS/SERIALNUMBERREQUEST</LI><BR /> <LI>Consumer Proxy: /CORS/CO_SNR_REQUEST</LI><BR /> </UL><BR /> You need to Import WSDL Binding in SAP CorS as well.<BR /> <UL><BR /> <LI>Go to SE80 -&gt; Enterprise Services Browser</LI><BR /> <LI>Select a package and right click to "Create a new object"</LI><BR /> <LI>Select "Service Consumer"</LI><BR /> <LI>Select "External WSDL"</LI><BR /> <LI>Select "WSDL source"</LI><BR /> <LI>…</LI><BR /> </UL><BR /> <STRONG>-For external (e.g. Non-SAP) system</STRONG><BR /> <UL><BR /> <LI>external(e.g. Non-SAP) system needs to facilitate a WebService binding for the SerialNumberRequest</LI><BR /> <LI>The WebService binding includes the endpoint where SAP CorS will direct its S/N Request towards</LI><BR /> </UL><BR /> <STRONG>-How to confirm what WSDL Binding at SAP CorS needed</STRONG><BR /> <UL><BR /> <LI>Open Trcd-SOAMANAGER</LI><BR /> <LI>Click「Web Service Configuration」 menu</LI><BR /> <LI>Click and open Service: /CORS/SERIALNUMBERREQUEST</LI><BR /> <LI>Click “Earth” mark and find「Binding WSDL Generation」tab</LI><BR /> <LI>Execute「WSDL URL for Binding」button, then we will see the exact payload and well format WSDL, which contain the required S/N infromation CorS needed from External.</LI><BR /> </UL><BR /> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<BR /> <H3 id="toc-hId--1143932556"><STRONG>●</STRONG><STRONG>Approach2:</STRONG><STRONG>&nbsp;Upload Serial Number from CorS directly</STRONG></H3><BR /> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<BR /> <H4 id="toc-hId--1633849068"><STRONG>■Operation</STRONG></H4><BR /> <STRONG>1.&nbsp; &lt;SAP CorS&gt;&nbsp; Upload S/N</STRONG><BR /> <SPAN style="font-size: 1rem">&nbsp;</SPAN><EM style="font-size: 1rem">Trcd:「/CORS/SNR_REQUEST - Request of Serial Numbers」</EM><BR /> <BR /> <EM>=&gt;As a result, S/N Status:1-Create</EM><BR /> <BR /> <STRONG>2. &lt;SAP CorS&gt;&nbsp; &nbsp;Encoding S/N for GTIN</STRONG><BR /> <EM>&nbsp;Trcd: DataCockpit-&gt;Serial Numbers Node-&gt;Create Serial Number Request</EM><BR /> <BR /> <EM>=&gt;As a result, S/N Status:2-Assign </EM><BR /> <BR /> <STRONG>3. &lt;SAP CorS&gt;&nbsp; Decoding S/N for Serialization Object</STRONG><BR /> <EM>&nbsp;Trcd:「/CORS/POSTEVENT - Post Manual Event 」or using Warehouse Toolbox</EM><BR /> <BR /> <EM>=&gt;As a result, S/N Status:3-Commission</EM><BR /> <H4 id="toc-hId--1830362573"></H4><BR /> <H4 id="toc-hId--2026876078"><STRONG>■Setting</STRONG></H4><BR /> <H4 id="toc-hId-2071577713"><STRONG>※Same with Approach1 and No need web service setting up.</STRONG></H4><BR /> &nbsp;<BR /> <H4 id="toc-hId-1875064208"><STRONG>■BAdi</STRONG></H4><BR /> For example, in case customer require EWM HU number to be used as a GRAI serial. GRAI serial number has a limit of 16 characters or less, EWM HU may have a lenth of more then 16 characters, in that case, a Badi implementation for encoding and decoding with customer own numbering logic is recommended.<BR /> <BR /> ・<STRONG>Pre-requisite</STRONG><BR /> <BR /> Using Trcd: /CORS/C_OBJENCTYPE - Maintain Object and Encoding Types<BR /> ①XXXXXX・・・Define Customer Z* Encoding Type<BR /> ②XX・・・Define Customer Z* Object Type<BR /> ③Assign①to②<BR /> <BR /> <B>・</B><B>Badi </B><B>Enhancement Spot</B><BR /> <BR /> Enhancement Spot: /CORS/ES_ID_ENC_DEC<BR /> BadI Definition: /CORS/BADI_ID_ENC_DEC<BR /> Interface: /CORS/IF_BADI_ID_ENC_DEC<BR /> Method: ENCODE or DECODE<BR /> <BR /> <B>・</B><B>Badi Sample</B><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-12_14-21-57.jpg" /></P><BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId--2029610579"><STRONG>4. </STRONG><STRONG>SAP CorS Tracked (with MD reference):</STRONG></H2><BR /> <STRONG>※Take "</STRONG><STRONG>List Managed S/N" as Example</STRONG><BR /> <BR /> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<BR /> <H3 id="toc-hId-1775440205"><STRONG>●Approach: Posting S/N with EPCIS event directly from using Warehouse Toolbox&nbsp;</STRONG></H3><BR /> ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー<BR /> <BR /> <B>■Concept</B><BR /> 1. Customer do not use CorS to manage S/N, <STRONG>Range/Range definition is not required</STRONG>.<BR /> Instead, "Serial Number Management Not Used" flag must be set on the detail tab of CorS product or BP master.<BR /> <BR /> 2. <STRONG>No need to request or upload external S/N</STRONG> from CorS.<BR /> <BR /> 3. It is possible to manage S/N events in CorS. S/N from an external system can be <STRONG>recorded directly and tracked within CorS</STRONG> by posting EPCIS event.<BR /> <BR /> <SPAN style="font-size: 1rem">For information on how to <STRONG>post an EPCIS event, you can use Warehouse Toolbox(Trcd:/STTPEC/WHS) </STRONG>, which is always used for register EPCIS event that related to warehouse task, or you can<STRONG> directly register EPCIS event with manual posting</STRONG>.</SPAN><BR /> <BR /> The advantage of this pattern is that if S/N can be managed centrally in an external system, there is no need for double management within SAP CorS. We use SAP CorS only for tracking and tracing S/N by posting EPCIS event to a partical serialization object.<BR /> <H4 id="toc-hId-1285523693"></H4><BR /> <H4 id="toc-hId-1257193879"><STRONG>■Setting Up Point</STRONG></H4><BR /> <B>1. Set up </B><B>“</B><B>Serial Number Management Not Used</B><B>” flag on the detail tab of CorS Product or BP Master.</B><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-09_01-33-43-1.jpg" /></P><BR /> <B>2. Register EPCIS Event (Commission) by Warehouse Toolbox (Post Manual Event is also worked)</B><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-09_01-34-10.jpg" /></P><BR /> <STRONG>3. Here is the posting result at DataCockpit.</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/12/2022-12-12_14-29-29.jpg" /></P><BR /> END.<BR /> <BR /> &nbsp; 2023-11-06T23:36:34+01:00