RG1 Report

Hi All,
We developed a report to display RG1 report, currently in that we are facing a problem.
The problem is when we run the report fro the current month its is not displaying the closing balnce done for the material in the previous month. (i.e.) If the report is run for the January month and if not transaction is performed in the December month the report is supose to fetch the last last transaction performed inthe November month.
The thing is it fetching the value for January month and not the value of November month.
Below we have pasted the logic used for this issue.
The Bold sentence is what used for the specific logic.
*& Report  ZFI_IN01_RG1_REPORT
REPORT  ZFI_IN01_RG1_REPORT LINE-SIZE 265.
TYPE-POOLS : SLIS.
TABLES : ZIN01_RG1BASE, "RG1 Base Table
         MAKT,          " Material Descriptions
         J_1ICHIDTX.    " Chapter id and Text
TYPES: BEGIN OF TP_RG1BASE,
MBLNR           LIKE ZIN01_RG1BASE-MBLNR,
REF_DOC       LIKE ZIN01_RG1BASE-REF_DOC,
MATNR           LIKE ZIN01_RG1BASE-MATNR,
ZEILE           LIKE ZIN01_RG1BASE-ZEILE,
J_1ICHID        LIKE ZIN01_RG1BASE-J_1ICHID,         " CHAPTER ID
J_1ICHT1        LIKE J_1ICHIDTX-J_1ICHT1,         " CHAPTER ID DESC
BUDAT           LIKE ZIN01_RG1BASE-BUDAT,
BWART           LIKE ZIN01_RG1BASE-BWART,
KZBEW           LIKE ZIN01_RG1BASE-KZBEW,
CPUTM           like ZIN01_RG1BASE-CPUTM,
SPLIT_ID        like ZIN01_RG1BASE-SPLIT_ID,
MENGE           LIKE ZIN01_RG1BASE-MENGE,
CLOSE_BAL_PRD   LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
EXPIND          LIKE ZIN01_RG1BASE-EXPIND,
ZKZBEW          LIKE ZIN01_RG1BASE-ZKZBEW,
REF_MTYPE       LIKE ZIN01_RG1BASE-REF_MTYPE,
END OF TP_RG1BASE.
DATA : IG_RG1BASE TYPE STANDARD TABLE OF TP_RG1BASE WITH HEADER LINE
                             INITIAL SIZE 100 WITH DEFAULT KEY,
       WG_RG1BASE LIKE LINE OF IG_RG1BASE,
       IG_RG1BASE_COPY LIKE TABLE OF IG_RG1BASE,
       WG_RG1BASE_COPY LIKE LINE OF IG_RG1BASE,
       IG_SUBCONT TYPE STANDARD TABLE OF TP_RG1BASE WITH HEADER LINE
                             INITIAL SIZE 100 WITH DEFAULT KEY.
      WG_SUBCONT LIKE LINE OF IG_RG1BASE.
DATA : G_OPEN_BAL LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
       G_CLOSE_BAL  LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
       G_FLAG .
<b>DATA : IG_SORT        TYPE TABLE OF ZIN01_RG1BASE ,
            WG_SORT        TYPE ZIN01_RG1BASE,
            IG_ZIN01_RG1BASE LIKE TABLE OF ZIN01_RG1BASE WITH HEADER LINE.</b>
Selection Screen
SELECTION-SCREEN : BEGIN OF BLOCK BLOCK1 WITH FRAME.
PARAMETERS      : PF_BUDAT LIKE MKPF-BUDAT OBLIGATORY ,                     " FROM DATE
                  PT_BUDAT LIKE MKPF-BUDAT OBLIGATORY.                      " TO DATE
SELECTION-SCREEN : END OF BLOCK BLOCK1.
AT Selection Screen
AT SELECTION-SCREEN.
SELECT SINGLE * FROM ZIN01_RG1BASE WHERE BUDAT BETWEEN PF_BUDAT AND PT_BUDAT AND CANC_IND <> 'C'.
IF SY-SUBRC <> 0.
MESSAGE E006(ZIN01_FI).
ENDIF.
START OF SELECTION
START-OF-SELECTION.
SELECT MBLNR REF_DOC     MATNR ZEILE A~J_1ICHID J_1ICHT1 BUDAT BWART KZBEW CPUTM
       SPLIT_ID MENGE CLOSE_BAL_PRD EXPIND ZKZBEW REF_MTYPE FROM ZIN01_RG1BASE AS A INNER JOIN J_1ICHIDTX AS B
                                                        ON A~J_1ICHID = B~J_1ICHID
                                                        INTO TABLE IG_RG1BASE
                                                        WHERE BUDAT BETWEEN PF_BUDAT AND PT_BUDAT AND CANC_IND <> 'C'
                                                        AND B~LANGU = SY-LANGU+0(1) AND BWART <> '602'
                                                                                AND BWART <> '262'
                                                                                AND BWART <> '202'
                                                                                AND BWART <> '123'
                                                                                AND BWART <> '162'
                                                                                AND BWART <> '102'
                                                                                AND BWART <> '502'
                                                                                AND BWART <> '532'.
IF SY-SUBRC <> 0.
MESSAGE E006(ZIN01_FI).
ELSE.
SELECT  A~MBLNR A~XBLNR B~RDOC1 B~ZEILE B~RITEM1 B~EXBAS B~MENGE INTO TABLE IG_EXCISE FROM MKPF AS A INNER JOIN
                                                  J_1IEXCDTL AS B  ON A~XBLNR = B~RDOC1
                                                  FOR ALL ENTRIES IN IG_RG1BASE
                                                  WHERE  A~MBLNR = IG_RG1BASE-MBLNR  AND B~STATUS <> 'R'.
IF SY-SUBRC <> 0.
MESSAGE E006(ZIN01_FI).
ELSE.
SELECT VBELN POSNN INTO TABLE IG_VBFA FROM VBFA  FOR ALL ENTRIES IN IG_EXCISE
                                      WHERE VBELV = IG_EXCISE-RDOC1 AND POSNV = IG_EXCISE-RITEM1 AND VBTYP_N = 'M'.
