Quantcast
Channel: SCN : Blog List - Process Integration (PI) & SOA Middleware
Viewing all 676 articles
Browse latest View live

Thread Mechanism- Automate & Effective way of Using SOAP UI tool for Stress Testing in SAP PI/PO !!!

$
0
0


Scope::


Performing Stress testing for SAP PI/PO Interfaces via SOAP UI using its "Thread "Concept".

 

Entities Involved::

 

SOAP UI Tool

SAP PI/PO

Interface WSDL for Testing

 

Introduction::


Many of us in our projects would have come across or would have used SOAP UI tool for sending request to SAP or Non-SAP system via SAP PI/PO.

 

This document covers the strategy  " How to Automate the Interface or send multiple requests at one time from SOAP UI to PI Box during the Stress testing"  and capturing the logs after that.

 

As we know that stress testing is one of the important phase of SDLC . From Integration perspective it basically involves sending multiple time ( same Interface) or double the number of times the peak volume of data expected in Production environment. Finally capturing the result and analyzing the PI Box performance for that particular Interface.

 

Challenges::


The biggest challenge is when your expected volume is suppose 1000 messages/day . Now you need send 2000 messages from SOAP UI and test the functionality.


First question that came into my mind " my god 2000 time I need to run the request and every time waiting for the response" (as my scenario was the synchronous) or next option is to ask 5 people to Install SOAP UI in their system and divide that 2000 messages in equal parts. All 5 People in parallel will send the request to PI box. That's again a very hectic task to do. what if the number was 10000 or more.


Solution ::


we started finding some other solution how to achieve this task. After lot of research we found that SOAP UI itself has the Concept of "Thread".

In which my single SOAP UI tool itself will act as multiple user tool.


* Say 5 thread=5 Users. you can Increase or decrease as per your need and requirements, also on top of it you can set a *timer*


Single SOAP UI tool itself will act as 5 Users and will send 5 messages in parallel to SOAP UI box. Once the thread ( out of 5) is released you can see another request going. and if you have set the timer you can simply sit and relax. SOAP UI tool will send messages parallely till that time. 



Procedure

 

If we right click on SOAP UI Project

 

1.  We can create "Test Suite".

 

2.  Create new "Test Case" under it.

 

3.  Create new "New Load Test Instance" to it.

 

4.  In these " Load Tests" you are able to add "Test Steps". These steps are basically the messages you want to send in the test , as well as the number of

threads we want to have triggering messages.

 

5.  Lastly we can set the time in second of duration of the test, In which the SOAP UI will continuously trigger message.

 

6. Finally Click on Run

 

 



Capture1.PNG




Tool Setup:: Creating Test Suite, Test Case & Load Test



Capture4.PNG




Capture2.PNG



SAP PI - MONI Status::


Multiple messages coming based on the number of thread and Time setup from  SOAP UI Tool



Moni2.PNG


Finally Capturing the Performance result::



RWB.PNG


Highlighted part is Expected , Average and Peak Processing time.



Integration Matters: Lessons Learned in the (Hybrid) Cloud

$
0
0

It wasn’t too long ago that cloud technology met with skepticism from established enterprises that were used to running their businesses on ERP backbones firmly planted on the ground. The cloud was OK for start-ups – but “real” companies needed the security and familiarity of on-premise.

 

Today, even the most old-school of companies find it hard to resist the call of the cloud. Easy deployment. Subscription model. Lower capital expense. Just sign up and voilà – you’re off to the races with new business capabilities.

 

Not so fast

 

I’m a big advocate of cloud technology – but the fact is, any new cloud solution that stands completely outside of existing business processes and enterprise data is of little value. This is why more companies are spending more time integrating new cloud solutions into environments that are better described as “hybrid” than “cloud-based”. No surprise, then, that leading analysts say, that by 2018, more than 50% of the cost of implementing 90% of new large systems will be spent on integration

 

Recommendations for cloud success


So, if integration is one of the primary challenges in the brave new world of hybrid/cloud environments, how do you proceed? In my work with SAP Services, helping customers maximize the value of their cloud investments, I’ve learned the following key lessons:

 

  • Use your vendor-recommended cloud integration architecture
    Don’t mix tools and don’t go “best-of-breed.” If you’re an SAP shop, use SAP tools for SAP solutions. Experience tells me it’s easier all around, especially in the fast moving enhancement of integration ability with cloud vendors. The invention cycles are months or even weeks.
  • Perform a tools and technology selection analysis based on capability mappings
    Know what your needs are – and then choose an integration approach that meets those needs. Doing it the other way around could cause trouble down the road.
  • Analyze interface and connectivity types, and perform a gap analysis
    Understanding what you have in place is a key part of knowing what your needs are. A gap analysis will reveal what’s missing from your existing capabilities belt. Ask for mapping tables and evaluation matrix. Focus on capabilities which are important for your environment and reflect how they are reflected in the tools.
  • Adopt a rapid-deployment methodology
    Avoid death by planning at all costs. Get going quickly and evaluate where you stand. Then you’ll be able to see what the real problems are – rather than wasting time and resources in the planning phase imagining what they might be.

 

To help you follow through on these recommendations, SAP offers cloud transformation services to help you make the right decisions regarding cloud architecture and integration. As part of these services, we offer specific tools, including:

 

  • Decision trees– To arrive at integration choices based on use cases that you define
  • Capability mapping– To generate capability matrixes that highlight whether or not integration tools under consideration meet your needs
  • Target integration architectures– To makes informed decisions about information flows and how systems connect
  • Cloud integration checklists– To track project details regarding data, applications, access, SLAs, security, and network issues

 

When it comes to cloud, the temptation may be to go it alone. I may be biased, but my recommendation is to get the help you need to ensure success.

 

Want to learn more? I’ll be presenting at SAPPHIRE NOW in Orlando, Florida at location BT604 on Wednesday, May 6, at 12:30 p.m. That’s lunchtime – so I’ll bring the German pretzels! Hope to see you there.

Making a payload preview without sending the message to PI

$
0
0

Quite often I have to deal with reports that list some documents and from where the user can start other business processes by sending a message via PI. The information available in the payload might require some complex calculations. As a user, wouldn't it be interesting to have a message preview before actually sending such a message?

 

The following screenshots shows an example:

 

Here the user can choose a line and decide between sending the message or just making a preview.

ALV_with_msgpreview.png

A preview is just a popup with the XML but no message is actually sent.

ALV_with_popup_msgpreview.png

This has turned out to be quite useful for the key users in production but also for the development team while testing.

 

How to do it? You just need to calculate the message payload and then, instead of calling the proxy, you need to transform the abap structure into an XML and finally display it.  Something like this where <fs_rmb_msg> contains the same structure as when calling the proxy.

code_display_xml.png

 

Method map_payload_from_proxy handles the conversion between ABAP and XML and is generic enough to support any message format. You just need to pass the name of your interface and the method. SAP creates automatically an XSLT for each proxy that converts back and forward between XML<->ABAP so this method just need to find the XSLT and execute it. The following code shows how to do it:

 

class-methods MAP_PAYLOAD_FROM_PROXY

    importing

      !IV_PROXY_CLASS type PRX_R3NAME

      !IV_PROXY_METHOD type PRX_R3NAME

      !IS_PAYLOAD type ANY

    returning

      value(RV_XML_STRING) type STRING

    raising

      CX_XMS_SYSTEM_ERROR

      ZCX_GU_PI_MSG .

 

  METHOD map_payload_from_proxy.

 

    DATA : lr_request TYPE REF TO if_sxmlp_data_st.

    DATA : lr_root TYPE REF TO cx_root.

    DATA : lr_payload TYPE REF TO if_ws_payload.

    DATA : lr_payload_data TYPE REF TO data.

 

    DATA: lt_bindings TYPE abap_trans_resbind_tab,

          ls_binding  TYPE abap_trans_resbind.

 

* ---------- Check mandatory parameters -----------------------------------------------------------

    mandatory_param_genericiv_proxy_class  'IV_PROXY_CLASS'.

    mandatory_param_genericiv_proxy_method'IV_PROXY_METHOD'.

    mandatory_param_genericis_payload'IS_PAYLOAD'.

 

    TRY .

 

        cl_proxy_st_part=>create_for_clas_method( EXPORTING class         = iv_proxy_class

                                                                                                   method        = iv_proxy_method

                                              IMPORTING request_part = lr_request ).

 

        CLEAR ls_binding.

             ls_binding-name  = 'OUTPUT'.

        GET REFERENCE OF is_payload INTO lr_payload_data.

             ls_binding-value = lr_payload_data.

        APPEND ls_binding TO lt_bindings.

 

             lr_payload = serialize( part     = lr_request

                                                        bindings = lt_bindings ).

 

             rv_xml_string = lr_payload->get_xml_text( ).

 

      CATCH cx_root INTO lr_root.

                  RAISE EXCEPTION TYPE zcx_gu_pi_msg

                    EXPORTING

                      textid   = zcx_gu_pi_msg=>conversion_error

                      previous = lr_root.

    ENDTRY.

ENDMETHOD.


where method serialize is a local copy of method CL_WS_PAYLOAD_HANDLER=>serialize.



NoSQL Adapter – The next generation adapter for the next generation database.

$
0
0

Overview:

A NoSQL (often interpreted as “Not only SQL”) database is an unconventional database system which rely on data structure different from those used in the relational databases. NoSQL databases are increasingly used in big data and real time web applications. Advantco NoSQL adapter for SAP PI/PO enable you to read and write data from the unconventional Database with information in the SAP System.


