‎2010 Feb 08 3:13 PM
Hi Gurus,
I have developed a report.On the selection screen, there are some select options.
If I click on the arrow button for multiple selection,I get the error message "fill in all required entry field".
Even when I click on the Execute buttion,I get the error message.
In the debug mode, i checked sy-ucomm field, it contains value "#001".
I m not getting why this problem is coming up.
‎2010 Feb 08 3:30 PM
Hi,
Somewhere on the selection screen is a select-option that is mandatory. This has to be filled before anything else can be done, including adding additional values (the arrow button) or running the report.
Regards,
Nick
‎2010 Feb 09 7:17 AM
Hi,
maybe while writing the code for your selection fields you have made some of the selection fields as obligatory so that is why maybe this problem is occurring it will be better if you paste the piece of code that you have written for your selection screen it give a better idea as to what the problem maybe .
‎2010 Feb 09 7:27 AM
HI,
You must have made your Select Option as mandatory while creating the selection screen,
ie like:
Select-Options vbeln for vbak-vbeln obligatory. " Here this obligatory means it is kept mandatory for the user
If you remove this Obligatory from your code then it will not give any error message
else to avoid the error message you have to enter some value in the low area of the
select option then only you can move further.
Hope it helps
Regards
Mansi
‎2010 Feb 09 9:33 AM
The code is as below.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-004.
PARAMETERS : p_vkorg TYPE vbak-vkorg, "SALES ORGANIZATION
p_vtweg TYPE vbak-vtweg, "DISTRIBUTION CHANNEL
p_spart TYPE vbak-spart. "DIVISION
SELECT-OPTIONS: s_auart FOR vbak-auart, "SALES DOCUMENT TYPE
s_vbeln FOR vbak-vbeln, "SALES DOCUMENT
s_posnr FOR vbap-posnr, "SALES DOCUMENT ITEM
s_audat FOR vbak-audat OBLIGATORY. "SALES DOCUMENT DATE
PARAMETERS : p_usnam TYPE jcds-usnam, "USER NAME OF THE PERSON RESPONSIBLE IN CHANGE DOCUMENT
p_mill TYPE vbap-zz_mill_fico, "MILL AS PER FICO REQUIREMENTS
p_kunnr TYPE vbak-kunnr. "SOLD-TO PARTY
SELECTION-SCREEN END OF BLOCK b1.
In the code, only 1 field is mandatory... if we give some input to this field and click on another select option field lets say s_posnr or s_vbeln or s_auart or even EXECUTE button..the error message comes up
‎2010 Feb 09 9:45 AM
Hi tchand,
I tested the code that you have pasted here and I entered input for field s_audat which is declred as OBLIGATORY and I dont get any error after this.
The reason may be that this is a date field and you are probably not entering the right date format and it is then giving an error "Enter date in correct date format".So check the error that you are getting .
Enter the value to this obligatory field using f4 options and then try to execute, it will not give any error.
Edited by: Vasuki S Patki on Feb 9, 2010 3:15 PM
‎2010 Feb 09 9:45 AM
Hi,
As in the selection-screen you are having an obligatory field for vbak-audat, so first fill that field and click the extension for the different fields.
Hope your ploblem will be solved.
Regards,
Santosh
‎2010 Feb 09 10:20 AM
Hi tchand,
i copied your code , executed it and in the obligatory field once a entered a valid date it didn't give any error so i guess there may be some problem in your code maybe you must have done some other validations in your code for some particular conditions so please check the code .
‎2010 Feb 09 10:17 AM
I m passing date range of last 31 days thru initialization in S_AUDAT.The requirement is that user must enter at least one of the other criteria other than s_AUDAT, on the selection screen.If user dont give atleast one other criteria, error message should comes up that "Please enter at least one other criteria other than s_audat".
I have written code for this :
IF NOT s_audat IS INITIAL.
IF s_auart IS INITIAL
AND p_vkorg IS INITIAL
AND p_vtweg IS INITIAL
AND p_spart IS INITIAL
AND s_auart IS INITIAL
AND s_vbeln IS INITIAL
AND s_posnr IS INITIAL
AND p_usnam IS INITIAL
AND p_mill IS INITIAL
AND p_kunnr IS INITIAL.
MESSAGE e000 WITH text-001 text-002.
ENDIF.
If I comment this code,my selection screen works properly...I dont get error message when try to click on multiple selection button..
But I get error msg, when I try to click on multiple selection button...which should not comes up...
‎2010 Feb 09 10:23 AM
Hi,
in the above code use "OR" instead of "and" during the use of " if condition " and i hope it will solve your problem.
‎2010 Feb 09 10:37 AM
tchand,
I am not able to understand your requirememnt completely.
You are saying that you need error message when user does not enter any other criteria otehr than the date and hence you are getting the error.
...I dont get error message when try to click on multiple selection button..
But I get error msg, when I try to click on multiple selection button...which should not comes up...
This statement is not clear.
‎2010 Feb 10 8:11 AM
Hello,
Replace the code IF NOT s_audat IS INITIAL. with if not sy-ucomm = <code of the arrow button>.
Now your remaining fields will be checked when you execute or hit any other button other then the arrow key on t date selection.
So your code will be something like
IF not sy-ucomm = <function code for arrow on date parameter>
IF s_auart IS INITIAL
AND p_vkorg IS INITIAL
AND p_vtweg IS INITIAL
AND p_spart IS INITIAL
AND s_auart IS INITIAL
AND s_vbeln IS INITIAL
AND s_posnr IS INITIAL
AND p_usnam IS INITIAL
AND p_kunnr IS INITIAL.
MESSAGE 'Error' type 'E'..
ENDIF.
endif.
Check the sy-ucomm in debugging when you hit the arrow key. .
Hope this helps.
Regards,
Sachin
Edited by: Sachin Dargan on Feb 10, 2010 9:13 AM
‎2010 Feb 10 7:40 AM
User wants that the selection must include date range(s_audat) and minimum one of the other criteria.Then only the report should run..
On the selection screen, there are 10 fields..out of which s_AUDAT field is mandatory
and thru initialisation I have passed some values into it..
Now if user do not give atleast one other selection rather than s_audat, error msg should comes up..
so I have written above code as per user's requirement...so that if user do not give atleast 1 other criteria than s_audat,error message is coming up..
Now the problem is...I noticed something else, IF I press any of the 'Multiple selection' buttons I get error message that 'Enter at least one criteria other than creation date'. I think this error message should only appear if conditions aren't fulfilled when pressing the execute button"
so that was my requirement and the problem against it..
‎2010 Feb 10 7:50 AM
I tested the code provided by you and it does not give any error on clicking the 'Muliple selection' button.
I guess you have addition field validation in your report.
This is the code for your reference.
TABLES : vbak , vbap.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-004.
PARAMETERS : p_vkorg TYPE vbak-vkorg, "SALES ORGANIZATION
p_vtweg TYPE vbak-vtweg, "DISTRIBUTION CHANNEL
p_spart TYPE vbak-spart. "DIVISION
SELECT-OPTIONS: s_auart FOR vbak-auart, "SALES DOCUMENT TYPE
s_vbeln FOR vbak-vbeln, "SALES DOCUMENT
s_posnr FOR vbap-posnr, "SALES DOCUMENT ITEM
s_audat FOR vbak-audat OBLIGATORY. "SALES DOCUMENT DATE
PARAMETERS : p_usnam TYPE jcds-usnam, "USER NAME OF THE PERSON RESPONSIBLE IN CHANGE DOCUMENT
*p_mill TYPE vbap-zz_mill_fico, "MILL AS PER FICO REQUIREMENTS
p_kunnr TYPE vbak-kunnr. "SOLD-TO PARTY
SELECTION-SCREEN END OF BLOCK b1.
IF NOT s_audat IS INITIAL.
IF s_auart IS INITIAL
AND p_vkorg IS INITIAL
AND p_vtweg IS INITIAL
AND p_spart IS INITIAL
AND s_auart IS INITIAL
AND s_vbeln IS INITIAL
AND s_posnr IS INITIAL
AND p_usnam IS INITIAL
AND p_kunnr IS INITIAL.
MESSAGE 'Enter at least one criteria other than creation date' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
ENDIF.
‎2010 Feb 10 1:33 PM
Hi Sachin,
I tried the way to told...but it is still throwing error ,,
‎2010 Feb 11 3:13 AM
Hi,
As explained by others the error is occuring due to the OBLIGATORY.
In order to avoid this error while clicking on the EXTENSION button, remove the obligatory from SELCTION SCREEN.
But make it as MANDT by modifying the SCREEN field values in
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CS 'S_XXXX.
screen-required = 1. " this will enable the MANDT field check
MODIFY SCREEN.
ENDIF.
ENDLOOP.This will solve ur issue.
Let me knwo if you are not clear.
‎2010 Feb 11 3:40 AM
Hello,
I have done this and it is working fine. Please check your code once again.
Regards,
Sachin
‎2010 Feb 10 3:05 PM
There might be any mandatory fields before that select-options to be filled.
Or any at selection-screen event for the field before select option.
‎2013 Nov 19 10:53 AM
If anyone else suffers this annoying feature, the nicest solution I have seen is this:
AT SELECTION-SCREEN.
IF sy-ucomm = 'XXXX' "The code(s) to leave the screen
AND ( YYYY IS INITIAL OR ZZZZ IS INITIAL )
MESSAGE 'Please fix missing data'(E01) TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.