Report needs to be corrected it is urgent

Ageing Analysis of Inventory Material. This is a report for Inventory Ageing. The report is not giving correct result for the field Value of total valuated stock(MBEWH-SALK3). After displaying the report when we add up the field SALK3 it not the correct result which I got in transaction code MB5L. Can anyone kindly help me in correcting out this report. I am keeping the source code also.
*& Application      :  Materials Management (MM)
*& Description      :  Ageing Analysis of Inventory Material
*& Transaction Code :
*& Area Menu Code   :  ZMM
Report ZMM0001.
MAPPING OF MONTH AND PERIOD AS FINACIAL YEAR STARTS FROM APR - MAR. *
just for reference.
   MONTH        PERIOD
  01.2003   -  10.2003
  02.2003   -  11.2003
  03.2003   -  12.2003
  04.2003   -  01.2003
  05.2003   -  02.2003
  06.2003   -  03.2003
  07.2003   -  04.2003
  08.2003   -  05.2003
  09.2003   -  06.2003
  10.2003   -  07.2003
  11.2003   -  08.2003
  12.2003   -  09.2003
  01.2004   -  10.2004
  02.2004   -  11.2004
  03.2004   -  12.2004
  04.2004   -  01.2004
REPORT  ZMMR0001 MESSAGE-ID GW NO STANDARD PAGE HEADING
                               LINE-COUNT 1000
                               LINE-SIZE 170.
*FLOWLOGIC
*This Program displays the Ageing Analysis details of Material inventory
*pick up the opening balance consider the previous month of the period
*entered in selection screen.
*Get the qty and value for all material types from mbew table but
*excludeentries where no valuation type is defined
*calculate the receipt qty pick all entries from z_mkpf_mseg where
*date( is less that or equal to the last day of the month and movement
*type equals '101', '561', '501', '951', '953', '955', '957', '301' *
*into i_mseg table.
*To calculate the reversal for  receipt qty.
*To get the issue qty upto the date of receipt, delete the issue qty
*fromstock to get the exact stock value on the date the receipt of
*materials happen.
*Calculate the difference in days and mark values based on the below
*condition.
*Display the output as per the user given format.
*FLOWLOGIC
Tables
TABLES : S031,      " Statistics: Movements for current stocks
         S032,      " Statistics: Current Stock and Grouping Terms
         MBEW,      " Material Valuation
         MBEWH,     " Material Valuation: History
         MARC,      " Plant Data for Material
         MARA,      "material master
         T001W,     " Plant Details
         MKPF,
         V_T179.
TYPE-POOLS
TYPE-POOLS: SLIS.
DATA:   IT_HEADING       TYPE SLIS_T_LISTHEADER   WITH HEADER LINE.
DATA:   IT_FCAT          TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
DATA:   LAY              TYPE SLIS_LAYOUT_ALV.
DATA:   IT_SORT_SUBTOTAL TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE.
DATA:   IT_EVENT         TYPE SLIS_T_EVENT        WITH HEADER LINE.
DATA:   V_REPID LIKE SY-REPID.
DATA:   PRDHA1(5),
        PRDHA2(10),
        LVL1(40),
        LVL2(40),
        LVL3(40).
RANGES: S_BWTAR FOR BWTAR.
INTERNAL Tables
*******For Mat. Desc.************
DATA : BEGIN OF I_MAKT OCCURS 0,
          MATNR TYPE MAKT-MATNR,    " Material Code
          MAKTX TYPE MAKT-MAKTX,    " Material Description
       END OF I_MAKT.
DATA : BEGIN OF TEMP OCCURS 0,
VTEXT(40),
END OF TEMP.
*******For Mat. No. & Type & Grp*
DATA : BEGIN OF I_MARA OCCURS 0,
          MATNR TYPE MARA-MATNR,    " Material Code
          MATKL         TYPE MARA-MATKL,
          MTART         TYPE MARA-MTART,
          MFRNR         TYPE MARA-MFRNR,
       END OF I_MARA.
******For Stock******************
DATA : BEGIN OF I_MBEWH OCCURS 0,
          MATNR TYPE MBEWH-MATNR,
          BWTAR TYPE MBEWH-BWTAR,
          LBKUM TYPE MBEWH-LBKUM,
          SALK3 TYPE MBEWH-SALK3,
          BWKEY TYPE MBEWH-BWKEY,
          VBELN TYPE EBEW-VBELN,
          POSNR TYPE EBEW-POSNR,
          SOBKZ TYPE QBEW-SOBKZ,
          PSPNR TYPE QBEW-PSPNR,
          LFGJA TYPE MBEW-LFGJA,
          LFMON TYPE MBEW-LFMON,
       END OF I_MBEWH.
DATA: I_MBEWH1 LIKE I_MBEWH OCCURS 0 WITH HEADER LINE.
*******For Moving Price***********
DATA : BEGIN OF I_MBEW OCCURS 0,
          MATNR TYPE MBEWH-MATNR,
          BWTAR TYPE MBEWH-BWTAR,
          LBKUM TYPE MBEWH-LBKUM,
          VERPR TYPE MBEWH-VERPR,
          VPRSV TYPE MBEWH-VPRSV,
          STPRS TYPE MBEWH-STPRS,
       END OF I_MBEW.
DATA : BEGIN OF I_RECIPT1 OCCURS 0,
       MATNR TYPE Z_MKPF_MSEG-MATNR,
       NAME1 TYPE LFA1-NAME1,
       MAKTX       TYPE MAKT-MAKTX,
       BWTAR TYPE Z_MKPF_MSEG-BWTAR,
       VERPR TYPE MBEWH-VERPR,
       PRDHA LIKE MARA-PRDHA,
       VTEXT(40) ,
       LBKUM TYPE MBEWH-LBKUM,
       SALK3 TYPE MBEWH-SALK3,
       QTY1 TYPE MBEWH-LBKUM,
       VAL1 TYPE P DECIMALS 2,
       QTY2 TYPE MBEWH-LBKUM,
       VAL2 TYPE P DECIMALS 2,
       QTY3 TYPE MBEWH-LBKUM,
       VAL3 TYPE P DECIMALS 2,
       QTY4 TYPE MBEWH-LBKUM,
       VAL4 TYPE P DECIMALS 2,
       QTY5 TYPE MBEWH-LBKUM,
       VAL5 TYPE P DECIMALS 2,
       QTY6 TYPE MBEWH-LBKUM,
       VAL6 TYPE P DECIMALS 2,
       QTY7 TYPE MBEWH-LBKUM,
       VAL7 TYPE P DECIMALS 2,
       END OF I_RECIPT1.
DATA :   BEGIN OF I_MKPF_MSEG OCCURS 0,
  MATNR LIKE MARA-MATNR,
  MBLNR LIKE MSEG-MBLNR,
  ZEILE LIKE MSEG-ZEILE,
  MENGE LIKE MSEG-MENGE,
  BWART LIKE MSEG-BWART,
  BUDAT LIKE MKPF-BUDAT,
  NET_VAL LIKE MSEG-MENGE,
  EBELN LIKE MSEG-EBELN,
  EBELP LIKE MSEG-EBELP,
  LFBNR LIKE MSEG-LFBNR,
  LFPOS LIKE MSEG-LFPOS,
  SHKZG LIKE MSEG-SHKZG,
  MEINS LIKE MARA-MEINS,
  SMBLN LIKE MSEG-SMBLN,
  SMBLP LIKE MSEG-SMBLP,
  END OF I_MKPF_MSEG,
  WA_MSEG LIKE I_MKPF_MSEG.
********For Material Movement***
DATA: BEGIN OF I_MSEG OCCURS 0,
        MBLNR TYPE Z_MKPF_MSEG-MBLNR,
        MATNR TYPE Z_MKPF_MSEG-MATNR,
        WERKS TYPE Z_MKPF_MSEG-WERKS,
        BWART TYPE Z_MKPF_MSEG-BWART,
        BUDAT TYPE Z_MKPF_MSEG-BUDAT,
        MENGE TYPE Z_MKPF_MSEG-MENGE,
        MEINS TYPE Z_MKPF_MSEG-MEINS,
        BWTAR TYPE Z_MKPF_MSEG-BWTAR,
        NET_VAL LIKE MSEG-MENGE,
        ZEILE TYPE MSEG-ZEILE,
      END OF I_MSEG.
********For Material Monvment(Reverse)***
DATA: BEGIN OF I_MSEG1 OCCURS 0,
        MBLNR TYPE Z_MKPF_MSEG-MBLNR,
        MATNR TYPE Z_MKPF_MSEG-MATNR,
        WERKS TYPE Z_MKPF_MSEG-WERKS,
        BWART TYPE Z_MKPF_MSEG-BWART,
        BUDAT TYPE Z_MKPF_MSEG-BUDAT,
        MENGE TYPE Z_MKPF_MSEG-MENGE,
        MEINS TYPE Z_MKPF_MSEG-MEINS,
        BWTAR TYPE Z_MKPF_MSEG-BWTAR,
        SMBLN TYPE Z_MKPF_MSEG-SMBLN,
        SMBLP TYPE Z_MKPF_MSEG-SMBLP,
      END OF I_MSEG1.
DATA: I_MSEG2 LIKE I_MSEG1 OCCURS 0 WITH HEADER LINE.
********For Recipt Details*******
DATA: BEGIN OF I_RECIPT OCCURS 0,
       MATNR TYPE Z_MKPF_MSEG-MATNR,
       BWTAR TYPE Z_MKPF_MSEG-BWTAR,
       BUDAT TYPE Z_MKPF_MSEG-BUDAT,
       DAYS TYPE  P,
       QTY TYPE Z_MKPF_MSEG-MENGE,
       MONTH(3),
       YEAR(4),
       VERPR TYPE MBEWH-VERPR,
       COST TYPE P DECIMALS 2,
       MARK(1),
     END OF I_RECIPT.
DATA: BEGIN OF I_PLANT OCCURS 0,
      WERKS  LIKE T024W-WERKS,
      EKORG  LIKE T024W-EKORG,
      BUKRS  LIKE T024E-BUKRS,
      CHK(1) TYPE C,
      END OF I_PLANT.
DATA: BEGIN OF I_USERGRP OCCURS 0.
        INCLUDE STRUCTURE USGRP_USER.
DATA: VKORG LIKE VBAK-VKORG,
      END OF I_USERGRP.
DATA: MUGRP LIKE USGRP_USER-USERGROUP.
DATA: MUNAME LIKE SY-UNAME,
      MMSGTX1(50) TYPE C.
*********For Temp.Values*****
*data: begin of i_temp occurs 0,
      matnr type z_mkpf_mseg-matnr,
      bwtar type z_mkpf_mseg-bwtar,
      budat type z_mkpf_mseg-budat,
      menge type z_mkpf_mseg-menge,
    end of i_temp.
DATA: DAYS(2).
DATA: NET_VAL LIKE MSEG-MENGE.
DATA: DATE1 TYPE  D.
DATA: DATE2 TYPE  D.
DATA: MBLNR TYPE MSEG-MBLNR.
DATA: MATNR TYPE MSEG-MATNR.
DATA: BWTAR TYPE MSEG-BWTAR.
DATA : V_DATE TYPE SY-DATUM.
DATA : X(2) TYPE C VALUE '01'.
DATA : P TYPE T009B-POPER.    " MONTH
DATA : Q TYPE T009B-BDATJ.    " YEAR
DATA : A TYPE T009B-POPER.  " FOR MONTH WHERE MONTH STARTS AT APRIL
DATA : B(4) TYPE C.         " FOR YEAR
DATA : DATE TYPE SY-DATUM.
DATA:  NUMBER_OF_DAYS TYPE  P.
DATA: DAT TYPE D.
DATA : X1(2) .
DATA: VPRSV TYPE MBEWH-VPRSV,
      STPRS TYPE MBEWH-STPRS.
DATA: C TYPE C VALUE 0,
     S(10).
Parameter /  Selection - screens
SELECTION-SCREEN BEGIN OF BLOCK IND1 WITH FRAME TITLE TEXT_001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(28) TEXT_002 FOR FIELD P_WERKS.
PARAMETERS : P_WERKS LIKE S031-WERKS OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(28) TEXT_003 FOR FIELD P_SPMON.
PARAMETERS : P_SPMON LIKE S031-SPMON MODIF ID ABC .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TEXT_004 FOR FIELD S_MATNR.
SELECT-OPTIONS : S_MATNR FOR S031-MATNR.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK IND1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT_005.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TEXT_006 FOR FIELD SO_MATTP.
SELECT-OPTIONS : SO_MATTP FOR MARA-MTART.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TEXT_007 FOR FIELD SO_MATGP.
SELECT-OPTIONS : SO_MATGP FOR MARA-MATKL.
SELECTION-SCREEN END OF LINE.
begin of changes by cvns01
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TEXT_008 FOR FIELD SO_MFRNR.
SELECT-OPTIONS : SO_MFRNR FOR MARA-MFRNR.
SELECTION-SCREEN END OF LINE.
end of changes by cvns01
*changes
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) TEXT_009 FOR FIELD SO_MFRNR.
SELECT-OPTIONS : SO_PRDHA FOR MARA-PRDHA NO INTERVALS."NO-EXTENSION.
SELECTION-SCREEN END OF LINE.
*end
SELECTION-SCREEN END OF BLOCK B2.
Initialization
INITIALIZATION.
  TEXT_001 = 'Required Data'.
  TEXT_002 = 'Plant'.
  TEXT_003 = 'Period to analyze - month'.
  TEXT_004 = 'Material Number'.
  TEXT_005 = 'Optional Data'.
  TEXT_006 = 'Material Type'.
  TEXT_007 = 'Material Group'.
