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: 

how to validate table entries for that table

Former Member
0 Kudos
178

i hav created one ztable se11.how to validate table entries for that table

2 REPLIES 2

prasanth_kasturi
Active Contributor
0 Kudos
111

hi,

create foreign key relation ships

do the following way

create a check table with key fields the fields which you want to check

create a foreign key relations with that table

the procedure is as follows

To create your check table:

Begin at the Dictionary: Initial Screen.

Type the table name in the Object Name field.

Choose the Tables radio button.

Press the Create button. The Dictionary: Table/Structure: Change Fields screen is displayed.

Type a short text, choose delivery class A, and tickmark Tab. Maint. Allowed.

Type the field and data element names at the bottom of the screen.

Tickmark both fields to indicate that they both form the primary key

.

Press the Save button on the Standard toolbar. The Create Object Catalog Entry screen appears.

Press the Local Object button. You are returned to the Dictionary: Table/Structure: Change Fields screen

.

Press the Technical Settings button on the Application toolbar. The ABAP/4 Dictionary: Maintain Technical Settings screen is displayed.

In the Data Class field, enter APPL0 (APPL0 with a zero, not APPLO with an alphabetic O).

Enter 0 (zero) in the Size Category field.

Press the Save button.

Press the Back button. You are returned to the Dictionary: Table/Structure: Change Fields screen.

Press the Activate button on the Application toolbar. The message "was activated" appears in the status

bar and the Status field contains the value Act..

Choose the menu path Utilities->Create Entries to enter data into your newly created check table. Enter six rows with land1 values of US, CA, DE, IT, JP, and AU.

Foreign Key Creation Procedure

To create a foreign key:

Begin at the Dictionary: Initial Screen.

In the Object Name field, type the name of the table that is to contain the foreign key .

Choose the Tables radio button.

Press the Change button. The Dictionary: Table/Structure: Change Fields screen is displayed.

Position your cursor on the field that is to become the foreign key

Press the Foreign Keys button on the Application toolbar. The Create Foreign Key screen will be displayed

Type a description of the foreign key in the Short Text field, for example, Country Code validation.

Type the name of the check table (-t005) in the Check Table field, or click on the down-arrow and choose it from the list.

The Change Foreign Key pop-up appears. It states Check table name was created or changed. Generate a proposal for field assignment? Press the Yes button.

You are returned to the Create Foreign Key screen. The check table field names and the foreign key field names are displayed. (The check table field names are -t005-mandt and -t005-land1. The foreign key field names are -lfa1-mandt and -lfa1-land1).

Press the Copy button. You are returned to the Dictionary: Table/Structure: Change Fields screen and the message "Foreign key was transferred" appears in the status bar. The Status fields contain the values Revised and Not saved.

Press the Activate button on the Application toolbar. The message "was activated" appears in the status bar. The values in the Status fields are now Act. and Saved.

reward if helpful

prasanth

Former Member
0 Kudos
111

HI,

TO VALIDATE THE INPUTS FOR TABLES.

u should create foreign key relationship between the tables.

When we built the cardinality between the two tables,

when we try to enter to enter the data in child table it cross checks with the check table or primary key table.

Plz rewards points if helpful,

Ganesh