Skip to Content
author's profile photo Former Member
Former Member

Check Table with Constant Field

I created table ZTEST with fields MANDT and MATNR, and also created check table MARA for field ZTEST-MATNR, so the current check logic is:

ZTEST-MANDT = MARA-MANDT and

ZTEST-MATNR = MARA-MATNR.

But I just wonder whether I can put one more creteria to only check a specified material type (MARA-MTART) such as 'ZAWA', and there is NO such a field MTART in ZTEST. That is, I want to put one more field from MARA for foreign key check, the new logic is:

ZTEST-MANDT = MARA-MANDT and

ZTEST-MATNR = MARA-MATNR and

MARA-MTART = 'ZAWA'.

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 03:28 AM

    Hi,

    Create a database view in the DDIC..With the conditions as MARA-MTART = 'ZAWA' in the selection conditions tab..

    Then use the view as the check table for the matnr field in your ztable..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:09 PM

    Thanks, but there is new problem, I have to create a new table ZTTTT for the new view (join MARA and ZTTT with condition MARA-MTART = 'ZAWA' ), because I just think I can NOT join MARA and ZTEST for the view, so I have to maintain ZTTTT for all 'ZAWA' article from MARA.

    So, If so, I just create ZTTTT, and check ZTEST with ZTTTT without any view creation.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 03:53 AM

    hi

    just in domain give the fixed value in the tab value range.

    i dont know whether it will solve your problem or not....

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.