on 04-16-2009 2:27 PM
Hi,
I got requirement like need to through a message,
Let us say, while running the query date characterstic has created a variable with multiple selections.
User can give From Date to To Date, I need to through a message if " From Date to To Date" is more than 7 days. You have selected more than 7 days like that message.
If possible what is the neccessary code to write in exit in order to populate the message.
Could you please provide me the information regarding the same.
thanks for your support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andre,
Thank You Very Much for your quick response.
I'm aware of I_STEP =3, where we can validate the user input data. But I'm not sure we can raise pop-up saying that you entered wrong values.
Could you please provide me the code for the following.
I've range date field i.e From and To Values. User has to select only period for 7 days. Let us say if selects April 1st 2009 to April 15th 2009.Then I need to raise pop-up like "You have entered more than 7 days, Please enter period 7 days only" like that.
I'll assign full points for this.
Data : l_begin_date TYPE d,
l_end_date TYPE d,
l_duration TYPE i,
wa_range TYPE rrs0_s_var_range.
Case i_vnam.
when 'Variable'.
IF I_STEP = 3 .
Read table I_T_VAR_RANGE INTO wa_range with key VNAM = 'variable'.
If sy-subrc = 0.
l_begin_date = wa_range-low.
l_end_date = wa_range-high.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = l_end_date
i_datum_von = l_begin_date
IMPORTING
e_tage = l_duration.
If l_duration GE 7.
L_MSGV1='User has to select only period for 7 days '.
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'E'
I_NUMBER = '000'
I_MSGV1 = ' L_MSGV1'
EXCEPTIONS
DUMMY = 0
OTHERS = 0.
RAISE NO_PROCESSING.
SY-SUBRC = 4.
endif.
endif.
endif.
endcase.
When user enters more than 7 days, a pop up comes telling him not to enter more than 7 days.
Please note i didn't test the code, check code for any syntax error.
Hope this helps..
/Pradeep
Hello,
please take a look for this link:
http://help.sap.com/saphelp_nw04s/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/frameset.htm
Buy,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
yes you can. You can use the step 3 in the customer exit (cmod) for analyzing the entered user data.
Buy,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.