SORT IG_RG1BASE BY MATNR .
IG_RG1BASE_COPY[] = IG_RG1BASE[].
DELETE ADJACENT DUPLICATES FROM IG_RG1BASE_COPY COMPARING MATNR.
<b>SORT IG_RG1BASE BY MATNR BUDAT CPUTM SPLIT_ID.
SELECT * FROM ZIN01_RG1BASE INTO IG_ZIN01_RG1BASE.
IG_SORT[] = IG_ZIN01_RG1BASE[].
SORT IG_SORT BY MATNR BUDAT  DESCENDING.</b>
*for 122 AND 161 movement type : if the refdoc is 101 f , subtract 122 menge from 101 menge.
LOOP AT IG_RG1BASE_COPY INTO WG_RG1BASE_COPY.
CLEAR G_FLAG.
LOOP AT IG_RG1BASE INTO WG_RG1BASE WHERE MATNR = WG_RG1BASE_COPY-MATNR.
<b>IF G_FLAG = ' '.
PERFORM OPENING_BALANCE.
WG_MAIN-OPEN_BAL   =  G_OPEN_BAL.
ELSE.
WG_MAIN-OPEN_BAL   = G_CLOSE_BAL.
ENDIF.</b>
APPEND WG_MAIN TO IG_MAIN.
CLEAR : WG_MAIN, WG_RG1BASE.
ENDLOOP.
CLEAR WG_RG1BASE_COPY.
ENDLOOP.
PERFORM OPENING_BAL_CHANGE.
PERFORM DISPLAY.
*&      Form  OPENING_BALANCE
      text
FORM OPENING_BALANCE.
G_FLAG = ‘F’.
<b>READ TABLE IG_SORT INTO WG_SORT WITH KEY MATNR = WG_MATERIAL-MATNR.
IF SY-SUBRC = 0.
*RECIPT +
IF WG_RG1BASE-BWART = '101' AND WG_RG1BASE-KZBEW = 'F' OR WG_RG1BASE-BWART = '501' OR WG_RG1BASE-BWART = '561' OR WG_RG1BASE-BWART = '531'.
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD  - WG_RG1BASE-MENGE.
*ISSUES
ELSEIF WG_RG1BASE-REF_MTYPE = '101' AND WG_RG1BASE-ZKZBEW  = 'F' .
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD  + WG_RG1BASE-MENGE.
ELSEIF  WG_RG1BASE-REF_MTYPE = '501' OR WG_RG1BASE-REF_MTYPE = '561' OR WG_RG1BASE-REF_MTYPE = '531'.
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD  + WG_RG1BASE-MENGE.
ELSE.
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD.
ENDIF.
ELSE.
G_OPEN_BAL = 0.
ENDIF.</b>
ENDFORM.
Suggestions and Help will be much appreciated.
Regards.
Ramesh.

Hi,
I am having already this report please use this coding.
REPORT YMS_EXDET MESSAGE-ID E4 NO STANDARD PAGE HEADING LINE-SIZE 350.
*REPORT  ZMM_EXIN_DOC_ALV_HEADER .
TABLES : J_1IEXCHDR,      " header table
         J_1IEXCDTL,      " item table
         J_1IPART1,       " Excise part I detials
         J_1IPART2,       " Excise Part II details
         LFA1,            " vendor master table
         J_1IMOVEND,      " vendor excise details table
         MSEG,            " Document Segment: Material
         MKPF,            " Header: Material Document
         DD07T,           " domain text table
         T001W.           " Plant and Branch Details
DATA : BEGIN OF IT_CHDR OCCURS 100,
       SERIALNO   LIKE J_1IPART1-SERIALNO,
       DOCNO      LIKE J_1IEXCHDR-DOCNO,
       DOCYR      LIKE J_1IEXCHDR-DOCYR,
       EXNUM      LIKE J_1IEXCHDR-EXNUM,
       EXDAT      LIKE J_1IEXCHDR-EXDAT,
       WERKS      LIKE J_1IEXCHDR-WERKS,
       EXBED      LIKE J_1IEXCHDR-EXBED,
       EXCCD      LIKE J_1IEXCHDR-EXCCD,
       ECS        LIKE J_1IEXCHDR-ECS,
       STATUS LIKE J_1IEXCHDR-STATUS, "CHALLAN STATUS
       END OF IT_CHDR.
DATA : BEGIN OF IT_CDTL OCCURS 100,
       SERIALNO LIKE J_1IPART1-SERIALNO,
       DOCYR  LIKE J_1IEXCDTL-DOCYR,
       DOCNO  LIKE J_1IEXCDTL-DOCNO,
       EXNUM  LIKE J_1IEXCDTL-EXNUM,
       EXDAT  LIKE J_1IEXCDTL-EXDAT,
       LIFNR  LIKE J_1IEXCDTL-LIFNR,
       MATNR  LIKE J_1IEXCDTL-MATNR,
       MAKTX  LIKE J_1IEXCDTL-MAKTX,
       CHAPID LIKE J_1IEXCDTL-CHAPID,
       EXBAS  LIKE J_1IEXCDTL-EXBAS,
       EXBED  LIKE J_1IEXCDTL-EXBED,
       ECS    LIKE J_1IEXCDTL-ECS,
       MENGE  LIKE J_1IEXCDTL-MENGE,
       MEINS  LIKE J_1IEXCDTL-MEINS,
       RDOC2  LIKE J_1IEXCDTL-RDOC2,
       EXGRP  LIKE J_1IEXCDTL-EXGRP,
       RDOC1  LIKE J_1IEXCDTL-RDOC1,
       STATUS LIKE J_1IEXCDTL-STATUS, "CHALLAN STATUS
       END OF IT_CDTL.
