ABAP - Create Text Table and Assign To The Main Table
ABAP - Create Text Table and Assign To The Main Table
2.
Enter the short description, delivery class and Data Browser/Table View Maint. as shown
below
3.
Go to the fields tab and enter the required fields with appropriate data elements.
4.
5.
6.
7.
8.
Similarly create the text table which should contain field with data element of type SPRAS,
a field to store the text and along with all the key fields of the main table.
9.
Now add foreign key for the MANDT, SPRAS and DPTCOD fields.
Note: Foreign key can be added to the field which has data element. Otherwise below message
will appear at the status bar.
c.
d. Click the copy button. Below message will appear at the status bar.
11. Repeat the steps in step #10 for the field SPRAS. The only difference will be the check table.
For SPRAS check table will be T002. Just copy the proposal.
Position cursor on DPTCOD field and click foreign key. Blank proposal screen will appear.
Enter the check table i.e. your main table and click the Generate Proposal.
b. Below details will appear. Just select the radio button Key fields of text table and enter
cardinality 1:N.
c.
Press copy button. Below message will appear at the status bar.
13. Save and activate the table. Now your text table is assigned to the main table.
Output:
In main table click goto -> Text table
Note : We can assign only one text table to the main table.