03-09-2009 12:32 PM
hi,
i need to pass SAP table name as a parameter to the selection screen of a Report program.
This prog shud give me the table Fields name along with type and length.
Is there any standard SAP report program for the same or i have to write my own logic?
Please advise.
regards,
ags.
03-09-2009 12:34 PM
03-09-2009 12:34 PM
03-09-2009 12:35 PM
03-09-2009 2:15 PM
Hi,
For your requirement you have to write own program in dynamic manner by using field symbol concept.
Use this FM DDIF_FIELDINFO_GET and get the field information of database table.
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = <master> u201C Table name
Tables
DFIES_TAB = <table_field> u201C here you will get field information of table
exceptions
not_found = 1
internal_error = 2
others = 3.
if sy-subrc <> 0.
message text-005 type 'E' .
endif.
Loop <table_field> assignigng <field>
*---here you have to collect the relevant information that you are going to display in your output.
Endloop.
Use any one of ALV or OOALV and display your records.
Regards,
Peranandam