The current version of the Advantco NoSQL adapter supports MongoDB. MongoDB is one of the most commonly used NoSQL Database. SAP has earlier announced partnership with MongoDB at SAPPHIRE. The next version of SAP Lumira would have connectivity with MongoDB. The adapter is based on the Adapter Framework and is executed by the SAP J2EE Adapter Engine.

Advantco NoSQL Adapter provides easy access to update data into the Database with minimal custom development for handling query.

 

Key Features

  • Full integration with SAP PI Adapter Framework, Alert Framework and Monitoring.
  • Supports Read/Create/Update/Delete operations to NoSQL database.
  • Full Query Support in case of Sender Adapter consisting of JSON like Condition Statement.
  • Supports both Synchronous and Asynchronous mode of communication.
  • JDBC Receiver like Data Structure to be used for simple implementation.
  • Support for XML / JSON to connect to MongoDB System.
  • Workbench for Schema Generation.
  • Available for SAP PI 7.1, 7.1 EHP 1, 7.3, 7.3 EHP 1, 7.4.

 

Advantages:

  • Significantly reduces implementation effort for integration with MongoDB.
  • Easy configuration and setup fully integrated with SAP PI/PO without need for external tools.
  • Complete Error Handling Management for Data and Communication Error.

 

Demonstration:

Communication Channel Configuration

1.png

Example NoSQL Database:

2.png

Output XML:

3.png


Summary:

NoSQL is the future of database supporting large data volume and is surely a need for various business to use. The Advantco NoSQL adapter would help you to connect your SAP system to the NoSQL Database quite easily.


References:

For the Advantco Rest Adapter website, please refer: https://www.advantco.com/product/NOSQL

SAP HANA Cloud Integration (HCI) Workshop in Philadelphia, US (11th and 12th June 2015)

$
0
0

Hello All,


We are organizing a RKT workshop for SAP HANA Cloud Integration (HCI) in Philadelphia,US on 11+12th June, 2015. Please find the details below:

 

Target Audience: SAP Internal & Partners (Integration Consultants, Solution Architects, Pre-sales Experts)

 

 

Agenda and DurationLocationCourse Cost & Registration Link

 

SAP HANA Cloud Integration Overview and Solution Details  (2 days)

ExitCertified Philadelphia, 1150 First Avenue, Suite 200, King of Prussia, PA 19406 (U.S.A.)

           

HANA Cloud Integration (Process integration capabilities) - EKT


Note: Register via above link and choose right location. To apply for a RKT workshop seat you must have an S-User ID for SAP Service Marketplace. If you don't have a SAP Service Marketplace user ID (S-User) or a password, please apply for one first: S-user request form


Agenda:

 

  • Welcome and Introductions
  • SAP HANA Cloud Integration (HCI) Overview
  • HCI licensing, usecases & Integration with different Cloud solutions
  • HCI Solution Details, Security & Tooling
  • C4C (Cloud for Customers) integration demo
  • HCI Web UI, Globalization and SuccessFactors integration exercises
  • Exercises based on different components of HCI

 

Important Note: Since capacity is limited, an enrollment request must receive confirmation before it can be considered as a final booking!.


For any queries, please send an email to Piyush Gakhar , Homiar Kalwachwala  and mention the subject line as "HCI US Workshop".

 

Note: There can be some deviations in Agenda and we are trying to include more content/demos/exercises to it.

 

Regards,

Piyush

My session pick for SAPPHIRE NOW & ASUG conference

$
0
0

I have been looking at the session catalog for Sapphire Now and here is a list of the sessions that I believe are interesting, and that I’ll try to attend.

There aren't a lot of PI/PO sessions. There is just the BT117 session about B2B capabilities. I had hoped for a Roadmap session, but I could not find any. I guess I have been hearing about the Roadmap during user group meetings, but not everyone had the chance.

 

 

The HCI cloud integration platform is interesting, so I’ll try to figure out what is going on here. It will be interesting to see how customers and partners adopt HCI. There I see PT20314, PT20318, and the Influence Session IF2369.

 

 

The last part of my program is the API management. Enterprises will be exposing data through the cloud for others to access. I would love to see the use cases for what has been exposed, and what results they have received. I think that lots of customers will be looking for a solution on how they can expose APIs of their data, so they can engage more with the customer. It will probably be some project where you will have to figure out what works and how to do it optimally.

 

 

There is also a lot of cloud stuff that could be interesting, S4/HANA is also something that I need to catch up on.

 

I have the following agenda, but I may not make it to all of them since SAP Mentor meetings and other stuff will be going on as well. If you are interested, please ping me or catch me when I’m walking around. I’m easy to recognize - I will be wearing the SAP Mentor Shirt number 79.

 

Is there any session that is of interest for an integration professional?

 

Tuesday

PT20314Apply the Best Strategies to Cloud IntegrationMicroforum Discussion02:00 p.m. - 02:45 p.m.Platform and Technology Microforum PT406
PT20318Integrate On-Premise and Cloud Solutions to Improve Customer ExperienceDemo Theater03:00 p.m. - 03:20 p.m.Platform and Technology Demo Theater PT410

 

Wednesday

PT20267Go Digital with Application Programming InterfacesDemo Theater11:30 a.m. - 11:50 a.m.Platform and Technology Demo Theater PT401
BT604Effective Integration Between Public-Cloud and On-Premise Solutions from SAPLecture Presentation12:30 p.m. - 01:30 p.m.S331B
BN20413Develop a Best-in-Class, On-Premise-to-Cloud Integration ProcessMicroforum Discussion01:00 p.m. - 01:45 p.m.Business Networks Microforum BN305
PT20279Optimize Your Interface Management StrategiesMicroforum Discussion05:00 p.m. - 05:45 p.m.Platform and Technology Microforum PT416

 

Thursday

BT177B2B Capabilities of SAP Process Integration and SAP Process OrchestrationLecture Presentation08:00 a.m. - 09:00 a.m.S331C
PT20267Go Digital with Application Programming InterfacesDemo Theater09:00 a.m. - 09:20 a.m.Platform and Technology Demo Theater PT417
IF2369Influence: Discuss the Key Scenarios and Uses Cases for SAP HANA Cloud Integration TechnologyRound Table Discussion02:00 p.m. - 03:00 p.m.ASUG Theater B

 

 

Cross posted to PICourse.com blog

Learn in a Minute What SAP HANA Cloud Integration Is and How SAP Documentation Helps You Get Started

$
0
0

SAP HANA Cloud Integration (SAP HCI) is a cloud-based integration platform that allows you to integrate processes running across heterogeneous landscapes that contain cloud-based applications, on premise applications, or a mixture of both kinds of applications.

 

Cloud-based integration platform means: The data that is exchanged between the involved applications during the operation of an integration scenario is processed on a cluster of different virtual machines hosted in the SAP cloud. Hereby, it is made sure that data and processes “belonging to” different customers are strictly separated from each other. This is achieved by assigning each customer a separate “part” of the integration platform (in terms of data storage and CPU) – which is also referred to as tenant (see Tenant Isolation).

 

The integration software running on this virtual cluster is updated on a monthly basis, and you as the customer do not have to deal with installation or upgrade.

 

What you have to do is: First of all, subscribe for a tenant and connect your application to it. Set up a secure connection to make sure that data transferred between your application and SAP HCI is protected at most. Secondly, specify your integration scenario and make sure that the corresponding information (about how your data is to be processed; also referred to as integration content) becomes accessible for the SAP HCI runtime components assigned to you. Thirdly, operate your integration scenario and monitor the message exchange and “your part” of the runtime cluster.

 

The figure illustrates the general landscape and the three main phases of integration projects that result from the above mentioned things.

 

Learn_in_1_Minute_HCI.png

To get an overview of the general technical landscape and the things you have to arrange for in order to get an integration scenario running, check out this topic: Elements of a Cloud-Based Integration Scenario.

 

To learn more, check out the SAP HCI documentation which is tailored along the main phases of integration projects.

 

You can find the documentation at: https://cloudintegration.hana.ondemand.com/PI/help.

SAPPHIRENOW from a Integration perspective

$
0
0

The Sapphire Now + ASUG annual SAP conference was held last week. I want to discuss the conference from an integration perspective, since this is the aspect I am most interested in the integration part.

 

Obviously, there were many announcements regarding HANA, which was presented as one of the big alternatives. The focus was mainly on cloud technologies – their nature and their functionalities were explained.

 

http://d30n0m8j8xjig1.cloudfront.net/wp-content/uploads/2015/05/Billede-300x225.jpegAs for integration, I think that the most important topic was API management, with a focus on whitelabelling and Apigee’s solution, which is an API platform. Basically, it is a portal that allows developers to access what is going on. Developers are able to use the tools provided. They can expose APIs, so that anyone can easily develop applications on top of these; furthermore, the API management platform allows you to run this in a controlled manner. It also makes sure that all the security controls are allowed, so no one can make denial of service (DoS) attacks on your internal services. It can run on the HANA Cloud platform, if you are using HANA Cloud Integration (HCI). If your system is cloud-based, there will be some advantages. It is not limiting the load on your Internet connection, therefore a DoS attack wouldn’t work. It would render such an attack useless. Apigee is useful for mobile connectivity, and for getting partners aboard your system.

 

