Changing In Opening Balance

Hi All ,
          I have to change in opening balance of an item, could it possible if yes then how.
Regards

Hi Sandeep,
in order to increase/decrease the value of your stock, you may use the material revaluation functionality:
Inventory -> Inventory Transactions -> Inventory Revaluation
OLH 2007:
If your company runs a perpetual inventory system, you might need to perform inventory revaluation. Revaluation can be performed with any of the supported valuation methods (Moving Average, Standard ,FIFO).
You can revaluate inventory values by:
Changing price for a specific item.
The inventory price is changed and inventory value is recalculated according to the new price.
Changing the value of a specific quantity of inventory.
The quantity of inventory remains unchanged, resulting in a change in the price.
When inventory is subject to FIFO control and there are items in the FIFO layer, an inventory debit or credit results in a posting to the inventory account. If the FIFO layer is empty, the posting goes to the price difference account.
All the best,
Kerstin

Similar Messages

  • FBCJ - change the opening balance value

    Hi Guys,
    How can I change the opening balance value in FBCJ transaction?!
    Thanks
    Daniel Dorta

    Hi !!
    You have to options to do here
    1. Reveres the receipt entry which was passed wrongly by some other Tcode
    2. The difference amount found in FBCJ & FBL3N, post in Receipt side of FBCJ & Post the same amount as an expenses from FB01
    This adjustment entry will work as a reversal for the previous entry which was made by mistake
    You problem will be solved
    Regards
    Shamulheq

  • Change in Opening Balance

    Hi all,
    Is there any option in Standard SAP to change the opening balance after once they have been uploaded into SAP through LSMW.
    It will be very helpful if any one can guide me in this issue.
    Regards

    Hi venugopal ,
    Additionally , I think you know that when posting Opg balances , the corresponding entry hits the dummy account in case of Gl opg balances. Practically , in case of GL we are uploading the trial balance as of a cut-off date thru a journal.Instead of doing it manually , we use LSMW. I suggest you try to isolate the error & rectify it manually.The Dummy account should not have any balance at the end of all the uploading....
    I hope this info was useful....
    Cheers
    Kartik

  • What is 'No marker update'? do opening balance have any relation with it?

    what is 'No marker update'? do opening balance have any relation with it? i know that 'No marker update' will not update reference point that means it will not change the opening balance date to current data, is it right? please explain.
    York

    Hi
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20handle%20inventory%20management%20scenarios.pdf
    When you load historic non cummulatives you need to set the "No Marker Updating" indicator if initalization has already taken place otherwise your data will not match with the stock on R/3 side.
    Raja

  • Regarding Stock opening balance

    Dear All,
                           Am a junior SAP consultant,Is there any possibility of changing the opening balance of the stock with unit price after entering in SAP .
    item group valuation method is Moving average.
    My scenario.
    An item -RMKN00413     
    ob value      qty-4  price - 32.50
    another ob value is also entered in that item as Qty-171 price-40
    If i make the goods issue it is going out as Qty-171 price-39.322(moving average price)
    i want to move that value out with qty-171 and Price-40.
    Pls give me suggestions in doing that.
    Regards,
    shyam.

    Hi rahul,
    How to make that initial stock as null in SAP.
    Actually i entered as -171 in the Inventory>Inventory transaction>Initilal quantity...
    But it is taking the average price only.............like qty-171 price- 39.322........
    there is a varition in the price at which it comes in from the price it goes out....
    4 * 32.50 ---sock value 130
    171*40--- stock value 6970
    but if put the negative qty in that it automatically takes the price as 171*39.322--stock value 6724.062
    the client is sayin that the stock value should not change......I s there any way to match that value at which it comes in...
    so that the account should be clean.
    Regards,
    Shyam

  • Opening balance and changes

    Hi all,
    For reporting purpose, I need to populate data for opening balance and the changes for all the balance sheet items after consolidation. I believe we can do this by using movement type as an indicator.
    My problem now is for the data extracted from ECC. Beside Asset accounts, will the other accounts (liabilities & equities) populate the transaction type in FAGLFLEXT such as (opening, addition, reduction)??
    Regards,
    Shahrul

    Only acounts where the field status requires transaction type in ECC will be available for BCS. This may be any account, but depends on field staus setting, which may be changed to met BCS requirements.
    In many cases, the balance carry forward from year-to-year will cause the movement type or transaction type to be reset to have a new beginning balance. This is determined by the master data for movement types and/or transaction types.
    Beginning balances in period zero, are however a different story. These are not typically loaded from ECC, but are carried forward from the previous year. In this case, the opening balances are typically loaded in the last period of the previous year and the balance carry forward task is subsequently executed in period 1 of the new year to populate period 000 opening balances.

  • How to change the BP-customer Control Account for entering Opening Balance

    Hi experts,
    I am working on a project where I have used the segmented chart of account and segment is branch.
    Project is under SAP B1 8.8 PL 05.
    Customer has 2 branches. Now both the branch have different control account for debtors. Customer (BP) master is common for both the branches.
    Now at the time of entering BP-Customer opening balance, I do not find the provison to select/change of control account. So all the opening balance entered will go into one control account only, which is set in business partner master for particular customer.
    In SAP B1 8.8 at transaction level like Sales Invoice, there is provision to select the control account. Now I believe entering opening balance is the similar functionality as Sales Invoice and there should be provison for selection of control account to user.
    Anyboady has any Idea / work around ?
    Incase there is no provison then, I believe Product development team should take this in development of SAP B1 8.8.
    BR
    Samir Gandhi

    Hi,
    I suggest you to import BP opening balance by JE template of DWT in which you just put account code as your control segmented account and additional information in "shortname" field with customer/vendor code.
    Hope this helps,
    Son.

  • Change opening balance  RG 23A part II register

    Dear Expert,
    I want to change Opening balance for RG 23 A part II register for both the field excise duty and Education cess,
    while i am executing this transaction J2I6 the amount need to change.
    CIN configuration already done from 2006 and that time some balance is laying on opening balance for excise duty and no balance for Edu cess. So i want to change for both the amount, Please advice.
    I have attached the screen shot for reference with marked yellow colors for those fields .Please advice.

    Dear Mani/Sampat,
    Thank you for your answer,
    Sorry for delay in response as per your comment now i can able to modification  the opening balance with table J_2IACCBAL.
    I have one more query regarding outgoing excise capturing in RG 23 A part II register.
    Could you please advice how can the report capture the debit balance for outgoing excise invoices.
    The incoming excise invoices captures perfectly in this register.i have attached screen shot for your reference.

  • Opening Balances changes when running business rules

    Good morning,
    We are experiencing problems with the opening balance calculation (Flow: F100) when running the consolidation business rules in BPC 10.1.
    For example, in 2013.12, Entity 1111 and Account C_ENL_DIV, the ending balance (Flow: F900) is 180.000 euros. When we run the copy opening balance package, the opening balance (F100) for 12.2014 is 180.000 euros, what which is correct.
    The problem comes when some consolidation rules are executed, for example, AU_DIVCTA. For the previous case, we can see that the opening balance changes, previously it was 180.000 euros, coinciding with the final balance of 12.2013 and now the cell is empty, what which is incorrect. This occurs for more than one business rule.
    The definition for the AU_DIVCTA business rule, is the next one. You can see that this do not affect to the opening balance in any case.
    We attached an Excel where you can see this and much more similar cases the definition for the business rule AU_DIVCTA:

    Hi,
    Looks like the substitution variables its looking for are missing.
    Can you check that?
    Regards,
    Amol

  • Item Opening Balance Price change

    After posting the Item Opening Balance with Price, How can i change the price for opening balance item quantity?

    Hi YYReddy,
      After Enter the opening balance with out any transactions are booked
    then again you book a opening balance with negative amount of quantity
    Regards
    Jambulingam.P

  • Opening balance and closing balances for discounts?

    Hi all,
    I have a typical sceanario where in
    opening balance for discounts 10,000 (balance of last month)
    actual discounts  from the sales order 5,000
    manual upload is   from flat file            2,000
    closing balance is 7,000 (which is opening balance + manual upload - actual discounts)
    opening and closing balance needs to be calculated, how to calculate nor handle this on every month?
    level of granularity of the data is
    sku, month, rebate category and rebate amount?
    Thanks

    Hi Pooja,
    can you please let us know few things about your report requirements
    What is the extractor you are using?
    What are the KFs ?
    what are the selection parameters that you want to enter at the reporting level?
    is it the report related to FI AR. do you want to display the values based on the customer -->profitcenter?
    Bcoz we had a same requirement where our requirement was global recievables aging report in which the report need to display opening bal, sales,adjustment,colelction and closing balance and the aging values.
    here what we did is changed the modeling of the DSO and infocube.
    we had used non-cumulative KF in order to calculate closing balance and from that derived opening balance and again create a new formula to get the closing balance.
    if you can be specific with your requirement hope can help you with your report.

  • GL Accounts Opening Balance Window

    HI Experts,
                 Right Now I want to manually enter the opening balances of G/L accounts.I am working on the project for a Service Industry who don't maintain any Inventory (Non-Perpectual Inventory). I am having some doubts after these steps..
    1.      In the SAP Business One main menu, choose Administration  ® System Initialization  ® Opening Balances  ®  G/L Opening Balances.
    The G/L Opening Balances u2013Selection Criteria window appears.
           2.      Set the required G/L account range, and then, choose OK.
    The G/L Opening Balance window appears.
           3.      If the fiscal year does not start on January 1st, change the Date to the required date. Enter offsetting G/L account in the windowu2019s header, and fill in the relevant details.
    Here in  "Opening Balance Account" Field, I am not sure which account to be enter for the opening balance transactions.
    Can you guide me in this.
    Thanks
    Manickam

    Dear Manickam,
    Create one opening balance for G/L account and pick it in the opening balance field and it is only temporary account and doesn't affect your balance sheet
    Regards,
    Mukesh

  • Customer Open Balance Aging Report S_ALR_87012178

    hello,
    we are using this report Customer Open Balance Aging Report S_ALR_87012178 but when run, it brings customers' names from VD03 search field, instead it would be handy to see full names from Name-field. I understand S_ALR_87012178 is a static report, but my question would be is there any other transaction/report which shows the same but with customers' full name?
    thanks in advance

    S_ALR_87012178 is the only standard customer aging report.
    Following two solutions I could think of to fit your requirements.
    Develop a custom report by copying standard customer reports that have full customer name and make changes according to your need.
    Or
    In report S_ALR_87012178 the customer name is populated in Address field. So you can use this field as your customer name and develop a custom report.
    Thanks

  • WM-production order-need change the open quantity in Transfer order

    Hi,
       I created the production order (order quantity 1000).  i did material staging and generated TR. .
       But i need to change the open quantity in transfer order . i need to create the partial Transfer order
        against TR..
       KINDLY SUGGEST ME
       WITH REGARDS
       Dinesh

    Hi Dinesh,
    TO for partial qty is possible.
    When you are doing material staging with 319 mov.type, you create a transfer order for partial quantity as follows:
    You first create a manual transfer order using transaction LT04.
    You specify the TR number in the intial screen and navigate to the detail screen, system shows the Open TR quantity and the proposed TO quantity. By default, both these quantities are equal to the TR quantity.
    However, when you create by clicing the "Create TO button" (the icon with a plus sign in the tool bar of LT04 screen), system takes you to another screen where it asks for the "Requested Qty" on the top of the screen.  Here you can modify the qty as per your requirement; then you can check and confirm the storage type and storage bin for source and destination stocks & save.
    It is important that you give the correct source storage type & storage bin that is having stock or otherwise system might give error message.
    System will create a TO line item with the entered qty and propose the balance TR qty as the 2nd TO line item. You can skip this 2nd TO item or delete it from the TO.
    Once again, if you click the Save button, system will save the TO with the partial quantity.
    The balance quantity will be available in the TR as open quantity and this can be seen in the header data of transaction LB03.
    Regards
    Prabhu

  • 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

