Thursday, October 28, 2010

SAP PI Monitoring activities

Activities for Production Support and Maintenance projects in SAP PI/XI

While working in a Production Support and Maintenance project, we have to perform a series of day to day activities as a responsibility of an SAP PI / XI consultant. Here, I would like to list a series of steps that may be useful to monitor the PI / XI Production server.
J2EE Engine side monitoring:
1. Enter the URL for all the instances of your Production Server http://:500/rep/start/index.jsp
Make sure that these links are responding.
2. Go to Runtime Workbench (RWB) using URLhttp://:500/rwb
and perform the following:
a) Click on Component Monitoring and then click on display and then to Monitor your Adapter engine click on Adapter Engine.
b) In Adapter Engine Monitoring, monitor the adapter with errors.
c) After doing this monitoring activity click on Message Monitoring.
d) To do this click on Message Monitoring Tab.
e) Now choose free entry from start/end date combo Box and then choose the status of messages that were processed by Adapter engine.
f) Check the messages for To be delivered state.
g) Check the messages for Delivering state.
h) Check the messages for All containing error state.
i) Use filter in this monitor page if needed.
Once done with all of the above activities means we are done with J2EE Engine side Monitoring.
ABAP side monitoring:
1. Use SXMB_MONI. Transaction to monitor the messages which are processed through the entire XI pipeline that is Integration Server.
2. Use SXMB_MONI_BPE Transaction to monitor the messages which are processed by BPE (Business Process Engine).
3. Use SM37 to check the Job status.
4. Use SMQR Transaction for monitoring the XI Run Time queues (I/B, O/B Queues).
5. Use SMQ1 Transaction for monitoring the XI Run Time queues (O/B Queues).
6. Use SMQ2 Transaction for monitoring the XI Run Time queues (I/B Queues).
7. Use SLDCHECK to check SLD Connection. If there are any red entries then report it to SAP Basis Team.
8. Run transaction SM21 (Read System Log) on the XI server to look for error messages around the time you got the error.
9. Check the all instances of your Production Server are running fine.
To check this, use SM51 transaction. All instances should be in active state
Now we are done with ABAP side Monitoring.
· Check the log and Traces file
· Check the URL for server monitoring
Ref: from
1. Process XML messages – Standard and Process (check for message failures, determine if ABAP or Java related)
2. Job Overview
3. Persistence Layer Analysis (Observe growth day to day, no sudden jumps).
4. Tcode: SMQ2, SMQ1 (check for blocking)
5. Tcode: SM66 (no long running DIA)
6. Tcode: SM21, ST22 (look for unusual errors)
7. Tcode: ST04 (Overview - hit ratios)
8. Tcode: ST06
1. CPU (no overloads)
2. Memory
9. Tcode: ST03 (Workload overview. Response times, special attention on DIA, HTTP)
10. Tcode: SMICM (for each server: look for Current/Peak/Maximum values and make its not Peak is not hitting MAX)


1. Message Monitoring – Database (overview) -Integration Engine and Adapter engine (Look for unusual errors)
2. Performance Monitoring – last 7 days/Daily (look for volume jumps)
More inportantly if you have Wily INTROSCOPE in your environment look for trends in messages, garbage collections, etc.

And more in detail documentation on 'Process Integration PI 7.1' Trobleshooting Guide
-> Process Integration
-> Troubleshooting Guide - SAP NetWeaver PI 7.1

XI/PI: Dealing with Errors on the Outbound side

Sometimes the link between SAP XI and the target system (say ERP) goes down and messages fail on the outbound side. It may not be possible to restart them from using RWB or the transactions like SXI_MONITOR/SXMB_MONI. This article explains how to deal with such messages.
Generally, messages are picked up and sent via SAP XI when the link returns. However, in some scenarios, it may be possible that SAP XI server could not finish conversation with ERP. Main status of messages is “Processed successfully” – but there is an error in the outbound side as shown below. (Transactions – SXI_MONITOR/SXMB_MONI).
These messages do not get picked up automatically – and it is not possible restart them from using RWB or the transactions like SXI_MONITOR/SXMB_MONI.
Such messages could be processed in the following way:
  • Send data directly to Integration Engine
  • Change the status of failed message
