Skip to Content
0
Nov 24, 2009 at 07:23 AM

How to Call Text Elements with in a LOOP while providing the Column Heading

227 Views

HI Gurus,

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = c_str
    CHANGING
      ct_fieldcat      = gt_fieldcat.
* I Have 29 Columns in the ALV Grid Display 

  LOOP AT gt_fieldcat ASSIGNING <fs_fcat>.
    <fs_fcat>-scrtext_m = text-001.  " This should be incremented so that the maintained Text Element be called
    <fs_fcat>-scrtext_m = str.  " Like Next it shoul be TEXT-002 and so with in the Loop.
  ENDLOOP.

* I am Maintaining Text Elements for the Column Headings in the above Field Catalog. I dont want to have too many Data 
* Elements at Structure level to Column Headings. Now how can I assign the Text Element Value Incrementing within the 
* babove loop.

Please suggest.

With Kind Regards

Ram

Edited by: Ramchander Krishnamraju on Nov 24, 2009 8:24 AM