https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/NW-ABAP-Web-Services-blog-posts.xml SAP Community - NW ABAP Web Services 2026-02-25T12:11:12.922936+00:00 python-feedgen NW ABAP Web Services blog posts in SAP Community https://community.sap.com/t5/technology-blog-posts-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><P><BR />&nbsp;</P><H6 id="toc-hId-1251477084">Updates:<BR />2022-11-07: Added hint for new secure-by-default logs.</H6><P>&nbsp;</P><HR /><P>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 />&nbsp;</P><H3 id="toc-hId-667715422">“Please activate one or the other ICF service - it is urgent!”</H3><P>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 /></P><H3 id="toc-hId-471201917">Bring some light into the darkness</H3><P><FONT color="#FF0000"><SPAN><STRONG>Please note: </STRONG></SPAN></FONT><FONT color="#FF0000">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=""><SPAN class="">Menu' -&gt; '</SPAN><SPAN class="">ICF Integration' in transaction SBDLOG</SPAN></SPAN>. With this, the manual steps described below can be omitted. Furthermore,&nbsp;as of SAP S/HANA-Version 2022 services which are created via the <EM>HTTP Service Framework&nbsp;</EM>do not show up as nodes below /sap/bc/http but the URL path starts with this. Those services can be activated via transaction `UCON_HTTP_SERVICES`, if necessary.</FONT></P><P>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:</P><OL><OL><LI>Go to transaction SE38.</LI><LI>Execute report RS_ICF_SERV_ADMIN_TASKS.</LI><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 src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.03.29.png" border="0" width="403" height="391" /></LI><LI>Again. Repeat these steps for every system in your landscape.</LI></OL></OL><P><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>.</P><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><P>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.</P><P>&nbsp;</P><H3 id="toc-hId-274688412">What about service usage?</H3><P>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:</P><OL><OL><LI>extract the relevant info from the HTTP access log of the ICM (parameter icm/HTTP/logging_&lt;xx&gt;).</LI><LI>enable and evaluate the ICF trace using report RS_ICF_SERV_ADMIN_TASKS as mentioned in SAP note 2430473.</LI><LI>evaluate the Web Statistics.</LI></OL></OL><P>Method 1 might be time consuming to gather all log files and grep and normalize the relevant parts.<BR />Method 2 could have a performance impact as of SAP note 1611713.<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:</P><OL><LI>Go to transaction ST03.</LI><LI>Go to Collector and Performance DB -&gt; Performance Database -&gt; Workload Collector Database -&gt; Reorganization -&gt; Control.</LI><LI><IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.12.55.png" border="0" width="283" height="371" />Adjust retention period for the WEB statistics, e.g. TOTAL Monthly Aggregates Retention Period for `VC` and `VD`.<IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.15.03.png" border="0" width="722" height="195" /></LI><LI>Again: Repeat these steps for every system in your landscape.</LI></OL><P><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:</P><OL><LI>Go to transaction ST03.</LI><LI>Expand Workload -&gt; Total -&gt; Month -&gt; and perform for each available month the following steps.</LI><LI>Expand Analysis Views -&gt; Web Statistics -&gt; WEB Server Statistics.</LI><LI>Switch to tab “URL”.<IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.20.05.png" border="0" /><SPAN><STRONG>Note:</STRONG> 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 /><STRONG>Hint: </STRONG>You may have noticed the column “Protocol” indicates if a service is called via HTTP or HTTPS.</SPAN></LI><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><LI>Again: Repeat these steps for every system in your landscape.</LI></OL><H3 id="toc-hId-78174907">Put the puzzle together</H3><P>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:</P><OL><LI>Copy the export of active services CSV file as a template.</LI><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><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><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><LI>Save this list of your to-be-deactivated services as CSV file.</LI><LI>Again: Repeat these steps for every system in your landscape.</LI></OL><H3 id="toc-hId--118338598">&nbsp;</H3><H3 id="toc-hId--314852103">Time to cleanup</H3><P>Now you can start deactivating unused services in each system with your processed templates by following these steps:<BR /><BR /></P><OL><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><LI>Go to transaction SE38.</LI><LI>Execute report RS_ICF_SERV_MASS_PROCESSING.</LI><LI>Select “Deactivate ICF Services for All Virtual Hosts Listed in CSV File” and execute.<IMG src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/06/Bildschirmfoto-2020-06-17-um-10.21.16.png" border="0" width="359" height="470" /></LI><LI>Confirm the popup and upload the list to deactivate all services in the list.</LI><LI>Again: Repeat these steps for every system in your landscape.</LI></OL><P><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 /><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 /></P><H3 id="toc-hId--511365608">Whats next?</H3><P>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="noopener nofollow 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 /></P> 2020-06-18T10:23:53+02:00 https://community.sap.com/t5/technology-blog-posts-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-blog-posts-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-blog-posts-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-blog-posts-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_Jutur 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-blog-posts-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 ShankarGomare 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-blog-posts-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-blog-posts-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-blog-posts-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-blog-posts-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-blog-posts-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-blog-posts-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-blog-posts-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 nitinksh178 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-blog-posts-by-members/generate-dynamic-qr-code-from-odata/ba-p/13564848 Generate Dynamic QR code from oDATA 2023-01-09T20:05:10+01:00 nitinksh178 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-blog-posts-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 nitinksh178 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-blog-posts-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 nitinksh178 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-blog-posts-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 https://community.sap.com/t5/technology-blog-posts-by-members/defining-a-basic-cds-view/ba-p/13996477 Defining a Basic CDS View 2025-01-25T10:58:50.521000+01:00 mickaelquesnot https://community.sap.com/t5/user/viewprofilepage/user-id/150004 <DIV class=""><P>Defining a basic Core Data Services (CDS) view in SAP involves creating a data model on the database layer rather than the application layer. This offers significant advantages in terms of performance, data access, and reusability. Here's a breakdown of how to define a basic CDS view:</P><P><STRONG>1. Development Environment:</STRONG></P><P>You'll typically use the ABAP Development Tools (ADT) in Eclipse to create CDS views. This provides a modern and integrated development environment.</P><P><STRONG>2. CDS View Syntax:</STRONG></P><P>The basic syntax for defining a CDS view is as follows:</P><DIV class=""><DIV class=""><SPAN class="">SQL</SPAN><DIV class="">&nbsp;</DIV></DIV><DIV class=""><DIV class=""><PRE><SPAN class="">@AbapCatalog</SPAN>.sqlViewName: <SPAN class="">'SQL_VIEW_NAME'</SPAN> <SPAN class="">@AbapCatalog</SPAN>.compiler.compareFilter: <SPAN class="">true</SPAN> <SPAN class="">@AccessControl</SPAN>.authorizationCheck: #<SPAN class="">CHECK</SPAN> <SPAN class="">define</SPAN> <SPAN class="">view</SPAN> VIEW_NAME <SPAN class="">as</SPAN> <SPAN class="">select</SPAN> <SPAN class="">from</SPAN> DATABASE_TABLE <SPAN class="">or</SPAN> <SPAN class="">VIEW</SPAN> { element1 <SPAN class="">as</SPAN> alias1, element2 <SPAN class="">as</SPAN> alias2, ... elementN <SPAN class="">as</SPAN> aliasN };</PRE></DIV></DIV></DIV><P>Let's break down each part:</P><UL><LI><STRONG>@AbapCatalog.sqlViewName: 'SQL_VIEW_NAME':</STRONG> This annotation is mandatory. It defines the name of the corresponding SQL view that will be created in the database. This is the name you'll use when accessing the view from standard SQL.</LI><LI><STRONG>@AbapCatalog.compiler.compareFilter: true:</STRONG> This annotation is recommended. It ensures that filter conditions are pushed down to the database level for better performance.</LI><LI><STRONG>@AccessControl.authorizationCheck: #CHECK:</STRONG> This annotation is crucial for security. It enforces authorization checks based on the defined authorization objects.</LI><LI><STRONG>define view VIEW_NAME:</STRONG> This keyword starts the definition of the CDS view, followed by the name you want to give to the CDS entity. This is the name used within ABAP programs.</LI><LI><STRONG>as select from DATABASE_TABLE or VIEW:</STRONG> This specifies the data source for the view. You can select from database tables, database views, or other CDS views.</LI><LI><STRONG>{ element1 as alias1, ... }:</STRONG> This is the element list. It defines the fields you want to include in the view. You can rename fields using aliases (as alias).</LI></UL><P><STRONG>3. Example:</STRONG></P><P>Let's say you have a database table SCARR (Carrier) and you want to create a CDS view that includes the carrier ID and name:</P><DIV class=""><DIV class=""><SPAN class="">SQL</SPAN><DIV class="">&nbsp;</DIV></DIV><DIV class=""><DIV class=""><PRE><SPAN class="">@AbapCatalog</SPAN>.sqlViewName: <SPAN class="">'Z_CARRIER_VIEW'</SPAN> <SPAN class="">@AbapCatalog</SPAN>.compiler.compareFilter: <SPAN class="">true</SPAN> <SPAN class="">@AccessControl</SPAN>.authorizationCheck: #<SPAN class="">CHECK</SPAN> <SPAN class="">define</SPAN> <SPAN class="">view</SPAN> ZCarrierView <SPAN class="">as</SPAN> <SPAN class="">select</SPAN> <SPAN class="">from</SPAN> SCARR { carrid <SPAN class="">as</SPAN> CarrierID, carrname <SPAN class="">as</SPAN> CarrierName };</PRE></DIV></DIV></DIV><P>In this example:</P><UL><LI>Z_CARRIER_VIEW is the name of the SQL view.</LI><LI>ZCarrierView is the name of the CDS view.</LI><LI>carrid is renamed to CarrierID.</LI><LI>carrname is renamed to CarrierName.</LI></UL><P><STRONG>4. Key Concepts and Enhancements:</STRONG></P><UL><LI><STRONG>Aliases:</STRONG> Using aliases makes your code more readable and can be essential when joining tables with fields that have the same name.</LI><LI><STRONG>Data Types:</STRONG> The data types of the elements in the view are derived from the underlying database table or view.</LI><LI><STRONG>Expressions:</STRONG> You can use expressions in the element list to create calculated fields. For example:</LI></UL><DIV class=""><DIV class=""><SPAN class="">SQL</SPAN><DIV class="">&nbsp;</DIV></DIV><DIV class=""><DIV class=""><PRE><SPAN class="">define</SPAN> <SPAN class="">view</SPAN> ZSalesOrderValue <SPAN class="">as</SPAN> <SPAN class="">select</SPAN> <SPAN class="">from</SPAN> VBAK { vbeln <SPAN class="">as</SPAN> SalesOrder, netwr <SPAN class="">as</SPAN> NetValue, waerk <SPAN class="">as</SPAN> Currency, netwr <SPAN class="">*</SPAN> <SPAN class="">1.19</SPAN> <SPAN class="">as</SPAN> GrossValue <SPAN class="">/</SPAN><SPAN class="">/</SPAN> Calculated field };</PRE></DIV></DIV></DIV><UL><LI><STRONG>Joins:</STRONG> You can join multiple tables or views in the FROM clause.</LI></UL><DIV class=""><DIV class=""><SPAN class="">SQL</SPAN><DIV class="">&nbsp;</DIV></DIV><DIV class=""><DIV class=""><PRE><SPAN class="">define</SPAN> <SPAN class="">view</SPAN> ZCustomerOrders <SPAN class="">as</SPAN> <SPAN class="">select</SPAN> <SPAN class="">from</SPAN> KNA1 <SPAN class="">as</SPAN> Customer <SPAN class="">inner</SPAN> <SPAN class="">join</SPAN> VBAK <SPAN class="">as</SPAN> SalesOrder <SPAN class="">on</SPAN> Customer.kunnr <SPAN class="">=</SPAN> SalesOrder.kunnr { Customer.kunnr <SPAN class="">as</SPAN> CustomerID, Customer.name1 <SPAN class="">as</SPAN> CustomerName, SalesOrder.vbeln <SPAN class="">as</SPAN> SalesOrderNumber };</PRE></DIV></DIV></DIV><UL><LI><STRONG>WHERE Clause:</STRONG> You can use a WHERE clause to filter the data.</LI></UL><DIV class=""><DIV class=""><SPAN class="">SQL</SPAN><DIV class="">&nbsp;</DIV></DIV><DIV class=""><DIV class=""><PRE><SPAN class="">define</SPAN> <SPAN class="">view</SPAN> ZActiveCustomers <SPAN class="">as</SPAN> <SPAN class="">select</SPAN> <SPAN class="">from</SPAN> KNA1 { kunnr <SPAN class="">as</SPAN> CustomerID, name1 <SPAN class="">as</SPAN> CustomerName } <SPAN class="">where</SPAN> kunnr <SPAN class="">like</SPAN> <SPAN class="">'1000%'</SPAN>; <SPAN class="">/</SPAN><SPAN class="">/</SPAN> <SPAN class="">Filter</SPAN> customers starting <SPAN class="">with</SPAN> <SPAN class="">1000</SPAN> </PRE></DIV></DIV></DIV><UL><LI><STRONG>Associations:</STRONG> You can define associations between CDS views to navigate related data. This is a more advanced topic but very powerful for building complex data models.</LI></UL><P><STRONG>5. Activation and Usage:</STRONG></P><P>After defining the CDS view in ADT, you need to activate it. This creates the corresponding SQL view in the database. You can then use the CDS view in ABAP programs using Open SQL statements:</P><DIV class=""><DIV class=""><SPAN class="">ABAP</SPAN><DIV class="">&nbsp;</DIV></DIV><DIV class=""><DIV class=""><PRE>SELECT * FROM ZCarrierView INTO TABLE @DATA(lt_carriers).</PRE></DIV></DIV></DIV><P>You can also access the underlying SQL view directly using native SQL if needed.</P><P><STRONG>Benefits of CDS Views:</STRONG></P><UL><LI><STRONG>Performance:</STRONG> Data processing is pushed down to the database level, which is much faster than processing data in the application server.</LI><LI><STRONG>Simplified Data Access:</STRONG> CDS views provide a simplified and consistent way to access data.</LI><LI><STRONG>Reusability:</STRONG> CDS views can be reused in multiple applications.</LI><LI><STRONG>Extensibility:</STRONG> You can extend standard SAP data models using CDS views without modifying the original objects.</LI></UL><P>By understanding these basic concepts, you can start building efficient and powerful data models using CDS views in your SAP development.</P><P>&nbsp;</P><P><A title="PDF LINKEDIN" href="https://www.linkedin.com/posts/mickaelquesnot_gusap-s4-hanadefining-a-basic-cds-viewdocx-activity-7288156015299108864-KdWM?utm_source=share&amp;utm_medium=member_desktop" target="_self" rel="nofollow noopener noreferrer">https://www.linkedin.com/posts/mickaelquesnot_gusap-s4-hanadefining-a-basic-cds-viewdocx-activity-7288156015299108864-KdWM?utm_source=share&amp;utm_medium=member_desktop</A></P></DIV> 2025-01-25T10:58:50.521000+01:00 https://community.sap.com/t5/technology-blog-posts-by-members/abap-adaptation-for-any-middleware-to-cpi-is-migration-rfc-to-webservice/ba-p/14105577 ABAP Adaptation for Any Middleware to CPI/IS Migration ( RFC to Webservice ) 2025-05-20T16:14:40.004000+02:00 Hashini https://community.sap.com/t5/user/viewprofilepage/user-id/1419019 <P><STRONG>1.Introduction:</STRONG></P><P>This document provides an in-depth overview of the necessary changes in ABAP development when migrating from any middleware platform to SAP CPI. It particularly addresses the migration of RFC-based communication in middleware to SOAP-based web services in CPI.</P><P><STRONG>2.Background:</STRONG></P><P>The integration platform that enables communication between SAP and external systems. In any middleware, RFC adapters are commonly used to interact with remote systems through RFCs. However, with the shift to SAP CPI/IS, the integration landscape changes, and CPI/IS does not support sender RFCs, so &nbsp;it is necessary to refactor and convert these RFC calls into SOAP web services.</P><P><STRONG>3.Transition to SAP CPI:</STRONG></P><P>In CPI, communication is predominantly based on HTTP/SOAP or REST protocols. Therefore, the ABAP function modules that were exposed as RFCs in integration platform must now be exposed as <STRONG>SOAP web services</STRONG> to be compatible with CPI’s integration model.</P><P><STRONG>4.Why Convert RFC to a SOAP Web Service Rather Than Using a Wrapper?</STRONG></P><P>When a wrapper is created for a sender or receiver RFC, SAP automatically configures the service provider (inbound interface) in SOAMANAGER, thereby generating the web service from the scratch.<BR /><BR /><STRONG>5.ABAP Development Steps - Replacing RFC with SOAP Web Services:<BR /></STRONG></P><P><STRONG>&nbsp; &nbsp;5.1. Obtain the WSDL file from the RFC in SAP or from Integration team.</STRONG></P><P><STRONG>&nbsp; &nbsp; &nbsp; 5.1.1.In SE37, enter the RFC to convert to SOAP.</STRONG></P><P><STRONG>&nbsp; &nbsp; &nbsp; 5.1.2.</STRONG>Go to <STRONG>Utilities</STRONG> -&gt; <STRONG>More Utilities</STRONG> -&gt; <STRONG>Create Web Service</STRONG> -&gt; <STRONG>From Function Module</STRONG>.<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_0-1746429056919.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257494i17CFCB0BD135FEAF/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_0-1746429056919.png" alt="Hashini_0-1746429056919.png" /></span></P><P>&nbsp; &nbsp; &nbsp; &nbsp;5.1.3.Enter the RFC name and description, then click <STRONG>Next</STRONG>.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_1-1746429146623.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257495i5C5301181E8BC2E2/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_1-1746429146623.png" alt="Hashini_1-1746429146623.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_3-1746434065390.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257524i0393504AFBBC435E/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_3-1746434065390.png" alt="Hashini_3-1746434065390.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_2-1746433768602.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257521iC8106AAD1AD49529/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_2-1746433768602.png" alt="Hashini_2-1746433768602.png" /></span>&nbsp; &nbsp; &nbsp; &nbsp; 5.1.4.Fill in the details and click <STRONG>Finish</STRONG>.<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;The screen will appear as shown below.</P><P>&nbsp; &nbsp; &nbsp; &nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_4-1746434144573.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257525i093DF027A1CCFC82/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_4-1746434144573.png" alt="Hashini_4-1746434144573.png" /></span>&nbsp; &nbsp; &nbsp; &nbsp; 5.1.5.Click on the <STRONG>WSDL</STRONG> tab to retrieve the WSDL file and modify the wsdl file.<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_5-1746434261354.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257528i08218480B43EBEB5/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_5-1746434261354.png" alt="Hashini_5-1746434261354.png" /></span><BR />&nbsp; &nbsp;&nbsp;</P><P><STRONG>&nbsp; &nbsp; &nbsp;5.2. Modify the WSDL to an asynchronous structure.<BR />&nbsp; &nbsp; &nbsp;</STRONG><STRONG>5.2.1. Why to modify the wsdl structure?</STRONG><STRONG>&nbsp; &nbsp; &nbsp;&nbsp;</STRONG></P><P>The WSDL structure used in PI/PO follows a synchronous pattern, with both request and response. When uploading the same file while creating a web service, SAP expects a response from the middleware. To convert it to asynchronous, the WSDL structure must be modified.<BR /><BR />Before modification of WSDL : ( It has both input and output parameter )</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_6-1746434525224.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257533i4E7AC59A8E7B8AC7/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_6-1746434525224.png" alt="Hashini_6-1746434525224.png" /></span></P><P>After modification of WSDL : ( It has only input parameter )</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_7-1746434620939.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257536iE2EAD6C5B22830C6/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_7-1746434620939.png" alt="Hashini_7-1746434620939.png" /></span></P><P>&nbsp; &nbsp; &nbsp;5.2.2. <STRONG>How it can be modified?</STRONG>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; At the end of &lt;/wsdl:types&gt; tag, add the below template and update the required details:&nbsp;<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace&nbsp; ZTEST in the template with the actual RFC name. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<BR /><BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;wsdl:message name="ZTEST"&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;wsdl:part name=" ZTEST " element="tns: ZTEST "/&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/wsdl:message&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsdl:portType name=" ZTEST"&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsp:Policy&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsp:PolicyReference URI="#IF_IF_ ZTEST "/&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/wsp:Policy&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsdl:operation name=" ZTEST"&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsp:Policy&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsp:PolicyReference URI="#OP_IF_OP_ ZTEST"/&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/wsp:Policy&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wsdl:input message="tns: ZTEST"/&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/wsdl:operation&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/wsdl:portType&gt;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/wsdl:definitions&gt;<BR /><BR /></P><P><STRONG>5.3. Upload the WSDL and create the web service in SE80.</STRONG></P><P>&nbsp; &nbsp; &nbsp; 5.3.1.Navigate to sproxy tcode and click on create button.<STRONG><BR /><BR /></STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_8-1746440106759.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257568i1DFF3324020F888B/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_8-1746440106759.png" alt="Hashini_8-1746440106759.png" /></span>&nbsp; &nbsp; &nbsp;&nbsp;<BR />&nbsp; &nbsp; &nbsp; 5.3.2.Click on service consumer radio button and then continue.</P><P>&nbsp; &nbsp; &nbsp;&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_9-1746440159366.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257570iB046C320BCBA7330/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_9-1746440159366.png" alt="Hashini_9-1746440159366.png" /></span><BR />&nbsp; &nbsp; &nbsp; 5.3.3.Click on service External WSDL/Schema and then continue.</P><P>&nbsp; &nbsp; &nbsp; &nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_10-1746440204546.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257571i37808EEE26AFA571/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_10-1746440204546.png" alt="Hashini_10-1746440204546.png" /></span><BR />&nbsp; &nbsp; &nbsp; 5.3.4.Click on local file and then continue.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_11-1746440243240.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257573i5B08B741944E69E4/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_11-1746440243240.png" alt="Hashini_11-1746440243240.png" /></span>&nbsp; &nbsp; &nbsp;&nbsp;<BR />&nbsp; &nbsp; &nbsp; 5.3.5.Upload the wsdl file and click on continue.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_12-1746440285961.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257575i5F547837BE5610DA/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_12-1746440285961.png" alt="Hashini_12-1746440285961.png" /></span><BR />&nbsp; &nbsp; &nbsp; 5.3.6.Provide the package name and then the TR details and then continue .</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_13-1746440335494.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257576iF1AF9C50FE69CBC0/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_13-1746440335494.png" alt="Hashini_13-1746440335494.png" /></span><BR />&nbsp; &nbsp; &nbsp; 5.3.7.Click on complete and then save and activate the service.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_14-1746440379651.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257577iCA328256692193FC/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_14-1746440379651.png" alt="Hashini_14-1746440379651.png" /></span><BR />5.4.Use the "Where Used" function to identify the related report, function module, or class of the RFC.</P><P>5.5.Replace the RFC code with the corresponding SOAP web service code,ensuring all required parameters are passed as in the original RFC.</P><P><STRONG>RFC Code :</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_15-1746440486989.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257578i555CDD586993C77D/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_15-1746440486989.png" alt="Hashini_15-1746440486989.png" /></span></P><P><STRONG>SOAP Code:</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_16-1746440532648.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257579i5A39405B8F356868/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_16-1746440532648.png" alt="Hashini_16-1746440532648.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_17-1746440569650.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257581iD69CCA7BBD8FF9F7/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_17-1746440569650.png" alt="Hashini_17-1746440569650.png" /></span></P><P>5.6.Configure the web service in SOAMANAGER.</P><P>&nbsp; &nbsp; &nbsp; 5.6.1.Navigate to SOAMANAGER tcode and click on <STRONG>web service configuration.</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_18-1746440621733.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257583i8EC9398FABA20172/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_18-1746440621733.png" alt="Hashini_18-1746440621733.png" /></span></P><P>&nbsp; &nbsp; &nbsp; 5.6.2.Provide and select the web service name</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_19-1746440787129.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257590iD0D16126F6ECFA26/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_19-1746440787129.png" alt="Hashini_19-1746440787129.png" /></span></P><P>&nbsp; &nbsp; 5.6.3. Click on the create button manual configuration to create a logical port for the webservice.&nbsp;Provide the Port name and description.</P><P>&nbsp;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_20-1746440857861.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257591i7C43A09A50F4909D/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_20-1746440857861.png" alt="Hashini_20-1746440857861.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_21-1746440936281.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257593i8DB3A9A41CFAD1B5/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_21-1746440936281.png" alt="Hashini_21-1746440936281.png" /></span><BR />&nbsp; &nbsp; &nbsp; &nbsp; 5.6.4. In the consumer security tab, give the s-user ID and password and click next.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_22-1746440977144.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257594iC92E2E9662EAFD1C/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_22-1746440977144.png" alt="Hashini_22-1746440977144.png" /></span></P><P>&nbsp; &nbsp; &nbsp; &nbsp;5.6.5. Provide the correct endpoint in the URL tab and click next.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_23-1746441032712.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257595i761E4B889B87C256/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_23-1746441032712.png" alt="Hashini_23-1746441032712.png" /></span></P><P>&nbsp; &nbsp; &nbsp; 5.6.6. In the Messaging tab, select suppress id transfer in Message ID Protocol and SAP RM in&nbsp;RM&nbsp;Protocol tab and click next.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_24-1746441202281.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257596i5493356F49295930/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_24-1746441202281.png" alt="Hashini_24-1746441202281.png" /></span></P><P>&nbsp; &nbsp; &nbsp; 5.6.7. Click on finish to complete the setting.</P><P>&nbsp; &nbsp; &nbsp; 5.6.8: Click on ping test for the successful setup.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Hashini_25-1746446817247.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/257647iDA5E5450746CCCF3/image-size/medium?v=v2&amp;px=400" role="button" title="Hashini_25-1746446817247.png" alt="Hashini_25-1746446817247.png" /></span></P><P>&nbsp; &nbsp;&nbsp;</P> 2025-05-20T16:14:40.004000+02:00 https://community.sap.com/t5/technology-blog-posts-by-members/how-to-add-task-to-an-existing-transport-request-using-program/ba-p/14116716 How to add task to an existing transport request using program 2025-06-02T14:09:07.356000+02:00 Jayesh_Gharate1 https://community.sap.com/t5/user/viewprofilepage/user-id/1615208 <DIV><DIV><P><SPAN>PARAMETERS: </SPAN><SPAN>p_TR</SPAN><SPAN> TYPE </SPAN><SPAN>trkorr</SPAN><SPAN> OBLIGATORY. // Take TR as parameter</SPAN></P><P>&nbsp;</P><P><SPAN>DATA: </SPAN><SPAN>lt_authorlist</SPAN><SPAN> TYPE </SPAN><SPAN>trwbo_users</SPAN><SPAN>,</SPAN></P><P><SPAN>lt_return</SPAN><SPAN> TYPE </SPAN><SPAN>e070</SPAN><SPAN>-</SPAN><SPAN>trkorr</SPAN><SPAN>,</SPAN></P><P><SPAN>ls_return</SPAN><SPAN> TYPE </SPAN><SPAN>bapiret2</SPAN><SPAN>,</SPAN></P><P><SPAN>lv_new_task</SPAN><SPAN> TYPE </SPAN><SPAN>trkorr</SPAN><SPAN>. // Variable to take task </SPAN></P><P>&nbsp;</P><P><SPAN>START-OF-SELECTION.</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><P><SPAN>CALL FUNCTION </SPAN><SPAN>'TRINT_INSERT_NEW_COMM'</SPAN></P><P><SPAN>EXPORTING</SPAN></P><P><SPAN>wi_kurztext</SPAN><SPAN> = </SPAN><SPAN>'New Task' // Description if creating TR</SPAN></P><P><SPAN>wi_trfunction</SPAN><SPAN> = </SPAN><SPAN>'S' // 'S' to create task under TR </SPAN></P><P><SPAN>iv_username</SPAN><SPAN> = </SPAN><SPAN>sy</SPAN><SPAN>-</SPAN><SPAN>uname // System Username </SPAN></P><P><SPAN>wi_strkorr</SPAN><SPAN> = </SPAN><SPAN>p_TR // Export TR value to FM</SPAN></P><P><SPAN>IMPORTING</SPAN></P><P><SPAN>we_trkorr</SPAN><SPAN> = </SPAN><SPAN>lv_new_task // Import task to the variable</SPAN></P><P><SPAN>EXCEPTIONS</SPAN></P><P><SPAN>no_systemname</SPAN><SPAN> = </SPAN><SPAN>1</SPAN></P><P><SPAN>no_systemtype</SPAN><SPAN> = </SPAN><SPAN>2</SPAN></P><P><SPAN>no_authorization</SPAN><SPAN> = </SPAN><SPAN>3</SPAN></P><P><SPAN>db_access_error</SPAN><SPAN> = </SPAN><SPAN>4</SPAN></P><P><SPAN>file_access_error</SPAN><SPAN> = </SPAN><SPAN>5</SPAN></P><P><SPAN>enqueue_error</SPAN><SPAN> = </SPAN><SPAN>6</SPAN></P><P><SPAN>number_range_full</SPAN><SPAN> = </SPAN><SPAN>7</SPAN></P><P><SPAN>invalid_input</SPAN><SPAN> = </SPAN><SPAN>8</SPAN></P><P><SPAN>OTHERS = </SPAN><SPAN>9</SPAN><SPAN>.<BR /><BR /></SPAN></P><P><SPAN>IF </SPAN><SPAN>sy</SPAN><SPAN>-</SPAN><SPAN>subrc</SPAN><SPAN> = </SPAN><SPAN>0</SPAN><SPAN>.</SPAN></P><P><SPAN>WRITE: </SPAN><SPAN>/</SPAN> <SPAN>' New task created under TR:'</SPAN><SPAN>, </SPAN><SPAN>p_TR</SPAN><SPAN>,</SPAN></P><P><SPAN>/</SPAN> <SPAN>' Task number:'</SPAN><SPAN>, </SPAN><SPAN>lv_new_task</SPAN><SPAN>.</SPAN></P><P><SPAN>ELSE.</SPAN></P><P><SPAN>WRITE: </SPAN><SPAN>/</SPAN> <SPAN>'Failed to create task. '</SPAN><SPAN>.</SPAN></P><P><SPAN>ENDIF.<BR /><BR />*********************************************************************************<BR />Type of request/task<BR />Domain :&nbsp;TRFUNCTION<BR />K : Workbench Request<BR />W : Customizing Request<BR />S : Development/Correction<BR />Q : Customizing Task</SPAN></P></DIV></DIV> 2025-06-02T14:09:07.356000+02:00