This example shows how to solve the problem – two error messages are shown and one of them is solved here.
Step 1: Send data directly to Integration Engine
Go to Component Monitoring in SAP XI Runtime Workbench. Click on the Test Message tab for the Adapter Engine. Specify the URL of SAP XI Integration engine to send the message to e.g. http://:/sap/xi/engine?type=entry
Specify the header Information. Copy payload of the message using SXI_MONITOR/SXMB_MONI and paste it into Payload area in RWB.
Send the message using Send Message button.
Step 2: Change the status of failed message
Call the transaction SWWL.
Delete appropriate work items.
Check that the messages are complete in SXI_MONITOR/SXMB_MONI.
Another simpler way to accomplish this is to use transaction SXMB_MONI_BPE . Select Continue Process Following Error under Business Process Engine -> Monitoring and Execute (F8). Update the selection criteria as required and Execute (F8). Choose the appropriate line item and click on Restart workflow button.
In these ways we can reprocess the messages failed on the outbound side. If the messages do not participate in BPM process, then they can still be traced via outbound queues or SM58 logs and restarted.

Problem with Cache Refresh

When we perform any changes to our design objects and configuration objects which were created in our IR and ID and if the changes were not reflected to that objects, at that time every one mind would point to perform the cache refresh. We have different options available to perform the cache refresh.
  1. In IR from MenuàEnvironmentàClear SLD Data cache.
  2. In ID from Menu ClearàEnvironmentàSLD Data Cache.
From PI home page under administration we have the cache overview.
When we log in to ABAP stack and hit the transaction SXI_CACHE there you can observe the status will be in red color and the cache will not be up-to-date and unable to refresh cache. Even though if we perform the cache refresh the changes are not reflecting since the cache is not working properly.
From IR from menu using cache notifications we can see whether cache is refreshing or not. From that option also it shows the status as RED color and cache is not up-to-date and cache is not refreshing.
So how to resolve this issue and what might be the problem for displaying the status as red and cache is not up-to-date.
To resolve this issue logon ABAP stack and check the RFC Destination of
Type H: INTEGRATION_DIRECTORY_HMI in this check whether the path prefix is maintained or not.
If we observe the above screenshot we can identify that path prefix as not maintained anything. So maintain the path prefix as in the below screen shot and save it.
After performing the above step go to SXI_CACHE and perform cache refresh. Now cache will perform the refresh and the status will be as below.
Messages in XI can fail due to many reasons. Most of the common failures are due to connection failure to end systems, wrong or missing configuration settings, exceptions that weren't handled or lack of disk space for processing messages. These errors can be categorized as those generated in
I. Integration Engine
II. Adapter Engine.
I. Errors in Integration Engine
a) qRFC Errors
Often in asynchronous scenarios where inbound queues are used, the queues are set to SYSFAIL status and all the messages in the inbound queue are stuck (not processed). Depending on the status of XI processing queues, we can reset a queue’s status and trigger processing of messages.
Manual Resend of messages: Use transaction SMQR or SMQ2 to reset the status of queues. As you can see in the following figure, the queue has been marked with a status sysfail.
To be able to initiate processing of messages stuck in the queue, make sure to set following IS configuration parameter
For automatic qRfc failure recovery, schedule the report RSQIWKEX to run periodically. This report enables automatically resets the queues.
b) tRFC Errors
Like qRFC errors one can either manually or automatically initiated processing of messages hanged tRFC calls.
Manual Resend of messages: Use transaction SM58 and check through the list. If necessary, start hanging tRFC calls
under the Edit menu by choosing Execute LUWs.
For automatic tRfC failure recover, schedule the report RSARFCEX for periodic execution.
c) Other Errors
All the errors generated and captured in Integration engine can be viewed using transaction SXMB_MONI. Message that were sent asynchronously and had failed due transient system/configuration failures can be manually restarted in SXMB_MONI.
But would it be fun to restart many messages manually. What is required is a way to be able to automatically resend messages that error out. Thankfully there are many ways of doing this in XI.
Option 1
A batch job( internal in XI) is automatically scheduled to reprocess the entry after 2 minutes.
If the maximum number of retries was reached (10 by default; IS configuration parameter
TUNING IS_RETRY_LIMIT), a communication error then causes a SYSFAIL status for a queue.
Option 2 The problem with setting IS_RETRY is that every message with a failure status will be retried every 2minitues till the maximum number of retries is reached. Since there is no control on the retry period , a high retry count could cause excessive load on XI. The other option is to do Mass Restart by scheduling the report RSXMB_RESTART_MESSAGES at a predetermined retry period like 1hr. There is a catch here, RSXMB_RESTART_MESSAGES tries to restart a failed message 800 times by default. So if there is a message that failed due to genuine reasons, we may want to limit the number of retries. It is recommend by SAP to reduce the retry count to 20 restarts. (You can always manually restart a message, from the monitor, up to 990 times).