An important discussion was led on the topic of HANA Cloud Integration (HCI). SAP sees a great opportunity in HCI. For a lot of customers who aren’t already using SAP HANA Cloud Integration or PI (Process Integration), HCI will come across as a great tool. It seems that more B2B functions will be built into HCI in the near future. The system will be open for partners- they will be able to develop adapters and integrations. The great thing is that you can browse all the different existing components on either the SAP HANA Integration store (I’m not sure how it will work). For example, if a mapping made by someone catches your eye, you can just download it and continue developing. You can download a mapping that is 70%-80% complete, and add your ideas to it. This will give developers a lot of flexibility, making it easy to get started, because the main architecture is provided (otherwise, it would take a lot of time to create).

 

Regarding Process Orchestration (PO), I found out that SAP now abbreviates this as PRO, not PO, as most people call it. This could cause some confusion because when searching on the Internet, people use keyword such as XI (Exchange Infrastructure), PI or PO – and that’s also what they get results for. The new abbreviation will probably just confuse people (I’m not sure whether people are familiar with it). Some enhancements were presented, but they didn’t announce many new things. Most of it has already been in the roadmaps, so I have seen the highlights before. Process Orchestration wasn’t a big focus area this year, but the numbers spoke for themselves, as SAP PRO now has more than 8,300 customers, and the 2nd biggest ESB (enterprise service bus) after BizTalk. No roadmap has been laid out – but roadmaps have been presented in various user group meetings already.

 

The AIF (Application Interface Framework) has also been discussed. A few AIF sessions were held, but I unfortunately missed these. AIF seems to be an interesting and useful tool.

 

SAP Gateway for REST/ODATA enablement of the SAP backend wasn’t left out, either. Many people wanted to know whether this product will continue to be of interest, since it can be replaced. When you have the REST adapter on the PI system, you do not need Gateway.

 

Since the Internet of Things (IoT) seems to be a big area, it will have a great impact on integration architecture. If there are a billion sensors that need to transmit data to a system, some integration needs to happen. I am uncertain as to how they will proceed with this. There are some tools that can help with this and it will be interesting to see how this integration will be done; the impact on the integration landscape as a whole is also something I am eager to see.

 

What are your thoughts on the Sapphire Now + ASUG Conference? Did you ever attend this event? Do you consider doing so in the future?

Cross posted to my SAP PI Information site


Develop and send your first outbound ABAP Proxy to SAP PI - for dummies part 1 of 3

$
0
0

Hi dear experts,

 

Now i share the first part of a whole interface from ECC (ABAP Proxy) to SAP PI (Java Mapping) to other system (maybe data base), all for dummies...

  • Idea: i was in a situation where i needed to implement an abap proxy and im not an abap programmer, i just have a great experience programming in other languages; so looking for information in the web i didn't find step by step information of how to implement it...
  • Objective: i share an step by step where you will find the logic in how implement it in "this first post of 3", in order to let you add your great experience as abap programmer, or if you dont have a lot experience you can follow it, too.
  • Apologize: if you see errors in my logic, sorry but im not an expert in abap(but to implement this in 2 days i learned a lot about abap LOL), so you can suggest or tune this proposal, from one dummy for dummies experience shared... Thank you!!...

STEPS:

1.- SAP PI SIDE: implement your data type in your enterprise service repository(netweaver/java side); with the following structure and then your service interface outbound, as you know how to do it:

 

 

2.- ECC side - SE11 Transaction: implement the next Ztable

 

3.- ECC side - SPROXY Transaction: Look for your methods / objects names that you will need to adapt the abap code, where i added the numbers that you see in the images, so just change it or if is the same, just use it as same:

 

 

 

 

4.- ECC side - SE38 to program your proxy call: NOW COPY - PASTE and ADAPT

 

*&---------------------------------------------------------------------*
*& Report  ZPROXYPI
*&BY: AZAEL NAVARRO JIMENEZ
*&DATE: 13/05/2015
*&OBJECTIVE: SHARE THE MAIN AND COMPLETE LOGIC TO SEND INFO USING ABAP PROXY
*&----------IN AN EASY WAY, WHERE YOU USE IT TO IMPLEMENT YOUR FIRS ABAP PROXY
*&----------BUT WITHOUT BEEN AND EXPERT IN ABAP, BEACAUSE IS A CODE FOR DUMMIES
*&----------WRITTEN BY A DUMMY IN ABAP AND WITHOUT ASSUMING THAT YOU ARE
*&----------AND EXPERT IN ABAP... GOOD LUCK!
*&---------------------------------------------------------------------*
*&A. PROGRAM TO VISUALIZE INFORMATION AND TO SEND ROWS TO SAP WITH ABAP PROXY
*&---------------------------------------------------------------------*

REPORT ZPROXYPI.
*================1.- Our main table that must be created================*
TABLES: ZTABLATESTPI.
*================2.- Variables to control the information from the Selection Screen================*
data WA_ZTABLATESTPI like ZTABLATESTPI.
data VAR_PIID like ZTABLATESTPI.


*&---------------------------------------------------------------------*
*&
*&B. INITIAL WINDOW TO FILTER THE ROW THAT IS GOING TO BE SENT:
*&---------------------------------------------------------------------*
*================3.- Our Graphical selection screen================*
parameters PA_PIID like ZTABLATESTPI-ID_EMPLOYEE.
*================4.- Call the first subroutin that is JUST INFORMATIVE SECTION and you can eliminate================*
PERFORM SELECTINFO.

*&---------------------------------------------------------------------*
*& C. CHOOSE INFORMATION NEEDED FROM TABLE AND CALL PROXY:
*& This form is not neccesary, is just to let you reference the ID
*& requested in graphical window in order to filter the information in
*& your query using a variable in a graphic way you can eliminate it
*& or you can use sofisticated code
*&---------------------------------------------------------------------*
FORM SELECTINFO.
   " PA_PIID = 1.
*================5.- Get the information from the table just to visualize it================*
   VAR_PIID = PA_PIID.
   SELECT CLIENT ID_EMPLOYEE NOMBRE EDAD TELEFONO FROM ZTABLATESTPI
     INTO CORRESPONDING FIELDS OF WA_ZTABLATESTPI
     WHERE ID_EMPLOYEE = VAR_PIID.
   ENDSELECT.

*================6.- We can see the information that is in the table and should be sent================*
   write:/ WA_ZTABLATESTPI-ID_EMPLOYEE color col_key,
   WA_ZTABLATESTPI-NOMBRE,
   WA_ZTABLATESTPI-EDAD,
   WA_ZTABLATESTPI-TELEFONO.
*================7.- THE IMPORTANT SUBROUTIN: we call the code that is going to get the information and the will be sent================*
   PERFORM SENT_INFO_TO_PROXY.
ENDFORM.
*&---------------------------------------------------------------------*
*& D. EXECUTE ABAP PROXY AND SEND INFORMATION TO SAP PI:
*& This is the important code where you can just add your new table name,
*& your new structure names and the is going to get the information from your table
*& and after that is going to deliver the information to SAP PI executing the
*& ABAP Proxy Method
*&---------------------------------------------------------------------*
FORM SENT_INFO_TO_PROXY.
*================8.- Just to Control the error status================*
   DATA: lv_error(1) TYPE c.

*================9.- SAP PI Proxy metadata reference: REFER TO IMAGES IN THE POST================*
   DATA :
     IT_ZTEST_PROXY_OUT LIKE TABLE OF ZTABLATESTPI WITH HEADER LINE,"1.- CHANGE THE NAME OF YOUR TABLE: ZTABLATESTPI
     IT_OUTPUT TYPE ZMT_TEST, "2.- CHANGE THE NAME OF YOUR MESSAGE TYPE: ZMT_TEST
     IT_PROXY_RESULT TYPE ZDT_TEST_ROW, "3.- CHANGE THE NAME OF YOUR DATATYPE: ZDT_TEST_ROW
     T_PROXY_RESULT TYPE ZDT_TEST_ROW_TAB. "4.- CHANGE THE NAME OF YOUR METADATA FROM MESSAGE TYPE VIEW: ZDT_TEST_ROW_TAB

   DATA: CL_PROXY_CLIENT  TYPE REF TO ZCO_SI_OA_TEST. "5-. CHANGE THE NAME OF YOUR ABAP CLASS: ZCO_SI_OA_TEST

*================10.- Get the information from your table================*
   SELECT * FROM ZTABLATESTPI INTO CORRESPONDING FIELDS OF TABLE  IT_ZTEST_PROXY_OUT
   WHERE ID_EMPLOYEE = PA_PIID.

*================11.- Upload the information from the table to the internal table in abap side================*
   LOOP AT IT_ZTEST_PROXY_OUT.
     IT_PROXY_RESULT-ITEM1 = IT_ZTEST_PROXY_OUT-NOMBRE.
     IT_PROXY_RESULT-ITEM2 = IT_ZTEST_PROXY_OUT-EDAD.

     APPEND IT_PROXY_RESULT TO T_PROXY_RESULT.

   ENDLOOP.

*================12.- If there is information will be sent to Proxy================*
   IF T_PROXY_RESULT[] IS INITIAL.
     WRITE 'There is no information'.
   ELSE.
     IT_OUTPUT-MT_TEST-ROW = T_PROXY_RESULT. "6.- CHANGE THE PATH OF YOUR NODES IN MESSAGE TYPE
     TRY.
         CREATE OBJECT CL_PROXY_CLIENT.
         CALL METHOD CL_PROXY_CLIENT->SI_OA_TEST "7.- CHANGE THE NAME OF YOUR SERVICE INTERFACE: SI_OA_TEST
           EXPORTING
             OUTPUT = IT_OUTPUT.
         COMMIT WORK.
       CATCH cx_ai_system_fault .
         MESSAGE 'System error' TYPE 'I'.
       CATCH cx_ai_application_fault.
         MESSAGE 'Application error' TYPE 'I'.
     ENDTRY.
   ENDIF.