start of changes by cvns01
  TEXT_008 = 'Manufacturer No.'.
  TEXT_009 = 'Product Hierarchy'.
end of changes by cvns01
  CLEAR:P,Q.
  CLEAR A.
  P = SY-DATUM+4(2).
  SHIFT P LEFT DELETING LEADING C.
  Q = SY-DATUM(4).
  IF P <= 9.
    CONCATENATE  Q '0' P INTO S. "p_spmon.
  ELSE.
    CONCATENATE  Q P INTO S. "p_spmon.
  ENDIF.
*concatenate q p into s. "p_spmon.
  CONDENSE S.
  P_SPMON = S.
AT SELECTION-SCREEN ON WERKS
AT SELECTION-SCREEN ON P_WERKS.
  CHECK SY-UCOMM = 'ONLI'.
  SELECT SINGLE * FROM T001W WHERE WERKS EQ P_WERKS.
  IF SY-SUBRC NE 0.
    MESSAGE E999 WITH 'Invalid Plant'.
  ENDIF.
  SELECT T024W~WERKS T024E~EKORG T024E~BUKRS
      INTO CORRESPONDING FIELDS OF TABLE I_PLANT
      FROM T024W
      JOIN T024E ON T024E~EKORG = T024W~EKORG
      WHERE T024W~WERKS EQ P_WERKS.
  SORT I_PLANT BY WERKS.
  DELETE ADJACENT DUPLICATES FROM I_PLANT COMPARING WERKS.
  SELECT * INTO CORRESPONDING FIELDS OF TABLE I_USERGRP
        FROM USGRP_USER
        WHERE BNAME = SY-UNAME.
  IF I_USERGRP[] IS INITIAL.
    MESSAGE E208(00) WITH 'You are not authorised to view this report'.
  ENDIF.
  LOOP AT I_USERGRP.
    CONCATENATE I_USERGRP-USERGROUP(2) '00' INTO I_USERGRP-VKORG.
    MODIFY I_USERGRP.
  ENDLOOP.
  LOOP AT I_USERGRP.
    LOOP AT I_PLANT WHERE BUKRS = I_USERGRP-VKORG.
      I_PLANT-CHK = 'X'.
      MODIFY I_PLANT.
    ENDLOOP.
  ENDLOOP.
*delete i_plant where chk = ''.
  IF NOT I_PLANT[] IS INITIAL.
    LOOP AT I_PLANT.
      IF I_PLANT-CHK = ''.
        CLEAR P_WERKS.
        CONCATENATE 'You are not authorised for plant ' I_PLANT-WERKS INTO MMSGTX1 SEPARATED BY SPACE.
        MESSAGE E208(00) WITH MMSGTX1.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF P_WERKS = ''.
    MESSAGE E208(00) WITH 'Select/Enter Plant'.
  ENDIF.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'ABC'.
      SCREEN-INPUT = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
AT SELECTION-SCREEN
*AT SELECTION-SCREEN .
SELECT SINGLE * FROM s031 WHERE werks EQ p_werks
                             AND spmon EQ p_spmon
                             AND matnr IN s_matnr.