DATA TEXT(10).
DATA : BEGIN OF IT_OUT OCCURS 0,
       SERIALNO LIKE J_1IPART1-SERIALNO,
       TEXT1    LIKE TEXT,
       EXNUM    LIKE J_1IEXCDTL-EXNUM,
       EXDAT    LIKE J_1IEXCDTL-EXDAT,
       NAME     LIKE LFA1-NAME1,
       DDTEXT   LIKE DD07T-DDTEXT,
       EXCCD    LIKE J_1IEXCHDR-EXCCD,
       BUDAT    LIKE MKPF-BUDAT,
       EXBAS    LIKE IT_CDTL-EXBAS,
       EXBED    LIKE IT_CDTL-EXBED,
       ECS      LIKE IT_CDTL-ECS,
       MATNR    LIKE IT_CDTL-MATNR,
       MAKTX    LIKE IT_CDTL-MAKTX,
       CHAPID   LIKE IT_CDTL-CHAPID,
       MENGE    LIKE IT_CDTL-MENGE,
       MEINS    LIKE IT_CDTL-MEINS,
       DEL_IND(1),
       END OF IT_OUT.
DATA IT_PART2 LIKE J_1IPART1 OCCURS 0 WITH HEADER LINE.
DATA S_NO(4) .
DATA DB_CNT LIKE SY-TABIX.
DATA EBELN_T LIKE MSEG-EBELN .
TYPE-POOLS : SLIS.
DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
DATA : LIST_HEADER   TYPE SLIS_T_LISTHEADER,
       FIELDCAT      TYPE SLIS_T_FIELDCAT_ALV,
       LS_FTCAT      TYPE LVC_S_FCAT,
       SORTCAT       TYPE SLIS_T_SORTINFO_ALV,
       SORTCAT_LN    LIKE LINE OF SORTCAT,
       G_REPID LIKE SY-REPID,
       G_BACK_GROUND(70),  "like bapibds01-objkey,
       GS_VARIANT LIKE DISVARIANT,
       G_SAVE ,
       GT_EVENTS TYPE SLIS_T_EVENT,
       ALV_EVENT TYPE SLIS_ALV_EVENT,
       EVENTCAT             TYPE SLIS_T_EVENT,
       EVENTCAT_LN          LIKE LINE OF EVENTCAT,
       LAYOUT_IN            TYPE SLIS_LAYOUT_ALV,
       LAYOUT_IN1           TYPE SLIS_LAYOUT_ALV.
CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
'TOP_OF_PAGE',
            GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
'USER_COMMAND',
            GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
'BEFORE_OUTPUT'.
  ALV_EVENT TYPE SLIS_ALV_EVENT,
DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
DATA REGTYP_1 LIKE J_1IPART1-REGTYP.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS  WERKS TYPE J_1IEXCHDR-WERKS.
SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
             R2 RADIOBUTTON GROUP GRP.
SELECTION-SCREEN END OF BLOCK B.
INITIALIZATION.
  G_REPID = SY-REPID.
  G_SAVE = 'A'.
PERFORM BUILD_EVENT USING GT_EVENTS[].
  PERFORM ALV_EVENT_INIT.
AT SELECTION-SCREEN.
  REFRESH LIST_HEADER.
  PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
START-OF-SELECTION.
PERFORM ALV_EVENT_INIT.
  G_REPID = SY-REPID.
  G_BACK_GROUND = ' ' .
  IF R1 = 'X'.
    CLEAR R2. CLEAR : REGTYP_1.
    REGTYP_1 = 'A'.
     set titlebar 'BALAJI' with DB_CNT.
  ELSEIF R2 = 'X'.
    CLEAR R1.CLEAR : REGTYP_1.
    REGTYP_1 = 'C'.
     set titlebar 'BALAJI1' with DB_CNT.
  ENDIF.
SELECT * FROM J_1IPART1
                  INTO CORRESPONDING FIELDS OF TABLE IT_PART2
                  WHERE REGTYP = REGTYP_1 AND
                        TRNTYP = 'GRPO'.
                        AND BUDAT IN BUDAT.
                          DOCYR = IT_CDTL-DOCYR AND
                          DOCNO = IT_CDTL-DOCNO.
LOOP AT IT_PART2.
   SELECT SINGLE * FROM J_1IEXCHDR
             INTO CORRESPONDING FIELDS OF IT_CHDR
                     WHERE  TRNTYP = 'GRPO' AND
                      STATUS NE ' ' AND
                     STATUS EQ ' ' AND
                     DOCYR = IT_PART2-DOCYR AND
                     DOCNO = IT_PART2-DOCNO AND
                     WERKS = WERKS AND
                     EXDAT IN BUDAT.
                   ORDER BY EXDAT.
   IF SY-SUBRC = 0.
     APPEND IT_CHDR.
   ELSE.
     CONTINUE.
   ENDIF.
IF SY-SUBRC <> 0.
   MESSAGE E084.
ENDIF.
ENDLOOP.
*******************SPD****************
SELECT * INTO CORRESPONDING FIELDS OF IT_CDTL FROM J_1IEXCDTL WHERE
                               TRNTYP = 'GRPO' AND WERKS = WERKS AND
                                EXDAT IN BUDAT AND STATUS NE 'B'.
SELECT SINGLE * FROM J_1IPART1 WHERE DOCNO = IT_CDTL-DOCNO AND
                                     DOCYR = IT_CDTL-DOCYR AND
                                     REGTYP = REGTYP_1.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM J_1IPART2 WHERE DOCNO = IT_CDTL-DOCNO AND
                                         DOCYR = IT_CDTL-DOCYR.
  IF SY-SUBRC NE 0.
    IT_CDTL-SERIALNO = J_1IPART1-SERIALNO.
    APPEND IT_CDTL.
  ENDIF.
ENDIF.
ENDSELECT.
***************SPD********************
SELECT BDOCNO BDOCYR BEXNUM BEXDAT BWERKS BEXBED B~EXCCD
       B~ECS
       B~STATUS
       A~SERIALNO
       FROM J_1IPART1 AS A INNER JOIN J_1IEXCHDR AS B
       ON ADOCYR = BDOCYR AND ADOCNO = BDOCNO INTO CORRESPONDING
       FIELDS OF TABLE IT_CHDR WHERE B~TRNTYP = 'GRPO' AND
       BWERKS = WERKS AND BEXDAT IN BUDAT AND
       B~STATUS = ' ' AND
       B~STATUS = 'C' AND
       A~REGTYP = REGTYP_1.
