cancel
Showing results for 
Search instead for 
Did you mean: 

Query - i_step issue

Former Member
0 Kudos

Hi,

I have a query that has only one filter (with 0CALMONTH).It´s working fine, because I´m using an variable with customer exit, in order to bring always the current month.

But now I´m facing a problem.User can delete the date filled by the exit, and the Infoprovider is quite huge, so the result is a very high time response ...

I tried to force in this exit to fill the 0CALMONTH with current month in case user decide to erase the suggested date.But, it´s not working .I even tried a dumb solution, but it seems to be not possible, is this right?After the user push "Ok" I can´t change the variables value?

Here´s the code:

if i_step = 3 or i_step = 2 or i_step = 1 or i_step = 0.

CLEAR l_s_range.

CLEAR e_t_range.

l_s_range-low = '200101'."sy-datum(6).

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

endif.

Any suggestions are welcome.

Kind regards,

Tomas Prusaczyk

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I don't know what you are trying to do, but I see this is not right.

<b>l_s_range-low = '200101'."sy-datum(6).</b>

if you are trying to do to test, then assign sy-datum

L_S_RANGE-LOW = sy-datum.

and if you don't have data for that data, then you can test as well by subtracting some days from the sy-datum.

L_S_RANGE-LOW = sy-datum - 45.

thanks.

Wond

Former Member
0 Kudos

Hi guys,

Well, I can´t set the variable to be mandatory, but as I said before, any "I_STEP" is working ...

It seems that it´s not possible to set any new value to some variable after confirming filter values( even when it´s blank ).I couldn't find any documentation about it( confirming it or not ), am I missing some step or something?

Thanks

Tomas

Former Member
0 Kudos

Thomas,

User exit variables usally not supposed to be ready for input. User exit variabels to derive based on input variable. In you case, you can validate input variable(if its blank) and raise an exception under <b>I_Step = 3</b>.

Using this option you can validate data.

Hope it helps

Srini

Former Member
0 Kudos

Thanks for your reply Srini.

I tried to impplement the i_step = 3 as you recommended without siccess.Here´s the code:

when 'VIGE025'.

CLEAR l_s_range.

if i_step = 1.

RAISE no_processing.

endif.

if i_step = 3.

if 'VIGE025' is initial.

RAISE EXCEPTION.

endif.

endif.

Thanks in advance.

Tomas

Former Member
0 Kudos

Hi Thomas,

Thy this code.


When ' VIGE025'
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

IF I_STEP = 3.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
         WHERE VNAM = 'VIGE025'.
    ENDLOOP.

      CLEAR L_S_RANGE.

    IF LOC_VAR_RANGE-LOW IS INITIAL.
        RAISE EXCEPTION<i><b>< Here you have to raise a error message></b></i>
    ENDIF.

ENDIF.

With above code, you can check and raise a message.

Hope it Helps

Srini

Former Member
0 Kudos

Hi Srinivas,

I can´t figure out what´s the problem ....

Even with your code it´s like this query is ignoring step 3.I changed to step 1 and the exception is raised ....

Any suggestion?

Thanks in advance.

Tomas

Former Member
0 Kudos

Thomas,

Use I_Step = 2 to change input values after input(OK). Instead cant you make variable entry mandatory...?

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

Srini