REPORT ZAR00001

no standard page heading
message-id zz
line-size 132
line-count 65.
************************************************************************
* Program: ZAR000001
Creation Date: 02/11/2002
*
* Title :
*
* Author : Rajani Gudipudi
**
* Type : Report
Script ID:
*
*----------------------------------------------------------------------*
* Description:
**
*
*
************************************************************************
* Global Values:
*
*
*
************************************************************************
* Input: As per selection screen
*
*
*
* Output: File in predefined format
*
*
*
************************************************************************
* Modification History:
*
* YYYY/MM/DD Author
* Correction Description
* ---------- ---------------------------------------------------------*
* 04/07/2003 Doug Sampsel
* DV5K903559
This report did not balance to the detail report
*
ZAR00006
*
* 11/21/2003 Erika Monjaraz
* DV5K911116 Asset value date for last retirement - ANLA-ABGDT'
*
Should not be blank.
************************************************************************
*
Tables/Data declaration
*
************************************************************************
tables : anla,
anlc,
anlz,
t095,
anlav,
t093c,
T001.
**********************************************************************
* Type definition
***********************************************************************
TYPE-POOLS: slis.
data : invnr like anla-invnr.
data: begin of i_anla occurs 0,
werks like anlz-werks,

"Plant

answlt1 like anlc-kansw. ktansw1 like t095-ktansw. answln like anlc-kansw. sheet account " Property classification key "Main asset number "Inventory number "Account determination "Cumulative acqui. answlx like anlc-kansw. * VARIABLES DECLARATION DATA: gv_hlp_periv LIKE t009b-periv. data: BEGIN OF lwa_DATA OCCURS 0. " company code "Bal. data: report_name like sy-repid. end of gi_disp. & production costs answlr like anlc-kansw. answln like anlc-kansw. "Plant ktansw like t095-ktansw. answlb like anlc-kansw. "Cumulative acqui. "Bal. & production costs end of i_anla. answlr like anlc-kansw. answlp like anlc-kansw. answlt3 like anlc-kansw. answlt3 like anlc-kansw. LIKE t001-butxt. werks like anlz-werks. answlt2 like anlc-kansw. LIKE sy-repid. sheet account werks1 like anlz-werks. slis_layout_alv. start_date like sy-datlo. slis_t_event. invnr like anla-invnr. start_time like sy-timlo. answlt2 like anlc-kansw.bukrs like anla-bukrs. ktansw like t095-ktansw. gv_gjahr LIKE anlc-gjahr. anln1 like anla-anln1. DATA: X TYPE C. anln1 like anla-anln1. vmgli like anla-vmgli. answlp like anlc-kansw. "Main asset number invnr like anla-invnr. LIKE anlc-kansw. "Inventory number answlb like anlc-kansw. answlx like anlc-kansw. data: begin of GI_DISP occurs 0. * " " " " Field catalog Layout Sort criteria Events . lastday like DATA : gv_repid gv_total gv_butxt sy-datum. DATA : gi_fieldcat gv_layout gi_sort gi_event TYPE TYPE TYPE TYPE "Report Name "Report description "Start date for the report "Start time for the report "User name* slis_t_fieldcat_alv. report_des like sy-title. answlt1 like anlc-kansw. INCLUDE STRUCTURE I_ANLA. slis_t_sortinfo_alv. DATA: END OF LWA_DATA. ktogr like anla-ktogr. user_name like sy-uname.

