Lock work orders from custom transaction

Hi,
I have created a custom tcode that has functionality similar to IW32.
I need to implement locking similar to what iw32 implements ( not allowing to open work orders by 2 users at a time.)
Please provide me with sample code, how i can implement the same for my custom tocde.
Is there any possiblity to lock users from opening the work order from iw32 when they have already opened the same in my tcode.
CO_ZF_ORDER_LOCK_MULTI....is this the correct FM to use...

Hello Narendra
Function module <b>CO_ZF_ORDER_LOCK_MULTI</b> is the right one for locking. Use similar coding like in routine <b>ORDER_CHANGE</b> (include <b>LCOIHF3G</b>):
*--- Sperren (nicht im Anzeigen) --------------------------------------*
    if tc10-trtyp <> y_trtyp_anz.
      move-corresponding caufvd to ordt_pre.
      if caufvd-prueflos is initial.
        ordt_pre-kein_prlos = yx.
      endif.
      append ordt_pre.
      call function 'CO_ZF_ORDER_LOCK_MULTI'
           exporting
                lock_mode   = 'S'
           tables
                enqueue_tab = ordt_pre
                not_locked  = ord_pre.
      describe table ord_pre lines sy-dbcnt.
      if not sy-dbcnt is initial.
Regards
  Uwe