COMMIT WORK.

*================STATUS OF THE INFORMATION DELIVERED OR NOT DELIVERED================*
   IF sy-subrc IS INITIAL.
     WRITE: 'Successful'.
   ELSE.
     WRITE: 'NO Successful'.
   ENDIF.
   IF lv_error IS INITIAL.
     MESSAGE i088(ms) WITH 'Information sent succesfully!'.
   ENDIF.
ENDFORM.


4.1. Execute your code and test it:


 

 

5.- ECC side - SXI_MONITOR transaction to monitor your results:

 

 

Thanks for your time, i hope you enjoy it!...

 

References: obviously: 1) i reused source code from other (a lot posts), 2) i asked few things to other abap consultants, but not was copied, it was a reutilization of logics, code, etc... to achieve this result.. So i say thanks to all those ways (people and posts)...

Using RabbitMQ/AMQP for high volume integration with Hybris Commerce Solution.

$
0
0

Introduction

 

A customer has very specific requirement for Hybris integration with SAP ECC thru their SAP PI system. The process should be able to handle thousands of orders per second from Hybris at peek business periods.

This blog describes an architecture with RabbitMQ as an intermediate buffer system to absorb peek transaction volume and the Advantco AMQP adapter for SAP PI/PO integration.

 

Hybris integration options.


Hybris provides these three main options for integration with external systems:

  • SOAP/RESTful web services
  • Java Message Service (JMS)
  • Spring Integration

 

From SAP PI perspective, the SOAP/RESTful web services and the JMS options are the most obvious options as these are standard support by SAP PI but each of these options have their limitation.

 

SOAP/RESTful web services option: Hybris provides a RESTful API for exporting business data in JSON format. Our customer used the Advantco REST adapter to expose a RESTful service on the SAP PI system to receive incoming requests from Hybris. Although they noticed significant performance improvements comparing to the classic SOAP/XML services, their SAP PI system was not able to handle the thousands of requests per second due to the exceptional high number of threads that must be available to process these requests. This exercise did provided a conclusion that Hybris REST/JSON is the correct way to export data as it is very fast.

 

Java Message Service (JMS) option: SAP PI does provide a standard JMS adapter but it does not have a native JSON/XML converter.

 

The chosen architecture option.

 

To prevent flooding their SAP PI with RESTful requests, the customer decides for a buffer system to absorb the incoming requests and have their SAP PI system pulls the data from the buffer system. RabbitMQ was the ideal solution as it is a very lightweight broker which can handle huge volume of data and supports native JSON format.

 

Hybris integration.jpg

 

To pull data from RabbitMQ, the customer uses the Advantco AMQP adapter which is fully compatible with RabbitMQ and has the support for JSON/XML conversion. The number of application threads on the SAP PI system determines how much fast data can be fetch from RabbitMQ. This scenario is different from the RESTful scenario in that the SAP PI system has a control on how much data it want to process at anytime, independent of the data volume coming from Hybris.

 

This architecture setup satisfy the requirements to handle thousands of orders from Hybris while preventing their SAP PI to crash because of the sheer amounts of data.

 

Reference:

RabbitMQ : http://www.rabbitmq.com/

Hybris : https://www.hybris.com/en/

AMQP adapter : https://www.advantco.com/product/adapter/amqp

AMQP : https://www.amqp.org/

Microsoft Dynamics CRM integration with SAP PI/PO

$
0
0

Overview

 

Microsoft Dynamics CRM is a customer relationship management (CRM) business solution that enables companies to market smarter, sell effectively and productively, and care everywhere. Microsoft Dynamics CRM is available as a cloud offering or an on-premises installation.

Dynamics CRM is a server-client web application based on the .NET framework and runs on the IIS web application server. This poses some challenges with integrating with SAP PI/PO.

 

Advantco Dynamics CRM adapter.

 

The Advantco Dynamics CRM adapter for SAP PI/PO is a new adapter with the specific purpose to make integration with Microsoft Dynamics CRM as easy as possible. Below are some of the main features that are covered by this adapter.

 

  • Authentication: The adapter takes care of authentication and will manage the security token.
  • Schema generation for different entity operations.
  • Schema generation for Queries.
  • Support paging cookie with QueryExpression

 

1. Authentication.

 

The adapter will handle all the steps of the authentication process and manages the security token. If token is expired, the adapter will automatically request for a new token.

channel.jpg

 

2. Schema generation.

 

The Advantco Dynamics CRM adapter provides a Workbench to generation operation specific schemas.

Workbench - schema.jpg

 

3. Queries result schemas.

 

To handle the queries results, the Advantco Dynamics CRM adapter provides the feature to generate a schema based on a Query example. This reduces greatly the effort of development as no manual XSD generation are required.

Workbench - query.jpg

 

4. Support paging cookie for handling of large datasets.

 

 

The Advantco Dynamics CRM adapter will pass the paging cookie to retrieve the next set of records.

cookies.jpg

 

Conclusions.

 

The Advantco Dynamics CRM adapter greatly reduces complexities and efforts to integrate your SAP PI/PO with Microsoft Dynamics CRM. The adapter works for both Microsoft Dynamics CRM in the cloud or on-premises.

Starting with Hana Cloud Integration? Keep this in mind!

$
0
0

A couple of months ago I started to work with Hana Cloud Integration. I followed the SAP e-learning OHAC10 (Hana Cloud Integration), attended a HCI developers day and viewed some webinars. When trying to learn all the possibilities of HCI I encountered some ‘problems’. With this first blog I hope I can  help you get a fresh start with HCI.

 

  • Check out the SAP ‘Starting with HCI’ page. It contains a lot of useful information about the technique, blogs, webinars and other events.

 

  • You can enter a trial program, to see what HCI can do. Check the details here!

 

  • Download Eclipse. This program will help you to develop adapters and integration Flows. To avoid weird errors, make sure you download the Kepler version. This is the version SAP supports.
    Eclipse is used for more than HCI only, therefor you need to download some additional plug-ins. See this page for more information about installing plug-ins in Eclipse.

 

  • So you got your (trial) HCI account, and you got the Eclipse with all the plug-ins, what’s next? You need to set up your Eclipse with your HCI tenant.

Starting with HCI - Tenant in Eclipse.png

Enter your credentials in Eclipse. You should either received an email containing the URL, or use the trial environment.

 

  • Your Eclipse is now linked to your HCI (trial) account. You created a simple iFlow and try to deploy this: error! Before you can start using your HCI tenant you need to create a keystore. (In the trial version, this is already performed by SAP)

        In the PDF 'Create a keystore.pdf', which you can download here, the creating of a new keystore is explained.

 

 

 

 

  • Now that your iFlow can be deployed on your HCI tenant, you want create an iFlow. In my next blog I will show how to call a web service, transform some data and send it via email. If you want to call a web service, or SuccessFactors for example, you need to add certificates to your keystore

        In the ‘Creating a JAVA Keystore.pdf’ there’s this chapter called ‘Importing Signed certification into keystore’. But how do you get your          

        SuccessFactors certificate?

 

Starting with HCI - Certificate export.png
Use Firefox or Chrome and browse to your SuccessFactors login page. Click on the lock, and go to the ‘Connection’ tab. Choose ‘Certificate information’.

 

 

 

 

Starting with HCI - Certificate export2.png

Choose Details and go for ‘Copy to file’.

 


Starting with HCI - Certificate export3.png

Take the Base64-encoded X.509 (*.CER) and save it.

 

 

And there you got your SuccessFactors certificate which you can import in your keystore. This works the same for other certificates.

 

 

  • So now you are able to create your iFlow, reach to different applications and deploy it to your tenant. But the iFlow is not working and you want to trace the header and the body of your message. For this, you have to make a request to SAP and ask for tracing rights.
    You create a ticket here, and put your request in category LOD-HCI. Make sure you provide all the needed information (like tenant name and S-user).

        After you have been granted the rights, you need to enable tracing in your iFlow.

 

 

 

Starting with HCI - Tracing.png

In the properties of your iFlow, go to Trace Configurations and choose the trace level you want.

 

 

Starting with HCI - Tracing2.png

In the message monitoring (double click on your tenant, in the node explorer, to get here) select the iFlow you deployed after setting the trace settings and choose for ‘View Trace’. Your iFlow will now be decorated with the selected trace level.

 

 

 

I hope that after reading this blog you are able to set up your HCI tenant with your Eclipse. If you have any questions please do not hesitate to contact me, or leave a comment below.

 

Bob van Rooij

Live Expert Session: SAP HANA Cloud Integration

$
0
0

SAP HCI Product Management is organizing 2 hour live expert session on SAP HANA Cloud Integration. During this Live Expert session, you will gain insights into solution details, license editions, integration use cases with different cloud applications and roadmap of SAP HANA Cloud Integration.

 

 

Registration links:

 

  • Tuesday, 30/06/2015; 10:30-12:30 CET                                      Registration Link
  • Tuesday, 30/06/2015; 17:00-19:00 CET/ 11:00-13:00 EDT           Registration Link

         

 

 

Target audience: Partners and Customers (Enterprise Architects, Solution Architects, Pre-sales, Consultants)

 

Additional Information


1. Registration will be closed in two days prior to the events, and it is mandatory to obtain the conference call details.

