Skip to Content
Author's profile photo TANKA RAVICHANDRA

All about I_STEP variable :

Hi…

All about I_STEP

When we execute the BEx query, the sequence of execution starts with the variable selection screen being  popped up  if any variable is present in the query,  and then the output will be displayed based on the values which  passed in the variable selection as per below sequence.

1.1.JPG

I_STEP  is a variable, generally used in ABAP Customer exit, which can take the values 0,1, 2 or 3.

I_STEP = 1 :

In some of the reports, we may have a need to display default values in the variable selection screen even before its execution.  For example, to display the execution date, time. In such cases we need to write /execute some of the ABAP customer exit code before the variable selection screen starts.

In Customer Exits, if the variable I_STEP = 1, it means ABAP customer exit code will be executed before the variable selection screen pops up.

1.2.JPG

I_STEP = 1 is before the processing of the variable and hence this we can be used for default selection-screen values.

I_STEP = 2 :

In some of the reports, we may have a need to calculate MTD(Month to Date), YTD (Year to Date) . In such cases the report output is based on the input value in the selection screen and  ABAP Customer exit calculation. In such cases the ABAP customer exit code has to be executed after the input screen.

1.3.JPG

The above screen indicates the sequence followed when we execute the MTD, YTD et al.  reports.

1.       The input values are passed to the variable selection screen.

2.       ABAP Customer exit is executed based on the input selection screen.

3.       The output is displayed based on the ABAP Customer exit code.

I_STEP = 2 is useful to find the YTD, MTD, rolling quarter, etc…

In a report we can have I_STEP = 1 and I_STEP = 2 depending on the requirement as shown below.

1.4.JPG

Hope you got it,

Thanx & Regards,

RaviChandra.