SORT IT_PART2 BY SERIALNO.
LOOP AT IT_CHDR.
   SELECT * FROM J_1IEXCDTL
             INTO CORRESPONDING FIELDS OF IT_CDTL
            FOR ALL ENTRIES IN IT_CHDR
                    WHERE
                     TRNTYP = 'GRPO' AND
                      STATUS EQ ' ' AND
                      STATUS EQ 'C' AND
                     STATUS NE 'P' AND
                     DOCNO  = IT_CHDR-DOCNO AND
                     DOCYR  = IT_CHDR-DOCYR AND
                     EXNUM  = IT_CHDR-EXNUM AND
                     EXDAT  = IT_CHDR-EXDAT AND
                     WERKS  = IT_CHDR-WERKS.
     IF SY-SUBRC = 0.
       APPEND IT_CDTL.
       CLEAR  IT_CDTL.
     ELSE.
       CONTINUE.
     ENDIF.
   ENDSELECT.
MODIFY IT_CDTL INDEX SY-TABIX.
CLEAR IT_CDTL.
ENDLOOP.
*****spd change**********
*LOOP AT IT_CDTL.
*SELECT SINGLE * FROM J_1IPART2 WHERE DOCNO = IT_CDTL-DOCNO AND
                                    DOCYR = IT_CDTL-DOCYR.
*IF SY-SUBRC = 0.
DELETE IT_CDTL INDEX SY-TABIX.
*ENDIF.
*ENDLOOP.
**SELECT
*******spd ****************
SORT IT_CDTL BY  EXNUM EXDAT.
DELETE ADJACENT DUPLICATES FROM IT_CDTL COMPARING MATNR EXNUM EXDAT.
  LOOP AT IT_CDTL.
    CLEAR TEXT.
    DB_CNT = DB_CNT + 1.
    READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM DOCNO =
IT_CDTL-DOCNO.
   READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
   IT_OUT-SERIALNO = IT_PART2-SERIALNO.
    SELECT SINGLE NAME1 FROM LFA1
                    INTO IT_OUT-NAME
                    WHERE LIFNR = IT_CDTL-LIFNR.
    SELECT SINGLE * FROM LFA1
                      WHERE LIFNR = IT_CDTL-LIFNR.
    IF LFA1-LAND1 EQ 'IN'.
      TEXT = 'INVOICE'.
      IT_OUT-TEXT1 = TEXT.
    ELSE.
      TEXT = 'BOE'.
      IT_OUT-TEXT1 = TEXT.
    ENDIF.
    SELECT SINGLE * FROM J_1IMOVEND
                    WHERE LIFNR = IT_CDTL-LIFNR.
    SELECT SINGLE * FROM DD07T
                   INTO IT_OUT-DDTEXT
                    WHERE DOMNAME = 'J_1IVTYP' AND
                          DDLANGUAGE = 'EN' AND
                          DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
  IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
OR
    DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
      DD07T-DDTEXT = 'Dealer'.
    ENDIF.
    IT_OUT-DDTEXT = DD07T-DDTEXT.
   ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
*goods'.
      DD07T-DDTEXT =
    CLEAR EBELN_T.
    SELECT SINGLE LFBNR FROM MSEG
                        INTO EBELN_T
                        WHERE MBLNR = IT_CDTL-RDOC2 .
    SELECT SINGLE * FROM MSEG
                      WHERE BWART EQ '106' AND
                            LFBNR = EBELN_T ."and
                           ebeln = ebeln_t.
    IF SY-SUBRC = 0.
      IT_OUT-DEL_IND = 'X'.
    ELSE.
      IT_OUT-DEL_IND = ' '.
    ENDIF.
    SELECT SINGLE BUDAT FROM MKPF
                      INTO IT_OUT-BUDAT
                      WHERE MBLNR = EBELN_T  ."MSEG-LFBNR.
    IT_OUT-EXNUM = IT_CDTL-EXNUM.
    IT_OUT-EXDAT = IT_CDTL-EXDAT.
    IT_OUT-EXCCD = IT_CHDR-EXCCD.
   IT_OUT-SERIALNO = IT_CHDR-SERIALNO.
    IT_OUT-SERIALNO = IT_CDTL-SERIALNO.
    IT_OUT-EXBAS = IT_CDTL-EXBAS.
    IT_OUT-EXBED = IT_CDTL-EXBED.
    IT_OUT-ECS   = IT_CDTL-ECS.
    IT_OUT-MATNR = IT_CDTL-MATNR.
    IT_OUT-MAKTX = IT_CDTL-MAKTX.
    IT_OUT-CHAPID = IT_CDTL-CHAPID.
    IT_OUT-MENGE = IT_CDTL-MENGE.
    IT_OUT-MEINS = IT_CDTL-MEINS.
    APPEND IT_OUT.
   EX_NO = IT_CDTL-EXNUM.
  ENDLOOP.