Similar Messages

  • Error while creating work order from purchase order

    Dear All,
    We are having a subcontracting scenario where we are creating a Work order from PO but getting the below error.
    Error - "No master data assigned to partners-locations-product combination."
    Done all the setting mentioned in the below thread but the error still persist.
    Error in Generating Work order from Purchase Order
    Any suggestions on which master data we need to check?
    Thanks,
    mahesh.

    Hi Mahesh
    In the below transaction
    /SCA/MFGCFG - Work Order Configuration
    Can you maintain Master data Assigment properly
    Valid From
    Valid To
    Active---Checked
    Can you please list what you maintained
    Regards
    Vinod

  • Issue during automatic Creation of Work Order from Notification

    Hi,
    I have a issue during automatic Creation of Work Order from Notification.
    BADI implemented: NOTIF_EVENT_POST
    BAPI called in BADI: BAPI_ALM_ORDER_MAINTAIN
    I am able to create Work Order successfully but after that i need to update notification header with created work order number.
    But i am unable to update the same (VIQMEL-AUFNR).
    Can anybody provide solution for the same!
    Thanks,
    Kumar.

    Hi,
    Any inputs on above posted issue!
    Thanks in advance.
    Thanks,
    Kumar.

  • SAP PM Work Order from SAP SD order

    Hi ,
    Is that possible to create SAP PM Work Order from SAP SD order in IS - U?
    What will be the trigger points for this?
    Thanks & Regards,
    VEER

    Hello All,
    sorry for updating the thread so late.
    Actually the issue here was the memory ID. We changed that and the print started coming fine.
    Thanks to all who replied,
    Amit.

  • Termination error while creating and saving Work Order from a Notification

    Hi All,
    While creating Work Order from a Maintenance Notification, we get a error message "Update Termination OPROL Initial Number". This happens even while creating Maintenance Notification & Work Order separately and assigning the Notification in the Objects tab of the Order subsequently.
    Could any body please help in this issue.
    Thanks,
    SS

    Hi Sourabh,
                        Please check the link:
    Express Document Update terminated while Scheduling Preventive single Plan
    it will help you, it is actually the Number range issue.
    Regards,
    Yawar Khan

  • Regarding return message from custom transaction

    Hello all,
              i have a scenario where i am calling a custom transaction and trying to get return messages, but i am not getting any return message instead i am getting error message in that transaction even if i am using mode 'N' in my call.
            Do my custom transaction need to follow some methodology which will return error message, as messages are returned when standard call transaction is made.
    Thanks
    raju N

    hello abi,
            i am getting a empty message table, thing is that from the custom transaction they are calling other standard transaction and getting error message. if any error occurs they are using 'message id'  syntax and displaying and if any error occurs internally in that transaction they are using 'message e001'. this kind of error messages are returned to my call transaction but the other one is not getting populated.
    Thanks,
    raju N
    Message was edited by:
            krishnam Raju N

  • Regarding creatinf Plnned orders from Customer Reqs

    Hi Gurus,
    I am newer  to SAP PP.
    I am trying to map ascenrio where I need to create Planned order from Customre Req.
    i created  customer req from T'code MD81.  It is displayed in Md04.
    When I tried running MD02 to crete Panned order.it is uscessful but No planned order diaplyed in MD04. What could the probable reason???
    Thanks,
    Denish

    Denish,
    Can you please let me know the planning strategy group assigned to the material in MRP3 view, and also what is the requirement type you are using to create CIR in MD81?
    Regards,
    Prasobh

  • Work orders from sales orders

    17.11.07
    HI friends,
    I have a service item in my sales order and the charge is billed on the customer. This service has been provided to the customer through a vendor.  Can i create a work order or purchase order on the vendor using this sales order? I have created the vendor as a partner at the item level.
    Please advise.
    Regards,
    Udaynath.

    u just creat slaes order after that mm will come online that means service material gurantee and warntte  they will check qm and will decide that will be serivces or not or replaced that material so just we have to do the billing only  if the serivced material through vendor that will so  sending vendor but we are givening to the invoice to customer thank u
    Just iam trying to give the answer only if any mistakes please remind me this is my cell number 9848948675

  • Distinguishing PIR related planned orders from Customer related.

    Dear all, what could be the best way how to distinguish planned orders generated basing on PIR from ones generated from real Customer Orders. The main idea behind is to make sure that orders generated for real customer orders are processed with first priority and orders from PIR with second. Thank you. Regards,Andrey.

    Hi ,
    System will not always create one plan order for one demand. If lot sizing procedure is WB-Weekly lot size , it wll generate one plan order for customer orde r& PIR falling in same week. Hence , there is no flag or field which will help identify which Plan order is feeding what demand /how much qty of demand.
    You should look at altering Planning strategy. If you implement Make-To-order strategy(20, 50, 59 ) , system will create Planning segment(Blue color seperator in MD04 screen)
    System will ignore lot sizing procedure & always create one plan order for one demand.
    Alternatively , you can implement SAP-SCM which has pegging reports & priority based processing.
    Hope it helps,
    Jatin

  • Creatinga Work Order from Function Builder

    Hi
    I am trying to create a work order using BAPI_ALM_ORDER_MAINTAIN in Function Builder. I have filled out the IT_METHODS the IT_HEADER and the IT_OPERATION values and I am getting back results in the RETURN field when I execute the BAPI in Function Builder, but when I go into the SAP R/3 GUI and do a search for the new Order # I created it says that the Order 814741 does not exist.
    Is it that  Function Builder is purely for testing and dose not fully write back to SAP when you execute the BAPI or am I missing something in one of the methods/Objects I am calling to.
    Please review my values below.
    Thanks, Donagh
    [1 ]IT_METHODS
    REFNUMBER = 000001
    OBJECTTYPE = HEADER
    METHOD = CREATE
    OBJECTKEY  = %00000000001  
    [2] IT_METHODS
    REFNUMBER = 000001
    OBJECTTYPE = OPERATION
    METHOD = CREATE
    OBJECTKEY  =%00000000001  
    [3] IT_METHODS
    REFNUMBER = 000001
    OBJECTTYPE =
    METHOD = SAVE
    OBJECTKEY  =%00000000001  
    IT_HEADER
    ORDERID = %00000000001
    ORDER_TYPE  = PM02
    PLANPLANT = 1000
    BUS_AREA  = 9900
    MN_WK_CTR = WXDEF001
    FUNCT_LOC = PF1-EL1-SB1
    EQUIPMENT = 6600MSB001P02
    RETURN (after executing the BAPI in Function Builder)
    TYPE = S
    ID = IWO_BAPI2
    NUMBER = 110
    MESSAGE = Order %00000000001 saved with number 814741     
    LOG_MSG_NO  = 000000
    MESSAGE_V1 = %00000000001
    MESSAGE_V2  = 814741
    SYSTEM = CE8CLNT850
    (the rest of the fields are blank)
    Message was edited by: Donagh Mc Gowan
    Message was edited by: Donagh Mc Gowan
    Message was edited by: Donagh Mc Gowan
    Message was edited by: Donagh Mc Gowan

    These statuses stand for the quality notifications which you can check in QM03  tcode.
    Nabheet

  • Proposed Work Order Type in transactions

    Hi Experts,
    Pls help with the configuration path to set proposed work order type for transations, e.g.
    IW31 - for WO type PM02
    IW34 - for WO type PM01
    iw81 - for WO type PM05
    Thanks. pls help.
    Rgds,

    Hi,
    Yes using SHD0 will solve ur problem,
    Here are the steps..
    http://help.sap.com/saphelp_nw04/helpdata/en/67/232037ebf1cc09e10000009b38f889/frameset.htm
    http://www.sap-basis-abap.com/sapbs010.htm
    Thanks!

  • How sales order is created from inbound purchase order from customer by EDI

    Hi experts,
    My doubt is how a sales order is created when a customer sends a purchase order through EDI.
    My doubt really starts here.. (how the Idoc is posted).
    Case 1 : Just the process code is checked and corresponding function module is called and in background a sales order is created. (Or the below process)
    Case 2 : The process code will point to a workflow where an authorized person will enter some more additional data's and save the document.
    And also how pricing procedure, material determination, material substitution will take place/ works if we want to post a inbound purchase order into sales order..
    can u people clearly explain how the process takes place in real time ...
    with regards,
    James..
    Valuable answers will be rewarded..

    hi,
    the first option is the right one. the FM invoked makes a direct input, so all the functionalities in S.O. are the standard one in the same way as if you are making it manually.
    Also you can have some exits in the Idoc FM, so you can manipulate data there before loading the sales order.
    pls. reward if helpful
    regards
    Roberto

  • How to Call Smartform from Custom Transaction.

    Hi All,
    I have developed Module pool Program , in module pool program i have save button and Execute button when i press save button whatever the data is there in transaction, it will store in the tables and when i click Execute button, it will generate a smartform.
    so here my question is how to link with the smartform with Module Pool Program.
    plese help me on this
    Thanks in Advance.
    Prasad.

    in your Module pool program
    in PBO event you can do like this...
    either use
    CALL FUNCTION '/1BCDWB/SF00003434'.
    here /1BCDWB/SF00003434 is name of function module generated from smartform
    ==========================
    or if you want to get the function module name dynamically then use below function module to get the FM name for your Smart form name.
    SSF_FUNCTION_MODULE_NAME
    and then use that from export parameter..
    Hope it will solve your problem.
    Thanks & Regards
    ilesh 24x7

  • Status QM* for a work order from FM: STATUS_READ_MULTI.

    Hi All
    We are calling the function module
    CALL FUNCTION 'STATUS_READ_MULTI'
         EXPORTING
           client                     = sy-mandt
           only_active                = 'X'
           all_in_buffer              = 'X'
    *     GET_CHANGE_DOCUMENTS       = ' '
    *     NO_BUFFER_FILL             = ' '
          TABLES
            objnr_tab                  = gt_objnr
            status                     = gt_status
    gt_objnr contains two entries:
    OV*1
    OV*4. These are operation statuses.
    In the gt_status, we are getting a range of values:
    1) OR*.I believe these are order status.
    2) OV*. This should be operation status.
    3) QM*. NOT SURE WHAT ARE THESE STATUSES FOR???
    Can anyone please tell me what does QM* statuses stand for.
    Thanks in advance.
    Harsh
    PS: '*' indicates a range of characters.

    These statuses stand for the quality notifications which you can check in QM03  tcode.
    Nabheet

  • Lock Sales order type Customer

    Hii SAP,
    we can use authorization to authorize the user to create sales order by order type. on the portal netweaver we have given the user full authorization (SAP_ALL). when this SAP_ALL assign to the user the control on authorization is not valid anymore.
    what other method that we can use to given user access the selected sales order type ?

    Hi,
    You can take the help of a Basis person to check what objects ensure authorization for Sales orders.
    Also try inserting SAP_NEW under roles for the user and check the results.
    Regards,
    Amit