*----------------------------------------------------------------------* * Top of page *----------------------------------------------------------------------* TOP-OF-PAGE. PERFORM top_of_page_include USING text-911 text-912 text-903 text-904 text-905 text-906 text-907 TEXT-908. . "VCL SELECTION-SCREEN SKIP. parameters : p_date like sy-datum default sy-datum. SELECT-OPTIONS: s_anln1 for anla-anln1. SELECTION-SCREEN END OF BLOCK bl0. s_vmgli for anla-vmgli. "Asset capitalization date s_zugdt for anla-zugdt. s_anlkl for anla-anlkl. " cost center s_aktiv for anla-aktiv. " ENDIF. parameters : p_bukrs like anla-bukrs OBLIGATORY.*********************************************************************** * ALV DATA *********************************************************************** *-Structures required for ALV *-Variables for ALV *-ALV output table name CONSTANTS: c_header LIKE dd02l-tabname VALUE 'GI_DISP'. " plant s_ktogr for anla-ktogr. "text-901. "VCL SELECT-OPTIONS: s_werks for anlz-werks . SELECT SINGLE butxt FROM t001 INTO gv_butxt WHERE bukrs = p_bukrs. s_afabe for anlc-afabe OBLIGATORY. gv_butxt = 'NISSAN NORTH AMERICA. IF sy-subrc NE 0. SELECTION-SCREEN END OF BLOCK bl1.INC'. ************************************************************************ * SELECTION SCREEN DESIGN ************************************************************************ * SELECTION-SCREEN BEGIN OF BLOCK bl0 WITH FRAME TITLE text-bl0. SELECTION-SCREEN BEGIN OF BLOCK bl1 "VCL WITH FRAME "VCL TITLE text-bl1.

* ALV variables & structures default initialization for main list PERFORM init_alv. * ALV display * result display with ALV list tool PERFORM alv_list_display . *---------------------------------------------------------------------* * FORM print_header_report * *---------------------------------------------------------------------* * . * perform print_detail. * Include required for file naming format * INCLUDE ZZIHEADR... * perform detail.* PERFORM print_header_report. report_des = sy-title. report_name = sy-repid. PERFORM DATA_SELECTION. ************************************************************************ * END-OF-SELECTION ************************************************************************ * end-of-selection.. ************************************************************************ * START-OF-SELECTION * ************************************************************************ START-OF-SELECTION. *----------------------------------------------------------------------* * End of page *----------------------------------------------------------------------* ************************************************************************ * INITIALIZATION * ************************************************************************ initialization. at selection-screen on p_date.. *********************************************************************** * ALV Initialization *********************************************************************** * program name must be passed into a variable gv_repid = sy-repid... end-of-page.. * . perform date_check.

lv_tabix LIKE sy-tabix.. answlp like anlc-answl. check sy-subrc eq 0. * get the values from T093c table SELECT SINGLE * . lv_flag TYPE c.SY-PAGNO. select * from anla where bukrs eq p_bukrs and ktogr in s_ktogr and anln1 in s_anln1 and anlkl in s_anlkl and vmgli in s_vmgli and aktiv in s_aktiv and zugdt in s_zugdt. 205 SY-DATUM MM/DD/YYYY.'.105 'NISSAN NORTH AMERICA. select single * from anlz where bukrs = anla-bukrs and werks in s_werks and anln1 = anla-anln1 and anln2 = anla-anln2. WRITE: / sy-mandt. data: answlb type i.*---------------------------------------------------------------------* form print_header_report. answlr like anlc-answl. *&---------------------------------------------------------------------* *& Form DATA_SELECTION *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. 100 'INDUSTRIAL DEVELOPMENT BOND ISSUE SUMMARY'. select single ktansw into t095-ktansw from t095 where ktogr = anla-ktogr. WRITE: / SY-UNAME. 205 'Page:'. answln like anlc-answl. 97'FA:M SYSTEM LISTINGS-FOR PERIOD ENDING :'. write: / sy-repid. DATA: lwa_data LIKE I_ANLA. check sy-subrc eq 0.p2 text *----------------------------------------------------------------------* form data_selection. format color col_heading. format intensified on. 205 SY-UZEIT USING EDIT MASK '__:__:__'. check sy-subrc eq 0. answlx like anlc-answl. write: /107'BY GENERAL LEDGER ACCOUNT'. INC. p_date. * endform.

t001-bukrs = t093c-bukrs. if sy-subrc eq 0. . ENDIF. " IF sy-subrc NE 0 select single * from anlc where bukrs = anla-bukrs and anln1 = anla-anln1 and anln2 = anla-anln2 and GJAHR eq gv_gjahr. " IF sy-subrc EQ 0 * Read T001 table CALL FUNCTION 'AM_T001_READ' EXPORTING f_t001 = t001 * I_PBO_CHECK = ' ' IMPORTING f_t001 = t001 EXCEPTIONS wrong_bukrs = 1 OTHERS = 2. IF sy-subrc NE 0. IF sy-subrc EQ 0. * No action required ENDIF. * * CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING i_date = p_date I_MONMIT = 00 i_periv = gv_hlp_periv IMPORTING E_BUPER = e_gjahr = gv_gjahr EXCEPTIONS input_false = 1 t009_notfound = 2 t009b_notfound = 3 OTHERS = 4. IF sy-subrc NE 0.FROM t093c WHERE bukrs EQ p_bukrs. * No action required ENDIF. . " IF sy-subrc NE 0 gv_hlp_periv = t001-periv.