Title Portion
  IF REGTYP_1 = 'A'.
    SET TITLEBAR 'BALAJI' WITH DB_CNT.
  ELSEIF REGTYP_1 = 'C'.
    SET TITLEBAR 'BALAJI1' WITH DB_CNT.
  ENDIF.
  AFIELD-COL_POS = 1.
  AFIELD-FIELDNAME = 'SERIALNO'.
  AFIELD-SELTEXT_L = 'SERIAL NO.'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 2.
  AFIELD-FIELDNAME = 'TEXT1'.
  AFIELD-SELTEXT_L = 'TYPE OF DOC'.
  AFIELD-JUST = 'L'.
  AFIELD-DECIMALS_OUT = '0'.
  AFIELD-NO_ZERO = 'X'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 3.
  AFIELD-FIELDNAME = 'EXNUM'.
  AFIELD-SELTEXT_L = 'DOC.NO'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 4.
  AFIELD-FIELDNAME = 'EXDAT'.
  AFIELD-SELTEXT_L = 'DOC.DATE'.
  AFIELD-JUST = 'C'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 5.
  AFIELD-FIELDNAME = 'NAME'.
  AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
  AFIELD-NO_ZERO = 'X'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 6.
  AFIELD-FIELDNAME = 'DDTEXT'.
  AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 7.
  AFIELD-FIELDNAME = 'EXCCD'.
  AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
  AFIELD-NO_ZERO = 'X'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 8.
  AFIELD-FIELDNAME = 'BUDAT'.
  AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
  AFIELD-JUST = 'C'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 9.
  AFIELD-FIELDNAME = 'EXBAS'.
  AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
  AFIELD-DO_SUM             = 'X'.
  AFIELD-JUST = 'R'.
  AFIELD-DECIMALS_OUT = '2'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 10.
  AFIELD-FIELDNAME = 'EXBED'.
  AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
  AFIELD-JUST = 'R'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 11.
  AFIELD-FIELDNAME = 'ECS'.
  AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
  AFIELD-JUST = 'R'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 12.
  AFIELD-FIELDNAME = 'MATNR'.
  AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 13.
  AFIELD-FIELDNAME = 'MAKTX'.
  AFIELD-SELTEXT_L = 'DESCRIPTION'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 14.
  AFIELD-FIELDNAME = 'CHAPID'.
  AFIELD-SELTEXT_L = 'TARIFF-ID'.
  AFIELD-JUST = 'L'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 15.
  AFIELD-FIELDNAME = 'MENGE'.
  AFIELD-SELTEXT_L = 'QUANTITY'.
  AFIELD-JUST = 'R'.
  AFIELD-DO_SUM             = ' '.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 16.
  AFIELD-FIELDNAME = 'MEINS'.
  AFIELD-SELTEXT_L = 'UOM'.
  AFIELD-JUST = 'C'.
  APPEND AFIELD TO FIELDCAT.
  AFIELD-COL_POS = 17.
  AFIELD-FIELDNAME = 'DEL_IND'.
  AFIELD-SELTEXT_L = 'Deleted'.
  AFIELD-JUST = 'C'.
  APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 18.
AFIELD-FIELDNAME = 'PO NO'.
AFIELD-SELTEXT_L = 'PURDOCNO'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
* LAYOUT FOR ZEBRA CATLOG
  LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
  LAYOUT_IN-ZEBRA             = 'X'.
  LAYOUT_IN-GET_SELINFOS      = 'X'.
  LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
  LAYOUT_IN-DETAIL_POPUP = 'X' .
SORTCAT-decimals     = '0'.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM      = G_REPID
      I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
      I_SAVE                  = G_SAVE
      IS_VARIANT              = GS_VARIANT
      IT_FIELDCAT             = FIELDCAT
      IT_SORT                 = SORTCAT
      IS_LAYOUT               = LAYOUT_IN
      IT_EVENTS               = EVENTCAT
     I_BACKGROUND_ID         = g_back_ground
    TABLES
      T_OUTTAB                = IT_OUT.
*&      Form  TOP_OF_PAGE_LIST_HEADER
      text
     -->LIST_HEADERtext
FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
  DATA : HLINE TYPE SLIS_LISTHEADER,
         TEXT(60) TYPE C.
  CLEAR : HLINE,TEXT.
  HLINE-TYP = 'H'.
  HLINE-INFO = TEXT.
  APPEND HLINE TO LIST_HEADER.
  SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
  CLEAR : HLINE,TEXT.
  HLINE-TYP = 'H'.
  WRITE 'PLANT :' TO TEXT.
  WRITE WERKS TO TEXT+8.
  HLINE-INFO = TEXT.
  APPEND HLINE TO LIST_HEADER.
  CLEAR : HLINE,TEXT.
  HLINE-TYP = 'H'.
  WRITE T001W-NAME1 TO TEXT.
  HLINE-INFO = TEXT.
  APPEND HLINE TO LIST_HEADER.
  CLEAR : HLINE,TEXT.
  HLINE-TYP = 'H'.
  WRITE T001W-STRAS TO TEXT.
  HLINE-INFO = TEXT.
  APPEND HLINE TO LIST_HEADER.
  CLEAR : HLINE,TEXT.
  HLINE-TYP = 'H'.
  WRITE T001W-ORT01 TO TEXT.
  HLINE-INFO = TEXT.
  APPEND HLINE TO LIST_HEADER.
  CLEAR : HLINE,TEXT.
  HLINE-TYP = 'H'.
  WRITE 'DATE :' TO TEXT.
  WRITE BUDAT-LOW TO TEXT+7.
  IF BUDAT-HIGH NE ''.
    WRITE 'TO' TO TEXT+18.
    WRITE BUDAT-HIGH TO TEXT+22.
  ENDIF.
  HLINE-INFO = TEXT.
  APPEND HLINE TO LIST_HEADER.
ENDFORM.                    "TOP_OF_PAGE_LIST_HEADER
*&      Form  ALV_EVENT_INIT
      text
FORM ALV_EVENT_INIT .
  CLEAR ALV_EVENT.
  ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
  ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
  APPEND ALV_EVENT TO EVENTCAT.
  CLEAR ALV_EVENT.
  ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
  ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
  APPEND ALV_EVENT TO EVENTCAT.
   CLEAR ALV_EVENT.
   ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
   ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
   APPEND ALV_EVENT TO GT_EVENTS.
   CLEAR ALV_EVENT.
   ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
   ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
   APPEND ALV_EVENT TO GT_EVENTS.
ENDFORM.                    "ALV_EVENT_INIT
*&      Form  ALV_TOP_OF_PAGE
      text
FORM ALV_TOP_OF_PAGE.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = LIST_HEADER
      I_LOGO             = 'ENJOYSAP_LOGO'.
ENDFORM.                    "ALV_TOP_OF_PAGE
*&      Form  BUILD_EVENT
      text
     -->P_GT_EVENTS[]  text
FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      I_LIST_TYPE     = 0
    IMPORTING
      ET_EVENTS       = P_EVENTS
    EXCEPTIONS
      LIST_TYPE_WRONG = 1
      OTHERS          = 2.
  READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
ALV_EVENT.
  IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
    APPEND ALV_EVENT TO P_EVENTS.
  ENDIF.
  READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
