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: 

fixed value in table value range

Former Member
0 Kudos

hi,

if i write a z-program to upload data to table, may i know how to check the validity of data if the value is stored in the same table but inside the value range of 1 of the field.

for example, i want to upload data to table jxyz. in this table, there is a field called jfrm where the fixed value in this field is P, L and X.

how in the z-program i need to check. if the field value in the internal table to upload to jxyz-jfrm is not the value in the fixed value in value range.

normally we can check with master table but if the value is maintained in value range of the same table, what method i can use to check?

normally i use select single statement to check but i do not think i can use this to check value in value range.

i need to check the cirrectness of data before i use sql update to pump in the table.

please advise.

thanks

1 ACCEPTED SOLUTION

vinod_vemuru2
Active Contributor

Hi U have to do ur validations against table DD07L. This table has all fixed values given in any domain.

Do like this.


SELECT domname domvalue_l INTO TABLE i_dd07l
FROM dd07L WHERE domname EQ 'UR Ztable field domain name.

LOOP AT uruploaded data INTO wa.
READ TABLE i_dd07L WITH KEY domvalue_l EQ wa-urfieldvalue to be updated(i.e validation field value)
TRANSPORTING NO FIELDS.
IF sy-subrc IS INITIAL.
upload data to Ztable
ELSE.
Populate error log.
ENDIF.
ENDLOOP.

Thanks,

Vinod.

3 REPLIES 3

vinod_vemuru2
Active Contributor

Hi U have to do ur validations against table DD07L. This table has all fixed values given in any domain.

Do like this.


SELECT domname domvalue_l INTO TABLE i_dd07l
FROM dd07L WHERE domname EQ 'UR Ztable field domain name.

LOOP AT uruploaded data INTO wa.
READ TABLE i_dd07L WITH KEY domvalue_l EQ wa-urfieldvalue to be updated(i.e validation field value)
TRANSPORTING NO FIELDS.
IF sy-subrc IS INITIAL.
upload data to Ztable
ELSE.
Populate error log.
ENDIF.
ENDLOOP.

Thanks,

Vinod.

Former Member
0 Kudos

Hi,

You can use the table DD07L. Its contains the values of the domain.

Another Table is DD07T which stores Texts for Domain Fixed Values .

Reward if helpful.

raymond_giuseppi
Active Contributor
0 Kudos

You may use function module CHECK_DOMAIN_VALUES to check value of a domain. (this function module use DD07L data)

Also don't forget there are values and ranges in this table.

You may also generate the maintenance dialog of the table you want to fill. and then analyze the generated program to copy the validation rules (domain, foreign keys, etc.)

Regards