SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Output Table Fields to a List



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP Dictionary
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Mon Sep 03, 2007 11:10 pm    Post subject: Output Table Fields to a List Reply with quote

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.
Output Table Fields to a List

Code:

*&---------------------------------------------------------------------*
*& 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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP Dictionary All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.