This article elaborates how to create text table and assign this to the main table.
Steps:
1. Go to the transaction code SE11 and create 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. Save and activate the table, below pop up will appear.
5. Click continue and go to the technical settings .
6. Maintain the technical settings and save.
7. Now activate the table.
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.
10. Foreign key for MANDT :
a. Position cursor on MANDT field and click foreign key.
b. Below pop up will appear, click yes.
c. Below screen will appear.
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.
12. Foreign key for DPTCOD field.
a. 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
Below text table will appear
Main table contents would look like
Note : We can assign only one text table to the main table.
No comments:
Post a Comment