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

Dyanmic Internal Table

former_member375795
Participant
0 Likes
759

Dear ,

I am getting trouble in transfer decimal values only  from internal table to Dynamic internal Table .

Please Help me out

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
718

HI Alok,

When you are defining the field catalog for dynamic internal table, give the inttype as 'P' and decimals as 2 . (or as required).

IF sy-subrc NE 0.
     gw_dyn_fcat-fieldname = wa_zdemo-month.
     gw_dyn_fcat-tabname   = 'IT_DEMO'.
     gw_dyn_fcat-coltext   = fname.
     gw_dyn_fcat-outputlen = 10.
     gw_dyn_fcat-do_sum = 'X'.
     gw_dyn_fcat-inttype = 'P'.
     gw_dyn_fcat-DECIMALS = 2.
     gw_dyn_fcat-col_pos   = gv_pos.
     APPEND gw_dyn_fcat TO gt_dyn_fcat.
   ENDIF.

The decimal values values will moved to your dynamic internal table.

6 REPLIES 6
Read only

hemanth_kumar21
Contributor
0 Likes
718

Hi Alok,

what is the type of Dynamic internal Table? What is the error you are getting?

Please paste the code.

I mean did you declared as TYPE ANY or not?

Read only

ramkumar007
Participant
0 Likes
718

PLEASE  SHOW YOUR PROGRAM

Read only

Former Member
0 Likes
719

HI Alok,

When you are defining the field catalog for dynamic internal table, give the inttype as 'P' and decimals as 2 . (or as required).

IF sy-subrc NE 0.
     gw_dyn_fcat-fieldname = wa_zdemo-month.
     gw_dyn_fcat-tabname   = 'IT_DEMO'.
     gw_dyn_fcat-coltext   = fname.
     gw_dyn_fcat-outputlen = 10.
     gw_dyn_fcat-do_sum = 'X'.
     gw_dyn_fcat-inttype = 'P'.
     gw_dyn_fcat-DECIMALS = 2.
     gw_dyn_fcat-col_pos   = gv_pos.
     APPEND gw_dyn_fcat TO gt_dyn_fcat.
   ENDIF.

The decimal values values will moved to your dynamic internal table.

Read only

0 Likes
718

thank you Susmitha Mam , I done it  from your above example.

Thread Closed

Read only

0 Likes
718

If solved, kindly close the thread as answered.

Read only

0 Likes
718

Can you tell how to put event at end of in loop of Dynamic internal Table

Loop at <internal table > assigning <work area>

at end < how to give field name  please write it here >

end at

endloop .