Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member1245113
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

You may need to first read the text elements of your program using


DATA: i_reptx TYPE STANDARD TABLE OF textpool WITH HEADER LINE.

READ TEXTPOOL <your report name> INTO i_reptx. 

then within the loop read the table i_reptx get the content and pass to -scrtext_m

1 REPLY 1

former_member194669
Active Contributor
0 Kudos

You may need to first read the text elements of your program using


DATA: i_reptx TYPE STANDARD TABLE OF textpool WITH HEADER LINE.

READ TEXTPOOL <your report name> INTO i_reptx. 

then within the loop read the table i_reptx get the content and pass to -scrtext_m