Excise Base amount not updated in J_1iexcdtl table -reg

Dear Gurus,
We have used SAP Ecc 5.0 Patch level 21. In patch level 20, SAP admit without delivery , can do commercial billing and excise billing in foreground. After batch update SAP not support excise invoice creation in foreground. It support only background. We have 2 senario. 1 is capex sales . ie. without material stock we have raise the comm.billing and excise billing. 2 is supplimentary billing. both the senario now getting effected because of no delivery. Asper SAP advise we have setting for background process excise invoice creation. Excise invoice created. but excise base amount not updated in j_1iexcdtl table. Using J_1I7_USEREXIT_CALC_EXC_BASE user exit we are trying to update the same. For single material it works fine. But more than one material for the first material's base amount is updated in all materials. for your reference i have mentioned the codding . SAP advise it is possible to update excise base amount. But not possible to do. pl.adivse if any correct or guide to solve it.
FUNCTION J_1I7_USEREXIT_CALC_EXC_BASE.
""Local Interface:
*"  IMPORTING
*"     VALUE(EXCITM_BASE) TYPE  KOMV-KAWRT
*"     VALUE(POSNR) TYPE  VBRP-POSNR
*"  EXPORTING
*"     VALUE(EXCITM_BASE) TYPE  KOMV-KAWRT
*"  TABLES
*"      KONV STRUCTURE  KONV
*{   INSERT         RDSK925285                                        1
TABLES : KONV.
data :   W_INDEX LIKE SY-TABIX.
DATA :ITAB LIKE TABLE OF KONV WITH HEADER LINE.
DATA :ITAB1 LIKE TABLE OF KOmV WITH HEADER LINE.
ITAB1[] = KONV[].
DATA : BEGIN OF I_TAB OCCURS 0,
       KAWRT LIKE KONV-KAWRT,
       POSNR LIKE VBRP-POSNR,
       END OF I_TAB.
LOOP AT ITAB1.
READ TABLE ITAB1 WITH KEY KSCHL = 'JMOD' KPOSN = ITAB1-KPOSN.
IF SY-SUBRC EQ 0.
    EXCITM_BASE = ITAB1-KAWRT.
    POSNR = ITAB1-KPOSN.
ENDIF.
ENDLOOP.
*}   INSERT
ENDFUNCTION.
Thanks & Regards
R.Udayakumar

solved with the same user exit

