cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Selection in the variables

Former Member
0 Kudos

Hello BI experts,

I have two variables. user should be selecting only one of them. if 1 selected then should not be selecting 2. and vice versa.

how to achieve this functinality. Is it possible to it in BI 7.0?

Thanks in advance,

BWer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I dont think we can acheive this requirement. Coz you asking about event driven on ABAP. That is when the user is enter the variable 1, then immediately we have to hide or deactivate variable 2.

Event driven is possible in ABAP. But in this place i think it is not possible.

Instead of this you can do like this. Lets provide two variable inputs. At the time of execution, we can take one variable value based on customer exit.

For example, user is entered variable1. Then we have to take only variable 1 value even he enter the variable two value. Or if variable1 is blank choose variable 2 value.

Like this we can acheive.

Regards,

Vivek V

Former Member
0 Kudos

Hi Vivek/Bwer,

But customer exit solution suggested would not be good from user /maintenance point of view...

If user knows that there has to be one entry in either of two variables, then I think best way is to raise error message thru validations in i_step = 3...

Do this solution has any drawbacks or cannot we achieve this?

Thanks

Gaurav

Former Member
0 Kudos

Hello BI Experts,

Is there any code regarding the same ? Could you please share code for raising an error in I_step = 3. Please share.

Thanks in advance,

BWer

Former Member
0 Kudos

Basically you have to write the valdations in i_step = 3 and then raise error message if your validations fails....then pass messages to FM as described below::

chk the link below:

Code Sample:

IF i_step = 3.

READ TABLE i_t_var_range WITH KEY vnam = 'ZUOM' INTO

l_s_var.

IF sy-subrc = 0.

TRANSLATE l_s_var-low TO UPPER CASE.

Write your code for validation based on your requirement.

IF <check is failed then trigger an error message as below>

  • Error: Please enter a valid entry

l_msgv1 = 'Unit of measure not exists:'.

l_msgv2 = l_s_var-low.

l_msgv3 = 'Please enter a valid unit of measure.'.

CALL FUNCTION 'RRMS_MESSAGE_HANDLING'

EXPORTING

i_class = 'I9'

i_type = 'E'

i_number = '000'

i_msgv1 = l_msgv1

i_msgv2 = l_msgv2

i_msgv3 = l_msgv3

EXCEPTIONS

dummy = 0

OTHERS = 0.

CALL FUNCTION 'RRMS_MESSAGES_SHOW'.

CALL FUNCTION 'RRMS_MESSAGES_DELETE'.

sy-subrc = 4.

ENDIF.

ENDIF.

I am sure there would be more on help.sap.com or SDN..

let me know if you still face any issue..

Gaurav

Assign pts if it helps..

Former Member
0 Kudos

Hi Bwer,

How you were able to achieve this??

thanks

Gaurav

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can do validations for variables in i_step = 3.

There I think you can check if value for one exist then raise message if value fo second also exist

Not sure, but you can try..

thnx

Gaurav

Former Member
0 Kudos

Any one who had this scenario please help.