Maybe you are looking for

  • Help CS3 isn't working correctly in my new computer

    I just bought a new computer...I had no choice..the other one was dying. I do basic photo editing, but I do it daily. I have loaded my CS 3 onto my new Asus, with Windows 7 and i5 processor. Before I bought I did a lot of asking of friends and comput

  • Manuall java system copy.

    hi experts, Accourding to JAVA(NW04s) system copy guide, it's mandatory to use CI EXPORT/IMPORT to ajust the difference JAVA ID(IDXXXXXX) and SDM info of source and target system. In our environment, 1st,  install source system 2nd, install target sy

  • Windows Explorer not showing all folders in mapped dfs drive

    I have a strange problem, a users does not see all of the folders in a mapped dfs drive. The drive has over 2000 folders but in explorer it only shows 400. If I open a command prompt I can cd to the drive and dir lists all folders. the explorer behav

  • Cannot associate specific reminder lists to iCloud

    According to documentation and some screen shots I've seen, I should be able to selectively target certain reminder lists to be put in iCloud while having others be local to the iOS device.  Using my iPhone, I have my reminders set to be iCloud enabl

  • Why Does My MATLAB Script Return Error 1048?

    I am running Matlab 6.5, and the matlab scrip is M_thred2=M > Thred; M is 2 dimensional array and Thred is a constant, so M_thred2 will have thresholded array from M. If I make M as output, it works fine, but M_thred2 doesn't.