if anla-vmgli = 'B' . if anla-abgdt is initial. anla-ktogr to i_anla-ktogr. MOVE: * * * "lwa_data-anlkl TO gi_disp-anlkl2. sort i_anla by werks ktansw. . endif. lv_tabix = sy-tabix. gi_data-anlkl TO gi_disp-anlkl1. i_anla-answlt2 = i_anla-answln + i_anla-answlp. t095-ktansw to i_anla-ktansw. i_ANLA-werks TO gi_disp-werks1. modify i_anla. lwa_data-posnr+0(4) TO gi_disp-posnr. .move : anlz-werks to i_anla-werks. i_anla-answlx = anlc-kansw + anlc-answl elseif anla-vmgli = 'N' . . endif. anla-bukrs to i_anla-bukrs. " DV5K911116 " DV5K911116 endselect. *-Move the full record of every new combination of WERKS KTOGR ANLKL READ TABLE i_anla INTO lwa_data INDEX lv_tabix. anla-invnr to i_anla-invnr. append i_anla. *-Separate data as header detail. i_ANLA-ktansw TO gi_disp-ktansw1. i_anla-answlt3 = i_anla-answlt1 + i_anla-answlx + i_anla-answlt2. . MOVE-CORRESPONDING lwa_data TO gi_disp. i_anla-answln = anlc-kansw + anlc-answl elseif anla-vmgli = 'P' . AT NEW KTANSW. i_anla-answlp = anlc-kansw + anlc-answl . anla-vmgli to i_anla-vmgli. clear i_anla. * delete i_anla where KTOGR = ' '. i_anla-answlr = anlc-kansw + anlc-answl elseif anla-vmgli = 'X' . " DV5K903559 loop at i_anla. endif. anla-anln1 to i_anla-anln1. i_anla-answlt1 = i_anla-answlb + i_anla-answlr. i_anla-answlb = anlc-kansw + anlc-answl elseif anla-vmgli = 'R' . .

66 'REPLACEMENT'. MOVE: gi_data-posnr+0(4) TO gi_disp-posnr. 181 'ASSETS'. format color col_normal. CONTINUE. 135 'ISSUE'. 112 'PROPERTY' . " ASSETS'. *if itab_anla-vmgli eq 'B'. write :/3'PLANT'. lv_flag = 'X'. . ELSE. 135 'NEW BOND'. CLEAR gi_disp. 38 'BASE PROGRAM'. 112 'TAX'. * * * * MOVE-CORRESPONDING i_ANLA TO gi_disp. * format color col_heading. CLEAR lv_flag. /112 'ASSETS'. format intensified on. 158 'REPLACEMENT-'. 66 'ASSETS'. 198 'TOTAL DOLLARS'."<=========lv_flag = 'X'. 88 'ASSETS'. 13 'GL_ACCT_NO'. 158 'ASSETS-'.* * WRITE lwa_data-zugdt TO gi_disp-zugdt MM/DD/YYYY. ENDAT." NEW ISSUE'. CLEAR gi_disp. 181 'NEW ISSUE'. 181 'BONDABLE'. " DATA_SELECTION *&---------------------------------------------------------------------* *& Form detail *&---------------------------------------------------------------------* FORM detail. uline. ENDLOOP. ENDIF. 158 'NEW ISSUE'. APPEND gi_disp. 88 'BONDABLE '. ENDFORM. WRITE gi_data-zugdt TO gi_disp-zugdt MM/DD/YYYY. APPEND gi_disp. /38 'ASSETS'. gi_data-anlkl TO gi_disp-anlkl2."<=========loop at gi_data. IF lv_flag = 'X'.