Maybe you are looking for

  • How do i use firefox as a web browser on my sony tablet s when i try it makes me choose google

    i bought a Sony tablet S for my wife. She wants to access a program for work from home. I downloaded Mozilla firefox to the Sony, but when I open it, and go to type in a web address, it makes me choose Google as a search engine. How can I use Firefox

  • Access is Denied -- Site Upgrade Upgrade from Foundation 2010 to Foundation 2013

    I'm trying to do a Site Upgrade from Foundation 2010 to 2013 and I keep getting Access Denied during the site upgrade process This is the error I keep seeing: Inner Exception: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) He

  • Characteristic values as hyperlinks in a web report

    Hi All I have a web report with only one characteristic and some key figures. And the number of values for that characteristics are 5 and they are always fixed (structure). In my report I need to make each of that characteristic value a hyper link. I

  • Crashing when I go to drop video effects

    Strangely when I go to drop transitions or video effects, sometimes my project crashes in a way that only happens when I use these. It says something like "serious error", then the file won't let me close(where every other crash, I can make it close

  • U00BFMultiple user status for WBS Element?

    Hello, I need to create multiple user status for a WBS element. I'm using the BAPI: BAPI_BUS2054_SET_STATUS CALL FUNCTION 'BAPI_BUS2054_SET_STATUS'      Importing        return = ls_returnbapi1     TABLES I_WBS_SYSTEM_STATUS =         i_wbs_user_stat