on 07-28-2009 7:10 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
Try
I_TYPE = 'I'
and
I_TYPE = 'E'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.