‎2014 Feb 19 5:18 AM
Hello everybody,
it is possible to create a ALV dynamiccylly be referenzing to a strukture or a table of the dictionary.
I find it very expensive to maintain the field-catalogue in the coding.
Is there a solution provided to maintain the fieldcatalogue via a customizing table, where the ABAP loops and defines des fieldcatalogue from the customizing-table?
Thanks
Regards
Mario
‎2014 Feb 19 5:31 AM
Hi,
Try with CL_SALV_TABLE class. Search for demo programs in SE38 starting with SALV_DEMO*.
Thanks & Regards
Bala Krishna
‎2014 Feb 19 5:31 AM
Hi,
Try with CL_SALV_TABLE class. Search for demo programs in SE38 starting with SALV_DEMO*.
Thanks & Regards
Bala Krishna
‎2014 Feb 19 5:46 AM
Hi Bala,
sorry, I can't find an ABAP in ALVDEMO* where the ALV is customizable. All Settings are made in the coding.
Regards Mario
‎2014 Feb 19 6:22 AM
Hi Mario,
You could have achieved your functionality easily using the class: cl_salv_table. But it does not support 'EDIT' functionality. Please read documentation in SE24 for this class 'cl_salv_table'. It provides an easy example too in the docu.
please refer this doc for displaying dynamic ALV,
‎2014 Feb 19 6:27 AM
Create a structure of the desired fields in SE11, than invoke FM LVC_FIELDCATALOG_MERGE / REUSE_ALV_FIELDCATALOG_MERGE.
Also CL_SALV_TABLE will be able to complete the fieldcat automatically if all the data types in the internal table is standard / is defined in the dictionary. Moreover making ALV OM(CL_SALV_TABLE) is a tiresome process. You can look for examples by having a search in SE38 with parameters SALV_DEMO*
Thanks, Abhinab
‎2014 Feb 19 6:34 AM
Hello Mario,
You can build Fieldcatalog using the FM " REUSE_ALV_FIELDCATALOG_MERGE".
You can pass either internal table or structure as below and fieldcatalog will be build in the result table.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = c_lv_repid
i_internal_tabname = <Internal table> " pass this incase of internal table
I_STRUCTURE_NAME = <SE11 structure> "Pass this in case of structure which defined in SE11
i_inclname = c_lv_repid
CHANGING
ct_fieldcat = itab_lt_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Thanga
‎2014 Feb 19 8:00 AM
Hi,
Thank you all. It seems that I have to code it.
I was looking for a ready to use solution which is not available.
Regards Mario