Similar Messages

  • Excise base amount not upadting in J_1IEXCDTL

    Hi,
    For some excise document line items Excise base amount is not flowing in J_1IEXCDTL. We are making excise document with reference to Proforma Invoice, in Proforma invoce all the line items are having value and even i checked for these line items in J1ID-Material Assassable Value also exist for that plant on that date.
    For few line items the Excise base amount is flowing and for few line items it is not flowing.
    We are using SAP 5.0, so pls let me know how to solve this problem?
    Thanks & Regards,
    Srikanth.P

    Answered in this link Re: Excise base amount not updated after creating Excise Invoice,Hope it solves issue.

  • Excise base amount not updated after creating Excise Invoice

    Dear Friends,
    The excise base amount is not getting updated in table J_1IEXCDTL u2013 EXBAS. System updates J_1IEXCDTL u2013 EXBAS, if condition category in the Base price condition type is maintained as H.But the problem comes when discounts are applicable.
    Say, the base price is Rs 10000 and there is a discount of Rs1000. If I maintain the condition category u2018Hu2019, the excise base value is getting updated as Rs10000, but it should be Rs 9000. But there is no problem with the BED/EDCess/SHEd cess which are calculated as expected based on the steps defined in the pricing procedure.
    I even tried using condition type JASS (Acc Seq JDUM -100% on the (Base price - Discount value and condition category H).It works only when JASS is set as Non-statistical.By doing so,Base price and also the Discounts conditions are getting inactive. When JASS is set as statistical, EXBAS is not getting updated.
    Thanks
    ISaac

    Hi  Issac,
    Use the below user exit to populate the excise base value.
    J_1I7_USEREXIT_CALC_EXC_BASE.
    This user exit has the KONV strcuture of your billing, you can derevive
    the base value and pass it to the parameter EXCITM_BASE so that the exci
    se base can be updated during billing.
    Thanks and Regards
    MBS

  • Excise base amount not updated

    Hi experts ,
              During the depot sales scenario when i run the report J1IDEPOTSTOCK1 report i am not getting the Excise base amount updated.I am getting the value for first line but the same is not coming in second line i.e. for depot excise invoice no.Pls give ur suggestion for this.Thanks in advance for ur reply.
    Regards
    Lena

    Hi All,
       The First line or 0001 Refers Receipts & all other continues line are Issues. Excise Base amount will be on the total receipts. Eg:- Receipts - 100 Excise base 4500 Issue 10, 20, 20, 10, 20, 10, 10 AED BED, ECS & SECS will come corresponding to the Receipts. Check on it.
    Hope this will solve your problem,
    Regards,
    Pherasath

  • Excise base value not updated

    Dear all,
    We have found that excise base value is not updated after creating excise invoices,later we corrected it,
    excise base value started updating in table J_1IEXCDTL,
    Intially for 2 months excise base value is not updated in table,
    Is there any problem will arise in future ?
    or
    How to solve this issue ?
    Jeyakanthan

    Awaiting valuable replies.....
    Edited by: Jeyakanthan A on Mar 6, 2010 5:36 PM

  • Excise Base Amount Not Populated in J1IEX / MIGO in Imports

    I have completed all following steps for Import process with CVD. CenVAT is to be taken on CVD.
    Configuration
    1. Maintain Import Pricing procedure with Conditions CVD, Cess and Ecess (JCV1, JECV, J1CV)
    2. Create Nil Tax code in FTXP and assign to Company code
    3. Maintained Excise Defaults for TAXINN with tax code created above and CVD conditions given
    4. Maintained CVD account in Company code settings
    5. Maintained OBYC settings
    6. Checked Condition type PB00 details which are standard settings only.
    Master Data
    1. J1ID Raw material and Chapter ID details Maintained
    2. J1ID Material Output material maintained
    3. J1ID Vendor Excise Registration maintained with some placeholder characters
    Transaction
    1. Import PO in USD created and maintained values for CVD condition types with custom vendor assigned.
    2. MIRO processed in INR for Custom duty vendor. CVD amount posted correctly.
    3. During, J1IEX error is shown "Please check Excise base for the item is Zero! "
    I searched other threads also. No significant help.
    Please help me find where the actual problem is.

    Hi Trivedi,
    Check whether you have done the "Customs MIRO" in INR.
    Additionally read this note carefully, the J1IEX part and check whether anything is missing.
    1559145 - Frequently asked questions for Procurement in India:
    CIN
    Regards
    Binoy

  • Excise CIN amounts not updated in TAX field in Sales Order Pricing

    Hi,
    I am not getting the Excise Amount [CIN] i.e BED + ECS + SHE Cess in Tax field of Sales Order Pricing Procedure. only Sales Tax amount is showing.
    Plz let me know, where did I go wrong in the Configuration.
    Thanx in advance.
    with best regards
    Jabbar

    Abdul,
    What you have said is correct with regards to condition record creation, excise rate picking and its calculation.
    On clicking the "analysis" button in pricing screen (Sales item details --> condition -->) try to analyse for each condition type
    we can resolve it
    Check within the condition type whether you have entered condition category = D, it must be like this
    Cond. class   =  D Taxes
    Calculat.type  = A Percentage
    Cond.category = D Tax
    In Pricing Procedure Activate "Statistical" Indicator, it will definitely appear in the tax field.
    Regards
    Sathya

  • Table J_1IEXCDTL - EXBAS isnt updated -Excise Base Amt not flowing to ARE1

    Dear Friends,
    This is in continuation to the earlier post.......Excise Duty Base Amount is not flowing into ARE1...Iam here briefing up the earlier post details:
    When  I am creating ARE-1 for the Exports Excise Invoice, Excise Duty Base Amount is not flowing into ARE1 but BED and other cess conditions are flowing into ARE1
    Liable to AT1 and  Indicator NCCD is checked and in  my pricing procedure NCCD condition is not maintained as its not required.
    The latest patch updated in my system is SAPKH600011 (Logistics and Accounting).....
    Most importantly the Excise base amount field is not seen in the Excise Invoice but in ARE1 this field is in display mode and Excise base value is not flowing into the Table J_1IEXCDTL field EXBAS.
    Someone Pl help me on this issue.
    Thanks
    Sasi
    Edited by: j sasi on Jul 9, 2008 7:13 AM

    Sasi,
    I think you are making a mistake between manual and mandatory. IN the pricing procedure MAN stands for manual condition and mdt stands for mandatory. Now in the standard, the PR00 is an automatic entry and JASS is a manual and a statistical condition. It is not mandatory. PR00 being the base value for calculation of gross price/nett price it is mandatory.
    Most of the customers prefer a manual pricing procedure where PR00, discount, surcharge everything is manual.
    In such a case change the appropriate condition type to the manual condition with manual has priority in the settings for condition type.
    But here you need to enter the prices and all the conditions manually.
    Here you should have only one condition type for pricing condition with the category as basic price. PR00 is normally that condition and so is the P101 which is a Price ( STO). Now if there are several select all others to statistical and only PR00 with an account key assignment to ERL.
    Ensure that JASS the assesable value as statistical and manual.
    If however you want the JASS as the excise base amount then PR00 will be used for calculation of discounts and and NETT price only but JASS will be the one for Excise base amount.
    BAsed on this excise base amount which you will find in the table J_1IEXCHDR the values for BED, ECS and SECS gets calculated.
    Either way is O.K but one word of caution. There is an assessable value in the J1ID transaction where you maintain the Assessable value for materials. Its mostly used in TAXINJ. DO not use it or even if that field is filled ensure that you give the JASS assessable value manually at the time of calculating SAles ordr pricing.
    If you don;t then there will be an error.
    Also check in the analysis whch condition basis value is being taken for calculated in your excise conditions.
    This should solve your problem.
    Remember calculating assessable value is not a small thing but customers prefer it because reversing excise or paying additional excise is a pain for them. If thats the case then so be it.
    But ensure that assessable value is calculated nett of discounts and given there.
    In one case I came across where otehr charges, finance charges and transportation were added to the basic price and only on the total excise duty was added and discount was given after calculation of excise duty. Please check your scenario in line with your requirement. Any questions. My pleasure to reply.
    regards
    Jude

  • Excise Base amount is not updatinf in J_1IEXCDTL

    Hi friends,
    this is Lokesh,
    I am having doubt regarding this issue.
    I also got same requirement to update that excise base amount in J_1IEXCDTL table
    i have written code as
    DATA : W_KONV TYPE KONV.
    CLEAR W_KONV.
    CLEAR KONV.
    READ TABLE KONV INTO W_KONV WITH KEY KSCHL = 'JASS' KNTYP = 'H' KSTAT = 'X'.
    IF SY-SUBRC = 0.
      CLEAR W_KONV.
      READ TABLE KONV INTO W_KONV WITH KEY KPOSN = POSNR
                                           KSCHL = 'JEXP'.
      IF SY-SUBRC = 0.
        EXCITM_BASE = W_KONV-KAWRT.
      ENDIF.
    ENDIF.
    But this code is working fine only the problem came like if 2 deliveries are going to make shipment and billing docs.
    then for that two time JASS condition will come with different values.
    But acording to my code only 1st one will take always because all given conditions are similar.
    but doc condition(KNUMV) is different but for comparing that number i am not getting  reffrence there.
    If any one knows solution pls guide me.
    Regards,
    J.Lokesh

    Hi this is Lokesh,
    I am having doubt regarding this issue.
    I also got same requirement to update that excise base amount in J_1IEXCDTL table
    i have written code as
    DATA : W_KONV TYPE KONV.
    CLEAR W_KONV.
    CLEAR KONV.
    READ TABLE KONV INTO W_KONV WITH KEY KSCHL = 'JASS' KNTYP = 'H' KSTAT = 'X'.
    IF SY-SUBRC = 0.
      CLEAR W_KONV.
      READ TABLE KONV INTO W_KONV WITH KEY KPOSN = POSNR
                                           KSCHL = 'JEXP'.
      IF SY-SUBRC = 0.
        EXCITM_BASE = W_KONV-KAWRT.
      ENDIF.
    ENDIF.
    But this code is working fine only the problem came like if 2 deliveries are going to make shipment and billing docs.
    then for that two time JASS condition will come with different values.
    But acording to my code only 1st one will take always because all given conditions are similar.
    but doc condition(KNUMV) is different but for comparing that number i am not getting  reffrence there.
    If any one knows solution pls guide me.
    Regards,
    J.Lokesh

  • Excise amount not updating while posting invoice

    Dear SCN's,
    I have done GRN and captured excise amount and later in invoice posting these captured excise values are not updating. Please help me out where the root cause might be, please share your views were might be the error. And also help me with information of excise tables updating while capturing excise invoice and posting excise invoice.
    Regards,
    Kumar

    For Domestic & Imports Excisable Material Procurement at Excisable Manufacturing Plant
    J_1IEXCHDR: Table for Excise header information.
    J_1IEXCDTL: Table for Excise item information.
    J_1IGRXREF: Table for Excise & Material document reference.
    J_1IPART1: Table for Part I entry
    J_1IPART2: Table for Part II entry.
    For Domestic & Imports Excisable Material Procurement at Excisable Depot
    J_1IEXCHDR: Table for Excise header information.
    J_1IEXCDTL: Table for Excise item information.
    J_1IRG23D : Table for Depot Register.

  • Excise Duty Base Amount not flowing into ARE -1

    Dear Friends,
    While Iam creating ARE-1 for the Exports Excise Invoice - Excise Duty Base Amount not flowing into ARE1
    thanks
    Sasi

    Dear Lakshmipathi,
    Earlier Liable to AT1 is ticked but not Indicator NCCD,I have checked after ticking the NCCD as well....
    In my pricing procedure i dont have the NCCD condition .....as its not required.
    In classify consditiontypes: I have maintained PR00 condition type as well along with Excise condition types...Do i need to maintain this PR00 anywhere else
    or
    Is there anything I need to do with the assesable value.......if so how should be the entry like in the pricing procedure?
    Can someone please provide me the solution...its very urgent
    Thanks
    Sasi

  • Excise base amount is not changing as per the scheduling agreement

    Sub: in migo excise base amount is not changing as per the scheduling agreement type LP ( time dependent ).
    I have created the scheduling agreement type LP with time dependent.
    I have maintained the price value in two validated period i.e
    01/07/08 to 31/07/08 price is 100 rs.
    01/08/08 to 31/08/08 price is 200 rs.
    I have maintained the delivery schedule on
    15/07/08 of quantity 1 nos.
    When I am doing the goods receipts for the scheduling agreement on
    Document date I am giving 15/07/08.
    Posting date I am giving 15/07/08.
    I am giving the posting date in the excise also 15/07/08.
    After item ok.
    When I will the excise base value it is taking 200 and also excise duty is also calculating on 200.
    When I will post the document
    The stock account and GR/IR account is taking 100 only
    And excise duty is posting for rs: 200 only
    Why the excise base value is not changing as per the validity period.
    What setting I have to do the change the excise base value as per the validity date maintained in the time dependent .
    regards
    jrp

    dear sir
    doc date and posting date i have given 15/07/08 and also excise posting date i have given 15/07/08,
    but excise base value it is taking Rs:200 .
    in inforecord price date category 5-goods recepit date i have given
    yes i ahve changed the excise base value it will post , if i will not change the excise base  value i will post rs:200 only and GR/IR clearing account will post Rs100 only.
    why the excise base value will not take based on the time dependent.
    regards
    JRP

  • Folio number not updated in the table RG23D

    Hi all,
    Folio number not updated in the table RG23D when I create depot excise invoice using batch program J_1IJCHK. Can any one help me by providing rootcause and solution.
    Thanks in advance.
    Regards
    Balaji

    See can i know in which version u r working,Because if u r in 4.6c there will be some problem.Some patches will be there.
    Try this program i have send and assign excise duty
    REPORT YJ_1IJCHK MESSAGE-ID 8I.
    TABLES :  J_1IEXCHDR,                  "excise header
              J_1IEXCDTL,                  "excise detail
              J_1IRG23D ,                  "RG23D register
              J_1IWRKCUS,                  "Plant level customisation
              J_1IREGSET,                  "register set customisation
              J_1IEXCDEF,                  "Tax default information
              VBFA,                        "sales document flow
              LIKP,                        "delivery header
              LIPS,                        "delivery detail
              T005,                        "country information
              KUAGV,                       "sold-to-party information
              KUWEV,                       "ship-to-party information
              KNA1,                        "customer master
              VBPA,                        "sales document partner
              TVKO,                        "sales organisation to company co
              VBUK,                        "delivery information
              MAKT,                        "material description
              T001.                        "company code
    selection-screen begin of block delivery_details no intervals.
    PARAMETERS: FCODE    TYPE C,
                DELIVERY LIKE LIPS-VBELN,
                EXCGROUP LIKE J_1IEXCHDR-EXGRP,
                SERGROUP LIKE J_1IEXCHDR-SRGRP.
    TYPES : BEGIN OF RG23D.
            INCLUDE STRUCTURE J_1IRG23D.
    TYPES:  MENGR LIKE J_1IEXCDTL-MENGR,           "remaining quantity
            MENGA LIKE J_1IEXCDTL-MENGA,           "quantity actually rec
            ADDBED LIKE J_1IEXCDTL-ADDBED,
            ADDSED LIKE J_1IEXCDTL-ADDSED,
            ADDAED LIKE J_1IEXCDTL-ADDAED,
            END OF RG23D.
    DATA : BEGIN OF J1IJ300,
            BUKRS   LIKE TVKO-BUKRS,
            WERKS   LIKE LIPS-WERKS,
            REGID   LIKE J_1IREGSET-J_1IREGID,
            WAERS   LIKE T001-WAERS,
            SHIPFROM_IND TYPE C,                          " Added 10/12/1998
            RG23D_SERIALNO TYPE C,                        " Added 10/12/1998
         END OF J1IJ300.
    DATA :  TRNTYP(4)   TYPE C,
            CONDT-NAME(3) TYPE C,
            TOTAL_LRG23D   LIKE LIPS-LFIMG,
            ALLOC_LRG23D   LIKE LIPS-LFIMG,
            SHIPFROM_IND   LIKE J_1IEXCHDR-STATUS,
            RG23D_SERIALNO LIKE J_1IEXCHDR-STATUS.
    DATA : BEGIN OF XLIPS OCCURS 10,
    internal table to store the delivery item information
             VBELN LIKE LIPS-VBELN,
             POSNR LIKE LIPS-POSNR,
             MATNR LIKE LIPS-MATNR,
             MAKTX LIKE MAKT-MAKTX,
             WERKS LIKE LIPS-WERKS,
             LGORT LIKE LIPS-LGORT,
             CHARG LIKE LIPS-CHARG,
             LFIMG LIKE LIPS-LFIMG,
             MEINS LIKE LIPS-MEINS,
             BED   LIKE J_1IRG23D-EXBED,
             SED   LIKE J_1IRG23D-EXSED,
             AED   LIKE J_1IRG23D-EXAED,
             CUR   LIKE J_1IRG23D-EXCUR,
             SELFLAG TYPE C ,              "T=excise invoice selected
             INDEX LIKE SY-TABIX,          "index in the table
             FLG TYPE C.                   "item selection
    DATA : END OF XLIPS.
    DATA : CRG23D TYPE RG23D OCCURS 30 WITH HEADER LINE.
    contains all rg23d entries for the document
    DATA : LRG23D TYPE RG23D OCCURS 30 WITH HEADER LINE.
    contains item rg23d entries
    DATA : BEGIN OF Z_1IRG23D OCCURS 30.
    stores the data to be updated
            INCLUDE STRUCTURE J_1IRG23D.
    DATA : END OF Z_1IRG23D.
    DATA : BEGIN OF EXCINV OCCURS 30.
    factory inovoics selected for item
            INCLUDE STRUCTURE J_1IEXCDTL.
    DATA : END OF EXCINV.
    DATA : BEGIN OF ASSIGNED_EXCINV OCCURS 30.
            INCLUDE STRUCTURE J_1IEXCDTL.
    DATA : END OF ASSIGNED_EXCINV.
    DATA : A_INDEX LIKE SYST-TABIX.
    DATA : BEGIN OF LOCK_TABLE OCCURS 10,
    table containing plant-material combination and status of the lock
              WERKS  LIKE J_1IEXCDTL-WERKS,
              MATNR  LIKE J_1IEXCDTL-MATNR,
              STATUS TYPE C,                   "LOCKED/UNLOCKED
           END OF LOCK_TABLE.
    DATA : BEGIN OF LOCKTAB OCCURS 0,
               TRNTYP LIKE J_1IEXCDTL-TRNTYP,
               DOCNO  LIKE J_1IEXCDTL-DOCNO,
               DOCYR LIKE  J_1IEXCDTL-DOCYR,
               ZEILE LIKE  J_1IEXCDTL-ZEILE,
            END OF LOCKTAB.
    DATA :
          CRG23D-CTR  TYPE I,              "Line count of crg23d table
          SHIPFROM    LIKE J_1IRG23D-SHIPFROM,
          FOLIO       LIKE J_1IRG23D-FOLIO,
          SERIALNO    LIKE J_1IRG23D-SERIALNO,
          DEPEXNUM    LIKE J_1IRG23D-DEPEXNUM,
          DEPEXYEAR   LIKE J_1IRG23D-DEPEXYEAR.
    CONSTANTS :
       BED       LIKE CONDT-NAME VALUE 'BED',
       AED       LIKE CONDT-NAME VALUE 'AED',
       SED       LIKE CONDT-NAME VALUE 'SED',
       CES       LIKE CONDT-NAME VALUE 'CES',
       LOCKED    TYPE C          VALUE '1',
       UNLOCKED  TYPE C          VALUE '2'.
    AT SELECTION-SCREEN.
       PERFORM CHECK_VBELN_INPUT.
    IF     FCODE = 'S'.
           PERFORM DELIVERY_START_USER_EXIT.
           PERFORM READ_DELIVERY_HEADER.
           PERFORM GET_COMP_CODE.
           PERFORM READ_CUSTOMISATION.
           PERFORM GET_ITEM_INFO.
           PERFORM LOCKING.
           PERFORM RG23D_SELECTION.
           PERFORM SAVE_DOCUMENT.
           MESSAGE I000 WITH 'Selection Complete for Delivery ' DELIVERY.
    ELSEIF FCODE = 'V'.
           PERFORM GET_COMP_CODE.
           PERFORM READ_CUSTOMISATION.
           PERFORM GET_ITEM_INFO.
           PERFORM LOCKING.
           PERFORM UPDATE_DOCUMENT.
           MESSAGE I000 WITH 'Verfiy/Post Complete for Delivery ' DELIVERY.
    ENDIF.
    FORM CHECK_VBELN_INPUT.
    Validate Function Code
       IF NOT ( FCODE = 'S' OR FCODE = 'V' ).
         MESSAGE E000 WITH 'Valid Functions are S/V - Select/Verify Post'.
       ENDIF.
      IF DELIVERY IS INITIAL.
         MESSAGE E000 WITH 'Delivery number cannot be initial'.
      ENDIF.
    check if goods issue done for the delivery
        SELECT SINGLE WBSTK INTO VBUK-WBSTK
            FROM  VBUK
            WHERE VBELN = DELIVERY.
        IF  SY-SUBRC = 0.
            IF VBUK-WBSTK <> 'C' AND FCODE = 'V'.
               MESSAGE W339 WITH DELIVERY.
            ENDIF.
        ELSE.
               MESSAGE E000 WITH 'Invalid Delivery'.
        ENDIF.
    if in select mode check if excise invoice already selected for delive
        SELECT SINGLE * FROM J_1IRG23D
            WHERE VBELN = DELIVERY.
        IF     FCODE = 'S'.
               IF SY-SUBRC = 0.
                  MESSAGE E325 WITH DELIVERY.
               ENDIF.
        ELSEIF FCODE = 'V'.
               IF     SY-SUBRC NE 0.
                      MESSAGE E000 WITH 'Selection not over for ' DELIVERY.
               ELSEIF J_1IRG23D-STATUS = 'P'.
                      MESSAGE E000 WITH 'Record Already Posted '.
               ENDIF.
        ENDIF.
      CLEAR J_1IRG23D.
    ENDFORM.                    " CHECK_VBELN_INPUT
    FORM READ_DELIVERY_HEADER.
      SELECT SINGLE * FROM LIKP
        WHERE VBELN = DELIVERY.
    get the sold-to-party
      CLEAR: KUAGV, KUWEV.
      SELECT SINGLE KUNNR NAME1 LAND1
              FROM KNA1 INTO (KUAGV-KUNNR,KUAGV-NAME1,KUAGV-LAND1)
         WHERE KUNNR = LIKP-KUNAG.
    get the ship-to-party
      SELECT SINGLE KUNNR LAND1 NAME1
              FROM KNA1 INTO (KUWEV-KUNNR,KUWEV-LAND1,KUWEV-NAME1)
          WHERE KUNNR = LIKP-KUNNR.
    ENDFORM.                    " READ_DELIVERY_HEADER
    FORM GET_COMP_CODE.
    get the company code of the document from the sales organisation
      CLEAR TVKO-BUKRS.
      SELECT SINGLE BUKRS FROM TVKO INTO TVKO-BUKRS
        WHERE VKORG = LIKP-VKORG.
      J1IJ300-BUKRS = TVKO-BUKRS.
      SELECT SINGLE WAERS FROM T001 INTO J1IJ300-WAERS
        WHERE BUKRS = J1IJ300-BUKRS.
    ENDFORM.                    " GET_COMP_CODE
    FORM READ_CUSTOMISATION.
      SELECT SINGLE WERKS INTO J1IJ300-WERKS
           FROM   LIPS
           WHERE  VBELN = DELIVERY.
    Plant level customisation
      SELECT SINGLE * FROM  J_1IWRKCUS
             WHERE  J_1IWERKS   = J1IJ300-WERKS .
      IF SY-SUBRC <> 0.
        MESSAGE E303 WITH 'plant' J1IJ300-WERKS 'J_1IWRKCUS'.
      ENDIF.
      IF J_1IWRKCUS-J_1IDEPOT IS INITIAL.
    plant is defined as factory
        MESSAGE E322 WITH J1IJ300-WERKS.
      ENDIF.
      J1IJ300-REGID = J_1IWRKCUS-J_1IREGID.
      TRNTYP = 'DLDO'.
      SELECT SINGLE * FROM J_1IREGSET
           WHERE J_1IREGID = J1IJ300-REGID.
      IF SY-SUBRC <> 0.
        MESSAGE E303 WITH 'Register id' J1IJ300-REGID 'J_1IREGSET'.
      ENDIF.
    ENDFORM.                    " READ_CUSTOMISATION
    *&      Form  GET_ITEM_INFO
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GET_ITEM_INFO.
      REFRESH : CRG23D, LRG23D, EXCINV, XLIPS.
      PERFORM READ_DELIVERY_ITEM.
    ENDFORM.                    " GET_ITEM_INFO
    *&      Form  READ_DELIVERY_ITEM
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM READ_DELIVERY_ITEM.
      DATA : CNT LIKE SY-TABIX.
      CLEAR CNT.
      REFRESH XLIPS.
      SELECT * FROM LIPS
         WHERE VBELN = DELIVERY.
    read the delivery item
    perform plant checking only if in create mode
          IF LIPS-WERKS <> J1IJ300-WERKS.
    plant is different from that of the first item
            SELECT SINGLE J_1IREGID INTO J_1IWRKCUS-J_1IREGID
                 FROM   J_1IWRKCUS
                 WHERE  J_1IWERKS = LIPS-WERKS.
            IF SY-SUBRC <> 0.
              MESSAGE E303 WITH 'plant' LIPS-WERKS 'J_1IWRKCUS'.
            ENDIF.
            IF J_1IWRKCUS-J_1IREGID <> J1IJ300-REGID.
    register id of the two plants are different
              MESSAGE E338 WITH DELIVERY.
            ENDIF.
          ENDIF.
        CLEAR XLIPS.
    store the item details
        XLIPS-VBELN = LIPS-VBELN.
        XLIPS-POSNR = LIPS-POSNR.
        XLIPS-MATNR = LIPS-MATNR.
        PERFORM GET_MATERIAL_DESC
              USING XLIPS-MATNR
                    XLIPS-MAKTX.
       XLIPS-WERKS = LIPS-WERKS.
       XLIPS-LGORT = LIPS-LGORT.
       XLIPS-CHARG = LIPS-CHARG.
       XLIPS-LFIMG = LIPS-LFIMG.
       XLIPS-MEINS = LIPS-VRKME.                           "changed 2.3.98
       CLEAR : XLIPS-BED, XLIPS-SED, XLIPS-AED.
       XLIPS-CUR = J1IJ300-BUKRS.
       CNT = CNT + 1.
       XLIPS-INDEX = CNT.
       XLIPS-SELFLAG = 'F'.
       APPEND XLIPS.
    ENDSELECT.
    ENDFORM.                    " READ_DELIVERY_ITEM
    *&      Form  GET_MATERIAL_DESC
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GET_MATERIAL_DESC USING MATNR MAKTX.
      SELECT SINGLE MAKTX FROM  MAKT INTO MAKTX
             WHERE  MATNR       = MATNR
             AND    SPRAS       = 'E'            .
    ENDFORM.                               " GET_MATERIAL_DESC
    *&      Form  LOCKING
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM LOCKING.
    REFRESH LOCK_TABLE.
    LOOP AT XLIPS.
      LOCK_TABLE-WERKS  = XLIPS-WERKS.
      LOCK_TABLE-MATNR  = XLIPS-MATNR.
      LOCK_TABLE-STATUS = UNLOCKED.
      COLLECT LOCK_TABLE.
    ENDLOOP.
    PERFORM LOCK_UNLOCK_PLANT_MATERIAL USING LOCKED.
      SELECT TRNTYP DOCNO DOCYR ZEILE INTO
          (LOCKTAB-TRNTYP,
          LOCKTAB-DOCNO,LOCKTAB-DOCYR,
          LOCKTAB-ZEILE)
                              FROM   J_1IEXCDTL
                          WHERE TRNTYP = 'GRPO'
                          AND  WERKS = XLIPS-WERKS
                          AND  LGORT = XLIPS-LGORT
                          AND  MATNR = XLIPS-MATNR
                          AND  CHARG = XLIPS-CHARG.
        APPEND LOCKTAB.
      ENDSELECT.
    *share lock for all excise invoices
      LOOP AT LOCKTAB.
        CALL FUNCTION 'ENQUEUE_EJ_1IEXDTL'
             EXPORTING
                  MODE_J_1IEXCDTL = 'S'
                  MANDT           = SY-MANDT
                  TRNTYP          = LOCKTAB-TRNTYP
                  DOCYR           = LOCKTAB-DOCYR
                  DOCNO           = LOCKTAB-DOCNO
                  ZEILE           = LOCKTAB-ZEILE
             EXCEPTIONS
                  FOREIGN_LOCK    = 1
                  SYSTEM_FAILURE  = 2
                  OTHERS          = 3.
      ENDLOOP.
    ENDFORM.                    " LOCKING
    *&      Form  LOCK_UNLOCK_PLANT_MATERIAL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM LOCK_UNLOCK_PLANT_MATERIAL USING ACTION.
      DATA: __UNAME  LIKE SY-UNAME,
            __OBJECT LIKE DD25V-VIEWNAME.
      DATA : BEGIN OF LOCK_STRUCT,
               GRANNAME(10)   VALUE 'J1IJ',
               ENQMODE        VALUE 'E',
               MANDT          LIKE  SY-MANDT,
               WERKS          LIKE  J_1IEXCDTL-WERKS,
               MATNR          LIKE  J_1IEXCDTL-MATNR,
            END OF LOCK_STRUCT.
      LOCK_STRUCT-MANDT = SY-MANDT.
      LOOP AT LOCK_TABLE WHERE STATUS <> ACTION.
    perform the locking/unlocking operation only for the items for which
    it is not already done
        LOCK_STRUCT-WERKS = LOCK_TABLE-WERKS.
        LOCK_STRUCT-MATNR = LOCK_TABLE-MATNR.
       CALL 'C_ENQUEUE'
         ID 'OPCODE'           FIELD ACTION
         ID 'ENQOBJ'           FIELD 'J_1IJ'
         ID '01'               FIELD LOCK_STRUCT
         ID 'COLLISION_UNAME'  FIELD __UNAME
         ID 'COLLISION_OBJECT' FIELD __OBJECT.
       CASE SY-SUBRC.
         WHEN 0.
           LOCK_TABLE-STATUS = ACTION.
           MODIFY LOCK_TABLE.
         WHEN 2.
           MESSAGE E341 WITH LOCK_TABLE-WERKS LOCK_TABLE-MATNR  __UNAME.
         WHEN OTHERS.
           IF ACTION = LOCKED.
             MESSAGE E342 WITH 'locking'
                               LOCK_TABLE-WERKS LOCK_TABLE-MATNR.
           ELSE.
             MESSAGE E342 WITH 'unlocking'
                               LOCK_TABLE-WERKS LOCK_TABLE-MATNR.
           ENDIF.
       ENDCASE.
      ENDLOOP.
    ENDFORM.                    " LOCK_UNLOCK_PLANT_MATERIAL
    *&      Form  RG23D_SELECTION
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM RG23D_SELECTION.
    REFRESH CRG23D.
    REFRESH ASSIGNED_EXCINV.
    LOOP AT XLIPS.
    *write: / xlips-vbeln,xlips-posnr,xlips-matnr, xlips-meins, xlips-lfimg.
    REFRESH EXCINV.
    CALL FUNCTION 'J_1I6_SELECT_EXCISE_INVOICE_DE'
         EXPORTING
             BUKRS        = J1IJ300-BUKRS
             CHARG        = XLIPS-CHARG
             WERKS        = XLIPS-WERKS
             EXGRP        = EXCGROUP
             MATNR        = XLIPS-MATNR
             QTY_CHECK    = 'X'
             MULTI        = 'X'
             NO_DAY_CHECK = 'X'
             SHIPFROM     = SHIPFROM
             LGORT        = XLIPS-LGORT
         TABLES
              EXC_TAB     = EXCINV
         EXCEPTIONS
              OTHERS       = 1.
         TOTAL_LRG23D = 0.
         ALLOC_LRG23D = 0.
         SORT EXCINV BY DOCYR DOCNO .
         LOOP AT ASSIGNED_EXCINV.
            READ TABLE EXCINV WITH KEY DOCYR = ASSIGNED_EXCINV-DOCYR
                                     DOCNO = ASSIGNED_EXCINV-DOCNO
                                     ZEILE = ASSIGNED_EXCINV-ZEILE
                                     BINARY SEARCH.
            IF SY-SUBRC = 0.
               A_INDEX = SY-TABIX.
               EXCINV-MENGR = EXCINV-MENGR - ASSIGNED_EXCINV-MENGR.
               MODIFY EXCINV INDEX A_INDEX .
            ENDIF.
         ENDLOOP.
         DELETE EXCINV WHERE MENGR = 0.
    total_lrg23d = total balance quantity in the selected excise invoices
    alloc_lrg23d = Quantity allocated to a delivery line item,
    Allocation continues till
      - We have balance quantity in excise invoice selection
      - Till total delivery quantity is allocated
        LOOP AT EXCINV.
      To Force the same shipfrom for all the excise invoices
      Shipfrom Ind can be determined in the start user-exit
        IF  J1IJ300-SHIPFROM_IND = 'Y'.
            IF  XLIPS-INDEX = 1 AND SY-TABIX = 1.
                SHIPFROM = EXCINV-SHIPFROM.
            ENDIF.
            IF SHIPFROM NE EXCINV-SHIPFROM.
               EXCINV-RIND3 = 'X'.
               MODIFY EXCINV.
               CONTINUE.
            ENDIF.
        ENDIF.
      Allocation
        IF XLIPS-LFIMG NE ALLOC_LRG23D.
            TOTAL_LRG23D = TOTAL_LRG23D + EXCINV-MENGR.
            IF XLIPS-LFIMG > TOTAL_LRG23D.
               ALLOC_LRG23D = ALLOC_LRG23D + EXCINV-MENGR.
            ELSE.
               EXCINV-MENGR = XLIPS-LFIMG - ALLOC_LRG23D.
               ALLOC_LRG23D = ALLOC_LRG23D + EXCINV-MENGR.
            ENDIF.
        ELSE.
               EXCINV-RIND3 = 'X'.
         ENDIF.
         MODIFY EXCINV.
         ENDLOOP.
         DELETE EXCINV WHERE RIND3 = 'X'.
         LOOP AT EXCINV.
            MOVE-CORRESPONDING EXCINV TO ASSIGNED_EXCINV.
            APPEND ASSIGNED_EXCINV.
            CLEAR ASSIGNED_EXCINV.
         ENDLOOP.
         IF TOTAL_LRG23D < XLIPS-LFIMG.
            MESSAGE E000 WITH 'Not enough balance in RG23D ......'.
        ENDIF.
    Collect all allocated excise invoices to crg23d table
      LOOP AT EXCINV.
        PERFORM FILL_CRG23D.
        APPEND CRG23D.
      ENDLOOP.
    ENDLOOP.
    ENDFORM.                    " RG23D_SELECTION
    *&      Form  SAVE_DOCUMENT
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM SAVE_DOCUMENT.
          PERFORM PREPARE_RG23D_DATA.
    Generate RG23D serial number and Excise Invoice Serial Number
       IF J1IJ300-RG23D_SERIALNO = 'Y'.
       PERFORM GENERATE_RG23D_SERIAL ON COMMIT.
       ENDIF.
       PERFORM GENERATE_EXCISE_INV_SERIAL ON COMMIT.
         CALL FUNCTION 'J_1I7_USEREXIT_DEPOT_BEF_SAVE'
              TABLES
                   RG23D   = Z_1IRG23D
              EXCEPTIONS
                   OTHERS  = 1.
         PERFORM UPDATE_RG23D ON COMMIT.
         PERFORM UPDATE_EXCDTL ON COMMIT.
         COMMIT WORK.
        PERFORM LOCK_UNLOCK_PLANT_MATERIAL USING UNLOCKED.
         PERFORM UNLOCKING.
         MESSAGE S333 WITH DELIVERY.
    ENDFORM.                    " SAVE_DOCUMENT
    *&      Form  PREPARE_RG23D_DATA
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM PREPARE_RG23D_DATA.
      REFRESH Z_1IRG23D.
      LOOP AT CRG23D WHERE MENGE <> 0.
        CLEAR Z_1IRG23D.
        Z_1IRG23D = CRG23D.
        Z_1IRG23D-USNAM = SY-UNAME.
        Z_1IRG23D-CPUDT = SY-DATUM.
        Z_1IRG23D-EXGRP    = EXCGROUP.
        Z_1IRG23D-SRGRP    = SERGROUP.
        APPEND Z_1IRG23D.
        IF CRG23D-ADDAED <> 0 OR CRG23D-ADDSED <> 0 OR CRG23D-ADDAED <> 0 .
    additional excise is applicable
    make quantity zero for A certificate entries
          CLEAR : Z_1IRG23D-MENGE.
    get all the A certificates for the excise document item
          SELECT * FROM J_1IEXCDTL
    TODO : add the transaction type to the selection procedure
                 WHERE RDOC1    = CRG23D-DOCNO
                 AND   RYEAR1   = CRG23D-DOCYR
                 AND   RITEM1   = CRG23D-ZEILE
                 AND   RIND1    = 'G'.
    get the A certificate number
            SELECT SINGLE
                   EXNUM EXYEAR INTO (Z_1IRG23D-EXNUM, Z_1IRG23D-EXYEAR)
                   FROM  J_1IEXCHDR
                   WHERE  TRNTYP = J_1IEXCDTL-TRNTYP
                   AND    DOCYR  = J_1IEXCDTL-DOCYR
                   AND    DOCNO  = J_1IEXCDTL-DOCNO.
            Z_1IRG23D-TRNTYP = J_1IEXCDTL-TRNTYP.
            Z_1IRG23D-DOCYR  = J_1IEXCDTL-DOCYR.
            Z_1IRG23D-DOCNO  = J_1IEXCDTL-DOCNO.
            Z_1IRG23D-ZEILE  = J_1IEXCDTL-ZEILE.
            Z_1IRG23D-EXBED  = ( J_1IEXCDTL-EXBED * CRG23D-MENGE )
                                          / CRG23D-MENGA.
            Z_1IRG23D-EXSED  = ( J_1IEXCDTL-EXSED * CRG23D-MENGE )
                                          / CRG23D-MENGA.
            Z_1IRG23D-EXAED  = ( J_1IEXCDTL-EXAED * CRG23D-MENGE )
                                          / CRG23D-MENGA.
            Z_1IRG23D-RG23ASER = J_1IEXCDTL-RG23ASER.
            Z_1IRG23D-RG23CSER = J_1IEXCDTL-RG23CSER.
            Z_1IRG23D-RGPLASER = J_1IEXCDTL-RGPLASER.
            APPEND Z_1IRG23D.
          ENDSELECT.
        ENDIF.
    ENDLOOP.
    ENDFORM.                    " PREPARE_RG23D_DATA
    *&      Form  UPDATE_RG23D
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM UPDATE_RG23D.
    *update the rg23d register
      INSERT J_1IRG23D FROM TABLE Z_1IRG23D ACCEPTING DUPLICATE KEYS.
      IF SY-SUBRC <> 0.
        MESSAGE A308 WITH 'J_1IRG23D'.
      ENDIF.
    ENDFORM.                    " UPDATE_RG23D
    *&      Form  UPDATE_EXCDTL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM UPDATE_EXCDTL.
      LOOP AT CRG23D WHERE MENGE <> 0.
    update the remaining quantity in the excise invoice item tables
        UPDATE J_1IEXCDTL
           SET      MENGR   = MENGR - CRG23D-MENGE
                    AENAM   = SY-UNAME
                    AEDAT   = SY-DATUM
           WHERE    TRNTYP  = 'GRPO'
             AND    DOCYR   = CRG23D-DOCYR
             AND    DOCNO   = CRG23D-DOCNO
             AND    ZEILE   = CRG23D-ZEILE.
        IF SY-SUBRC <> 0.
          MESSAGE A308 WITH 'J_1IRG23D'.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " UPDATE_EXCDTL
    *&      Form  FILL_CRG23D
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM FILL_CRG23D.
      CRG23D-TRNTYP   = EXCINV-TRNTYP.
      CRG23D-DOCYR    = EXCINV-DOCYR.
      CRG23D-DOCNO    = EXCINV-DOCNO.
      CRG23D-ZEILE    = EXCINV-ZEILE.
      CRG23D-VBELN    = XLIPS-VBELN.
      CRG23D-POSNR    = XLIPS-POSNR.
      CRG23D-EXNUM    = EXCINV-EXNUM.
      CRG23D-EXYEAR   = EXCINV-EXYEAR.
      CRG23D-LIFNR    = EXCINV-LIFNR.
      CRG23D-MATNR    = EXCINV-MATNR.
      CRG23D-MAKTX    = EXCINV-MAKTX.
      CRG23D-CHAPID   = EXCINV-CHAPID.
      CRG23D-MEINS    = EXCINV-MENGR_UOM.
      CRG23D-WERKS    = EXCINV-WERKS.
      CRG23D-EXCUR    = EXCINV-EXCUR.
      CRG23D-RG23ASER = EXCINV-RG23ASER.
      CRG23D-RG23CSER = EXCINV-RG23CSER.
      CRG23D-RGPLASER = EXCINV-RGPLASER.
      CRG23D-MENGR    = EXCINV-MENGR.
      CRG23D-MENGA    = EXCINV-MENGA.
      CRG23D-MENGE    = EXCINV-MENGR.            " Move the allocated Qty
      CRG23D-EXBED    = ( EXCINV-EXBED  * CRG23D-MENGE ) / EXCINV-MENGA.
      CRG23D-EXSED    = ( EXCINV-EXSED  * CRG23D-MENGE ) / EXCINV-MENGA.
      CRG23D-EXAED    = ( EXCINV-EXAED  * CRG23D-MENGE ) / EXCINV-MENGA.
    ENDFORM.                    " FILL_CRG23D
    *&      Form  UPDATE_DOCUMENT
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM UPDATE_DOCUMENT.
    LOOP AT XLIPS.
      UPDATE J_1IRG23D SET STATUS = 'P'
      WHERE  VBELN       = XLIPS-VBELN
      AND    POSNR       = XLIPS-POSNR.
    ENDLOOP.
    COMMIT WORK.
    ENDFORM.                    " UPDATE_DOCUMENT
    *&      Form  DELIVERY_START_USER_EXIT
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM DELIVERY_START_USER_EXIT.
    CALL FUNCTION 'J_1I7_USEREXIT_EXGRP_DETERM'
         EXPORTING
              EXCGRP         = EXCGROUP
            MBLNR          =
            MJAHR          =
            VENDOR         =
              VBELN          = DELIVERY
         IMPORTING
              EXCGRP         = EXCGROUP
              SHIPFROM_IND   = J1IJ300-SHIPFROM_IND
              RG23D_SERIALNO = J1IJ300-RG23D_SERIALNO
         EXCEPTIONS
              OTHERS         = 1.
    CALL FUNCTION 'J_1I7_USEREXIT_SERGRP_DETERM'
         EXPORTING
              SRGRP          = SERGROUP
            MBLNR          =
            MJAHR          =
              VBELN          = DELIVERY
         IMPORTING
              SRGRP          = SERGROUP
         EXCEPTIONS
              OTHERS         = 1.
    ENDFORM.                    " DELIVERY_START_USER_EXIT
    *&      Form  GENERATE_RG23D_SERIAL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GENERATE_RG23D_SERIAL.
      LOOP AT Z_1IRG23D WHERE MENGE <> 0.
      CLEAR: FOLIO, SERIALNO.
      SELECT MAX( FOLIO ) MAX( SERIALNO )
      INTO   (Z_1IRG23D-FOLIO, Z_1IRG23D-SERIALNO)
      FROM   J_1IRG23D
      WHERE  TRNTYP = Z_1IRG23D-TRNTYP
      AND    DOCNO  = Z_1IRG23D-DOCNO
      AND    DOCYR  = Z_1IRG23D-DOCYR
      AND    ZEILE  = Z_1IRG23D-ZEILE.
      MODIFY Z_1IRG23D.
      ENDLOOP.
    ENDFORM.                    " GENERATE_RG23D_SERIAL
    *&      Form  GENERATE_EXCISE_INV_SERIAL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GENERATE_EXCISE_INV_SERIAL.
      CLEAR: DEPEXNUM, DEPEXYEAR.
    CALL FUNCTION 'J_1I6_DETERMINE_EXC_YEAR'
         EXPORTING
              I_BUKRS      = J1IJ300-BUKRS
         IMPORTING
              EXCISE_YEAR  = DEPEXYEAR
         EXCEPTIONS
              MISS_COMPANY = 1
              OTHERS       = 2.
      IF SY-SUBRC NE 0.
        MESSAGE E526 WITH 'Company ' J1IJ300-BUKRS.
      ENDIF.
      CALL FUNCTION 'NUMBER_GET_NEXT'
           EXPORTING
                NR_RANGE_NR             = '01'
                OBJECT                  = 'J_1IDEPINV'
                QUANTITY                = '1'
                SUBOBJECT               = SERGROUP
                TOYEAR                  = DEPEXYEAR
           IMPORTING
                NUMBER                  = DEPEXNUM
           EXCEPTIONS
                INTERVAL_NOT_FOUND      = 1
                NUMBER_RANGE_NOT_INTERN = 2
                OBJECT_NOT_FOUND        = 3
                QUANTITY_IS_0           = 4
                QUANTITY_IS_NOT_1       = 5
                INTERVAL_OVERFLOW       = 6
                OTHERS                  = 7.
      CASE SY-SUBRC.
        WHEN 0.
        WHEN 1.
          MESSAGE A336 WITH 'internal document' ': Interval not found'
                            '. Number object : J_1IDEPINV'.
        WHEN 3.
          MESSAGE A336 WITH 'internal document' ': Object not found'
                            '. Number object : J_1IDEPINV'.
        WHEN OTHERS.
          MESSAGE A336 WITH 'internal document'
                            '. Number object : J_1IDEPINV'.
      ENDCASE.
    Update Depot Excise Invoice Year and Number in the table
      LOOP AT Z_1IRG23D.
        Z_1IRG23D-SERIALNO  = Z_1IRG23D-SERIALNO + 1.
        Z_1IRG23D-DEPEXYEAR = DEPEXYEAR.
        Z_1IRG23D-DEPEXNUM  = DEPEXNUM.
        MODIFY Z_1IRG23D.
      ENDLOOP.
    ENDFORM.                    " GENERATE_EXCISE_INV_SERIAL
    *&      Form  UNLOCKING
          text
    -->  p1        text
    <--  p2        text
    FORM UNLOCKING.
      LOOP AT LOCKTAB.
        CALL FUNCTION 'DEQUEUE_EJ_1IEXDTL'
             EXPORTING
                  MODE_J_1IEXCDTL = 'S'
                  MANDT           = SY-MANDT
                  TRNTYP          = LOCKTAB-TRNTYP
                  DOCYR           = LOCKTAB-DOCYR
                  DOCNO           = LOCKTAB-DOCNO
                  ZEILE           = LOCKTAB-ZEILE.
      ENDLOOP.
    ENDFORM.                    " UNLOCKING

  • Excise base amount for Import PO in MIGO

    Dear All,
    I have create the Import Po and maintain all conditions i.e.JCDB,JCV1,JECV,J1CV,JEDB,JSDB,JADC and assign the custom vendor to conditions and make the custom payment through MIRO for planned delivery cost.
    Then while doing the MIGO with referance to PO and commercial invoice,all duties are captyring correctly but excise base amount is showing base amount plus basic custom duty.Please give the solution is any setting missing in costomizing.
    And in MIGO item screen BED %(CVD%) is not showing but AED,ECSS,SECESS is showing correctly.
    Please give solution urgently.
    Regards,
    Vinay

    hi
    check following configuration
    path: spro>logistic general >tax on goods movements>India >basic settings>determination of excise duty >maintain excise defaults >
    if it is been done then check whole config as follows
    TOTAL IMPORT CONFIGURATION AND CYCLE
    in ur pricing u have to create following
    JCDB IN: Basic Custom Duty
    JCV1 IN : CVD
    JECV IN : Ed Cess on CVD
    J1CV IN : H&SECess on CVD
    JEDB IN : Ed Cess on BCD
    JSDB IN : H&SECess on BCD
    JADC Additional Duty of Custom
    JCV1, JECV, J1CV and JADC will go to Excise MODVAT Accounts and JCDB, JEDB and JSDB will get loaded on inventory.
    In M/06, for all above conditions, keep following controls;
    Cond. class A (Discount or surcharge) Plus/minus A (Positive)
    Calculat.type A (Percentage)
    Cond.category B (Delivery costs)
    Activate "Currency Conversion" and "Accrual"
    Now for setoff
    maintain the following conditions in excise default settings.
    JCV1, JECV, JADC
    path: spro>logistic general >tax on goods movements>India >basic settings>determination of excise duty >maintain excise defaults >
    along with ur tax procedure maintain these conditions in the specified fields
    JCV1 in CVD condition field.
    JECV in ECS condition field.
    JADC in ACD condition field.
    in case of SECess on CVD, no need to maintain.
    it is hardcode in the standard
    Vendor in GR 2 (Entry always possible)
    Import scenario
    1.Create material master of import goods.
    2. Create vendor master record of import vendor and Customs clearing vendor.
    3. Maintain CIN settings.
    4. Maintain J1id.
    5. Maintain Pricing procedure SAP standard JIMPOR.., maintain required conditions..JCDB, JCV1...
    6.Assign the schema to respective import vendor in purchasing view of VMR.
    7. Create import PO, check in conditions of JCDB, JCV1 the customs clearing vendor(Indian vendor) and percentage is assigned. This can be done by In condition tab select condtion then click on display, then enter.
    Save the PO.
    8. MIRO --Capture Bill Of Entry.(Commercial Invoice No.,).Customs clearing first .Here CVD will b converted to BED.
    9. Capture Excises invoice--j1iex.
    10.MIGO.
    12.Post Excise Invoice.
    13.MIRO...Payment to vendor(import vendor)

  • Equipment not updated in all tables properly

    Hi Friends
    Equipment was updated in EQUI table with limited data only and not updated in other tables EQKT, EQUZ. When I go through the IE03, there I am unable to find the equipment. Material and serial number provides the equipment, I know it, but if we check it in IQ02 for the serial number with the material, I was unable to see the equipment details those are sales and distribution tab and some tabs not updated and equipment not activated. When I tried to activate the equipment in IQ02, system allows saving the document. When I am coming back, system is giving the update termination error. I think at the time of creating user might have done some mistake, but I am unable to find it
    Could you please let me know the reason and possible solution?
    Thanks in advance
    Ravi

    hi
    After creating the equipment in IE01 ,you are not able to change in IE02 or display the same in IE03, then kindly check with your basis team for your update termination error
    regards
    thyagarajan

Maybe you are looking for

  • Old Family plans can no longer be used?

    Today is the day I am able to upgrade my phone finally so I decided to preorder the Galaxy S III. I decided I'd rather lose my unlimited data and take the final NE2 $50 discount by waiting til today to preorder. So I'm going through the process and i

  • Use Cisco ACS to verify MAC address for VPN User

    Question: I want to have the MAC address of a machine checked when the user is logging into VPN Client. For example: User opens VPN client-->Clicks connect-->types in User/Pass which gets passed to ACS (part of what should be sent is the MAC address)

  • Passing EDI filename for 850 from B2B Gateway to BPEL

    Hi, Is there any way to pass the EDI filename for 850 from B2B Gateway to BPEL via AQ? we want to store the inbound filename in the database along with the PO. we are using 10g. Thanks, Naveen

  • Dynamic Column Chart

    Hi, we are trying to develope a dynamic column chart .but i faild to achived this can any one know how to create a dynamic column chart .some sample code i am providing. var arrCol:ArrayCollection=new ArrayCollection();                               

  • ChaRM: new challenge with maintenance cycle

    Dear colleagues, I have got the following messages for transaction 8157 SDMJ (created from 8156 SDCR): Header Data     No maintenance cycle is open for the current system Item 1     The item category 'SRVP' is not permitted for product 'SUPPORT_HOTLI