IF sy-subrc NE 0.
   MESSAGE e999 WITH 'NO VALUES EXIST FOR SELECTION CRITERIA'.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
  PERFORM PRDHA_INITIALIZATION.
  PERFORM FETCH_DATA.
  PERFORM DISPLAY_DATA.
END-OF-SELECTION.
*&      Form  FETCH_DATA
      text
-->  p1        text
<--  p2        text
FORM FETCH_DATA .
  CLEAR:P,Q.
  CLEAR A.
  P = P_SPMON+4(2).
  Q = P_SPMON+0(4).
******Materials**********************************
changes made by akshatha
  SELECT MARA~MATNR
         FROM MARA
         JOIN MARC
         ON MARCMATNR = MARAMATNR
         INTO CORRESPONDING FIELDS OF TABLE I_MARA
         WHERE MARA~MATNR IN S_MATNR
           AND MARC~WERKS = P_WERKS
           AND MARA~MTART IN SO_MATTP
           AND MARA~MATKL IN SO_MATGP
           AND MARA~MFRNR IN SO_MFRNR
           AND MARA~PRDHA IN SO_PRDHA.
end of changes
To get material description for the material
  IF NOT I_MARA[] IS INITIAL.
    SELECT MATNR
           MAKTX
           FROM MAKT
           INTO CORRESPONDING FIELDS OF TABLE I_MAKT
           FOR ALL ENTRIES IN I_MARA
           WHERE MATNR = I_MARA-MATNR
             AND SPRAS = SY-LANGU.
TO GET OPEN BALANCE QTY WE NEED TO CONSIDER PREVIOUS MONTH OF THE
CORRESPONDING PERIOD
WE WILL GET PROBLEM ONLY PROBLEM WHEN PERIOD IS '01'. THEN WE MUST
CONSIDER FOR 12 TH MONTH OF PREVIOUS YEAR.
****Closing Stock as on Selection-Screen Month....
*By Default last date of month is taken
changed by akshatha
    CONCATENATE P_SPMON X INTO V_DATE.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
      EXPORTING
        I_DATE               = V_DATE
  I_MONMIT             = 00
        I_PERIV              = 'V3'
     IMPORTING
       E_BUPER              = A
       E_GJAHR              = Q
     EXCEPTIONS
       INPUT_FALSE          = 1
       T009_NOTFOUND        = 2
       T009B_NOTFOUND       = 3
       OTHERS               = 4 .
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
to get stock quantity
    SELECT MATNR LBKUM SALK3 BWKEY LFGJA LFMON
           FROM MBEWH
           INTO CORRESPONDING FIELDS OF TABLE I_MBEWH
           FOR ALL ENTRIES IN I_MARA
           WHERE MATNR = I_MARA-MATNR
           AND BWKEY = P_WERKS           AND BWTAR IN S_BWTAR
             AND LFGJA = Q
             AND LFMON = A
             AND LBKUM > '0.0'.
    SELECT MATNR LBKUM SALK3 BWKEY VBELN POSNR LFGJA LFMON
            FROM EBEWH
            APPENDING CORRESPONDING FIELDS OF TABLE I_MBEWH
            WHERE MATNR = I_MARA-MATNR
             AND BWKEY = P_WERKS
             AND BWTAR IN S_BWTAR
             AND LFGJA = Q
             AND LFMON = A
             AND LBKUM > '0.0'.
          and VPRSV = 'S'.
    SELECT MATNR LBKUM SALK3 BWKEY SOBKZ PSPNR LFGJA LFMON
            FROM QBEWH
            APPENDING CORRESPONDING FIELDS OF TABLE I_MBEWH
            WHERE MATNR = I_MARA-MATNR
             AND BWKEY = P_WERKS
             AND BWTAR IN S_BWTAR
             AND LFGJA = Q
             AND LFMON = A
             AND LBKUM > '0.0'.
    SELECT MATNR LBKUM SALK3 BWKEY BWTAR
             FROM MBEW
             INTO CORRESPONDING FIELDS OF TABLE I_MBEWH1
             FOR ALL ENTRIES IN I_MARA
             WHERE MATNR = I_MARA-MATNR
             AND BWKEY = P_WERKS
             AND LBKUM > '0.0'.
    SELECT MATNR LBKUM SALK3 BWKEY VBELN POSNR SOBKZ BWTAR
             FROM EBEW
             APPENDING CORRESPONDING FIELDS OF TABLE I_MBEWH1
             FOR ALL ENTRIES IN I_MARA
             WHERE MATNR = I_MARA-MATNR
                    AND BWKEY = P_WERKS
                    AND LBKUM > '0.0'.
    SELECT MATNR LBKUM SALK3 BWKEY BWTAR SOBKZ PSPNR
             FROM QBEW
             APPENDING CORRESPONDING FIELDS OF TABLE I_MBEWH1
             FOR ALL ENTRIES IN I_MARA
             WHERE MATNR = I_MARA-MATNR
                    AND BWKEY = P_WERKS
                    AND LBKUM > '0.0'.
    SORT I_MBEWH BY MATNR BWKEY.
    SORT I_MBEWH1 BY MATNR BWKEY.
    LOOP AT I_MBEWH.
      LOOP AT I_MBEWH1 WHERE MATNR = I_MBEWH-MATNR
                         AND BWKEY = I_MBEWH-BWKEY.
        DELETE I_MBEWH1.
      ENDLOOP.
    ENDLOOP.
    APPEND LINES OF I_MBEWH1 TO I_MBEWH.
    CLEAR : I_MBEWH1.
    REFRESH I_MBEWH1.
    SORT I_MBEWH BY MATNR.
    LOOP AT I_MBEWH .
      I_MBEWH1 = I_MBEWH.
      AT END OF MATNR.
        SUM.
        I_MBEWH1-LBKUM = I_MBEWH-LBKUM.
        I_MBEWH1-SALK3 = I_MBEWH-SALK3.
        APPEND I_MBEWH1.
      ENDAT.
    ENDLOOP.
    DELETE I_MBEWH1 WHERE LBKUM <= 0.
    I_MBEWH[] = I_MBEWH1[].
end of changes
loop at i_mara.
   concatenate p_spmon x into v_date.
   call function 'DATE_TO_PERIOD_CONVERT'
     exporting
       i_date               = v_date
  I_MONMIT             = 00
       i_periv              = 'V3'
    importing
      e_buper              = a
      e_gjahr              = q
    exceptions
      input_false          = 1
      t009_notfound        = 2
      t009b_notfound       = 3
      others               = 4 .
   if sy-subrc <> 0.
     message id sy-msgid type sy-msgty number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   endif.
To get STOCK QUANTITY and STOCK VALUE for All Valuation Type
   select  matnr
           bwtar
           lbkum
           salk3
          from mbewh
          into corresponding fields of i_mbewh
          where matnr = i_mara-matnr
            and bwkey = p_werks
            and lfmon = a         " 'A' IS PERIOD FOR FISCAL YR
            and lfgja = q.
       collect i_mbewh.
       clear i_mbewh.
   endselect.
   if sy-subrc ne 0.
     select       matnr
                  bwtar
                  lbkum
                  salk3
                  from mbew
                  into corresponding fields of i_mbewh
                   where matnr = i_mara-matnr
                     and bwkey = p_werks.
         collect i_mbewh.
         clear i_mbewh.
     endselect.
   endif.
endloop.
end of changes
Logic: If the Val. Type is defined then for that material dont take
the line item where Val. Type is blank......
sort  i_mbewh by matnr bwtar.
i_mbewh1[] = i_mbewh[].
delete i_mbewh where bwtar = ' '.
loop at i_mbewh1.
   read table i_mbewh with key matnr = i_mbewh1-matnr.
   if sy-subrc <> 0.
     move-corresponding i_mbewh1 to i_mbewh.
     append i_mbewh.
   endif.
endloop.
sort  i_mbewh by matnr bwtar.
i_mbewh1[] = i_mbewh[].
end of changes
*****************Last Date of the month is Calculated to find Qty
    DAT = V_DATE.
    CALL FUNCTION 'HR_E_NUM_OF_DAYS_OF_MONTH'
      EXPORTING
        P_FECHA        = DAT
      IMPORTING
        NUMBER_OF_DAYS = NUMBER_OF_DAYS.
    X1 =  NUMBER_OF_DAYS.
    CONCATENATE P_SPMON X1 INTO DATE.
