IW31,IW32 Exit / BAdI to update Oprtn's Work center based on Header WrkCtr

SAP 46C
I am looking for a way to ensure that the first operation on a Maintenance Order has the same work center as the Header of the Operation. I am not seeing a BAdI that has the export parameters that allows update of information. Infact I did not see one in ECC6 either.
Thanks
Hari

Hi Dude,
Code to find out the BADI or exit..
REPORT  ZBADI_FINDING.
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
TSTCT.
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
PARAMETERS : P_TCODE LIKE TSTC-TCODE,
P_PGMNA LIKE TSTC-PGMNA .
DATA WA_TADIR TYPE TADIR.
START-OF-SELECTION.
IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'PROG'
AND OBJ_NAME = TSTC-PGMNA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM TRDIR
WHERE NAME = TSTC-PGMNA.
IF TRDIR-SUBC EQ 'F'.
SELECT SINGLE * FROM TFDIR
WHERE PNAME = TSTC-PGMNA.
SELECT SINGLE * FROM ENLFDIR
WHERE FUNCNAME = TFDIR-FUNCNAME.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'FUGR'
AND OBJ_NAME EQ ENLFDIR-AREA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
ENDIF.
ENDIF.
SELECT * FROM TADIR INTO TABLE JTAB
WHERE PGMID = 'R3TR'
AND OBJECT IN ('SMOD', 'SXSD')
AND DEVCLASS = V_DEVCLASS.
SELECT SINGLE * FROM TSTCT
WHERE SPRSL EQ SY-LANGU
AND TCODE EQ P_TCODE.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) P_TCODE,
45(50) TSTCT-TTEXT.
SKIP.
IF NOT JTAB[] IS INITIAL.
WRITE:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
*Sorting the internal Table
SORT JTAB BY OBJECT.
DATA : WF_TXT(60) TYPE C,
WF_SMOD TYPE I ,
WF_BADI TYPE I ,
WF_OBJECT2(30) TYPE C.
CLEAR : WF_SMOD, WF_BADI , WF_OBJECT2.
*Get the total SMOD.
LOOP AT JTAB INTO WA_TADIR.
AT FIRST.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
ENDAT.
CLEAR WF_TXT.
AT NEW OBJECT.
IF WA_TADIR-OBJECT = 'SMOD'.
WF_OBJECT2 = 'Enhancement' .
ELSEIF WA_TADIR-OBJECT = 'SXSD'.
WF_OBJECT2 = ' Business Add-in'.
ENDIF.
FORMAT COLOR COL_GROUP INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 WF_OBJECT2,
105 SY-VLINE.
ENDAT.
CASE WA_TADIR-OBJECT.
WHEN 'SMOD'.
WF_SMOD = WF_SMOD + 1.
SELECT SINGLE MODTEXT INTO WF_TXT
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = WA_TADIR-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WHEN 'SXSD'.
*For BADis
WF_BADI = WF_BADI + 1 .
SELECT SINGLE TEXT INTO WF_TXT
FROM SXS_ATTRT
WHERE SPRSL = SY-LANGU
AND EXIT_NAME = WA_TADIR-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ENDCASE.
WRITE:/1 SY-VLINE,
2 WA_TADIR-OBJ_NAME HOTSPOT ON,
41 SY-VLINE ,
42 WF_TXT,
105 SY-VLINE.
AT END OF OBJECT.
WRITE : /(105) SY-ULINE.
ENDAT.
ENDLOOP.
WRITE:/(105) SY-ULINE.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , WF_SMOD.
WRITE:/ 'No.of BADis:' , WF_BADI.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.
AT LINE-SELECTION.
DATA : WF_OBJECT TYPE TADIR-OBJECT.
CLEAR WF_OBJECT.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
READ TABLE JTAB WITH KEY OBJ_NAME = SY-LISEL+1(20).
MOVE JTAB-OBJECT TO WF_OBJECT.
CASE WF_OBJECT.
WHEN 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
WHEN 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
ENDCASE.
DO 2 TIMES.
ENDDO. 

