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

I am facing problem during dynamic created internal table .

Former Member
0 Likes
442

Hi Expert,

I am using class cl_alv_table_create=>table_copy( EXPORTING it_outtab = pt_final[]

it_fieldcatalog = gt_ifcat[]

IMPORTING ep_table = lt_finalref

EXCEPTIONS others = 1 ).

and generated dynamic internal table and this progame is interactive progam when i pressed one screen in 35 times it's showing correct value but just press 36 times it's given a short dump . in this progame i called 39 subroutines. so kindly give me a soulation for this problem.

Yours

Vikash.

1 ACCEPTED SOLUTION
Read only

former_member219399
Active Participant
0 Likes
404

Hi,

Dynamically the prgram generate subroutine pools which is at the most 36 times. Hence you are getting the short dump. Try if you can reuse the same table, instead of generating it again and again.

check the link

With regards,

Vamsi

Hi Expert,

I am using class cl_alv_table_create=>table_copy( EXPORTING it_outtab = pt_final[]

it_fieldcatalog = gt_ifcat[]

IMPORTING ep_table = lt_finalref

EXCEPTIONS others = 1 ).

and generated dynamic internal table and this progame is interactive progam when i pressed one screen in 35 times it's showing correct value but just press 36 times it's given a short dump . in this progame i called 39 subroutines. so kindly give me a soulation for this problem.

Yours

Vikash.

2 REPLIES 2
Read only

Former Member
0 Likes
404

*Material

CLEAR LS_FIELDCAT.

LS_FIELDCAT-FIELDNAME = 'MATNR'.

LS_FIELDCAT-REPTEXT = 'Material'.

LS_FIELDCAT-REF_TABLE = 'AFPO'.

LS_FIELDCAT-REF_FIELD = 'MATNR'.

APPEND LS_FIELDCAT TO IT_FIELDCAT.

CLEAR LS_IFC.

LS_IFC-FIELDNAME = 'MATNR'.

LS_IFC-SELTEXT_L = 'Material'.

LS_IFC-REPTEXT_DDIC = 'Material'.

LS_IFC-DDICTXT = 'R'.

LS_IFC-REF_FIELDNAME = 'MATNR'.

LS_IFC-REF_TABNAME = 'AFPO'.

LS_IFC-EMPHASIZE = 'C505'.

APPEND LS_IFC TO IT_IFC.

LOOP AT IT_WEEKDAYS.

CLEAR LS_FIELDCAT.

CONCATENATE IT_WEEKDAYS '-WK' INTO V_WEEK.

LS_FIELDCAT-FIELDNAME = V_WEEK.

  • LS_FIELDCAT-REF_TABLE = 'AFPO'.

  • LS_FIELDCAT-REF_FIELD = 'PSMNG'.

LS_FIELDCAT-JUST = 'R'.

LS_FIELDCAT-OUTPUTLEN = '5'.

APPEND LS_FIELDCAT TO IT_FIELDCAT.

CLEAR LS_IFC.

LS_IFC-FIELDNAME = V_WEEK.

LS_IFC-REPTEXT_DDIC = V_WEEK .

LS_IFC-DDICTXT = 'R'.

  • LS_IFC-REF_TABNAME = 'AFPO'.

  • LS_IFC-REF_FIELDNAME = 'PSMNG'.

LS_IFC-DATATYPE = 'DEC'.

LS_IFC-DECIMALS_OUT = '0'.

LS_IFC-DO_SUM = 'X'.

LS_IFC-JUST = 'R'.

LS_IFC-EMPHASIZE = 'C305'.

APPEND LS_IFC TO IT_IFC.

ENDLOOP.

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE

EXPORTING

IT_FIELDCATALOG = IT_FIELDCAT

IMPORTING

EP_TABLE = L_TABLE.

ASSIGN L_TABLE->* TO <DYN_TABLE>.

PERFORM FILL_DYNAMIC_R2.

LOOP AT IT_FINAL.

ASSIGN COMPONENT 'KDAUF' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-KDAUF.

ASSIGN COMPONENT 'KDPOS' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-KDPOS.

ASSIGN COMPONENT 'MATNR' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-MATNR.

ASSIGN COMPONENT 'NAME1' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-NAME1.

ASSIGN COMPONENT 'END_USER' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-END_USER.

ASSIGN COMPONENT 'PSMNG' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-PSMNG.

ASSIGN COMPONENT 'GLTRS' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-GLTRS.

ASSIGN COMPONENT 'GSTRS' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-GSTRS.

ASSIGN COMPONENT 'MBDAT' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-MBDAT.

ASSIGN COMPONENT 'DIFF_DAYS' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-DIFF_DAYS.

ASSIGN COMPONENT 'WEMNG' OF STRUCTURE <WA_ITAB> TO <FS_FLD>.

<FS_FLD> = IT_FINAL-OVER_DUE.

**Week Cal

CLEAR:V_DATE.

LOOP AT IT_WEEK WHERE KDAUF EQ IT_FINAL-KDAUF AND KDPOS EQ IT_FINAL-KDPOS

AND MATNR EQ IT_FINAL-MATNR.

CONCATENATE IT_WEEK-PERIOD '-WK' INTO FLD_FORECAST.

READ TABLE IT_WEEKDAYS WITH KEY WEEK = IT_WEEK-PERIOD.

IF SY-SUBRC EQ 0 .

CONCATENATE IT_WEEK-GLTRS6(2) '.' IT_WEEK-GLTRS4(2) '.' IT_WEEK-GLTRS+0(4) INTO V_DATE.

READ TABLE IT_DAY WITH KEY DAYS = V_DATE.

IF SY-SUBRC NE 0.

ASSIGN COMPONENT FLD_FORECAST OF STRUCTURE <WA_ITAB> TO <FS_QTY>.

<FS_QTY> = IT_WEEK-PSMNG.

ENDIF.

ENDIF.

ENDLOOP.

APPEND <WA_ITAB> TO <DYN_TABLE>.

CLEAR: <WA_ITAB>,IT_FINAL.

ENDLOOP.

DELETE ADJACENT DUPLICATES FROM <DYN_TABLE>.

ENDFORM. "FILL_DYNAMIC_r2

Read only

former_member219399
Active Participant
0 Likes
405

Hi,

Dynamically the prgram generate subroutine pools which is at the most 36 times. Hence you are getting the short dump. Try if you can reuse the same table, instead of generating it again and again.

check the link

With regards,

Vamsi