‎2013 Oct 29 2:15 AM
Customer Group Code values are stored in VBKD-KDGRP. What about Customer Group Text/Description values? Where are they stored?
Background: When I created an InfoSet that returns VBKD-KDGRP, I noticed that TEXT_VBKD_KDGRP was automatically included in the InfoSet. I'm not sure why that happens. More importantly, however, I'm not sure where the description (i.e., the TEXT value) is stored.
‎2013 Oct 29 4:12 AM
Hi-
Texts added in any order will be stored in STXH table. One cannot directly read text from this table, in fact we need to standard function module 'READ_TEXT' to read the text objects content.
Structure of this FM:
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id =
language =
NAME =
OBJECT =
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
* OLD_LINE_COUNTER =
TABLES
lines =
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* NOT_FOUND = 4
* OBJECT = 5
* REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
To find the parameters of the text object just double click on your text objects editor and from there use menu path GOTo->Header where you can find the required information.
If your text object is available at the header level then your text-id will be your Order Number, else if it's at the item level then text-id will be combination of both Order and Item.
Hope this helps!
-Venkat
‎2013 Oct 29 4:20 AM
‎2013 Oct 29 4:47 AM
‎2013 Nov 05 4:43 PM
Thanks, Venkat, Sijin, and Kiran.
Venkat says that the the text cannot be directly read...whereas Sijin and Kiran say that it can. Which method is correct?
Update: Querying table T151T is working well for me.
‎2013 Nov 05 4:56 PM
Hi Chris,
If you look at the definition of field VBKD-KDGRP in SE11 you'll find it has a foreign key of table T151, and if you look at table T151 you'll find its text table is T151T. It is this relationship that is being used to populate TEXT_VBKD_KDGRP.
While everything in Venkat's answer is technically accurate, it's not relevant as I (and Sijin and Kiran) understand your question.
regards,
Nick
‎2013 Nov 05 5:04 PM
Hello Chris,
I apologize! actually I am referring to Order texts, please go ahead with the solution proposed by the other forum members.
-Venkat
‎2013 Nov 06 2:59 AM
Thanks, Nick. I'm still finding my way around SE11.
For VBKD, field KDGRP has a 'Check table' value of T151. Does a value in that column indicate that the field is a foreign key...and that the primary table is the value in the column?
I examined table T151 and noticed that it has a KDGRP field. I never would have guessed that this table had a relationship to another (i.e., text) table by the name of T151T. Since you mentioned it, however, I clicked around and found it in Goto > Text Table.
I understand why the text is stored in a table outside of VBKD...but what's the reasoning of there being *two* tables? i.e., T151 and T151T?
‎2013 Nov 06 3:00 AM
‎2013 Nov 06 4:55 AM
Hello Chris,
In VBKD table, field KDGRP has a 'Check table' value of T151. Does a value in that column indicate that the field is a foreign key...and that the primary table is the value in the column?
Goto SE11, table name VBKD, put your cursor on field KDRGP and select 'Foreign Keys' button. This will give you check table for field KDGRP.
Foriegn Key Description:
A foreign key creates a link between two tables T1 and T2. Every primary key field from T1 (check table) is assigned a field from table T2 (foreign key field). The fields from T2 assigned to primary key fields are marked as foreign key fields.
The most important function of the foreign key is the support of data integrity. The foreign key fields can only accept values which appear in the primary key of the check table. During input the values of the foreign key fields can thus be checked against the entries of the assigned key fields of the check table.
Foreign keys are also the foundation for defining lock objects, maintenance views and help views. These objects contain fields from several tables. All the tables used in such an object must be linked with foreign keys
I understand why the text is stored in a table outside of VBKD...but what's the reasoning of there being *two* tables? i.e., T151 and T151T?
Hence in this case T151 is the master table holding all the Customer Groups, that's the reason why VBKD-KDGRP will refer T151 table.
Now purpose of T151T -> Here you can maintain description for Customer Groups in multiple languages(Key fields: SPRAS and KDGRP). If this table is not available then only one description can be possible.
Hope this is clear now...
-Venkat