ABAP Program for Output Table Fields to a List

When you’re looking at the structure of a table, SAP will let you print the structure, but it won’t let you save the structure. This can be annoying. This report outputs the table structure to a list. At this point the user can use the System->List->Save->Local file command to save the list to a file.

ABAP Program for Output Table Fields to a List

*&———————————————————————*
*& Report YTABFLDS *
*& *
*&———————————————————————*
*& *
*& *
*&———————————————————————*

REPORT YTABFLDS .
TABLES: DD02L, DD03L, DD04T.

PARAMETERS THETABLE LIKE DD02L-TABNAME OBLIGATORY.
DATA: BEGIN OF MYTABLE,
TABNAME LIKE DD02L-TABNAME,
AS4LOCAL LIKE DD02L-AS4LOCAL,
AS4VERS LIKE DD02L-AS4VERS,
END OF MYTABLE.

SELECT SINGLE TABNAME AS4LOCAL AS4VERS INTO MYTABLE FROM DD03L
WHERE TABNAME = THETABLE.
WRITE: / MYTABLE-TABNAME, 11 MYTABLE-AS4LOCAL, 13 MYTABLE-AS4VERS.
SELECT * FROM DD03L
WHERE TABNAME = MYTABLE-TABNAME AND
AS4LOCAL = MYTABLE-AS4LOCAL AND AS4VERS = MYTABLE-AS4VERS.
WRITE: / DD03L-FIELDNAME, 11 DD03L-KEYFLAG, 13 DD03L-ROLLNAME,
24 DD03L-CHECKTABLE, 35 DD03L-INTTYPE, 37 DD03L-REFTABLE,
48 DD03L-DATATYPE.
SELECT SINGLE * FROM DD04T
WHERE ROLLNAME = DD03L-ROLLNAME AND
AS4LOCAL = MYTABLE-AS4LOCAL AND AS4VERS = MYTABLE-AS4VERS AND
DDLANGUAGE = ‘E’.

WRITE: 53 DD04T-DDTEXT.
ENDSELECT.

ABAP program to load a database table from a UNIX file Requirement: Write a program to load a database table from a UNIX file. ABAP Source...
WRITE – Output to a list ( SAP ABAP Keyword) WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This...
ABAP Program for Submitting report with selection table Sample ABAP Program for learning how to Submit report with selection tableREPORT submit_with_selection_table.TABLES QMSM.* Work...
ABAP SQL Examples – Select Query Requirement: Select those MM tables which are language dependant (For example you want to translate...
ABAP Program to Get Output in EXCEL This source code is an ABAP Program to Get Output in EXCEL REPORT YLMM015AMESSAGE-ID YL.*-----------------------------------------------------------------------**...
SAP System Fields list – Commonly used with ABAP programs Here is a list of important SAP System fields which are commonly used in our...
ABAP program for find the user-exits of a SAP transaction code *Sample ABAP program for Find the user-exits of a particular SAP transaction code (Tcode) *...
ABAP Program to Upload table using new function GUI_UPLOAD Sample ABAP Program to learn how to Upload table using new function GUI_UPLOAD in ABAP...
ABAP Program for Lock All Users This program (un)locks all the users in a client, except for the current user, and...
ABAP program for Reading database tables using select Requirement: Write the a report with a select statement. ABAP Source Code: report zselect1 no...
 

Submit your tip or response