This value can be maintained in SXMB_ADM-> specific configuration 'DELETION' 'MAX_VERSION' 'BATCH_RETRY' . If you don't see the DELETION category , you must run the report RSXMB_CREATE_CONF_ENTRIES3 to generate the configuration parameter.

Finally here is the table that describes ways to handle resubmit of errors in Integration Engine
Type of Error
Manual Start
Automatic Start
OTHER errors

II. Errors in Adapter Engine
Till now we have seen how to resubmit/restart message that failed in Integration Engine. One a message makes it from Integration Engine to Adapter Engine, the message is flagged as checked in Integration Engine. The status of the message in Adapter engine does not effect the processed state in Integration Engine. Now if this message was asynchronous, XI will by default try to restart the message 3 times at intervals of 5 minutes before the status of the message is changed from Waiting to System Error .


As shown in the above figures a message is initially put into waiting status, XI tries 3 times before changing the status of the message to System Error. One can Manually resend the error messages by using the RESEND button in RWB. In scenarios where XI was trying to send the message to an end system that was down for maintenance, you would want XI to resubmit the message automatically without human intervention. What would be nice is to able to tune the retries like IS_Retry which is available for Integration engine.
We can achieve this by changing the retry count used by the Adapter Engine, by default its set to 3 times, 5 minutes apart. This count can be changed inVisual Admin->server->services-> SAP XI Adapter: XI.Here change the number Retries parameter from 3 to 10 and change the retry retryInterval to around 10minutes. For these configuration changes to be picked up, restart SAP XI Adapter: XI.
Error in XI are inevitable, but when they occur we should be able to restart or resend the messages in a way that requires minimal human intervention, especially if the errors were due to system outage or system memory exceptions. In this weblog I have tried to list out the most commonly occurring errors and the many ways of restarting these messages.


1. routine monitoring

a. Adapter engine monitoring:  message monitoring   or  server: host/mdt 
b. Integration engine monitoring: SXMB_MONI, SXI_MONITOR
c. communication channel monitoring.( if you find if any message failed). In Run time work bench
2.BPM monitoring:
  use transaction: sxmb_moni_bpe:
       i) use table view and graphical view of the bpm
       2)table view is helpful, to see payload at various levels
       3)Graphical flow helps us to understand the flow on different steps.( select any step then go for table view to see status about messages or variables by clicking content tab, we can use trace option to trace the message.

3. Outages( No need to stop Integration server and Adapter engine)

    a)Planned outage
       Before outage:
        i) stop all sender specific communication channel for that applications.
       ii) coming to sender abap proxies , sender idoc, sender HTTP , just intimate them to stop sending    messages from sender system.       

       After outage:

        i) restart all sender specific communication channels       

   b)Unplanned outage:

       i) Adapter engine(A.E.) level: Message might be fail at this level
      ii) Integration engine level:
          a) check smq2, Check system errors, reprocess those message when ever receiver system up.


Friday, August 27, 2010

SAP PI FTP File Adapter Configuration

Some times, because of illegal file FTP file adapter configuration in SAP PI . we are getting message like this( absolute path and relative path) 500

Way to ftp adapter configuration->

Suppose you are able to accesss your client FTP system like this from your vpn network as shown below
Step1: start -> run -> ftp

step2: enter username and password

step3: find ftp command and check PWD(present working directory) as shown in below and use this folder
while configuring File FTP adapter

