cancel
Showing results for 
Search instead for 
Did you mean: 

BW Variable Customer Exit I_STEP 3

former_member195980
Active Participant
0 Kudos

Can anyone tell me under what circumstances I_STEP 3 is called to validate a variable input.

Thank you,

Beat

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I_STEP = 0

Some time we can use this to select info package selection variable.

Some time used to find the filter values in the navigation block

The most important use of this step is used to filled variables that are used in the authorizations. Enhancement is not called from the variable screen. The call can come from the authorization check or from the Monitor.

I_step = 1

is for variable to assign default values and this is exit is called once per user customer exit type variable. If you want to assign a default value for another existing input variable  then you need to create another new customer exit variable that are ready for input.

I_step = 2

is for variable without user entry input. Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1. Some times this makes confusion for user to enter the value if the variable is ready for input. So we have to make sure that variable not ready for input or send error message if any entry made by user.

I_Step = 3

is not called by each variable but only once. When it is called all the variable content transferred for validation purpose. So you can check period from is smaller than or equal to period_to provided the two different value not from interval, but from  two different variable as input. Triggering  an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called

again.

0 Kudos

Did anybody get what all exceptions are allowed with the raise clause in i_step 3?

The SAP help gives the example of "RAISE no_processing."[Without any explaination of what it does]

Has anyone used any other raise exception ?

Which is the Raise Statement to call the variable screen again?

former_member93896
Active Contributor
0 Kudos

Hello Mangesh,

you made a good observation. Actually, there are no exceptions defined for this function call. So you can use anyone you want. BW will catch them with exception "OTHERS" and treat them all the same.

Regards,

Marc

SAP NetWeaver RIG

Former Member
0 Kudos

Marc, I have the same problem but the syntax checker doesn't accept OTHERS or anything else.

Former Member
0 Kudos

Hi

with I_STEP = 3

In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.

Please have a look at the link below,

http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm

Thank you

AP

Former Member
0 Kudos

Hello,

I am trying to understand the I_STep=3 thing.

I think, when a user enters a value at variable popup and if you want to do validations on it before deriving any other value from it, u write code under I_Step = 3 and then if the value is not vaild u raise an exception, pop up comes again, and if a valid i/p is given the control goes to I_step =2 to determine the value.

Am I correct.?

Can anyone provide a sample code so that I can understand the functionality of I_Step = 3 better.

Thanks

Raj

Former Member
0 Kudos

The enhancement RSR00001 (BW: Enhancements for Global Variables in

Reporting) is called up several times during execution of the report. Here,

the parameter I_STEP specifies when the enhancement is called up.

The following values are valid for I_STEP:

· I_STEP = 1

Call up takes place directly before variable entry

· I_STEP = 2

Call up takes place directly after variable entry. This step is only started

up when the same variable could not be filled at I_STEP=1.

· I_STEP = 3

In this call up, you can check the values of the variables. Triggering an

exception (RAISE) causes the variable screen to appear once more.

Afterwards, I_STEP=2 is also called up again.

· I_STEP = 0

The enhancement is not called from the variable screen. The call up can come

from the authorization check or from the Monitor.

hope it helps.

Former Member
0 Kudos

Let me try to explain you with an example

I have the following scenario our fiscal period starts in Oct so it is 001.2005.

So if a user runs a report in period 003.2005 the report must report for the periods 001.2005, 002.2005 & 003.2005.

If the user reports in 005.2005 the report must report for the period 004.2005 and 005.2005 which is the second fiscal quarter. Similarly, if the user reports for period 011.2005 it must report for the periods 010.2005 & 011.2005 which is the fourth fiscal quarter.

Now in order to do this task i used variable exits

First create a variable of type customer exit and write the code in Program(Include) ZXRSRU01.

Code looks like this.

In the code try to put this logic

dat1 = fisc period u supplied (say 3.2005)

dat2 = dat1+4(2) " i.e 3

like this for four querters u have to define and supply the values dat3 and dat1 in low and high selections.

WHEN 'ZE_CALMT'.

IF I_STEP = 3.

If Qarter = 1.

Concatenate dat1(4) 01 into dat3. " 200501

dat1 " 200503 which is supplied by user

elseif querter = 2

Concatenate dat1(4) 04 into dat3. " 200501

dat1 " 200503 which is supplied by user

etc

L_S_RANGE-LOW = DAT3

L_S_RANGE-HIGH = DAT1

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

ENDLOOP.

ENDIF.

I_STEP = 3

In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again from the authorization check or from the Monitor.

If you have specific problem please do let me know.

Regards

vijay

Message was edited by: sundaresan chander

former_member195980
Active Participant
0 Kudos

Here my actual problem:

There are 16 periods used in R/3. When executing a report with period 12, the entered value in the variable should be changed to period 16 to cover the whole fiscal year.

I could do this in I_STEP 2 by derivating a second variable which is not ready for input. But it would be easier to just have one variable in the query.

So I tried to change the value in I_STEP 3. But when debugging the exit for this query, there is no stop for I_STEP 3. Does this in general not work for variables wich are ready for user input?

In your example, does the user input directly in variable ZE_CALMT, or is this a derived variable without user input?

Thank you,

Beat

former_member93896
Active Contributor
0 Kudos

Beat,

you can not change any variables in the exit that are ready-for-input. You mentioned the correct way of doing it yourself: derive a second variable from the one that the users enters.

Regards

Marc

SAP NetWeaver RIG

Former Member
0 Kudos

Hello sundaresan chander,

1.) In your reply, you used the I_Step = 3, for calculating the interval for the periods. is there any specific reason for doing so?.

can we not use I_Step = 2 for this?

what is the difference?

2.) quarter = 1. can you please explain that.? how would the system determine at run time the present quarter.

Please explain.

thanks in advance.

Raj

0 Kudos

Hi Sundaresan,

we have requirement like this, we have start and end dates where in based on this two dates we need to derive cal quarter and for an input variable as well.

we need to consider example:  start date = >01.01.2014 and end date = <31.03.2014.

Could you please help me with the code.

Regards,

Srikanth P