Skip to Content
0
Former Member
Jun 19, 2006 at 08:13 PM

BEx query question

16 Views

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