BADI for IW31/32 (work order)

Hi,
I have to find BADI for IW31/32 (work order). The requirement is to update delivery address on automatic PR created from non-stock items of the work order.
Please suggest. Points will be rewarded for appropriate suggestions.
Thanks,
Parvati

Hi
Execute the below program . It will give you all exits and badis for a transaction.
You can excute this by giving IW31 in the selection screen and you will get the badis and exits related to it.
REPORT Z_FIND_BADI .
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

  • For the historical work order is there any bapi

    i am doing with creation of historical work order where the transaction is iw61. so, is there any bapi for this? can u just suggest me which method is preferable for the historical work orders?

    u can go check using whether bapi exists using transaction code bdbg
    Regards
    Janapathi

  • Exit or routine or BADI for save the sales order

    Exit or routine or BADI for save the sales order.
    Please give your input Asap.
    Thanks & regards,
    Vinayak More.

    Hi Vinayak,
    please go through the steps and u will be able to find BADI of any transaction.
    &*************Reward point if helpful**************&
    BADI Info:
    Method 1:
    Go to Tranaction: SE24.
    open class CL_EXITHANDLER
    Open the method " GetInstance"
    Put Break point in the statement
    call method cl_exithandler=>get_class_name_by_interface
    Now execute the Transaction which you need teh BDC it will automatically stops at the the method. In debugging mode double click on the variable: " exit_name" It will return the BADI Name.
    Method 2:
    find the Package name and go to the tranaction SE84.
    Enter the package name
    inside the left navaigaiton panel there is one option " Enhancements" click on this enhancement and then enter the package name and execute it. you will get hte number of enhancement.

  • User Exit or BADI for IW31

    I would like to populate the cost center in work order to PR. Is there any user exit or BADI ? I had try IWO10009, it doesn't work.
    Please help on this. Thanks.

    Hi all
    I am from FICO but I have quite the same issue. I would really appreciate if PM gurus can help me in this. From FICO point of view, the Cost Center from t/code iw31 needs to be populated so that later, auto-created PR then PO followed by GR, will be reflected in Cost Center Reports such as Cost Center:Actual/Plan/Variance. This is important for accurate management reporting. In addition, t/code FBL3n Display Line Items for that G/L account, will show which Cost Center expenses are posted into.
    Eva
    Does this why you need the Cost Center to be populated?
    Thanks & regards
    Fauzi

  • User exit / Badi for iw31

    Dear all,
    When i create a maintenance order(iw31) with reference to equipment it defualts teh equipment cost center, in the location tab.
    I have a requirement to change the cost center based on the workcenter / priority, when i save the order.
    Is there is any user exit / Badi available for my requirement?
    Regards
    Murali

    Hi
    Enhancement/ Business Add-in            Description
    Enhancement
    IWO10012                                Maintenance order: Priority handling on central header
    Business Add-in
    IWO_UI_USEFLEX                          BAdI for Calling Up an Alternative UI
    No.of Exits:          1
    No.of BADis:          1
    Arunima

  • User Exit or Badi when opening a Work Order

    I am looking for a user exit or badi that triggers when a work order is opened or better yet when the components tab/button is clicked.

    Check the following enhancments:
    PPCO0018            Check for changes to production order header
    PPCO0019            Checks for changes to order operations
    PPCO0012            Production Order: Display/Change Order Header Data
    PPCO0013            Change priorities of selection crit. for batch determination
    PPCO0008            Enhancement in the adding and changing of components
    PPCO0007            Exit when saving production order
    PPCO0001            Application development: PP orders
    Hope this  helps
    Rajeev

  • LSMW for IW31 to Create Orders

    Hi
    I am looking for a way to Create Orders via LSMW for IW31.
    I am looking for a BAPI, IDOC or Direct input to use in LSMW.
    Has anyone done this before if so can they please piont me in the right direction.
    Thanks

    Hi Nick,
    You can use the BAPI_ALM_ORDER_MAINTAIN.
    For better understanding you can refer this thread :- [BAPI for transaction IW31 (creating a work order);
    Regards
    Dhirendra

  • Need BADI for IW31

    Hi All,
    I am looking for a BADI or userexit for IW31, service order.  when entering a component, (ex. material AAA), click on availability check,  if the qty committed < qty required, then update the component with different material (ex.  material ABC instead of AAA).
    your help is greatly appreciated.

    Hi,
    Try BADI
    IWO1_TL_INTEGRATION
    IWO1_ORDER_BADI
    Hope it helps...
    Lokesh
    pls. reward appropriate points

  • Exit/Badi for to Stop PM Order Confirmation using IW41

    Hi,
    My Requirement is while doing PM Order Confirmation based on Order and Operation in IW41, system needs to check WBS element status.
    If WBS element status is closed, It has to stop the Order Confirmation.
    Kindly suggest any Exit or Badi for this.
    Thanks in advance.
    Regards,
    Kumar

    check below thread it has all the badis and exits summed up for iw41:
    http://scn.sap.com/thread/1121303

  • User status for Notification and Work order

    We generate Service Notification IW26. I have already configured user status like PMND (Planning order not done), AWOP (Awaiting ordered parts) etc. in the Work order a while ago. Now the user wants same User status to the Notification as well. I like to know from experts what is the value added to have the same user status for both Notification and Work Order?
    Do you have any suggestions?

    Hey Chandra,
    The customer intent behind this requirement must be to check in reporting / List Display Transaction about the Order Status. If they want to know looking at a Pending Notification List about the Order Status, you can always provide similar report using SAP Query Builder or with help of your Developer.
    Apart from that If the Requirement is to have these User Statuses in Notification itself, Please advice them that it will be extra activity while performing transaction.
    I dont see any other benefit of having User Statuses added to Notification as well.
    Do let me know if you have some more info on Why Customer is requesting this....
    Regards,
    Avi

  • Wrong release strategy assigned for a PM work order

    Hi
    Would like to seek your inputs on this.
    I have created a work order that has a settlement rule for a WBS element. I then created a material, RELEASE the work order then SAVE.
    I found out when going back inside the work order that the PR number generated was having a different release strategy, which is not appropriate for the approval.
    The only time when you can fix the issue is when you do a change on the work order or you have to create the order, save, then open again the work order then release it, and save.
    Have you had this same scenario? Can you please share any suggestion to address this issue?

    Hi Nazarene
    You may need to give us a background of how your organization have set up the release strategies. Some organization uses User Exits or Work Centers to set up release strategies. Either your work order is not picking the correct work Centre or if the work center is new you have to change the work order (IW32) and save it to pick the correct release strategy. 
    Alternatively you may need to check your workflow and the release limits.
    Regards
    Gibson

  • User exit / Badi for Account Assigned Sales Order billing

    We are planning to collect the royalty in the condition type.We want to accumulate the condition  in the Internal Order.After certain period we want to close the orders .Can any one suggest the Userexit / Badi for this type of Billing / Pricing
    Thanks
    Jeevan

    Hello,
    please have a look in the customizing transaction SPRO:
    >  SPRO
        > Sales and Distribution
           > System Modifications
              > User Exits
    Here you can find the documentation of all Userexits for SD.
    I hope that the information are helpful.
    Regards
    Claudia
    If you are satisfied with the answer, please give Reward Points

  • Customization for create 2 Work orders for different vendors against 1 PR

    Hi,
    What are the customization settings  to create 2 work orders for 2 different vendors against 1 PR with half-half quantity?

    thank you Mario.
    Actuly its infrastructure cmpany & user wants create Purchase order(service work order) for two different vendors with reference to single PR with alocating 60% quantity to 1st vendor & remaining 40% to another vendor.
    user allready created Po for 1st vendor (60% Quantity).
    Now system showing error " Quantity is allready full for reference PR"
    I want to know what is the procedue to solve this issue & customization.

  • Do you have any idea what is the BADI for creation of Purchase Order?

    Hi Gurus, I would like to ask regarding the BADI for the P.O creation in SRM. I have a requirement that if the Account Assignment Type is "asset" it should tick the checkbox (goods receipt/confirmation of performance of service) in the related documents tab of item.  Thanks a lot. I hope you can help me gurus.

    Thanks for the help.

  • User Exit or BADI for IW31 when Saving the Service Order

    Dear ABAPers,
            I would like to add one more line in Service order item when saving the Service order in (IW31) at runtime.Is there User Exit or BAdI.It is very Urgent Please help me.
    Thanks & Regards,
    Ashok.

    Hi
    U can go through the tansaction.
      System/ Status
      Double click on program name.
    For badis:
    Search for the Phrase:
      cl_exithandler=>get_instance.
    U will the badi definitions.
    For User exits:
      search for the phrase: CALL CUSTOMER-FUNCTION
      u will get the user exits.
    If it is helpful rewards points.
    Regards
    Pratap.M

Maybe you are looking for

  • A/P Credit Memo (Item Type) not to deduct quantity in inventory

    Hi, 1. I purchased an item > supplier gave me invoice> I key in A/P Invoice (Item Type) 2. Found out item was overpriced 3. Supplier gave me Credit Note to adjust the price How do I key in this credit note via A/P Credit Memo? To my understanding if

  • Cost of sales accounting implementation

    Hi Can we implement cost of sales accounting in the mid of the Fiscal year if so , how to capture functional area in the transactions , changing in the master data will not allow as balances exist what are all prequisities and configuration to be mad

  • Po mail sending.

    HI, i am sorry i am asking this quation again there are someny answers for this... i am activating standerd sap workflow for purchage order(PO). i want send workitem to sap inbox as well as external mail. i am getting workitem to sapinbox but externa

  • The option to save all tabs does not appear to work in ver 4. the promt is missing at sut down. How is this corrected?

    In ver 3.6 there was a prompt at shut down to save tabs. It seems that option is gone in ver 4. How can I fix this?

  • Show_Canvas on W-B-P trigger ( 6i C/S )

    hi i have a form with two blocks, each block is on different canvas. one content and another stacked. initially the stacked canv is hidden and is displayed when the user press a button on the content canvas. i am using SHOW_VIEW('DOWN_CAN'); go_block