Deletion of Order(Suborder,WIP order) and notification number

Hi,
Is there any function module or BAPI to delete the WIP Order (IW32) and Suborder(IW36) and Notifcation number(IW22).
Please let me know!!!!
Thanks for ur time,
Sowmmya.B

REPORT  ZWW_BAPI.
DATA t_meth TYPE TABLE OF bapi_alm_order_method.
**Internal table for Operation (BAPI)
DATA t_oper TYPE TABLE OF bapi_alm_order_operation.
DATA t_comp TYPE TABLE OF bapi_alm_order_component.
**Internal Table for Opertaions UP (BAPI)
DATA t_comp_up TYPE TABLE OF bapi_alm_order_component_up.
**Internal table for BAPI Return code
DATA t_ret TYPE TABLE OF bapiret2.
***WORK AREA DECLARATIONS
**Work Area for Hedaer
DATA:wa_header TYPE caufvdb,
wa_meth TYPE bapi_alm_order_method,
wa_op TYPE afvgb,
wa_comp TYPE resbb,
wa_comp1 TYPE bapi_alm_order_component,
wa_comp_up TYPE bapi_alm_order_component_up,
wa_oper TYPE bapi_alm_order_operation.
PARAMETERS:TEST.
****Fill Method Internal table
CLEAR wa_meth.
wa_meth-method = 'SAVE'.
*wa_meth-method = 'DELETE'.
APPEND wa_meth TO t_meth.
wa_meth-refnumber = sy-tabix.
wa_meth-objecttype = 'COMPONENT'.
wa_meth-method = 'DELETE'.
wa_meth-objectkey(12) = '000004471304'.
*wa_meth-objectkey+12(4) = '0010'.
*wa_meth-objectkey+16(4) = '0010'.
APPEND wa_meth TO t_meth.
**Component Internal table
wa_comp1-reserv_no = '0000653255'.
wa_comp1-res_item = '0003'.
wa_comp1-activity = '0010'.
*wa_comp1-item_number = '0010'.
*wa_comp1-special_stock = 'B'.
*wa_comp1-requirement_quantity = '15'.
*wa_comp1-stge_loc = '0001'.
*wa_comp1-backflush = 'X'.
APPEND wa_comp1 TO t_comp.
**Component Update Internal table
*wa_comp_up-special_stock = 'X'.
*wa_comp_up-backflush = 'X'.
*wa_comp_up-requirement_quantity = 'X'.
*wa_comp_up-stge_loc = 'X'.
*APPEND wa_comp_up TO t_comp_up.
**Call Bapi
BREAK-POINT.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = t_meth
it_component = t_comp
*it_component_up = t_comp_up
return = t_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Similar Messages

  • MAM RFC Error with Order and Notification SyncBo's

    Hi everyone, can you please advise on a problem I'm having when downloading 2-WAY SYNCBO MAM objects.
    I am able to download all syncbo's to my client with my username.  This includes Orders and Notifications.
    But.....whenever I use a different username only some of the SyncBO's come over.  I am missing MAM25_001 and MAM25_010 data.  Here is what I have done so far:
    -  Ensured username had exactly the same SAP security profile as I do, including the MI authorization objects.
    -  Ensured username was configured the same in the IMG.
    -  Re-generated and re-replicated my SyncBo's.
    -  Checked table MEREP_10100.  It showed no Order or Notification data.
    It does not make sense why everything works for me, but not for other usernames on my network.
    Here is the RFC error I get from the Middleware using MEREP_MON:
    RFC system Error:
    Z_MEREP_GEN_S01_____MAM25_010 has finished for run number 0000019624 and runtime counter 17.
    Please help.  Thanks.

    Hi Alex,
    Could you please reply the SP levels of the MI Client, MI server and MAM application?
    Also is your client device a PDA?
    You could try out few things ( not sure whether they will help)
    1. Sync several times (may 6 times) for the other users.
    2. Remove the MAM application for the one of the other usernames from the webconsole(which is not able get the data) and reassign it.
    3. Try the username on some other device.
    All the best!!!
    Regards,
    Rahul

  • Table for satatus, CS, service order and notification

    There is a field of status at the CS notifications. The tcode for customizing this field is OIBS but in which table can I find the related data? I'm also looking for the other tables of CS, service order and notification.
    Edited by: Yasar Demircan on Jan 27, 2010 10:06 PM

    Hi,
    You can refer the table JEST, TJ30, TJ30T for object status and user status

  • Concept of historical order and notification

    Dear Experts,
    Kindly explain the concept of historical orders and notifications.
    Is there any customizing settings?
    Beast Regards,
    Tushar

    Hi,
    Historical orders which are completed within the current Financial year or the orders which completed within the particular time for which equipment history will be maintained.
    Orders will be created in IW61 without any goods movement & financial posting to maintain the history of that.
    Regards,
    Maheswaran.

  • Delete planned order and pr's

    Hi, pls advise how to delete system generated (mrp) planned orders and pr's? incase the sales order is cancelled, we need to cancel those planned order or pr's generated earlier. pls advise how to delete the same.

    Hi,
    If the supply proposals are not firmed, then the next MRP run at plant level will clear all the planned orders / purchase requisitions which are not needed.
    Planning mode with 1 should be more than enough to take care of that.
    Regards,
    Vivek

  • Set Service order and Notification to 'Technical Complete.

    Need to set service order and notificatin to teco. Use below logic and it works fine for Service Orders but
    it doesn't set the Notification to NOCO.
    Can anybody please help?
    Thank you very much
    Juergen
    lit_methods-refnumber         ='000001'.
      lit_methods-objecttype        = 'HEADER'.
      lit_methods-method            = 'TECHNICALCOMPLETE'.
      lit_methods-objectkey         = g_order.
      APPEND lit_methods. CLEAR lit_methods.
      lit_methods-refnumber         = '000001'.
      lit_methods-objecttype        = ' '.
      lit_methods-method            = 'SAVE'.
      lit_methods-objectkey         = g_order.
      APPEND lit_methods. CLEAR lit_methods.
      lit_header-orderid        = g_Order.
      lit_header-NOTIF_NO       = viqmel-qmnum.
      lit_header-TECO_REF_DATE  = sy-datum.
      lit_header-TECO_REF_TIME  = sy-uzeit.
      APPEND lit_header.
       lit_header_up-orderid     = 'X'.
       lit_header_up-NOTIF_NO    = 'X'.
      lit_header_up-FINISH_DATE = 'X'.
      lit_header_up-BASIC_FIN   = 'X'.
      APPEND  lit_header_up.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
          TABLES
             it_methods         = lit_methods
             IT_HEADER          = lit_header
             IT_HEADER_UP       = lit_header_up
             return             = G_return.

    Hi,
    There is no diffrerence between service order and service order notification.
    Its better if we can say - IW51 is for Service Order Notification
    Generally when request is initiated by the customer or distributor to the retailer then the retailer will create a service order with the detail further process.
    Regarding IW31 no proper idea. I have worked in SO notification only. 
    Regards.
    Abinash.

  • Work Order and Notification

    Hello,
    am a bit new with PM process, can anyone tell me how to do a work order with notification on it and confirmation will be made to the work order? please guide me step by step which is first to do and the transaction for each?
    thanks

    hi
    there is no separate confirmation for notifications, you can close the notification from IW22, or when you close order system willclose notifiaction also
    Choose Logistics ® Customer service ® Service processing or Logistics ® Plant maintenance ® Maintenance processing.
    You reach service processing or maintenance processing.
    Choose Orders ® Change.
    Enter the order number and call up the header data screen or the operation overview.
    For information on how to enter technical findings when completing the order, see Entering Technical Findings.
    Choose Order ® Functions ® Complete ® Complete (techn.).
    The dialog box Complete is displayed.
    Check the information in the dialog box and change it where necessary. If you want to complete the notifications contained in the object list at the same time, choose Complete notifications.
    Choose Complete.
    The system completes the order technically, assigns the relevant status to it, and saves it.
    It completes all notifications with the appropriate status. If assigned notifications cannot be completed, a message is displayed by the system informing you of this.
    Process these notifications accordingly and then complete them.
    You can do this either directly with the change function for notifications, or from the order.
    As before, call up the order using the change function, and choose
    Order ® Functions ® Complete ® Complete notifications
    Once you save the order, the outstanding notifications are also completed.
    -ashok

  • Urgent Request! FM to link deleted sales order and accounting doc

    Hi there,
    I have this scenario:
    -I create a sales order and make a certain amount of downpayment.
    -At the save of the order, an accounting document is created in BSEG table with reference to this order (BSEG-VBEL2).
    -I delete the order that I created in step 1.
    -The accounting document still exists in BSEG.
    Question:
    A direct select on BSEG with vbel2, takes a very long time.
    ie. SELECT SINGLE belnr gjahr wrbtr pswsl saknr FROM bseg
        INTO CORRESPONDING FIELDS OF ls_bseg
        WHERE vbel2 EQ ls_event_sale_del-vbeln.        "#EC CI_NOFIELD
    Can anyone suggest a way to improve the performance, or does anyone know of a Fuction Module that I can use?
    Thanks,
    Deepti

    Arghhhh! You are right.
    I would do it like this. Find the document in the BSEG table. Then check it in the BKPF table - there are headers for posting documents. Write down the ATWYP field's value and check the AWKEY value (probably it will be the Order's number).
    Then you can search for the posting document in the BKPF table using the AWTYP and AWKEY fields. There is an index on these fields so it should go quite fast.
    Rgds
    Mat

  • Delete Sales order and Purchase Order

    Hello Experts,
    Scenario 1: I would like to delete a Purchase Order using PORDCH03 idoc. I tried passing 'X', 'Y' and also 'D' to the deletion indicator at the header level, but the purchase order is not getting deleted. Can you let me know how can I delete an purchase order using IDOC.
    Scenario 2: I would also like to delete a Sales order using ORDER05? Is this possible? I mean deleting Sales order. I do not want to update the reason for rejection, but I want to completly get rid of the sales order from the database.
    Appreciate your help.
    Thanks,
    Suresh Ganti

    Hello Rob,
    I am able to set the deletion indicator for the purchase order and it works fine. But for Sales orders we are using ORDERS05 and want to delete the Sales order. I was able to delete the line item, but not the whole order.
    As you know we can delete the whole order using the BAPI.
    sd_head_x_ls-updateflag = 'D'.
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
           EXPORTING
                salesdocument         = vbeln_lv
                order_header_inx      = sd_head_x_ls.
    I want to achieve the same functionality using ORDERS05 IDOC.
    Thanks,
    Suresh Ganti

  • FM for linking deleted sales order and accounting document

    Hi there,
    I have this scenario:
    -I create a sales order and make a certain amount of downpayment.
    -At the save of the order, an accounting document is created in BSEG table with reference to this order (BSEG-VBEL2).
    -I delete the order that I created in step 1.
    -The accounting document still exists in BSEG.
    Question:
    A direct select on BSEG with vbel2, takes a very long time.
    Can anyone suggest a way to improve the performance, or does anyone know of a Fuction Module that I can use?
    Thanks,
    Deepti

    Hi,
    Con't you use alternative table, Example insted BSEG use BSID and create a index on VBEL2 to improve the performance..
    Regards,
    Srinivasa M

  • Customer Order and confirm number on idoc invoic02

    Goodmorning,
    in idoc invoic02 at line of invoice is present a field that give:
    -customer order number and data of creation
    -data of creation of order confirm about customer order
    Thanks
    Fabrizio T.

    Hi
    go to header-> output in the sales order and u will find the idoc no there
    Ranga

  • Urgent: Link between Sales Order and Shipment Number In Extractor

    Hello Gurus,
    In my project we are using Extractors
    2lis_08 , 2lis_11, 2lis_12, 2lis_13....
    now the main problem was in the reporting client want
    as below
    Shipment no      SalesOrder No    Price
    Can any one help me how to link the SalesOrder Number and Shipment Number by using the above extractors..
    Either the development must be do on backend are at front end any thing which helps...
    please through some light...
    Thanks In advance
    Sandy

    Hello all,
    VBAK-VBELN=LIPS-VGBEL
    LIPS-VBELN=LIKP-VBELN=VTTP-VBELN
    VTTP-TKNUM(Shipment number)
    Finally
    LIPS-VGBEL(SD Number)
    LIPS-VBELN=VTTP-VBELN
               VTTP-TKNUM
    Hope it help others!!!

  • Link between Material Document and Notification Number

    Hi
    In table QMEL we find the material document that is generated in correspond to Inspection Lot not for Notification((Goods Movement - Material Document).
    Our problem is that we didn't find the material document(Goods Movement) generated after notification.
    As we have done the cusmomization for posting the scrap in the notification and the Material Document is generated for this posting.
    In QM03 we can view the Material Document generated.
    Pls help!!!

    Dear Kumar,
    Thanks for reply but ,
    In this table the material document is corresponding to Inspection Lot not for Notification Number.
    e.g
    InspLot 40000000067( Material Document - 5000000083)
    . QM Notif. 300000062
    .. Goods Movement 49000030282008
    .. Goods Movement 49000030302008
    In table VIQMEL if we enter QM notification No.300000062 we will find InspLot 40000000067 and  Material Document - 5000000083 but not,
    .. Goods Movement 49000030282008
    .. Goods Movement 49000030302008
    I need table where we can find these material documents w.r.t QM notification number.
    Regards
    Purnesh/Anil.

  • Create Order and Notification

    Hi,
    is there a function module where i can create a notification and a order at the same time. (SAP PM)
    regards

    Hi Danny.
    I would like to suggest,
    BAPI_ISUSMORDER_CREATEMULTIPLE - Create Service Orders
    BAPI_ALM_CONF_CREATE - Create confirmation for maintenance/service order
    WTY04_CREATE_SERVICE_ORDER - Create Service order via function module.
    Hope That's Usefull.
    Good Luck & Regards.
    Harsh Dave

  • Creating an Order and Notification Together in IW31 using BADI

    Dear Experts,
    How to create Notification while Creating Order in IW31 using BADI.
    or
    Userexit to stop creation of Notification based on condition in IW31.
    Regards,
    Ramesh.T

    This you should be able to achieve through userExit IWO10009 (Checks on Order Save). You can write BDC coding for notification creation and put your conditions.
    KJogeswaraRao

Maybe you are looking for

  • Using only one method in session bean to create web service

    Hi all, I hhave a scenario where i am inserting and retrieving data from dict table using web service. For this i have created a session bean and a wrapper class. The session bean has two methods: insertRecords(), and viewRec(). so while creating a w

  • How to resolve the z table activation error?

    I have a Z table. Added a couple of fields and activated it. it was fine. then changed one of the fields as a key field and activated it. it took a long time even though there is no data and terminated. I removed the key indicator and tried activatin

  • New Satellite C50-A264 Laptop way too slow.

    I got this Satellite C50-A254 few weeks ago,i didnt touch it alot. I only used this laptop 2-3 times but its just terribly slow. Even if i launched Google Chrome,it constantly stopps responding and i have no idea why because it was too slow from the

  • Hide/Show the items in form

    Hi all, I am having one form in oracle apex3.1 and having some form elements like below. ================================ NAme : textbox job : radio botton with (freshor,experieced) year of experience : tx if i select the experienced from job radio ,

  • Convert SEM-BPS Web Templates to PDF

    Hi everyone, one of my clients is requesting to convert all his SEM-BPS 3.5 Web Templates to PDF files dynamically. I've already make a research on SDN an found several post about converting ABAP objects to PDF format (like <a href="/people/sap.user7