I need to get the associated data element descriptions of all the fields in a table. I think there's a way to do that using the SELECT statement.
Can you please give me in detail, the various steps and methods to find the corresponding SAP tables and fields for a particular transaction code, for example (CS03).
Do the following 2 steps. Then create your ABAP program accordingly with the SELECT statement.
1. From table DD03L, give your tablename and get all of its field names and corresponding data element names.
2. From table DD03T, get the description of each data element you have got in step 1.
Then Use Function Module DDIF_FIELDINFO_GET
The sample program will look like this:
REPORT ZTABLEFIELDNAME.
TABLES: DFIES,
X030L.
DATA: BEGIN OF INTTAB OCCURS 100.
INCLUDE STRUCTURE DFIES.
DATA: END OF INTTAB.
PARAMETERS: TABLENM TYPE DDOBJNAME DEFAULT 'MSEG',
FIELDNM TYPE DFIES-FIELDNAME DEFAULT 'MENGE'.
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = TABLENM
FIELDNAME = FIELDNM
LANGU = SY-LANGU
* LFIELDNAME = ' '
* ALL_TYPES = ' '
* IMPORTING
* X030L_WA = WATAB
* DDOBJTYPE =
* DFIES_WA =
* LINES_DESCR =
TABLES
DFIES_TAB = INTTAB
* FIXED_VALUES =
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE:/ 'Field name not found'.
endif.
LOOP AT INTTAB.
WRITE:/ INTTAB-TABNAME, INTTAB-FIELDNAME, INTTAB-FIELDTEXT.
ENDLOOP.
*** End of Program
OR
Step 1.
Run the transaction and click on System -> Status. Note the program name shown under the transaction code.
Step 2.
Run SE49 and enter the program name you identified in step 1 (SAPLCSDI) and then press enter.
This will identify the tables used, however, as you want to know the fields used as well then you may have to resort to looking at the actual code (get a developer involved if you're not one) using transaction SE80.
In this case the transaction CS03 is assigned to a screen with a function group so it's a slightly tricker process, hence the need for a developers service.
For all the tables, descriptions and fields you can refer to these tables:
DD02L : ALL SAP TABLE NAMES
DD02T : DESCRIPTION OF TABLE NAMES
DD03L : FIELDS IN A TABLE.
Friday, April 18, 2008
How to get the field descriptions of a table? SAP ABAP INTERVIEW Questions
Posted by Anonymous at 6:35 AM
Labels: ABAP Interview Questions
Subscribe to:
Post Comments (Atom)
Content
-
►
2009
(2)
- ► 09/06 - 09/13 (1)
- ► 03/01 - 03/08 (1)
-
▼
2008
(207)
- ► 11/23 - 11/30 (1)
- ► 04/20 - 04/27 (70)
-
▼
04/13 - 04/20
(51)
- Difference Between Select-Options & Ranges SAP ABA...
- Inner Join to retrieve the Material Valuation Clas...
- How to used 3 tables for inner joins? SAP ABAP INT...
- Protect Selection/Parameters SAP ABAP INTERVIEW Qu...
- Difference Between Select Single and Select UpTo O...
- Select statement with inner join is taking forever...
- How can we give dynamic table name in select state...
- Performance tuning for Data Selection Statement SA...
- What's the purpose of using PACKAGE SIZE in select...
- Usage of 'for all entries' in Select Statement SAP...
- ABAP Self Test Q & A SAP ABAP INTERVIEW Questions
- What is the difference between SMOD and CMOD? SAP ...
- Split String into two parts at delimiter SAP ABAP ...
- String Handling in ABAP - Removing Unwanted Char S...
- System Fields for Details Lists SAP ABAP INTERVIEW...
- System Landscape: SAP ABAP INTERVIEW Questions
- System Landscape1 SAP ABAP INTERVIEW Questions
- Table Maintenance Generator SAP ABAP INTERVIEW Que...
- TABStrips in ABAP SAP ABAP INTERVIEW Questions
- ABAP Tips and Tricks SAP ABAP INTERVIEW Questions
- Tree type report in ABAP SAP ABAP INTERVIEW Questions
- Explain Unicode-enabled ABAP program SAP ABAP INTE...
- Source Code Listing SAP ABAP INTERVIEW Questions
- What is User Exits and Customer Exits? SAP ABAP IN...
- A Short Tutorial on User Exits SAP ABAP INTERVIEW ...
- Program to Test Line Selection & Scrolling within ...
- Creating new program via ABAP SAP ABAP INTERVIEW Q...
- Program to Hide ABAP's Source Code and Protects it...
- Protect part of ABAP code from modifying SAP ABAP ...
- How to delete an editor lock? SAP ABAP INTERVIEW Q...
- Check Length and Alpha Numeric Variable SAP ABAP I...
- Run or Display ABAP Report over the web SAP ABAP I...
- Working on Polymorphism SAP ABAP INTERVIEW Questions
- How to Write Web Reports in SAP SAP ABAP INTERVIEW...
- Steps to Creating domains, Data Elements, Tables S...
- Function to Display All the Columns of any Table W...
- Difference between Work Area and Header Line SAP A...
- The Different Types of SAP Tables
- Difference between a check table and a value table...
- Quick Note on Design of secondary database indexes...
- How to get the field descriptions of a table? SAP ...
- What is use of using HASHED TABLE?
- How to create a Dynamic Internal Table or Array? S...
- Which table is the developer key stored in? SAP AB...
- What is use of using HASHED TABLE? SAP ABAP INTERV...
- Trace when a variant of a report was created SAP A...
- Difference between extract and collect statements ...
- What Are Different Types Of Internal Tables and Th...
- What is the Different Types and Usage of Views SAP...
- How Loop Works in Internal Tables
- Easy Way To Remember Table In SAP
- ► 03/16 - 03/23 (44)
- ► 02/24 - 03/02 (9)
- ► 02/17 - 02/24 (32)
No comments:
Post a Comment