********RECIPT QTY FETCHING*************************
select          mblnr
                 matnr
                 bwart
                 budat
                 menge
                 meins
                 bwtar
                 zeile
                 from z_mkpf_mseg
                 into  (i_mseg-mblnr,
                        i_mseg-matnr,
                        i_mseg-bwart,
                        i_mseg-budat,
                        i_mseg-menge,
                        i_mseg-meins,
                        i_mseg-bwtar,
                        i_mseg-zeile)
          for all entries in i_mbewh
          where matnr = i_mbewh-matnr and werks = p_werks
            and  ( budat le date or budat eq date )
            and bwart in ('101','561','501','951','953','955',
**'957','301','105')
            and bwtar = i_mbewh-bwtar.
   append i_mseg.
   clear i_mseg.
endselect.
select          mblnr
                 matnr
                 bwart
                budat
                 menge
                 meins
                 bwtar
                 zeile
                 from mseg "z_mkpf_mseg
                 into corresponding fields of table i_mseg
                       (i_mseg-mblnr,
                        i_mseg-matnr,
                        i_mseg-bwart,
                        i_mseg-budat,
                        i_mseg-menge,
                        i_mseg-meins,
                        i_mseg-bwtar,
                        i_mseg-zeile)
          for all entries in i_mbewh
          where matnr = i_mbewh-matnr and werks = p_werks
            and  ( budat le date or budat eq date )
            and bwart in ('101','561','501','951','953','955',
***'957','301','105')
            and bwart in ('101','561','501','951','953','955',
*'957','301','309','105')
           and bwtar = i_mbewh-bwtar.
loop at i_mseg.
   select single * from mkpf
          where mblnr = i_mseg-mblnr.
   if ( mkpf-budat ge date ).
     delete i_mseg where mblnr = i_mseg-mblnr.
   else.
     i_mseg-budat = mkpf-budat.
     modify i_mseg.
   endif.
endloop.
sort i_mseg descending by matnr bwtar budat.
**********For Reversal FOR RECIPT(CHECK FOR REFERENCE)
**********(102,562,502,952,954,956,958)
          select mblnr
                 matnr
                 bwart
                 menge
                 meins
                 bwtar
                 smbln
                 smblp
                 from mseg
                 into corresponding fields of table i_mseg1
          for all entries in i_mbewh
          where matnr = i_mbewh-matnr and werks = p_werks
          and bwart in ('102','562','502','952','954','956','958','302')
            and bwtar = i_mbewh-bwtar.
loop at i_mseg1.
   select single * from mkpf
          where mblnr = i_mseg1-mblnr.
   if ( mkpf-budat ge date ).
     delete i_mseg1 where mblnr = i_mseg1-mblnr.
   else.
     i_mseg1-budat = mkpf-budat.
     modify i_mseg1.
   endif.
endloop.
loop at i_mseg1.
   read table i_mseg with key mblnr = i_mseg1-smbln
                              zeile = i_mseg1-smblp.
   if  sy-subrc = 0.
     i_mseg-menge = i_mseg-menge - i_mseg1-menge.
     delete i_mseg where mblnr = i_mseg1-smbln and
                         zeile = i_mseg1-smblp.
     move-corresponding i_mseg to i_mseg2.
     append i_mseg2.
   endif.
endloop.
loop at i_mseg2.
   move-corresponding i_mseg2 to i_mseg.
   append i_mseg.
endloop.
end of changes.
    SELECT MSEGMATNR MSEGMBLNR MSEGZEILE MSEGMENGE MSEGBWART MSEGEBELN
           MSEGEBELP MSEGSMBLN MSEG~SMBLP
           MKPFBUDAT MSEGSHKZG
           FROM MKPF
           JOIN MSEG ON MSEGMBLNR = MKPFMBLNR
                    AND MSEGMJAHR = MKPFMJAHR
                      INTO CORRESPONDING FIELDS OF TABLE I_MKPF_MSEG
                          FOR ALL ENTRIES IN I_MARA
                        WHERE MSEG~MATNR = I_MARA-MATNR
                          AND MSEG~WERKS = P_WERKS
                          AND MKPF~BUDAT LE DATE
                          AND MSEG~BWART IN ('101','105','561','501','301','309','951','953','955','957','712','657','658',
                                             '521','522','303','304','102','562','502','952','954','956','958','302').
    DELETE  I_MKPF_MSEG WHERE  ( BWART = '309' AND SHKZG = 'H' )
                            OR ( BWART = '303' AND SHKZG = 'H' )
                            OR ( BWART = '304' AND SHKZG = 'S' )
                            OR ( BWART = '657' AND SHKZG = 'H' )
                            OR ( BWART = '658' AND SHKZG = 'S' ).
    SORT I_MKPF_MSEG BY MATNR MBLNR.
    LOOP AT I_MKPF_MSEG.
   if i_mkpf_mseg-bwart = '101' or i_mkpf_mseg-bwart = '102'.
     select single * from ekpo  where ebeln = i_mkpf_mseg-ebeln
                                  and ebelp = i_mkpf_mseg-ebelp.
     if ekpo-pstyp = 7.
       delete i_mkpf_mseg where ebeln = i_mkpf_mseg-ebeln
                            and ebelp = i_mkpf_mseg-ebelp.
       CLEAR I_MKPF_MSEG-MENGE.
     endif.
   endif.
      IF ( I_MKPF_MSEG-BWART = '101' OR I_MKPF_MSEG-BWART = '105' OR I_MKPF_MSEG-BWART = '561' OR
           I_MKPF_MSEG-BWART = '501' OR I_MKPF_MSEG-BWART = '301' OR I_MKPF_MSEG-BWART = '309' OR
           I_MKPF_MSEG-BWART = '951' OR I_MKPF_MSEG-BWART = '953' OR I_MKPF_MSEG-BWART = '955' OR
           I_MKPF_MSEG-BWART = '957' OR I_MKPF_MSEG-BWART = '303' OR I_MKPF_MSEG-BWART = '521' OR
           I_MKPF_MSEG-BWART = '712' OR I_MKPF_MSEG-BWART = '657' ).
        NET_VAL = NET_VAL + I_MKPF_MSEG-MENGE.
      ENDIF.
      LOOP AT I_MKPF_MSEG WHERE MATNR = I_MKPF_MSEG-MATNR.
        IF ( I_MKPF_MSEG-BWART = '102' OR I_MKPF_MSEG-BWART = '562' OR
             I_MKPF_MSEG-BWART = '502' OR I_MKPF_MSEG-BWART = '952' OR
             I_MKPF_MSEG-BWART = '954' OR I_MKPF_MSEG-BWART = '956' OR
             I_MKPF_MSEG-BWART = '958' OR I_MKPF_MSEG-BWART = '302' OR
             I_MKPF_MSEG-BWART = '304' OR I_MKPF_MSEG-BWART = '522' OR
             I_MKPF_MSEG-BWART = '658' ) AND
           ( I_MKPF_MSEG-MBLNR = I_MKPF_MSEG-SMBLN AND
             I_MKPF_MSEG-ZEILE = I_MKPF_MSEG-SMBLP ).
          NET_VAL = NET_VAL - I_MKPF_MSEG-MENGE.
          DELETE I_MSEG WHERE MBLNR = I_MSEG1-SMBLN AND
                              ZEILE = I_MSEG1-SMBLP.
        ENDIF.
      ENDLOOP.
      WA_MSEG = I_MKPF_MSEG.
      AT END OF MATNR.
        I_MSEG-MATNR  = WA_MSEG-MATNR.
        I_MSEG-MENGE = NET_VAL.
        I_MSEG-BUDAT = WA_MSEG-BUDAT.
        APPEND I_MSEG.
        CLEAR NET_VAL.
      ENDAT.
    ENDLOOP.
end of changes
    DELETE I_MSEG WHERE MENGE = '0.000'.
    SORT I_MSEG DESCENDING BY MATNR BWTAR BUDAT.
***#******RECIPT COMPLETE FINAL TABLE( I_MSEG)**********
********IF THE VAL. TYPE IS NOT THERE THEN PUT 'X'
loop at i_mbewh.
   if  i_mbewh-bwtar = ' '.
     i_mbewh-bwtar = 'X'.
     modify i_mbewh.
   endif.
