Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Generic input validity check against table/field

former_member185943
Participant
0 Kudos

Hello!

Is there some function or something which would enable checking of a value against ANY table/field (or domain) combination? This is tricky because there are numerous criteria types. For example, date and currency fields have specific formats, many fields have foreign key table, others have value table or fixed values list in domain...

I know that each of data types have specific functions. But I wonder is there something generic?

For example (note that this doesn't work):

DATA: l_value TYPE char132.
l_value = '20071231'.
CALL FUNCTION 'CHECK_VALUE'
  EXPORTING tablename = 'BSEG'
            fieldname = 'BLDAT'
            value     = l_value
  EXCEPTIONS invalid = 1.

Thanks in advance!

Regards,

Igor

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

the following function exists for domain controls : CHECK_DOMAIN_VALUES.

You can also take a look in program /SAPDMC/SAP_LSMW_CONV_DATA_CHK to find some ideas.

David

2 REPLIES 2

Former Member
0 Kudos

Hi,

the following function exists for domain controls : CHECK_DOMAIN_VALUES.

You can also take a look in program /SAPDMC/SAP_LSMW_CONV_DATA_CHK to find some ideas.

David

0 Kudos

Hi, David!

This function looks promising, but doesn't work. Whatever combination I enter (good domain-good value, bad domain-bad value, good domain-bad value...), I get WRONG_VALUE exception.

Thanks for your input!

Igor