2. Cancellation Rules:

- You can cancel the booking prior to the deadline.

- After the deadline, you can cancel your booking by contacting SAP Virtual Event Services.

 

Reards,

Piyush

Michal’s Tips: Persisting ABAP proxy messages tested from SPROXY transaction

$
0
0

There are many situations when in order to test an inbound ABAP proxy message we want to do it from the SPROXY transaction without building a complete scenario in SAP PO (attention new name - SAP PRO) nor we want to use any other tool for testing the message (SOAP UI, web Service Navigator, etc.). There main issue however is that the inbound proxy message tested from transaction SPROXY will not be visible in ABAP proxy monitoring transaction (SXMB_MONI) neither will it be shown in Error and Conflict Handler mointoring transaction (ECH_MONI_SEL) in case of any error. Fortunately as of Netweaver 7.31 on which the backend system can be installed we have a new possibility of testing those kinf of messages directly from transaction SPROXY. The new feature is called - Config less shortcut and you will see it once you run a test of an inbound proxy message from transaction SPROXY as shown in the Figure below.

 

sproxy_krawczyk_1.png

 

 

 

How does it work?

 

Basically it simplifies the local use of the provider service so it’s no longer required to create an endpoint nor a logical port for local communication as a generic endpoint for all provider services is generated during the intial customizing (SRT_ADMIN) of WS runtime.

 

 

What does it do?

 

1. With this new feature you will be able to monitor test cases initiated from SPROXY as shown in the Figure below:

 

 

sproxy_krawczyk_2.png

 

 

2. In case of an error (we assume that the inbound proxy is correctly developed so it’s utilising ECH/FEH frameworks) you will be able to see the errors directly from the transaction ECH_MONI_SEL.

 

 

sproxy_krawczyk_3.png

 

 

 

3. It also simplifes a lot the use of calling local WS runtime directly from ABAP - please have a look at the article’s reference for examples

 

4. Other use cases: This new feature can also be used with other frameworks which are utilising proxy messages tested from SPROXY like for example Application and Interface Framework (AIF) testing of ABAP proxy messages.

 

 

Reference:


Configuration-less Shortcut and Generic Consumer Proxy - ABAP Connectivity - SCN Wiki

 

SOA monitoring - my book on monitoring proxy messages

POV: SAP Integration with Hybris – PI and Datahub

$
0
0

SAP Integration with Hybris primarily involves - asynchronous master data replication from SAP to Hybris, asynchronous order replication* from Hybris into SAP and the downstream flow of various order statuses from SAP to Hybris.

 

While Datahub can directly communicate with SAP ECC over HTTP/IDOC-XML for master data replication into Hybris, it is more important to see how the existing integration architecture is established via an ESB like PI and how Datahub with its data integration capabilities fits into the overall integration landscape. It so happens that master data replication from ECC into downstream applications, in majority of cases, is already happening via PI. Instead of creating multiple master data distribution models for various receivers, master data is sent out to PI from which it is routed to multiple downstream applications taking care of target transformations and target technical protocol conversions. In this case, Hybris or E commerce Platform can be added as one new receiver in existing master data IFLOWs with relevant routing conditions.

 

2015-06-05_0-10-21.png

 

The same approach holds good for various order statuses from SAP to Hybris. Similar to master data, order confirmations, invoices etc. are happening via PI and Hybris or E commerce Platform can be added as one new receiver in existing IFLOWs with relevant routing conditions.

The reverse flow is applicable for asynchronous order replication from Hybris into ECC:

 

2015-06-05_0-10-48.png

 

The apparent advantage with this is that we are not building point to point interfaces with Hybris but routed through enterprise-wide ESB and the new Hybris-SAP Integration fits right into existing integration or enterprise architecture and as per the established interface design patterns.

 

* (in case of Asynchronous Order Management - AOM Scenario)


How to use Integration Directory API

Execute your SAP PI scenario from ABAP Proxy to PI (multimapping) to 2 receiver systems - for dummies part 3 of 3

$
0
0

Dear experts,

 

After implement the last 2 blogs (in few days i will post the "design part" post, that includes all the logic about this 3 "dummies" posts):

Develop and send your first outbound ABAP Proxy to SAP PI - for dummies part 1 of 3

Multimapping in SAP PI (Graphical / Java: Simple, DOM, SAX / XSLT, ABAP) - for dummies part 2 of 3

 

Now you will be able to execute or test (in execution mode), from your ECC (1 sender) to SAP PI (Multimapping) and in this case, we will split the receiver information (to 2 system receivers):

 

1.- Execute your ABAP Proxy from ECC, and insert your rows:

 

2.- Then, return to the first form and execute the "send option", to deliver the row added:

 

Add the Id of your row (dont repeat your ids)

 

3.- Monitor your ECC using transaction: SXI_MONITOR and deliver messages if are stucked in the queue:

 

4.- Monitor PI in transaction: SXI_MONITOR

 

5.- Monitor PI and confirm if the Communication channels of the receiver are working correctly, from the Runtime workbench / Communication Channel Monitoring :

http://pisystem:port/mdt/channelmonitorservlet

 

 

6.- Confirm the flows were delivered, correctly into Workbench monitoring / MessageMonitoring option:

http://pisystem:port/rwb/index.jsp

 

I hope you have finished your great interface, succesfuly... If you have doubts, feel free to ask me...

 

Thank you!...

Multimapping in SAP PI (Graphical / Java: Simple, DOM, SAX / XSLT, ABAP) - for dummies part 2 of 3

$
0
0

Hi dear experts,

 

After the first part:

1.- Develop and send your first outbound ABAP Proxy to SAP PI - for dummies part 1 of 3 of this complete interface:

2.- "We still implementing code in this second part" but now into SAP PI

3.- and after you end this post, you can test the complete scenario following the third post: Execute your SAP PI scenario from ABAP Proxy to PI (multimapping) to 2 receiver systems - for dummies part 3 of 3.

 

Objective: review the different mappings in one interface in an easy way for SAP PI consultants without expertise...

  1. Graphical Mapping,
  2. Java Mapping
    1. Simple,
    2. DOM,
    3. SAX,
  3. XSLT,
    1. XSL-ABAP (not implemented, just showing this optional mapping)
  4. ABAP Mapping

 

Flow: ABAP Proxy to SAP PI to XML File...

 

Version on 03/06/2015 --> Graphical and Easy Java Mapping..

Version on 04/06/2015 --> XSLT / Java Mapping DOM and pritty screen

Version on 08/06/2015 --> Java Mapping SAX / XSL-ABAP Mapping (optional)

Version on 09/06/2015 --> ABAP Mapping

 

Configuration:

1.- Operation Mapping:

In this part, you can see all the kind of mappings that we are using into one Operation Mapping, where the logic is to use each mapping after processing the last one, and when the xml arrive to the last mapping it means that is the result that is going to be delivered to the receiver system:

1 Operation Mapping Config.JPG

 

2.- Java Mapping - this logic will apply for Simple / DOM & SAX source codes:

After implement the code, you import the .JAR file into PI as "Imported Archive" object called here as IA_JM_TEST1_DIRECTLY:

1 Imported archive zip java files.JPG

 

 

After you upload your .JAR, with all the .class and .java files, you can visualize your source code, with double clic in .java files, for the same "imported archive" object:

2 Java code in SAP PI.JPG

 

Details:

1.- Graphical Mapping:

This kind of mapping, is recommended by SAP talking about performance and functional stantard, where you can map the sender and receiver metadata:

 

Graphical 1.JPG

 

Even you can see the mapping related in this case:

Graphical 2.JPG

 

 

2.- Java Mapping - SimplebyHow to create Java Mapping in SAP PI / PO:


