cancel
Showing results for 
Search instead for 
Did you mean: 

display message on variable screen

purvang_zinzuwadia
Active Participant
0 Kudos

Hi All,

I want use to input value for only one of the two variables and not both. I am using below FM but message is not being displayed.

I have added this code for step 3.

CALL FUNCTION 'RRMS_MESSAGE_HANDLING'

EXPORTING

I_CLASS = 'RSBBS'

I_TYPE = 'W'

I_NUMBER = '000'

I_MSGV1 = 'Year cannot be blank.'

EXCEPTIONS

DUMMY = 0

OTHERS = 0.

can anyone help on this?

regards,

purvang

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

you can try using a third variable. This variable is of type exit and you need to implement the I_STEP = 2 or 3 to

check if one of other variables has been set. Please check if this would work for you.

Regards Matthias Nutt

Former Member
0 Kudos

Hi Purvang,

In the properties of variable, set it as Mandatory so that query will not execute if nothing is entered in that field.

you can do this from query designer. go to that variable (under Restrictions). on the right pane, you can view the properties of variable.

now it might be selected as optional. change it to mandatoryu.

Cheers,

Srinath.

purvang_zinzuwadia
Active Participant
0 Kudos

thanks for reply.

but i cannot make it as mandatory as user can input any of the variable, if i make it mandatory then user will have to input both the variables; and what i want is to let user user input any one of the variables, if he inputs value for both variables then error message should come with "please input only one value, not both"

any idea?

purvang

purvang_zinzuwadia
Active Participant
0 Kudos

any help on this, experts?

Thanks,

Purvang

Former Member
0 Kudos

Hi Purvang,

did you check this thread. this might help you.

Regards,

Rk.

purvang_zinzuwadia
Active Participant
0 Kudos

Hi,

Matthias: I am already checking the variable value in second variable's exit code so there isnt any need to implement third one to check other two. But still i will check with I_STEP = 2 and let you know.

GK: I am using customer exit code but with little customization, here the code to be executed for a variable exit is contained in a class and when I use "RAISE no_replacement." it gives error that "There is no such exception as no_replacement" Can you give me some idea to force it from inside class method.

Thanks,

Purvang

Former Member
0 Kudos

Hi

Try with this


CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'E'
I_NUMBER = '000'
I_MSGV1 = 'Year cannot be blank.' .
raise again.

hope this helps

Sonal....

purvang_zinzuwadia
Active Participant
0 Kudos

HI,

thanks for replys, now I am able to show the message on screen with type 'E' but I am able to pass the message that means query still gets executed, any help on how to prevent this, I am executing query on web,

i have tried RAISE AGAIN but it does not work from class method, any other idea to raise exception

thanks and regards,

purvang

former_member595061
Contributor
0 Kudos

Hi Purvang,

Have you tried to set the variable to 'mandatory' in the variable definition? This way a value has to be entered in the variable screen and a message shows up if not. The users will not be able to pass the variable screen without entering a value.

Please check the following documentation:

http://help.sap.com/saphelp_nw70/helpdata/en/22/1e9b3c334d8c15e10000000a114084/frameset.htm

Best regards,

Janine

Former Member
0 Kudos

Try


  I_TYPE = 'I'

and


  I_TYPE = 'E'