Function module for changing Work order user status in IW32

Hi,
I want to change the work order user status in IW32 using ABAP.
Is there any function module to do so or any other way? I have tried using BDC but this does not work.
Please suggest.
Regards,
Naba
Edited by: n. saha on Nov 5, 2008 6:46 AM

I am getting Same Problem.
fi_methods-method = 'SAVE'.
APPEND fi_methods.
fi_methods-refnumber = 1.
fi_methods-objecttype = 'USERSTATUS'.
fi_methods-method = 'CHANGE'.
fi_methods-objectkey = '002000002453'.
APPEND fi_methods.
fi_userstatus-user_st_text = 'COMM'.
fi_userstatus-user_langu   = 'EN'.
fi_userstatus-CHANGE_EVENT = ' 01 '.
APPEND fi_userstatus.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
  TABLES
    it_methods    = fi_methods
    it_userstatus = fi_userstatus
    return        = fi_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Above code I am using and there the message comes like
T ID                   NUM           MESSAGE
S IW                   080           Order saved with number 2000002453
S IWO_BAPI2     110           BAPI control was ended
can any on know what is wrong in this? please help if having knowledge.
Thank You,
Jahnavee Trivedi

Similar Messages

  • BAPI for changing Work order user status in IW32

    Hello Experts,
    I am getting Same Problem in updating status via BAPI, BAPI_ALM_ORDER_MAINTAIN.  Its not giving any error but even not update status.
    I know i can use this for changing the user status also but not sure how to carry out things.
    I used this code.
    fi_methods-method = 'SAVE'.
    APPEND fi_methods.
    fi_methods-refnumber = 1.
    fi_methods-objecttype = 'USERSTATUS'.
    fi_methods-method = 'CHANGE'.
    fi_methods-objectkey = '002000002453'.
    APPEND fi_methods.
    fi_userstatus-user_st_text = 'COMM'.
    fi_userstatus-user_langu   = 'EN'.
    fi_userstatus-change_event = ' 01 '.
    APPEND fi_userstatus.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
      TABLES
        it_methods    = fi_methods
        it_userstatus = fi_userstatus
        return        = fi_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Above code I am using and there the message comes like
    T ID                   NUM           MESSAGE
    S IW                   080           Order saved with number 2000002453
    S IWO_BAPI2     110           BAPI control was ended
    can any on know what is wrong in this? please help if having knowledge.
    Thank You,
    Jahnavee Trivedi

    I am getting Same Problem.
    fi_methods-method = 'SAVE'.
    APPEND fi_methods.
    fi_methods-refnumber = 1.
    fi_methods-objecttype = 'USERSTATUS'.
    fi_methods-method = 'CHANGE'.
    fi_methods-objectkey = '002000002453'.
    APPEND fi_methods.
    fi_userstatus-user_st_text = 'COMM'.
    fi_userstatus-user_langu   = 'EN'.
    fi_userstatus-CHANGE_EVENT = ' 01 '.
    APPEND fi_userstatus.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
      TABLES
        it_methods    = fi_methods
        it_userstatus = fi_userstatus
        return        = fi_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Above code I am using and there the message comes like
    T ID                   NUM           MESSAGE
    S IW                   080           Order saved with number 2000002453
    S IWO_BAPI2     110           BAPI control was ended
    can any on know what is wrong in this? please help if having knowledge.
    Thank You,
    Jahnavee Trivedi

  • Bapi or Function Module for Change request Management status update

    Hi,
    Do we have any Bapi or function module to change the status of Change request Management.
    Ex: If the status is in To Be Processed i have to change that status to Authorized using any Bapi or FM.
    I have tried with the BAPI crm_icss_change_request but its not updating the status.
    Do you have any idea on this???
    Regards
    Pavan

    hello,
    the function module is 'SOCM_STATUS_VALUES'
    you can find an example of usage of it in the program CRM_SOCM_SERVICE_REPORT
        CALL FUNCTION 'SOCM_STATUS_VALUES'
          EXPORTING
            im_process_type       = report_list-process_type
      IM_LANGU              = SY-LANGU
          TABLES
            status_values         = lt_vsocm_stat_propt.
    I hope it helps
    best regards

  • Function Module for open Purchase Order & Sales Order?

    Hi, commonly I read the data from tables and calculate the open quantity for sales order and purchase order, but I want to know, are there any standard function modules for getting the list of open "purchase order" and "sales order" respectively?
    Thanks and Regards.

    hi Ren,
    u can check all these bapi's related to salesorder
    BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
    BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
    BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    May be this FM can help you
    MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
    Regards,
    Naveen

  • Function Module for Changing delivery date

    Hi Friends ,
        I am held up with a scenario of changing the delivery date while creating purchase order. Could you please suggest any function module to change the delivery date in purchase order if it is less than 5 days.
    With Regards ,
    Sudhir S
    Moderator message: please do some own research before asking.
    Edited by: Thomas Zloch on Feb 21, 2011 11:45 AM

    Hi praveen for u r requirement there is no need of any FM
    Try this code
    parameters:
      p_date like sy-datum,
      p_no type i.
    data:
      w_date like sy-datum.
    w_date = p_date - p_no.
    write: / w_date .
    it is enogh for u r requirement
    plzz reward if it is usefull...
    for any further quiries my mail id is [email protected]
    plzz dont forget to reward

  • Function module for reteriving Purchase order values

    hi,
    I there any function module for reteriving the Purchase order Values

    better to put ur logic /requirement on table EKKOEKPOEKBE.
    Regards
    Prabhu

  • Function modules for Individual Work maintenance

    Hi all,
    We're planning to use the functionality of individual work for our customer. And we're planning to use custom screens rather than GUI for creation, maintenance, deletion etc - as GUI screens seem to have some bugs (especially when you try to delete an individual from a student on PIQST00)
    So are there any function modules (RFC if possible) related to individual works (for creation, maintenance, deletion etc)? I looked up some function modules but they didn't turn out to be as "functional" as we expected considering our requirements.
    If no function module exists to meet our requirements, could you suggest any functional modules for its infotypes (for same purposes)?
    Thanks in advance

    Hello Rob,
    Thanks for the reply!
    Well I already checked those functions with starting HRIQ_INDIV. However none of them seemed to work for me. For instance, HRIQ_INDIVWORK_MAINTAIN. You cannot maintain (neither create ) individual work or anticipated submit date infotypes with that function I guess. Besides that, when I want to test the function and enter some import parameters it needs, let's say creating individual work - therefore opera = inse -, it directs me to Individual Work maintenance screen in module catalog in GUI with an pop-up error!
    I need a function like HRIQ_RFC_MODULE_CREATE for instance when you are able to fill all infotypes related to a study modue... To give another example, I can say it can be HRIQ_ADV_ADVASSGNMT_CREATE_RFC when you are able to assign an advisor to a student with all the info needed just like you would do in PIQST00.
    However, the function modules related to individual work are not as functional as the function modules I named above.
    Should I go for infotype function modules?

  • Userexit for updating sales order user status based on PO

    Hi.
    My clients requirent is
    Sales order user status should get updated based on production order creation,GR for PO creation etc.
    Basically depending on PO & GR For PO,various user stauts in sales order should get updated.
    Can you please suggest me some userexits in PP for this requirement?
    I am a SD Consultant and not having much idaes about PP
    Thanks
    Nisha

    hi,
    if you are not going to update it in the SO..
    then you need different exits as those are different transactions.

  • Userexit for updating sales order user status based on Production Order

    Hi.
    My clients requirent is
    Sales order user status should get updated based on production order creation,GR for PO creation etc.
    Basically depending on PO & GR For PO,various user stauts in sales order should get updated.
    Can you please suggest me some userexits in PP for this requirement?
    I am a SD Consultant and not having much idaes about PP
    Thanks
    Nisha

    hi,
    if you are not going to update it in the SO..
    then you need different exits as those are different transactions.

  • Function module for Change document for Business partner

    Hi Experts,
    Could any one send me the sample code of function module for CDHDR and CDPOS tables for extracting the change date along with role.
    Eg :
    BPRole Changd on crtd by crtd on Business partner
    ZCASH 30.11.2011 NHALLAL 24.11.2011 0001000237
    CRM000 03.12.2011 NHALLAL 24.11.2011 0001000237
    I wanted to catch up the changed date and changed role from CDHDR (base table) and CDPOS(cluster table - item level).
    Might be involved with creation of extract structure.
    Any sample codes are appreciated. Thanks.
    Regards,
    Janardhan

    resolved

  • Function Module for Changing status of a Functional Location.

    Hello,
    I am writing a Proxy for changing the Functional Location (T code IL02).
    I need to set the Deletion flag for the Functional Location.
    Can any body help me with how to do this. As data will be coming from XI and I have to update the Functional location in background with function modules.
    I am using 'BAPI_FUNCLOC_CHANGE' for changing other data. But I am not able to set the Deletion flag with this BAPI.

    Hi Abhijit,
    Can you please tell me steps or the ABAP code for setting the Deletion Flag for a Functional Location?
    Thanking you in Advance,
    Vijay

  • Functional module to change production order

    Hi,
    I tried with FM CO2H_PROD_ORDER_CHANGE
    to change production order quantity field GAMNG value, but it did not work.
    Please suggest me any FM or BAPI to change Production order quantity.
    Thanks
    Hema

    Hi Ferry,
    Thanks for your fast reply.
    I tested with the function modules
    KK_F_AFKO_AFPO_UPDATE
    RK_AUFTRAG_SICHERN
    First FM does not have GAMNG(total order qty) field.
    With 2nd FM, it is directly updating table AUFK and AFPO with order qty and order qty. It will not update operation quantity, that is alsor required.
    If we do manually in CO02 transaction, operation quantity also will update once we change the order quantity.
    Thanks
    Hema

  • Function module for Open Sales Orders.

    Can u any one tell me is there any standard function module to
    retrieve OPEN-SALES orders. I tried to debug VA05 but not of use...
    Thanks in advance,
    Sanjay.

    hi
      you can get open sales orders from vbuk and vbup
        SELECT
             A~VBELN
             A~GBSTK
             B~GBSTA FROM VBUK AS A
             INNER JOIN VBUP AS B
             ON AVBELN = BVBELN  INTO TABLE T_OPENS
             FOR ALL ENTRIES IN T_VBELN WHERE A~VBELN = T_VBELN-VBELN
            AND  A~GBSTK IN ('A','B')
             AND B~GBSTA IN ('A','B').
    in t_vebeln table is haveing sales orders by user selection you can get it like this
    regards,
    varma

  • Remote Function Module for Change document Items.

    Hi Experts,
    I want a Remote Function Module to read Change document Items, can any please help me out. <removed by moderator>
    Thanks,
    Sridevi
    Edited by: Jan Stallkamp on Aug 25, 2008 8:25 PM

    If you are looking for the fm here it is.....
    you can check this CHANGEDOCUMENT_READ_POSITIONS fm and its documentation.
    If it is suitable for your requirement copy the same fm and make it remote enabled.
    I think it should work for you.

  • Change sales order user status

    Hello experts,
    I'm trying to update the user status with the following code without success:
    DATA : LIT_STATUS_COMT       TYPE CRMT_STATUS_COMT,
           WA_STATUS_COMT        LIKE LINE OF LIT_STATUS_COMT,
           LIT_FIELD_NAMES       TYPE CRMT_INPUT_FIELD_NAMES_TAB,
           WA_INPUT_FIELD_NAMES  LIKE LINE OF LIT_FIELD_NAMES.
    SELECTION-SCREEN BEGIN OF BLOCK AAA.
    PARAMETERS: P_GUID  TYPE CRMT_STATUS_COM-REF_GUID,
                P_STAT TYPE   CRMT_STATUS_COM-STATUS.
    SELECTION-SCREEN END OF BLOCK AAA.
    CLEAR WA_STATUS_COMT.
    WA_STATUS_COMT-REF_GUID       = P_GUID.
    WA_STATUS_COMT-REF_KIND       = 'A' .
    WA_STATUS_COMT-STATUS         = P_STAT. " Pass the user status
    WA_STATUS_COMT-USER_STAT_PROC = 'ZOR00001'. " Value for the User Status Profile.
    WA_STATUS_COMT-ACTIVATE       = 'X'.
    INSERT WA_STATUS_COMT INTO TABLE LIT_STATUS_COMT.
    WA_INPUT_FIELD_NAMES-FIELDNAME = 'ACTIVATE'.
    APPEND WA_INPUT_FIELD_NAMES TO LIT_FIELD_NAMES.
      CALL FUNCTION 'CRM_STATUS_MAINTAIN_OW'
        EXPORTING
          IT_STATUS_COM        = LIT_STATUS_COMT
        CHANGING
          CT_INPUT_FIELD_NAMES = LIT_FIELD_NAMES
        EXCEPTIONS
          NOT_ALLOWED          = 1
          ERROR_OCCURRED       = 2
          WARNING_OCCURRED     = 3
          OTHERS               = 4.
      DATA: LT_OBJECTS_TO_SAVE  TYPE  CRMT_OBJECT_GUID_TAB,
            LS_OBJECTS_TO_SAVE  LIKE LINE OF LT_OBJECTS_TO_SAVE.
      LS_OBJECTS_TO_SAVE = P_GUID.
      APPEND LS_OBJECTS_TO_SAVE TO LT_OBJECTS_TO_SAVE.
      CALL FUNCTION 'CRM_STATUS_SAVE_OW'
       EXPORTING
         IT_HEADER_GUID           = LT_OBJECTS_TO_SAVE
    best regards,
    Ronen.

    R.R,
    I already tried that without success:
    INCLUDE CRM_STATUS_CON.
    INCLUDE CRM_LOG_STATES_CON.
    SELECTION-SCREEN BEGIN OF BLOCK AAA.
      PARAMETERS: P_OBJNR  TYPE CRM_JSTO-OBJNR,
                  P_STAT TYPE   CRM_JEST-STAT.
      SELECTION-SCREEN END OF BLOCK AAA.
    START-OF-SELECTION.
    CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
      EXPORTING
    *   CHECK_ONLY                = ' '
        OBJNR                     = P_OBJNR
        USER_STATUS               = P_STAT
    *   SET_INACT                 = ' '
    *   IV_REF_KIND               =
    *   IV_OBJECT_TYPE            =
    *   IV_NO_1O_MAINTAIN         =
    * IMPORTING
    *   STONR                     =
    * EXCEPTIONS
    *   OBJECT_NOT_FOUND          = 1
    *   STATUS_INCONSISTENT       = 2
    *   STATUS_NOT_ALLOWED        = 3
    *   OTHERS                    = 4
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    * IMPORTING
    *   RETURN        =
    any other suggestions?
    Ronen.

Maybe you are looking for

  • Ok..... I am frustrated with Apple and my Ipod!  :(  Advice please.

    Hi all, This is a long post so bear with me. I have had an Ipod Mini since June 2005, so it's not that old, but its over a year.... I have noticed lately that the battery was not holding it's charge like it used to. Instead of the normal 8 hours(I be

  • How to load scrollbar at runtime

    Hi in my project I have 2 datablock.Based on the condition the datablock gets loaded.Is it possible to add the scrollbar of the datablock at runtime.

  • EJB 3.0 AutoIncrement

    I have a requirement to use auto-increment support for my EJB / JPA persistent objects. The objects could be modified through a web interface, PDA interface, or service and the underlying database (developing in mysql 5) could be mysql, oracle, sql s

  • Can someone confirm that this is a bug?

    Hey guys, I recently used the built-in DeNoiser audio plugin for a project I am editing. Almost immediately after applying the effect, Premiere CS5 crashed. Now that I think back, this has happened one other time after the effect was applied. To spea

  • Creating type in boxes

    How can I create text boxes in fireworks that people can type information into on the web. Like if I want a person to be able to email me directly from their site, and type in a message right there, and collect information about that person. I saw th