ALV_EVENT.
  IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
    APPEND ALV_EVENT TO P_EVENTS.
  ENDIF.
ENDFORM.                    " BUILD_EVENT
Thanks,
Shankar

Similar Messages

  • RG1 Report requirements

    Hi all,
    Following is the clients requirements for RG1 report,
    1. When there is opening qnty for materials,but no transactions(production or issues) the report should show the details of opening & closing stock of FG stocks,
    where as the above requirement is notmet with stanard RG1 report,palnning to go for ABAP custom developmwnt,
    can anyone provide inputs how to handle the same through ABAP?
    Moderator message - Please do not simply post yourr clients requirements and hope that someone will do your work for you - post locked
    Edited by: Rob Burbank on Sep 1, 2009 9:20 AM

    Hi,
    1. Fetch all the material details from the table j_1iRG1(it contains rg1 transaction details) with desired inputs (plant, date range, excise group ect.) to itab1
    2. Sort  or delete material which are not FG from itab1.
    3. Fetch the opening & closing balance for sorted FG materials details from table j_2irg1bal for corresponding input details and put in itab2.
    4. Compare two internal table and collect materials details in the third internal table which are not found itab1.
    5. Display final internal table as output
    Hope this will be helpful.

  • RG1 report-Ztable_entries insertion

    Hi Folks,
    Inorder to create a RG1 report the previous development team has created a ztable of the same strcuture as J_2IRG1BAL.But I was not able to find out how they are inserting the entires into this ztable.
    1.Is there any  possibility that they would have return any bdc to populate this ztable?
    2.J_2IRG1BAL needs two transactions to be run for the table to have the entries( I heard),so does the same logic applies for the ztable too?
    3.What are the ways to find how a ztable is getting populated?
    K.Kiran.

    Hi Man,
    Poppulating Entries for RG1 Related tables is bit tricky. It gets poppulated when u run tcode J2I5. For this SAP is having many considerations like updating RG1BAL Table and other related tables.
    Hope this answers your query. for RG1 and CIN you can contact me on email or mobile given in my profile.
    Regards,
    Darshan
    <i><b>**Reward Points to helpful answers; it motivates us to answer more</b></i>

  • RG1 Report printing.

    Hi All,
    We r not getting proper RG1 report print on A4 size with all records
    and format. Quantity are not coming on print view through J2iln
    transaction.
    Yusuf

    Hi
    Can you see the quantity on the print preview screen?
    If yes then that report is not meant for A4 size.
    If no then you will have to check with your ABAPer as to why the quantity is not seen.
    Regards
    Sandy

  • RG1 Report Tables

    Hi,
    Can any one please provide the list tables/views which used RG1 Report.Kindly let me know.

    RG-1 register, i.e. daily stock account of excisable goods.
    We have seeded report oracle EBS ,but unable find the table/views of reports.kindly let me know the solution.

  • RG1 register opening balance and closing balance updation

    Hi All,
    We are using the RG1 register recently i.e. after the Functional Upgrade (ECC 6.0). While executing J2I6 RG1 Excel report, opening balance and closing balance is not appearing in the report even though we have done the J1I5 extraction.
    Is it mandatory to update the J_2IRG1BAL table with zero stock as and when the new material codes are created.
    Regards,
    Praveen

    HI
    Yes it is mandatory to update the table J_2IRG1BAL with material form and opening stock etc. for all the new materials
    EXGRP: Excise group of the material
    DATUM: Date from which you want RG1 report i.e. 01.01.2004
    MATNR: Material
    FORM:  P for packed, L for loose. note that the same material cannot be maintained as both packed and loose.
    WERKS: Leave it blank
    Maintain all relevant opening balance fields. These fields start with OP
    Note 951955 - CIN: General clarifications for RG1 goods*
    check the above note
    regards
    Prashanth

  • RG1 Register Opening and Closing balance

    Dear Expert,
    As per Snote 951955 for Initial RG1 register update whether we have to give the opening Quantity in the table J_2IRG1BAL along with material form.
    Can we re extract after updating this values in table J_2IRG1BAL will the value come .
    Also after extracting the RG1 register there are no excise values for Receipts line items.
    The tax rate filed is also blank do we have to do any other special configuration for this values to some.
    Your expert advise will be highly appreciated.
    Edited by: lolu jo on Aug 17, 2011 7:32 AM

    HI
    Yes it is mandatory to update the table J_2IRG1BAL with material form and opening stock etc. for all the new materials
    EXGRP: Excise group of the material
    DATUM: Date from which you want RG1 report i.e. 01.01.2004
    MATNR: Material
    FORM:  P for packed, L for loose. note that the same material cannot be maintained as both packed and loose.
    WERKS: Leave it blank
    Maintain all relevant opening balance fields. These fields start with OP
    Note 951955 - CIN: General clarifications for RG1 goods*
    check the above note
    regards
    Prashanth

  • RG1 register- J_2iRG1BAL table values plant wise

    Hi Experts,
    I have a requirement in RG1 report, client is not satisfied with the  standard sap format, so we are intending to develop a Z-report. the steps which i am following as below:
    I have uploaded the J_2iRG1BAL table but requirement is that when i execute J2I6 the balance should be fetched plantwise and same should be updated in report.
    I have checked J_2iRG1BAL where we cannot maintain same material on same date.
    I have  uploaded the opening balance  quantity in J_2IRG1BAL table in OP_CF and OP_FINISH column.
    I am fetching quantity manufactured, quantity sold, relevant excise duties are from J_1irg1 table
    Now the problem is opening balance column is not showing values plantwise , values should get fetched from  J_2IRG1BAL table,if i go to that table , opening balance column is maintained.
    Please suggest me where exactly  to fetch the correct opening balance and closing balance to complete the report
    With regards,
    Hitesh

    Hi Himavanth,
    Thanks for reply.
    As you said i have to update table fields like client, excise group, Entry date, material, packed form P or L & fill the last columns user name, date, time but i cannot maintain it for same material for same date in both plants as date and material is key field in table J_2IRG1BAL.
    and i have found one note 1673612   in this note they have mentined following procedure for RG1.
    How to main opening balance for RG1 material?
            For an RG1 material the initial balance should be maintained  in the table J_2IRG1BAL.
       For a new RG1 material say that is created on 01.03.2012. If the  initial stock that is available is 100 KG and the transactions for   the material say like Receipt/Issue has happened from 22.03.2012,   then the initial balance of 100 KG should be updated in J_2IRG1BAl   table with DATUM 22.03.2012.That is the opening balance should be updated with date on which
       the actual transaction has happened for the material and not on  the material creation date.
      In J_2IRG1BAL table the following fields SHOULD be filled-
    EXGRP
    DATUM
       MATNR
       FORM
       OP CF
       OP FINISH
    OP FN UOM
       Also refer the note- 951955
    please suggest.
    Regards-
    Hitesh

  • CIN Reports

    Dear All,
    I want the following reports in CIN.
    Could you please let me know, what are all the standard reports available on all these things.
    Kindly let me know the T codes for the same.
    ER1, ER4, ER5, ER6, CT3  and  ARE3 reports
    Also in RG1 report opening balance, duties and closing balance should be shown in report. What is the option available for that.
    Kindly update me on this.
    Regards,
    Mullairaja

    I believe there is no standard reports available for ER4,ER5,ER6.
    You can go for customization of these reports,but it is time consuming & costs company.
    Better extract datas required for these reports(ER4,ER5,ER6) from SAP standard reports.
    Fill it manually.
    or else
    Check with your implementation partner for any third party products for fullfulling requirements.

  • ER1 - Report

    Dear All,
    Can you please confirm as what are the activities that needs to be maintained before ER1 Report is taken .
    This is because,the Manufactured Quantity is not matching with RG1 Report and  ER1 Report.
    That is when we compared the Manufactured Quantity of ER1 Report and RG1 Report,both are not tallying.
    Need your input on top priority.
    Regards
    Murali Raju

    Check this answered links
    ER1 Report
    Re: ER1 Form(Excise Returns)
    ER1 Report
    ER1: Whats the purpose and utility

  • RG1-Macro

    Dear all,
    I Downloaded RG1 macros from Service .sap.com..Zip file.
    After my RG1 Report saved in Desktop....
    I opend RG1 macro Excel and tools,,Udertoold Clicked on Macos...But my Noram Excel report is not updating in RG! macro Excel.
    How can i use RG1 Macros
    Thanks in Advacne
    Regards
    raj.

    Hi fnds,
    When iam applying the Macros for RG1 register ,macros are not applied for las two columns ,like Remarks...etc...
    How can i make this macros to entire excel.
    Thanks in advance
    Regards
    raj.

  • Not updating RG1

    Hi every one,
    By using T.code- J1I5,I am not able to update Rg1 register.Can any body tell me the reason.It's urgent.
    Regards
    Prem

    Hi,
    When I try to create RG1 issues entry the line turns red and nothing happens?
    This is happening because you are trying to create an issue entry and the stock in the register is not enough to do the issue. So you need to first update RG1 with the receipts and then go into the issues.
    What is the issue classification for RG1? You need to classify the RG1 entries as to whether they are receipts from manufacture or other receipts, clearances of various types so that they can be reported under the various headings as required by the Excise commissionerate.
    How do I maintain the opening balances for my register for the first time?
    You need load them manually at the initial data upload.
    How do I get the opening balance for every month? CIN calculates the opening balance for reporting purposes based on the transactions extracted in any period.
    Are opening and closing balances of register available for me for reporting?
    You must not pick up the opening and closing balances that are calculated by reporting because they might get changed if some one do es a re extract. So they need to be recomputed dynamically. They are not stored.
    Where does RG1 get the data of packed/loose material ? Initially when you upload the balance in RG1 you need to mention the material form. Later the system assumes the same for for the sa me material code. If you need to dynamically change this then you can make use of the user-exit. A material can be marked either as packed or loose but not both. 
    For RG1 u have to do the tabe netry, other wise it won't coma in the Register.
    For each of these materials, you have maintained the material form in table J_2IRG1BAL as below. Do not make any entries in fields that are not listed below:
    Field
    Field entries
    EXGRP
    Material’s excise group
    DATUM
    Date from which RG1 report is required, normally the date of going live
    MATNR
    Material
    FORM
    Enter P (Packed) or L (Loose). Do not leave this field blank.
    WERKS
    Leave this field blank.
    OP FN UOM
    Leave these fields blank.
    All quantities in this table are updated in the base unit of measure of the material.
    OP BN UOM
    CB FN UOM
    USNAM
    User ID of the person filling out the table.
    CPUDT
    Date of entry
    CPUTM
    Time of entry
    Features
    To access the report, from the SAP Easy Access screen, choose Indirect Taxes ® Registers ® Excise Tax ® Update RG 23A/C Issues and RG 1.
    Selection
    On the selection screen, you specify:
    Which documents you want to cover:
    Enter general organizational details in the Company details group box.
    Enter details about the documents that you want to include in the register, in the Document header and Document details group boxes.
    Which register you want to update, in the Registers group box
    Whether you want to run the program in batch mode
    You can also check what date the data was last extracted.
    Output
    The system displays a list of material documents that have not yet been entered in the register.
    Select the documents that you want to add to the register.
    To check if there is enough stock in the specific excise group for the register for issues or receipts, select the line items and choose Simulate.
    We recommend that you use this option before proceeding; it will show the line items that can be updated in the register.
    Issues and receipts are handled separately based on the following register and classification code combinations:
    Register Type
    Goods issues
    Goods receipts
    RG 23A
    IIM
    ROP
    IPD
    IWD
    RG 23C
    IIM
    ROP
    IPD
    IWD
    RG 1
    IDH
    RMA
    IDE
    ROP
    IWE
    IWT
    IWO
    Lines that can be updated in the register will be shown with a green traffic light, while those which are not eligible (for example, if there is not enough stock on hand) will be marked with a red traffic light.
    You can reselect the required line items and repeat the Simulate process.
    Select the line items you want and choose Register entry.
    The system updates the Part I or RG 1 tables with the material documents.
    For RG 1 issues to sales, wherever there is an excise invoice it is picked up and used for RG 1 updating.
    The same option can be used for creating entries in RG 23A or RG 23C Part I registers. While creating entries in the register, system will pick up only those material documents for which Part I posting has not been done yet
    Raghu

  • RG1 Register Updation Process URGENT

    Dear All,
    During the updation process for Excise Invoices, how does the system differentiate between an export shipment and Domestic shipment.
    In the J1I5 transaction code there is a field called  classification where we have
    IDH : Removal from factory on payment of duty for home use
    IDE: Removal from factory without payment of duty for export under bond
    What i want to know is how the system distinguishes between documents that belong to IDH transaction and documents that belong to IDE transaction. are there any settings required for that.
    Because when i select the IDH transaction the system is also selecting export documents. what can be the reason for the same.
    Deepak

    Hi
    Please Check this out.. this may help you..
    Update of Registers RG 1 and RG 23 (Part I)
    Use
    You use this report to update the information in the following registers:
    RG 1
    RG 23A, Part I
    RG 23C, Part I
    This report only creates register entries for goods movements that have not already been entered. It does not create duplicate entries.
    You cannot print or display these registers using this report. It is solely for the purpose of updating the registers. Instead, to download the registers, use the Download Register Data report
    Prerequisites
    You have specified in the material master data which materials are to be entered in register RG 1.
    For each of these materials, you have maintained the material form in table J_2IRG1BAL as below. Do not make any entries in fields that are not listed below:
    Field
    Field entries
    EXGRP
    Material’s excise group
    DATUM
    Date from which RG1 report is required, normally the date of going live
    MATNR
    Material
    FORM
    Enter P (Packed) or L (Loose). Do not leave this field blank.
    WERKS
    Leave this field blank.
    OP FN UOM
    Leave these fields blank.
    All quantities in this table are updated in the base unit of measure of the material.
    OP BN UOM
    CB FN UOM
    USNAM
    User ID of the person filling out the table.
    CPUDT
    Date of entry
    CPUTM
    Time of entry
    Features
    To access the report, from the SAP Easy Access screen, choose Indirect Taxes ® Registers ® Excise Tax ® Update RG 23A/C Issues and RG 1.
    Selection
    On the selection screen, you specify:
    Which documents you want to cover:
    Enter general organizational details in the Company details group box.
    Enter details about the documents that you want to include in the register, in the Document header and Document details group boxes.
    Which register you want to update, in the Registers group box
    Whether you want to run the program in batch mode
    You can also check what date the data was last extracted.
    Output
    The system displays a list of material documents that have not yet been entered in the register.
    Select the documents that you want to add to the register.
    To check if there is enough stock in the specific excise group for the register for issues or receipts, select the line items and choose Simulate.
    We recommend that you use this option before proceeding; it will show the line items that can be updated in the register.
    Issues and receipts are handled separately based on the following register and classification code combinations:
    Register Type
    Goods issues
    Goods receipts
    RG 23A
    IIM
    ROP
    IPD
    IWD
    RG 23C
    IIM
    ROP
    IPD
    IWD
    RG 1
    IDH
    RMA
    IDE
    ROP
    IWE
    IWT
    IWO
    Lines that can be updated in the register will be shown with a green traffic light, while those which are not eligible (for example, if there is not enough stock on hand) will be marked with a red traffic light.
    You can reselect the required line items and repeat the Simulate process.
    Select the line items you want and choose Register entry.
    The system updates the Part I or RG 1 tables with the material documents.
    For RG 1 issues to sales, wherever there is an excise invoice it is picked up and used for RG 1 updating.
    The same option can be used for creating entries in RG 23A or RG 23C Part I registers. While creating entries in the register, system will pick up only those material documents for which Part I posting has not been done yet.
    Hope it helps you
    Mastan

  • RG1 is not Updating Automatically

    Dear All Salute !!
    RG1 is not updating automatically in the system due to data migration on cutoff date since February; they are maintaining parallel in the legacy system (in Excel or any other), though here is updated project from 5.0 to 6.0.
    I am unable to understand, how the system is going on in the lacking of this.
    From Accounts Department side: Still Cenvat duty posting & statement (57AE) are done manually by dispatch/stores department. As per ECC6, system generated report should be available to the end users to avoid duplicate work & mistake.
    As per observation from SD side _no Opening Balance is uploaded while data migration_.
    I have got information through SDN about table J_2IRG1BAL but I am unaware of using this.
    Please provide me complete solution for this to do the needful instead of OSS Notes. 
    Rgds
    Srivastav
    +91-9973504950

    Adding to Komals reply,
    Please go through the sap note 951955 and check below comments:
    Please check whether you have maintained opening balances for
    all RG1 material in table J_2IRG1BAL. If not, please maintain opening
    balances for all RG1 material in J_2IRG1BAL for the date from which
    you want to run the RG1 report.
    Thanks
    Murtuza

  • RG1 Register : opening & closing balance does not match with actual Stock

    Hi
    I am working on SAP AFS 6.0.
    The RG1 register for a particular month displays data of only those materials which have been transacted in that month. I checked the tables J_1IRG1 and J_2IRG1BAL found that system retrives all records of the given period from the table J_1IRG1 and picks opening balance of these records from the table J_2IRG1BAL. The records of those materials which have closing balance in J_2IRG1BAL but was not transacted in the given period are not considered in RG1 register.
    I want RG1 register to show opening balance of all materials which have closing balance in J_2IRG1BAL but have not been transacted in the subsequent periods.
    Regards
    Niraj

    HI
    Yes it is mandatory to update the table J_2IRG1BAL with material form and opening stock etc. for all the new materials
    EXGRP: Excise group of the material
    DATUM: Date from which you want RG1 report i.e. 01.01.2004
    MATNR: Material
    FORM:  P for packed, L for loose. note that the same material cannot be maintained as both packed and loose.
    WERKS: Leave it blank
    Maintain all relevant opening balance fields. These fields start with OP
    Note 951955 - CIN: General clarifications for RG1 goods*
    check the above note
    regards
    Prashanth

Maybe you are looking for