Dear SCN Friends,

I believe most of us already worked on or heard about Variants usage.I have seen many SAP PI folks in support generally set the filter parameters and save them as variants once and every day while monitoring they select the variant (say interface ID) and then select the date range say (yesterday 00:00 to current date 00:00) .Some approached me asking can we set the date range as well (say From:Current_Date -1 To: Current_Date) instead of manually entering daily .

As number of folks who doesn’t know this feature completely are more ,I thought it’s better to write a blog and publish it .

Variants allow you to save sets of input values for programs/TCODES that you often start with the same selections .It will be really useful in the below use cases (PI prospective)


1)Need to monitor particular interface(s) daily in SXMB_MONI.

2)For rookies or those who doesn’t have interface knowledge and want to pull particular interface logs from SXMB_MONI.

3)If you want to quickly pull the logs from SXMB_MONI .


I’m taking an example to explain.I want to pull XYZ interface logs daily say From Date: Current date -1 00:00 and To Date:Current date 00:00


Variants Set up in SXMB_MONI:


Execute SXMB_MONI tcode and give filter values as below (Depends on your requirement)

Var1.jpg

Click on Save.

Give the Variant Name and Desc.

Only for Background Processing:If you select this check box then variant can only be executed in the background .Otherwise,it can be run both in the background and dialog mode.

Protect Variant :If you select this check box then variant can only be changed by the person who created it .

Only Display in Catalog :Select this check box if you only want the variant name to be displayed in the variant catalog (and not when the user calls the F4 value help).

For From/To date range selection go to selection variable tab and press F4 and select “D”  .Now go to Name of the variable tab and press F4.

/wp-content/uploads/2015/07/var2_743058.jpg


select the above as per your requirement .Here I’m selecting second option.

Var3.jpg

As per my requirement I’m giving 1 day before the current day.Similarly repeat the steps for To Date Executed .Click on save.


Var4.jpg

Daily Monitoring using Variants:

Execute SXMB_MONI tcode and select your Variant .


/wp-content/uploads/2015/07/var5_743109.jpg

Click on F8 .You can see the logs matching to your filter criteria.

Regards

Venkat

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Glen Thomson

    Hi, does anyone know how to setup monitor to run daily in background?  I am trying to do the above, but have it execute in background so that spool can be sent directly to me. I get errors in background batch job “Error calling a method of the tree control”.

    (0) 

Leave a Reply