‎2009 Mar 12 9:43 AM
I have a screen field in a dynpro where the domain has a fixed value range. The values shows up in the F4 help, but I can't figure out the best way to validate it in the PAI short of hardcoding, which I'd like to avoid.
Take for example a domain with possible values 'A', 'B', 'C', '1', '2' or '3'. These values pull through to the search help but I also need to validate manual user input against this list.
I understand the DDIC attribute for a screen element can do this, but that's not an option in this case as the name of the field does not match the name of a dictionary field. Any other suggestions?
Thanks
‎2009 Mar 12 11:05 AM
>
> I have a screen field in a dynpro where the domain has a fixed value range. The values shows up in the F4 help, but I can't figure out the best way to validate it in the PAI short of hardcoding, which I'd like to avoid.
>
> Take for example a domain with possible values 'A', 'B', 'C', '1', '2' or '3'. These values pull through to the search help but I also need to validate manual user input against this list.
>
> I understand the DDIC attribute for a screen element can do this, but that's not an option in this case as the name of the field does not match the name of a dictionary field. Any other suggestions?
>
> Thanks
If this field should only contain values from the domain fixed value range, why don't you make it into a drop down listbox field? This would make manual input impossible and all they can do is select values from the drop down list.
‎2009 Mar 12 9:54 AM
After input, retrieve the value from the input field and use FM SXMB_CHECK_DOMAIN_VALUES.
‎2009 Mar 12 10:40 AM
Hi,
May be you can check using the table as below
SELECT DOMVALUE_L DDTEXT FROM DD07T INTO TABLE LIST
WHERE DOMNAME = <domain name>
AND DDLANGUAGE = SY-LANGU.
Hope this is useful.
Regards,
Krishna.
‎2009 Mar 12 11:05 AM
>
> I have a screen field in a dynpro where the domain has a fixed value range. The values shows up in the F4 help, but I can't figure out the best way to validate it in the PAI short of hardcoding, which I'd like to avoid.
>
> Take for example a domain with possible values 'A', 'B', 'C', '1', '2' or '3'. These values pull through to the search help but I also need to validate manual user input against this list.
>
> I understand the DDIC attribute for a screen element can do this, but that's not an option in this case as the name of the field does not match the name of a dictionary field. Any other suggestions?
>
> Thanks
If this field should only contain values from the domain fixed value range, why don't you make it into a drop down listbox field? This would make manual input impossible and all they can do is select values from the drop down list.
‎2009 Mar 12 11:09 AM
Hi,
Use the table DD07T as it contans the values and text for fixed values in a domain.
In the PAI processing simple select from the table DD07T sa if it is a textbox with name txt1
select single domvalue_l into var1 where domname = <domain name> and ddlanguage = sy-langu and domvalue_l = txt1.
if sy-subrc <> 0.
error message.
endif.
Hope this helps.
Regards,
Sachin
‎2009 Mar 16 8:42 AM
Hi Chris,
Create the range for these values and check if not fields in the range then throw the error enter valid fields.Based on these you can validate.
Regards,
Sravanthi