Use above help and configure FTP details as shown in below

Saturday, August 14, 2010

SAP PI foreign language characters XML is not valid

when you face xml is invalid , because of foreign language characters, or special symbols like "&" " <" in xml file

Refer more information using this article provided by SAP

Also refer this weblog and Comments by different authors on this

Monday, August 9, 2010

Germany travel FAQ

Germany Business Visa, VFS Germany, Domestic Travel in India, International Travel from India , Travel tips in Germany



Hi all,

This is Deviprasad Pothireddi, working as software employee in one of MNC in Hyderabad. Because of company requirement, I traveled for Germany. I am describing my experience in step by step. I hope this is useful for many of them.

1. Procedure to get Germany visa(Business ) from south India.

2. Procedure to travel Germany after getting Germany Visa

1. Generally we will get invitation letter from Germany saying that, Time , duration and complete information.(this is important letter)

2. Then go to Germany consulate website and find out what type of visa you want, and required documents for that.

3. You can get Exact information from that website about List of documents ( better to have your passport first and last copy(Xerox)).

1) Need to vist VFS office Example: VFS office in hyd(begumpet), VFS office in vizag…

2) Need to Visit Germany consulate office in Chennai( this is for south india). Get location about this office from their web site.

VFS office at Begumpet(Hyderabad): submit all your documents: 1.Filled application(take pass port as Germany standards) 2. Pass port 3. Employment letter letter 5.your travel ticket (samples, when do want to travel). 6. International travel insurance. No need to show educational certificates(original or duplicate). But for Work permit they may ask your (Original /duplicate copy). One declaration form( need to write with pen saying that, About your yourself and purpose to go Germany.

Time to submit your documents in VFS: 8am to 3pm. This is only for checking your documents. No interview here(only Indian will check you documents).

1. They verify your documents and help you to fill all documents and they take visa fee(around 4000Rs), they envelope all documents what you have provided and give to you. And Visit Date and time to Germany consulate in Chennai.

Germany counsulate In Chennai.

1. Check your Visit Date and time and reach before 30Min to that place

2. There is no place for sit outside of German consulate.

3. They call you inside(one room) to attend the interview(most of the time Indians do the interview). Generally they may ask your Purpose of visit to germany, duration, accomidation and your employment , they open your envelope and check your documents. Generally it may take 4-10min.

4. After that they will say you, you will get your passport to your address.

5. Leave that place (this time , you do not have any documents).

Domestic travel experience:

1. You need domestic (with in india tavel in flight/plane/aero plane) air ticket, some times we call it as itinerary

2. You need id proof, generally Pan card, driving Licence, any gov. related id proof

Procedure at Hyderabad international airport.

1. Generally you get e-ticket(online ticket). You need to show this at airport counter(many airline counters are there like :airIndia, kingfishers, jet india)

2. Then they provide boarding pass(flight ticket). Which has information about Gate(you have to wait in this place to catch flight/plane)

3. After that go for baggage check and police check in( where they will check all items what you are carrying).

4. Do not take explosive items and tools(also avoid razor , blade)

5. Remember there is particular limit for weight of luggage. Get the information from e-ticket / boarding pass .

6. Once police check in over, you have to go to your Gate. (no facility to see your relatives or family members, who came along with you).

7. You feel very good at first time. It is like a train travel( garib rath in india/ AC conformant ).

8. They provide some snackes during the journey and guide you the instructions in flight.

9. No checking at destination place.

Note: Be careful while you buy items at airport

Ex: coffee cost in Hyderabad international airport: 60Rupees .

International Travel Experience:

Similar to Domestic travel travel, But

1. Iimmigration check (passport,visa) at source airport and passport, visa checking at destination airport

2. Baggage submition source airport and Baggage claim at destination airport.

3. Iid proof: passport and Visa carrying

Sequence of steps:

1. getting boarding pass from e-ticket at airline counter

2. police check and goods check

3. Immigration check and get into your gate number.

4. Destination: 1) pass port check and 2)baggage collect

Germany Experience:

1. After collection of baggage in airport, fallows signals to reach train station, train system available below the airport (generally in any airport in germany)

2. Take wheel bag, it is easy to drag luggage.

