Application Development and Automation 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: 
Read only

Check Table

bjorn-henrik_zink
Contributor
0 Likes
1,626

Hi,

I want to create a check table for a data type. Here is what I have created so far:

data type: ZDAT (Domain ZDOM)

domain: ZDOM (Value Table)

table: ZTAB (Containing field ZFIE with field type ZDAT)

I try to create a foreign key for the ZFIE but receive the following message:

<i>

Check table of the domain is current table (FK maintenance not possible)</i>

Finally, I have created a report containing a field that points to ZDAT. The value table is working fine, but there is no check on the field.

Anybody who knows how I can get the check working?

Thanks.

Elvez

13 REPLIES 13
Read only

Former Member
0 Likes
1,413

Elvez,

If u used value table means it proposes a check table when u create a foreign key. But it does not validate the values.

- Selvapandian Arunachalam

Read only

Former Member
0 Likes
1,413

For do a check the possible way is to write a

select single query with the key fields passing in where clause.

. You can write this code on AT-SECLECTION-SCREEN.

rgds,

TM

Read only

0 Likes
1,413

Hi Thomas,

is there anyway to do this without programming?

/Elvez

Read only

0 Likes
1,413

Elvez,

in the parameter, use <u><b>value check</b></u> addition. automatically it will check against the corresponding database table.

- Selvapandian Arunachalam

Read only

0 Likes
1,413

Hi,

you need to validate explicitly in your program under the event <b>at selection-screen.</b>

using the

select single * from ztab into wa where <condition>.

Regards

vijay

Read only

0 Likes
1,413

Hi Selvapandian Arunachalam,

it is not working for me, could you provide an example?

/Elvez

Read only

0 Likes
1,413

Hi Vijay,

see answer above - is it possible to do this without further programming?

/Elvez

Read only

0 Likes
1,413

Ok, Sorry.please ignore.

Regards

vijay

Read only

0 Likes
1,413

Hi Elvez,

The 'Value Check' option is for a selection screen parameter.. to quote SAP help " It Ensures that the value entered in the field is checked against the check table or fixed values defined in the ABAP Dictionary. There must be a LIKE reference to an ABAP Dictionary field. "

How have you declared the field ZFIE in your Program?

Regards,

Suresh Datti

Read only

0 Likes
1,413

Hi Suresh,

that might be it - I have declared ZFIE type ZDAT.

/Elvez

Read only

0 Likes
1,413

Hi Elvez,

Sorry, I'm left for the day that time.

Syntax:

PARAMETERS: <<i><b>Parameter variable</b></i>> like <<i><b>Database table</b></i>>-<<i><b>field name</b></i>> VALUE CHECK.

Ex:

PARAMETERS: P_MATNR like MARA-MATNR VALUE CHECK.

It will check against the DDID table.

Read only

0 Likes
1,413

Hi,

this time I am the one apologizing for having left for the day.

The code did not check anything when I entered a non-sense value? How come?

/Elvez

Read only

0 Likes
1,413

Hi Elvez,

try this

Parameters : p_var <b>type</b> mara-WRKST value check.

this wud provide an automatic check...