‎2010 May 25 7:03 AM
Hi,
I want to validate one field in selection screen of select-options. This field does not have value table but Value Range is maintained in the domain of the field.. How to validate the field using this value range values..
Regards
Buddula
‎2010 May 25 7:30 AM
Hi Buddula,
The maintained values of the value range is stored in the table DD07T against the domain.
So you can validate the selection screen entry against the entry in table DD07T for that domain using the event AT SELECTION-SCREEN ON <SO_FIELD>-LOW & AT SELECTION-SCREEN ON <SO_FIELD>-HIGH .
Regards
Dillip
‎2010 May 25 7:08 AM
Hi,
if u use the same data element than system automatically validate the values .
Cheers,
Gaurav.
‎2010 May 25 7:12 AM
Hi Try like this.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_field name.
perform f4_help.
form f4_help.
write your logic to validate here and pass final internal table data to value_tab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WARPL'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'so_fieldname'
value_org = 'S'
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
endform.
Thanks.
Sai Sudarshan.
‎2010 May 25 7:17 AM
Hi Buddula,
You can use FM DD_DOMVALUES_GET for this purpose.
Regards, Gerd Rother
‎2010 May 25 7:29 AM
Hi Buddula,
You can use DD07L and table to Validate the Input
For more info on how write select queries go through the above tables
BEGIN OF ty_dd07l,
domname TYPE dd07l-domname, " Domain name
as4local TYPE dd07l-as4local,
valpos TYPE dd07l-valpos, " Domain value key
as4vers TYPE dd07l-as4vers,
domvalue_l TYPE dd07l-domvalue_l,
" Values for Domains: Single Value / Upper Limit
END OF ty_dd07l,
" in case you want the Text against the Value maintained at domain Levle
BEGIN OF ty_dd07t,
domname TYPE domname, " Domain name
ddlanguage TYPE dd07t-ddlanguage, " Language
as4local TYPE dd07t-as4local,
" Activation Status of a Repository Object
valpos TYPE dd07t-valpos, " Domain value key
as4vers TYPE dd07t-as4vers,
" Version of the entry (not used)
ddtext TYPE dd07t-ddtext,
" Short Text for Fixed Values
domvalue_l TYPE dd07t-domvalue_l,
END OF ty_dd07t.
data : ist_dd07l TYPE STANDARD TABLE OF ty_dd07l,
ist_dd07t TYPE STANDARD TABLE OF ty_dd07t.
SELECT domname as4local valpos as4vers domvalue_l
FROM dd07l
INTO TABLE ist_dd07l
WHERE domname = '"Your_Domain_name here
IF sy-subrc = 0.
SELECT domname ddlanguage as4local
valpos as4vers ddtext domvalue_l
FROM dd07t
INTO TABLE ist_dd07t
FOR ALL ENTRIES IN ist_dd07l
WHERE domname = ist_dd07l-domname
AND ddlanguage = c_en
AND as4local = c_a
AND domvalue_l = ist_dd07l-domvalue_l.
ENDIF.Cheerz
Ram
‎2010 May 25 7:30 AM
Hi Buddula,
The maintained values of the value range is stored in the table DD07T against the domain.
So you can validate the selection screen entry against the entry in table DD07T for that domain using the event AT SELECTION-SCREEN ON <SO_FIELD>-LOW & AT SELECTION-SCREEN ON <SO_FIELD>-HIGH .
Regards
Dillip
‎2010 May 25 8:11 AM
Hi Buddula,
Is your isue is solved or you need more info how to do that?
Regards
Dillip Sahoo
‎2010 May 25 8:43 AM
Hi Dileep,
Problem is solved..
Moderator message - Then please assign po1nts to helpful answers and mark it as closed. Also please tell ust what the solution was.
Edited by: Rob Burbank on May 25, 2010 9:31 AM
‎2010 May 25 11:35 AM
Hello,
It's better to close the thread once the problem is solved. Can you please close the thread. Just for information that's all.
Best Regards,
Prasad.
‎2010 May 25 8:28 AM
Hi Buddula,
If the value is range in the domain field, then it can be it will fall under intervals. Given this, your select-option S_FIELD will always have a value.
Let's say, in your SE11 > domain ZRANGE_DOM, has an interval value of Lower Limit A and Upper Limit Z, then A-Z will be the value of your S_FIELD.
If you have a value table, then you can validate the data entries AT SELECTION-SCREEN event.
AT SELECTION-SCREEN.
PERFORM f_validate_field.
FORM f_validate_field.
SELECT field
FROM VAL_TABLE "Table indicated in your SE11
WHERE field IN S_FIELD.
IF sy-subrc NE 0.
"Put your validation here if data not existing.
ENDIF.
ENDFORM.
Good luck.