cancel
Showing results for 
Search instead for 
Did you mean: 

BEx query question

Former Member
0 Kudos

Hi Experts,

I have a question about a query requirement. The query has variable entry for Value Type and Consolidation Group and based on Value type entered by the user I need to validate the Consolidation Group variable entry. If the value type entered is not #, then the user is not supposed to enter value for Consolidation Group. But if the user does it accidentally, then a warning message should pop up along with a variable screen pop up.

How can I do this? I tried the following.

I created a customer exit variable for Consolidation Group with entry Optional and ready for input.

if i_vnam = 'ZVC_CG1'.

clear y_var_range.

clear p_var_range.

IF I_STEP = 3.

LOOP AT I_T_VAR_RANGE INTO y_VAR_RANGE WHERE VNAM = 'ZVUVT1'.

loop at i_t_var_range into p_var_range where vnam = 'ZVUCGNOD'.

IF y_var_range-low ne '#' and p_var_range-low ne ' '.

CALL FUNCTION 'RRMS_MESSAGE_HANDLING'

EXPORTING

I_CLASS = 'ZCUST'

I_TYPE = 'W'

I_NUMBER = '000'

*I_MSGV1 = 'Cons Group Entry not allowed'.

EXCEPTIONS

dummy = 0

others = 0.

call function 'RRMS_MESSAGES_SHOW'.

CALL FUNCTION 'RRMS_MESSAGES_DELETE'.

ENDIF.

endloop.

endloop.

endif.

endif.

But nothing happens when I execute the query.

Can anyone guide me in the right path?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

edwin_harpino
Active Contributor
0 Kudos

hi Deepthi,

try if helps ...

  • break-point used for debug, remark the line after test

...

if i_step = 3.

break-point.

clear y_var_range.

clear p_var_range.

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZVUVT1' or VNAM = 'ZVUCGNOD'.

if LOC_VAR_RANGE-VNAM = 'ZVUVT1'.

y_VAR_RANGE-low = LOC_VAR_RANGE-low.

else.

p_VAR_RANGE-low = LOC_VAR_RANGE-low.

endif.

ENDLOOP.

IF y_var_range-low ne '#' and p_var_range-low ne ' '.

CALL FUNCTION 'RRMS_MESSAGE_HANDLING'

EXPORTING

I_CLASS = 'RSBBS'

I_TYPE = 'I'

I_NUMBER = '000'

I_MSGV1 = 'Cons Group Entry not allowed'.

RAISE no_replacement.

ENDIF.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Deepthi,

Try this..

IF I_STEP = 3.

IF ( i_s_rkb1d-compid CS '<Query Technican Name>').

After this use your normal code.

Step 3 is Query specific and not Variable specific so u need to give the Query name also.

LOOP AT I_T_VAR_RANGE INTO y_VAR_RANGE WHERE VNAM = 'ZVUVT1'.

loop at i_t_var_range into p_var_range where vnam = 'ZVUCGNOD'.

IF y_var_range-low ne '#' and p_var_range-low ne ' '.

CALL FUNCTION 'RRMS_MESSAGE_HANDLING'

EXPORTING

I_CLASS = 'ZCUST'

I_TYPE = 'W'

I_NUMBER = '000'

*I_MSGV1 = 'Cons Group Entry not allowed'.

EXCEPTIONS

dummy = 0

others = 0.

call function 'RRMS_MESSAGES_SHOW'.

CALL FUNCTION 'RRMS_MESSAGES_DELETE'.

Endif.

Endif.

Endif.