資源描述:
《ALV分組求和1》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、*&---------------------------------------------------------------------**&ReportYTH_TEST00029*&*&---------------------------------------------------------------------**&*&*&---------------------------------------------------------------------*REPORTyth_test00029.*&------
2、---------------------------------------------------------------**&Function:REUSE_ALV_FIELDCATALOG_MERGE*&ALV求和*&和function:REUSE_ALV_GRID_DISPLAY一起使用*&經(jīng)典例子*&做為一個(gè)方法使用,設(shè)置ALV的Fieldcatlog.*&和delphi里的dxdbgrid的功能一樣。對(duì)小類相加計(jì)算,*&對(duì)所有的數(shù)量求和.*&對(duì)ALV中的某一列進(jìn)行分類的完成測(cè)試程序。*&-------------------
3、--------------------------------------------------*DATA:BEGINOFi_likpOCCURS5,kunnrLIKElikp-kunnr,"客戶號(hào)wadat_istLIKElikp-wadat_ist,"交貨日期(發(fā)貨日期)lfimgLIKElips-lfimg,"實(shí)際已交貨量ENDOFi_likp.TYPE-POOLS:slis.DATA:l_eventsTYPEslis_t_event,gt_list_top_of_pageTYPEslis_t_listheader,gs_la
4、youtTYPEslis_layout_alv,fieldcatTYPEslis_t_fieldcat_alvWITHHEADERLINE,eventcatTYPEslis_t_eventWITHHEADERLINE,it_sortTYPEslis_t_sortinfo_alvWITHHEADERLINE,prgLIKEsy-repid.*tablesdisvariant:格式(外部使用)DATA:l_variantTYPETABLEOFdisvariantWITHHEADERLINE.SELECTa~kunnra~wadat_istb
5、~lfimgFROMlikpASaINNERJOINlipsASbONa~vbeln=b~vbelnINTO(i_likp-kunnr,i_likp-wadat_ist,i_likp-lfimg)WHEREA~KUNNR='0000010013'ORA~KUNNR='0000010014'.APPENDi_likp.CLEARi_likp.ENDSELECT.PERFORMprepare_list_val.PERFORMdisplay_val.*&---------------------------------------------
6、------------------------**&FormPREPARE_LIST_VAL*&---------------------------------------------------------------------**text*----------------------------------------------------------------------*FORMprepare_list_val.prg=sy-repid."當(dāng)前主程序l_variant-report=sy-repid."當(dāng)前主程序PER
7、FORMeventtab_buildCHANGINGl_events.PERFORMcomment_buildCHANGINGgt_list_top_of_page.PERFORMset_layout.ENDFORM."prepare_list_val*&---------------------------------------------------------------------**&FormEVENTTAB_BUILD*&---------------------------------------------------
8、------------------**text*----------------------------------------------------------------------*FORMeve