RG23D Entry cancellation

Hi friends,
From one of our depots, our user has done the PGI for 34 Tonnes and by mistake, he passed on the Excise for 39 Tonnes during the time when the quantity check was failed. This has happed nearly 3 months back and now, he realized the mistake. So, please guide me how to adjust the entry in RG23D by bringing back the excess 5 Tonnes excise which could be used for further sales/pass on.
Regards,
Kotesh

We are not able to cancel the mapping. But proceeded with mapping of another parent invoice for the new invoice

Similar Messages

  • BED is Getting Double in MIGO while creating of RG23D entry

    Hello,
    While we have procuring some material to DEPOT directly from vendor. As per government rule we are maintaining the ZMRP and ZABT condition types in Pricing procedure
    In Pricing procedure
    10 ZMRP Step from 0 to 0
    20 ZABT Step from 10 to 0
    30 Sub total from   10 to 20
    ZED% is calculted from this step "Amount for ED Calculation"
    means the BED is calculted on MRP-38%Abartment charge.
    means BED=ZMRP-ZABT%*14%
    We have assigned Subtotal 5 against the ZED% condition in our pricing
    procedure.We understand that subtotal 5 should not be used for non
    deductible BED as it is used only for Deductible BED.But we are
    procuring the same material in manufacturing plant as well therefore we
    are using Subtotal 5 in the pricing procedure.
    If we use ED setoff tax code then BED is taking correct value from JMO1
    condition
    In DEPOT the ZED% 14% from Pricing procedure and JMO2 from Tax procedure it is adding in MIGO Excise tab  while creating the RG23D  entry .why it is behaving like this
    Please let us know Why it is behaving erraticaly in DEPOT?
    Regards
    Mahesh Naik

    Please check ur setting of maintainexsice defaults.
    BED condition type should be properly maintained.
    regards,
    Sujit

  • Accounting document for RG23D entry

    Hi experts,
    When we procure material from vendor in any exciseable depot, only stock value and GR/IR values are updated. However duties (BED, ECS, AT1) are updated in RG23D register.
    Is there any that we can automatically determine the G/L accounuts for BED, ECS & AT1 for RG23D enteries same as the Part2 entry for manufacturing plant.
    Regards
    Kuldeep
    Edited by: Kuldeep Dahiya on Jun 24, 2008 1:26 PM

    Dear Lakshmipati,
    Sorry, may be that I am not able to explain your clearly. But I am talking about Excisable Depot i.e. excisable depot can procure excise material, keep the excise material in stock and dispatch that excisable material to customer and also can raise excise invoice.
    And if above are wrong that how it can be possible that our excise depot is running for last 4-5 years under the excise regulations and also submitting the proper excise documents to excise department.
    Now, I want to capture the input duties (during procurement) in seperate G/L accounts so that duty values (input & output) can be reconciled.
    Please consider the above things and help me.

  • Excise entry cancellation

    Dear All,
    I have taken credit through J1iex for EWPO transaction type( without any reference to GR). Both Part I and II entries are completed. Now I have to reverse the entry. Can any one help me out regarding the same.
    Thanks in advance

    I hope your have posted your excise entries using J1IEX 'With out Purchase Order' by referring to a Material Document.
    Now to cancel the excise entries first you have cancel your Material Doc using MIGO transaction then post your Cancelled MIGO using J1IEX & then cancel your excise inv entries using J1IEX.
    Hope this will work.
    Plz reward points if its working.
    Thanks & Regards,
    Ram

  • Service entry cancelled in preivious Year

    Dear All,
    Somebody made service entry and GR in April months and cancelled in March , month -31.03.2009 and they again made fresh service entry sheet in march-31.03.2009 whose GR and MIRO done.This is OK. The issue is that initail service balance falls on in April month -fiscal year -2009 and canelled in MArch-31.03.2009 -fiscal year-2008 . How we remove impact of GR  cr. balance from April -from fiscal year 2009 and GR Dr. balance from March-fiscal year 2008.
    Thanks,
    Dharmveer

    Hi,
    For Example the GR is done on April month & can cellation is on March month.
    Again GR on MArch month & MIRO.
    Now the total GR shown in March is 1 & cancellation is 1
    in April month One GR will shown.
    Now do onething Make the cancellation of GR-Reversal by doing (101 movement type GR) which is done on march, so that the total 2 GR & 1 cancellation,so only one GR will shown in March.
    Now again do the reversal of GR which is done in March so that it get tally.
    Regards,
    Raj.

  • Posting of Time Entries cancelled in the current accounting period

    Dear All,
    We are using Cross Application Time Sheet transaction codes for Entering Employee wise labour times using CAT2 transaction code for Networks under Projects and Orders under customer service for entering labour times.  My question is  how to do cancellation of time entries in the current accounting period for the actual time entries done in the previous quarter, as presently system is posting the cancelled date as the date when it was originally posted through CAT5 and CAT9.
    regards,
    rajaraman.

    The CADE transaction code is to delete the timesheet transaction.  SAP cautions us not to use this
    transaction in productive system as it directly updates the related tables and also when i checked the
    same in PRD Client system asks for System Administrator rights which are generally not available to consultants other than the Basis team.
    I just want to know how to cancel the already posted transaction in the current accounting period?
    thanks for quick response and help.
    regards,
    rajaraman.

  • How to see the RG23D register entry for Deport excise invoice

    Hi,
    In which transaction code we can see the RG23D entries.
    I mean, i have created one depot excise invoice, i want to see that entry in RG23D register. How to see that.
    And where how to see the accounting document of Depot Excise invoice.
    Regards
    lakki

    check T Code J1I7.

  • Excise base amount in LOcal currency in J1IG and How to cancel old

    Hi,
    I have two query for depot plant
    1: In case of import material PO currcny is JPY,  now after PO I have done the GR  then ref. to GR number  I am doing the J1IG  in J1IG  in the column  Excise base the default amount is coming from the PO  but it is in PO currency  JPY , we required this amount in INR,  so is there any setting for this.
    2: Aftre PO i have made the   GR  then ref. to GR  i have create the RG entry  with   J1IG  ,  but there is some problem  in the RG entry  so i want to reverse / cancel  that,  which step to be follow for this  My  GR is OK , i read in some thered  it can be done with J1IJ  but how to cancel it .
    regards,
    zafar

    Hi
    1.     Since you are doing this for depot with foreign currency, like you entering all the excise values for 4 duties manually you have to change Excise base value also manually in INR.
    2.     For cancelling the RG23D entry, go from J1IG itself, when you enter in J1IG you can see 4 tabs at the top, select the last tab with cross on it give your material document no and excise group , year and enter then just save system will ask you to confirm and save, then extract RG23D by J2I5 & then with J2I6 you will see it is deleted.

  • How to cancel excise invoice when mov type is 122

    Hello,
    We are creating the PO for one material. and make the GR for that material (material is Quality inspection material)
    so i,e the reason the material is goes to Quality inspection.
    Till then we are Made the J1IEX create the Part1 and Part2 entry.
    So in mean while in Quality all the material's are rejected so, now how to reverse the Part1 and Part2 entries.?
    How to cancel excise invoice when material is qulaity inpspection.
    What i made:
    Made the Return delivery means 122 mov doc and Try to cancell the excise invoice......but no successful
    Regards
    sapman man

    Hi
    Cancelling of excise invoice will be done in the following ways depending on the situation.
    Case 1:
    Create PO
    Do MIGO (create and post excise invoice)
    Create return delivery in quality inspection.
    Now we have to create a rejection inmvoice in J1IS with reference to the return delivery wherein the excise values gets reversed.
    If u try to reverse part 2 entries in J1IEX it will not come.
    Case2:
    Create PO
    Do MIGO (create and post excise invoice)
    Do cancellation of MIGO (102 mvt)
    With ref to vendor or internal excise invoice number just post the transaction. excise part 2 entries will get reversed. This will happen only if 102 entry exist for the PO line item.
    In a nutshell excise entries cancellation comes only if we cancel the material document. If we do return delivery then we have to create rejection excise invoice.
    Hope u get cleared in this regards
    Reg
    Raja

  • Stock value for stock transfer from depot (RG23D) to manufacturing (RG23A)

    Dear all,
    The forum posts that I found are all relating to the process of how to do stock transfer from depot plant to manufacturing plant.
    The question I want to post is relating to the transferred stock value.
    When stock first goes into depot plant (RG23D), the excise duties (CVD, Education Cess, Higher Education Cess, Secondary Education Cess) are all inventorized. However, in manufacturing plant (RG23A), they are CENVATABLE and not inventorized.
    In the transfer of stock from depot to manufacturing, how can we split out the stock value from depot and take out the excise duties to CENVAT in manufacturing plant?
    If using Stock Transfer process (move stock from depot to manufacturing),
    1. Create Stock Transfer Order in ME21N using UD order type
            no accounting
    2. Create DO in VL10B and goods issue
    During goods issue, moving average of stock in depot plant, will increase stock with the same value in manufacturing plant and reduce the stock value in depot plant. How can we reduce the stock value transferred to manufacturing plant by the original excise duties amount, and pass this amount into J1IEX? Is it done in this step or later steps?
       Dr Stock into manufacturing plant  [this value by right, should be reduced as it consists of original excise duties in RG23D?]
            Cr Stock from depot plant
    3. J1IJ- RG23D selection for excise invoice for delivery at depot
        no accounting
    4. VF01 for proforma invoice
       no accounting
    5. MIGO into manufacturing plant (capture excise invoice)- part 1 register. the excise duties can be manually keyed in based on the original RG23D entries when stock is first brought into originating depot plant
         no accounting
    6. Enter Incoming Excise Invoice by J1IEX
         Dr CENVAT Input AED
         Dr CENVAT Input BED
         Dr RG23A ECess
         Dr RG23A SHECess
               Cr CENVAT clearing
    7. Question: Where to Debit CENVAT clearing? In normal domestic purchase process of raw materials into manufacturing plant, Dr CENVAT clearing will be posted during MIRO time.
    If this process is not the correct way to do, please advise the standard SAP recommended way to transfer from depot to manufacturing plant. 
    Thank you in advance.

    You have to add the Excise duty condition types as a Delivery cost Pricing condition types in STO Pricing procedure and have used them in STO. In Pricing procedure, there is no concept of Deductible and Non Deductible. So, what ever the Delivery cost condition you add in Pricing procedure, the amount gets loaded on to the Material cost..To avoid this, a negative condition type needs to be inserted in Pricing procedure with a different accrual key.
    You have to add One Positive condition and One Negative Condition type for the same. Negative condition type is to reduce the condition value from the Material cost during GI.
    Try this scenario in development server and revert back with your observations.

  • Excise Table Entry

    Hi Friends
    1) While we do excise JV through J1IH does it make the part 2 entry in excise table ? If so than in which table?
    2) In which table RG23A part1 &part 2 entries registered, while we do PGI & PGR for raw material?
    3) In which table RG23C part1 &part 2 entries registered, while we do PGI & PGR for capital goods?
    4) In which table RG1 entry registered, while we do PGI & PGR for finished goods?
    5) In which table RG23D entry registered, while we do PGI & PGR from depot?
    6) While we create return delivery and PGR for excisable material which register gets updated and how (while excise JV has not done)? What is the setting behind it?I know that can be set in excise group but how it updates the part1 entry is it hard coded??
                Regards
                 SV

    Hi
    The following are the tables
    J_1IRG1 Excise RG1 details
    J_1IRG23D RG23D register for the depot
    J_1IRGSUM RG23 Summary of receipts and issues
    J_1IPART1 Excise part I detials
    J_1IPART2 Excise Part II details
    J_1IEXCDEP Excise information of vendor at detail lev
    J_1IEXCDTL Excise invoice line item details
    regards
    Prashanth
    Edited by: Prashanth@SD on Jan 28, 2011 11:54 AM

  • 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

  • How to cancel J1IH Documents

    Dear All,
    We are using J1IH - Other Adjustments to settle supplementary invoices.
    We found wrong entries in J1IH document.
    How to cancel the document which is created in J1IH-Other Adjustments?
    If I select "Cancel exc Inv". it is throwing an error "Enter valid excise invoice number".
    Suggest me on this.
    Regards,
    Mullairaja

    J1IH itself used to adjust the entries & cancel excise invoice.
    But you cant reverse it using this transaction.
    Instead I would suggest you to reverse the entries. for this always better to have seperate "Sub transaction type"- maintain G/L accounts accordingly in CIN account determination wrt: Excise transaction type & Sub transaction type.
    Whenever you want to do such adjustment entries use this Sub tran type in J1IH.
    Regards,
    Reazuddin MD

  • Cancel remoteobject transaction

    Hello,
    I'm wondering if it's possible to cancel a remotobject's transaction.
    This is the case:
    A user may upload articles to my backend database. But while this is uploading it must be possible to disconnect this transaction. (If the transaction takes too long for example it must be possible to cancel this).
    I did some research but couldn't find it yet.
    Here's some code.
    My delegator:
                var token:AsyncToken=this.service.saveArticle(articleVO);
                token.resultHandler=responder.result;
                token.faultHandler=responder.fault;
                token.addResponder(responder);
    My Service:
                    var channel:AMFChannel=new AMFChannel("my-amf", "http://localhost:8080/.../messagebroker/amf");
                    var channelSet:ChannelSet=new ChannelSet();
                    channelSet.addChannel(channel);
                    articleService.channelSet=channelSet;
             <mx:RemoteObject id="articleService"               
                         destination="articleService"/>
    I think there are different solutions. Call the remoteobject's disconnect function, the channelset's disconnect function or something with the asynctoken. But I didn't figure it out yet. Can someone help me plz?
    thx

    BlueVeinz, Michael and all,
    I wonder if this is in fact always possible? Presumably Flex can only cancel the things over which it has control, not the detailed behaviour of remote systems. For example, a database engine may grant you permission to query but not cancel. The documentation that Michael pointed to says (among other things) under the cancel() entry "Cancels the last service invocation or an invokation with the specified ID.       Even though the network operation may still continue, no result or fault event       is dispatched" - in other words Flex will stop nagging you about it, but it may well not be possible to do anything about the operation itself. Again, one can imagine a remote web service operation that simply exposes no faciilty for being cancelled - the best you can do is to flag your lack of interest in it.
    From a user's perspective this may well be enough, but if the original question related to actual resources being used I think the issue is different.
    All the best,
    Richard

  • Cancel button doesn't cancel

    Hello.
    I have the following code:-
    public void actionPerformed(ActionEvent e) {
              if (e.getSource() == ok)
                   theType = type.getSelection().getActionCommand();
                  // use the entered data
                  theBid = Integer.parseInt(bid.getText());
                theName = name.getText();
              else if (e.getSource() == cancel) {
                  // data entry cancelled
              dispose();
         }my problem is the cancel button doesn't actually cancel although does close the window it still submits the data.
    how can i get it to destroy all data and then close the window?
    many thanks in advance.
    dave.

    Hello,
    those bits of code still don't seem to work. it ends up setting 'null' for strings and 0 for ints still when i press cancel.
    here is more code to show where the data is actually used:-
    GUINew.java (part of previous code):-
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class GUINew extends JDialog implements ActionListener
         private JButton ok;
         private JButton cancel;
         private ButtonGroup type;
         private JTextField bid;
         private JTextField name;
         int theBid;
         String theName;
         String theType;
         public GUINew(String sTitle, JFrame owner) {
              super (owner, sTitle, true);
              setLooknFeel();
              bid = new JTextField(4);
              name = new JTextField(14);
              ok = new JButton("Hire Boat!");
              ok.addActionListener(this);
              cancel = new JButton("Cancel");
              cancel.addActionListener(this);
              type = new ButtonGroup();
              // create each radio button, specifying its label
              JRadioButton pedal = new JRadioButton("Pedal boat");
              JRadioButton rowing = new JRadioButton("Rowing boat");
              // set a String to associate with each button
              // will use this when the radio button is selected
              pedal.setActionCommand("Pedal boat");
              rowing.setActionCommand("Rowing boat");
              type.add(pedal);
              type.add(rowing);
              JPanel top = new JPanel();
              top.add(pedal);
              top.add(rowing);
             getContentPane().add("North", top);
              JPanel center = new JPanel();
              center.add(new JLabel("Enter Boat ID:"));
              center.add(bid);
              center.add(new JLabel("Enter Name/Colour:"));
              center.add(name);
              getContentPane().add("Center", center);
              JPanel bottom = new JPanel();
              bottom.add(ok);
              bottom.add(cancel);
              getContentPane().add("South", bottom);
              pack();
         public int getBid() { return theBid; }
         public String getName() { return theName; }
         public String getType() { return theType; }
         public void actionPerformed(ActionEvent e) {
              if (e.getSource() == ok)
                   theType = type.getSelection().getActionCommand();
                  // use the entered data
                  theBid = Integer.parseInt(bid.getText());
                theName = name.getText();
              else if (e.getSource() == cancel) {
                  this.dispose();//will release memory
                   this.setVisible(false);//will hide the window
              dispose();
         // windows look and feel settings
         private void setLooknFeel() {
            String lookAndFeel = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
            try {
                UIManager.setLookAndFeel(lookAndFeel);
            catch (Exception e) {
                e.printStackTrace();
    }Main.java - where the data is used:-
    else if (e.getSource() == mtOne) { // add new boat
                   GUINew newb = new GUINew("Add a new boat", this);
                   newb.setVisible(true);
                   if(newb.getType() == "Rowing Boat") {
                        octagon.addBoat(new RowingBoat(newb.getName(), newb.getBid()), newb.getBid(), textarea, title);
                   else {
                        octagon.addBoat(new PedalBoat(newb.getName(), newb.getBid()), newb.getBid(), textarea, title);
              }at the moment when i click cancel it submits getName as Null and getBid and 0.
    Thanks
    Dave.

Maybe you are looking for

  • Error message to the launch of a SPARQL query well trained in Java

    Hello, I am not if it is a compatibility problem between JENA ARQ and got the message that I sometimes not consistently (at least I can not reproduce !!!) so it is very difficult to correct at least to understand and find a solution? (Anyone have a s

  • Sign in to iCloud continually pops up. How to get rid of it?

    My new iPhone 5 has just developed a similar problem which has made it unusable. It seemed to have developed this issue after I tried to put a new SIM card in the phone. Once the pass code is entered after boot up the message 'sign In to iCloud Enter

  • P5800 Problem [only front speakers & sub r working]

    Hi, i'm portuguese so i hope i can explain my problem in order for u to help me. (sorry for my bad english btw..) I bought a P5800 speakers system and installed them perfectly with the help of the manual, everything was double-checked and everything

  • Displaying Customer Contacts in TCODE FBL5N

    Hi , I need to display Customer Contacts in tcode: FBL5N this is same as i am getting the Customer Contacts in tcode:FD03 So i need to display data in pop box with ALV with other push buttons on it so can any one will sujest how to go about it. Or i

  • Logon Problem in XI

    Hi Experts, I entered wrong  user name and password in SAP-XI GUI logan pad 5 times. From there onwards, i am not able to login in to XI server with correct user name and password. I am getting an error "Password login is not possible- too many attem