elseif i_anla-vmgli = 'R'. " detail *&---------------------------------------------------------------------* *& Form print_detail *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-.p2 text *----------------------------------------------------------------------* FORM print_detail. answlp like anlc-answl. 194 i_anla-answlt3. 205 invnr. sum. at end of ktansw. 13 i_anla-ktansw . elseif i_anla-vmgli = 'N'. write : 125 i_anla-answln. write :/ invnr. 171 i_anla-answlt2 . delete i_anla where ktansw = ' '. data: answlb type i. i_anla-answlt2 = i_anla-answln + i_anla-answlp. write : 148 i_anla-answlp. i_anla-answlt3 = i_anla-answlt1 + i_anla-answlx + i_anla-answlt2. format color col_normal. 79 i_anla-answlt1. format intensified on. answlr like anlc-answl. endif. write : 102 i_anla-answlx. format color off. .ENDFORM. sort i_anla by werks ktansw. answln like anlc-answl. at end of vmgli. write : 56 i_anla-answlr. write : 33 i_anla-answlb . i_anla-answlt1 = i_anla-answlb + i_anla-answlr. elseif i_anla-vmgli = 'P'. elseif i_anla-vmgli = 'X'. endat. if i_anla-vmgli = 'B'. modify i_anla. perform get_invnr using i_anla-bukrs I_anla-ktogr changing invnr . "under text-003. write :/1 i_anla-werks. skip. loop at i_anla. answlx like anlc-answl.

33 i_anla-answlb . write : /3 'Plant total'. 194 i_anla-answlt3. 56 i_anla-answlr . 33 i_anla-answlb . skip. format color col_total. i_anla-answln. format color off. i_anla-answlt2. 79 i_anla-answlt1. format color off. skip. 171 i_anla-answlt2. i_anla-answlx. at end of werks. endat. write :/3 'Grand total'. endat. 102 i_anla-answlx . 79 102 125 148 171 194 i_anla-answlt1. 56 i_anla-answlr . . sum. format intensified on. 125 i_anla-answln . endat. 148 i_anla-answlp . at last. 102 i_anla-answlx . sum. sum. 171 i_anla-answlt2. i_anla-answlt3. 56 i_anla-answlr.format color col_total. 125 i_anla-answln . format color col_total. write : / 'G/L account totals'. 79 i_anla-answlt1. 194 i_anla-answlt3. 33 i_anla-answlb . format intensified on. 148 i_anla-answlp . i_anla-answlp. 20 i_anla-ktansw .

p2 text *----------------------------------------------------------------------* FORM init_alv. " get_description *&---------------------------------------------------------------------* *& Form init_alv *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. IF LASTDAY+3(2) < P_DATE+3(2) . * Add event PERFORM add_event... call function 'MM_LAST_DAY_OF_MONTHS' EXPORTING day_in = p_date IMPORTING last_day_of_month = lastday. " date_check *---------------------------------------------------------------------* * FORM get_invnr * *---------------------------------------------------------------------* * .endloop. ENDFORM. *-Fill catalog if you need to make changes to the properties of the *-display layout PERFORM alv_fieldcatalog_fill... . MESSAGE E999 with ' INVALID DATE'.. *-Any change to the properties of the display layout. Can also be done *-from the layout side PERFORM change_field_properties. select single invnr from anla into invnr where bukrs = bukrs and ktogr = ktogr .. * *---------------------------------------------------------------------* * --> BUKRS * * --> KTOGR * * --> INVNR * *---------------------------------------------------------------------* form get_invnr using bukrs ktogr changing invnr like i_anla-invnr. ENDFORM.. ENDFORM. " print_detail *&---------------------------------------------------------------------* *& Form date_check *&---------------------------------------------------------------------* FORM date_check. endif.

