Wrong opening balance in RG23A 2

Hi Experts
I used the report J2I9 and in April Closing of BED Cenvat was suppose Rs 100.00. But when I run this J2I9 report for May month, opening of BED Cenvat is Rs 70.00. I want to know where is this Rs 30.00. How I can check it. All other credit taken and utilisation entries are correct.
Regards
Parkash

Hi,
The opening balance in J2I9 will be picked from G/L accounts directly.
So check for the G/L balance for the period.
Regards,
Brinda

Similar Messages

  • Wrong Opening balance in PLA register

    Hai All,
    I am gettig wrong opening balance in PLA for Sec Higher Edu. cess at the time J2I6. I maintained correct opening balance in J_2IACCBAL. Also in G/L accnt i made the same. I am geeting corrct values for PLABED & PLAECS. Here its taking value of RG23SECS
    Plz Help me out..
    Thanks & Regards
    Raghu

    Hi,
    The opening balance in J2I9 will be picked from G/L accounts directly.
    So check for the G/L balance for the period.
    Regards,
    Brinda

  • Reversal of opening balance for RG23a

    sirs,
    In the initial stages of go live, we have put an initial balance for RG23A. This has been updated with J1IH. But  the entry was wrongly entered by the client. This has to be reversed. I need a guidance how to reverse this.
    regards,
    ebenezer

    Hi
    Goto TCode FB08 and reverse the document
    If it is a mass reversal use TCode F.80 - Mass Reversal
    Then upload again opening balances.
    Cheers
    Srinivas

  • Wrong Opening Balance

    Dear Experts,
        Current period is 02 2014 so posting is possible only in 02 2014 & 01 2014. I uploaded opening balance in 31.12.2013 with quantity 8.18 and amount 2740.30. Now, they discovered that the right quantity of the opening balance is 8180 with the same amount. period 12 is closed now. Please, Advise.
    Thanks,
    Magdy.

    Hi,
    Now you want to post difference Quantity in 12th period, for these you to open closed posting period in MM.we know that once closed a posting period in we cann't open it again.for these sap released a OSS note.
    please follow the below points
    1. Go to TCode SU01 (see OSS NOTES 487381)
    2. Choose "change" tab with your loging Name
    3. Choose "Parameter" tab give Parameters MMPI_READ_NOTE with date format as YYYYMMDD
    (say today 20071201)
    4. SAVE.
    5. Go to T-code MMPI
    6. open the old periods which you want to post into,
    Note : the period opening will be valid for only for the particular day only.
    7. Complete the posting you want to reverse or add
    8. Go to MMPV to close the periods
    Note : If we enter the date or month in MMPV means we are opening that date or month by closing previous date or month
    (Never use MMPV without completing the transaction in previous month)
    Thanks in advance
    Chakri

  • Wrong Stock Opening Balance

    Dear Experts,
      After 15 days of going live and uploading materials opening balance from "MIGO" transaction and "561" movement type and after the production department makes process orders and sales department  makes sales orders on a specific material, the inventory department discovers that they give me a wrong opening balance for this material in quantity but right in amount of money. Please, advise.
    Magdy.

    When you cancel the all good issue..
    Then check the MAP and stock and stock value for material..
    It will as per initial...
    Total Stock = 22.740
    Total Value = 12507.
    MAP = 550.00
    Check this is correct or not...
    If its matched
    Then no need to cancel the initial stock..
    Just go to MB1C, use movement type 511.
    Give the material and give the quantity = 22717.26
    Save the entry..
    Then you can see in material master - accounting 1 tab.
    Total stock = 22740
    Total Value = 12507.
    MAP = 0.55
    Here you can see the total value will stock remain and stock will increase and MAP for material will change..
    Test this and revert back if any issue..

  • Upload of opening balance in PLA & RG23A/C

    Hi all,
    I am trying to upload opening balances of RG23A & RG23C through Table J_2IACCBAL.
    But system is not allowing me to upload the same, it gives following error
    No table entries found for specified key
    Message no. MO429
    What can be the reason?
    Is there anything in addition I have to do before uploading these opening balances through this table?
    Please guide me.
    Thanks
    Sonal

    Hi,
    To upload balance you have to goto SE11, give database table "J_2IACCBAL", select Display, Menu "Utilities > Table Contents > Create Entires".

  • EBS Closing balance not matching with opening balance.

    Hi,
    The Scenario: The first file for EBS is uploaded. The Second file opening balance did not match with the first files closing balance.
    As per my understanding the system throws an information message that FB729 that the closing balance did not match with the opening balance. The docuemnts also gets posted
    Question: If the bank sends the corrected file after uploading the first error statement how will we update the corrected account statement with appropriate opening balace.
    Thanks,
    Raja.

    Hi Taro,
                 Thanks for your reply. Infact Initially I was of the same opinion that if there is inconsistency in the closing and opening balance SAP would not process the statement. Thanks for your investigation the sysytem is behaving differently for different formats.
                   The SAP note 947857 only deals with a particular scenario where there is no inconsistency between closing balance and opening balance but the error comes up.
                   I will try to explain why I am asking about a functionality which updates the opening and closing balances of a statement based on our past experiences:
                    If we receive a wrong statement with wrong opening balance from the bank it would take us two weeks to convince the bank  about the wrong opening balance and subsequently bank sending the corrected account statement. If the FB729 message is an error message then there is no option but to wait till two weeks to upload the next statements.
                   So I want SAP  to upload the wrong statement and the subsequent statements as they come form bank. To correct the opening and closing balances i want to check if there is some statndard functionality which can do this. Rather than Table update as you suggested I would prefer a custom program for this functionality if standard does not allow.
                    If the difference between closing and opening balance is due to a missing statement then SAP  has suggested a note "SAP Note 1025077 - Problem with uploading out-of-sequence BAI2 bank statement" which actually allows the out of sequence statements to be uploaded.
                     Finally I would prefer the option of the wrong statements to be uploaded into SAP in the order they have come from the bank and subsequent corrections to the statements as approved by the bank.
    Thanks,
    Raja.

  • Excise Opening balances E.Cess and SHE. Cess entry missing in J_2IACCBAL

    Dear Guru's
    We have recently gone live and was updating the RG23A Part 2 entries,
    I am only getting the RG23ABED register entry for the updation of Basic Excise duty  (BED) and I am not getting the register entry for updating the E.Cess and SHE. Cess in table J_2IACCBAL
    How do we update the E.Cess and SHE. Cess opening balances.
    Regards
    Prabhjot Singh

    opening balance for 2 and 1 %
    Go to SE11, give table: J_2IACCBAL and choose display F(7).
    On Dictionary: Display Table screen, choose Utilities --> Table contents --> Create Entries, from menu bar and make the following entries
    Client - Leave it blank
    Enter your excise group,
    Register: RG23AECS for Edu Cess 2% and
    RG23AAT1 for SEC Cess 1%.
    CL BAL: enter the closing balace here only and remaining follow the same procedure for entering RG23ABED .
    This is only the direct table entry of opening Balance, so you need to make an FI entry thro F-02. For ex.
    RG23A ECS Part II Account DR
    To Initial balances clearing a/c
    Only after this extract the balances thro J2I5 else you may encounter getting wrong extract.
    follow the same procedure for RE23C cesses also.
    regards
    KI

  • Opening balance upload for Excise groups

    Dear All,
    One of my client wants to upload excise balances of excise groups and corrosponding entry in FI.
    Client is already go live on 01/04/2008. During cutover activities balances are uploaded for only 1 excise group.
    Now he want to upload for remaining 5 excise groups.
    Out of that for 2 excise groups already transactions are done in system and registers are extracted.
    For 3 excise groups there are no transaction in system.
    Please advice me what we can do in above 2 cases and what will be the procedure.
    Regards,
    Umesh

    hi
    Now he want to upload for remaining 5 excise groups.
    >Out of that for 2 excise groups already transactions are done in system and registers are extracted.
    for this initial balance upload will be dificult as syatem already have transactions
    then also try following in dev server
    do the initial upload on the date pirior to the transaction date
    then again run j1i5 and j2i5
    >For 3 excise groups there are no transaction in system.
    for this u can directly have the initial upload on back date
    The initial upload process is as follows
    Use following
    http://help.sap.com/bp_bblibrary/470/Documentation/J33_BPP_32_CHEM_EN_IN.doc
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/18/8e113999724854e10000000a11405a/content.htm
    opening balance for 2 and 1 %
    Go to SE11, give table: J_2IACCBAL and choose display F(7).
    On Dictionary: Display Table screen, choose Utilities --> Table contents --> Create Entries, from menu bar and make the following entries
    Client - Leave it blank
    Enter your excise group,
    Register: RG23AECS for Edu Cess 2% and
    RG23AAT1 for SEC Cess 1%.
    CL BAL: enter the closing balace here only and remaining follow the same procedure for entering RG23ABED .
    This is only the direct table entry of opening Balance, so you need to make an FI entry thro F-02. For ex.
    RG23A ECS Part II Account DR
    To Initial balances clearing a/c
    Only after this extract the balances thro J2I5 else you may encounter getting wrong extract.
    follow the same procedure for RE23C cesses also.
    regards
    SAP Learner

  • Posting Open Balance to a All Currencies G/L Account

    Hi All,
    I have a situation for which some assistance is required.
    I am trying to post opening balance to the G/L bank account which is defined as ALL Currency.
    On the G/L the system show that Account as Currency = All Currencies and adjacent to the Balance it shows that currency ID  as GBP.
    This account is a $ Account and I want to post the Open Balance in $. However, when I try to create the Open Balance the FC columns are disabled.
    What am I missing?
    Best regards
    Earl

    Hi Earl,
    There is nothing wrong.  If it is a MC account, all JE would be based on LC.  Hence only LC would be allowed for Opening Balance. If it is not LC, convert it to LC for posting.
    Thanks,
    Gordon

  • How to correct opening balance

    Hi Experts,
                       I have to correct my opening balances of items, unfortunately i make some mistake while entering the opening balance of items(e.g i entered the wrong quantity of many items which i have to correct).
    plz give me some solution to correct it..
    Regards

    Hi
    Yes you can correct opening balance of Items, if you have not issued that items for consumption.
    Open a old period and use Goods Receipt and Goods Issue option for the same.
    For example.
    Item A you have entered opening balance qty is 10 and your correct qty is 12 for this do goods receipt entry in last date of (3st March) previous period for Qty 2 with same price.
    Item B you have entered opening balance qty is 12 and your correct qty is 10 for this do goods issue entry in previous period for Qty 2 with same price.
    I have faced lots of issues entering item opening balance through Initial Quantities functionality.
    So for my all new customer, I prefer to enter Item opening balance through Goods Receipt in previous period.
    I hope this solution will help you.
    Regards
    Kamlesh Vagal

  • Difference in Trial Balance & Legder report because Zeero opening balance appearing in Trial balance for some accounts

    Hi Experts,
    When I am generating System trial balance report, it shows null in opening balance column for some of accounts while ledger for respective accounts are showing correct figure of opening balance.
    And because of this my trial balance showing wrong figures
    Also, I have checked it through query report, it showing same opening balance figure as ledger report.
    (Attachment for trial Bal, Ledger & Query reports for one of the account are attached here)
    I have checked all selection criteria in Trial balance report, but nothing is working.
    Please suggest me any solution for for above issue.
    regards,
    Raviraj

    Hi Raviraj
    Can you confirm In Trail Balance Opening balance for the Period is OB Starts from Company Activity.
    With Regards
    Balaji Sampath

  • Entering opening balance for a new company

    Hi all
    I am using AP, GL and CM. After successful testing on test environment the customer now is forwarding in live environment.
    He has prepared open balance for all accounts and i should migrate these balances in the system.
    This balance sheet prepared from the customer is balanced so debits equals to credits.
    The currency of this company is ALL, and in this document there are few accounts that are in EUR and USD, but in total the converted amounts of these accounts(accounts that has balance in foreign currency) together with other accounts in ALL are balanced.
    Now i have to enter in the GL module three different journals, one in ALL, one in EUR and the last one in USD, with the exchange rates given by the customer.
    The question is here. These three journals are not balanced, and i wanted a suggestion which is the best way to enter the open balance for this customer.
    Thank you and best regards

    Hi Octavio
    So the document sent from the customer is like this:
    Acc. No------------Debit ALL-----Credit ALL----------Debit EUR-------Credit EUR----------------Debit USD----------Credit USD
    Acc. 1--------------100
    Acc. 2--------------150-------------------------------------100
    Acc. 3--------------150-------------------------------------100
    Acc. 4--------------200-----------------------------------------------------------------------------------------200
    Acc. 5--------------200-----------------------------------------------------------------------------------------200
    Acc. 6---------------------------------800
    Now accounts in foreign currency should have their balances in foreign currency and the converted amount is giving the balance in local currency.
    so i have to register three journals or am i wrong?? As you can see the journals in each currency are not balanced.
    Thanks again
    Edited by: user567002 on Nov 26, 2010 3:13 AM
    Edited by: user567002 on Nov 26, 2010 3:15 AM

  • OPENING BALANCE IN ANNEXURE10

    Hi Experts,
    In my RG23A AND RG23C ANNEXURE10 report opening balance is not coming. Herewith i am sending the code of the report. Kindly do the needful.
    Regards,
    Shankar
    CODING:
    REPORT YMS_ANNEXURE10NEW NO STANDARD PAGE HEADING LINE-SIZE 255
                                                           LINE-COUNT 60.
    *REPORT  ZKVB_CENVAT_CREDIT_LEDGER_NEW
    DICTIONARY STRUCTURES USED                                           *
    TABLES: J_1IPART2 , J_1IEXCHDR , J_1IEXCDTL , GLT0 .
    INTERNAL TABLES USED                                                 *
    DATA : BEGIN OF ITAB_EXCISE OCCURS 0    ,
            SERIALNO LIKE J_1IPART2-SERIALNO ,     "SERIAL NUMBER
            BUDAT LIKE J_1IPART2-BUDAT ,           "DATE
            TRNTYP LIKE J_1IPART2-TRNTYP ,         "TRANSACTION TYPE
            EXNUM LIKE J_1IEXCHDR-EXNUM ,          "EXCISE INVOICE NUMBER
            EXDAT LIKE J_1IEXCHDR-EXDAT ,          "EXCISE INVOICE DATE
            EXBED LIKE J_1IEXCHDR-EXBED ,          "CENVAT
            EXSED LIKE J_1IEXCHDR-EXSED ,          "SED
            CVDIND LIKE J_1IEXCHDR-CVDIND ,
            RDOC3 LIKE J_1IEXCDTL-RDOC3 ,
            ECS LIKE J_1IPART2-ECS,
            ECS1 LIKE J_1IPART2-ECS,
            OCT_ECS LIKE J_1IPART2-ECS,
           END OF ITAB_EXCISE.
    DATA : BEGIN OF ITAB_EXCISE1 OCCURS 0 ,
            SERIALNO LIKE J_1IPART2-SERIALNO ,     "SERIAL NUMBER
            SERIALNO_C LIKE J_1IPART2-SERIALNO ,
            BUDAT LIKE J_1IPART2-BUDAT ,           "DATE
            TRNTYP LIKE J_1IPART2-TRNTYP ,         "TRANSACTION TYPE
            EXNUM LIKE J_1IEXCHDR-EXNUM ,          "EXCISE INVOICE NUMBER
            EXDAT LIKE J_1IEXCHDR-EXDAT ,          "EXCISE INVOICE DATE
            EXBED LIKE J_1IEXCHDR-EXBED ,          "CENVAT
            EXSED LIKE J_1IEXCHDR-EXSED ,          "SED
            CVDIND LIKE J_1IEXCHDR-CVDIND ,
            RDOC3 LIKE J_1IEXCDTL-RDOC3 ,
            SERIALNO1 LIKE J_1IPART2-SERIALNO ,
            EXBED1 LIKE J_1IPART2-EXBED,
            EXSED1 LIKE J_1IPART2-EXSED,
            ECS LIKE J_1IPART2-ECS,
            ECS1 LIKE J_1IPART2-ECS,
            OCT_ECS LIKE J_1IPART2-ECS,
           END OF ITAB_EXCISE1.
    *DATA : ITAB1 LIKE ZEXCISE_SED_BED OCCURS 0 WITH HEADER LINE .
    DATA : ITAB_EXCISE2 LIKE ITAB_EXCISE1 OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF ITAB_DISPLAY OCCURS 0,
              SERIALNO LIKE J_1IPART2-SERIALNO ,     "SERAIL NUMBER
              BUDAT LIKE J_1IPART2-BUDAT ,           "DATE
              CENVAT_OPG type p decimals 3,          "OPENING CENVAT
              SED_OPG LIKE J_1IPART2-EXSED ,         "OPENING SED
              ECS LIKE J_1IPART2-ECS ,               "OPENING ECS
              EXNUM_CR LIKE J_1IEXCHDR-EXNUM ,       "CERDIT EXC INV NUMBER
              EXDAT_CR LIKE J_1IEXCHDR-EXDAT ,       "CREDIT EXC INV DATE
              CENVAT_CR type p decimals 3,            "CREDIT CENVAT
              ADDL_DTY type p decimals 2,
              SED_CR LIKE J_1IEXCHDR-EXSED ,         "CREDIT SED
              TOT_CENVAT_CR type p decimals 3,
              TOT_CENVAT_CESS type p decimals 3,
              TOT_SED_CR LIKE J_1IEXCHDR-EXSED ,
              EXNUM_DB LIKE J_1IEXCHDR-EXNUM ,
              EXDAT_DB LIKE J_1IEXCHDR-EXDAT ,
              CENVAT_DB type p decimals 3,
              SED_DB LIKE J_1IEXCHDR-EXSED ,
              CENVAT_CLS type p decimals 3,
              SED_CLS LIKE J_1IPART2-EXSED ,
              total_ecs like J_1IPART2-ECS,
              ECS1 LIKE J_1IPART2-ECS,
              CNT TYPE P,
              OCT_ECS LIKE J_1IPART2-ECS,
            END OF ITAB_DISPLAY.
    DATA : BEGIN OF ITAB_EXNUM OCCURS 0 ,
            EXNUM LIKE J_1IEXCHDR-EXNUM ,
            EXDAT LIKE J_1IEXCHDR-EXDAT ,
            CENVAT like J_1IEXCHDR-exbed,
            ADDL_DTY like J_1IEXCHDR-exbed,
            SED LIKE J_1IEXCHDR-EXSED ,
            CNT TYPE P,
           END OF ITAB_EXNUM.
    DATA : BEGIN OF ITAB_EXNUM1 OCCURS 0 ,
              EXNUM LIKE J_1IEXCHDR-EXNUM ,
              EXDAT LIKE J_1IEXCHDR-EXDAT ,
              CENVAT LIKE J_1IEXCHDR-EXBED ,
              SED LIKE J_1IEXCHDR-EXSED ,
              CNT TYPE P,
           END OF ITAB_EXNUM1.
    DATA: BEGIN OF ITAB_GLT0 OCCURS   0,
            RACCT LIKE GLT0-RACCT,
            TSLVT LIKE GLT0-TSLVT,
            TSL01 LIKE GLT0-TSL01,
            TSL02 LIKE GLT0-TSL02,
            TSL03 LIKE GLT0-TSL03,
            TSL04 LIKE GLT0-TSL04,
            TSL05 LIKE GLT0-TSL05,
            TSL06 LIKE GLT0-TSL06,
            TSL07 LIKE GLT0-TSL07,
            TSL08 LIKE GLT0-TSL08,
            TSL09 LIKE GLT0-TSL09,
            TSL10 LIKE GLT0-TSL10,
            TSL11 LIKE GLT0-TSL11,
            TSL12 LIKE GLT0-TSL12,
          END OF ITAB_GLT0.
    DATA : BEGIN OF OPEN_BAL_OCT OCCURS 0,
               ECS LIKE J_1IPART2-ECS,
           END OF OPEN_BAL_OCT.
    DATA : BEGIN OF ITAB_CESSCO OCCURS 0,
               ECS LIKE J_1IPART2-ECS,
               TRNTYP LIKE J_1IPART2-TRNTYP ,
           END OF ITAB_CESSCO.
    DATA : MM(2) TYPE C ,
          GR_TOTAL_CESS_SEPT LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_OCT LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_NOV LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_DEC LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_JAN LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_FEB LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_MAR LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_APR LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_MAY LIKE J_1IPART2-ECS, " FOR JUNE OPENING BALANCE
           GR_TOTAL_CESS_JUN LIKE J_1IPART2-ECS, " FOR JULY OPENING BALANCE
           GR_TOTAL_CESS_JUL LIKE J_1IPART2-ECS, " FOR AUGUST OPENINGBALANCE
           GR_TOTAL_CESS_AUG LIKE J_1IPART2-ECS, " FOR SEPT OPENING BALANCE
           GR_TOTAL_CESS_SEP LIKE J_1IPART2-ECS,
           GR_TOTAL_CESS_CO LIKE J_1IPART2-ECS,
           CREDIT_ECS LIKE J_1IPART2-ECS,
           DEBIT_ECS LIKE J_1IPART2-ECS ,
           CREDIT_ECS1 LIKE J_1IPART2-ECS,
           DEBIT_ECS1 LIKE J_1IPART2-ECS ,
           CREDIT_ECS2 LIKE J_1IPART2-ECS,
           DEBIT_ECS2 LIKE J_1IPART2-ECS ,
           CREDIT_ECS3 LIKE J_1IPART2-ECS,
           DEBIT_ECS3 LIKE J_1IPART2-ECS ,
           CREDIT_ECS4 LIKE J_1IPART2-ECS,
           DEBIT_ECS4 LIKE J_1IPART2-ECS ,
           CREDIT_ECS5 LIKE J_1IPART2-ECS,
           DEBIT_ECS5 LIKE J_1IPART2-ECS ,
           CREDIT_ECS6 LIKE J_1IPART2-ECS,
           DEBIT_ECS6 LIKE J_1IPART2-ECS,
           CREDIT_ECS7 LIKE J_1IPART2-ECS, " FOR JUNE OPENING BALANCE
           DEBIT_ECS7 LIKE J_1IPART2-ECS,
           CREDIT_ECS8 LIKE J_1IPART2-ECS, " FOR JULY OPENING BALANCE
           DEBIT_ECS8 LIKE J_1IPART2-ECS,
           CREDIT_ECS9 LIKE J_1IPART2-ECS, " FOR AUGUST OPENING BALANCE
           DEBIT_ECS9 LIKE J_1IPART2-ECS,
           CREDIT_ECS10 LIKE J_1IPART2-ECS, " FOR SEPT OPENING BALANCE
           DEBIT_ECS10 LIKE J_1IPART2-ECS,
           CREDIT_ECS11 LIKE J_1IPART2-ECS, " FOR OCT OPENING BALANCE
           DEBIT_ECS11 LIKE J_1IPART2-ECS,
           CREDIT_ECSCO LIKE J_1IPART2-ECS,
           DEBIT_ECSCO LIKE J_1IPART2-ECS.
    DATA : ITAB_GLT0_1 LIKE ITAB_GLT0 OCCURS 0 WITH HEADER LINE.
    SELECT OPTION INTERNAL TABLE DEFINATIONS                             *
    RANGES : R_TRNTYP FOR J_1IPART2-TRNTYP.
            R_BUDAT FOR J_1IPART2-BUDAT.
    DATA VARIABLES USED                                                  *
    DATA: V_LIN LIKE SY-TABIX .
    DATA : V_OPENING_BED LIKE ITAB_DISPLAY-CENVAT_OPG.
    DATA : V_OPENING_SED LIKE ITAB_DISPLAY-SED_OPG.
    DATA : OCT_ECS LIKE J_1IPART2-ECS.
    DATA : TOTAL_ECS LIKE J_1IPART2-ECS.
    DATA : TOTAL_ECS_1 LIKE J_1IPART2-ECS.
    DATA : GR_TOTAL_ECS LIKE J_1IPART2-ECS.
    DATA : INIT_ECS LIKE J_1IPART2-ECS.
    DATA : GR_TOTAL_CREDIT_CESS LIKE J_1IPART2-ECS.
    DATA : GR_TOTAL_DEBIT_CESS LIKE J_1IPART2-ECS.
    DATA : GR_CLOSE_BAL_CESS LIKE J_1IPART2-ECS.
    SELECTION SCREEN                                                     *
    SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME.
    PARAMETERs : P_WERKS LIKE J_1IEXCDTL-WERKS MEMORY ID WRK.
    SELECT-OPTIONS : S_BUDAT FOR J_1IPART2-BUDAT,
                     S_REGTYP FOR J_1IPART2-REGTYP.
    SELECTION-SCREEN END OF BLOCK BLK1  .
    *RANGES R_BUDAT FOR J_1IPART2-BUDAT.
    EVENT ----> TOP OF PAGE                                              *
    TOP-OF-PAGE.
      PERFORM F_003_TOPI_PEHNAO.
    EVENT ----> AT SELECTION SCREEN                                      *
    *t selection-screen.
    perform f_006_check_karo.
    EVENT ----> START OF SELECTION                                       *
    START-OF-SELECTION.
      PERFORM F_001_SERIAL_NOS_UTHAO.
      PERFORM F_002_DISPLAY_TABLE_BHARO.
      PERFORM F_005_CREDIT_SUBTOTAL.
    EVENT ----> END OF SELECTION                                         *
    END-OF-SELECTION.
      PERFORM F_004_DIKHAO.
    *&      Form  F_001_SERIAL_NOS_UTHAO
          text
    -->  p1        text
    <--  p2        text
    FORM F_001_SERIAL_NOS_UTHAO.
      PERFORM F_002_TRNTYP_CHUNO.
      DATA :  BEGIN OF OPEN_BAL_OCT OCCURS 0,
                  ECS LIKE J_1IPART2-ECS,
                  TOTAL_ECS LIKE J_1IPART2-ECS,
              END OF OPEN_BAL_OCT.
      DATA : LOWMM(2) TYPE N.
      DATA : LOWYR(4) TYPE N.
      DATA : LOWDT(2) TYPE N.
      DATA : L1 LIKE J_1IPART2-BUDAT.
      DATA : L2 LIKE J_1IPART2-BUDAT.
      LOWMM = S_BUDAT-LOW+4(2).
      IF LOWMM = '01'.
        LOWMM = '12'.
      ELSE.
        LOWMM = LOWMM - 1.
      ENDIF.
      IF LOWMM = '12'.
        LOWYR = S_BUDAT-LOW+0(4) - 1.
      ELSE.
        LOWYR = S_BUDAT-LOW+0(4).
      ENDIF.
      LOWDT = S_BUDAT-LOW+6(2).
      CONCATENATE LOWYR LOWMM LOWDT INTO L1.
      CALL FUNCTION 'LAST_DAY_OF_MONTHS'
        EXPORTING
          DAY_IN            = L1
        IMPORTING
          LAST_DAY_OF_MONTH = L2
        EXCEPTIONS
          DAY_IN_NO_DATE    = 1
          OTHERS            = 2.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      RANGES CO_BUDAT FOR J_1IPART2-BUDAT.
      IF P_WERKS = '1000'.
        CO_BUDAT-LOW =  '20041001'.
      ELSEIF P_WERKS = '3000'.
        CO_BUDAT-LOW =  '20041201'.
      ELSEIF P_WERKS = '4000'.
        CO_BUDAT-LOW =  '20041201'.
      ELSEIF P_WERKS = '2000'.
        CO_BUDAT-LOW =  '20041201'.
      ELSEIF P_WERKS = '5000'.
        CO_BUDAT-LOW =  '20041201'.
      ENDIF.
      CO_BUDAT-HIGH =  L2.
      CO_BUDAT-SIGN = 'I'.
      CO_BUDAT-OPTION = 'BT'.
      APPEND CO_BUDAT.
      CLEAR CO_BUDAT.
      SELECT J_1IEXCDTL1RG23ASER J_1IEXCDTL1RG23CSER
                                  J_1IPART21BUDAT J_1IPART21TRNTYP
             J_1IEXCHDR1EXNUM J_1IEXCHDR1EXDAT J_1IEXCDTL1~EXBED
             J_1IEXCDTL1EXSED J_1IEXCHDR1CVDIND J_1IEXCDTL1~RDOC3
         J_1IPART21SERIALNO J_1IPART21EXBED J_1IPART21~EXSED
    J_1IPART21~ECS
                                        INTO TABLE ITAB_EXCISE1 FROM
           ( J_1IPART2 AS J_1IPART21 INNER JOIN J_1IEXCHDR AS J_1IEXCHDR1 ON
                J_1IPART21TRNTYP EQ J_1IEXCHDR1TRNTYP AND
                J_1IPART21DOCYR  EQ J_1IEXCHDR1DOCYR  AND
                J_1IPART21DOCNO  EQ J_1IEXCHDR1DOCNO )
             LEFT OUTER JOIN J_1IEXCDTL AS J_1IEXCDTL1 ON
                J_1IPART21TRNTYP EQ J_1IEXCDTL1TRNTYP AND
                J_1IPART21DOCYR  EQ J_1IEXCDTL1DOCYR  AND
                J_1IPART21DOCNO  EQ J_1IEXCDTL1DOCNO
          WHERE J_1IPART21~REGTYP IN S_REGTYP AND
                    J_1IPART21~BUDAT IN S_BUDAT AND
                    J_1IEXCHDR1~WERKS EQ P_WERKS AND
                    J_1IEXCHDR1~STATUS NE 'D'.
      IF P_WERKS = '1000'.
        SELECT  ECS TRNTYP  FROM J_1IPART2 INTO TABLE  ITAB_CESSCO  WHERE
                                        EXGRP EQ '01' AND
                                        REGTYP = 'A' AND
                                        BUDAT IN CO_BUDAT.
      ELSEIF P_WERKS = '2000'.
        SELECT  ECS TRNTYP  FROM J_1IPART2 INTO TABLE  ITAB_CESSCO  WHERE
                                        EXGRP EQ '81' AND
                                        REGTYP = 'A' AND
                                        BUDAT IN CO_BUDAT.
      ELSEIF P_WERKS = '3000'.
        SELECT  ECS TRNTYP  FROM J_1IPART2 INTO TABLE  ITAB_CESSCO  WHERE
                                        EXGRP EQ '31' AND
                                        REGTYP = 'A' AND
                                        BUDAT IN CO_BUDAT.
      ELSEIF P_WERKS = '4000'.
        SELECT  ECS TRNTYP  FROM J_1IPART2 INTO TABLE  ITAB_CESSCO  WHERE
                                        EXGRP EQ '41' AND
                                        REGTYP = 'A' AND
                                        BUDAT IN CO_BUDAT.
      ELSEIF P_WERKS = '5000'.
        SELECT  ECS TRNTYP  FROM J_1IPART2 INTO TABLE  ITAB_CESSCO  WHERE
                                        EXGRP EQ '55' AND
                                        REGTYP = 'A' AND
                                        BUDAT IN CO_BUDAT.
      ENDIF.
      LOOP AT ITAB_CESSCO.
        CASE ITAB_CESSCO-TRNTYP.
          WHEN 'GRPO' OR 'DIEX' OR 'EWPO'.
            CREDIT_ECSCO = CREDIT_ECSCO + ITAB_CESSCO-ECS.
          WHEN 'MRDY'.
            DEBIT_ECSCO  = DEBIT_ECSCO + ITAB_CESSCO-ECS.
        ENDCASE.
      ENDLOOP.
      MM = S_BUDAT-LOW+4(2).
      GR_TOTAL_CESS_CO  = CREDIT_ECSCO - DEBIT_ECSCO.
      LOOP AT ITAB_EXCISE1.
        ITAB_EXCISE1-OCT_ECS = OCT_ECS.
        MODIFY ITAB_EXCISE1.
      ENDLOOP.
      DELETE ITAB_EXCISE1 WHERE NOT TRNTYP IN R_TRNTYP .
      SORT ITAB_EXCISE1 BY SERIALNO BUDAT.
      DELETE ADJACENT DUPLICATES FROM ITAB_EXCISE1 COMPARING SERIALNO
                                                             BUDAT
                                                             SERIALNO1
                                                             EXBED1.
      APPEND LINES OF ITAB_EXCISE1 TO ITAB_EXCISE2.
      DELETE ITAB_EXCISE2 WHERE NOT SERIALNO IS INITIAL.
      DELETE ITAB_EXCISE1 WHERE SERIALNO IS INITIAL.
      SORT ITAB_EXCISE2 BY SERIALNO BUDAT SERIALNO1 EXBED1.
      DELETE ADJACENT DUPLICATES FROM ITAB_EXCISE2 COMPARING SERIALNO
                                                             BUDAT
                                                             SERIALNO1
                                                             EXBED1.
      APPEND LINES OF ITAB_EXCISE2 TO ITAB_EXCISE1.
      SORT ITAB_EXCISE1 BY SERIALNO BUDAT.
      LOOP AT ITAB_EXCISE1.
        MOVE-CORRESPONDING ITAB_EXCISE1 TO ITAB_EXCISE .
        IF ITAB_EXCISE1-SERIALNO IS INITIAL.
          MOVE : ITAB_EXCISE1-SERIALNO1 TO ITAB_EXCISE-SERIALNO.
          MOVE : ITAB_EXCISE1-EXBED1 TO ITAB_EXCISE-EXBED.
          MOVE : ITAB_EXCISE1-EXSED1 TO ITAB_EXCISE-EXSED.
          MOVE : ITAB_EXCISE1-OCT_ECS TO ITAB_EXCISE-OCT_ECS.
          MOVE : ITAB_EXCISE1-ECS TO ITAB_EXCISE-ECS.
        ENDIF.
        COLLECT ITAB_EXCISE .
      ENDLOOP.
      CLEAR ITAB_EXCISE1.REFRESH ITAB_EXCISE1.FREE ITAB_EXCISE1.
      DELETE ADJACENT DUPLICATES FROM ITAB_EXCISE COMPARING SERIALNO.
      DESCRIBE TABLE ITAB_EXCISE LINES V_LIN.
      IF V_LIN LE 0.
        MESSAGE E000(8I) WITH 'No Records Found'.
      ENDIF.
      PERFORM F_005_DIEX_DTL_SE_UTHAO.
    ENDFORM.                               " F_001_SERIAL_NOS_UTHAO
    *&      Form  F_002_TRNTYP_CHUNO
          text
    -->  p1        text
    <--  p2        text
    FORM F_002_TRNTYP_CHUNO.
      MOVE : 'I' TO R_TRNTYP-SIGN.
      MOVE : 'EQ' TO R_TRNTYP-OPTION.
      MOVE : 'GRPO' TO R_TRNTYP-LOW.
      APPEND R_TRNTYP.
      MOVE : 'DIEX' TO R_TRNTYP-LOW.
      APPEND R_TRNTYP.
      MOVE : 'MRDY' TO R_TRNTYP-LOW.
      APPEND R_TRNTYP.
      MOVE : 'EWPO' TO R_TRNTYP-LOW.
      APPEND R_TRNTYP.
    ENDFORM.                               " F_002_TRNTYP_CHUNO
    *&      Form  F_002_DISPLAY_TABLE_BHARO
          text
    -->  p1        text
    <--  p2        text
    FORM F_002_DISPLAY_TABLE_BHARO.
      DATA : V_CNT TYPE I.
      DATA : V_PREV_EXDAT LIKE J_1IEXCHDR-EXDAT ,
             V_PREV_EXNUM LIKE J_1IEXCHDR-EXNUM .
      DATA : V_DATE LIKE SY-DATUM.
      DATA : V_YYYY(4) , V_MM(2) , V_DD(2).
      PERFORM F_006_KHOL_BUND.
      SORT ITAB_EXCISE BY SERIALNO.
      LOOP AT ITAB_EXCISE.
        MOVE : ITAB_EXCISE-SERIALNO TO ITAB_DISPLAY-SERIALNO.
        MOVE : ITAB_EXCISE-BUDAT TO ITAB_DISPLAY-BUDAT.
        MOVE : V_OPENING_BED TO ITAB_DISPLAY-CENVAT_OPG.
        MOVE : V_OPENING_SED TO ITAB_DISPLAY-SED_OPG.
        MOVE : ITAB_EXCISE-OCT_ECS TO ITAB_DISPLAY-OCT_ECS.
        CASE ITAB_EXCISE-TRNTYP.
          WHEN 'GRPO' OR 'DIEX' OR 'EWPO'.
    To pick up RDOC3 as date for transaction type DIEX
            IF ITAB_EXCISE-TRNTYP EQ 'DIEX'.
              IF ITAB_EXCISE-RDOC3 CA '.'.
                SPLIT ITAB_EXCISE-RDOC3 AT '.' INTO V_DD V_MM V_YYYY.
                CONCATENATE V_YYYY V_MM V_DD INTO ITAB_DISPLAY-EXDAT_CR.
              ELSE.
                CONCATENATE ITAB_EXCISE-RDOC34(4) ITAB_EXCISE-RDOC32(2)
                          ITAB_EXCISE-RDOC3+0(2) INTO ITAB_DISPLAY-EXDAT_CR
              ENDIF.
            ELSE.
              MOVE : ITAB_EXCISE-EXDAT TO ITAB_DISPLAY-EXDAT_CR.
            ENDIF.
            MOVE : ITAB_EXCISE-EXNUM TO ITAB_DISPLAY-EXNUM_CR.
    Checking for Addl Duty of customs
            IF ITAB_EXCISE-CVDIND EQ 'X'.
              MOVE : ITAB_EXCISE-EXBED TO ITAB_DISPLAY-ADDL_DTY.
            ELSE.
              MOVE : ITAB_EXCISE-EXBED TO ITAB_DISPLAY-CENVAT_CR.
            ENDIF.
            MOVE : ITAB_EXCISE-EXSED TO ITAB_DISPLAY-SED_CR.
            MOVE : ITAB_EXCISE-ECS TO ITAB_DISPLAY-ECS.
    Getting the count of EXNUM
            IF V_PREV_EXDAT EQ ITAB_EXCISE-EXDAT AND
               V_PREV_EXNUM EQ ITAB_EXCISE-EXNUM.
              V_CNT = V_CNT + 1.
            ELSE.
              V_CNT = 1.
            ENDIF.
            MOVE : V_CNT TO ITAB_DISPLAY-CNT.
            MOVE : ITAB_EXCISE-EXNUM TO V_PREV_EXNUM.
            MOVE : ITAB_EXCISE-EXDAT TO V_PREV_EXDAT.
    Debits
          WHEN 'MRDY'.
            MOVE : ITAB_EXCISE-EXNUM TO ITAB_DISPLAY-EXNUM_DB.
            MOVE : ITAB_EXCISE-EXDAT TO ITAB_DISPLAY-EXDAT_DB.
            MOVE : ITAB_EXCISE-EXBED TO ITAB_DISPLAY-CENVAT_DB.
            MOVE : ITAB_EXCISE-EXSED TO ITAB_DISPLAY-SED_DB.
            MOVE : ITAB_EXCISE-ECS TO ITAB_DISPLAY-ECS1.
        ENDCASE.
    Total Credits
        ITAB_DISPLAY-TOT_CENVAT_CR = ITAB_DISPLAY-CENVAT_OPG +
                                     ITAB_DISPLAY-CENVAT_CR +
                                     ITAB_DISPLAY-ADDL_DTY .
        ITAB_DISPLAY-TOT_SED_CR = ITAB_DISPLAY-SED_OPG +
                                  ITAB_DISPLAY-SED_CR .
    Closing Balance
        ITAB_DISPLAY-CENVAT_CLS = ITAB_DISPLAY-TOT_CENVAT_CR -
                                  ITAB_DISPLAY-CENVAT_DB.
        ITAB_DISPLAY-SED_CLS = ITAB_DISPLAY-TOT_SED_CR -
                                  ITAB_DISPLAY-SED_DB.
        APPEND ITAB_DISPLAY.
        MOVE : ITAB_DISPLAY-CENVAT_CLS TO V_OPENING_BED.
        MOVE : ITAB_DISPLAY-SED_CLS TO V_OPENING_SED.
        CLEAR : ITAB_DISPLAY .
      ENDLOOP.
    ENDFORM.                               " F_002_DISPLAY_TABLE_BHARO
    *&      Form  F_003_TOPI_PEHNAO
          text
    -->  p1        text
    <--  p2        text
    FORM F_003_TOPI_PEHNAO.
      WRITE:/70 'CENVAT CREDIT LEDGER FOR PERIOD:' , (12) S_BUDAT-LOW ,
                 'to' , (12) S_BUDAT-HIGH , 180 'Page :' , SY-PAGNO .
      SKIP 3.
      WRITE :/25(30) 'OPENING BALANCE' CENTERED ,
              66(50) 'CREDIT' CENTERED ,
             118(28) 'CREDIT SUBTOTAL' CENTERED ,
             150(28) 'TOTAL CREDIT' CENTERED ,
             182(36) 'DEBIT' CENTERED ,
             225(28) 'BALANCE OF CREDIT' CENTERED .
      WRITE:/1 TEXT-001 ,
            12 TEXT-002 ,
            24(12) TEXT-003 CENTERED,
            40(12) TEXT-004 CENTERED,
            56 TEXT-005 ,
            66(12) TEXT-003 CENTERED,
            81(12) TEXT-006 CENTERED,
           102(12) TEXT-004 CENTERED,
           118(12) TEXT-003 CENTERED,
           134(12) TEXT-004 CENTERED,
           150(12) TEXT-003 CENTERED,
           166(12) TEXT-004 CENTERED,
           182 TEXT-007 ,                  "Doc no
           194(12) TEXT-003 CENTERED,
           210(12) TEXT-004 CENTERED,
           225(12) TEXT-003 CENTERED,
           240(12) TEXT-004 CENTERED.                           "(255)
      WRITE:/56 TEXT-008 , 81 TEXT-009 CENTERED
                                       , 182 TEXT-002.
      WRITE:/56 TEXT-002 , 81 TEXT-010 CENTERED .
      WRITE:/1(11) '1' CENTERED  ,
            12(11) '2' CENTERED ,
            24(12) '3' CENTERED ,
            40(12) '4' CENTERED ,
            55(11) '5' CENTERED ,
            66(12) '8a' CENTERED ,
            81(12) '8b' CENTERED ,
           102(12) '8c' CENTERED ,
           150(12) '9' CENTERED ,
           166(12) '10' CENTERED ,
           182(11) '11' CENTERED ,         "Doc no
           194(12) '12a' CENTERED ,
           210(12) '12B' CENTERED ,
           225(12) '13' CENTERED ,
           240(12) '14' CENTERED .                              "(255)
      WRITE :/
    ENDFORM.                               " F_003_TOPI_PEHNAO
    *&      Form  F_004_DIKHAO
          text
    -->  p1        text
    <--  p2        text
    FORM F_004_DIKHAO.
      DATA : V_FIRST , V_PREV_EXNUM LIKE J_1IEXCHDR-EXNUM .
      DATA : V_PREV_EXDAT LIKE J_1IEXCHDR-EXDAT , V_CNT TYPE I .
      SORT ITAB_DISPLAY BY SERIALNO BUDAT EXNUM_CR.
      LOOP AT ITAB_DISPLAY.
        IF SY-TABIX = 1.
          TOTAL_ECS = GR_TOTAL_CESS_CO .
          TOTAL_ECS_1 = GR_TOTAL_CESS_CO .
        ENDIF.
        WRITE:/1 ITAB_DISPLAY-SERIALNO ,
              12 ITAB_DISPLAY-BUDAT ,
              24(15) ITAB_DISPLAY-CENVAT_OPG .
        WRITE: 40(14) TOTAL_ECS.
        IF NOT ITAB_DISPLAY-EXNUM_CR IS INITIAL.
          WRITE : 55 ITAB_DISPLAY-EXNUM_CR ,
                  66(15) ITAB_DISPLAY-CENVAT_CR ,
                  82(14) ITAB_DISPLAY-ADDL_DTY .
       ---------------------INCLUDING CESS CREDIT VALUE---------
          IF NOT ITAB_DISPLAY-ECS IS INITIAL.
            WRITE : 102(14) ITAB_DISPLAY-ECS.
          ENDIF.
          READ TABLE ITAB_EXNUM1 WITH KEY EXNUM = ITAB_DISPLAY-EXNUM_CR
                                          EXDAT = ITAB_DISPLAY-EXDAT_CR
                                          CNT = ITAB_DISPLAY-CNT .
          IF SY-SUBRC EQ 0.
            WRITE : 118(15) ITAB_EXNUM1-CENVAT.
            IF NOT ITAB_EXNUM1-SED IS INITIAL.
              WRITE : 134(14) ITAB_EXNUM1-SED.
            ENDIF.
          ENDIF.
        ENDIF.
        WRITE : 150(15) ITAB_DISPLAY-TOT_CENVAT_CR.
       IF NOT ITAB_DISPLAY-TOT_SED_CR IS INITIAL.
         WRITE : 166(14) ITAB_DISPLAY-TOT_SED_CR.
       ENDIF.
        WRITE : 166(14) TOTAL_ECS.
        IF NOT ITAB_DISPLAY-EXNUM_DB IS INITIAL.
          WRITE : 182 ITAB_DISPLAY-EXNUM_DB ,
                  194(15) ITAB_DISPLAY-CENVAT_DB .
    *--GETTING CESS VALUE FOR DEBIT--
          IF NOT ITAB_DISPLAY-ECS1 IS INITIAL.
            WRITE : 210(14)  ITAB_DISPLAY-ECS1.
          ENDIF.
        ENDIF.
        WRITE : 225(15) ITAB_DISPLAY-CENVAT_CLS.
    RECENT CHANGES -
        IF NOT ITAB_DISPLAY-ECS IS  INITIAL.
          TOTAL_ECS = ITAB_DISPLAY-ECS + TOTAL_ECS.
        ENDIF.
        IF NOT ITAB_DISPLAY-ECS1 IS  INITIAL.
          TOTAL_ECS = TOTAL_ECS - ITAB_DISPLAY-ECS1 .
        ENDIF.
        WRITE : 240(13) TOTAL_ECS.
    RECENT CHANGES -
        IF NOT ITAB_DISPLAY-EXNUM_CR IS INITIAL.
          WRITE :/55 ITAB_DISPLAY-EXDAT_CR.
        ENDIF.
        IF NOT ITAB_DISPLAY-EXNUM_DB IS INITIAL.
          WRITE :/182 ITAB_DISPLAY-EXDAT_DB.
        ENDIF.
        GR_TOTAL_ECS = GR_TOTAL_ECS + TOTAL_ECS.
        COMPUTE  GR_TOTAL_CREDIT_CESS = GR_TOTAL_CREDIT_CESS +
    ITAB_DISPLAY-ECS .
        COMPUTE  GR_TOTAL_DEBIT_CESS = GR_TOTAL_DEBIT_CESS +
    ITAB_DISPLAY-ECS1 .
        COMPUTE  GR_CLOSE_BAL_CESS = ( TOTAL_ECS_1 + GR_TOTAL_CREDIT_CESS )
    - GR_TOTAL_DEBIT_CESS.
        AT LAST.
          IF NOT ITAB_DISPLAY-ECS IS  INITIAL.
            TOTAL_ECS = ITAB_DISPLAY-ECS + TOTAL_ECS.
          ENDIF.
          IF NOT ITAB_DISPLAY-ECS1 IS  INITIAL.
            TOTAL_ECS = TOTAL_ECS - ITAB_DISPLAY-ECS1 .
          ENDIF.
          WRITE:/(255) SY-ULINE.
          WRITE:/212(12) GR_TOTAL_DEBIT_CESS.
          SUM.
         WRITE:/(255) SY-ULINE.
         WRITE:/40(12) GR_TOTAL_ECS ,
          WRITE:  66 ITAB_DISPLAY-CENVAT_CR ,
                82 ITAB_DISPLAY-ADDL_DTY ,
               102 ITAB_DISPLAY-SED_CR ,
               102(12) GR_TOTAL_CREDIT_CESS,
               168(12) GR_TOTAL_CREDIT_CESS,
               194 ITAB_DISPLAY-CENVAT_DB .
               210 ITAB_DISPLAY-SED_DB.
          WRITE : 240(13) GR_CLOSE_BAL_CESS.
          WRITE:/(255) SY-ULINE.
        ENDAT.
        MOVE : ITAB_DISPLAY-EXNUM_CR TO V_PREV_EXNUM.
        MOVE : ITAB_DISPLAY-EXDAT_CR TO V_PREV_EXDAT.
       IF NOT ITAB_DISPLAY-ECS IS  INITIAL.
        TOTAL_ECS = ITAB_DISPLAY-ECS + total_ecs.
       ENDIF.
       IF NOT ITAB_DISPLAY-ECS1 IS  INITIAL.
        TOTAL_ECS = TOTAL_ECS - ITAB_DISPLAY-ECS1 .
       ENDIF.
       GR_TOTAL_ECS = GR_TOTAL_ECS + TOTAL_ECS.
      ENDLOOP.
    ENDFORM.                               " F_004_DIKHAO
    *&      Form  F_005_CREDIT_SUBTOTAL
          text
    -->  p1        text
    <--  p2        text
    FORM F_005_CREDIT_SUBTOTAL.
      DATA : V_CENVAT LIKE J_1IEXCHDR-EXBED , V_SED LIKE J_1IEXCHDR-EXSED.
      DATA : V_CNT TYPE I.
      LOOP AT ITAB_DISPLAY WHERE EXNUM_CR NE SPACE.
        MOVE : ITAB_DISPLAY-EXNUM_CR TO ITAB_EXNUM-EXNUM.
        MOVE : ITAB_DISPLAY-EXDAT_CR TO ITAB_EXNUM-EXDAT.
        MOVE : ITAB_DISPLAY-CENVAT_CR TO ITAB_EXNUM-CENVAT.
        MOVE : ITAB_DISPLAY-ADDL_DTY TO ITAB_EXNUM-ADDL_DTY.
        MOVE : ITAB_DISPLAY-SED_CR TO ITAB_EXNUM-SED.
        APPEND ITAB_EXNUM.
      ENDLOOP.
      SORT ITAB_EXNUM BY EXNUM EXDAT.
      LOOP AT ITAB_EXNUM.
        AT NEW EXDAT.
          MOVE : ITAB_EXNUM-EXNUM TO ITAB_EXNUM1-EXNUM.
          CLEAR : V_CNT , V_CENVAT , V_SED.
        ENDAT.
        V_CNT = V_CNT + 1.
        V_CENVAT = V_CENVAT + ITAB_EXNUM-CENVAT + ITAB_EXNUM-ADDL_DTY.
        V_SED = V_SED + ITAB_EXNUM-SED.
        AT END OF EXDAT.
          MOVE : ITAB_EXNUM-EXDAT TO ITAB_EXNUM1-EXDAT.
          MOVE : V_CENVAT TO ITAB_EXNUM1-CENVAT.
          MOVE : V_SED TO ITAB_EXNUM1-SED.
          MOVE : V_CNT TO ITAB_EXNUM1-CNT.
          APPEND ITAB_EXNUM1.
        ENDAT.
      ENDLOOP.
      DELETE ITAB_EXNUM1 WHERE CNT EQ 1.
    ENDFORM.                               " F_005_CREDIT_SUBTOTAL
    *&      Form  F_006_CHECK_KARO
          text
    -->  p1        text
    <--  p2        text
    *FORM F_006_CHECK_KARO.
    DATA : ITAB_CHECK LIKE ZEXCISE_SED_BED OCCURS 0 WITH HEADER LINE.
    SELECT * FROM ZEXCISE_SED_BED INTO TABLE ITAB_CHECK WHERE
                                                          ZDATE IN S_BUDAT
    DESCRIBE TABLE ITAB_CHECK LINES V_LIN.
    IF V_LIN GT 0.
       SORT ITAB_CHECK BY ZDATE DESCENDING.
       READ TABLE ITAB_CHECK INDEX 1.
       MESSAGE E000(8I) WITH 'Please execute the report for date after'
                              ITAB_CHECK-ZDATE.
    ENDIF.
    *ENDFORM.                               " F_006_CHECK_KARO
    *&      Form  F_006_KHOL_BUND
          text
    -->  p1        text
    <--  p2        text
    FORM F_006_KHOL_BUND.
      TABLES : MARD .
      DATA : MM LIKE MARD-LFMON , YYYY LIKE MARD-LFGJA.
    CALL FUNCTION 'Z_GET_FINANCIAL_YEAR'
       EXPORTING
         DATE     = S_BUDAT-LOW
       IMPORTING
         F_PERIOD = MM
         F_YEAR   = YYYY
       EXCEPTIONS
         OTHERS   = 1.
    ****KANS INSERT
      IF P_WERKS EQ '1000'.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000155110' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
          COLLECT ITAB_GLT0.
        ENDSELECT.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000155130' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
          COLLECT ITAB_GLT0_1.
        ENDSELECT.
      ELSEIF P_WERKS EQ '3000'.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000157110' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
          COLLECT ITAB_GLT0.
        ENDSELECT.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000157130' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
          COLLECT ITAB_GLT0_1.
        ENDSELECT.
    Begin of corrections
      ELSEIF P_WERKS EQ '4000'.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000158110' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
          COLLECT ITAB_GLT0.
        ENDSELECT.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000158130' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
          COLLECT ITAB_GLT0_1.
        ENDSELECT.
      ELSEIF P_WERKS EQ '2000'.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000156110' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
          COLLECT ITAB_GLT0.
        ENDSELECT.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000156130' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
          COLLECT ITAB_GLT0_1.
        ENDSELECT.
      ELSEIF P_WERKS EQ '5000'.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000159110' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0.
          COLLECT ITAB_GLT0.
        ENDSELECT.
        SELECT * FROM GLT0 WHERE BUKRS EQ '1000' AND
                                           RYEAR EQ YYYY AND
                                           RACCT EQ '0000159130' .
          MOVE-CORRESPONDING GLT0 TO ITAB_GLT0_1.
          COLLECT ITAB_GLT0_1.
        ENDSELECT.
    ****End of corrections (20.04.2002 for Plant 4000)
      ENDIF.
      READ TABLE ITAB_GLT0 INDEX 1.
      READ TABLE ITAB_GLT0_1 INDEX 1.
      CASE MM.
        WHEN '01'.
          MOVE : ITAB_GLT0-TSLVT TO V_OPENING_BED.
          MOVE : ITAB_GLT0_1-TSLVT TO V_OPENING_SED.
        WHEN '02'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01.
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01.
        WHEN '03'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02.
        WHEN '04'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 .
        WHEN '05'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 .
        WHEN '06'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 .
        WHEN '07'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
                          ITAB_GLT0-TSL06 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
                          ITAB_GLT0_1-TSL06 .
        WHEN '08'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
                          ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
                          ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 .
        WHEN '09'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
                          ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
                          ITAB_GLT0-TSL08 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
                          ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
                          ITAB_GLT0_1-TSL08 .
        WHEN '10'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
                          ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
                          ITAB_GLT0-TSL08 + ITAB_GLT0-TSL09 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
                          ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
                          ITAB_GLT0_1-TSL08 + ITAB_GLT0_1-TSL09 .
        WHEN '11'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
                          ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
                          ITAB_GLT0-TSL08 + ITAB_GLT0-TSL09 +
                          ITAB_GLT0-TSL10 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
                          ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
                          ITAB_GLT0_1-TSL08 + ITAB_GLT0_1-TSL09 +
                          ITAB_GLT0_1-TSL10 .
        WHEN '12'.
          V_OPENING_BED = ITAB_GLT0-TSLVT + ITAB_GLT0-TSL01 +
                          ITAB_GLT0-TSL02 + ITAB_GLT0-TSL03 +
                          ITAB_GLT0-TSL04 + ITAB_GLT0-TSL05 +
                          ITAB_GLT0-TSL06 + ITAB_GLT0-TSL07 +
                          ITAB_GLT0-TSL08 + ITAB_GLT0-TSL09 +
                          ITAB_GLT0-TSL10 + ITAB_GLT0-TSL11 .
          V_OPENING_SED = ITAB_GLT0_1-TSLVT + ITAB_GLT0_1-TSL01 +
                          ITAB_GLT0_1-TSL02 + ITAB_GLT0_1-TSL03 +
                          ITAB_GLT0_1-TSL04 + ITAB_GLT0_1-TSL05 +
                          ITAB_GLT0_1-TSL06 + ITAB_GLT0_1-TSL07 +
                          ITAB_GLT0_1-TSL08 + ITAB_GLT0_1-TSL09 +
                          ITAB_GLT0_1-TSL10 + ITAB_GLT0_1-TSL11 .
      ENDCASE.
    ENDFORM.                               " F_006_KHOL_BUND
    *&      Form  F_005_DIEX_DTL_SE_UTHAO
          text
    -->  p1        text
    <--  p2        text
    FORM F_005_DIEX_DTL_SE_UTHAO.
    *ppend lines of itab_excise to itab_excise1.
    *elete itab_excise where trntyp eq 'DIEX'.
    *elete itab_excise1 where trntyp ne 'DIEX'.
    ENDFORM.                               " F_005_DIEX_DTL_SE_UTHAO

    Star ,
    Tell me how u are calc.Opening Balance?
    Regards
    Prabhu

  • Cenvat opening balance problem

    Hi,,
    At the time of  50% cenvat credit transfer of capital goods from Credit on Hold a/c (31040) of F.Y:07-08 of Rs.26047791/-  to Cenvat credit BED/CESS/SCESS a/c (F.Y:08-09), opening balance is not transferring. Because of this we are unable to pass the utilisation entry against the excise duty liability for the month of April'08, May'08. & June 08.
    How this Cenvat opening balance transfer is possible in J2I8 ?
    Beside we have not close last year financial account till now. Kinldy tell me which one should be first priority. Should I close last year financial account first and then excise opening balance can be transferred later or vice versa.
    With Regards,
    Samrat

    Hi
    Please follow the below:
    Entering the closing balance of the RG23A Part II and PLA registers in table J_2IACCBAL, as they were on the day prior to extracting the register data.
    For example,. the extract the registers from 1 April 2006. Maintain the closing balances in the table J_2IACCBAL as on 31 March 2006.
    Make the entries in table J_2IACCBAL as described below:
    Field     Entry
    EXGRP     Excise group of the registers
    REGISTER     Type of register
    Make an entry for each of the following:
    u2022     RG23ABED
    u2022     RG23ASED
    u2022     RG23AAED
    u2022     PLABED
    u2022     PLASED
    u2022     PLAAED
    u2022     PLACESS
    DATUM     Date of the closing balance
    WERKS     Leave this field blank
    OP BAL     Leave this field blank
    CL BAL     Closing balance in the register
    EXAMT     Leave this field blank
    EXIND     Leave this field blank
    USNAM     User ID of the person making the entries
    CPUDT     Date of entry
    CPUTM     Time of entry
    regards
    Sridevi

Maybe you are looking for

  • Macbook Air can't connect to VCFlex 10/100 via SFP Rj45

    I have USB-to-RJ45 connector, and I try to use it to connect to FIber Switch (VC Flex 10/100) via SFP RJ45. But I check the link is not detected, but if connect to normal RJ45 switch port it's working fine. Do anyone have the same problem like this,

  • "Updating" thumbnails/recovering library?

    I bought my mac about 3 weeks ago, and I have 5 years worth of digital photos on CDs. Before I knew any better, I put each CD into a folder on my mac's hard drive (nowhere near the Iphoto folder). I then imported all of these photos into Iphoto using

  • EA6900 DHCP timeout issue

    This is by far the most sophisticated and strongest wireless router I have ever used, but it has one small issue in providing wireless service to my phone.  I have looked through all the settings and read all the troubleshooting help and I cannot fin

  • Axis based webservices

    Hi all, We have several webservices for paypal, ebay etc. We have developed all these based on axis. Now we have chnaged the server environment weblogic 11g. When we deploy the builds on weblogic 11g which are working fine on OAS, they are not functi

  • I have went through all the steps and my ipod will stil not show in itunes

    I have went through all the steps and my ipod will still not show in itunes it was before