12-07-2016 12:38 PM
Need small clarification.
I am generating one report, In this what are the changes people has done in a particular date,i need to show.
I would like to show the field description(data element short description) in the report, For this i am using the table table as DD04T ,So, what ever the field names i am having i am going to check it in the table DD04T,
But Some fields names does not have the same domain names like
Menge is having BSTMG is the domain, if i check the MENGE IN DD04T, I am not getting any data, I need to check BSTMG.
But where could i get Menge is having the Data element as BSTMG.
Any suggestions Please Update me.
12-07-2016 1:01 PM
Are you re-writing/cloning report RSSCD200?
Else for description of fields, check for data-element (DD03L-ROLLNAME) and not domain /or/ from table name get list of fields descriptions with a FM like DDIF_FIELDINFO_GET.
Regards,
Raymond
12-07-2016 12:55 PM
You can use function DDIC_DATA_DESCRIPTION_SCAN for your table and get all the information you need. And for reference, any functions or class with "DDIC" or "DDIF" in it will give you data dictionary/metadata info that is useful.
12-07-2016 1:01 PM
Are you re-writing/cloning report RSSCD200?
Else for description of fields, check for data-element (DD03L-ROLLNAME) and not domain /or/ from table name get list of fields descriptions with a FM like DDIF_FIELDINFO_GET.
Regards,
Raymond
12-08-2016 6:34 AM
Thanks for your reply.
In Cdpos Table EKET and Field is Key field is recorded.
I am checking for Data element for field Key But no data exists.
12-08-2016 7:38 AM
The KEY value should always be initial, it's not a true field, so no description exists.
You could use the KEY_FIELD values of CDPOS which is a concatenation of the primary key fields of the database table You have to add individual columns for those fields in the final internal table and map the KEY_FIELD value to those columns.
NB: table TCDOB contains the list of every table managed for an object, so you could use it (and a DDIF FM) to build a dynamic internal table from CDPOS definition, the key list and some description/text fields.
Regards,
Raymond
12-08-2016 10:24 AM
12-07-2016 1:05 PM
Hello,
In your screenshot, you have two information: the table name and the field name in the table. To find the corresponding data element, you could use the following code :
data: lo_tabledescr type ref to cl_abap_tabledescr,
lo_structdescr type ref to cl_abap_structdescr.
lo_tabledescr ?= cl_abap_typedescr=>describe_by_name(<table name>).
lo_structdescr ?= lo_tabledescr->get_table_line_type( ).
data(lt_components) = lo_structdescr->get_components( ).
data(lo_dtel) = lt_components[ name = <field_name> ]-type.
data(lv_dtel_name) = lo_dtel->absolute_name.
The variable lv_dtel_name contains the data element name of the field. Then you could use this name to find the corresponding description in DD04T.
Be aware that I do not catch any exception in the code...
Best regards, Nicolas
12-07-2016 1:06 PM