*----------------------------------------------------------------------* FORM top_of_page. INC. IF sy-subrc <> 0. SELECT SINGLE butxt FROM t001 INTO gv_butxt WHERE bukrs = p_bukrs. ENDIF. gv_butxt = text-901. " NISSAN NORTH AMERICA. " init_alv *----------------------------------------------------------------------* * TOP-OF-PAGE *----------------------------------------------------------------------* * This module outputs formatted simple header information.p2 text *----------------------------------------------------------------------* FORM alv_fieldcatalog_fill. " alv_fieldcatalog_fill *&---------------------------------------------------------------------* *& Form change_field_properties *&---------------------------------------------------------------------* * text . IF sy-subrc NE 0. PERFORM top_of_page_include USING gv_butxt text-912 text-903 text-904 text-905 text-906 text-907 TEXT-908. ENDIF. ENDFORM. CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = gv_repid i_internal_tabname = c_header i_inclname = gv_repid CHANGING ct_fieldcat = gi_fieldcat EXCEPTIONS inconsistent_interface = 1 program_error = 2 OTHERS = 3. "#EC CALLED * Fetch Company code text dynamically for each new company. " TOP_OF_PAGE *&---------------------------------------------------------------------* *& Form alv_fieldcatalog_fill *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-.ENDFORM. MESSAGE ID 'VO' TYPE 'I' NUMBER 752 WITH sy-subrc. ENDFORM.

* -Do subtotals/subtotals text at: *-Plant level: wa_sort-fieldname = 'KTANSW'. . * **-Add totals text and details display on layout gv_layout-totals_text = 'GRAND TOTAL:'(005). gv_layout-detail_popup = 'X'. wa_sort-tabname = 'GI_DISP'. wa_fieldcat-key = ' '.*----------------------------------------------------------------------* * --> p1 text * <-. CLEAR wa_fieldcat. wa_sort-subtot = 'X'. wa_sort-subtot = 'X'. wa_sort TYPE slis_sortinfo_alv. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING key WHERE fieldname = 'ANLN1'. wa_fieldcat-seltext_m = 'TOTAL PLANT'(002). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING seltext_m ddictxt WHERE fieldname = 'KTANSW'. DATA: wa_fieldcat TYPE slis_fieldcat_alv. gv_layout-f2code = '&ETA'. APPEND wa_sort TO gi_sort. wa_sort-spos = 1. wa_sort-spos = 1. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING seltext_m ddictxt WHERE fieldname = 'WERKS'. wa_fieldcat-ddictxt = 'M'. wa_sort-up = 'X'. APPEND wa_sort TO gi_sort. wa_sort-up = 'X'. wa_fieldcat-seltext_m = 'G/L ACCOUNT'(001). CLEAR wa_fieldcat. *-Plant = HTOTAL LOCATION CLEAR wa_fieldcat. * * *-Make The key field as non-key. *-Do subtotals/subtotals text at: *-Plant level: wa_sort-fieldname = 'WERKS'.p2 text *----------------------------------------------------------------------* FORM change_field_properties. wa_sort-tabname = 'GI_DISP'. wa_fieldcat-ddictxt = 'M'.

* *-Make the text of fields *-Plant = Location *-Account determination = GL_ACCT_NO CLEAR wa_fieldcat. *-WBS element /Project = FAR . MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'INVNR'. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'KTANSW1' . wa_fieldcat-seltext_m = 'G/L ACCOUNT'(017).CLEAR wa_fieldcat. wa_fieldcat-seltext_l = 'PLANT'(016). wa_fieldcat-reptext_ddic = 'OLD ASSET NUMBER'(004). wa_fieldcat-seltext_l = 'OLD ASSET NUMBER'(004). wa_fieldcat-seltext_m = 'OLD ASSET NUMBER'(004). *-Main Asset number = Asset number * CLEAR wa_fieldcat. *-. wa_fieldcat-seltext_s = 'OLD ASSET NUM'(003). *-Main Asset description = Asset description * . wa_fieldcat-seltext_s = 'ASSET NUM'(019). *-Asset class = SAR CODE * . wa_fieldcat-reptext_ddic = 'PLANT'(016). *-Old Asset number CLEAR wa_fieldcat. wa_fieldcat-seltext_m = 'PLANT'(016). wa_fieldcat-seltext_l = 'G/L ACCOUNT'(017). wa_fieldcat-seltext_s = 'G/L ACCOUNT'(017). wa_fieldcat-seltext_l = 'ASSET NUMBER'(020). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'WERKS1'. wa_fieldcat-reptext_ddic = 'G/L ACCOUNT'(017). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING seltext_s seltext_l seltext_m WHERE fieldname = 'ANLN1'. wa_fieldcat-seltext_s = 'PLANT'(016). wa_fieldcat-seltext_m = 'ASSET NUMBER'(020).

