https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/SAP-Exchange-Infrastructure-blog-posts.xml SAP Community - SAP Exchange Infrastructure 2024-05-20T20:00:58.834464+00:00 python-feedgen SAP Exchange Infrastructure blog posts in SAP Community https://community.sap.com/t5/technology-blogs-by-members/skeleton-of-mapping-runtime-in-sap-xi/ba-p/12848318 Skeleton of Mapping Runtime in SAP XI 2006-12-28T10:01:36+01:00 STALANKI https://community.sap.com/t5/user/viewprofilepage/user-id/13911 <DIV><BR /> <P align="left">Most of the forum questions are about the errors that occur while mapping source to the target! Did we bother to understand what is happening inside? If you did then you can skim this. Did we bother to understand why the RFC Destination AI_RUNTIME_JCOSERVER is very important? If we did not then please read this aloud.</P><BR /> <P align="left"><STRONG>CL_MAPPING_XMS_PLSRV3</STRONG> is the object that has to be focussed for understanding the complete flow. <STRONG>CALL_RUNTIME</STRONG> is the method which will be executed during the mapping run time. Now if you can go through the method you understand that depending on the mapping type the appropriate mapping methods <STRONG>CALL_JAVA_RUNTIME</STRONG>,<STRONG>MAP_BY_XSLT</STRONG>, <STRONG>MAP_BY_ABAP</STRONG> are called. If you dig dip into the method <STRONG>CALL_JAVA_RUNTIME</STRONG> then you can see that we use the RFC Destination <STRONG>AI_RUNTIME_JCOSERVER</STRONG> while calling Java Runtime FM <STRONG>SMPP_CALL_JAVA_RUNTIME3</STRONG>.</P><BR /> <P align="left">What next? Does it help in knowing this? How we will see which mapping program is getting executed appropraitely? You will understand by digging but let me be modest by sharing the tables <STRONG>SMPPMAP3</STRONG> and <STRONG>SMPPREL3</STRONG> and <STRONG>SMPPSPLIT</STRONG>.Please find the screenshot of mapping table <STRONG>SMPPMAP3</STRONG> which provides the mapping type , mapping program and interface mapping program and name space of each interface developed in SAP XI.<BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2006/12/map1_47457.gif" height="247" width="371" /><BR /> It is also worth looking at the ABAP objects <STRONG>CL_XMS_EPCACHE</STRONG> for getting exchane profile parameters at the ABAP runtime,CL*XMS* and CL*PLSRV*.</P><BR /> <BR /> </DIV> 2006-12-28T10:01:36+01:00 https://community.sap.com/t5/technology-blogs-by-members/calling-a-method-from-a-function-library-in-a-udf-in-message-mapping/ba-p/13414908 Calling a method from a function library in a UDF in message mapping. 2019-03-12T09:25:52+01:00 vinaymittal https://community.sap.com/t5/user/viewprofilepage/user-id/187725 Hello,<BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Introduction:</STRONG></SPAN><BR /> <BR /> During SAP PO development all of us at some point in time have come across an issue where we need to re-use methods/functions defined in a Function Library inside our local UDF's. It is fairly easy to use UDF's of a function library inside Graphical Mapping but when it comes to calling methods written in <STRONG>"Attributes and methods"</STRONG> section it becomes tricky.<BR /> <BR /> Here we will have a look at a solution to the problem!<BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Solution:</STRONG></SPAN><BR /> <BR /> I had a requirement where I wrote a Function library(with no UDF's) for writing Custom Audit Log Entries and I wanted to call the method defined in Attributes and method of the Function Library inside my message mapping.<BR /> <BR /> The aim here is to be able to call the function "putAuditLogEntry" inside a message mappings UDF.<BR /> <BR /> (why I am not writing these as a UDF&nbsp;in FL itself and using them in the MM...because I needed to use these methods inside my code multiple times depending on some variables....)<BR /> <BR /> Step 1) Have a closer look at your <STRONG>Function Library</STRONG>!<BR /> <BR /> <STRONG>Function Library.</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/FL-1.png" /><BR /> <BR /> Now if you look at the highlighted part the Class Name is <STRONG>"AuditLogEntry"</STRONG> and the package name is<STRONG>&nbsp;abc.functionlibrary</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> To be able to call this method first add this function library to the definition tab of message mapping.<BR /> <BR /> Message Mapping(Definition Tab)<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/MM.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Next import the class in the import area of <STRONG>Functions</STRONG> Tab.<BR /> <BR /> <STRONG>packageName.className</STRONG><BR /> <BR /> <STRONG>Functions tab</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/import.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Then create an object of the class inside the UDF or globally!<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/AttributesandMethods-1.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Now the final part.....calling the method<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/callingMethod.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Conclusion:&nbsp;</STRONG><BR /> <BR /> This is just a way to access Function Library methods inside a MessageMapping's UDF. It gives more flexibility when we are able to use global methods in local Message mapping UDF code instead of using them as UDF's in Graphical Mapping.<BR /> <BR /> Note: You can also call the UDF's defined in the FunctionLibrary&nbsp;in Similar Fashion.<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> Cheers<BR /> <BR /> Vinay Mittal<BR /> <BR /> &nbsp; 2019-03-12T09:25:52+01:00 https://community.sap.com/t5/technology-blogs-by-members/sap-po-asynchronous-sap-proxy-lookups-yes-it-is-possible/ba-p/13415424 SAP PO - Asynchronous SAP PROXY Lookups!! Yes It Is Possible! 2019-03-13T06:33:24+01:00 vinaymittal https://community.sap.com/t5/user/viewprofilepage/user-id/187725 <SPAN style="text-decoration: underline"><STRONG>Introduction:&nbsp;</STRONG></SPAN><BR /> <BR /> I came across a requirement where we had to post a message to a SOAP Proxy "Asynchronously" and at the same time send the request to either System A or System B depending on a value map.<BR /> <BR /> &nbsp;<BR /> <BR /> SENDER System X--------&gt;SAP PO---&gt;(Always to SAP PROXY Asynch) and System A or System B.<BR /> <BR /> Calls to System A and B are Synchronous and we will get exactly one response depending on which system is called.<BR /> <BR /> &nbsp;<BR /> <BR /> Now we managed to do this without BPM by following this fantastic blog.<BR /> <BR /> <A href="https://blogs.sap.com/2007/12/11/sap-netweaver-process-integration-enhanced-receiver-determination-for-synchronous-scenarios/" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/2007/12/11/sap-netweaver-process-integration-enhanced-receiver-determination-for-synchronous-scenarios/</A><BR /> <BR /> &nbsp;<BR /> <BR /> Now for the SOAP Proxy part there were two options we either do it via BPM or via a SOAP PROXY Lookup!!<BR /> <BR /> You can check how to perform a SOAP Proxy lookup via this wonderful blog.<BR /> <BR /> <A style="font-size: 1rem" href="https://blogs.sap.com/2014/04/04/mapping-lookup-to-abap-proxy/" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/2014/04/04/mapping-lookup-to-abap-proxy/</A><BR /> <BR /> &nbsp;<BR /> <BR /> The first thing that comes to mind is that the "SystemAccessor" by it's default nature works on Synchronous calls and no matter whatever method you may try(limited number of methods) we cannot change the Quality of Service!!.<BR /> <BR /> &nbsp;<BR /> <BR /> So when you try to call an Asynchronous Proxy via SOAP Proxy lookup you get an error in SXMB_MONI of ECC that the QOS is invalid!! As it is by default BE(Best Effort) but ECC expects it to be EO(Exactly Once).<BR /> <BR /> Result:<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/moni.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Solution:</STRONG></SPAN><BR /> <OL><BR /> <LI>while writing the SOAP Proxy lookup always use these two extra methods.SystemAccessor accessor = LookupService.getSystemAccessor(channel);accessor.setOperationName("InboundServiceInterfaceName");<BR /> <BR /> accessor.setOperationNamespace("namespace");</LI><BR /> <LI>Now as next step dont get the result of the accessor call into the Payload variablePayload SOAPOutPayload = null;//The response will be a Payload. Parse this to get the response field out.<BR /> <BR /> SOAPOutPayload = accessor.call(payload);// DON'T USE THIS</LI><BR /> <LI>Now Set the Quality of Service AS EO!!! How?<BR /> This can be achieved by Module Beans placed in the Receiver SOAP Proxy adapter.<BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/SOAP-Proxy-adapter.png" /></LI><BR /> <LI>Run the SOAP Proxy lookup in Test mode and check SXMB_MONI and you see a successful message now.<BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/moni-success.png" /></LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Conclusion:</STRONG></SPAN><BR /> <BR /> Asynchronous SAOP Proxy Lookups are possible in SAP PO but then these are not lookups but essentially Data is being posted to ECC.<BR /> <BR /> &nbsp;<BR /> <BR /> System Accessor does not support transactional behaviour and should not be used to update the same object as different threads can be trying to update the same Object in ECC (which was not the case in our scenario)<BR /> <BR /> &nbsp;<BR /> <BR /> Cheers<BR /> <BR /> Vinay 2019-03-13T06:33:24+01:00 https://community.sap.com/t5/technology-blogs-by-members/sap-to-sharepoint-integration-via-microsoft-graph-using-sap-po-rest-adapter/ba-p/13415511 SAP To SharePoint Integration Via Microsoft Graph using SAP PO REST Adapter (No UDF's for OAUTH) 2019-03-13T06:33:28+01:00 vinaymittal https://community.sap.com/t5/user/viewprofilepage/user-id/187725 <SPAN style="text-decoration: underline"><STRONG>Introduction:&nbsp;</STRONG></SPAN><BR /> <BR /> We will hereby explain how to connect to <STRONG>Microsoft Sharepoint</STRONG> Using <STRONG>Microsoft Graph.</STRONG><BR /> <BR /> This blog is entirely different from what you may have come across till now.<BR /> <BR /> &nbsp;<BR /> <BR /> Technology is changing at a very rapid rate and the way you can access certain Systems on the network and their Authentication Mechanism is changing too....<BR /> <BR /> I had a requirement to Integrate SharePoint with SAP PO and was clueless until i came across this blog from Dilip<BR /> <BR /> <A href="https://blogs.sap.com/2018/08/26/integrate-sharepoint-using-sap-pi/#" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/2018/08/26/integrate-sharepoint-using-sap-pi/#</A><BR /> <BR /> A really nice blog which explains how to perform basic operations on SharePoint.<BR /> <BR /> <STRONG>Problem: We rely on UDF's for getting the accessToken via OAUTH 2.0.</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> SharePoint works on OAUTH 2.0 authentication mechanism where you generate a client id and client secret. You then get the accessToken from the Sharepoint Auth url.<BR /> <BR /> <A href="https://accounts.accesscontrol.windows.net/{TenantID}/tokens/OAuth/2" target="test_blank" rel="nofollow noopener noreferrer">https://accounts.accesscontrol.windows.net/{TenantID}/tokens/OAuth/2</A><BR /> <BR /> &nbsp;<BR /> <BR /> The problem with this mechanism is that SAP PO REST Sender adapter does not support the OAUTH parameter "resource" which is mandatory for Sharepoint Authentication so we need to get AccessTokens Via UDF!!<BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Solution:</STRONG></SPAN><BR /> <BR /> We have two ways to connect to Sharepoint<BR /> <OL><BR /> <LI>Via SharePoint API's which require the steps to be followed mentioned in Dilip's blog.</LI><BR /> <LI><STRONG>Via Microsoft Graph which is the STANDARD and recommended way of connecting to SharePoint.</STRONG></LI><BR /> </OL><BR /> <STRONG>Advantages of using Microsoft Graph: </STRONG><BR /> <BR /> <STRONG>a) You can use SAP PO Receiver Rest adapter for Oauth without having to worry about any udf's for the access token and let SAP PO Take care of it.&nbsp;</STRONG><BR /> <BR /> b) Really vast variety of options to query to Sharepoint for instance. I had to read an excel file from Sharepoint and <STRONG>SharePoint's</STRONG> REST API's were returning that file to me as a binary file!!! No other way.<BR /> <BR /> I moved on to Microsoft Graph and i could now query the data in the excel sheet directly! No hassle of any Java Mappings or handling of large Binary files....you only get the rows coulmns you want!!!<BR /> <BR /> c) Works on ODATA and really user friendly to work on!<BR /> <BR /> d) provides you a <STRONG>product wide client id and client secret...</STRONG>it means that if you are using Sharepoint's API directly the client ID and client secret you generate is only valid for a particular "site" on sharepoint and won't work on any other site! But with the client id client secret generated for Microsoft Graph you can access the ENTIRE SHAREPOINT with the same Token!! That's something amazing!!<BR /> <BR /> &nbsp;<BR /> <BR /> I can keep going on but need to keep this blog short.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>How do we do it!!</STRONG><BR /> <BR /> <STRONG>Step 1)</STRONG> Generate client-id Client Secret.<BR /> <BR /> Follow the steps as is in this blog and you will have your client-id and client-secret<BR /> <BR /> <A href="https://tsmatz.wordpress.com/2016/10/07/application-permission-with-v2-endpoint-and-microsoft-graph/" target="_blank" rel="nofollow noopener noreferrer">https://tsmatz.wordpress.com/2016/10/07/application-permission-with-v2-endpoint-and-microsoft-graph/</A><BR /> <P class="title"><STRONG>Step 2) Once you have the admin consent open Postman and try to see if you are able to get the access token.</STRONG></P><BR /> &nbsp;<BR /> <BR /> do a POST to&nbsp;<A href="https://login.microsoftonline.com/{yourCompany}.onmicrosoft.com/oauth2/v2.0/token" target="_blank" rel="nofollow noopener noreferrer">https://login.microsoftonline.com/{yourCompany}.onmicrosoft.com/oauth2/v2.0/token</A><BR /> <BR /> for example if your sharepoint account is ABC.sharepoint.com then just replace yourCompany in the url by ABC<BR /> <BR /> &nbsp;<BR /> <BR /> Content-Type: application/x-www-form-urlencoded<BR /> <BR /> grant_type:client_credentials<BR /> client_id:YYYYYYYYYYY<BR /> client_secret:XXXXXXXX<BR /> scope:<A href="https://graph.microsoft.com/.default" target="_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/.default</A><BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/MicrosoftGraph-Token.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 3)</STRONG> Import the Microsoft login and Microsoft Graph Certificates into your system<BR /> <BR /> Microsoft Graph URL<BR /> <BR /> <A href="https://graph.microsoft.com" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com</A><BR /> <BR /> Also there is a Microsoft Graph developer portal where you can login via your Company's credentials and test your ODATA queries live!!<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/Microsoft-Graph-Developer-Portal.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Now all you need to do is configure the REST Receiver Channel!!!<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/RestReceiverTab1.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> URL Tab<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/RestReceiverTab2.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Here I am Querying a list for it's Items. My Microsoft Graph URL Is<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{YourCompany}.sharepoint.com,{site-id}/lists/{list-id}/items?filter=(" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{YourCompany}.sharepoint.com,{site-id}/lists/{list-id}/items?filter=(</A> (fields/JobNumber ne '1234') )&amp;expand=fields(select=Jobnumber,id)<BR /> <BR /> &nbsp;<BR /> <BR /> and the result i get from a end to end postman test via SAP PO is<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/Postman-Test-Result-end-to-end.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Request Mapping doesn't matter in this case Response mapping is<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/MM-1.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 5) </STRONG>Understanding the ODATA query and how it was made is equally important and you won't find much detail as to how to get these Site-id and list-id etc which can be really frustrating. Here is what i discovered via trial and error!<BR /> <BR /> The query&nbsp;<STRONG><A href="https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?filter=(" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?filter=(</A> (fields/JobNumber ne '1234') )&amp;expand=fields(select=Jobnumber,id)</STRONG><BR /> <BR /> &nbsp;<BR /> <BR /> has two main parts <STRONG>"site-id" </STRONG>and<STRONG> "list-id"</STRONG><BR /> <BR /> a) to get Site-id go to Microsoft Graph Developer portal<BR /> <BR /> <A href="https://developer.microsoft.com/en-us/graph/graph-explorer#" target="test_blank" rel="nofollow noopener noreferrer">https://developer.microsoft.com/en-us/graph/graph-explorer#</A><BR /> <BR /> &nbsp;<BR /> <BR /> Now SharePoint works on the concept of sites or lets say sub portals under the Share Point or pages in SharePoint where you can store files, images, or create <STRONG>"lists"</STRONG>&nbsp;now enter the query<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{YourCompanyName}.sharepoint.com:/sites/{YourSharepointSite}/" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{YourCompanyName}.sharepoint.com:/sites/{YourSharepointSite}/</A><BR /> <BR /> you will get something like<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/site-id.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> This becomes your site-id<BR /> <BR /> &nbsp;<BR /> <BR /> b) Now we need to get the list we are working on, and a sharepoint site can have multiple lists.<BR /> <BR /> again run the query<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{site-id}/lists/" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{site-id}/lists/</A><BR /> <BR /> this will give you the list of list id's and you can pick up the list id and ready to go!!<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/list-id.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Conclusion:&nbsp;</STRONG></SPAN> We learned how to query Sharepoint via Microsoft Graph(which in turn converts the ODATA query to Share Point's REST API's and you need not worry about the hundreds of API's and functions).<BR /> <BR /> Microsoft Graph and Sharepoint currently support ODATA 2.0 which has a wide array of functionalities.<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> Sample Microsoft Graph url's for you which i built during some of my developments.<BR /> <BR /> For Reading an Excel sheets row's and column's<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{site-id}/drive/items/{excelSheetFileID}/workbook/worksheets/Sheet1/UsedRange?$select=values" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{site-id}/drive/items/{excelSheetFileID}/workbook/worksheets/Sheet1/UsedRange?$select=values</A><BR /> <BR /> &nbsp;<BR /> <BR /> How to get Drives??<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{site-id}/drives/" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{site-id}/drives/</A><BR /> <BR /> &nbsp;<BR /> <BR /> How to get Excel sheet ID??<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children</A><BR /> <BR /> &nbsp;<BR /> <BR /> Reading binary file from Sharepoint via Microsoft Graph(this covers Image, Text File , excel sheet, virtually everything!!!!) and you get back a Binary version of the file.<BR /> <BR /> <A href="https://graph.microsoft.com/v1.0/sites/{site-id}/drive/root:/{FullFilename}:/content" target="test_blank" rel="nofollow noopener noreferrer">https://graph.microsoft.com/v1.0/sites/{site-id}/drive/root:/{FullFilename}:/content</A><BR /> <BR /> &nbsp;<BR /> <BR /> Regards<BR /> <BR /> Vinay<BR /> <BR /> &nbsp; 2019-03-13T06:33:28+01:00 https://community.sap.com/t5/technology-blogs-by-members/secure-and-fail-over-configuration-for-jdbc-adapter-sap-po/ba-p/13420283 Secure and Fail over Configuration for JDBC Adapter SAP PO 2019-03-18T14:45:58+01:00 dhivakar https://community.sap.com/t5/user/viewprofilepage/user-id/332621 In this blog I would like to share the available JDBC option to encrypt the message transfer and failover configuration to have uninterrupted connection during the maintenance of one DB server.<BR /> <OL><BR /> <LI><STRONG><U>Encryption Option in JDBC:</U></STRONG></LI><BR /> </OL><BR /> Data Security is the inevitable requirement in this growing technical world. As a mostly used middleware for transferring data between different systems and companies, SAP Process Orchestration should majorly investigate the available security option for its standard adapters to ensure all the&nbsp;customer data is safe and secured while transferring.<BR /> <BR /> The encryption of the data sent to the Oracle database is taken care by the JDBC driver and not by the PI as every database provides their own data encryption feature. So, the driver parameter should be provided by the Admin of the database which is involved in the integration.<BR /> <BR /> In any network connection, it is possible for both the client and server to support more than one encryption algorithm and more than one integrity algorithm.<BR /> <BR /> To negotiate whether to turn on encryption or integrity, you can specify four possible values for the Oracle Advanced Security encryption and integrity configuration parameters. The four values are listed in the order of increasing security.<BR /> <UL><BR /> <LI>REJECTED</LI><BR /> <LI>ACCEPTED</LI><BR /> <LI>REQUESTED</LI><BR /> <LI>REQUIRED</LI><BR /> </UL><BR /> REJECTED:<BR /> <BR /> If the DB side is set to REQUESTED, ACCEPTED, or REJECTED, the connection continues without error even if you use this in JDBC Channel and without the security service enabled.<BR /> <BR /> This parameter need not to be enabled explicitly, if you do not wish to have an encrypted communication with the DB.<BR /> <BR /> ACCEPTED:<BR /> <BR /> This Parameter value will enable the encryption if it is set as requested / required on the DB side and the Algorithm which we are using should match the available algorithm on the DB side.<BR /> <BR /> These kinds of parameters are mostly used on the DB side, Since the server might have connection to multiple clients some of which may not enable encryption option at their configuration.<BR /> <BR /> In this way the connection will be secured if client wish to have and communication will happen without any errors even without encryption.<BR /> <BR /> REQUESTED:<BR /> <BR /> This parameter can be used if the server side permits to have encrypted connection. As usual it works if the algorithm sent and maintained are matching between the systems.<BR /> <BR /> REQUIRED:<BR /> <BR /> This is the needed parameter in case you want to allow only encrypted communication between the SAP PI/PO and Database server. This is the recommended one on client side to not to compromise security.<BR /> <BR /> In this scenario, JDBC Channel with REQUIRED specifies that the security service&nbsp;must be enabled. The connection&nbsp;fails&nbsp;if the other side specifies REJECTED or if there is no compatible algorithm on the other side.<BR /> <BR /> By Default, DB doesn’t enable encryption parameters and can be set based on the request during the connection. Below is the Encryption and Data negotiation chart which clarifies this.<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE width="365"><BR /> <TBODY><BR /> <TR><BR /> <TD width="94"><STRONG>SAP PI/PO</STRONG></TD><BR /> <TD width="123"><STRONG>Database Server</STRONG></TD><BR /> <TD width="148"><STRONG>Encryption and Data Negotiation</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REJECTED</TD><BR /> <TD width="123">REJECTED</TD><BR /> <TD width="148">OFF</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">ACCEPTED</TD><BR /> <TD width="123">REJECTED</TD><BR /> <TD width="148">OFF</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REQUESTED</TD><BR /> <TD width="123">REJECTED</TD><BR /> <TD width="148">OFF</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REQUIRED</TD><BR /> <TD width="123">REJECTED</TD><BR /> <TD width="148">Connection fails</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REJECTED</TD><BR /> <TD width="123">ACCEPTED</TD><BR /> <TD width="148">OFF</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">ACCEPTED</TD><BR /> <TD width="123">ACCEPTED</TD><BR /> <TD width="148">OFF</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REQUESTED</TD><BR /> <TD width="123">ACCEPTED</TD><BR /> <TD width="148">ON</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94"><STRONG>REQUIRED</STRONG></TD><BR /> <TD width="123"><STRONG>ACCEPTED</STRONG></TD><BR /> <TD width="148"><STRONG>ON</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REJECTED</TD><BR /> <TD width="123">REQUESTED</TD><BR /> <TD width="148">OFF</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">ACCEPTED</TD><BR /> <TD width="123">REQUESTED</TD><BR /> <TD width="148">ON</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REQUESTED</TD><BR /> <TD width="123">REQUESTED</TD><BR /> <TD width="148">ON</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94"><STRONG>REQUIRED</STRONG></TD><BR /> <TD width="123"><STRONG>REQUESTED</STRONG></TD><BR /> <TD width="148"><STRONG>ON</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REJECTED</TD><BR /> <TD width="123">REQUIRED</TD><BR /> <TD width="148">Connection fails</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">ACCEPTED</TD><BR /> <TD width="123">REQUIRED</TD><BR /> <TD width="148">ON</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94">REQUESTED</TD><BR /> <TD width="123">REQUIRED</TD><BR /> <TD width="148">ON</TD><BR /> </TR><BR /> <TR><BR /> <TD width="94"><STRONG>REQUIRED</STRONG></TD><BR /> <TD width="123"><STRONG>REQUIRED</STRONG></TD><BR /> <TD width="148"><STRONG>ON</STRONG></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> &nbsp;<BR /> <BR /> The below is the sample which DB team could share with us and it should be prefixed with “<STRONG>driver:</STRONG>” when we use it in JDBC Channel.<BR /> <BR /> SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (SHA1)<BR /> <BR /> SQLNET.ENCRYPTION_TYPES_SERVER = (AES256)<BR /> <BR /> SQLNET.CRYPTO_CHECKSUM_SERVER = ACCEPTED<BR /> <BR /> SQLNET.ENCRYPTION_SERVER = ACCEPTED<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/03/JDBC-Encryption.jpg" /><BR /> <BR /> To conclude the encryption part, REQUIRED is the recommended parameter value on our JDBC Channel considering the DB doesn’t reject encrypted communication.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG><U>2.Failover String in JDBC:</U></STRONG><BR /> <BR /> Sometimes SAP PO interfaces using JDBC adapter may transfer business critical data which cannot be delayed for any reasons.<BR /> <BR /> To support high availability of business, the company may have two Databases in parallel (2 separate Hosts, which can be addressed via separate IP or hostnames, one is active, one is passive). In such cases the SAP PI/PO should have the ability to automatically switch from one to the other without manual interaction when there is a downtime with the active database.<BR /> <BR /> To ensure this fail-over connection, below mentioned JDBC connection string can be used for Oracle DB connection from SAP PI/PO.<BR /> <BR /> <EM>jdbc:oracle:thin:@(DESCRIPTION =(CONNECT_TIMEOUT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(ADDRESS_LIST =(FAILOVER = ON)(LOAD_BALANCE = ON)(ADDRESS =(PROTOCOL = TCP)(HOST = <STRONG>&lt;Active database&gt;</STRONG>)(PORT = <STRONG>&lt;port&gt;</STRONG>))(ADDRESS = (PROTOCOL = TCP)(HOST = <STRONG>&lt;Passive database&gt;</STRONG>)(PORT = <STRONG>&lt;port&gt;</STRONG>)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME =<STRONG>&lt;Service name&gt;</STRONG>)))</EM><BR /> <BR /> <STRONG>Active database</STRONG>: FQDN of the primary server to be connected from the PI system.<BR /> <BR /> <STRONG>Passive database</STRONG>: FQDN of the secondary server to be connected from the PI system.<BR /> <BR /> <STRONG>Port</STRONG>: Listening port of the DB server.<BR /> <BR /> <STRONG>Service name</STRONG>: Dedicated service schema used for this connection.<BR /> <BR /> Reference: <A href="https://docs.oracle.com" target="test_blank" rel="nofollow noopener noreferrer">https://docs.oracle.com</A> 2019-03-18T14:45:58+01:00 https://community.sap.com/t5/technology-blogs-by-members/how-to-create-custom-adapter-module-in-sap-pi-po-for-ejb-3-0-version/ba-p/13397974 How to create Custom Adapter Module in SAP PI/PO for EJB 3.0 Version 2019-05-03T16:24:47+02:00 bijayashreebanoj_brahma https://community.sap.com/t5/user/viewprofilepage/user-id/418399 <STRONG>Introduction:</STRONG><BR /> <BR /> In this blog, we will see step-by-step&nbsp;&nbsp;process to create SAP PI/PO Custom Adapter module, EJB version 3.0.&nbsp; As, I don't find any blog, where each steps are clearly mentioned, with detail configuration. Hope this will help SAP PI/PO Developers.<BR /> <BR /> <STRONG><SPAN style="font-family: 'Trebuchet MS','sans-serif';font-size: 10pt;text-decoration: underline">Custom Adapter Module Creation Process:-</SPAN></STRONG><BR /> <BR /> Module Name--&gt; <U></U>ReadExcelFile<BR /> <BR /> <SPAN style="font-family: Trebuchet MS;font-size: small">In NWDS: Go to File –-&gt; New –-&gt; EJB Project</SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_1.png" /><BR /> <BR /> EJB Project--&gt; ExcelToXML_EJB<BR /> <BR /> EAR Project--&gt; ExcelToXML_EAR<BR /> <BR /> EJB module version --&gt; 3.0<BR /> <BR /> Click Next and Next.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_2.png" /><BR /> <BR /> EJB Client JAR --&gt; Uncheck<BR /> <BR /> Generate ejb-jar.xml deployment descriptor --&gt; Check<BR /> <BR /> Click on Finish.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_3.png" /><BR /> <BR /> Two Projects are Created as below.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_4.png" /><BR /> <BR /> Right Click on EJB Project --&gt; New --&gt; Session Bean (EJB 3.x)<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_5.png" /><BR /> <BR /> Choose EJB project created before and provide Java package &amp; Class Name.<BR /> <BR /> State Type --&gt; Stateless<BR /> <BR /> Check Remote and Local and Finish.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_6.png" /><BR /> <BR /> <SPAN lang="EN-US"><SPAN style="color: #000000;font-family: Calibri;font-size: medium">Below Objects are created.</SPAN></SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_7.png" /><BR /> <BR /> Add External JAR files and Libraries to EJB project.<BR /> <BR /> Right Click on EJB project --&gt; Preference --&gt; JAVA Build Path --&gt; Add Libraries<BR /> <BR /> Select XPI Library --&gt; Click Next<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_12.png" /><BR /> <BR /> Select XPI Adapter Libraries from drop down --&gt; Finish<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_13.png" /><BR /> <BR /> Add "com.sap.aii.af.svc_api.jar" file as External Jars for <U></U>auditlog<BR /> <BR /> Add "jxl-2.6.jar" for reading Excel File (.xls).<BR /> <BR /> Click on Apply --&gt; Ok<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_14.png" /><BR /> <BR /> Expand META-INF folder of EJB --&gt; Click on ejb-j2ee-engine.xml --&gt; Change the details as below.<BR /> <BR /> Provide EJB and JNDI name.<BR /> <BR /> JNDI name will be the Adapter Module Name in SAP PI/PO Communication Channel.<BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;?</SPAN><SPAN style="color: #3f7f7f;font-size: small">xml</SPAN> <SPAN style="color: #7f007f;font-size: small">version</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"1.0"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">encoding</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"UTF-8"</SPAN></I><SPAN style="color: #008080;font-size: small">?&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-j2ee-engine</SPAN> <SPAN style="color: #7f007f;font-size: small">xmlns:xsi</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"<A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="nofollow noopener noreferrer">http://www.w3.org/2001/XMLSchema-instance</A>"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">xsi:noNamespaceSchemaLocation</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"ejb-j2ee-engine_3_0.xsd"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">enterprise-beans</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">enterprise-bean</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">ReadExcelFile</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">jndi-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">ReadExcelFile</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">jndi-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">enterprise-bean</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">enterprise-beans</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-j2ee-engine</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><BR /> <BR /> Expand META-INF folder of EJB Project --&gt; Click on ejb-jar.xml --&gt; Change the details as below<BR /> <BR /> &lt;ejb-class&gt; --&gt; This need to be your java package name and your Class name<BR /> <BR /> &lt;display-name&gt; --&gt; Your display name<BR /> <BR /> &lt;ejb-name&gt; --&gt; Your ejb name<BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;?</SPAN><SPAN style="color: #3f7f7f;font-size: small">xml</SPAN> <SPAN style="color: #7f007f;font-size: small">version</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"1.0"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">encoding</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"UTF-8"</SPAN></I><SPAN style="color: #008080;font-size: small">?&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-jar</SPAN> <SPAN style="color: #7f007f;font-size: small">xmlns:xsi</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"<A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="nofollow noopener noreferrer">http://www.w3.org/2001/XMLSchema-instance</A>"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">xmlns</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"<A href="http://java.sun.com/xml/ns/javaee" target="_blank" rel="nofollow noopener noreferrer">http://java.sun.com/xml/ns/javaee</A>"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">xmlns:ejb</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"<A href="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" target="_blank" rel="nofollow noopener noreferrer">http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd</A>"</SPAN></I></P><BR /> <P align="LEFT"><SPAN style="color: #7f007f;font-size: small">xsi:schemaLocation</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"<A href="http://java.sun.com/xml/ns/javaee" target="_blank" rel="nofollow noopener noreferrer">http://java.sun.com/xml/ns/javaee</A> <A href="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" target="_blank" rel="nofollow noopener noreferrer">http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd</A>"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">version</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"3.0"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">display-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">ExcelToXML_EJB</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">display-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">enterprise-beans</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">session</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">icon</SPAN><SPAN style="color: #008080;font-size: small">/&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">ReadExcelFile</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-name</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">home</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.lib.mp.module.ModuleHome</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">home</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">remote</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.lib.mp.module.ModuleRemote</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">remote</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">local-home</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.lib.mp.module.ModuleLocalHome</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">local-home</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">local</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.lib.mp.module.ModuleLocal</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">local</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-class</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.java.modules.ReadExcelFile</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-class</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">session-type</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">Stateless</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">session-type</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">transaction-type</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">Container</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">transaction-type</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">session</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">enterprise-beans</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">ejb-jar</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><BR /> <BR /> Expand META-INF folder of EAR Project --&gt; Click on application-j2ee-engine.xml --&gt; Change the details as below.<BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;?</SPAN><SPAN style="color: #3f7f7f;font-size: small">xml</SPAN> <SPAN style="color: #7f007f;font-size: small">version</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"1.0"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">encoding</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"UTF-8"</SPAN></I><SPAN style="color: #008080;font-size: small">?&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">application-j2ee-engine</SPAN> <SPAN style="color: #7f007f;font-size: small">xmlns:xsi</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"<A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="nofollow noopener noreferrer">http://www.w3.org/2001/XMLSchema-instance</A>"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">xsi:noNamespaceSchemaLocation</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"application-j2ee-engine.xsd"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN> <SPAN style="color: #7f007f;font-size: small">reference-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"hard"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN> <SPAN style="color: #7f007f;font-size: small">target-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"service"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">provider-name</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"sap.com"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">engine.security.facade</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN> <SPAN style="color: #7f007f;font-size: small">reference-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"hard"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN> <SPAN style="color: #7f007f;font-size: small">target-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"library"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">provider-name</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"sap.com"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">engine.j2ee14.facade</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN> <SPAN style="color: #7f007f;font-size: small">reference-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"hard"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN> <SPAN style="color: #7f007f;font-size: small">target-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"service"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">provider-name</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"sap.com"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.svc.facade</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN> <SPAN style="color: #7f007f;font-size: small">reference-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"hard"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN> <SPAN style="color: #7f007f;font-size: small">target-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"interface"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">provider-name</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"sap.com"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.ifc.facade</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN> <SPAN style="color: #7f007f;font-size: small">reference-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"hard"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN> <SPAN style="color: #7f007f;font-size: small">target-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"library"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">provider-name</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"sap.com"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.aii.af.lib.facade</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN> <SPAN style="color: #7f007f;font-size: small">reference-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"hard"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN> <SPAN style="color: #7f007f;font-size: small">target-type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"library"</SPAN></I> <SPAN style="color: #7f007f;font-size: small">provider-name</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"sap.com"</SPAN></I><SPAN style="color: #008080;font-size: small">&gt;</SPAN><SPAN style="font-size: small">com.sap.base.technology.facade</SPAN><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference-target</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">reference</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #008080;font-size: small">&lt;</SPAN><SPAN style="color: #3f7f7f;font-size: small">fail-over-enable</SPAN> <SPAN style="color: #7f007f;font-size: small">xsi:type</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"fail-over-enableType_disable"</SPAN></I></P><BR /> &nbsp;<BR /> <P align="LEFT"><SPAN style="color: #7f007f;font-size: small">mode</SPAN><SPAN style="font-size: small">=</SPAN><I><SPAN style="color: #2a00ff;font-size: small">"disable"</SPAN></I> <SPAN style="color: #008080;font-size: small">&gt;&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">fail-over-enable</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN></P><BR /> <SPAN style="color: #008080;font-size: small">&lt;/</SPAN><SPAN style="color: #3f7f7f;font-size: small">application-j2ee-engine</SPAN><SPAN style="color: #008080;font-size: small">&gt;</SPAN><BR /> <BR /> <STRONG><SPAN lang="EN-US"><SPAN style="color: #000000;font-family: Calibri;font-size: medium">Deploy the EAR File:-</SPAN></SPAN></STRONG><BR /> <BR /> Open Window --&gt; Preferences --&gt; SAP AS java --&gt; Add<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_11.png" /><BR /> <BR /> Right Click on EAR Project --&gt; Run As --&gt; Run on Server<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_15.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Select Your Server --&gt; Click Next<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_17.png" /><BR /> <BR /> Select EJB project --&gt; Finish<BR /> <BR /> Then the project will be deployed in your server and you can see in EJB Explorer (SAP PI/PO ).<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_18.png" /><BR /> <BR /> Use Created Adapter Module In Sender Communication Channel.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_20.png" /><BR /> <BR /> <STRONG>Deployment to Higher Environments:-</STRONG><BR /> <BR /> Right Click EAR Project --&gt; Export --&gt; SAP EAR File<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_22.png" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_23.png" /><BR /> <BR /> <STRONG>Sample Adapter Module code:-</STRONG><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>package</B></SPAN><SPAN style="font-size: small"> com.sap.java.modules;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> javax.ejb.Stateless;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.aii.af.lib.mp.module.Module;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.aii.af.lib.mp.module.ModuleContext;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.aii.af.lib.mp.module.ModuleData;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.aii.af.lib.mp.module.ModuleException;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.engine.interfaces.messaging.api.XMLPayload;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.aii.af.service.auditlog.Audit;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.engine.interfaces.messaging.api.Message;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.engine.interfaces.messaging.api.MessageKey;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> com.sap.engine.interfaces.messaging.api.auditlog.AuditLogStatus;</SPAN></P><BR /> <P align="LEFT"><B></B><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> java.io.ByteArrayInputStream;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> jxl.Cell;</SPAN><B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>import</B></SPAN><SPAN style="font-size: small"> jxl.Workbook;</SPAN></P><BR /> <P align="LEFT">/**</P><BR /> <P align="LEFT">* Session Bean implementation class ReadExcelFile</P><BR /> <P align="LEFT">*/</P><BR /> <P align="LEFT">@Stateless<B></B></P><BR /> <P align="LEFT"><SPAN style="color: #7f0055;font-size: small"><B>public</B></SPAN> <B><SPAN style="color: #7f0055;font-size: small">class</SPAN></B><SPAN style="font-size: small"> ReadExcelFile </SPAN><B><SPAN style="color: #7f0055;font-size: small">implements</SPAN></B><SPAN style="font-size: small"> Module {</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> MessageKey </SPAN><SPAN style="color: #0000c0;font-size: small">amk</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">null</SPAN></B><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #646464;font-size: small">@Override</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">public</SPAN></B><SPAN style="font-size: small"> ModuleData process(ModuleContext </SPAN><SPAN style="color: #6a3e3e;font-size: small">mc</SPAN><SPAN style="font-size: small">, ModuleData </SPAN><SPAN style="color: #6a3e3e;font-size: small">imd</SPAN><SPAN style="font-size: small">) </SPAN><B><SPAN style="color: #7f0055;font-size: small">throws</SPAN></B><SPAN style="font-size: small"> ModuleException {</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> String </SPAN><SPAN style="color: #6a3e3e;font-size: small">msgType</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">null</SPAN></B><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> String </SPAN><SPAN style="color: #6a3e3e;font-size: small">nameSpace</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">null</SPAN></B><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Object </SPAN><SPAN style="color: #6a3e3e;font-size: small">obj</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">null</SPAN></B><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Message </SPAN><SPAN style="color: #6a3e3e;font-size: small">msg</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">null</SPAN></B><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">try</SPAN></B><SPAN style="font-size: small"> {</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">obj</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">imd</SPAN><SPAN style="font-size: small">.getPrincipalData();</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">msg</SPAN><SPAN style="font-size: small"> = (Message) </SPAN><SPAN style="color: #6a3e3e;font-size: small">obj</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #0000c0;font-size: small">amk</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">new</SPAN></B><SPAN style="font-size: small"> MessageKey(</SPAN><SPAN style="color: #6a3e3e;font-size: small">msg</SPAN><SPAN style="font-size: small">.getMessageId(), </SPAN><SPAN style="color: #6a3e3e;font-size: small">msg</SPAN><SPAN style="font-size: small">.getMessageDirection()); </SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> XMLPayload </SPAN><SPAN style="color: #6a3e3e;font-size: small">xp</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">msg</SPAN><SPAN style="font-size: small">.getDocument(); </SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">if</SPAN></B><SPAN style="font-size: small"> (</SPAN><SPAN style="color: #6a3e3e;font-size: small">xp</SPAN><SPAN style="font-size: small"> != </SPAN><B><SPAN style="color: #7f0055;font-size: small">null</SPAN></B><SPAN style="font-size: small">) {</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Audit.<I>addAuditLogEntry</I>(</SPAN><SPAN style="color: #0000c0;font-size: small">amk</SPAN><SPAN style="font-size: small">, AuditLogStatus.</SPAN><B><I><SPAN style="color: #0000c0;font-size: small">SUCCESS</SPAN></I></B><SPAN style="font-size: small">,</SPAN><SPAN style="color: #2a00ff;font-size: small">"AO: Now calling Convert Method to convert Excel(.xls) to XML"</SPAN><SPAN style="font-size: small">); </SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">byte</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">by</SPAN><SPAN style="font-size: small">[] = convert(</SPAN><SPAN style="color: #6a3e3e;font-size: small">xp</SPAN><SPAN style="font-size: small">.getContent()</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Audit.<I>addAuditLogEntry</I>(</SPAN><SPAN style="color: #0000c0;font-size: small">amk</SPAN><SPAN style="font-size: small">, AuditLogStatus.</SPAN><B><I><SPAN style="color: #0000c0;font-size: small">SUCCESS</SPAN></I></B><SPAN style="font-size: small">,</SPAN><SPAN style="color: #2a00ff;font-size: small">"AO: Conversion Done Successfully."</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">xp</SPAN><SPAN style="font-size: small">.setContent(</SPAN><SPAN style="color: #6a3e3e;font-size: small">by</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">imd</SPAN><SPAN style="font-size: small">.setPrincipalData(</SPAN><SPAN style="color: #6a3e3e;font-size: small">msg</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Audit.<I>addAuditLogEntry</I>(</SPAN><SPAN style="color: #0000c0;font-size: small">amk</SPAN><SPAN style="font-size: small">, AuditLogStatus.</SPAN><B><I><SPAN style="color: #0000c0;font-size: small">SUCCESS</SPAN></I></B><SPAN style="font-size: small">,</SPAN><SPAN style="color: #2a00ff;font-size: small">"AO: Principle data set successfully."</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> } </SPAN><B><SPAN style="color: #7f0055;font-size: small">catch</SPAN></B><SPAN style="font-size: small"> (Exception </SPAN><SPAN style="color: #6a3e3e;font-size: small">e</SPAN><SPAN style="font-size: small">){ </SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> ModuleException </SPAN><SPAN style="color: #6a3e3e;font-size: small">me</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">new</SPAN></B><SPAN style="font-size: small"> ModuleException(</SPAN><SPAN style="color: #6a3e3e;font-size: small">e</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">throw</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">me</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">return</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">imd</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">public</SPAN></B> <B><SPAN style="color: #7f0055;font-size: small">byte</SPAN></B><SPAN style="font-size: small">[] convert(</SPAN><B><SPAN style="color: #7f0055;font-size: small">byte</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">src</SPAN><SPAN style="font-size: small">[]</SPAN><SPAN style="font-size: small">) </SPAN><B><SPAN style="color: #7f0055;font-size: small">throws</SPAN></B><SPAN style="font-size: small"> Exception {</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> String </SPAN><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #2a00ff;font-size: small">""</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">try</SPAN></B><SPAN style="font-size: small"> {</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> ByteArrayInputStream </SPAN><SPAN style="color: #6a3e3e;font-size: small">byteArr</SPAN><SPAN style="font-size: small">= </SPAN><B><SPAN style="color: #7f0055;font-size: small">new</SPAN></B><SPAN style="font-size: small"> ByteArrayInputStream(</SPAN><SPAN style="color: #6a3e3e;font-size: small">src</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Workbook </SPAN><SPAN style="color: #6a3e3e;font-size: small">wb</SPAN><SPAN style="font-size: small"> = Workbook.<I>getWorkbook</I>(</SPAN><SPAN style="color: #6a3e3e;font-size: small">byteArr</SPAN><SPAN style="font-size: small">); </SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> =</SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n\n"</SPAN><SPAN style="font-size: small">+ </SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;Details&gt;"</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Cell[] </SPAN><SPAN style="color: #6a3e3e;font-size: small">cells</SPAN><SPAN style="font-size: small"> ;</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> Cell[] </SPAN><SPAN style="color: #6a3e3e;font-size: small">cellNames</SPAN><SPAN style="font-size: small"> ;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">cellNames</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">wb</SPAN><SPAN style="font-size: small">.getSheet(0).getRow(0);</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">for</SPAN></B><SPAN style="font-size: small">(</SPAN><B><SPAN style="color: #7f0055;font-size: small">int</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">j</SPAN><SPAN style="font-size: small">=1;</SPAN><SPAN style="color: #6a3e3e;font-size: small">j</SPAN><SPAN style="font-size: small">&lt;</SPAN><SPAN style="color: #6a3e3e;font-size: small">wb</SPAN><SPAN style="font-size: small">.getSheet(0).getRows();</SPAN><SPAN style="color: #6a3e3e;font-size: small">j</SPAN><SPAN style="font-size: small">++) {</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small">+</SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;Record&gt;"</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">cells</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">wb</SPAN><SPAN style="font-size: small">.getSheet(0).getRow(</SPAN><SPAN style="color: #6a3e3e;font-size: small">j</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">for</SPAN></B><SPAN style="font-size: small">(</SPAN><B><SPAN style="color: #7f0055;font-size: small">int</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">i</SPAN><SPAN style="font-size: small">=0;</SPAN><SPAN style="color: #6a3e3e;font-size: small">i</SPAN><SPAN style="font-size: small">&lt;</SPAN><SPAN style="color: #6a3e3e;font-size: small">wb</SPAN><SPAN style="font-size: small">.getSheet(0).getColumns();</SPAN><SPAN style="color: #6a3e3e;font-size: small">i</SPAN><SPAN style="font-size: small">++){</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small">+</SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;"</SPAN><SPAN style="font-size: small">+</SPAN><SPAN style="color: #6a3e3e;font-size: small">cellNames</SPAN><SPAN style="font-size: small">[</SPAN><SPAN style="color: #6a3e3e;font-size: small">i</SPAN><SPAN style="font-size: small">].getContents()+</SPAN><SPAN style="color: #2a00ff;font-size: small">"&gt;"</SPAN><SPAN style="font-size: small">+</SPAN><SPAN style="color: #6a3e3e;font-size: small">cells</SPAN><SPAN style="font-size: small">[</SPAN><SPAN style="color: #6a3e3e;font-size: small">i</SPAN><SPAN style="font-size: small">].getContents()+</SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;/"</SPAN><SPAN style="font-size: small">+</SPAN><SPAN style="color: #6a3e3e;font-size: small">cellNames</SPAN><SPAN style="font-size: small">[</SPAN><SPAN style="color: #6a3e3e;font-size: small">i</SPAN><SPAN style="font-size: small">].getContents()+</SPAN><SPAN style="color: #2a00ff;font-size: small">"&gt;"</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> + </SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;/Record&gt;"</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> = </SPAN><SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small"> + </SPAN><SPAN style="color: #2a00ff;font-size: small">"&lt;/Details&gt;"</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT"><SPAN style="color: #6a3e3e;font-size: small">wb</SPAN><SPAN style="font-size: small">.close();</SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> } </SPAN><B><SPAN style="color: #7f0055;font-size: small">catch</SPAN></B><SPAN style="font-size: small"> (Exception </SPAN><SPAN style="color: #6a3e3e;font-size: small">e</SPAN><SPAN style="font-size: small">){ </SPAN></P><BR /> <P align="LEFT"><SPAN style="font-size: small"> ModuleException </SPAN><SPAN style="color: #6a3e3e;font-size: small">me</SPAN><SPAN style="font-size: small"> = </SPAN><B><SPAN style="color: #7f0055;font-size: small">new</SPAN></B><SPAN style="font-size: small"> ModuleException(</SPAN><SPAN style="color: #6a3e3e;font-size: small">e</SPAN><SPAN style="font-size: small">);</SPAN></P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">throw</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">me</SPAN><SPAN style="font-size: small">;</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT"><B><SPAN style="color: #7f0055;font-size: small">return</SPAN></B> <SPAN style="color: #6a3e3e;font-size: small">xmldata</SPAN><SPAN style="font-size: small">.getBytes();</SPAN></P><BR /> <P align="LEFT">}</P><BR /> <P align="LEFT">}</P><BR /> <STRONG>Note:-</STRONG><BR /> <BR /> 1 ) I am using below details for my development.<BR /> <BR /> NWDS--&gt; 7.3 SP06 PAT0009 and jdk1.8.0_131<BR /> <BR /> SAP PO --&gt; 7.5 SP07<BR /> <BR /> EJB Module Version--&gt; 3.0<BR /> <BR /> 2) If you will not find XPI Libraries in your NWDS version, then you can add below jar files , as external jars and any other jar files as per your requirements.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/Capture_21.png" /><BR /> <BR /> 3) &nbsp;Any Suggestion on this blog is always welcome.<BR /> <BR /> 4) We can create module and write Java code in different way, which you can find in different&nbsp;blogs. 2019-05-03T16:24:47+02:00 https://community.sap.com/t5/technology-blogs-by-members/integrating-amazon-simple-storage-service-amazon-s3-and-sap-ecc-v6-0-via/ba-p/13392065 Integrating Amazon Simple Storage Service (Amazon S3) and SAP ECC v6.0 via SAP PI v7.5 using AWS Signature v5 and Signing Algorithm (HMAC-SHA256) 2019-05-31T14:06:47+02:00 former_member607993 https://community.sap.com/t5/user/viewprofilepage/user-id/607993 It is not at all surprising that more than a million active customers, from Airbnb to GE, use AWS Cloud solutions to deliver flexibility, fast, scalability, reliability and inexpensive data storage infrastructure. Companies like Netflix, Airbnb, Disney, NASA, BWM and many more are all using AWS to make business decisions in real time. These companies use data collection systems for nearly everything from business analytics to near-real-time operations, to executive reporting, computing and storage.<BR /> <BR /> As part of AWS Storage,<SPAN style="text-decoration: underline"><STRONG> Amazon Simple Storage Service (S3)</STRONG></SPAN> provides scalable object storage for data backup, archival and analytics and used to store and retrieve any amount of data, at any time, from anywhere on the web.<BR /> <H3 id="toc-hId-1037564100"><STRONG>Benefits</STRONG></H3><BR /> Amazon Simple Storage Service (S3) is low cost, 99.99% availability, secure by default, transfer a large amount of data and easy to handle.<BR /> <H3 id="toc-hId-841050595"><STRONG>Conceptualizes</STRONG></H3><BR /> Amazon Simple Storage Service (S3)<EM><STRONG> Conceptualizes</STRONG></EM> of buckets, objects, regions, keys and Amazon S3 data consistency model.<BR /> <BR /> Data is stored as objects within resources called “<SPAN style="text-decoration: underline">buckets</SPAN>”, and a single object can be up to <STRONG>5</STRONG> <STRONG>terabytes</STRONG> in size. S3 features include capabilities to append metadata tags to objects, move and store data across the S3 Storage Classes, configure and enforce data access controls, secure data against unauthorized users, run big data analytics, and monitor data at the object and bucket levels.<BR /> <BR /> Amazon S3 is designed for 99.999999999% (11 9's) of durability, and stores data for millions of applications for companies all around the world.<BR /> <H3 id="toc-hId-644537090"><STRONG>Integration:</STRONG></H3><BR /> Amazon S3 supports the '<STRONG>REST API</STRONG>'. Support for SOAP over HTTP is deprecated, but it is still available over HTTPS. However, new Amazon S3 features will not be supported for SOAP. Amazon recommends that you use either the REST API or the AWS SDKs.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/S3_PIC_AWS.jpg" /><BR /> <BR /> Recently I had developed a unidirectional interface integrating Amazon Simple Storage Service (Amazon S3) and SAP ECC 6.0 via SAP PI 7.5 using AWS Signature v5 and Signing Algorithm (HMAC-SHA256). This integration scenario defines IDOC to REST by means iDocument-CSV conversion using REST Adapter.<BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">In the server side i.e. Amazon Simple Storage Service (Amazon S3), file should be delivered in the form of comma separated value(.csv) using AWS Signature version 5 and Signing Algorithm (HMAC-SHA256). Amazon has provided authentication methods and signing requests to calculate the Signature process. Below are the methods to generate Header values:</SPAN></P><BR /> <BR /> <OL><BR /> <LI>Generate Signature -&nbsp;<STRONG>Authorization</STRONG></LI><BR /> <LI>Generate Content Hash - <STRONG>X-Amz-Content-Sha256</STRONG></LI><BR /> <LI>Generate Date Stamp -<STRONG>X-Amz-Date</STRONG></LI><BR /> <LI>Generate Content Type -<STRONG>Content-Type</STRONG></LI><BR /> <LI>Dynamically generate HTTP Headers</LI><BR /> </OL><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">Basically, Amazon S3 expects all the above mentioned mandatory header values to authenticate the client and it looks like below:</SPAN></P><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/header.jpg" /><BR /> <H3 id="toc-hId-448023585"><STRONG>Common Request Headers:</STRONG></H3><BR /> The following table describes headers that can be used by various types of Amazon S3 REST requests.<BR /> <TABLE style="height: 619px" width="631"><BR /> <TBODY><BR /> <TR><BR /> <TD><STRONG>Header Name</STRONG></TD><BR /> <TD><STRONG>Description</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD>Authorization</TD><BR /> <TD><BR /> <BR /> The information required for request authentication. It starts with AWS4-HMAC-SHA256 and value looks like:<BR /> <BR /> AWS4-HMAC-SHA256 Credential=access-key-id/date/aws-region/aws-service/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=256-bit signature expression<BR /> <BR /> where &lt;date&gt; value is specified using YYMMDD format and &lt;aws-service&gt; value is s3 when sending request to Amazon S3.</TD><BR /> </TR><BR /> <TR><BR /> <TD>Content-Type</TD><BR /> <TD>The content type of the resource in case the request content in the body. Example:&nbsp;text/plain</TD><BR /> </TR><BR /> <TR><BR /> <TD>Content-MD5</TD><BR /> <TD>The base64 encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent.</TD><BR /> </TR><BR /> <TR><BR /> <TD>Host</TD><BR /> <TD>For path-style requests, the value is&nbsp;s3.amazonaws.com. For virtual-style requests, the value is&nbsp;BucketName.s3.amazonaws.com.</TD><BR /> </TR><BR /> <TR><BR /> <TD>x-amz-content-sha256</TD><BR /> <TD>When using signature version 4 to authenticate request, this header provides a hash of the request payload. For more information see Signature Calculations for the Authorization Header: Transferring Payload in a Single Chunk (AWS Signature Version 4). When uploading object in chunks, you set the value to STREAMING-AWS4-HMAC-SHA256-PAYLOAD to indicate that the signature covers only headers and that there is no payload.</TD><BR /> </TR><BR /> <TR><BR /> <TD>x-amz-date</TD><BR /> <TD>The current date and time according to the requester. Example:&nbsp;Wed, 01 Mar 2006 12:00:00 GMT. When you specify the&nbsp;Authorization&nbsp;header, you must specify either the&nbsp;x-amz-date&nbsp;or the&nbsp;Date&nbsp;header. If you specify both, the value specified for the&nbsp;x-amz-date&nbsp;header takes precedence.</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <H3 id="toc-hId-251510080"><STRONG>Calculating a Signature:</STRONG></H3><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">To calculate a signature, you first need a string to sign. You then calculate a&nbsp;</SPAN>HMAC-SHA256&nbsp;hash of the string to sign by using a signing key. The following diagram illustrates the process, including the various components of the string that you create for signing.</P><BR /> The process of putting a request in an agreed-upon form for signing is called '<STRONG>canonicalization'</STRONG>.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/req.jpg" /><BR /> <H3 id="toc-hId-54996575"><STRONG>Deriving the Header values Using Java (User defined functions)</STRONG></H3><BR /> <OL><BR /> <LI>Generate Signature -&nbsp;<STRONG>Authorization</STRONG></LI><BR /> <LI>Generate Content Hash - <STRONG>X-Amz-Content-Sha256</STRONG></LI><BR /> <LI>Generate Date Stamp -<STRONG>X-Amz-Date</STRONG></LI><BR /> <LI>Generate Content Type -<STRONG>Content-Type</STRONG></LI><BR /> <LI>Generate Payload</LI><BR /> <LI>Dynamically generate HTTP Headers</LI><BR /> </OL><BR /> At first to define the individual global methods for above header parameters.<BR /> <H3 id="toc-hId--141516930"><STRONG>In the Enterprise service repository:</STRONG></H3><BR /> <STRONG>Step 1</STRONG>: Create a new function library and specify the attributes and methods(global variables) as below:<BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">String dateStamp ="";</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">String signature ="";</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">String method = "PUT";</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">String FileName="";</SPAN></P><BR /> &nbsp;<BR /> <BR /> <STRONG>Step 2</STRONG>: Create a user defined function to Generate Signature<BR /> <BR /> public String generateSignature(String lcl_filePath, String lcl_dateTimeStamp, String contentType, String awsAccessKeyId, String awsSecretKey, String payload, Container container) throws StreamTransformationException{<BR /> <BR /> {<BR /> <BR /> AbstractTrace trace = container.getTrace();<BR /> <BR /> String authorization = "";<BR /> <BR /> try {<BR /> <BR /> String algorithm = "HmacSHA256";<BR /> <BR /> Mac mac = Mac.getInstance(algorithm);<BR /> <BR /> SimpleDateFormat dt1 = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");<BR /> <BR /> Date parsedDate = dt1.parse(lcl_dateTimeStamp.toString());<BR /> <BR /> SimpleDateFormat dt2 = new SimpleDateFormat("yyyyMMdd");<BR /> <BR /> String lcl_dateStamp = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dt2.format(parsedDate);<BR /> <BR /> trace.addWarning("Date:" + lcl_dateStamp);<BR /> <BR /> MessageDigest md = MessageDigest.getInstance("SHA-256");<BR /> <BR /> byte[] hashPayloadInBytes = md.digest(payload.getBytes("UTF-8"));<BR /> <BR /> StringBuilder payloadSb = new StringBuilder();<BR /> <BR /> for (byte b : hashPayloadInBytes) {<BR /> <BR /> payloadSb.append(String.format("%02x", b));<BR /> <BR /> }<BR /> <BR /> String hashPayload = payloadSb.toString();<BR /> <BR /> trace.addWarning(hashPayload);<BR /> <BR /> trace.addWarning(lcl_dateTimeStamp);<BR /> <BR /> StringBuffer canonicalRequest = new StringBuffer();<BR /> <BR /> canonicalRequest.append("PUT").append("\n");<BR /> <BR /> canonicalRequest.append(lcl_filePath).append("\n\n");<BR /> <BR /> canonicalRequest.append("content-type:" + contentType).append("\n");<BR /> <BR /> canonicalRequest.append("host:bucketName.s3.amazonaws.com").append("\n");<BR /> <BR /> canonicalRequest.append("x-amz-content-sha256:" + hashPayload).append("\n");<BR /> <BR /> canonicalRequest.append("x-amz-date:" + lcl_dateTimeStamp).append("\n\n");<BR /> <BR /> canonicalRequest.append("content-type;host;x-amz-content-sha256;x-amz-date").append("\n");<BR /> <BR /> canonicalRequest.append(hashPayload);<BR /> <BR /> byte[] hashCanonicalReqInBytes = md.digest(canonicalRequest.toString().getBytes("UTF-8"));<BR /> <BR /> StringBuilder hashCanonicalSb = new StringBuilder();<BR /> <BR /> for (byte b : hashCanonicalReqInBytes) {<BR /> <BR /> hashCanonicalSb.append(String.format("%02x", b));<BR /> <BR /> }<BR /> <BR /> trace.addWarning(hashCanonicalSb.toString());<BR /> <BR /> StringBuffer sringToSignSb = new StringBuffer();<BR /> <BR /> sringToSignSb.append("AWS4-HMAC-SHA256").append("\n");<BR /> <BR /> sringToSignSb.append(lcl_dateTimeStamp).append("\n");<BR /> <BR /> sringToSignSb.append(lcl_dateStamp + "/" + "ap-south-1/s3/aws4_request").append("\n");<BR /> <BR /> sringToSignSb.append(hashCanonicalSb.toString());<BR /> <BR /> String stringToSign = sringToSignSb.toString();<BR /> <BR /> System.out.println(stringToSign);<BR /> <BR /> trace.addWarning(stringToSign);<BR /> <BR /> byte[] kSecret = ("AWS4" + awsSecretKey).getBytes("UTF-8");<BR /> <BR /> mac.init(new SecretKeySpec(kSecret, algorithm));<BR /> <BR /> byte[] kDate = mac.doFinal(lcl_dateStamp.getBytes("UTF-8"));<BR /> <BR /> mac.init(new SecretKeySpec(kDate, algorithm));<BR /> <BR /> byte[] kRegion = mac.doFinal("ap-south-1".getBytes("UTF-8"));<BR /> <BR /> mac.init(new SecretKeySpec(kRegion, algorithm));<BR /> <BR /> byte[] kService = mac.doFinal("s3".getBytes("UTF-8"));<BR /> <BR /> mac.init(new SecretKeySpec(kService, algorithm));<BR /> <BR /> byte[] kSigning = mac.doFinal("aws4_request".getBytes("UTF-8"));<BR /> <BR /> mac.init(new SecretKeySpec(kSigning, algorithm));<BR /> <BR /> byte[] kSignature = mac.doFinal(stringToSign.getBytes("UTF-8"));<BR /> <BR /> String signature = Hex.encodeHexString(kSignature);<BR /> <BR /> authorization = "AWS4-HMAC-SHA256 Credential=" + awsAccessKeyId + "/" + lcl_dateStamp<BR /> <BR /> + "/ap-south-1/s3/aws4_request,SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date,Signature="<BR /> <BR /> + signature;<BR /> <BR /> } catch (Exception e) {<BR /> <BR /> e.printStackTrace();<BR /> <BR /> }<BR /> <BR /> return authorization;<BR /> <BR /> }<BR /> <BR /> }<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 3: </STRONG>Create a user defined function to Generate&nbsp; DateStamp<BR /> <BR /> public String generateDateTimeStamp(Container container) throws StreamTransformationException{<BR /> <BR /> AbstractTrace trace = container.getTrace();<BR /> <BR /> SimpleDateFormat dt1 = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");<BR /> <BR /> dt1.setTimeZone(TimeZone.getTimeZone("GMT"));<BR /> <BR /> dateStamp = dt1.format(new Date());<BR /> <BR /> trace.addWarning(dateStamp);<BR /> <BR /> return dateStamp;<BR /> <BR /> }<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 4: </STRONG>Create a user defined function to Generate Content Hash<BR /> <BR /> public String generateContentHashing(String payload, Container container) throws StreamTransformationException{<BR /> <BR /> AbstractTrace trace = container.getTrace();<BR /> <BR /> StringBuilder payloadSb = new StringBuilder();<BR /> <BR /> try {<BR /> <BR /> MessageDigest md = MessageDigest.getInstance("SHA-256");<BR /> <BR /> byte[] hashPayloadInBytes = md.digest(payload.getBytes());<BR /> <BR /> for (byte b : hashPayloadInBytes) {<BR /> <BR /> payloadSb.append(String.format("%02x", b));<BR /> <BR /> }<BR /> <BR /> } catch (NoSuchAlgorithmException e) {<BR /> <BR /> e.printStackTrace();<BR /> <BR /> }<BR /> <BR /> trace.addWarning(payload);<BR /> <BR /> return payloadSb.toString();<BR /> <BR /> }<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 5: </STRONG>Create a user defined function to Generate csv Payload<BR /> <BR /> public void generatePayload(String[] SKUId, String[] EANNumber, String[] Warehouse, String[] Quantity, String[] UOM, String[] Cost, String[] Entity, String[] TransactionType, ResultList rs, Container container) throws StreamTransformationException{<BR /> <BR /> AbstractTrace trace = container.getTrace();<BR /> try<BR /> {<BR /> String header = "SKUId,EANNumber,Warehouse,Quantity,UOM,Cost,Entity,TransactionType"; // field names from your first structure<BR /> String content = header + "\n";<BR /> for(int i =0; i&lt; SKUId.length; i++)<BR /> {<BR /> <BR /> // adjust the below line with your field names from first structure<BR /> content = content + SKUId[i] +"," +EANNumber[i] + ","+ Warehouse[i] + "," + Quantity[i] + "," + UOM[i] + "," + Cost[i] + "," + Entity[i] + "," + TransactionType[i] + "\n";<BR /> <BR /> }<BR /> trace.addInfo(content);<BR /> rs.addValue(content);<BR /> }<BR /> <BR /> //Create attachment with CSV data<BR /> catch (Exception e)<BR /> {<BR /> e.toString();<BR /> }<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Step 6:&nbsp;</STRONG>Create a user defined function to Generate Dynamic HTTP Headers<BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">public String HTTPHeaders(String dateStamp, String signature, String contentHash, String fileName, Container container) throws StreamTransformationException{</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">DynamicConfiguration conf2 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">DynamicConfigurationKey key3 = DynamicConfigurationKey.create("<A href="http://sap.com/xi/XI/System/REST" target="_blank" rel="noopener noreferrer">http://sap.com/xi/XI/System/REST</A>", "XAmzDate");</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">conf2.put(key3,dateStamp);</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">DynamicConfigurationKey key4 = DynamicConfigurationKey.create("<A href="http://sap.com/xi/XI/System/REST" target="_blank" rel="noopener noreferrer">http://sap.com/xi/XI/System/REST</A>", "Authorization");</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">conf2.put(key4,signature);</SPAN><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">&nbsp;</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">DynamicConfigurationKey key5 = DynamicConfigurationKey.create("<A href="http://sap.com/xi/XI/System/REST" target="_blank" rel="noopener noreferrer">http://sap.com/xi/XI/System/REST</A>", "XAmzContentSha256");</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">conf2.put(key5,contentHash);</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">DynamicConfigurationKey key6 = DynamicConfigurationKey.create("<A href="http://sap.com/xi/XI/System/REST" target="_blank" rel="noopener noreferrer">http://sap.com/xi/XI/System/REST</A>", "FileName");</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">conf2.put(key6,fileName);</SPAN></P><BR /> <P style="background: white"><SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">return "";</SPAN></P><BR /> &nbsp;<BR /> <BR /> Below are the D<STRONG>etailed steps</STRONG> which explains in reading the API headers parameters i.e. the key and value and sending the file name dynamically :<BR /> <BR /> In the&nbsp;<STRONG>first graphical mapper(IDOC to XML)</STRONG> declare the Adapter Specific Message Attributes as an User-defined Functions for deriving the file name scheme as below and map to the target field ‘<STRONG>fileName</STRONG>’ and also pass the respective file path to the target field '<STRONG>filePath</STRONG>'.<BR /> <BR /> <EM><U><B>User defined&nbsp;function to generate file name dynamically:</B></U></EM><BR /> <BR /> public String getASMAFileName(String CREDAT, String CRETIM, Container container) throws StreamTransformationException{<BR /> <BR /> String filename = “INV_” + CREDAT + “_” + CRETIM + “.csv”;<BR /> <BR /> return filename;<BR /> <BR /> <STRONG><EM>1<SUP>st</SUP>&nbsp;Mapper:</EM></STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/04/pic1-1.jpg" /><BR /> <BR /> In the&nbsp;<B>second graphical mapper(XML to CSV) </B>use the function libraries mentioned in above steps.<BR /> <BR /> Hard coded values (like file path, content type, aws access key id and aws secret key can be moved to value mapping appropriately.<BR /> <BR /> <EM><STRONG>2nd&nbsp;Mapper:</STRONG></EM><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/tye.jpg" /><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--338030435"><STRONG>In the Integration Directory:</STRONG></H3><BR /> Coming to the&nbsp;<STRONG>REST Receiver communication channel</STRONG>, under the REST URL tab the header variables defined in pattern variables are replaced by the respective values in the request message dynamically. For each part, I use an adapter specif attribute to read dynamically&nbsp; the respective values from the Adapter specific attributes.<BR /> <BR /> The&nbsp;<STRONG><SPAN class="ph uicontrol">URL Pattern</SPAN></STRONG>&nbsp;describes the full URL produced by this channel by using named placeholders for dynamic parts. Placeholder variable names must be enclosed in curly braces.<BR /> <BR /> Here v<STRONG>alue source i</STRONG>s <B>Adapter specific attribute </B>which&nbsp;retrieves the value from an <SPAN class="ph uicontrol">Adapter-Specific Attribute</SPAN>&nbsp;by name. The predefined names are:&nbsp;<SPAN class="ph sap-technical-name sap-technical-name">service, resource, id, resource2, id2, operation.</SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/req-1.jpg" /><BR /> <BR /> Switching to tab REST Operation . Here, I have set the HTTP Operation Source equals PUT which is a static value.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/req-2.jpg" /><BR /> <BR /> Now defining the format of the messages of the RESTful service. Switch to tab Data Format here the format of the request is JSON and response is expected to be in XML.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/req-3.jpg" /><BR /> <BR /> Finally in the HTTP Headers define the header and value pattern appropriately.These are dynamically generated using user defined functions.<SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">The header value may contain all placeholders defined on the&nbsp;</SPAN><SPAN style="font-size: 10.5pt;color: #333333">REST URL<SPAN style="font-size: 10.5pt;font-family: 'Arial',sans-serif;color: #333333">&nbsp;tab.</SPAN></SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/tye-1.jpg" /><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--534543940"><STRONG>Run the Scenario:</STRONG></H3><BR /> Background job is scheduled in ECC and subsequently an iDOc is generated and delivered to PI for transformation and exchange of message.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>SAP PI Middleware Server:</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/05/tye-2.jpg" /><BR /> <BR /> <STRONG>Amazon S3 target server:</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/04/pic1-8.jpg" /><BR /> <BR /> comma separated value(.csv) looks like:<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/04/pic1-9.jpg" /><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--731057445"><STRONG>Conclusion</STRONG></H3><BR /> However, in this blog, I had accomplished this integration using Java mapping as per the recommendations provided by AWS. Below are the references:<BR /> <BR /> <A href="https://docs.aws.amazon.com/general/latest/gr/Welcome.html" target="test_blank" rel="nofollow noopener noreferrer">https://docs.aws.amazon.com/general/latest/gr/Welcome.html</A><BR /> <BR /> <A href="https://docs.aws.amazon.com/index.html" target="test_blank" rel="nofollow noopener noreferrer">https://docs.aws.amazon.com/index.html</A><BR /> <BR /> Other benefits include low cost, 99.99% availability, secure by default, transfer a large amount of data and easy to handle.<BR /> <BR /> &nbsp;<BR /> <BR /> In next blogs I will be briefing on the integration with MS Azure and Kafka Applications using external adapters.<BR /> <BR /> Thank you! 2019-05-31T14:06:47+02:00 https://community.sap.com/t5/technology-blogs-by-members/10-steps-to-auto-generate-api-documentation-from-swagger-inspector-for-rest/ba-p/13413947 10-Steps to Auto - Generate API Documentation from Swagger Inspector for Rest API(S) from SAP CPI 2019-06-19T21:51:02+02:00 STALANKI https://community.sap.com/t5/user/viewprofilepage/user-id/13911 <H1 id="toc-hId-800678025"><STRONG><SPAN style="color: #ff6600">Background</SPAN></STRONG></H1><BR /> <P style="text-align: left"><EM><STRONG><SPAN style="color: #ff6600"><SPAN style="color: #000000">"Consumer friendly API Documentation is the key for successfull implementation of API First Strategy as it directly impacts the wider adoption and consumption of API(S) across external and internal suppliers and partners."</SPAN></SPAN></STRONG></EM></P><BR /> <P style="text-align: left"><SPAN style="color: #000000">While swagger or SAP API designer provides a beautiful way to document API(S) for API consumers via <STRONG>RAML/YAML</STRONG>, it is a manual job for API providers generally to <STRONG>build the API definition i.e RAML in the editors from the scratch</STRONG> especially when the request/response structures <STRONG>are complex</STRONG> i.e SAP Objects or when API(S) are built and <STRONG>handed over to support team without any documentation.</STRONG></SPAN></P><BR /> <P style="text-align: left"><SPAN style="color: #000000">The following tutorial will provide a mechanism on how to <STRONG><A href="https://swagger.io/blog/news/announcing-swagger-inspector/" target="_blank" rel="nofollow noopener noreferrer">auto-generate API&nbsp;documentation using Swagger Inspector for rest API(S)</A> exposed in SAP CPI or SAP PO or API definition in SAP API management instead of manually typing the RAML to create API definition. Please use CORS Chrome Extension if you face CORS issue when sending messages to CPI &nbsp;<A href="https://chrome.google.com/webstore/detail/swagger-inspector-extensi/biemppheiopfggogojnfpkngdkchelik" target="_blank" rel="nofollow noopener noreferrer">via Swagger Inspector.</A></STRONG></SPAN></P><BR /> <BR /> <H1 id="toc-hId-604164520"><STRONG><SPAN style="color: #ff6600">Tutorial</SPAN></STRONG></H1><BR /> <P style="text-align: left"><STRONG>Step1:</STRONG> Create a small <STRONG>CPI</STRONG> package<STRONG>&nbsp; AutoGenerateSwaggerForAPI with a content modifier step&nbsp;</STRONG>that accepts the request and sends the JSON response.</P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog1-1.png" /></P><BR /> <P style="text-align: left"><STRONG>Step 2:</STRONG>&nbsp; Open <A href="https://inspector.swagger.io/builder" target="_blank" rel="nofollow noopener noreferrer">https://inspector.swagger.io/builder</A> on browser</P><BR /> <P style="text-align: left"><STRONG>Step 3:</STRONG> Test CPI Endpoint <A href="https://l4170-iflmap.hcisbp.eu1.hana.ondemand.com/http/SuccessFactors/EmployeeRequest" target="_blank" rel="nofollow noopener noreferrer">https://CPITenant-iflmap.hcisbp.eu1.hana.ondemand.com/http/SuccessFactors/EmployeeRequest</A>&nbsp;by passing the&nbsp;required required body and username/password in authorization header.</P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog2-1.png" /></P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog3.png" /></P><BR /> <P style="text-align: left"><STRONG>Step 4: </STRONG>Test CPI Endpoint <A href="https://l4170-iflmap.hcisbp.eu1.hana.ondemand.com/http/SuccessFactors/EmployeeResponse" target="_blank" rel="nofollow noopener noreferrer">https://CPITenant-iflmap.hcisbp.eu1.hana.ondemand.com/http/SuccessFactors/EmployeeResponse</A> by passing the required response body and username/password in authorization header.</P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog4-1.png" /></P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blogmiss.png" /></P><BR /> <P style="text-align: left"><STRONG>Step 5:&nbsp;</STRONG>Create API Definition by selecting <STRONG>both the Employee request / response</STRONG> and pressing “Create API Definition”</P><BR /> <P style="text-align: left"><STRONG> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog6-2.png" /></STRONG></P><BR /> <P style="text-align: left"><STRONG>Step 6: </STRONG>Create Swagger User and sign up</P><BR /> <P style="text-align: left"><STRONG> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog7.png" /></STRONG></P><BR /> <P style="text-align: left"><STRONG>&nbsp;</STRONG></P><BR /> <P style="text-align: left"><STRONG>Step 7:&nbsp; Go to Swagger hub and press import open API definition From inspector as shown below:</STRONG></P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog8.png" /></P><BR /> <P style="text-align: left"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog9.png" /></P><BR /> <P style="text-align: left"><STRONG>Step 8: </STRONG>Swagger API Definition for Employee Request/Response should be generated and screen should look like this.</P><BR /> <P style="text-align: left"><STRONG>&nbsp;</STRONG></P><BR /> <P style="text-align: left"><STRONG> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog10.png" /></STRONG></P><BR /> <P style="text-align: left"><STRONG>Step 9: </STRONG>You can check request schema and response schema as shown below:</P><BR /> <P style="text-align: left"><STRONG> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog11.png" /></STRONG></P><BR /> <P style="text-align: left"><STRONG>&nbsp;</STRONG></P><BR /> <P style="text-align: left"><STRONG>&nbsp;</STRONG></P><BR /> <P style="text-align: left"><STRONG>&nbsp;</STRONG></P><BR /> <P style="text-align: left"><STRONG>Step 10: </STRONG>You can Download Swagger/OpenAPI JSON as shown below:</P><BR /> <STRONG> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/06/blog12.png" /></STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG> 2019-06-19T21:51:02+02:00 https://community.sap.com/t5/technology-blogs-by-members/delete-cross-container-services-for-hana-xsa-environment/ba-p/13416476 Delete cross-container-services for HANA XSA environment 2019-08-13T15:48:14+02:00 kishore_kumar59 https://community.sap.com/t5/user/viewprofilepage/user-id/184558 This document is designed for the environment on HANA 2.0 SPS03 Rev 34 and above.<BR /> <BR /> you can delete the service from XSA<BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/02/DeleteservicesXSAcockpit-1.png" /><BR /> <BR /> and from Command line option in the following way.<BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/02/xsaclicommand.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Still my application is looking for the delete services when i try to build the application.<BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/02/blog1.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Then I tried the following by deleting via MTA Editor of that particular project via XSA/WebIDE.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/02/blog2.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/02/blog3.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/02/blog4.png" /><BR /> <BR /> &nbsp; 2019-08-13T15:48:14+02:00 https://community.sap.com/t5/technology-blogs-by-members/sap-pi-system-properties-and-it-s-usage/ba-p/13451264 SAP PI System Properties and it's usage 2019-11-20T19:49:52+01:00 sugata_bagchi2 https://community.sap.com/t5/user/viewprofilepage/user-id/197287 We all came across the requirement to get the SAP System name at least once in many of our PI integration projects. We always wanted to get the SAP PI SID dynamically in the mapping and use it&nbsp; for various purposes.<BR /> <BR /> We all probably used the below code snippet in the UDF to achieve this requirement-<BR /> <PRE class="language-java"><CODE>String sysName = (String) System.getProperty("SAPSYSTEMNAME");<BR /> return sysName;</CODE></PRE><BR /> I have always wondered what are the other system properties we can fetch? and how to use this UDF more dynamically rather than hard-coding the property name.<BR /> <BR /> Here is the little trick, using the below code we can retrieve the entire list of properties of the PI system-<BR /> <PRE class="language-java"><CODE>Properties p = System.getProperties();<BR /> return p.toString();</CODE></PRE><BR /> This will return the String representation of the key-value pair for all the system properties, similar to below -<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/2019-11-20_11-35-47.jpg" /><BR /> <BR /> Now, we can choose any property and pass it to UDF and get the value of that property.<BR /> <BR /> Below is the revised and modified UDF code which is more dynamic to get any system property value- this UDF requires only one input -property which is the name of any PI system property.<BR /> <BR /> PI system properties are - SAPSYSTEMNAME,SAP_J2EE_Engine_Version,SAPSYSTEM,java.vm.version etc.<BR /> <PRE class="language-java"><CODE>String property_val = (String) System.getProperty(property);<BR /> return property_val;</CODE></PRE><BR /> <STRONG><SPAN style="text-decoration: underline">Motivation:</SPAN></STRONG><BR /> <BR /> <A href="https://answers.sap.com/questions/12900629/how-to-get-the-other-system-properties-for-pi-usin.html" target="test_blank" rel="noopener noreferrer">https://answers.sap.com/questions/12900629/how-to-get-the-other-system-properties-for-pi-usin.html</A><BR /> <BR /> &nbsp;<BR /> <BR /> Hope this will help the community! 2019-11-20T19:49:52+01:00 https://community.sap.com/t5/technology-blogs-by-members/how-to-create-jms-queue-in-sap-po-7-5-and-do-e-2-e-testing/ba-p/13432678 How to Create JMS Queue in SAP PO 7.5 and do e-2-e Testing 2020-01-27T11:24:31+01:00 bijayashreebanoj_brahma https://community.sap.com/t5/user/viewprofilepage/user-id/418399 <SPAN style="text-decoration: underline"><STRONG>Introduction:-</STRONG></SPAN><BR /> <BR /> While doing Migration from SAP PI 7.1 to SAP PO 7.5 , I come across a situation where, I have to do end-2-end testing for newly installed JMS Libraries. Then I search corresponding blog posts, but I am unable to find full details of configuration and testing. Hence I though of creating this blog post. Hope this will help developers.<BR /> <BR /> We will cover below topics in this blog post.<BR /> <BR /> 1) Creating JMS Queue in SAP PO 7.5<BR /> <BR /> 2) Creating JMS User and Roles for JMS Connection in SAP PO<BR /> <BR /> 3) Creating Integrated Configuration<BR /> <BR /> 4) Configuration of Hermes (testing tool) for end-2-end process<BR /> <BR /> <STRONG><U>1) Creating JMS Queue in SAP PO 7.5</U></STRONG><BR /> <BR /> Go to SAP PO NWA --&gt; Configuration --&gt; JMS Server Configuration<BR /> <BR /> Select JMS Resources from drop-down as shown below.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture1-2.png" /><BR /> <BR /> Click on Create and select "JMS Queue" from drop-down.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Untitled2-2.png" /><BR /> <BR /> Below screen will pop-up.<BR /> <BR /> Provide any name as per your choice and select "default" from drop-down, as shown below and save.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Untitled3-1.png" /><BR /> <BR /> Below JMS Queue (jmsqueues/default/JMS_Queue_In) created, as shown below.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Untitled4-2.png" /><BR /> <BR /> Like above I have created another JMS Queue (jmsqueues/default/hermes_test_pod).<BR /> <BR /> <STRONG><U>2) Creating JMS User and Roles for JMS Connection</U></STRONG><BR /> <BR /> With the help of SAP security team or BASIS, we need to create one JMS user with both Consumer and Publisher Roles.<BR /> <BR /> Most of times Consumer roles are added initially, but not the Publisher Roles.<BR /> <BR /> Below Consumer Role and Administrator Role assign to user in NetWeaver Administrator (NWA).<BR /> <UL><BR /> <LI>INTEGRATION_VISIBILITY_JMS_SUBS_CONSUMER</LI><BR /> <LI>Administrator</LI><BR /> </UL><BR /> If Publisher roles are not added, we will get error as "javax.jms.JMSSecurityException: User: Guest has not permission: vpName: default, type: queue, action: consumer, destination:"<BR /> <BR /> I follow <STRONG>SAP Note 2530840</STRONG> to fix the issue.<BR /> <BR /> As described in the SAP Note,<BR /> <BR /> a) we need to assign below Roles to Group "Everyone" in SAP NetWeaver Administrator (NWA).<BR /> <UL><BR /> <LI>topic.all.all</LI><BR /> <LI>queue.all.all</LI><BR /> <LI>temp.topic.all.all</LI><BR /> <LI>temp.queue.all.all</LI><BR /> <LI>administration.all.all</LI><BR /> </UL><BR /> Then assign the user with role Everyone.<BR /> <BR /> <STRONG><U>3) Creating Integrated Configuration</U></STRONG><BR /> <BR /> Below Integrated Configuration created in Integration Builder.<BR /> <BR /> This a bypass Interface, where I am posting same file, from source JMS Queue to receiver Queue of SAP PO 7.5.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture7-1.png" /><BR /> <BR /> <STRONG>a) Sender JMS Communication Channel Configuration</STRONG><BR /> <BR /> Configure JMS Sender Channel with below details.<BR /> <BR /> Choose the correct transport protocol = Access JMS provider with JNDI<BR /> <BR /> JMS Queue = jmsqueues/default/hermes_test_pod&nbsp; (already created before)<BR /> <BR /> Connection Factory =&nbsp; Ijmsfactory/default/QueueConnectionFactory<BR /> <BR /> JNDI Server Address = &lt;hostname&gt;:port&nbsp; (port is your java host httpport + 4)<BR /> <BR /> JNDI Context Factory = com.sap.engine.services.jndi.InitialContextFactoryImpl<BR /> <BR /> Credential: Already created JMS User and Password.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture5-1.png" /><BR /> <BR /> <STRONG>b) Receiver JMS Communication Channel Configuration</STRONG><BR /> <BR /> Configure JMS Receiver Channel with below details.<BR /> <BR /> Choose the correct transport protocol =&nbsp; Access JMS provider with JNDI<BR /> <BR /> JMS Queue =&nbsp; jmsqueues/default/JMS_Queue_In ( already created before)<BR /> <BR /> Connection Factory =&nbsp; Ijmsfactory/default/QueueConnectionFactory<BR /> <BR /> JNDI Server Address = localhost:port&nbsp; (port is your java host httpport + 4)<BR /> <BR /> JNDI Context Factory = com.sap.engine.services.jndi.InitialContextFactoryImpl<BR /> <BR /> Credential = Already created JMS User and Password.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture6-1.png" /><BR /> <BR /> <STRONG><U>4) Configuration of Hermes testing tool for end-2-end process</U></STRONG><BR /> <BR /> As I am familiar with Hermes for testing JMS Queue, I will show you step by step configurations for testing.<BR /> <BR /> a) You can download SOAP UI version -5.4.0 and installed in your local system.<BR /> <BR /> After installation, You will find hermesJMS folder with in this, as its part of "SmartBear".<BR /> <BR /> b) Copy and paste hermesJMS folder to your C drive (<STRONG>C:\hermesJMS</STRONG>)<BR /> <BR /> c) Open folder hermesJMS --&gt; bin --&gt; hermes.bat (edit with notepad or notepad++)<BR /> <BR /> d) Update below details as shown below.<BR /> <UL><BR /> <LI>&nbsp; set HERMES_HOME=<STRONG>C:\hermesJMS</STRONG></LI><BR /> <LI>Then go to end of the file, and add below highlighted lines and save.</LI><BR /> </UL><BR /> You can choose java 8 version of your system.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture8-1.png" /><BR /> <BR /> e) Open hermes.bat file.<BR /> <BR /> f) Create new session and provide any session name per your choice.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture9-1.png" height="458" width="482" /><BR /> <BR /> g) Go to Provider tab, as shown below.<BR /> <BR /> Right click --&gt; Add Group --&gt; Provide any Name as per your choice<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture12-1.png" height="479" width="554" /><BR /> <BR /> h) Right click on created group --&gt; add JARS --&gt; select below JARs from your local system<BR /> <BR /> sap.com~tc~exception~impl<BR /> <BR /> sap.com~tc~je~clientlib~impl<BR /> <BR /> sap.com~tc~logging~java~impl<BR /> <BR /> You can find above JAR files from your basis team or if you have SFTP access to your SAP PO file path, you can find these JAR files.<BR /> <BR /> Path: /usr/sap/&lt;your PO SID&gt;/J00/j2ee/j2eeclient<BR /> <BR /> You can I have already added JAR files under group POD.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture13-1.png" /><BR /> <BR /> i) Then go to Sessions tab as shown below and configure with below details.<BR /> <BR /> --&gt; Plug In as "Default"<BR /> <BR /> --&gt; In Loader, select newly created group in Provider tab (POD in my case)<BR /> <BR /> --&gt; Select Class name as "hermes.JNDIQueueConnectionFactory" from drop-down.<BR /> <BR /> Right click--&gt; Add below 5 Properties and update as below.<BR /> <BR /> --&gt; <STRONG>Binding</STRONG>: jmsfactory/default/QueueConnectionFactory (standard same as above)<BR /> <BR /> --&gt; <STRONG>initialContextFactory</STRONG>: com.sap.engine.services.jndi.InitialContextFactoryImpl<BR /> <BR /> --&gt; <STRONG>providerURL</STRONG>: hostname:[httpport+4]<BR /> <BR /> --&gt; <STRONG>securitycrendential</STRONG>: password<BR /> <BR /> --&gt; <STRONG>securityPrincipal</STRONG>: user<BR /> <BR /> In Destination, add both JMS queue created in SAP PO system.<BR /> <BR /> Right click --&gt; Add --&gt; Update your JMS Queue name and go through all the fields and select OK.<BR /> <BR /> Likewise you can add both your JMS Queue.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture10-2.png" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture14-1.png" height="525" width="396" /><BR /> <BR /> j) Once both JMS Queue created, then select Apply and OK. Now Hermes looks as below.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture15-1.png" /><BR /> <BR /> k) Once you double click on any JMS Queue, you will see on bottom of Hermes, its shows "Finished. No messages read". As there is no message in JMS Queue.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture16-2.png" height="498" width="489" /><BR /> <BR /> l) Now select JMS Queue --&gt; Messages --&gt; Send TextMessage --&gt; Select any test message from your local system (I select XML file).<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture17-1.png" /><BR /> <BR /> m) Once the message uploaded successfully, you can able to see the test file, after double click on JMS Queue. Make sure, you stop the Sender Communication Channel.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture18-1.png" height="479" width="468" /><BR /> <BR /> n) Once you start your Sender JMS Communication Channel, test file will be picked and deleted from source JMS Queue and posted to Receiver Queue.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture20-1.png" /><BR /> <BR /> o) Now you can see one Successful message in SAP PO Message Monitor and test file in receiver JMS Queue.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/01/Capture19-1.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Note: -</STRONG><BR /> <OL><BR /> <LI>This configuration done on SAP PO 7.5 SP7.</LI><BR /> <LI>This blog post created to test, newly installed JMS libraries in SAP PO 7.5. Even you can use according to your requirements.</LI><BR /> <LI>Any Suggestion on this blog post is always welcome.</LI><BR /> <LI>You might find different way of doing this, but I found easiest way to test using Hermes.</LI><BR /> </OL> 2020-01-27T11:24:31+01:00 https://community.sap.com/t5/technology-blogs-by-members/oauth-2-0-standard-solution-with-grant-type-as-password-in-sap-po-7-5-with/ba-p/13435718 OAuth 2.0 Standard Solution with Grant Type as Password in SAP PO 7.5(with Latest Updates) 2020-02-29T11:57:27+01:00 former_member607993 https://community.sap.com/t5/user/viewprofilepage/user-id/607993 <SPAN style="font-weight: 400">This blog portrays the <STRONG>OAuth2.0</STRONG> authorization with grant type as ‘<STRONG>Password</STRONG>’.This is implemented in SAP PO 7.5 SPS 16 Patch 15. Lets take a tour into the Standard solution in elucidate with latest updates. ? Over to content below:</SPAN><BR /> <H3 id="toc-hId-1060748073"><B>1. Introduction:</B></H3><BR /> <SPAN style="font-weight: 400"><STRONG>&nbsp;OAuth</STRONG>(Open Authorization) is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords. </SPAN><BR /> <BR /> <SPAN style="font-weight: 400">&nbsp; &nbsp;OAuth introduces an authorization layer separating the role of the client from that of the resource owner.In OAuth, the client requests access to resources controlled by the resource owner and hosted by the resource server, and is issued a different set of credentials than those of the resource owner.The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service:&nbsp;</SPAN><BR /> <BR /> (i) On behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service&nbsp; (or)<BR /> <BR /> (ii) by allowing the third-party application to obtain access on its own behalf.<BR /> <H3 id="toc-hId-864234568"><B>2. Purpose:</B></H3><BR /> <SPAN style="font-weight: 400">&nbsp;The purpose of this blog is to explain OAuth 2.0 in SAP PO 7.5 SPS 16 with grant type as password.</SPAN><SPAN style="font-weight: 400">Regards to OAuth 2.0 solution </SPAN><SPAN style="font-weight: 400">worked with SAP in testing this solution and identifying bugs</SPAN><SPAN style="font-weight: 400"> which resulted in correction notes published in the SAP marketplace to make this solution more robust to solve different OAuth 2.0 authentication integrations with varied systems/applications.</SPAN><BR /> <H3 id="toc-hId-667721063"><B>3. Authorization Code Grant flow:</B></H3><BR /> <SPAN style="font-weight: 400">&nbsp;Below diagram depicts the <STRONG>Authorization Grant Flow</STRONG> to retrieve </SPAN><SPAN style="font-weight: 400">the <STRONG>access token</STRONG> and <STRONG>refresh token</STRONG></SPAN><SPAN style="font-weight: 400">, POST a call to the authorization server. The client requests authorization from the resource owner and receives grant and then requests tokens by authenticating with the authorization server and presenting the grant. Authorization server validates, if valid then issues the initial access token and initial refresh token with access token expiry(lifetime in secs).&nbsp;</SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/latest.jpg" height="347" width="539" /><BR /> <BR /> Below diagram elucidate that the client requests the <STRONG>protected resources</STRONG> from the resource server and authenticates by presenting the access token. The resource server validates the access token, and if valid, serves the requests and retrieves the response from the protected resources.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/treq.jpg" height="238" width="388" /><BR /> <H3 id="toc-hId-471207558"><B>4. SAP PO REST Adapter Configurations:</B></H3><BR /> Before proceeding with the REST receiver communication channel configurations below is the <STRONG>Authorization server</STRONG> (which grants tokens) HTTP request header and HTTP request Body parameters look alike <SPAN class="emoji wp-migrated-emoji">?</SPAN><BR /> <BR /> <EM><STRONG>HTTP Request Headers:</STRONG></EM><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/authheader.jpg" height="191" width="560" /><BR /> <BR /> <EM><STRONG>HTTP Request Body:</STRONG></EM><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/authbody.jpg" height="318" width="599" /><BR /> <BR /> <EM><STRONG>HTTP Response Body:</STRONG></EM><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/postres.png" height="268" width="562" /><BR /> <BR /> Below is the <STRONG>Resource server</STRONG>(which does the actual business call) HTTP request header and HTTP request Body parameters look alike<BR /> <BR /> <EM><STRONG>HTTP Request Headers:</STRONG></EM><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/resHeader.jpg" height="243" width="522" /><BR /> <BR /> <EM><STRONG>HTTP Request Body:</STRONG></EM><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/resbody.jpg" height="281" width="524" /><BR /> <BR /> <SPAN style="font-weight: 400">&nbsp;In the <EM><STRONG>REST receiver communication channel</STRONG></EM> that allows you to configure with OAuth 2.0 Client Credentials Grant and Resource Owner Password Credentials Grant. Below configurations explains only about the resource owner password credential grant type.</SPAN><BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG><EM>To Configure the REST receiver channel following are the steps below:</EM></STRONG></SPAN><BR /> <BR /> <SPAN style="font-weight: 400">&nbsp; &nbsp;1. To enable new OAuth 2.0 Grant flows, in the "General" tab, check "<STRONG>Authorize with OAuth</STRONG>" checkbox and select "OAuth 2.0 Grant Type Flow".You can choose from the following grant flows:</SPAN><BR /> <UL><BR /> <LI style="font-weight: 400"><B><I>Client Credentials Grant</I></B><SPAN style="font-weight: 400"> - flow described in</SPAN><A href="https://tools.ietf.org/html/rfc6749#section-4.4" target="_blank" rel="nofollow noopener noreferrer"> <SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-4.4" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-4.4</A></LI><BR /> <LI style="font-weight: 400"><B><I>Resource Owner Password Credentials Grant</I></B><SPAN style="font-weight: 400"> - flow described in</SPAN><A href="https://tools.ietf.org/html/rfc6749#section-4.3" target="_blank" rel="nofollow noopener noreferrer"> <SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-4.3" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-4.3</A></LI><BR /> <LI><STRONG>Important Note</STRONG><I><SPAN style="font-weight: 400">: Other grant flows - Authorization Code Grant and Implicit Grant and these are not supported by the REST adapter.</SPAN></I></LI><BR /> </UL><BR /> <SPAN style="font-weight: 400">&nbsp; &nbsp;2. You can configure how to use the received access token as defined in</SPAN><A href="https://tools.ietf.org/html/rfc6750" target="_blank" rel="nofollow noopener noreferrer"> <SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6750" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6750</A><SPAN style="font-weight: 400">. </SPAN><BR /> <BR /> <SPAN style="font-weight: 400">Select following values for the field "<STRONG>Use credentials and OAuth 2.0 access token as</STRONG>" :</SPAN><BR /> <UL><BR /> <LI><B><I>HTTP Header</I></B><SPAN style="font-weight: 400"> - adds the access token to the request HTTP headers in the following format "Authorization: Bearer &lt;access_token&gt;"</SPAN></LI><BR /> <LI><B><I>Query Parameter</I></B><SPAN style="font-weight: 400"> - adds the access token to the resource URL in the following format: <A href="http://&lt;host&gt;:&lt;port&gt;/&lt;resource_path&gt;?access_token=&lt;access_token_value&gt;" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;host&gt;:&lt;port&gt;/&lt;resource_path&gt;?access_token=&lt;access_token_value&gt;</A>;</SPAN></LI><BR /> <LI><STRONG>Important Note</STRONG>: This OAuth2.0 functionality extracts only the access token and not the refresh token.</LI><BR /> <LI>Sending access token as "Form-Encoded Body Parameter" is not supported.</LI><BR /> </UL><BR /> 3. <SPAN style="font-weight: 400">You can configure the following parameters for OAuth 2.0 Grant Type flows:</SPAN><BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>For Client Credentials Grant:</STRONG></SPAN><BR /> <UL><BR /> <LI><B><I>Authorization Server URL - </I></B><SPAN style="font-weight: 400">the server, which will provide the access token(required).</SPAN></LI><BR /> <LI><B><I>Scope</I></B><SPAN style="font-weight: 400"> - The scope of the access request as described in </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-3.3" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-3.3" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-3.3</A><SPAN style="font-weight: 400"> (optional).</SPAN></LI><BR /> <LI><B><I>Client ID</I></B><SPAN style="font-weight: 400"> - The client identifier issued to the client during the registration process as described in </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-2.2" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-2.2" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-2.2</A><SPAN style="font-weight: 400"> (required).</SPAN></LI><BR /> <LI><B><I>Client Secret</I></B><SPAN style="font-weight: 400"><SPAN style="font-weight: 400"> - The client secret </SPAN></SPAN><SPAN style="font-weight: 400">as described in </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-2.3.1" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-2.3.1" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-2.3.1</A><SPAN style="font-weight: 400"> (required).</SPAN></LI><BR /> </UL><BR /> <SPAN style="text-decoration: underline"><EM><STRONG>For Resource Owner Password Credentials Grant :</STRONG></EM></SPAN><BR /> <UL><BR /> <LI><B><I>Authorization Server URL - </I></B><SPAN style="font-weight: 400">the server which will provide the access token. (required)</SPAN></LI><BR /> <LI><B><I>Resource Owner Client ID</I></B><SPAN style="font-weight: 400"> - The client identifier as described in </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-2.2" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-2.2" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-2.2</A><SPAN style="font-weight: 400"> (optional)</SPAN></LI><BR /> <LI><B><I>Authorization Server Username and Password</I></B> <SPAN style="font-weight: 400">- used for authentication with Authorization server as defined in </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-3.2.1" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-3.2.1" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-3.2.1</A><SPAN style="font-weight: 400"> (required)</SPAN></LI><BR /> <LI><B><I>Resource Owner Username and Password</I></B><I><SPAN style="font-weight: 400"> -</SPAN></I><SPAN style="font-weight: 400"> resource owner credentials as defined in </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-4.3.2" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-4.3.2" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-4.3.2</A><SPAN style="font-weight: 400"> (required)</SPAN></LI><BR /> <LI><B style="font-size: 1rem"><I>Scope</I></B><SPAN style="font-weight: 400"> - The scope of the access request as described in </SPAN><A style="font-size: 1rem" href="https://tools.ietf.org/html/rfc6749#section-3.3" target="_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-3.3</A><SPAN style="font-weight: 400">. (optional).</SPAN></LI><BR /> </UL><BR /> 4. <SPAN style="font-weight: 400"><STRONG>OAuth 2.0 Additional parameters</STRONG> need to maintained for the remaining HTTP header and HTTP Query parameters. You can specify the "Parameter Type" to be one of the following:</SPAN><BR /> <UL><BR /> <LI><B><I>Query</I></B><B> -&nbsp; </B><SPAN style="font-weight: 400">Parameter will be added to the URL query(HTTP Body).</SPAN></LI><BR /> <LI><B><I>HttpHeader</I></B><B> - </B><SPAN style="font-weight: 400">Parameter will be added as HTTP Header.</SPAN></LI><BR /> <LI><STRONG>Important Note</STRONG>: As per SAP note 2721684 and 2782239 <SPAN style="font-weight: 400">,which denotes that in order to send </SPAN><SPAN style="font-weight: 400">‘</SPAN><B style="font-size: 1rem">OAuth 2.0 additional&nbsp; HTTP header parameter;</B><SPAN style="font-weight: 400"> with the request.</SPAN>Patch needs to be applied which matches the respective Support Package version(as per SAP Note <B style="font-size: 1rem">952402</B><SPAN style="font-weight: 400"><SPAN style="font-weight: 400">).It works only with &gt;SAP PO 7.5 SPS 15 Patch 0001. With out any patch upgrade below is the error:</SPAN></SPAN></LI><BR /> </UL><BR /> <EM>Error while obtaining authorization code - response code: 400 response:</EM><BR /> <BR /> <SPAN style="font-weight: 400">{"errorCode": "GTW-ERROR-001","message": "appkey not found in Header or it's not correct."}</SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/addp.jpg" /><BR /> <BR /> 5. In the <STRONG>REST URL</STRONG>, provide the resource server URL which does the actual business API call.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/postres-2.png" /><BR /> <BR /> 6<STRONG>.</STRONG> Below is the<STRONG> HTTP headers </STRONG>of the resource server<STRONG>:</STRONG><BR /> <BR /> In the HTTP Headers, there is no necessity to enforce Authorization: Bearer &lt;access_token&gt;.It will be added since in 'General tab' it is defined use access token as HTTP header.<BR /> <BR /> '<STRONG>appkey</STRONG>' is a valid application key passed in HTTP Header which allows you to track your API usage per application.'<STRONG>Content-Type</STRONG>' is the type of representation desired at resource side.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/hdrREst.jpg" height="139" width="616" /><BR /> <H3 id="toc-hId-274694053"><B>5. Additional Feature- Resource Owner Password Credentials Grant:</B></H3><BR /> <SPAN style="font-weight: 400">When partner server does not support Authorization Basic HTTP Header which got added as Authorization: Basic &lt;credentials&gt; since the authorization user name and password is configured in Communication Channel. There is no configuration which is used to exclude this header before and same is raised with SAP for the additional feature.</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">As per </SPAN><B>OAuth2.0 standard Authentication framework</B><SPAN style="font-weight: 400">, the client must not use more than one authentication method in each request.Refer: </SPAN><A href="https://tools.ietf.org/html/rfc6749#section-2.3" target="_blank" rel="nofollow noopener noreferrer"><SPAN style="font-weight: 400"></SPAN></A><A href="https://tools.ietf.org/html/rfc6749#section-2.3" target="test_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-2.3</A><BR /> <BR /> <B>Solution from SAP: </B><SPAN style="font-weight: 400">&nbsp;New module parameter is defined to the REST receiver channel that allows you to specify how the user authentication is requested from the partner authorization server.Refer SAP Note <STRONG>2878625</STRONG>.</SPAN><BR /> <TABLE style="width: 656px"><BR /> <TBODY><BR /> <TR><BR /> <TD style="width: 256px"><B>Parameter name</B></TD><BR /> <TD style="width: 83px"><B>Parameter value</B></TD><BR /> <TD style="width: 317px"><B>Perform</B></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 256px" rowspan="3"><SPAN style="font-weight: 400">Oauth20AutorizationServerRequestType</SPAN></TD><BR /> <TD style="width: 83px"><BR /> <BR /> <SPAN style="font-weight: 400">header</SPAN><BR /> <BR /> (default)</TD><BR /> <TD style="width: 317px"><SPAN style="font-weight: 400">Use the default value header and the fields Authorization Server Username and Authorization Server Password will be used for creation Basic Authorization HTTP Header</SPAN></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 83px"><SPAN style="font-weight: 400">query</SPAN></TD><BR /> <TD style="width: 317px"><BR /> <BR /> <SPAN style="font-weight: 400">Use value query and the fields Authorization Server Username and Authorization Server Password will be used for client_id and client_secret in the OAuth query string.</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">Note:When you use value query do not use field Resource Owner Client ID. This will cause the client_id twice in the query string.</SPAN></TD><BR /> </TR><BR /> <TR><BR /> <TD style="width: 83px"><SPAN style="font-weight: 400">none</SPAN></TD><BR /> <TD style="width: 317px"><SPAN style="font-weight: 400">Use value none and the fields Authorization Server Username and Authorization Server Password will be ignored and no Basic Authorization HTTP Header will be sent (Additional feature requested to SAP)</SPAN></TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <B>Note</B><SPAN style="font-weight: 400">: When you use a value query do not use the field Resource Owner Client ID. This will cause the client_id twice in the query string.</SPAN><BR /> <BR /> <B>Result</B><SPAN style="font-weight: 400">: Now using the above Parameter name as ‘’</SPAN><B>Oauth20AutorizationServerRequestType</B><SPAN style="font-weight: 400">’ and Parameter value as </SPAN><B>‘none’ </B><SPAN style="font-weight: 400">in the module configuration. Basic Authentication is now ignored from the HTTP header and </SPAN><SPAN style="font-weight: 400">dispatched as part of the HTTP body only as ‘username’ and ‘password’ appropriately to get the access_token.</SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/modrest.jpg" height="242" width="588" /><BR /> <BR /> <STRONG>Important Note</STRONG>: As per SAP note <B>2878625</B><SPAN style="font-weight: 400">&nbsp;which denotes that in order to send </SPAN><SPAN style="font-weight: 400">‘</SPAN><B style="font-size: 1rem">OAuth 2.0 additional query or header parameter;</B><SPAN style="font-weight: 400"> with the request.</SPAN>Patch needs to be applied which matches the respective Support Package version(as per SAP Note <B style="font-size: 1rem">952402</B><SPAN style="font-weight: 400">).It works only with &gt;SAP PO 7.5 SPS 16 Patch 000014. With out patch upgrade below is the error:</SPAN><BR /> <BR /> <EM>Error while obtaining authorization code - response code: 400 response:</EM><BR /> <BR /> {"error_description": "Client authentication failed","error": "invalid_request"}<BR /> <H3 id="toc-hId-78180548"><B>6. OAuth Token Caching:</B></H3><BR /> <SPAN style="font-weight: 400">PI REST receiver channel with configure OAuth 2.0 Authentication and grants type flow allows the generated Token to be reused depending on the value of the '<STRONG>expires_in</STRONG>' parameter.</SPAN><BR /> <BR /> <SPAN style="font-weight: 400">The access token is usable from the moment it is generated until the number of seconds defined by expire_in elapses.</SPAN><BR /> <BR /> 'Expires_in' parameter is described in <A href="https://tools.ietf.org/html/rfc6749#section-4.2.2" target="_blank" rel="nofollow noopener noreferrer">https://tools.ietf.org/html/rfc6749#section-4.2.2</A><BR /> <BR /> <EM>To enable the <STRONG>OAuth 2.0 Token Caching</STRONG>, in the "General" tab, under "OAuth" section, check the new "Use OAuth Token Caching" checkbox*.</EM><BR /> <BR /> * Please, note that this checkbox is enabled by default.<BR /> <BR /> <SPAN style="font-weight: 400">Token caching behavior with respect to server node and parallel call as per SAP implementation and reply from technical team,</SPAN><BR /> <OL><BR /> <LI style="font-weight: 400"><SPAN style="font-weight: 400">Token Caching is implemented completely in-memory without any persistence, thus the fact that on each </SPAN><I><SPAN style="font-weight: 400">server node</SPAN></I><SPAN style="font-weight: 400"> there will be separate cache instance. When the token is expired on the first call will remove it from cache.&nbsp;</SPAN></LI><BR /> <LI style="font-weight: 400"><SPAN style="font-weight: 400">Latest token value is&nbsp; to be stored, thus the expiration time will be the maximum offset in the future.&nbsp; There is no problem update or removal expired token when there is parallel calls to the adapter to use existing tokens or update new token.</SPAN></LI><BR /> </OL><BR /> <SPAN style="font-weight: 400">Access token is extracted and added to </SPAN><B>‘OAuth20TokenCache’ </B><SPAN style="font-weight: 400">with</SPAN><BR /> <BR /> <B>Key</B><SPAN style="font-weight: 400">: authorizationUrl_client_id</SPAN><BR /> <BR /> <B>Value</B><SPAN style="font-weight: 400">: *access_token* expiresIn: 2020-01-31T09:18:09.542 (</SPAN><B>yyyy-MM-ddTHH:mm:ss.SSS</B><SPAN style="font-weight: 400">).</SPAN><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/tokencache.jpg" /><BR /> <BR /> <SPAN style="font-weight: 400">&nbsp;This expiry is based upon the field "expires_in" from the HTTP response json payload. </SPAN><BR /> <BR /> <SPAN style="font-weight: 400">&nbsp; Say 1799 seconds it exactly calls a new token. Token is searched in ‘<STRONG>OAuth20Token</STRONG>’ Cache and uses the access token for the next consecutive and Concurrent calls till its expiry.After the access Token expiry,&nbsp; Authentication API is immediately called and retrieves a fresh access token and update in Cache(OAuth20Token).Access Token expire exactly after 30 minutes and the expiry timestamp format used is '<STRONG>yyyy-MM-ddTHH:mm:ss.SSS'</STRONG>.</SPAN><BR /> <H3 id="toc-hId--118332957"><B>7. Troubleshooting:</B></H3><BR /> 1. Goto PI Message monitoring, check for the message logs.'Authorization' will not be visible in audit logs and secured.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/messagelog.jpg" /><BR /> <BR /> 2. Goto to NWA log viewer for a detailed debug traces.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/02/logvw.jpg" /><BR /> <BR /> 3. <SPAN style="font-weight: 400">Enable XPI inspector log with corresponding REST adapter channel and check the HTTP client log, we can see the HTTP request header, body of adapter configuration and response header and body message Authorization server.</SPAN><BR /> <BR /> <STRONG>Note</STRONG>: Please Ensure SPS or Patch upgrade are applied on Sandbox environment and smoke tested thoroughly and then implemented in other environments.<BR /> <BR /> &nbsp;<BR /> <BR /> Happy Reading!? 2020-02-29T11:57:27+01:00 https://community.sap.com/t5/technology-blogs-by-members/how-to-deploy-external-jms-and-jdbc-drivers-in-sap-po-7-5/ba-p/13429788 How to Deploy External JMS and JDBC drivers in SAP PO 7.5 2020-05-05T16:14:25+02:00 bijayashreebanoj_brahma https://community.sap.com/t5/user/viewprofilepage/user-id/418399 <H2 id="toc-hId-930861214">Introduction: -</H2><BR /> While migrating to SAP PO 7.5, I came across a situation, where I need to deploy external JDBC and JMS drivers to SAP PO system. Generally this activity done by BASIS team. In this blog, I will describe step-by-step process, which can be done by SAP PI/PO developers.<BR /> <BR /> There might be many different cases for creating SDA file. But I thought of two cases as below.<BR /> <OL><BR /> <LI>You have current deployed SDA file and you want to add new external JDBC or JMS drivers.</LI><BR /> <LI>You are going to deploy from scratch or you don't have current deployed SDA .</LI><BR /> </OL><BR /> <H3 id="toc-hId-863430428"><STRONG>Case One:-</STRONG></H3><BR /> You can get current deployed SDA file with help of BASIS team.<BR /> <BR /> Once you got the already deployed SDA file, you need to download <STRONG>SDA Maker Tool</STRONG> (you can download from attachment of sap note 1028961).<BR /> <BR /> Execute SDA tool and follow as below for creating new SDA file.<BR /> <BR /> Netweaver Version --&gt; 7.5 (in my case)<BR /> <BR /> JDBC and JMS drivers --&gt; com.sap.aii.adapter.lib.sda (select from drop-down)<BR /> <BR /> Check Add additional jar files.<BR /> <BR /> Select SDA file (you got from BASIS) .<BR /> <BR /> Select folder, where all additional .jar files need to be added to SDA file.<BR /> <BR /> Select an empty folder, where newly created SDA file will be place.<BR /> <BR /> Click Start.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture4.jpg" /></P><BR /> <BR /> <H4 id="toc-hId-795999642"><STRONG>Initial .SDA file: -</STRONG></H4><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture8-1.jpg" /></P><BR /> <STRONG>After adding new .jar files : -</STRONG><BR /> <BR /> You can see two new .jar files added to provider file and also under lib folder.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture9-1.jpg" /></P><BR /> lib --&gt; This folder contains all the .jar files for drivers<BR /> <BR /> server --&gt; Contain provider.xml file<BR /> <BR /> Once the new SDA file is created, its ready to deploy in SAP PO system ( we will see later in this blog).<BR /> <H3 id="toc-hId-470403418"><STRONG>Case Two:-</STRONG></H3><BR /> <UL><BR /> <LI>If SAP PO system already deployed "<STRONG>SAP-XI3RDPARTY</STRONG>", then you need to identify the correct version, before creating new SDA file.</LI><BR /> <LI>If version of <STRONG>SAP-XI3RDPARTY </STRONG>and <STRONG>"com.sap.aii.adapter.lib"</STRONG> are different, then go with version of <STRONG>"com.sap.aii.adapter.lib"</STRONG>.</LI><BR /> <LI>If "<STRONG>SAP-XI3RDPARTY"</STRONG> is not deployed, then you can refer <STRONG>"SAP_XIAF"</STRONG> version and download corresponding SCA file.</LI><BR /> <LI>In my case, its already deployed and version is SAP 7.5 SP0 Patch 0 (highlights in yellow color).</LI><BR /> </UL><BR /> You can find version in two different ways, through NetWeaver Administrator or NWDS.<BR /> <BR /> Go to&nbsp; Your SAP PO System --&gt; NWA --&gt; Configuration --&gt; Infrastructure --&gt; System Information --&gt; Components Info.<BR /> <BR /> Search for "<STRONG>SAP-XI3RDPARTY</STRONG>" as shown below.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture1-1.jpg" /></P><BR /> Open NWDS and Go to Deployment Prospective.<BR /> <BR /> Update your SAP PO system details in SAP AS Java.<BR /> <BR /> Search for "<STRONG>SAP-XI3RDPARTY</STRONG>" as shown below and click on, to see the version (highlights in yellow color)<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture2-1.jpg" /></P><BR /> &nbsp;<BR /> <BR /> Download <STRONG>SAP-XI3RDPARTY</STRONG> SCA file from below path.<BR /> <BR /> <A href="https://launchpad.support.sap.com/#/softwarecenter/support/index" target="test_blank" rel="noopener noreferrer">https://launchpad.support.sap.com/#/softwarecenter/support/index</A> --&gt; Give your S-user credentials<BR /> <BR /> Search as below and choose your SCA file version and download.<BR /> <BR /> XI 3RD PARTY --&gt; XI 3RD PARTY 7.50<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture10.jpg" /></P><BR /> You will see below folders after unzipping SCA file ( I use 7-Zip ti unzip).<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture11.jpg" /></P><BR /> com.sap.aii.adapter.lib.sda --&gt; JMS or JDBC deployment. (we will considering this in our blog)<BR /> <BR /> com.sap.aii.af.axisproviderlib.sda --&gt; Axis adapter deployment<BR /> <BR /> Finally, create your new SDA file as described above in case one.<BR /> <H3 id="toc-hId-273889913">Deployment of SDA File: -</H3><BR /> I am using NWDS for deployment and you need Administrator Role for this.<BR /> <BR /> Open NWDS --&gt; Go to Deployment perspective --&gt; Import --&gt; Start<BR /> <BR /> Before deployment update your system details in "SAP As Java" in Preferences of NWDS.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture14.jpg" /></P><BR /> &nbsp;<BR /> <BR /> Once deployment finished. you can see in SAP PO NWA.<BR /> <BR /> SAP PO NWA --&gt; Java Class Loader Viewer --&gt; Search for "com.sap.aii.adapter.lib"<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Capture15.jpg" /></P><BR /> &nbsp;<BR /> <BR /> Remark: -<BR /> <OL><BR /> <LI>We can choose different way to deploy newly created SDA file to SAP PO system.</LI><BR /> <LI>If you have already few external drivers and you want to add more, then create new SDA file will all .jar files (exiting and new). If not then new SDA file will overwrite existing one.</LI><BR /> <LI>You might find few different sap notes related to this, but I try to cover all in one.</LI><BR /> <LI>Any suggestion , always welcome.</LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2020-05-05T16:14:25+02:00 https://community.sap.com/t5/technology-blogs-by-members/connect-linkedin-rest-api-to-sap-successfactors-in-sap-po-7-5/ba-p/13541975 Connect LinkedIn REST API to SAP SuccessFactors in SAP PO 7.5 2022-04-01T16:10:53+02:00 Usharsree_7999 https://community.sap.com/t5/user/viewprofilepage/user-id/6570 <STRONG>Introduction:</STRONG><BR /> <BR /> The company uses email authentication of staff to Linked Learning using Azure. There was a requirement to use the User ID (BizX ID) to update the course completion status from linkedin Learning into company LMS. So I had built interface to integrate LinkedIn Learning with LMS , do the necessary field mappings from Linkedin EmailID to UserID and LinkedIn content ID to LMS Item ID and record the Learning history.<BR /> <BR /> In this Blog I will provide the steps to connect LinkedIn REST API to SAP SuccessFactors using SAP PO 7.5.<BR /> <BR /> The following activities were performed:<BR /> <OL><BR /> <LI>Configure the LinkedIn Learning Reporting API (please refer link for details <A href="https://docs.microsoft.com/en-us/linkedin/learning/reporting/reporting-docs/reporting-api#provision-api-keys" target="_blank" rel="nofollow noopener noreferrer">Reporting APIs in LinkedIn Learning - LinkedIn | Microsoft Docs</A>).</LI><BR /> <LI>Use the API string below: <A href="https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&amp;aggregationCriteria.secondary=CONTENT&amp;q=criteria&amp;start=0&amp;count=1&amp;contentSource=EXTERNAL&amp;assetType=COURSE&amp;startedAt=1562699900247&amp;timeOffset.duration=1&amp;timeOffset.unit=DAY" target="_blank" rel="nofollow noopener noreferrer">https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&amp;aggregationCriteria.secondary=CONTENT&amp;q=criteria&amp;start=0&amp;count=1&amp;contentSource=EXTERNAL&amp;assetType=COURSE&amp;startedAt=1562699900247&amp;timeOffset.duration=1&amp;timeOffset.unit=DAY</A>'. For more details on the query parameters please refer link <A href="https://docs.microsoft.com/en-us/linkedin/learning/integrations/learning-activity-reports#learner-course-activity-detail-report" target="_blank" rel="nofollow noopener noreferrer">LinkedIn Learning API - Retrieve Learning Activity Reports - LinkedIn | Microsoft Docs</A></LI><BR /> <LI>Developed the PO interface to integrate LinkedIn application with SAP Success Factors. REST sender adapter has been configured to fetch data form LinkedIn REST API and developed java mapping to implement the business logic..</LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> REST Sender Adapter configuration<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/03/Linkedinpart1-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">REST Sender Adapter Config</P><BR /> &nbsp;<BR /> <BR /> 4.&nbsp; &nbsp; The API provides the output below. I need the data from the 3 columns in yellow<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/03/LInkedinpart2.png" height="29" width="755" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">LinkedIn Output</P><BR /> 5.&nbsp; &nbsp; <SPAN style="font-size: 1rem">The following SFTPlookup mapping&nbsp; were done.</SPAN><BR /> <BR /> Lookup for Email id was done to fetch the user and lookup for contentID was done to fetch the ItemID.<BR /> <BR /> a.&nbsp; Email to UserID: Used the integration center to output the email and userID fields from SuccessFactors. This mapping file is placed in PO.<BR /> <BR /> b. LinkedIn Learning ContentID to LMS ItemID: Ran the ‘Open Content Network’ report in SuccessFactors Learning to fetch the data for mapping. This mapping file is placed in PO server.<BR /> <P style="overflow: hidden;margin-bottom: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/03/Linikedinpart3-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">SFTP Lookup</P><BR /> &nbsp; &nbsp;c.&nbsp; &nbsp;Filtered the LinkedIn Learning to use only the records that had 100% completion and calculate the Completion date using the data ‘lastEngagedAt’ field value under COMPLETIONS. The time is in milliseconds. So the above divide by 86400000 and then add to date 1/1/1970 to get the completion date.<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/2022/03/LInekdinpart4.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Java Mapping</P><BR /> d. Developed mapping to transform the source structure to target structure in PO.<BR /> <BR /> Operation mapping<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/03/Op-2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Operation Mapping</P><BR /> 6. The output for the ‘Learning History’ connector in SuccessFactors to import the data was prepared in the format below and placed in the SuccessFactors SFTP server.<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/2022/03/out.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Final Output</P><BR /> &nbsp;<BR /> <BR /> 7.Receiver SFTP adapter configured to connect PO with SAP SuccessFactors to create the file.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/03/Channel-2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Receiver channel</P><BR /> 8.The learning history connectors was scheduled to import the data.<BR /> <BR /> 9.Please note I have used below tools.<BR /> <BR /> SAP NetWeaver Developer Studio 7.3 SP25 PAT0003<BR /> <BR /> SAP PO 7.5 SPS 22<BR /> <BR /> SAP SuccessFactors Cloud<BR /> <BR /> This blog helps you to configure the interface from LinkedIn API to SAP SuccessFactors and build SFTP lookup, create java mapping for transforming from source structure to target structure.&nbsp; .<BR /> <BR /> &nbsp;<BR /> <BR /> Other References<BR /> <BR /> <A href="https://blogs.sap.com/2015/02/08/how-to-create-java-mapping-in-sap-pi-po/" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/2015/02/08/how-to-create-java-mapping-in-sap-pi-po/</A><BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2022-04-01T16:10:53+02:00 https://community.sap.com/t5/technology-blogs-by-members/message-mapping-as-artifact-and-creating-resource-schemas/ba-p/13554626 Message Mapping as Artifact and Creating Resource Schemas 2023-01-27T10:52:30+01:00 bijayashreebanoj_brahma https://community.sap.com/t5/user/viewprofilepage/user-id/418399 <H2 id="toc-hId-962110824">Introduction:-</H2><BR /> As per new feature in CPI, we can create Message Mapping as Artifact and deploy before using in any integration flow.&nbsp; There are already few blogs , where you can see how to create Message Mapping as Artifact and the limitations.<BR /> <BR /> <A href="https://blogs.sap.com/2021/06/17/sap-cloud-integration-message-mapping-as-artifact/" target="_blank" rel="noopener noreferrer">SAP Cloud Integration – Message Mapping as Artifact | SAP Blogs</A><BR /> <BR /> In this blog, I will cover alternative step-by-step process to create Resource Schemas for IDoc and any other XML structure, which we use to create easily in SAP PI/PO. But if we don't have SAP PI/PO instance and we are using only SAP Cloud Integration, then we can follow below process to Create any XML Schemas and generate IDoc Schemas.<BR /> <H3 id="toc-hId-894680038">Creating XSD using Eclipse:-</H3><BR /> Create JAVA project using Eclipse (JAVA perspective).<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_1.jpg" /></P><BR /> Change Perspective to XML and refer any folder in your local machine to create XML Schema.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_2.jpg" /></P><BR /> Create XML Schema File and give any name 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/2023/01/page_3.jpg" /></P><BR /> You can see below Schema created. Then right click and add 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/page_4.jpg" /></P><BR /> &nbsp;<BR /> <BR /> Click on the newly created element and Set Type to "Complex Type" and&nbsp; "anonymous".<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_5.jpg" /></P><BR /> &nbsp;<BR /> <BR /> Remove Prefix and Target Namespace form the element and add prefix for attributes.<BR /> <BR /> This we are doing as per SAP PI/PO External definition.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_6.jpg" /></P><BR /> Click of the element and add element and change to your required field names with occurrence.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_7.jpg" /></P><BR /> Now you can find the newly created Schema in your local machine (path which you already provided earlier during creating XML Schema file) and you can use this directly in SAP Cloud Integration Message mapping as source or Target Resource.<BR /> <H3 id="toc-hId-698166533">Generating IDoc Schemas:-</H3><BR /> Go to transaction WE60 and provide the IDoc Type , which you want to generate Schema.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_8.jpg" /></P><BR /> Click of Documentation --&gt; XML Schema<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_9.jpg" /></P><BR /> XML Schema created and you can download to local machine.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_10.jpg" /></P><BR /> &nbsp;<BR /> <H3 id="toc-hId-501653028">Using created Schemas in Cloud Integration Message Mapping:-</H3><BR /> Open Cloud Integration and create Message Mapping as Artifact.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_11.jpg" /></P><BR /> &nbsp;<BR /> <BR /> Import both the structure to message mapping.<BR /> <BR /> Save and click Simulate to test the Message Mapping.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_13.jpg" /></P><BR /> &nbsp;<BR /> <BR /> While Importing IDoc Schema, you will get below pop up to change Occurrence.<BR /> <BR /> You can change&nbsp; Occurrence to "unbounded" from all those have like&nbsp; "99999" or "999999".<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/01/page_12.jpg" /></P><BR /> &nbsp;<BR /> <H3 id="toc-hId-305139523">Working with RFC:-</H3><BR /> I don't find any way to create RFC structure, but generally we can create input structure Manually while calling any RFC There is already few blogs which describe&nbsp; in details, we can refer below one.<BR /> <BR /> &nbsp;<BR /> <BR /> <A href="https://blogs.sap.com/2022/11/03/cloud-integration-creating-xml-structure-for-remote-function-call-rfc-that-requires-tables-and-structures/" target="test_blank" rel="noopener noreferrer">https://blogs.sap.com/2022/11/03/cloud-integration-creating-xml-structure-for-remote-function-call-rfc-that-requires-tables-and-structures/</A><BR /> <BR /> <A href="https://blogs.sap.com/2022/11/03/cloud-integration-creating-xml-structure-for-remote-function-call-rfc-that-requires-tables-and-structures/" target="_blank" rel="noopener noreferrer">https://blogs.sap.com/2022/11/03/cloud-integration-creating-xml-structure-for-remote-function-call-rfc-that-requires-tables-and-structures/</A><BR /> <H3 id="toc-hId-108626018">Conclusion:-</H3><BR /> <OL><BR /> <LI>There might be different way of doing this , but I really like this.</LI><BR /> <LI>I hope this will help as we are all moving forward towards SAP Integration Suite.</LI><BR /> <LI>Any suggestion and easy why of doing , always welcome.</LI><BR /> </OL><BR /> <H4 id="toc-hId-41195232"></H4><BR /> &nbsp; 2023-01-27T10:52:30+01:00