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: 

Add a check table to a table control field.

Former Member
0 Kudos

Hello Everyone,

I have created a table control for one table and now I want to have a check table for one of the fields.
When the field is not valid, an error message should show up.

Can anyone provide me some input on how I can add a check table in a table control?

Thank you.
Best regards,
Elena

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi All,

I have managed to do the check by using in PAI below check:

CHAIN.
FIELD it_t77ua-profl.
MODULE check_field ON CHAIN-REQUEST.
ENDCHAIN.

Useful link:

http://help.sap.com/saphelp_46c/helpdata/EN/9f/dbaa4735c111d1829f0000e829fbfe/content.htm

Thank you both for the help.

Best regards,

Elena

4 REPLIES 4

loyd_enochs3
Participant

The first thing that comes to mind is linking the field to a check table at the Data Dictionary level, be it a foreign key link at the table level or a value table entry at the domain level. If the field involved is a custom Z-field, then it is an easy fix. If the field is an SAP standard field, then a more formal enhancement would be required.

But that is just a first blush answer. Others may have better ideas. Let us know how it turns out!

Best regards,

Loyd

Former Member
0 Kudos

Thank you for the suggestion.

I also thought of that but it doesn't work when the table control has the fields from an internal table.

Only if I mark them as dictionary fields and directly relate them with the table fields like below.

Before :

But now I have issues with reading the 'MARK' field.
Do you have any suggestion on this?
Thank you.

Best regards,

Elena

former_member182550
Active Contributor
0 Kudos

Rather that using a check table or whatever, how about using VRM_SET_VALUES to provide a drop down list. Populate the drop down list in your initialisation with valid values and then you don't have to validate the user selection because they can only pick those values. Another upside of that is that if the list of valid values changes dependant on the value of another field you can then reset the value list with the new values.....

Rich

Former Member
0 Kudos

Hi All,

I have managed to do the check by using in PAI below check:

CHAIN.
FIELD it_t77ua-profl.
MODULE check_field ON CHAIN-REQUEST.
ENDCHAIN.

Useful link:

http://help.sap.com/saphelp_46c/helpdata/EN/9f/dbaa4735c111d1829f0000e829fbfe/content.htm

Thank you both for the help.

Best regards,

Elena