2008 May 21 1:37 PM
i hav created one ztable se11.how to validate table entries for that table
2008 May 21 1:42 PM
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
2008 May 21 1:45 PM
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