‎2008 Jul 20 11:43 AM
Hi Guy's,
Please help me, presntly working on ALV. In selection screen contain 2 radio buttons..1.detail 2. summary.
when user select the details it displays the details related information, like summary also the same.
For this purpose i created 2 field catalogs and two reuse_alv_grid_display FMs.
presently i struck up at when select the detail it displays the related information BUT select the summary button it going dump.
in dump it displaying message no filedcatolg1--summary is not available.
i wrote code like, please suggest me where i want to change in devlopment.
START-OF-SELECTION.
IF det = 'X'.
PERFORM detail.
ELSEIF summ = 'X'.
PERFORM summary.
ENDIF.
***FORM detail .
IF DET = 'X'.
PERFORM field_catalog.
LOOP AT TVL_ITAB1.
AT NEW PERNR. " To write Name
SELECT SINGLE ENAME FROM PA0001 INTO (CNAME)
WHERE PERNR = TVL_ITAB1-PERNR.
move: tvl_itab1-pernr to wa_out-pernr.
LOOP AT TVL_ITAB1 WHERE PERNR = TVL_ITAB1-PERNR.
move: tvl_itab1-upd_timestamp+0(8) to wa_out-date.
IF TVL_ITAB1-REINR = 0.
TVL_ITAB1-DATV1 = '00000000'.
TVL_ITAB1-DATB1 = '00000000'.
ENDIF.
move: tvl_itab1-reinr to wa_out-reinr,
tvl_itab1-zpoints to wa_out-zpoints,
tvl_itab1-upd_user to wa_out-upd_user,
tvl_itab1-datv1 to wa_out-datv1,
tvl_itab1-datb1 to wa_out-datb1,
tvl_itab1-zcomment to wa_out-zcomment.
append wa_out to it_out.
ENDLOOP.
ENDAT.
ENDLOOP.
ENDIF.
PERFORM display_alv.
*FORM summary .
IF summ = 'X'.
PERFORM field_catalog1.
SORT tvl_itab1 BY pernr.
LOOP AT tvl_itab1 .
AT NEW pernr.
MOVE : tvl_itab1-pernr TO wa_output-pernr.
SELECT SINGLE ename
INTO (cname1)
FROM pa0001
WHERE pernr = tvl_itab1-pernr.
IF sy-subrc = 0.
MOVE cname1 TO wa_output-cname1.
ENDIF.
ENDAT.
total = total + tvl_itab1-zpoints.
MOVE : total TO wa_output-total.
SELECT upd_user upd_timestamp FROM ztvl_sp_pt
INTO (user,date)
WHERE pernr = tvl_itab1-pernr.
ENDSELECT.
IF sy-subrc = 0.
date1 = date+0(8).
MOVE : user TO wa_output-upd_user,
date1 TO wa_output-date.
ENDIF.
APPEND wa_output TO it_output.
ENDLOOP.
endif.
PERFORM display_alv1.
Thanks,
Sai.
‎2008 Jul 20 12:00 PM
Debug ur code and check whether field catalog table for summary is populated properly or not if populated is it passed to reuse_alv_grid_display ?
Regards,
Joy.
‎2008 Jul 20 12:13 PM
Hi,
This dump will come when u call REUSE ALV FM for output display with empty fieldcatelog/IF not passing the parameter fieldcat. Check in debug mode whether u are passing/populating fieldcat for summary. I hope no.
So populate fieldcat for summary with what ever fields u want to display and check.
Thanks,
Vinod.
‎2008 Jul 21 6:15 AM
Hi,
If u r using the set table for first display, change it to refresh table for display.
The dump may also be for the above reason.
Reward if helpful.
Sharin.
‎2008 Jul 22 7:31 AM
‎2008 Jul 22 7:31 AM