endloop.
delete i_mbewh where lbkum = '0.00'.
end of changes
loop at i_mseg.
   if  i_mseg-bwtar = ' '.
     i_mseg-bwtar = 'X'.
     modify i_mseg.
   endif.
endloop.
end of changes
    DATA: MENGE TYPE MSEG-MENGE.
start of changes by akshatha
    SORT I_MSEG BY MATNR BWTAR.
    SORT I_MBEWH BY MATNR BWTAR.
    LOOP AT I_MSEG.
if condition, read and it_mseg-loop commented by akshatha.
   if i_mbewh-lbkum > '0.00'.
   read table i_mbewh with key matnr = i_mseg-matnr
                              bwtar = i_mseg-bwtar.
     loop at i_mseg .
       if ( i_mseg-mblnr <> mblnr ) and ( i_mseg-matnr ne i_temp-matnr
            or i_mseg-bwtar ne i_temp-bwtar ) .
   i_temp-matnr = i_mseg-matnr.
   i_temp-bwtar = i_mseg-bwtar.
   i_temp-budat = i_mseg-budat.
   i_temp-menge = i_mseg-menge.
         mblnr = i_mseg-mblnr.
         matnr = i_mseg-matnr.
         bwtar = i_mseg-bwtar.
   append i_temp.
end of changes
         delete i_mseg .
         loop at i_mbewh where  matnr = matnr
                            and bwtar = bwtar.
end of changes
      LOOP AT I_MBEWH WHERE  MATNR = I_MSEG-MATNR
                         AND BWTAR = I_MSEG-BWTAR.
FOR GETTING THE VALUES OF ISSUES ON & UPTO THE DATE OF RECIPT.
DELETE THE ISSUE QTY FROM STOCK SO THAT WE CAN GET THE EXACT STOCK
VALUE ON THE DATE WHEN RECIPT OF MATERIAL HAS HAPPEN
ISSUES R NOTHING BUT TYPE OF CONSUPTION.
commented and changed by akshatha
     if ( i_mbewh-lbkum >= i_temp-menge ).
        IF ( I_MBEWH-LBKUM >= I_MSEG-MENGE ).
          I_RECIPT-MATNR = I_MBEWH-MATNR.
          I_RECIPT-BWTAR = I_MBEWH-BWTAR.
       i_recipt-budat = i_temp-budat.
          I_RECIPT-BUDAT = I_MSEG-BUDAT.
end of changes
*Type Conversion From Sy-datum to type d.
          DATE1 = DATE.
          DATE2 = I_RECIPT-BUDAT.
*Type Conversion From Sy-datum to type d.
          CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
            EXPORTING
              DATE1    = DATE1
              TIME1    = SY-UZEIT
              DATE2    = DATE2
              TIME2    = SY-UZEIT
            IMPORTING
              DATEDIFF = I_RECIPT-DAYS.
          IF SY-SUBRC <> 0.
          ENDIF.
       i_recipt-qty   = i_temp-menge.
          I_RECIPT-QTY   = I_MSEG-MENGE.
       i_mbewh-lbkum = i_mbewh-lbkum - i_temp-menge.
          I_MBEWH-LBKUM = I_MBEWH-LBKUM - I_MSEG-MENGE.
     elseif ( i_mbewh-lbkum < i_temp-menge ).
        ELSEIF ( I_MBEWH-LBKUM < I_MSEG-MENGE ).
          I_RECIPT-MATNR = I_MBEWH-MATNR.
          I_RECIPT-BWTAR = I_MBEWH-BWTAR.
       i_recipt-budat = i_temp-budat.
          I_RECIPT-BUDAT = I_MSEG-BUDAT.
*Type Conversion From Sy-datum to type d.
          DATE1 = DATE.
          DATE2 = I_RECIPT-BUDAT.
*Calculation of Difference of dates
          CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
            EXPORTING
              DATE1    = DATE1
              TIME1    = SY-UZEIT
              DATE2    = DATE2
              TIME2    = SY-UZEIT
            IMPORTING
              DATEDIFF = I_RECIPT-DAYS.
          IF SY-SUBRC <> 0.
          ENDIF.
          I_RECIPT-QTY   = I_MBEWH-LBKUM.
          I_MBEWH-LBKUM = '0.00'.
        ENDIF.
        MODIFY I_MBEWH.
        APPEND I_RECIPT.
           exit.
end of changes
      ENDLOOP.
endif.
      IF  I_MBEWH-LBKUM <> '0.00'.
     clear i_temp.
        CLEAR I_MSEG.
      ENDIF.
     endloop.
   endif.
  end of changes
    ENDLOOP.
**********FINAL RECIPT TABLE WITH AGE
    SORT I_RECIPT BY MATNR BWTAR DAYS.
    LOOP AT I_RECIPT.
*Calculation of Fiscal yr for moving price.
      PERFORM PERIOD_CALCULATION USING  I_RECIPT-BUDAT+4(2)
        I_RECIPT-BUDAT+0(4)  I_RECIPT-MONTH
        I_RECIPT-YEAR.
      IF I_RECIPT-BWTAR = 'X'.
        I_RECIPT-BWTAR = ' '.
      ENDIF.
**************Moving Price for All material for all months......
     SELECT  SINGLE VERPR
                VPRSV
                STPRS
                FROM MBEWH
                INTO  (I_RECIPT-VERPR,
                      VPRSV,
                      STPRS )
               WHERE MATNR = I_RECIPT-MATNR
                 AND BWTAR = I_RECIPT-BWTAR
                 AND BWKEY = P_WERKS
                 AND LFMON = I_RECIPT-MONTH
                 AND LFGJA = I_RECIPT-YEAR
                 and lbkum = i_recipt-qty.
     IF SY-SUBRC <> 0.
       SELECT  SINGLE VERPR
                  VPRSV
                  STPRS
                  FROM MBEW
                  INTO  (I_RECIPT-VERPR,
                        VPRSV,
                        STPRS )
                 WHERE MATNR = I_RECIPT-MATNR
                   AND BWKEY = P_WERKS
                 and lbkum = i_recipt-qty.
     ENDIF.
     IF I_RECIPT-VERPR IS INITIAL.
       SELECT SINGLE VERPR
                  VPRSV
                  STPRS
                  FROM EBEWH
                  INTO  (I_RECIPT-VERPR,
                        VPRSV,
                        STPRS )
                 WHERE MATNR = I_RECIPT-MATNR
                   AND BWTAR = I_RECIPT-BWTAR
                   AND BWKEY = P_WERKS
                   AND LFMON = I_RECIPT-MONTH
                   AND LFGJA = I_RECIPT

Never mind. I updated my aperture in app store and it fixed the problem. Thank you.

