Application Development and Automation 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: 
Read only

Dynamic columns in Internal Table

Former Member
0 Likes
565

Hi Experts,

We have client requirments where clients want to see the report of certain no of wage types.

The no. of wage types is variable, they can select any no. of wage type (30-50). Is there any way of dynamically declaring the no of fields in internal table?

Thanks & Regards

Manas Nayak

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
473

hi,

use this program.

HTWLINF0.

3 REPLIES 3
Read only

Former Member
0 Likes
473

Hi,

use this..


      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_month.

      ASSIGN dy_month->* TO <dyn_month>.
      CREATE DATA dy_wa LIKE LINE OF <dyn_month>.
      ASSIGN dy_wa->* TO <wa_month>.

use this in one loop.....in every loop passing you just create the field catalog ifc... i think your prob will be solved.

Arunima

Read only

Former Member
0 Likes
473

Check this

[https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/dynamic%252binternal%252btable]

Read only

GauthamV
Active Contributor
0 Likes
474

hi,

use this program.

HTWLINF0.