ASSETS'(024). wa_fieldcat-seltext_s = 'PROP. * CLEAR wa_fieldcat. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLB' . wa_fieldcat-reptext_ddic = 'PROP. wa_fieldcat-seltext_m = 'BASEPROG.TAXASSETS'(030).ASSETS'(023). wa_fieldcat-do_sum = 'X'. * CLEAR wa_fieldcat.ASSETS'(024).TAXASSETS'(030). wa_fieldcat-seltext_l = 'NEW BOND ISSUE'. wa_fieldcat-seltext_l = 'BONDABLEASSETS'(026). wa_fieldcat-seltext_l = 'REPLACE. wa_fieldcat-do_sum = 'X'. wa_fieldcat-seltext_s = 'REPLACE. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLR' . "(029). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s .ASSETS'(024). wa_fieldcat-do_sum = 'X'. "(029).TAXASSETS'(030). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLT1'. wa_fieldcat-reptext_ddic = 'NEW BOND ISSUE'. wa_fieldcat-seltext_s = 'BONDABLEASSETS'(026).ASSETS'(024).ASSETS'(023). wa_fieldcat-seltext_l = 'BASEPROG. wa_fieldcat-seltext_m = 'PROP.ASSETS'(023). * CLEAR wa_fieldcat. wa_fieldcat-seltext_l = 'PROP. wa_fieldcat-seltext_m = 'NEW BOND ISSUE'. "(029). "(029).TAXASSETS'(030). wa_fieldcat-reptext_ddic = 'BASEPROG. wa_fieldcat-seltext_m = 'REPLACE. wa_fieldcat-seltext_m = 'BONDABLEASSETS'(026). wa_fieldcat-reptext_ddic = 'BONDABLEASSETS'(026).* CLEAR wa_fieldcat. wa_fieldcat-do_sum = 'X'. wa_fieldcat-seltext_s = 'NEW BOND ISSUE'.ASSETS'(023). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLX' . wa_fieldcat-seltext_s = 'BASEPROG. wa_fieldcat-reptext_ddic = 'REPLACE. wa_fieldcat-do_sum = 'X'.

wa_fieldcat-seltext_s = 'REPLACE. * MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING no_out * WHERE fieldname = 'ANLKL'.seltext_l seltext_m WHERE fieldname = 'ANSWLN' . wa_fieldcat-do_sum = 'X'.'. *-Accumulated Value = Total Dollars * CLEAR wa_fieldcat. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLT3'. "'(031).'. "(031). * . wa_fieldcat-do_sum = 'X'. "(028). "(028). "(031). "(028).ASSETSI'. wa_fieldcat-no_out = 'X'.'. "(031). wa_fieldcat-seltext_m = ' BOND ASSETS(NI).'.ASSETS'. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING no_out WHERE fieldname = 'KTANSW' . "(028). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLP' . wa_fieldcat-seltext_s = ' BOND ASSETS(NI). wa_fieldcat-seltext_l = ' BOND ASSETS(NI).ASSETS'. wa_fieldcat-reptext_ddic = 'BOND ASSETS(NI). wa_fieldcat-reptext_ddic = 'REPLACE. * * * *-Hide the header keys while displaying data CLEAR wa_fieldcat. wa_fieldcat-seltext_m = 'REPLACE. wa_fieldcat-reptext_ddic = 'TOTAL $s'(025). wa_fieldcat-seltext_s = 'TOTAL $s'(025). MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING do_sum reptext_ddic seltext_s seltext_l seltext_m WHERE fieldname = 'ANSWLT2'. **-Subtotals wa_fieldcat-do_sum = 'X'. wa_fieldcat-do_sum = 'X'. MODIFY gi_fieldcat FROM wa_fieldcat TRANSPORTING no_out WHERE fieldname = 'WERKS' . * CLEAR wa_fieldcat. wa_fieldcat-seltext_l = 'TOTAL DOLLARS'(025). wa_fieldcat-seltext_m = 'TOTAL DOLLARS'(025). wa_fieldcat-seltext_l = 'REPLACE.ASSETS'.