Similar Messages

  • Need to get .ENV and reports.sh set up correctly for 9i/WebUtil

    We have been editing default.env, a app-specific version of default.env called duris.env, and reports. sh, trying to fix the conflict between Forms WebUtil and Reports in 9.0.2.0.1. Now, it's to the point that I can't even run Reports from Forms without core dumping(direct URL calls to Reports work fine) .
    I am pasting the contents of these 3 files into this note, in hopes someone can look at them and tell me why Reports won't even run from Forms any more. Any suggestions are welcome. My email is [email protected].
    Here is the content of our default.env:
    # $Header: default.env@@/main/25 \
    # Checked in on Wed Apr 3 15:45:42 PST 2002 by vobadm \
    # Copyright (c) 2002 by Oracle Corporation. All Rights Reserved. \
    # $
    # $Id: default.env /main/25 3-apr-2.15:45:42 vobadm $
    # default.env - default Forms environment file, Solaris version
    # This file is used to set the Forms runtime environment parameters.
    # If a parameter is not defined here, the value used will be that defined
    # in the environment in which the servlet engine (OC4J or JServ) was started.
    # NOTES
    # 1/ The Forms installation process should replace all occurrences of
    # <percent>FORMS_ORACLE_HOME<percent> with the correct ORACLE_HOME
    # setting, and all occurrences of <percent>O_JDK_HOME<percent> with
    # the location of the JDK (usually $ORACLE_HOME/jdk).
    # Please make these changes manually if not.
    # 2/ Some of the variables below may need to be changed to suite your needs.
    # Please refer to the Forms documentation for details.
    ORACLE_HOME=/usr/oracle/product/9iasr2/mtier
    # Search path for Forms applications (.fmx files, PL/SQL libraries)
    FORMS90_PATH=/usr/oracle/product/9iasr2/mtier/forms90:/usr/oracle/product/webutil/forms:/usr/oracle/apps/duris/forms/bin:/usr/oracle/apps/tools/forms/bin
    # Java class path
    # This is required for the Forms debugger
    # You can append your own Java code here
    CLASSPATH=/opt/java1.3/jre/lib/rt.jar:$ORACLE_HOME/jlib/debugger.jar:$ORACLE_HOME/jlib/utj90.jar:$ORACLE_HOME/jlib/ewt3.jar:$ORACLE_HOME/jlib/share.jar:$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:/usr/oracle/product/webutil/lib/webutil.jar
    #@@CLASSPATH=/opt/java1.3/jre/lib/rt.jar:$ORACLE_HOME/jlib/debugger.jar:$ORACLE_HOME/jlib/utj90.jar:$ORACLE_HOME/jlib/ewt3.jar:$ORACLE_HOME/jlib/share.jar:/usr/oracle/product/webutil/lib/webutil.jar
    #CLASSPATH=/opt/java1.3/jre/lib/rt.jar:$ORACLE_HOME/jlib/debugger.jar:$ORACLE_HOME/jlib/utj90.jar:$ORACLE_HOME/jlib/ewt3.jar:$ORACLE_HOME/jlib/share.jar
    # The PATH setting is not required for Forms if the Forms executables are
    # in <ORACLE_HOME>/bin. However, it is required if Graphics applications
    # are called from Forms applications.
    PATH=/usr/oracle/product/9iasr2/mtier/bin
    # Settings for Reports
    # NOTE: This setting is only needed if Reports applications
    # are called from Forms applications
    #@REPORTS_CLASSPATH=$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:/usr/oracle/product/webutil/lib/webutil.jar
    REPORTS_CLASSPATH=$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/reports/jlib/rwrun.jar
    # Settings for Graphics
    # NOTE: These settings are only needed if Graphics applications
    # are called from Forms applications
    # Please uncomment the following and put the correct 6i
    # oracle_home value to use Graphics applications.
    #ORACLE_GRAPHICS6I_HOME=<your Graphics 6i oracle_home here>
    # Search path for Graphics applications
    GRAPHICS60_PATH=
    # Settings for forms9i tracing and logging
    # Note: This entry has to be uncommented to enable tracing and
    # logging.
    #FORMS90_TRACE_PATH=<FORMS_ORACLE_HOME>/forms90/server
    FORMS90_TRACE_PATH=/ford/thishost/u/oracle
    # System settings
    # You should not normally need to modify these settings
    # Path for shared library objects
    # This is highly platform (if not machine) specific ! At install time
    # <percent>LD_LIBRARY_PATH<percent> should be replaced with the
    # actual value of the LD_LIBRARY_PATH environment variable (at install
    # time). That should ensure we have the paths for such necessities as
    # the motif and X11 libraries.
    # Explanations:
    # - Reports needs the path for libjava.so
    # (/cdm/solaris/o_jdk/1_2_2_0_0/jre/lib/sparc)
    # - Forms needs two paths to the jre, for libjvm.so and libhpi.so
    # - In ojdk 1.3.1 the location of libjvm.so is lib/sparc (there is no
    # classic directory) so we do not include the .../classic directory
    # below. There are other versions of libjvm.so (in directories server,
    # client and hotspot) but we will use the version in lib/sparc for now.
    SHLIB_PATH=/usr/oracle/product/9iasr2/mtier/lib32:/usr/oracle/product/9iasr2/mtier/jdk/jre/lib/PA_RISC:/usr/oracle/product/9iasr2/mtier/jdk/jre/lib/PA_RISC/classic:%SHLIB_PATH%
    # Added for WebUtil
    WEBUTIL_CONFIG=/usr/oracle/product/webutil/server/webutil.cfg
    Here is the content of our app-specific .ENV file, duris.env:
    # $Header: default.env@@/main/25 \
    # Checked in on Wed Apr 3 15:45:42 PST 2002 by vobadm \
    # Copyright (c) 2002 by Oracle Corporation. All Rights Reserved. \
    # $
    # $Id: default.env /main/25 3-apr-2.15:45:42 vobadm $
    # default.env - default Forms environment file, Solaris version
    # This file is used to set the Forms runtime environment parameters.
    # If a parameter is not defined here, the value used will be that defined
    # in the environment in which the servlet engine (OC4J or JServ) was started.
    # NOTES
    # 1/ The Forms installation process should replace all occurrences of
    # <percent>FORMS_ORACLE_HOME<percent> with the correct ORACLE_HOME
    # setting, and all occurrences of <percent>O_JDK_HOME<percent> with
    # the location of the JDK (usually $ORACLE_HOME/jdk).
    # Please make these changes manually if not.
    # 2/ Some of the variables below may need to be changed to suite your needs.
    # Please refer to the Forms documentation for details.
    ORACLE_HOME=/usr/oracle/product/9iasr2/mtier
    # Search path for Forms applications (.fmx files, PL/SQL libraries)
    FORMS90_PATH=/usr/oracle/product/9iasr2/mtier/forms90:/usr/oracle/product/webutil/forms:/usr/oracle/apps/duris/forms/bin:/usr/oracle/apps/tools/forms/bin
    # Java class path
    # This is required for the Forms debugger
    # You can append your own Java code here
    CLASSPATH=/opt/java1.3/jre/lib/rt.jar:$ORACLE_HOME/jlib/debugger.jar:$ORACLE_HOME/jlib/utj90.jar:$ORACLE_HOME/jlib/ewt3.jar:$ORACLE_HOME/jlib/share.jar:$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:/usr/oracle/product/webutil/lib/webutil.jar
    #@@CLASSPATH=/opt/java1.3/jre/lib/rt.jar:$ORACLE_HOME/jlib/debugger.jar:$ORACLE_HOME/jlib/utj90.jar:$ORACLE_HOME/jlib/ewt3.jar:$ORACLE_HOME/jlib/share.jar:/usr/oracle/product/webutil/lib/webutil.jar
    #CLASSPATH=/opt/java1.3/jre/lib/rt.jar:$ORACLE_HOME/jlib/debugger.jar:$ORACLE_HOME/jlib/utj90.jar:$ORACLE_HOME/jlib/ewt3.jar:$ORACLE_HOME/jlib/share.jar
    # The PATH setting is not required for Forms if the Forms executables are
    # in <ORACLE_HOME>/bin. However, it is required if Graphics applications
    # are called from Forms applications.
    PATH=/usr/oracle/product/9iasr2/mtier/bin
    # Settings for Reports
    # NOTE: This setting is only needed if Reports applications
    # are called from Forms applications
    #@REPORTS_CLASSPATH=$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:/usr/oracle/product/webutil/lib/webutil.jar
    REPORTS_CLASSPATH=$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/reports/jlib/rwrun.jar
    # Settings for Graphics
    # NOTE: These settings are only needed if Graphics applications
    # are called from Forms applications
    # Please uncomment the following and put the correct 6i
    # oracle_home value to use Graphics applications.
    #ORACLE_GRAPHICS6I_HOME=<your Graphics 6i oracle_home here>
    # Search path for Graphics applications
    GRAPHICS60_PATH=
    # Settings for forms9i tracing and logging
    # Note: This entry has to be uncommented to enable tracing and
    # logging.
    #FORMS90_TRACE_PATH=<FORMS_ORACLE_HOME>/forms90/server
    FORMS90_TRACE_PATH=/ford/thishost/u/oracle
    # System settings
    # You should not normally need to modify these settings
    # Path for shared library objects
    # This is highly platform (if not machine) specific ! At install time
    # <percent>LD_LIBRARY_PATH<percent> should be replaced with the
    # actual value of the LD_LIBRARY_PATH environment variable (at install
    # time). That should ensure we have the paths for such necessities as
    # the motif and X11 libraries.
    # Explanations:
    # - Reports needs the path for libjava.so
    # (/cdm/solaris/o_jdk/1_2_2_0_0/jre/lib/sparc)
    # - Forms needs two paths to the jre, for libjvm.so and libhpi.so
    # - In ojdk 1.3.1 the location of libjvm.so is lib/sparc (there is no
    # classic directory) so we do not include the .../classic directory
    # below. There are other versions of libjvm.so (in directories server,
    # client and hotspot) but we will use the version in lib/sparc for now.
    SHLIB_PATH=/usr/oracle/product/9iasr2/mtier/lib32:/usr/oracle/product/9iasr2/mtier/jdk/jre/lib/PA_RISC:/usr/oracle/product/9iasr2/mtier/jdk/jre/lib/PA_RISC/classic:%SHLIB_PATH%
    # Added for WebUtil
    WEBUTIL_CONFIG=/usr/oracle/product/webutil/server/webutil.cfg
    Here is the content of reports.sh:
    #!/bin/sh
    # $Header: reports.sh@@/main/pl_hpux_formsreports_9i/8 \
    # Checked in on Mon Apr 8 19:40:42 PDT 2002 by diglesia \
    # Copyright (c) 2002 by Oracle Corporation. All Rights Reserved. \
    # $
    # Copyright (c) 60, 2002 by Oracle Corporation. All Rights Reserved.
    ## Example file to set environment variables in Bourne-shell or K-shell
    ## for Oracle Reports 9i. Refer to Install Doc for more detail on each
    ## of these environment variables. You need to modify some of the environment
    ## variables before doing source on this file ( % . reports.sh ).
    ##DISPLAY=< your unix machine name:0.0 >; export DISPLAY
    DISPLAY=localhost:5; export DISPLAY
    ## ORACLE_HOME=< oracle home >; export ORACLE_HOME
    ## if you need more than one diretory in your path, all directories should be
    ## separated by ':'
    PATH=$ORACLE_HOME/jdk/bin:$ORACLE_HOME/bin:${PATH}; export PATH
    ## Platform specific settings
    ## HP-UX settings
    if [ `uname -s` = 'HP-UX' ]
    then
    SHLIB_PATH=$ORACLE_HOME/jdk/jre/lib/PA_RISC:$ORACLE_HOME/jdk/jre/lib/PA_RISC/classic:$ORACLE_HOME/lib32:${SHLIB_PATH}; export SHLIB_PATH
    ## Linux settings
    elif [ `uname -s` = 'Linux' ]
    then
    LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386:$ORACLE_HOME/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
    ## Compaq Tru64 settings (OSF1)
    elif [ `uname -s` = 'OSF1' ]
    then
    LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/alpha:$ORACLE_HOME/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
    ## Default settings
    else
    LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/sparc:$ORACLE_HOME/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
    ## end platform specific settings
    fi
    ## You need to set TNS_ADMIN and TWO_TASK or ORACLE_SID to connect to database
    ## Some default values have been set below
    TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
    ## TWO_TASK=< two task name >; export TWO_TASK
    ## ORACLE_SID=< ORACLE SID >; export ORACLE_SID
    ## setting for Reports Runtime
    RW=$ORACLE_HOME/reports; export RW
    #REPORTS_PATH=$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo:$ORACLE_HOME/reports/integ:$ORACLE_HOME/reports/printers; export REPORTS_PATH
    REPORTS_TMP=/tmp; export REPORTS_TMP
    REPORTS_NO_DUMMY_PRINTER=TRUE; export REPORTS_NO_DUMMY_PRINTER
    REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar; export REPORTS_TAGLIB_URI
    REPORTS_CLASSPATH=$ORACLE_HOME/reports/jlib/rwbuilder.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:$ORACLE_HOME/jlib/zrclient.jar:$ORACLE_HOME/j2ee/home/oc4j.jar:$ORACLE_HOME/j2ee/home/lib/ojsp.jar;export REPORTS_CLASSPATH
    ##This section added by configurefont.sh
    PRINTER=fontprinter;export PRINTER
    TK_PRINT_STATUS=echo;export TK_PRINT_STATUS
    REPORTS_PATH=$REPORTS_PATH:$ORACLE_HOME/guicommon9/tk90/admin/TTF;export REPORTS_PATH
    #REPORTS60_PATH=$REPORTS60_PATH:$ORACLE_HOME/guicommon6/tk60/admin/TTF;export REPORTS60_PATH
    TK90_UNKNOWN=$ORACLE_HOME/guicommon9/tk90/admin; export TK90_UNKNOWN
    TK90_PPD=$ORACLE_HOME/guicommon9/tk90/admin/PPD; export TK90_PPD
    TK90_AFM=/opt/rational/base/cots/acrobat.4.0/hppa_hpux/Resource/font:$ORACLE_HOME/guicommon9/tk90/admin/AFM; export TK90_AFM
    TK90_FONTALIAS=$ORACLE_HOME/guicommon9/tk90/admin; export TK90_FONTALIAS

    I tried these steps here:
    http://articles.techrepublic.com.com/5100-10878_11-6174105.html
    However I don't have a selection called share Windows in my sharing prefs, nor do I have a Utility called Directory Access

  • Understanding report need backup recovery window ..

    Hello,
    I have a big database which backed up within several days at night time. The retention policy is "recovery window of 3 days". I've tried to analyze the results of
    report need backup;But I noticed than this command return just the list of datafiles having latest backup older than 3 days. I've tried to read again the docs:
    >
    Reports data files for which there are not sufficient backups to satisfy a recovery window-based retention policy for the specified number of days, that is, data files without sufficient backups for point-in-time recovery to any point back to the time SYSDATE - integer.
    >
    Please correct me if I'm wrong, but I consider that the ability to make recover to any point in time within 3 days require the backup taken earlier than 3 days ago and archivelogs from the time when backup was taken to the recover PIT. Im I right? If so then how I should interprete the results of report need backup ? I can't find the detailed explanations of this in the docs :(
    Thanks in advance,
    Constantine

    You are correct in your appreciations.
    This report is about the need of backups, without considering archivelog backups.
    It does not mean that listed files are in an unrecoverable situation.
    Regards.

  • Stand alone oracle report - need help asap

    Hi,
    We are in ORACLE Apps 11i. We started using ORACLE BI Publisher to create templates for the Oracle Reports. How we are doing reports now is
    1) create data definition XML which has all the queries embedded.
    2) Create Data definition in XML Publisher Admin responsibility.
    3. Attach the Data definition XML to that.
    4. Create a concurrent program definition for the report with XML Type and run the report and save the data file with tags.
    5. Create the template ,rtf in Word and export data using ORACLE BI Publisher. 6. Create template definition in the XML Publisher Admin responsibility and attach this .rtf to that and run the report.
    Now I have a requirement stating that the REPORT SHOULD BE AN ORACLE STAND ALONE REPORT AND THE REPORT NEEDS TO BE RUN THROUGH CONCURRENT PROGRAM SCREEN. I am planning on doing the following steps.
    1. I have to create an .rdf using report builder.
    2. Create concurrent program executable and definition for the report.
    3. Create data definition in XML Publisher admin responsibility.
    4. Run the report in apps.
    5. Create the tempalte .rtf in word and export data with the XML Data file with tags,
    6. Run the report.
    Am I correct? Any help is appreciated asap.
    Thanks
    Akil

    You said,
    standalone report ?? is that mean without using bipublisher ??
    1st method.
    create concurrent program, output xml,
    create data template, create datadefintion , attach Datatemplate.
    run the cc pgm, get xml, design RTF , create template definition , attach RTF,
    run the cc pgm, you get the pdf output.
    2nd method.
    create rdf,
    create concurrent program, output xml,
    run the cc pgm, get xml, design RTF ,
    create datadefintion , create template definition , attach RTF,
    run the cc pgm, you get the pdf output.
    , both requires, cc pgm, rtf, data defintion , template definition.
    only differnece is , how do you get the data, i mean, xml...
    data template or RDF.

  • Report needed to  conbine stock movement  and corresponding balance

    Hi Friends,
    End user need a report to show stock movement trasaction and it's coresponding stock balance.
    In MB51, we can see all the stock movements against one material, is there any way a report could show stocks' corresponding iventory balance under diffierent invenotory category (unrestriced,QC, Return and block) for each movement trasaction ?
    Report needed like below
    SLoc , MoveType , Material document, posting date, qty, unrestic bal, QC balance, return Balance, Blked Bal.
    Thanks,
    L

    Hi,
    Kindly take the help of abaper and create a customized report or also you can have query created in SQ01.
    Hope this will help you !!!
    Regards,
    Krishna O

  • I am trying to now install a free trial of indesign because despite paying $50+ a month for this supposed service I cannot open an indesign file I've been sent and need to do work on it urgently. I have now signed in again for a free one month trial and i

    i am trying to now install a free trial of indesign because despite paying $50+ a month for this supposed service I cannot open an indesign file I've been sent and need to do work on it urgently. I have now signed in again for a free one month trial and it claims to be downloading but this is not happening at all. I am on a Macbook Air and Abobe for my $600 a year membership you have totally ruined by Friday night. If there's a human being out there at Abode please respond now

    Hi,
    If you have already subscribed to the membership, please follow the help document below:
    https://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    Regards,
    Sheena

  • Report needed for storage costs in WM

    Hi All,
    I need a report for the storage costs for utilising the warehouse by plants. Cost of space utilised per m3 will be provided in selection screen. For each material the volume should taken from material master. Warehouse will be utilised by three plants and report needed to calculate the space occupied by the materials in warehouse per plant per month. I am not able to find the logic to calculate average space utilised(as day to day there will putaways,transfer postings and picking).All stocks to be taken into consideration.Let me know how to proceed.
    Regards,
    Manik

    Dear Experts,
    Cud u plz throw some light on this...
    Regards,
    Manik

  • RMAN report need backup

    We have an incremental level-1 backup Mon-Sat and cold full backup on Sundays with retention policy of 7 days. While troubleshooting some backup issues (space issue, expired backups) I ran the following commands and trying to understand the output.
    RMAN> report need backup database;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    100 146 /orahprdidx/hprd/psindex05.dbf
    RMAN> report unrecoverable;
    Report of files that need backup due to unrecoverable operations
    File Type of Backup Required Name
    RMAN> report need backup days = 7 database;
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    100 146 /orahprdidx/hprd/psindex05.dbf
    RMAN> report obsolete recovery window of 7 days;
    no obsolete backups found
    RMAN>
    I looks like I need 146 days worth of archive log files to recover the psindex05.dbf. If so, what I could do to bring that into the 7 days policy?
    The database is fine, I am not trying to recover the database.
    This was setup by someone and now I am taking over with minimum RMAN experience.
    I appreciate any help in this subject.

    The datafile was offline. I guess it was created my mistake and hanging in there. Once I do the cleanup it should go away.

  • I have sent files several times now and when the recipient clicks the link to open. it says page cannot be found.  This just started happening.  what needs to be corrected?

    In Adobe Send, I have sent files several times now and when the recipient clicks the link to open, it says page cannot be found.  This just started happening.  What needs to be corrected?

    I can think of a couple of reasons for this behavior.
    You inadvertently turned off the sharing for the files.
    The link that the user is clicking on is incomplete; perhaps it got broken across lines in an email message. Are you sending Anonymous Links or Personalized Invitations? If the former, are you certain that you copied the entire link?
    Some things to try.
    Have the user send the link back to you so that you can test it. Does it work for you?
    If you look at your Sent Files list, is the name in the Sent To column struck through (e.g., John Smith)? That would indicate that it has been unshared.
    If you could get back to me with answers, perhaps we can get to the bottom of this.

  • Hi! I am newbie to Reports need help with check boxes

    Hi! I am newbie to Reports need help with check boxes. I am try-in to make a new check boxes that will validate in runtime. I have created two frames and one frame is dummy and other frame has big X line on it with conditions. Is this a right way to create check box! Please help thanks!

    and one frame is dummy and other frame has big X
    line on it with conditions. Is this a right way to
    create check box! Please help thanks!Instead of creating a frame for X, you can create Ractangle and place X in it. Rest is fine.

  • Item category 003 needs to be corrected

    Hi,
    While simulating vendor / customer invoice I am getting error as 'Item category 003 needs to be corrected'.
    Could anyone help me to understand why this error occurred and how to go through it?
    Thank you,

    Hi ,
    The error is sometimes experienced when you dont fill in the mandatory fields for input .
    Like the text tab , simply double click the line item which is shown as error and fill in the text tab with details .
    hope this suffices .
    Rgrds ,
    Dewang.

  • Change COPA Report - need to add Variable and Characteristics

    Hello,
    I need to change the existing COPA report, Need to add WBS element as a selection criteria and also a characteristics so it can be drilled down.  Create WBS as a global variable in KE3E and it is not showing up in when i change the report in KE30 in the available list of characteristics. And also it is not showing up in KE35 when i change the general selection to add as a Variable.

    Go to KE91 and create the report.
    In KE91, the Characteristic Cost element (KSTAR) is available.  Add it as below.
    Cost Element      ....   Check the box Hierarchy node ......   check the box Variable on/off   ......          KSTAR......     Cost element.
    After this, just check in Variable, the Cost element shuold appear
    Line item based reports are defined in KE91 (segment level reports in KE31).
    Both types of reports can be started in KE30 and changed in KE32
    Let us know if you still have any queries
    Thanks
    Edited by: nkonnipati on Feb 19, 2012 5:34 AM

  • Reasons for Introducing database functions for Discoverer Reporting Needs

    Hi All,
    I would like to know the criteria other organizations have used in creating custom database functions specifically for Discoverer reporting needs. It seems good and appropriate to identify these reasons in order that they have a sufficiently good reason (e.g. in presenting this to a change management board).
    Here is a quick swipe:
    -query explain plan improvements
    -take away the complexity of having the end user deal with complex calculations
    -consistency of a value (e.g. a complex amortization calculation)
    -an attribute is used from a dependent table with a minimum cardinality of zero
    Can anyone list other good reasons in terms of Discoverer reporting?
    Thanks,
    Patrick
    Edited by: Patrick Bacon on Jul 15, 2009 10:30 AM

    Hi Patrick
    In addition to the reasons you have given the reasons for having functions anyway apply just as equally to Discoverer as they do to other applications.
    Typically the main reasons why I would use a function are:
    a) due to the complexity of the code, or
    b) to evaluate something which an end user either could not do or does not have access to.
    For example if a user needs to have aggregations from multiple tables side by side in a report, typically from tables which have no joins between them, I write functions to go get the individual results.
    One specific function that I use a lot is one that calculates the number of working days between any given two days. Some of my HR customers use such a function to calculate the number of sick days for an employee when obviously only working days should count. Doing this in a normal Discoverer calculation would be very hard. Retail customers might use this for calculating the number of days it took to ship and item.
    There are other reasons why I use functions but these are the typical ones.
    Best wishes
    Michael

  • Wish to update to 7.1.2  need to backup correct? I select settings iCloud sroage

    wish to update to 7.1.2  need to backup correct? I select settings>iCloud>storage & backup and my iCloud backup switch is gray. why?

    If you're phone was provided by your employer, or if you have added your employer's exchange email account to you phone, you employer may have pushed a security profile to your phone preventing it from backing up to iCloud.  You would have to confirm this with your employer's IT department.
    Back up to your computer instead by going connecting it to your computer, opening iTunes and going to File>Devices>Back Up and choosing Transfer Purchases if prompted.

  • Hello I was charged twice for adobe story plus, I need this problem corrected and a refund issued for one of the subscription charges, I tried chatting with Adobe and they were unable to help me. Where is email support?

    Hello I was charged twice for adobe story plus, I need this problem corrected and a refund issued for one of the subscription charges, I tried chatting with Adobe and they were unable to help me. Where is email support?

    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