3. Get into ticket counter room, and ask them ticket to your destination.

Note: if you book reservation before 3 days, amount for that is less otherwise you have to pay double the payment.

(You can get one day pass, monthly pass ask them at this counter, you can use this public transport(bus, mini trains(run on roads))

4. Public transport is very good in Germany.

5. You can also use rent car facility.

6. Use 2 pin adapter, we cannot use 3 pin adapters.(international standard).

7. We can use our indian rice cooker, to cook rice with help of 2 pin adapter

8. In Germany people generally take food as burger with cool drink (avoid water most of time and cost nearly equal to coke cook drink).

(Hotel rates nearly: 30Euro to 95Euro/night ) most of them, with Breakfast.

9.Take mobile sim (local to Germany) it cost around 10Euro + 15Euro (pre paid sim).

10. Use Google maps to identify the places and better have print-outs for new members.

11. prefer to stay in apartment/ service apartment( which has kitchen facility). Where you find some cooking bowels and its accessories and electric stove. So you can go to any super market and buy some eatables and cook it.

Ex: Milk cost around : 50Cents, sugar nearly 60 cents, coke 0.5 bottle 2Euros at hotels / shops, generally you will get less in super markets.

12. In Germany many hotels are available with breakfast. This means they provide break-fast facility default.

13. For Lunch and dinner, minimum you need to pay 5Euros(self service), for service you have to pay 10 – 15Euros. Generally they order with some cool drink(ex: coke or Beer)

14. My friend and me went in a Indian hotel and ordered 1liter water bottle, finally we got bill on 7Euros(normal water).

15. you do not find any traffic police at 4 road junctions or any junction, every where you find signal lights, for walkers, cycles and auto mobiles.

16. they use “ Hello word” to wish anybody.

17. we do not find any ceiling fan in rooms/ hotel . some time we find only small table fan.

18. Most of them, fallow , use Maps to identify the location. I advise new persons, you to have map where ever you go.

19. if you have 2 pin adapter( buy international standard), (socket is available after 1inch depth), you can use any electronic / electric device like in India.

20. Whoever new to Germany , avoid walking on streets after 8:30pm.

21. you can buy railticket(short distances) with help of ticket vender machine.

22.Long distance trains means, Intercity trains ICE( connecting cities).

23. Use google map, to find hotels, shops and distance between two stations. book online rail ticket with help of this site.

24. Hotels: to book hotel, Make a telephone call to hotel, ask for different services( specially internet). and do reservation. and ask any free trasport facility available from airport to hotel / hotel to airport. ( some hotels providing these services too). Remember most of hotels providing , free internet services with WLAN( wireless LAN). to utilize this, check your laptop, if this option available or not. Using internet during international travel helps you great.

Indian computer keyboard and Germany keyboard differs in some options.

About depature in Germany ( Frankfurt airport)

  1. some hotels near to Frankfurt airport, with free bus facility. Use those facilities

  2. take your e ticket and show your eticket and baggage check-in, based on you airline counter. They provide. Boarding pass( which has gate pass information).

  3. you can easily find your gate based on directions. While going, at one place, police check your passport, and allows further, then your personal baggage check and then go to your gate,

  4. while you are in flight, you will receive a form, you need to fill your journey information based on passport, ticket and visa. And customs bags info. You need to provide this at exit place.

Thursday, July 8, 2010

Using Soap Channel in SALES FORCE and using soap lookups

Technical concepts you learn
1. soap lookups in message mapping and javaMapping( parameterized mapping calling soap channel in message mapping).
2. using soap channels in Sales force.
3. Dynamically Setting soap receiver channel parameters.
4. useSoap Envlope Parameter in Receiver communication channel
Links for above things
if not use articles then select SOA integration section, select sales force use case.

simple exaplanation above topics using above docs
1. Behind machanisum in SALES FORCE
PI is able communicate with this using SOAP receiver.
but SALES FORCE has login webservice, application related webserices
first we need fallow this sequence 1.Login websercie 2. application related Webserice
1. Login Webserice provides you Target url and session id.
2. By using these two you can get required service.
So these services are inter - related and sequence manner.
soap ui , soap client( freely downloadable) we can test webserices.
Both of the webservices are getting from sales force website / 3rd party system.
2.Dynamically set soap receiver channel parameters.
3. Using Soap Lookup in message mapping.( from 2nd document)

lookup code.

public String calculateDiscount(String cust_no, String region, Channel
soapDiscount, Container container) throws StreamTransformationException{
SystemAccessor accessor = null;
String discount = "";
StringBuffer sb = new StringBuffer();
// 1. Get a system accessor for the channel.
accessor = LookupService.getSystemAccessor(soapDiscount);
// 2. Build up request
InputStream reqStream;
String reqString =""
+ "OrderDiscountRule xmlns:ns0=\"\">"
+ ""
+ ""+cust_no+" "+region+""
+ "0
+ "
reqStream = (InputStream) new
XmlPayload reqPayload = LookupService.getXmlPayload(reqStream);
// 3. Call BRM
XmlPayload resPayload = (XmlPayload);
// 4. Parse result
byte[] b = new byte[4096];
for (int n; (n = resPayload.getContent().read(b)) != -1;) {
sb.append(new String(b, 0, n));
int i =sb.indexOf("") + 10;
int j =sb.indexOf("
discount = sb.substring(i, j);
catch (Exception e) {
// TODO Auto-generated catch block
finally {
// 5. Close the accessor in order to free resources.
if (accessor!=null) accessor.close();
return discount;

Avoiding Brides in ccBPM using modules

file - RFC - file , or file- Soap - file , in these case we used the fallowing approach.

By using this modules we can acheive the same funcationality with out BPM also
Using Request Response Bean Module in FILE Adapter . user ful link from forum

sap pi help

Monday, May 17, 2010

Working with SAP PI proxies syncronous interface

Abap proxies in SAP PI

In this scearnio we learn how to use the abap proxies step by step.

assume here, we are having 2 sap ecc systems, first ecc system wants to send request to sap pi , the sap pi request to second sap ecc system. the second sap system takes input and execute program and return this response to SAP PI , this PI system sends this informtion to first SAP System, the communication as fallows...

for this, i am using same sap system for sender and receiver, i need to create one oubound servcie interface for sender(sap ecc system to generate proxies acts as sender system) and one inbound interface for receiver(sap ecc system to generate proxies_acts as receiver) and need active those in SAP PI ESR system.

Then go to sap ecc system, use sproxy transaction code.

then you can see the both sender service interface and receiver service interface. if it sender system then select sender service inteface( outbound interface in sap pi) to write a report. to send request to sap pi system.

if it is ( sap ecc) acts receiver, then select inbound service interface, to write a service.

1)select sender service interface and right click on that and generate proxies, (same procedure for receiver also, if it is receiver side), then you see the screen as shown in the below.

as shown in the above diagram you can use interview, to see the data types and use those in the report( act as abap client ). and call this method to send and recieve parameters.

ABAP program is

there is alredy exiting table(custom table) created for this scenario purpose. we can view that table contents and fields using se16 and se13 tcodes in sap ecc system.

Now we look into receiver side.

here we are using same SAP system as receiver side. then select the Inbound Service interface. and generate proxies( by right cliking) and see the proxy class and double click on it to write the code (provide service). we can use the internal view help to check the datatypes as shown in the below.

double click on the abap proxy class.

Abap code to provide service


SAP XI side( the above things will be done, after service interface created and activated in SAP ESR.

Now we will see Operation mapping, message mapping things.

Mapping sender and reciever( two mappings are there)

Now we will look into the configuration objects.

configuration object are as same,

select sender business system(webasAbap) and receiver side Business system(web as abap) , in this case both are same. sender side no need of communication channel required. coming to reciver side XI communication channel required. before createing this channel . test weather it is supports the sap abap proxies/ activated, some times we can say, this may be the first step to start.

http:// : / sap/xi/engine

finding the httpport of sap ecc system

go to sap ecc system, use this transaction code SMICM.

go to Go to Service( http related) where you can see the list of service of http.


also check, sap ecc system, ready to send /use xi proxies, for this

go to sxmb_adm

Select integration engine configuration,

remember these two and select specific configuraion button,