BAPI to delete Batch number

Hi,
Can anyone let me know the BAPI to delete the Batch Number when ever a particular Material document is reversed for a year.
(Batch Number that was created as part of Material Document Creation and Each Batch Number is used only for one Material Document number)
Points for sure..
Thanks,
Ponraj.s.

Ponraj,
BAPI_BATCH_CHANGE              Change Batch   
BAPI_BATCH_CREATE              Create Batch   
BAPI_BATCH_DELETE              delete batch
Amit.

Similar Messages

  • BAPI to delete contact number

    Hello
    Is there any BAPI to delete a perticular contact number maintained at BP .

    Hi Abhijit,
    You can use BAPI_BUPA_ADDRESS_REMOVE for removing address and other communication details. Since you are interested in removing only contact details / communication details - you need to copy existing details (without communication details) and remove old one.
    You can use BAPI_BUPA_ADDRESS_ADD for adding address.
    Regards,
    Avinash

  • BAPI FOR Deleting a Schedule Line Item from EKES and EKET tables

    Dear All,
    I would like to for deleting one of the line item from EKES (Po Confirmation ) and the respective line item from the EKET(PO Schedule Line Item Table).
    Assume that am allowing the user to select the lineitem from zprogram screen and collecting the PO and Its LIne Item details in an internal table.
    Can i Use
    <b>BAPI_PO_Change</b> , if so , can anybody tell me the steps to follow to use this bapi for deleting the PO lineItems, since i m going to try BAPI for First time.
    pls help me out
    Message was edited by: Raja K.P

    Hi raja ,
    loop at iekko1.
        w_index = sy-tabix.
        item-po_item   = itemx-po_item   = iekko1-ebelp.
        item-quantity  = iekko1-mng01.
        itemx-quantity = iekko1-mng01.
        if iekko1-wamng = iekko1-wemng.
        itemx-no_more_gr = item-no_more_gr = 'X'.
        else.
        itemx-no_more_gr = item-no_more_gr = ''.
        endif.
        append item.
        append itemx.
          clear return[].
          call function 'BAPI_PO_CHANGE'
               exporting
                    purchaseorder = iekko1-ebeln
               tables
                    return        = return
                    poitem        = item
                    poitemx       = itemx.
          if return[] is initial.
          commit work and wait.
          call function 'DEQUEUE_ALL'.
    search for deletion fields which u have to mark 'X'.
    before calling  this BAPi u have to lock the PO by using ENQUEUE.
    <b>
    FU BAPI_PO_CHANGE
    Text
    Change purchase order
    Functionality
    Function module BAPI_PO_CHANGE enables you to change purchase orders. The Change method uses the technology behind the online transaction ME22N.
    Alternatively, the IDoc type PORDCH1 is available. The data from this IDoc populates the interface parameters of the function module BAPI_PO_CHANGE.
    Functionality in Detail
    Authorization
    When you create (activity 02) an Enjoy purchase order, the following authorization objects are checked:
    M_BEST_BSA (document type in PO)
    M_BEST_EKG (purchasing group in PO)
    M_BEST_EKO (purchasing organization in PO)
    M_BEST_WRK (plant in PO)
    Controlling adoption of field values via X bar
    For most tables, you can use your own parameters in the associated X bar (e.g. PoItemX) to determine whether fields are to be set initial, values inserted via the interface, or default values adopted from Customizing or master records, etc. (for example, it is not mandatory to adopt the material group from an underlying requisition - you can change it with the BAPI).
    Transfer
    Purchase order number
    The PurchaseOrder field uniquely identifies a purchase order. This field must be populated in order to carry out the Change method.
    Header data
    The header data of the Enjoy purchase order is transferred in table PoHeader.
    Item data
    The item data of the Enjoy purchase order is stored in the tables PoItem (general item data). Changes regarding quantity and delivery date are to be made in the table PoSchedule.
    Use the table PoAccount to change the account assignment information.
    Services and limits
    Changes to existing items cannot be carried out with the Change method. It is only possible to create new items.
    Conditions
    Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. A new price determination process can be initiated via the parameter CALCTYPE in the table PoItem.
    Vendor and delivery address
    The vendor address in the table PoAddrVendor and the delivery address in the table PoAddrDelivery can only be replaced by another address number that already exists in the system (table ADRC). Changes to address details can only be made using the method BAPI_ADDRESSORG_CHANGE.
    Partner roles
    You can change all partners except the partner role "vendor" via the table PoPartner.
    Export/import data
    Export/import data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items. Changes to the export/import data of existing items are not possible.
    Texts
    Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText. Texts can only be replaced completely.
    Version Management
    You can make use of the Version Management facility via the table AllVersions.
    Return
    If the PO was changed successfully, the header and item tables are populated with the information from the PO.
    Return messages
    Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
    Restrictions
    With this function module, it is not possible to:
    Create subcontracting components (you can only use existing ones)
    Create configurations (you can only use existing ones)
    Change message records (table NAST) and additional message data (this data can only be determined via the message determination facility (Customizing))
    Attach documents to the purchase order
    Change foreign trade data
    Change service data
    Change or reexplode BOMs
    A firewall prevents the manipulation of data that is not changeable in Purchasing according to the business logic of the purchase order (e.g. PO number, vendor, etc.).
    PO items with an invoicing plan cannot be created or changed using the BAPIs
    In this connection, please refer to current information in Note 197958.
    To change addresses with numbers from Business Address Services (cantral address management), please use the function module BAPI_ADDRESSORG_CHANGE.
    To change variant configurations, please use the function module BAPI_UI_CHANGE. More information is available in the BAPI Explorer under the Logistics General node.
    In the case of changes that are to be made via the BAPI_PO_CHANGE, a firewall first checks whether the relevant fields are changeable. This approach follows that of the online transaction. Here it is not possible to change the vendor or the document type, for example.
    Example
    Example of changes made to a purchase order with:
    1. Change in header data
    2. Change in item
    3. Change in delivery schedule
    4. Change in account assignment
    5. Change in conditions
    6. Change in partners
    Parameter: PURCHASEORDER 4500049596
    Parameter: POHEADER
    PMNTTRMS = 0002
    PUR_GROUP = 002
    Parameter: POHEADERX
    PMNTTRMS = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    CONF_CTRL = 0001
    Parameter: POITEMX
    PO_ITEM = 00001
    PO_ITEMX = X
    CONF_CTRL =  X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    QUANTITY = 10.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELETE_IND =  X
    Parameter: POSCHEDULEX
    PO_ITEM =  00001
    SCHED_LINE =  0001
    PO_ITEMX =  X
    SCHED_LINEX =  X
    QUANTITY =  X
    PO_ITEM =  00001
    SCHED_LINE =  0003
    PO_ITEMX =  X
    SCHED_LINEX =  X
    DELETE_IND = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    GL_ACCOUNT = 0000400020
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    PO_ITEMX = X
    SERIAL_NOX = X
    GL_ACCOUNT = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_TYPE = RA02
    COND_VALUE = 2.110000000
    CURRENCY = %
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    ITM_NUMBERX = X
    COND_ST_NOX = X
    COND_TYPE = X
    COND_VALUE = X
    CURRENCY = X
    CHANGE_ID = X
    Parameter: POPARTNER
    PARTNERDESC =  GS
    LANGU =  EN
    BUSPARTNO = 0000001000
    Help in the Case of Problems
    1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
    2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
    3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
    Customer Enhancements
    The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
    EXIT_SAPL2012_001 (at start of BAPI)
    EXIT_SAPL2012_003 (at end of BAPI)
    The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
    EXIT_SAPL2012_002 (at start of BAPI)
    EXIT_SAPL2012_004 (at end of BAPI)
    These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
    There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
    Further Information
    1. Note 197958 contains up-to-date information on the purchase order BAPIs.
    2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
    3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
    4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
    5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
    Parameters
    PURCHASEORDER
    POHEADER
    POHEADERX
    POADDRVENDOR
    TESTRUN
    MEMORY_UNCOMPLETE
    MEMORY_COMPLETE
    POEXPIMPHEADER
    POEXPIMPHEADERX
    VERSIONS
    NO_MESSAGING
    NO_MESSAGE_REQ
    NO_AUTHORITY
    NO_PRICE_FROM_PO
    EXPHEADER
    EXPPOEXPIMPHEADER
    RETURN
    POITEM
    POITEMX
    POADDRDELIVERY
    POSCHEDULE
    POSCHEDULEX
    POACCOUNT
    POACCOUNTPROFITSEGMENT
    POACCOUNTX
    POCONDHEADER
    POCONDHEADERX
    POCOND
    POCONDX
    POLIMITS
    POCONTRACTLIMITS
    POSERVICES
    POSRVACCESSVALUES
    POSERVICESTEXT
    EXTENSIONIN
    EXTENSIONOUT
    POEXPIMPITEM
    POEXPIMPITEMX
    POTEXTHEADER
    POTEXTITEM
    ALLVERSIONS
    POPARTNER
    Exceptions
    Function Group
    2012
    </b>
    regards
    prabhu
    Message was edited by: Prabhu Peram

  • Logic to retrieve batch number in batch split scenario for a material

    Hi All!
    LIPS-CHARG gives the batch number for a material in normal scenario.But in batch split scenario for a material what should be the logic to retrieve the field batch number based on POSNR,VBELN and UECHA in LIPS.
    UECHA corresponds to higher level item of a batch.
    I had been given the following logic to do the same but it is not pulling any values inspite of a batch split available for the material.The logic is
    Select lips-charg (batch number) where  lips-posnr = lips-uecha ( higher level item batch)
    Please advise
    Regards
    Praneeth

    Hi Praneeth,
    The way LIPS records are in a batch split scenario is that let us say you have a delivery with one line item 00010. Now if this splits into two batch split items, then you will find in LIPS 3 records, one with line item 00010, one with 90001 and another with 90002. Both 90001 and 90002 will have a UECHA of 00010, whereas for 00010, this field will be blank. So the logic is to create two internal tables one where UECHA is blank and another where it is not blank and use it.
    SELECT * FROM LIPS
             INTO TABLE I_LIPS
            WHERE VBELN = P_VBLEN.
    I_LIPS_TEMP[] = I_LIPS[].
    DELETE I_LIPS_TEMP WHERE UECHA IS INITIAL.
    *-- This table will not have only the batch split items not the main items.
    LOOP AT I_LIPS WHERE UECHA IS INITIAL.
    *-- loop at the main items.
      IF I_LIPS-CHARG IS INITIAL.
    *-- batch is not there on the main item, see if it is there on any batch split items.
        READ TABLE I_LIPS_TEMP WITH KEY UECHA = I_LIPS-POSNR.
         do whatever
      ENDIF.
    ..... do whatever
    ENDLOOP.

  • While creating PO using BAPI_PO_CREATE1 vendor batch number is not comming.

    Hi Friends,
    I am using BAPI "    'BAPI_PO_CREATE1' to create PO in my report.
    The PO's are getting created but i the vendor batch number is not found in the PO.
    Where as i am passing the vendor batch number.
             bapimepoitem-vendrbatch = '2'.
              bapimepoitemx-vendrbatch = 'X'.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader          = bapimepoheader
          poheaderx         = bapimepoheaderx
          memory_uncomplete = 'X'
        IMPORTING
          exppurchaseorder  = v_po_number
        TABLES
          return            = bapiret2
          poitem            = bapimepoitem
          poitemx           = bapimepoitemx
          poschedule        = bapimeposchedule
          poschedulex       = bapimeposchedulx.
        Commit the transaction
      IF v_po_number NE space.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   = 'X'
          IMPORTING
            return = bapiret2_c.
      ENDIF.
    Please reply urgently.
    Thanks Regards,
    Sandipan Jena

    Hi
    My answer is pure assumption.
    Please check the following OSS notes
    Note 758810 - BAPI_PO_CHANGE vendor batch and batch not visible
    Note 1230268 - Field Vendor Batch never filled for PO BAPIs
    Please take help from BASIS and SAP, before implementing the OSS note
    Regards
    Madhan D

  • Best way to delete large number of records but not interfere with tlog backups on a schedule

    Ive inherited a system with multiple databases and there are db and tlog backups that run on schedules.  There is a list of tables that need a lot of records purged from them.  What would be a good approach to use for deleting the old records?
    Ive been digging through old posts, reading best practices etc, but still not sure the best way to attack it.
    Approach #1
    A one-time delete that did everything.  Delete all the old records, in batches of say 50,000 at a time.
    After each run through all the tables for that DB, execute a tlog backup.
    Approach #2
    Create a job that does a similar process as above, except dont loop.  Only do the batch once.  Have the job scheduled to start say on the half hour, assuming the tlog backups run every hour.
    Note:
    Some of these (well, most) are going to have relations on them.

    Hi shiftbit,
    According to your description, in my opinion, the type of this question is changed to discussion. It will be better and 
    more experts will focus on this issue and assist you. When delete large number of records from tables, you can use bulk deletions that it would not make the transaction log growing and runing out of disk space. You can
    take the table offline for maintenance, a complete reorganization is always best because it does the delete and places the table back into a pristine state. 
    For more information about deleting a large number of records without affecting the transaction log.
    http://www.virtualobjectives.com.au/sqlserver/deleting_records_from_a_large_table.htm
    Hope it can help.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Problem with uppercase character in batch number

    Hi all,
    I have the following case:
    Currently we have a batch number v10047 (character "v" in lowercase), we can see this batch in MMBE, MB52.
    We want to transfer posting this batch, but when entering its number, SAP auto change the "v" from lowercase to uppercase, then it says "Batch number does not exist"!
    I cannot display this batch in MSC3N either due to the same problem.
    How can we prevent SAP from changing lowercase to uppercase?
    Many thanks,
    Duc.

    Hi Duc.,
    Lowercase batches cannot be created by a dialog posting. If you check
    the domain CHARG using SE11 you can see that the flag for 'lowercase'
    is not set. This means that the batch entered will always be converted
    to uppercase when this batch is entered on a screen.
    The possibility is that you've transferred the batch info from IDOC or BAPI?
    You may refer to note [104626|https://websmp201.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=104626] and remove the batch stock using IDOC or BAPI again.
    Thanks and regards,
    Polly

  • How to reverse the Batch number which was enter wrongly during GRN posting

    Hi Folk,
    How to reverse the Batch number which was enter wrongly during GRN posting .
    Please revert.
    Thank you.

    You can either do a transfer posting and move quantity from this batch to another batch e.g. in MB1B with movement 311, or you cancel the entire material document using MBST transaction and redo your receipt correctly.
    Then you can flag the wrong batch for deletion in MSC2N.
    The batch itself gets deleted physically with the archiving transaction SARA object MM_SPSTOCK

  • Automatic deletion batch valuation type from PO after cancellation GR

    Hi, colleagues
    I need your guidance.
    The problem is:
    We have batch management with different valuation types.(valuation type is connected to batch) In mm03 valuation category is "X".
    Process:We make standart Purchase order, then MIGO where we put batch(with automatic valuation type for this batch) then we make cancellation of GR and try to make GR with another batch and valuation type. System gives mistake: m7043.
    As I understand, when we made GR firstly, system have written this  valuation type into PO and the following GR for this PO can be only with this valuation type.
    Have you any ideas how to make automatic! deletion of valuation type from PO after cancellation? Fields batch and valuation type in PO are hidden and users must not change it in PO.
    Mabe there are some notes or you can provide some other ideas?
    Thanks in advance
    Regards

    Pavlo Sydorenko wrote:
    As I understand, when we made GR firstly, system have written this  valuation type into PO and the following GR for this PO can be only with this valuation type.
    No. In standard, if you will do GR for batch number XXX, then system will not update the same batch number in PO (neither batch field nor valuation type field).
    At the time of making PO leave the batch and valuation type field as blank.
    Then check. I've checked the scenario. System is allowing to do GR with other batch number.

  • How to create Batch number manually

    Hi,
    We have already done 105 without batch number. But we need to create the batch number for the quantity which is already inwarded in 105.
    Please let me know  how this can be done.
    regards
    Suresh

    if your material is batch managed, then SAP forces you to enter a batch number (or assign an internal batch number) while doing the 105 movement.
    As this was not the case for you, I assume you missed to maintain the batch management indicator in material master.
    In this case you have to make current and previous period stock zero, then you can set the batch mangement indicator. Maybe you have to delete open documents too (SAP will tell you this in an error log when you try to set the indicator)

  • BAPI to update batch characteristics

    Hi,
    We have a requirement to update batch characteristics in SAP. I used the VB_BATCH_CHANGE to update the batch characteristics. Below is my code. After the call, I don't get any error from this BAPI/RFC, but batch chararacteristcis values are not updated. Any ideas?
    FUNCTION Z_VB_CHANGE_BATCH.
    *"*"Global Interface:
    *"  IMPORTING
    *"     VALUE(YMCHA) LIKE  MCHA STRUCTURE  MCHA
    *"     VALUE(YUPDMCHA) LIKE  UPDMCHA STRUCTURE  UPDMCHA OPTIONAL
    *"     VALUE(CHANGE_LGORT) LIKE  MCHB-LGORT OPTIONAL
    *"     VALUE(BYPASS_LOCK) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(BYPASS_POST) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(X_BNCOM) LIKE  BNCOM STRUCTURE  BNCOM OPTIONAL
    *"     VALUE(KZCLA) LIKE  T156-KZCLA OPTIONAL
    *"     VALUE(XKCFC) LIKE  T156-XKCFC OPTIONAL
    *"     VALUE(CLASS) LIKE  KLAH-CLASS OPTIONAL
    *"     VALUE(NO_CHECK_OF_QM_CHAR) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(REF_MATNR) LIKE  MCHA-MATNR OPTIONAL
    *"     VALUE(REF_CHARG) LIKE  MCHA-CHARG OPTIONAL
    *"     VALUE(REF_WERKS) LIKE  MCHA-WERKS OPTIONAL
    *"     VALUE(SET_OLD_BATCH) LIKE  AM07M-XSELK DEFAULT 'X'
    *"     VALUE(BUFFER_REFRESH) LIKE  AM07M-XSELK OPTIONAL
    *"     VALUE(NO_CHANGE_DOCUMENT) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(GRUND) LIKE  MSEG-GRUND DEFAULT SPACE
    *"     VALUE(NO_CFC_CALLS) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(BATCH_DEL_FLAGS) LIKE  BATCHDELFLG STRUCTURE  BATCHDELFLG
    *"       DEFAULT SPACE
    *"     VALUE(SEND_SYS) TYPE  LOGSYS DEFAULT SPACE
    *"  EXPORTING
    *"     VALUE(YMCHA) LIKE  MCHA STRUCTURE  MCHA
    *"     VALUE(EMKPF) LIKE  EMKPF STRUCTURE  EMKPF
    *"  TABLES
    *"      CHAR_OF_BATCH STRUCTURE  CLBATCH OPTIONAL
    *"      CHANGED_BATCH STRUCTURE  MCHA OPTIONAL
    *"      ZIMSEG STRUCTURE  IMSEG OPTIONAL
    *"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MATERIAL
    *"      NO_BATCH
    *"      NO_PLANT
    *"      MATERIAL_NOT_FOUND
    *"      PLANT_NOT_FOUND
    *"      LOCK_ON_MATERIAL
    *"      LOCK_ON_PLANT
    *"      LOCK_ON_BATCH
    *"      LOCK_SYSTEM_ERROR
    *"      NO_AUTHORITY
    *"      BATCH_NOT_EXIST
    *"      NO_CLASS
    *"      ERROR_IN_CLASSIFICATION
    *"      ERROR_IN_VALUATION_CHANGE
      DATA: F_TRANSACTION_ID           LIKE ARFCTID.
      CALL FUNCTION 'TRANSACTION_BEGIN'
        IMPORTING
          TRANSACTION_ID = F_TRANSACTION_ID.
      CALL FUNCTION 'VB_CHANGE_BATCH'
        EXPORTING
          YMCHA                     = YMCHA
          YUPDMCHA                  = YUPDMCHA
          CHANGE_LGORT              = CHANGE_LGORT
          BYPASS_LOCK               = BYPASS_LOCK
          BYPASS_POST               = BYPASS_POST
          X_BNCOM                   = X_BNCOM
          KZCLA                     = KZCLA
          XKCFC                     = XKCFC
          CLASS                     = CLASS
          NO_CHECK_OF_QM_CHAR       = NO_CHECK_OF_QM_CHAR
          REF_MATNR                 = REF_MATNR
          REF_CHARG                 = REF_CHARG
          REF_WERKS                 = REF_WERKS
          SET_OLD_BATCH             = SET_OLD_BATCH
          BUFFER_REFRESH            = BUFFER_REFRESH
          NO_CHANGE_DOCUMENT        = NO_CHANGE_DOCUMENT
          GRUND                     = GRUND
          NO_CFC_CALLS              = NO_CFC_CALLS
          BATCH_DEL_FLAGS           = BATCH_DEL_FLAGS
          SEND_SYS                  = SEND_SYS
        IMPORTING
          YMCHA                     = YMCHA
          EMKPF                     = EMKPF
        TABLES
          CHAR_OF_BATCH             = CHAR_OF_BATCH
          CHANGED_BATCH             = CHANGED_BATCH
          ZIMSEG                    = ZIMSEG
        EXCEPTIONS
          NO_MATERIAL               = 1
          NO_BATCH                  = 2
          NO_PLANT                  = 3
          MATERIAL_NOT_FOUND        = 4
          PLANT_NOT_FOUND           = 5
          LOCK_ON_MATERIAL          = 6
          LOCK_ON_PLANT             = 7
          LOCK_ON_BATCH             = 8
          LOCK_SYSTEM_ERROR         = 9
          NO_AUTHORITY              = 10
          BATCH_NOT_EXIST           = 11
          NO_CLASS                  = 12
          ERROR_IN_CLASSIFICATION   = 13
          ERROR_IN_VALUATION_CHANGE = 14
          OTHERS                    = 15.
      IF SY-SUBRC IS INITIAL.
        CALL FUNCTION 'TRANSACTION_END'
          EXPORTING
            TRANSACTION_ID = F_TRANSACTION_ID
          EXCEPTIONS
            OTHERS         = 1.
      ELSE.
        CALL FUNCTION 'BALW_BAPIRETURN_GET2'
          EXPORTING
            TYPE   = SY-MSGTY
            CL     = SY-MSGID
            NUMBER = SY-MSGNO
            PAR1   = SY-MSGV1
            PAR2   = SY-MSGV2
            PAR3   = SY-MSGV3
            PAR4   = SY-MSGV4
          IMPORTING
            RETURN = RETURN.
        APPEND RETURN.
        CALL FUNCTION 'TRANSACTION_ABORT'
          EXPORTING
            TRANSACTION_ID = F_TRANSACTION_ID
          EXCEPTIONS
            OTHERS         = 1.
        EXIT.
      ENDIF.
    ENDFUNCTION.
    Thanks,
    Sara

    Hi Subramani,
    Thanks for your response.
    BAPI_BATCH_CREATE will not work for us, because we are trying to update batch, not creating new batch.
    Also, The function TRANSACTION_END, I am calling in the code is responsible for committing the transaction.
    Thanks,
    Sara

  • BAPI to delete the particluar file type DIR.

    Hi all,
    how can I delete single files of a Document Info Record. Only found BAPI to delete the particluar file type DIR.
    I have done using through
    BAPI_DOCUMENT_GETDETAIL2
    BAPI_DOCUMENT_CHANGE2
    Is it possible that we can delete again a file from same document number.
    I tried to delete again document against same document number but could not able to do so.
    Add. INFO:
    The Upload is done in the Document Management System (/cv01-2-3-4n) by a BSP application / BAPI_DOC_CREATE and CHECKIN .
    Thanks in advance,
    Abhishek

    Thanks Niel for the script, unfortunately I am too ignorant about running these on my own, I did save it in my user script library, but I would need instructions to run it. I would be really grateful.
    I did try making up my own workflow using the given actions in Automator, the first action was to 'find specific files in finder' ending with .zip and .rar and then choosing another action which 'moves selected files to trash'. Unfortunately it ended up running only if I specify the path to the specific .zip file, which defeats the purpose. Any suggestions on the proposed workflow? Thanks in advance.

  • Drawbacks on program: Delete Personnel Number (RPUDELPN)

    Hi, Experts,
    I am using this program "Delete Personnel Number (RPUDELPN)" to delete personnel data. It works fine in Development environment. But it fails to work if T000-CCCATEGORY = "P" (production client).
    I am thinking of copying a program and comment the following codes, so the program can go through in production.
    IF t000-cccategory EQ 'P'.
    MESSAGE e637.
    ENDIF.
    However, my question is: (1) is there any drawbacks on running this program in production? (2) Why this standard program set this error message? any special reasons?

    Hi Suresh,
    Thanks for your reply.
    Since I have to delete the personnel in batches, while PU00 can only delete one single personnel. So I think I still have to use RPUDELPN.

  • BAPI for deletion of employee from work center T Code IR02

    Any one can give me a BAPI to delete position/person from work center ?
    T Code IR02
    IR02 -> HRMS - > Expand - > select person - > delete.
    Thank you
    Mrudang

    Thanks for your fast reply!
    I have looked to both functions before. Beside that they are both not remote enabled (which is not such a big problem as I could copy them or build a custom BAPI around them) I'm not quite sure how they could solve my problem.
    If I got it right, I would first use CR_CAPACITIES_OF_WORKCENTER to get the KAPID and using it as input for CLOI_WC_CAPACITY_READ. But I have problems to understand the output of CLOI_WC_CAPACITY_READ. The data type of the capacity is a float ( FLTP ) and the number seems to be to big, eg. 9.800000000000000E+01= 98h for one day.
    Could you try to explain your solution once again?
    Thanks,
    Simon

  • BAPI's for Batch Split and Update Picking Quantity

    HI All,
    I have the delivery details(along with batch number, MATNR etc), now i need to split the batch for picking.
    and then i need to sum the batch quantity and update this total quantity to the picking quantity and then update the delivery.
    I tried to use this BAPI function module BAPI_INB_DELIVERY_CHANGE.
    But i am unable to find the picking quantity field in this BAPI.
    Any idea about how to split the batches using BAPI's??
    and how to update the picking quantity using BAPI's?
    Thanks in advance.
    Vijay

    Hi,
    Can you share the solution for the above issue/
    Regards

Maybe you are looking for

  • Kernel Panic Every Boot After 10.6.8 Update (Inc Combo)

    Will boot in safe mode. Can someone let me know what is causing this please? Log Below: Sun Jan 26 13:44:58 2014 panic(cpu 0 caller 0x2abf6a): Kernel trap at 0x5839521c, type 14=page fault, registers: CR0: 0x8001003b, CR2: 0x00000000, CR3: 0x00100000

  • My dad deleted quicktime!

    hey my dad deleted quicktime and now my itunes wont open and it says,"itunes required files are missing". also my dad tried the system restore and that didnt work either. i tried deleting itune and reinstalling it but still wont open. i dont know wha

  • Self signing applets

    I am writing an applet at the moment, it involves the applet using the clipboard therefore for this to be allowed the applet needs signing. I don't want to pay for this facility as the applet will be none profit making. I believe you can sign your ow

  • ICal Alarm: None - Corrupted Information

    When I'm creating new iCal events and go to set an Alarm, I'm now seeing the first entry in my list of previous options: None - Corrupted Information !http://img.skitch.com/20100107-jucxgwdwhyt21qdu11nk6rd284.png! It appears others have seen this pro

  • Discoverer worksheet: working with data between multiple sheets

    Hi All, Is there a way to use data between multiple discoverer worksheets? What I am trying to do is combine data from different worksheets and display that data in another sheet. I believe it is not possible in discoverer at the moment (I might be w