Maybe you are looking for

  • Toshiba Dynadock Universal USB 3.0 Docking Station (PA3927U-1PRP)

    On every desktop and laptop system I have ever owned, when you plug in a set of headphones into the headphone jack, the speakers are silenced. On my Dynadock, when I plug in my headphones into the front side headphone jack, the speakers can still be

  • Copying Function Modules

    Hi there, newbie ABAP er here, I want to reset the SENDER value in FM SO_NEW_DOCUMENT_ATT_SEND_API1 from SPACE to a valid non-reply email address. Obviously I dont want to alter the Function module so I made a Z copy in my ZDEV package -> Function gr

  • Questions re: calibrating a Thunderbolt and calibration problems

    Is it considered "Normal" or "Wide" gamut? Is the backlight "White LED", "RGB LED" or something else? During calibration it tells me to set the brightness to within 4% of target.  I can't.  One notch of brightness control on a thunderbolt is a huge d

  • Max number of VMs per free ESXi hypervisor?

    VMware Community, I've just installed the free ESXi 5.5 hypervisor and I'm wondering if the same virtual machine limits apply to the standalone scenario as vCenter? Can I actually run 512 VMs? What, if any, is the max number of VMs I can run on a fre

  • HT204266 If you don't like an app can you get a refund?

    Refund for crappy apps.