p2 text *----------------------------------------------------------------------* FORM alv_list_display. lv_hdr5(41). LV_DATE2(2). " change_field_properties *&---------------------------------------------------------------------* *& Form alv_list_display *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. ENDIF. . ** result display with ALV tool CALL FUNCTION 'Z_ALVTEMPLATE' EXPORTING i_callback_program i_internal_tabname it_fieldcat i_inclname is_layout it_sort i_default i_save TABLES t_outtab EXCEPTIONS program_error inconsistent_interface OTHERS = = = = = = = = gv_repid c_header gi_fieldcat gv_repid gv_layout gi_sort 'X' 'U' = gi_disp = 1 = 2 = 3. " alv_list_display *&---------------------------------------------------------------------* *& Form top_of_page_include *&---------------------------------------------------------------------* *---------------------------------------------* FORM top_of_page_include USING p_901 p_902 p_903 p_904 p_905 p_906 p_907 P_908 DATA:lv_hdr1(48). TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE c c c c c c c C. IF sy-subrc <> 0. lv_hdr2(42). LV_DATE1(12). lv_date(3). ** Error occurred in list processing (ALV) MESSAGE ID '25' TYPE 'E' NUMBER 161. lv_hdr4(50). lv_month(2).ENDFORM. lv_hdr3(41). lv_pagno(10). ENDFORM.

FORMAT RESET. lv_date = p_date+6(2). 12 sy-datum MM/DD/YY. * Convert Month to Text WRITE 100 LV_DATE1. 105 lv_pagno RIGHT-JUSTIFIED.INC ' CENTERED. MOVE p_908 TO lv_hdr5. 50(50) lv_hdr3 CENTERED. CONCATENATE lv_month lv_date lv_year INTO lv_date1 SEPARATED BY '/'. lv_year(4). CONCATENATE lv_date '. lv_date1 ' / ' lv_year INTO lv_date1. MOVE p_907 TO lv_hdr3. * SELECT SINGLE monam * FROM t015m * INTO lv_hdr4 * WHERE spras EQ sy-langu * AND monum EQ lv_month. * * IF sy-subrc EQ 0. MOVE p_902 TO lv_hdr2. 50(50) lv_hdr2 CENTERED. * ENDIF. * 45(60) P_901 CENTERED.LV_DATE3(4).12 sy-uzeit. " 45(60) 'NISSAN NORTH AMERICA.' "P_901 . MOVE p_901 TO lv_hdr1. 12 sy-repid. lv_year = p_date+0(4). WRITE:/(10) 'RUN TIME:'(905). lv_date1 ' : ' lv_date INTO lv_date1. FORMAT COLOR COL_HEADING INTENSIFIED ON INVERSE ON. " IF sy-subrc EQ 0 * write p_date to date mm/dd/yyyy. WRITE:/(10) 'REPORT ID:'(903). CONDENSE lv_pagno. lv_pagno = sy-pagno. * TRANSLATE lv_hdr4 TO UPPER CASE. lv_month = p_date+4(2). * 105 sy-uname no-gap right-justified. CONCATENATE lv_hdr3 LV_DATE1 INTO LV_HDR3. WRITE:/(10) 'RUN DATE:'(904). LV_HDR3 LV_DATE1 INTO LV_HDR3. CONCATENATE 'PAGE:' lv_pagno INTO lv_pagno SEPARATED BY space. * * * * CONCATENATE CONCATENATE CONCATENATE CONCATENATE ' : ' lv_month INTO lv_date1.

APPEND lv_event TO gi_event. SKIP. " top_of_page_include *&---------------------------------------------------------------------* *& Form add_event *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. * FORMAT RESET. CONDENSE lv_date. DATA lv_event LIKE LINE OF gi_event. * WRITE:/50(50) lv_hdr4 CENTERED.p2 text *----------------------------------------------------------------------* FORM add_event. " add_event . lv_event-name = 'END_OF_LIST'. * CONCATENATE p_906 * lv_hdr4 * lv_date * lv_year * INTO lv_hdr4 * SEPARATED BY space. MOVE p_908 TO LV_HDR4.INTO lv_date. lv_event-form = 'END_OF_LIST'. ENDFORM. ENDFORM.

Sign up to vote on this title
UsefulNot useful