After you have your "Imported archive" object, you can assign each java mapping into the operation mapping (in this case is the: "Proxy_2_Xml_JavaMapping.class" file:

4 Operation Mapping.JPG


If you follow the tutorial referenced, you can implement your first Java Mapping, where it just pass through without transformation or mapping:

package com.map;
import java.io.*;
import com.sap.aii.mapping.api.*;
public class Proxy_2_Xml_JavaMapping extends AbstractTransformation {    public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {        try {            InputStream inputstream = transformationInput.getInputPayload().getInputStream();            OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();            // Copy Input content to Output content            byte[] b = new byte[inputstream.available()];            inputstream.read(b);            outputstream.write("Prefixing this line to input. Proxy_2_Xml_JavaMapping. \r\n".getBytes());            outputstream.write(b);        } catch (Exception exception) {            getTrace().addDebugMessage(exception.getMessage());            throw new StreamTransformationException(exception.toString());        }    }
}


3.- Java Mapping - DOM by Java mapping with DOM and SAX parsers in new mapping API(PI 7.1) - Process Integration - SCN Wiki:


At same "Imported archive" object, you can find and assign the next java mapping into the operation mapping (in this case is the: "Proxy_PI_Xml_JavaDOM.class" file:

4 Operation Mapping.JPG

 

If you follow the tutorial referenced, you can implement your DOM Java Mapping, where it just pass through without transformation or mapping:

package com.map.dom;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Element;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.MappingTrace;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
public class  Proxy_PI_Xml_JavaDOM extends AbstractTransformation {    String result="";    //This is used in PI:    private Map param = null;    private MappingTrace trace = null;    public void setParameter(Map param) {        this.param = param;        if (param == null) {            this.param = new HashMap();        }    }    public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {    // String for constructing target message structure      String fresult="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";      fresult = fresult.concat("<ns0:MT_TEST xmlns:ns0=\"urn:sia:test\">");      try{          InputStream inputStream = transformationInput.getInputPayload().getInputStream();          Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputStream);          traversingXML(doc);        }      catch(Exception e){}  fresult = fresult.concat(result);  fresult = fresult.concat("</ns0:MT_TEST>");  try{      transformationOutput.getOutputPayload().getOutputStream().write(fresult.getBytes());    /* assigning the created target message to "TransformationOutput"*/      }    catch(IOException e1){}    }    //4.- With the last point 3 we will start the transformation and extract the result    public void traversingXML(Node node){        NodeList children = node.getChildNodes();          for(int i=0;i<children.getLength();i++)          {                  Node child = children.item(i);            short childType = child.getNodeType();            if(childType==Node.ELEMENT_NODE)            {                      String nodeName=child.getNodeName();                      String targetNodeName=null;                                    if(nodeName.equals("ITEM1"))                      targetNodeName="ITEM1";                      else if(nodeName.equals("ITEM2"))                      targetNodeName="ITEM2";                      else if(nodeName.equals("ROW"))                          targetNodeName="ROW";                                if(targetNodeName!=null)                      result=result.concat("<"+targetNodeName+">");                      traversingXML(child);            if(targetNodeName!=null)          result=result.concat("</"+targetNodeName+">");              }            else if(childType==Node.TEXT_NODE)              {              String nodeValue = child.getNodeValue();              result = result.concat(nodeValue);              }          }          }        }


4.- Java Mapping - SAX by Java mapping with DOM and SAX parsers in new mapping API(PI 7.1) - Process Integration - SCN Wiki:

At same "Imported archive" object, you can find and assign the next java mapping into the operation mapping (in this case is the: "Proxy_PI_Xml_JavaSAX" file:

 

If you follow the tutorial referenced, you can implement your SAX Java Mapping, where it just pass through without transformation or mapping:

package com.map.sax;    import java.io.InputStream;    import java.io.IOException;    import com.sap.aii.mapping.api.AbstractTransformation;    import com.sap.aii.mapping.api.TransformationInput;    import com.sap.aii.mapping.api.TransformationOutput;    import com.sap.aii.mapping.api.StreamTransformationException;    import javax.xml.parsers.SAXParserFactory;    import javax.xml.parsers.SAXParser;    import org.xml.sax.helpers.DefaultHandler;    import org.xml.sax.SAXException;    import org.xml.sax.Attributes;    public class Proxy_PI_Xml_JavaSAX extends AbstractTransformation {        /* 1.- DONT NEED TO MODIFY ANYTHING*/    public void transform(TransformationInput in,TransformationOutput out) throws StreamTransformationException{      InputStream instream = in.getInputPayload().getInputStream();      Handling handler= new Handling();      SAXParserFactory factory = SAXParserFactory.newInstance();      String result=null;      try{          SAXParser saxpr = factory.newSAXParser();          saxpr.parse(instream,handler);          }        catch(Exception e){e.printStackTrace();}        result=handler.getResult();        try{        out.getOutputPayload().getOutputStream().write(result.getBytes());          }      catch(IOException e){}      }    }    /* Second class Which extends DefaultHandler*/    class Handling extends DefaultHandler {    public String fresult = null;    public void startDocument() throws SAXException {        /* 2.- Here add the heather of your XML output*/          fresult="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";        fresult = fresult.concat("<ns0:MT_TEST xmlns:ns0=\"urn:sia:test\">");    }    /* 3.- Here add the end node of your XML, to close the point 2 of the heather*/    public void endDocument() throws SAXException {      fresult=fresult.concat("</ns0:MT_TEST>");    }    /* 4.- Here add the nodes of your XML, TO OPEN EACH ONE*/    public void startElement(String namespaceURI, String localName,String qName, Attributes atts) throws SAXException {      String lName = localName;      if(lName.equals(""))        lName=qName;      if(lName.equals("ITEM1"))        fresult=fresult.concat("<ITEM1>");      if(lName.equals("ITEM2"))      fresult=fresult.concat("<ITEM2>");      if(lName.equals("ROW"))      fresult=fresult.concat("<ROW>");    }    /* 5.- Here add the nodes of your XML, TO CLOSE the nodes added in point 4*/      public void endElement(String namespaceURI, String localName,String qName) throws SAXException {      String lName = localName;      if(lName.equals(""))            lName=qName;      if(lName.equals("ITEM1"))      fresult=fresult.concat("</ITEM1>");      if(lName.equals("ITEM2"))      fresult=fresult.concat("</ITEM2>");      if(lName.equals("ROW"))      fresult=fresult.concat("</ROW>");      }      public void characters(char[] ch, int start, int length) throws SAXException {          String val= new String(ch,start, length);      fresult=fresult.concat(val);      }      public String getResult() {        return fresult;      }    }


5.- XSLT Mapping:

Now, you can see other mapping supported in PI, where in this case is one of the last kind of mappings recomended by SAP; in this logic, you get all the "ROW" nodes and with flexibility you can adapt it to your future solutions (you can implement in different softwares as Stylus Studio, before to import it in PI):

<?xml version="1.0" encoding="utf-8"?><!--Created by Azael Navarro Jimenez
 Email: azaelnjim1988@hotmail.com
 Date: 04/06/2015--><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" omit-xml-declaration="yes"/><xsl:template match="/"><xsl:text disable-output-escaping="yes"><![CDATA[<?xml version="1.0" encoding="utf-8"?>]]></xsl:text><ns0:MT_TEST xmlns:ns0="urn:sia:test">        <!--For each row, we can add their values-->        <xsl:for-each select="//ROW">            <ROW>            <!--The values of each row-->              <ITEM1><xsl:value-of select="ITEM1"/></ITEM1>              <ITEM2><xsl:value-of select="ITEM2"/></ITEM2>            </ROW>        </xsl:for-each></ns0:MT_TEST></xsl:template></xsl:stylesheet>

Then similar as Java mapping, you can attach your ZIP file where contain your XSL file, and you can import it in PI into "Imported Archive" object:

1 Create import archive in PI.JPG2 Save the xslt in a zip format.JPG


You have the option to see your XSLT in a graphical way, into PI:

3 Graphic XSLT.JPG


Even, you can see the source code into PI:

4 XSLT code in PI.JPG


After that, you just need to assign it into the Operation Mapping in PI:

5 XSLT in OM.JPG



6.- XSLT-ABAP Mapping (was not implemented, i just show you this optional mapping):

In this mapping we are not going to include it into this exercise because i don't have persmission as a developer, but i show you that you have the option to implement it directly in ABAP side of PI and then called from operation mapping using the transaction (XSLT_TOOL) or even using ABAP code mixed with XSLT code in other transactions proposed in documentation as: http://www.sapwiki.cl/wiki/images/8/89/ABAP252_exercises_XSLT_XML.pdf:

 

 

And choose the class:

And implement the similar code as shown in step 5:

 

Modifying just the "transformation" node:

 

<!--Created by Azael Navarro Jimenez
 Email: azaelnjim1988@hotmail.com
 Date: 08/06/2015--><xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">  <xsl:output method="xml" omit-xml-declaration="yes"/>  <xsl:template match="/">    <xsl:text disable-output-escaping="yes">&lt;?xml version="1.0" encoding="utf-8"?&gt;</xsl:text>    <ns0:MT_TEST xmlns:ns0="urn:sia:test">      <!--For each row, we can add their values-->      <xsl:for-each select="//ROW">        <ROW>          <!--The values of each row-->          <ITEM1><xsl:value-of select="ITEM1"/></ITEM1>          <ITEM2><xsl:value-of select="ITEM2"/></ITEM2>        </ROW>      </xsl:for-each>    </ns0:MT_TEST>  </xsl:template></xsl:transform>

Then test it:

C:\Users\Azael \Desktop \Mappings\ABAP XSLT\2 XML test\test.xml

 

    1.- Let you print the result as string:

   

    2.- Let you export a file with the result:

          C:\Users\Azael \Desktop\Mappings\ABAP XSLT\2 XML test\out.xml

 

Try to implement it into the operation mapping (REMEMBER THAT THIS WAS NOT TESTED DIRECTLY, so you need to test this method or implement another method in order to implement XSL from ABAP side):

 


7.- ABAP Mapping (please refer to the ABAP Mapping "references" below to more details):

Now we are going to implement an easy transformation logic, that maybe you can find already implemented into your PI, but if not just follow this logic (please refer other documentation to especialized your profile in this topic):

 

1.- In transaction se80, look for IF_MAPPING Class / Interfaces, then double clic in EXECUTE section:

 

Implement the code:

method IF_MAPPING~EXECUTE .   trace->trace1( 'Start of Application Mapping CL_COPY_MAPPING' ). "#EC NOTEXT   result = source.   trace->trace1( 'End of Application Mapping CL_COPY_MAPPING' ). "#EC NOTEXT
 endmethod.

2.- Then add the name of your class into the operation mapping:


IMPORTANT: go "below of this post" to the references links in ABAP mapping section, because maybe you need to follow some other steps to configure your PI.


Testing our 6 Mappings in just one interface:

In the test you can use the following metadata - Input:

<?xml version="1.0" encoding="UTF-8"?><ns0:MT_TEST xmlns:ns0="urn:sia:test">  <ROW>      <ITEM1>Azael</ITEM1>      <ITEM2>26</ITEM2>  </ROW>  <ROW>      <ITEM1>Jorge</ITEM1>      <ITEM2>32</ITEM2>  </ROW></ns0:MT_TEST>

Result:

<?xml version="1.0" encoding="utf-8"?><ns0:MT_TEST xmlns:ns0="urn:sia:test">  <ROW>      <ITEM1>Azael</ITEM1>      <ITEM2>26</ITEM2>  </ROW>  <ROW>      <ITEM1>Jorge</ITEM1>      <ITEM2>32</ITEM2>  </ROW></ns0:MT_TEST>

The result must be the same, for each mapping and for the whole Mapping Test:

Mapping result.png


I hope you can enjoy it!...


References:

A. About Java Mappings:

Primary:

http://scn.sap.com/docs/DOC-45642

**************** - Understanding Java Mapping concepts

How to create Java Mapping in SAP PI / PO - using DOM parser

PI 7.1 java mapping

XML to String Java Mapping

 

Secondary:

Implementing a Java Mapping in SAP PI

XI AF API call failed. Module exception: Java Mapping

Get text value by tag name : DOM Node&amp;nbsp;&amp;laquo;&amp;nbsp;XML&amp;nbsp;&amp;laquo;&amp;nbsp;Java

Java mapping with DOM and SAX parsers in new mapping API(PI 7.1) - Process Integration - SCN Wiki

Node: getNodeValue() : Node&amp;nbsp;&amp;laquo;&amp;nbsp;org.w3c.dom&amp;nbsp;&amp;laquo;&amp;nbsp;Java by API

How to DOM Parsing JAVA Mapping in SAP PI 7.3 | SCN

Convert node element To String : Node&amp;nbsp;&amp;laquo;&amp;nbsp;XML&amp;nbsp;&amp;laquo;&amp;nbsp;Java Tutorial

Write Java Mapping directly in ESR!

How to read XML file in Java &amp;#8211; (DOM Parser)

 

B. About XSLT:

Useful XSLT mapping functions in SAP XI/PI

XSLT &amp;lt;for-each&amp;gt;

https://stackoverflow.com/questions/14800746/need-to-remove-xml-version-1-0-encoding-utf-16-from-the-xml

Transformation Editor - Application Development on AS ABAP - SAP Library

http://www.sapwiki.cl/wiki/images/8/89/ABAP252_exercises_XSLT_XML.pdf

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/000ee4d0-be91-2d10-8aaf-ff8045bdd37d?overridelayout=t…

Discovering a Hidden Gem :Generate Simple Transformation for XML in ABAP | &amp;#169; Passionate about SAP - A Blog

Generate Simple Transformation for XML in ABAP - Part II | &amp;#169; Passionate about SAP - A Blog

 

C. About ABAP Mapping:

1.- Principal:

How to register ABAP Mapping in SAP PI Exchange Profile

ABAP Mapping in SAP PI - A Beginner Guide

ABAP Mapping in SAP PI: A Complete Code Walkthrough

 

2.- Secondary:

ABAP Mapping Steps - Process Integration - SCN Wiki

ABAP Mappings - Enterprise Services Repository - SAP Library

Exchange Infrastructure - Understanding and working with ABAP Mapping

Adapter module: Set the file name from Payload using Regular Expression (Regex).

$
0
0

Hi friends,

I got a business requirement where SAP ECC is sending data using outbound ABAP Proxy to PI and PI is receiving the same and creating the file at FTP/SFTP server (Proxy to file scenario).  File name is supplied in the payload which is coming from Sender SAP system. To set filename in Dynamic Configuration (ASMA), I used XSLT mapping (and there were few transformations also). Variable Substitution didn’t work for me as the file name was not available until Receiver File/SFTP adapter (during transformation it was ignored, it was our business requirement)

 

I got to develop many interfaces which using the above mentioned flow, and I was writing the same XSLT code (to set the file name in dynamic configuration) in all the mapping so I decided to write the adapter module which perform the same task that XSLT code was doing. Once Adapter module is deployed, it can be used in any Communication Channel and any team member can reuse it just by supplying necessary configuration parameters.

This adapter module is developed using Enterprise Java Beans (EJB) 3.0. It expects the File Name XPath to be provided in adapter configuration. This XPath is used to get the file using regular expression (regex). The same implementation could be done using DOM parser too but DOM parser was performing slower for large files, so I am using regex which is better option as it is native to java.

This adapter module can be used in Sender or Receiver communication channel before “CallSapAdapter” module. I am using it in SOAP (XI3.0) ABAP Proxy Communication Channel.

 

AD.png

 

 

Below is the java code for adapter module: As I am using EJB3.0, it is not necessary to implement Session bean. Only Module interface is required to implement.

Method getRegexFromXPath() returns the regular expression which is used in Bean class to match the pattern and find out the file name.

 

 

package com.sap.pi.adapter.module;

 

import java.io.InputStream;

import java.io.PrintWriter;

import java.io.StringWriter;

 

import javax.annotation.PostConstruct;

import javax.annotation.PreDestroy;

import javax.ejb.Local;

import javax.ejb.LocalHome;

import javax.ejb.Remote;

import javax.ejb.RemoteHome;

import javax.ejb.Stateless;

 

import com.sap.aii.af.lib.mp.module.Module;

import com.sap.aii.af.lib.mp.module.ModuleContext;

import com.sap.aii.af.lib.mp.module.ModuleData;

import com.sap.aii.af.lib.mp.module.ModuleException;

import com.sap.aii.af.lib.mp.module.ModuleHome;

import com.sap.aii.af.lib.mp.module.ModuleLocal;

import com.sap.aii.af.lib.mp.module.ModuleLocalHome;

import com.sap.aii.af.lib.mp.module.ModuleRemote;

import com.sap.engine.interfaces.messaging.api.Message;

import com.sap.engine.interfaces.messaging.api.MessageKey;

import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;

import com.sap.engine.interfaces.messaging.api.PublicAPIAccessFactory;

import com.sap.engine.interfaces.messaging.api.XMLPayload;

import com.sap.engine.interfaces.messaging.api.auditlog.AuditAccess;

import com.sap.engine.interfaces.messaging.api.auditlog.AuditLogStatus;

import com.sap.engine.interfaces.messaging.api.exception.MessagingException;

 

/**

* Session Bean implementation class FileSetProperties

*/

@Stateless(name = "FileSetPropertiesBean")

@Local(value = { ModuleLocal.class })

@Remote(value = { ModuleRemote.class })

@LocalHome(value = ModuleLocalHome.class)

@RemoteHome(value = ModuleHome.class)

publicclass FileSetProperties implements Module {

 

      private AuditAccess audit;

 

      public FileSetProperties() {

 

      }

 

      @Override

      public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {

            FunctionsLibrary functionLibrary = new FunctionsLibrary();

            Object obj = null;

            Message msg = null;

            MessageKey msgKey = null;

            String fileName = "";

            String fileXPath = "FileXPath";

            try {

 

                  obj = inputModuleData.getPrincipalData();

                  msg = (Message) obj;

                  msgKey = new MessageKey(msg.getMessageId(), msg.getMessageDirection());

 

                  addLog(msgKey, AuditLogStatus.SUCCESS, "***** Entering in FileSetProperties adapter module ******");

                  MessagePropertyKey fileKey = new MessagePropertyKey("FileName", "http://sap.com/xi/XI/System/File");

                  XMLPayload xmlPayload = msg.getDocument();

 

                  InputStream inputStream = xmlPayload.getInputStream();

                  String inString = functionLibrary.inputStreamToString(inputStream);

 

                  String regex = functionLibrary.getRegexFromXPath(moduleContext.getContextData(fileXPath));

                  addLog(msgKey, AuditLogStatus.SUCCESS, "Regular Expression: " + regex + " Input message parsing is done.");

//                addLog(msgKey, AuditLogStatus.SUCCESS, "Input message parsing is done. ");

 

                  if (inString.matches(regex)) {

                        fileName = inString.replaceAll(regex, "$" + functionLibrary.getRegexReplacementCount());

                        addLog(msgKey, AuditLogStatus.SUCCESS, "Supplied XPath in Communication Challel is: " + moduleContext.getContextData(fileXPath) + ". " + "File name from payload is: " + fileName + " Going to set this file name in ASMA");                  

                     

                        inputModuleData.setPrincipalData(msg);

                     

                  } else {

                        addLog(msgKey, AuditLogStatus.WARNING, "Input message does not matches with regex . " + regex);

                     

                        fileName = functionLibrary.getDefaultFileName();

                        addLog(msgKey, AuditLogStatus.SUCCESS, "Using default file Name " + fileName);

                  }

 

                  if (!"".equals(fileName)) {

                        msg.setMessageProperty(fileKey, fileName);

                        addLog(msgKey, AuditLogStatus.SUCCESS, "File name has been set in ASMA. You can access it from Dynamic Configuration." );

                        addLog(msgKey, AuditLogStatus.SUCCESS, "***** Exiting from FileSetProperties adapter module ******");

                  }

               

            } catch (Exception e) {

                  // e.printStackTrace();

 

                  addLog(msgKey, AuditLogStatus.ERROR, e.getMessage().toString());

                  addLog(msgKey, AuditLogStatus.ERROR, "***** Error occured. Exiting from FileSetProperties adapter module ****** ");

                  try {

 

                        handleException(msgKey, e);

                  } catch (Exception e1) {

 

                  }

            }

         

            //addLog(msgKey, AuditLogStatus.SUCCESS, "***** Exiting from FileSetProperties adapter module ******");

            return inputModuleData;

      }

 

      @PostConstruct

      publicvoid initialiseResource() {

 

            try {

                  audit = PublicAPIAccessFactory.getPublicAPIAccess().getAuditAccess();

            } catch (MessagingException e) {

                  System.out.println("WARNING: Audit log not available in standalone testing");

            }

 

      }

 

      @PreDestroy

      publicvoid ReleaseResource() {

 

      }

 

      privatevoid addLog(MessageKey msgKey, AuditLogStatus status, String message) {

            if (audit != null) {

                  audit.addAuditLogEntry(msgKey, status, message);

            } else {

                  System.out.println("Audit Log: " + message);

            }

      }

 

      privatevoid handleException(MessageKey msgKey, Exception e) throws Exception {

            // throw new Exception(comment + " " + getStackTraceAsString(e), e);

            addLog(msgKey, AuditLogStatus.ERROR, getStackTraceAsString(e));

 

      }

 

      publicString getStackTraceAsString(Exception e) {

            StringWriter sw = new StringWriter();

            e.printStackTrace(new PrintWriter(sw));

            String stacktrace = sw.toString();

            return stacktrace;

      }

}

 

 

 

FileSetProperties class uses getRegexFromXPath()  which is written in FunctionsLibrary class.

 

 

package com.sap.pi.adapter.module;

 

import java.io.IOException;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.io.UnsupportedEncodingException;

import java.text.Format;

import java.text.SimpleDateFormat;

import java.util.Date;

 

publicclass FunctionsLibrary {

      intreplacementCount = 3;

 

      public String getRegexFromXPath(String XPath) {

 

            StringBuffer sb = new StringBuffer();

            try {

                  if (XPath != null) {

                        XPath = XPath.replace("//", "");

                        if (XPath.length() > 0) {

                              sb.append("(?s)");

                              String arg[] = XPath.split("/");

                              for (int i = 0; i < arg.length; i++) {

                                    if (arg[i].length() > 0) {

                                          sb.append("(.*?)(");

                                          sb.append(arg[i]).append(")");

                                          replacementCount = replacementCount + 2;

                                          if (i == arg.length - 1) {

                                                sb.append("(.*?)(>)(.*?)(<)(.*?)(").append(arg[i]).append(">)(.*)");

                                          }

                                    }

                              }

                        } else {

                        }

                  }                

            } catch (Exception e) {

 

            }

 

            return sb.toString();

 

      }

 

      publicint getRegexReplacementCount() {

            returnthis.replacementCount;

      }

 

      public String inputStreamToString(InputStream in) {

            // read in stream into string.

            StringBuffer buf = new StringBuffer();

            try {

                  InputStreamReader isr = null;

                  // try UTF-8 conversion

                  try {

                        isr = new InputStreamReader(in, "UTF-8");

                  } catch (UnsupportedEncodingException e) {

                        // or atleast in natural encoding

                        isr = new InputStreamReader(in);

                  }

                  int c = 0;

                  while ((c = isr.read()) != -1) {

                        buf.append((char) c);

                  }

                  in.close();

                  isr.close();

            } catch (IOException e) {

                  e.printStackTrace();

            }

            return buf.toString();

      }

 

      public String getDefaultFileName() {

            Format formatter = new SimpleDateFormat("yyyyMMdd-hhmmss");

            Date d = new Date();

            String fileName = "Unknown_" + formatter.format(d) + ".xml";

            return fileName;

      }

 

      publicstaticvoid main(String[] args) throws Exception {

            // TODO Auto-generated method stub

 

            String XPath = "//text/text1/FileName";

 

            FunctionsLibrary functionLibrary = new FunctionsLibrary();

            System.out.println(functionLibrary.getRegexFromXPath(XPath));

            // System.out.println(functionLibrary.getDefaultFileName());

            System.out.println(functionLibrary.getRegexReplacementCount());

 

      }

 

}

 

 

 

Use FileSetPropertiesBean in ejb-j2ee-engine.xml  and assign JNDI name. JNDI name is used in Communication Channel in Module tab.

 

<?xmlversion="1.0"encoding="UTF-8"?>

<ejb-j2ee-enginexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="ejb-j2ee-engine_3_0.xsd">

      <enterprise-beans>

            <enterprise-bean>

                  <ejb-name>FileSetPropertiesBean</ejb-name>

                  <jndi-name>FileSetProperties</jndi-name>

            </enterprise-bean>

      </enterprise-beans>

</ejb-j2ee-engine>

 

 

Edit application-j2ee-engine.xml in EAR project and use the below xml

 

<?xmlversion="1.0"encoding="UTF-8"?>

<application-j2ee-enginexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">

      <referencereference-type="hard">

            <reference-targettarget-type="service"provider-name="sap.com">engine.security.facade</reference-target>

      </reference>

      <referencereference-type="hard">

            <reference-targettarget-type="library"provider-name="sap.com">engine.j2ee14.facade</reference-target>

      </reference>

            <referencereference-type="hard">

            <reference-targettarget-type="service"provider-name="sap.com">com.sap.aii.af.svc.facade</reference-target>

      </reference>

            <referencereference-type="hard">

            <reference-targettarget-type="interface"provider-name="sap.com">com.sap.aii.af.ifc.facade</reference-target>

      </reference>

            <referencereference-type="hard">

            <reference-targettarget-type="library"provider-name="sap.com">com.sap.aii.af.lib.facade</reference-target>

      </reference>

            <referencereference-type="hard">

            <reference-targettarget-type="library"provider-name="sap.com">com.sap.base.technology.facade</reference-target>

      </reference>

            <fail-over-enablexsi:type="fail-over-enableType_disable"

                  mode="disable"/>

 

</application-j2ee-engine>

SAP PI Scenario | ABAP Proxy to Multimapping to divided flows without ccBPM | following 4 blog posts

$
0
0

Dears,

 

PLEASE, YOU MOST TO READ THE FOLLOWING 3 POSTS (this 4th is just the post where you can find the GENERAL IDEA):

Develop and send your first outbound ABAP Proxy to SAP PI - for dummies part 1 of 3

Multimapping in SAP PI (Graphical / Java: Simple, DOM, SAX / XSLT, ABAP) - for dummies part 2 of 3

Execute your SAP PI scenario from ABAP Proxy to PI (multimapping) to 2 receiver systems - for dummies part 3 of 3

 

Proposal: We are going to implement an ABAP Proxy from ECC to transform the information into SAP PI with a Multimapping solution and then we are going to deliver the information to 2 different servers WITHOUT ccBPM.


1.- Architecture: the following diagram shows the idea, graphically:

1 Arquitectura.JPG

 

2.- BASIS:

  • We are not going to show details in this point, but is important to say that you must to prepare your different servers in order to get connectivity between SAP instances and non SAP instances, like: configure ABAP Proxy communication in ECC / PI, configure your PI to see the XSLT and ABAP mapping options into your operation mapping, etc.
  • For example in "References section of this post" you can find information like this:How to register ABAP Mapping in SAP PI Exchange Profile

 

3.- SAP PI – Enterprise Service Repository:

  • Deliver the dependencies to be able to begin with the "development process" into ECC ABAP Proxy and PI mapping / transformation:
    • Create metadata (data types, message types)
    • Create service interfaces (outbound, inbound)

      • Into PI:
        • Create an Imported Archive object,
        • Import your .Jar file into your Imported Archive
    • XSLT:
      • Out of PI: Copy the code into your bloc notes program of Windows and save it as: firstXSLT.xsl
      • Into PI: créate other imported archive object and then import your .XSL file.
    • ABAP:
      • Implement it first into ABAP stack of your PI server, using transaction SE80

  • Operation Mapping:
    • Assign your service interfaces,
    • Into mapping box:
      • Identify your Java mappings,
      • Identify your Graphical mappings,
      • Identify your XSL mappings,
      • Just assign the name of your ABAP Mapping class implemented in ABAP stack.
    • TEST YOUR OPERATION MAPPING, MAPPING BY MAPPING (FROM is to choose the mapping where you will begin to test, and TO is used to choose the mapping where you want to end your test of all your mappings selected:

 

4.- SAP PI – Integration Directory:

  • Create a Configuration Scenario:
  • Dont create Communication Channel sender,
  • Dont create Sender Agreement,
  • Create 2 Interface determination and assign your operation mapping created from Integration Repository (1 for BC_SENDER to BC_REC_1 and the 2nd for BC_SENDER to BC_REC_2 ),
  • IMPORTANT OBJET TO SPLIT: create just 1 receiver determination to Split your flows, this object is for both flows,

  • Create 2 receiver agreement, each one for (1 for BC_REC_1 and 2nd for BC_REC_2),
  • Create 2 communication channel receivers (1 for BC_REC_1 and 2nd for BC_REC_2),

 

  • Validate that your flow is correct:

5.- ECC - Develop and send your first outbound ABAP Proxy to SAP PI - for dummies part 1 of 3

  • After in PI was implemented de service interface sender with their data and message type, you are able to see your proxy into SPROXY transaction, so just implement it as the post.
  • The common issues must be for ABAP logic problems or BASIS problems, so you need to solve it depending of your case,

 

6- Execute your interface - Execute your SAP PI scenario from ABAP Proxy to PI (multimapping) to 2 receiver systems - for dummies part 3 of 3

  • Follow the blog to test your scenario,
  • Execute your abap proxy program to send the rows,
  • Validate that the message flows into PI were executed succesfully,
  • Validate that both receiver systems, received the information, correctly.

 

I hope you can enjoy it, but if you have doubts, fell free to ask me!!...

Viewing all 676 articles
Browse latest View live


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