Similar Messages

  • EXIT/BADI for ME31L and ME31K for changing Incoterms in header and item

    Hi All,
    I am facing an issue in ME31L,ME32L transactions.
    In vendor master , incoterm is maintained .So whenever a PO is created with particular vendor, the same incoterm(EKKO-INCO1& EKKO-INCO2) will get defaulted into PO as well. Now i need to change the incoterms2 on basis of some logic, but i was not able to find the correct BADI/EXIT to do these changes.
    This relation can be seen in vendor master partner profile.
    SO if I create a PO/SA with a vendor and goods supplier is different the incoterm from vendor is getting defaulted there, not from goods supplier .
    So am looking for any EXIT/BADI which will enable changing of Incoterms2 based on the incoterms1 value.
    Thanking you in advance.
    satheesh

    HI Sharma,
    Thank you for your response.
    This particular BADI ME_PURCHDOC_POSTED is getting triggered when i am creating a SA in ME31L but when I am changing the values in the BADI that is not getting updated on the screen.
    thanks,
    satheesh

  • User exit/Badi for changing operation work center based on service product

    Hi,
    I have an requirement to change the operation work center based on the service product in IW31/IW32 transaction. I am using the BAdi 'IM_SM_BADI_READT399A' for changing the main work center. It changes all the operation work centers except the first one. But I need to change it all the operations.
    Thanks in Advance.

    I am using the enhancement spot 'IWO1_TL_INTEGRATION2' for changing the first operation work center

  • Exit/Badi for Updating Actual Start Date in CJ20N

    Dear Experts,
    In transaction CJ20N, under Dates Tab for a particular Activity, there is one field viz. Act i.e. Actual start: Execution (date). My requirement is to display PR date in this field. Besides this, Actual finish: Execution (date) should also get updated depending on the Duration field.
    I searched all the exits in the package 'CN' and 'CORU', but none of them seems to be useful
    Please suggest a user exit/BAdI which could help resolve this.
    Thanks in advance

    Hi,
    That BADI would trigger when you change any thing on the WBS and hit save.
    WORKORDER_UPDATE-for network
    Regards,
    Himanshu

  • User Exit / BAdI to update the External Patient ID.

    Hello SAPients!
    I've been searching everywhere and I can't find a BAdI or User Exit to automatically update the External Patient Identification Number (NPAT-EXTNR). I've just found BAdIs to validate the correctness of the field but not a way to automatically change it. Anyone has done this before?
    Thanks!

    Solved on my own. I found the User Exit NEXTNR00.

  • USER EXIT / BADI TO UPDATE BSEG-PRCTR ON LINE ITEM

    Hi,
    I am trying to copy the contents of BSEG-PRCTR from one line item to another.
    I want to update Profit center field automatically through some exit / BADI,
    Is there any BADI/ EXIT is available in system through which i can easliy change
    line Item details.
    If you know anything then please reply me.
    Thanks in Advance....

    Hi,
    I am trying to copy the contents of BSEG-PRCTR from one line item to another.
    I want to update Profit center field automatically through some exit / BADI,
    Is there any BADI/ EXIT is available in system through which i can easliy change
    line Item details.
    If you know anything then please reply me.
    Thanks in Advance....

  • User Exit / BAdI to update the pricing conditions of the Purchase Order

    Hello SAPients,
    This is my requirement:
    "Copy the Pricing Conditions from the Shipment Cost Document (VI01 / VI02) to the automatically generated Purchase Order".
    I'm using the enhancement V54U0002 (Function Module EXIT_SAPLV54U_002) to EXPORT  the values of the Pricing Conditions to memory and I have used the enhancement MM06E005 ( FM EXIT_SAPMM06E_006, 007, 012, 013, 014, 016, and 017) to IMPORT the values from memory and store them in TKOMV. But, when the PO is generated the values don't stay, they are always changed with the standard PBXX pricing conditions.
    My question is: Does anyone know the User Exit / BAdI that I can use to change the Pricing Conditions of the Purchase Order?
    <<removed_by_moderator>>
    Thanks!
    Edited by: Vijay Babu Dudla on Jan 14, 2009 11:08 PM

    >
    kartik tarla wrote:
    > check this badi
    > ME_PROCESS_PO_CUST
    >
    > and the following user exit
    > Goto-> include RV61AFZA then search for
    > USEREXIT_PRICING_RULE see if its helpful to u.
    Hello Kartik / SAPients,
    I tried with ME_PROCESS_PO_CUST but didn't work. The system doesn't execute that code. Any other idea would be greatly appreciated.
    Thanks.

  • Mass update/change of Work center

    Hi
    I need to change the 'Factory calendar' to 'FO' and 'Set up Formula' to blank for about 500 work centers.
    Is there any transaction avaliable to update new values for work centers, in mass change ?
    Please help me.

    Dear,
    Please try with  CA85 or go with BDC.
    Please refer this links as reference ,
    [Mass Replace Work Center |http://www.sap-img.com/production/guide-to-mass-replace-work-center.htm]
    Regards,
    R.Brahmankar

  • IW51-52 - Updating fields Main work center and Maintenance plant

    Hello Experts.
    I Have a task which includes recieving a file and using the data to create new notifications. I need to update the fields above (Data elements GEWRK & SWERK ) but i can't find the right BAPI or Function which will do this work for me.
    Thanks for your help.
    Motty Gal.

    Hi,
      Thanks for your response. Actually after doing further R&D, I saw that work_ctr requires the object key of the work center. I fetched the OBJECTKEY from CRHD & passed. It automatically updated both work center & plant associated.
        Awarding you points for your help.
    Thanks buddy!!!

  • IW31 - User Exit / BADI for changing data in Component's Order.

    Hi gurus,
    I need to update the field WEMPF in the order components during the Order Creation (Tx IW31).
    Is there any User Exit or Badi I can use?
    Thanks in advance !!

    At WO10009 User Exit...we can use this FM:
    CO_BC_RESBD_OF_ORDER_GET -> Get RESB internal table.
    CO_BT_RESB_UPDATE -> Update RESB table.
    Althought during creation (IW31) when the order numer is temporal ($$$$$$$$$$$1), this FM works great, cause it reads from memory, not from database.
    Regards,

  • Assign Investment program Position for IW31 through exit/BADI

    Hi
    My requirement is, I've to assign investment program details to Maintainence order (IW31) in creation mode through enhancement. I am able to do so in change mode using the FM "AIPP_ALLOCATE_POSITION_DARK", but when I use the same FM in creation mode it is throughing "Update Termination " error.
    Please let me know is there  any BADI/User Exit/Enhancement Point to achieve the same.
    Regards,
    Chandu
    Edited by: Poorna Chandrasekhar on Nov 13, 2009 11:10 AM

    I've created enhancement point in the FM CO_ZV_ORDER_POST

  • User exit / BADI for updating STO when change in subcontracting PO

    Hi
    The requirement is to update the STO (stock transfer order ) when their any change in subcontracting PO at item level. Is there any exit or BADI available where STO quantity and delivery date will be updated after any change in PO at item level ?
    Thanks
    Manas

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • User exit/BADI for updating Purchase Order Item

    I am would like to update the purchase order item - specifically field EKPO-REPOS in a user exit or BADI. I haven't been able to find one that allows you to update the purchase order item.
    Any input would be appreciated.
    Derick

    You can use BADI ME_PROCESS_PO_CUST for you requirement
    Method PROCESS_ITEM
    * Retrieve item data.
        CALL METHOD im_item->get_data
          RECEIVING
            re_data = v_data_item.
    Do you validations and changes here
    *update changes
    CALL METHOD im_item->set_data( v_data_item ).

  • User exit/BADI for updating custom table in MB1B transaction-

    Dear All,
    When performing a material to material conversion in MB1B transaction for  batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
    The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
    Kindly suggest a user exit/BAIi available for updating the same in the custom table.
    Regards,
    Deepak

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • Exit/BADI in KB21N

    Hello Expert,
    I am looking for a exit / BADI in KB21N once the document is created. My requirement is to update a Z table with the document number created during posting.
    So I require a exit/badi to update the Z Table with the document number created.
    Could you please help in this.
    Best Regards,
    Vasanth M

    Hi,
    You can try validations/substitutions. I'm not sure if it's possible, but you can check Note 392273 - When is validation/substitution called? for futher information
    Regards
    Eduardo
    PD: I think that Note 680390 - Manual actual postings: validation is so interesting for you
    Edited by: E_Hinojosa on Oct 8, 2010 1:08 PM

Maybe you are looking for