Assigned Tags

      43 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ganesh Bothe
      Ganesh Bothe

      Hi Ravi,

      Useful information thanks for sharing..many times new people confused about this 🙂 .

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Thanx Ganesh...

      Author's profile photo jagadeeshwar dasari
      jagadeeshwar dasari

      Hi ravi, good explanation Can u provide Sample code.... 🙂

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Hi jagdesh,

      Thanx, surely i will provide code in the next blog.

      Regards,
      RaviChandra.

      Author's profile photo SESHA PS
      SESHA PS

      Helpful Document , Thanks For Sharing 🙂

      Author's profile photo Former Member
      Former Member

      One of the major area for bex related user exits. Good blog with nice presentation.

      Thanks for sharing ravi

      Author's profile photo Hendrik Brandes
      Hendrik Brandes

      Hello Ravi,

      Thanks for your good Blog. I like it. In Easy implementation of BEx-Userexit-Variables I have proposed a framework, which handles the variable processing. Additional, I encapsulate the i_step variable, so no developer needs to handle with it directly.

      Kind regards,

      Hendrik

      Author's profile photo Raman Korrapati
      Raman Korrapati

      Good blog and nice explanation Ravi. Thanks for making and sharing with us.

      Author's profile photo Krishna Chaitanya
      Krishna Chaitanya

      Nicely explained.  Good one.  Thanks for sharing. 🙂

      Author's profile photo Former Member
      Former Member

      Very nice post Ravi. Good illustration, easy to understand. Thank you for sharing.

      Regards

      Venkat...

      Author's profile photo Former Member
      Former Member

      Thanks ravi, very detailed explanation, gud effort.

      Best Regards,

      Venu Gopal

      Author's profile photo Loed Despuig
      Loed Despuig

      great document mate!

      may i ask the i_step = 0 and 3?

      also,kindly provide sample for each i_step..

      thank you!

      loed

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Hi Loed,

      Thanx alot,ya surely i will write another blog on I_STEP = 0 and 3 with code.

      Regards,
      Tanka

      Author's profile photo Hendrik Brandes
      Hendrik Brandes

      Hello Loed,

      look here to find a description of how to deal with i_step 0 and i_step 3:

      BEx-Userexits reloaded

      Kind regards,

      Hendrik

      Author's profile photo Former Member
      Former Member

      Hi Ravi,

      Excellent presentation of concept with good screens.

      I thank you for the great work...

      Regards,

      Mahesh.

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Thanx mahesh...

      Author's profile photo Benedict Venmani Felix
      Benedict Venmani Felix

      Your blog title is "All about I_STEP", but you have not even mentioned about istep 0 and 3. This is a little misleading. A learner might think there are only two istep variables. Please update your blog with all istep variable or change the blog title.

      Thanks,

      Benedict

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Hi Vasanth

      I have clearly mentioned that I_STEP will have values like 0,1,2 and 3 with bold letters.please once check it and surely i will write another blog for 0 and 3 values.

      Regards

      Tanka.

      Author's profile photo Former Member
      Former Member

      Thanks for sharing.

      Regards,

      Sushant

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Thanx tiwarekar...

      Author's profile photo Satendra Mishra
      Satendra Mishra

      Hi,

      really very nice information. 🙂

      Regards,

      SM

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Thanx satendra...

      Author's profile photo Former Member
      Former Member

      Really Nice one...:)

      Thanks,

      Purushotham.

      Author's profile photo Former Member
      Former Member

      Hi Ravi,

      Nice info. Am eagerly waiting for your next blog which will have this kind of detailed info on I_step 0 and 3 values. 🙂

      Thanks for sharing.

      Author's profile photo Kodanda Pani KV
      Kodanda Pani KV

      Thanks for sharing 🙂 🙂

      Phani.

      Author's profile photo Anshu Lilhori
      Anshu Lilhori

      Nice graphical representation of i_step sequence .As mentioned by others it would have been good if you had added i_step 3 as well which indeed justifies the title.

      Regards,

      AL

      Author's profile photo Hendrik Brandes
      Hendrik Brandes

      Hello Anshu,

      perhaps you can get the information on this:

      BEx-Userexits reloaded

      Kind regards,

      Hendrik

      Author's profile photo Jalina Vincent
      Jalina Vincent

      Very Good doc.

      Author's profile photo Former Member
      Former Member

      Very useful blog .Many thanks .Happy to read 🙂 .

      Author's profile photo Former Member
      Former Member

      Very Useful Information !!!

      Regards,

      J.Sakthikumar

      Author's profile photo Meghana Kuppa
      Meghana Kuppa

      Thank you so much! 🙂

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Thanks Meghana and Sakthikumar...

      Author's profile photo Former Member
      Former Member

      Hi ,
      Nice blog but incomplete.As it has been mentioned that all about i-step variable but details about i_step 0 and 3 missing. And a new BW user might expect to see the information that while writing customer exit how we assign i_step. So if above informations are added then it this will be really informative.

      Author's profile photo G.S Ramanjaneyulu
      G.S Ramanjaneyulu

      Hi Ravi,

      This is a good document and good try, It will be best if you explain about step 0, 3 also. If possible try to share some example screens, so it looks better and better,

      Regards,

      G S Ramanjaneyulu.

      Author's profile photo Former Member
      Former Member

      Hi Ravi,

      Very good graphical illustration.

      Regards,

      Sucheta

      Author's profile photo Rajesh Ramakrishnan
      Rajesh Ramakrishnan

      Excellent post.

      Thanks.

      Rajesh

      Author's profile photo Former Member
      Former Member

      Very good one.

      Although, I understood the concept by reading from the SAP SCN website, still I had doubts if my understanding were correct.

      I read many other blogs and help document but none of them were this simple-to-understand as yours.

      This is an excellent document. It cleared my doubts and confirmed that my initial understanding was correct.

      Wish SAP official site produces simple documents as yours.

      Thanks

      Keith

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Thanks Keith.

      Regards,

      RaviChandra.

      Author's profile photo Former Member
      Former Member

      HI Ravi,

      Could you please also share on I_Step=3? That would be great.

      Author's profile photo TANKA RAVICHANDRA
      TANKA RAVICHANDRA
      Blog Post Author

      Will share it..

      Thanks for reading my blog...

      🙂

      Regards,
      RaviChandra.

      Author's profile photo Daniel Ray
      Daniel Ray

      Hi,

      There is no input selection criteria which is related to this variable, but just the year and plant which are mandatory. This variable is for PO doc type. If the user select the year and the plant, he need to see a set of values related to the doc type and these set of doc type's are given in the ztable in zvar= a, zvar= b, zvar= c etc.

      I need to get only the PO's with these doc type's given in the ztable. But the user entry will not be dependent or selected during the input variable entry.

      My doubt is should the code be written in step 1 or step 2, as there is no relation to the input entered by the user.

      I_STEP = 1 is used when ther is need of default value in input parameter. This parameter may or may not be INPUT type and mandatory or Optional and Processing type must be Customer Exit.

      I_STEP = 2 is when there is need of calculating the value of variable by the value of another variable. The second variable Processing type Customer Exit, Not ready for input and mandatory.


      Can you please provide a sample link to get this requirement.

      thank you

      DR

      Author's profile photo Former Member
      Former Member

      Excellent explanation with diagrams, got it completely. Thanks

      Author's profile photo Wei Cui
      Wei Cui

      excellent blog!