Function Module to Update the values in STPO!! VERY URGENT!!!!!!!!!!!!!!!!!

Hi All,
Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
Please do the needful..
Regards
Yathish

Hi Naren,
Thanks for ur reply,
The BAPI that you have gave is to update only Material BOM. But I want to Change  and create spare part indicator for 4 BOM's, ie Sales Order BOM, Eqipment BOM and also Material BOM and WBS BOM.
Can u please shed some light on it,so that it would be helpfull to me.
Thanks
Yathish

Similar Messages

  • Function module to update the values in STPO table :   VERY URGENT!!!!!!!!!

    Hi All,
    Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
    Please do the needful..
    Regards
    Yathish

    For material bom: CSAP_MAT_BOM_CREATE
    and CSAP_ORD_BOM_CREATE for Order BOM.
    Regards,
    Ravi

  • Function module for updating the values in table VTTK

    Hi,
    I am working on a report in which I need to update the value of field tdlnr of table vttk for a particular shipment number. I need to do this using functional module and I am not been able to find one. If anyone knows answer to this plz help.
    Thanks in advance,
    Priyanka.

    As noted above, RETURN table must be supplied empty, it is for BAPI to return the messages back to the calling program. You simply need to define an internal table, pass it to BAPI as is and then analyze this table after the BAPI call. For example:
    DATA: BEGIN OF it_return OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_return.
    CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
    <...>
      TABLES
    <...>
        return = it_return.
    LOOP AT it_return.
      MESSAGE
           ID      it_return-id
           TYPE    it_return-type
           NUMBER  it_return-number
       WITH
                   it_return-message_v1
                   it_return-message_v2
                   it_return-message_v3
                   it_return-message_v4.
    ENDLOOP.
    Hope this helps.

  • Creation of function module for updating the ztable

    Hi,
    I am sending the requirement for ceation of function module for updating the ztable.
    Requirement----
    Table Updation rule (New record)
    While creating a new record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO------->     Sales Delivery no in case of sales orderShipment no in case of transfer order
    UNAME----
    >     User ID
    ZORDTYPE----
    >     SALEOR in case of sales orderTRANSF in case of transfer order
    ZREFDOCNO----
    >Sales Order no in case of sales orderPurchase Order no in case of transfer order
    ZREFDOCNO1----
    >Delivery no in case of transfer order
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZREQNO----
    >Running serial number (incremented by 1 for each new record)
    ZREQDAT     -
    >System date
    ZREQTIME----
    >     System time
    ZSTATUS----
    >OPEN (for all new records)
    Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
    Table Updation rule (Status Update)
    While updating a record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO----
    >Sales order no in case of sales orderShipment no in case of transfer order
    ZSTATUS----
    >CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZSTATDAT----
    >System date
    ZSTATTIME----
    >     System time

    Do you have to create/update new record in Ztable through Function Module ?
    or you need to write FM only for validation?
    Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
    Let me know clearly what exactly u need ?
    Regards,
    Kiran

  • CRM function module to update the attribute in the classification TAB of BP

    Hi All,
    Can any body let me know if there is any functionmodule to update the CRM function module to update the attribute in the classification TAB of BP tcode.
    I have searched a lot i get FM to update the marketing attribute and not the attributes in the classification tab.
    Thanks in Advance
    Edited by: Sharath Kumar on Dec 2, 2010 4:48 PM

    For material bom: CSAP_MAT_BOM_CREATE
    and CSAP_ORD_BOM_CREATE for Order BOM.
    Regards,
    Ravi

  • Function Module to update the FI and Logistics Invoice

    Hi All,
    Is there any function module which updates the FI and Logistics Invoice simultaneously?
    Regards,
    Adapala M

    For material bom: CSAP_MAT_BOM_CREATE
    and CSAP_ORD_BOM_CREATE for Order BOM.
    Regards,
    Ravi

  • Function Module to update the sales order header status

    Hi,
      I am looking for a function module to update the Sales order header status.
      Pls. let me know if anybody has used any FM to update the SO status.
    Thanks,

    By mentioning status do you mean Object status or Document status??
    For Object status you may use FM: STATUS_MAINTAIN
    For document status it changes according to flow.
    Regards
    Eswar

  • Function Module to update the file path/name into Infopackage

    Hi Experts,
    I have some flat files which will be loaded to the directly daily. My requirement is to update the file name into the infopackage dynamically. Please suggest any function module or program for it.
    Thanks,
    Kittu

    In Higher versions, we can use the below code:
    call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
        exporting
          VARIABLE   = 'TEMP'
        importing
          VALUE      = LV_TMP
        exceptions
          CNTL_ERROR = 1
          others     = 2.
      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 method CL_GUI_CFW=>FLUSH
        exceptions
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          others            = 3.
      if SY-SUBRC <> 0.
    Error handling
      endif.
      concatenate lv_tmp '\' into folder_path.
    But need to know in the lower versions like 3.1h and 4.0,

  • Function Module to update Characteristic Value (AUSP table entry)

    Looking for a function module/BAPI to update a characteristic value (AUSP table entry).
    This is for a material master Material classification value, not a Variant Config value that I need to update.
    Anybody have one?  I have one that will find the value, but not change it.
    Thanks.

    That wasn't it, but it gave me the one piece I was missing.
    Answer is:
    Function Module "CLAE_CLASSIFY_OBJECT"
    In CHANGE_KSSK
    M = 0
    KLA = (Class Type)
    OBJEK = (Material Number for the Material Characteristic being changed)
    OBTAB = MARA
    CLASS = (Class Name with Characteristic to be changed)
    S = 1
    S = (blank)
    AENNR = (EC Change Number or Blank)
    DATUV = (Today's Date or date for change)
    C = "X"
    In CHANGE_AUSP
    OBJEK = (Material Number for the Material Characteristic being changed)
    ATINN = (Chararacteristic to be changed)
    M = 0
    KLA = (Class Type)
    ATWRT = (New Value for Characteristic)
    C = X

  • Function module to change the value for pricing condition type

    Hello experts,
    I want to change the value for pricing condition type for an item in the transaction CRMD_ORDER.
    I used many function modules but none are working.
    Please kindly suggest a function module that will change the value for a condition type .
    I have used the following function module but its not working, please correct the coding if anything needs to be changed or added. Please help me .
    Thank you.
    CLEAR PRCD_COND.
         SELECT SINGLE * FROM PRCD_COND WHERE KPOSN = WA_ORDERADM_I-GUID AND
                                              KSCHL = COND_TY.
      IF SY-SUBRC = 0.
    *    MOVE-CORRESPONDING PRCD_COND TO L_COND_CHG.
    *    CLEAR L_COND_CHG-KBETR.
        L_COND_CHG-STUNR = PRCD_COND-STUNR.
        L_COND_CHG-KBETR = COND_PRC.
    *    L_COND_CHG-KSCHL = COND_TY.
        INSERT L_COND_CHG INTO TABLE T_COND_CHG.
    L_HEAD_GUID = CRMD_ORDERADM_H-GUID.
    L_ITEM_GUID = WA_ORDERADM_I-GUID.
    INSERT L_HEAD_GUID INTO TABLE HEAD_GUID.
    INSERT L_ITEM_GUID INTO TABLE ITEM_GUID.
        CALL FUNCTION 'CRM_ORDER_READ'
         EXPORTING
           IT_HEADER_GUID                    = HEAD_GUID
           IT_ITEM_GUID                      = ITEM_GUID
         IMPORTING
           ET_ORDERADM_H                     = LT_ORDERADM_H
           ET_ORDERADM_I                     = LT_ORDERADM_I
           ET_PRIDOC                         = IT_PRIDOC_RD
           ET_DOC_FLOW                       = T_DOC_FLOW
    *     CHANGING
    *       CV_LOG_HANDLE                     =
    *     EXCEPTIONS
    *       DOCUMENT_NOT_FOUND                = 1
    *       ERROR_OCCURRED                    = 2
    *       DOCUMENT_LOCKED                   = 3
    *       NO_CHANGE_AUTHORITY               = 4
    *       NO_DISPLAY_AUTHORITY              = 5
    *       NO_CHANGE_ALLOWED                 = 6
    *       OTHERS                            = 7
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRI_COND.
    INSERT L_PRI_COND INTO TABLE PRI_COND.
    LOOP AT IT_PRIDOC_RD INTO LS_PRIDOC_RD.
    MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRIDOC_CHG.
    L_PRIDOC_CHG-PRIC_COND = PRI_COND.
    L_PRIDOC_CHG-REF_GUID = LS_PRIDOC_RD-GUID.
    L_PRIDOC_CHG-COND_CHANGE = T_COND_CHG.
    INSERT L_PRIDOC_CHG INTO TABLE PRIDOC_CHG.
    ENDLOOP.
    LOOP AT LT_ORDERADM_H INTO LS_ORDERADM_H .
    MOVE-CORRESPONDING LS_ORDERADM_H TO L_HEADER.
    INSERT L_HEADER INTO TABLE HEADER.
    ENDLOOP.
    LOOP AT LT_ORDERADM_I INTO LS_ORDERADM_I.
    MOVE-CORRESPONDING LS_ORDERADM_I TO L_ITEM.
    INSERT L_ITEM INTO TABLE ITEM.
    ENDLOOP.
    L_FIELD-FIELDNAME = 'STUNR'.
    INSERT L_FIELD INTO TABLE FIELD.
    L_FIELD-FIELDNAME = 'KBETR'.
    L_FIELD-CHANGEABLE = 'X'.
    INSERT L_FIELD INTO TABLE FIELD.
    L_INPUT-FIELD_NAMES = FIELD.
    L_INPUT-REF_KIND = 'E'.
    L_INPUT-REF_GUID = LS_PRIDOC_RD-GUID.
    L_INPUT-OBJECTNAME = 'PRIDOC'.
    INSERT L_INPUT INTO TABLE INPUT.
        CALL FUNCTION 'CRM_ORDER_MAINTAIN'
         EXPORTING
           IT_PRIDOC                     = PRIDOC_CHG
         IMPORTING
           ET_EXCEPTION                  = EXCEPT
         CHANGING
           CT_INPUT_FIELDS               = INPUT.
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    REFRESH EXCEPT.
    CALL FUNCTION 'CRM_ORDER_SAVE'
      EXPORTING
        IT_OBJECTS_TO_SAVE         = HEAD_GUID
    *   IV_UPDATE_TASK_LOCAL       = FALSE
    *   IV_SAVE_FRAME_LOG          = FALSE
    *   IV_NO_BDOC_SEND            = FALSE
    *   IT_ACTIVE_SWITCH           =
    IMPORTING
       ET_SAVED_OBJECTS           = SAVED
       ET_EXCEPTION               = EXCEPT
       ET_OBJECTS_NOT_SAVED       = UNSAVED
    * CHANGING
    *   CV_LOG_HANDLE              =
    * EXCEPTIONS
    *   DOCUMENT_NOT_SAVED         = 1
    *   OTHERS                     = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK AND WAIT.

    Hi,,
    To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to Update with immediate start
    Alternatively u can use this function module.
    CRM_STATUS_DATA_SAVE_DB
    BAPI_CUSTOMERCRM_CHANGE (If u wish to use a bapi for this).
    Also , Let me know what error you got when implementing other function module.Does the function module didnt return any error but still the value is not changed for pricing condition type?

  • Function module to update the classification of each of the devices 'IQ02'

    Can any one please tell me if there is any Function module or BAPI that can be used to update the device classification details. I am referring to the classification details that are updated for each of the device serial numbers using Transaction 'IQ02'

    Please see the following code
    log initialization
      CALL FUNCTION 'BAPI_LOG_INIT'.
    do some initializations
      CLEAR db_update.
    create classification data
      CALL FUNCTION 'CACL_OBJECT_ALLOCATION_MAINT'
        EXPORTING
          object_type                 = x_auto-header-object_type
          class                       = x_auto-header-class
          class_type                  = x_auto-header-class_type
      STATUS                      =
      STANDARD_CLASS              =
      DELETE_ALLOCATION           =
      CHANGE_NO                   =
      I_OBJ_NOT_CHK               = ' '
      I_DATUV                     =
      I_NO_DEFAULTS               = ' '
        TABLES
          object_identification       = x_auto-data
       EXCEPTIONS
         error                       = 1
         warning                     = 2
         OTHERS                      = 3.
      IF sy-subrc NE 0.
        CALL FUNCTION 'BAPI_LOG_CLOSE'
          TABLES
            return = lt_return.
        LOOP AT lt_return INTO wa_return WHERE type = 'E'.
          mac_msg_putx co_msg_error wa_return-number
                       wa_return-id
                       wa_return-message_v1
                       wa_return-message_v2
                       wa_return-message_v3
                       wa_return-message_v4
                       space.
        ENDLOOP.
        RAISE input_error.
      ENDIF.
      * transfer validation data
      CALL FUNCTION 'CACL_OBJECT_VALIDATION_MAINT'
        EXPORTING
          object_type                 = x_auto-header-object_type
          class                       = x_auto-header-class
          class_type                  = x_auto-header-class_type
      CHANGE_NO                   =
      I_OBJ_NOT_CHK               = ' '
      I_DATUV                     =
      I_NO_DEFAULTS               = ' '
        TABLES
          object_identification       = x_auto-data
          validation_maint            = x_auto-value
       EXCEPTIONS
         error                       = 1
         warning                     = 2
         OTHERS                      = 3.
      IF sy-subrc <> 0.
        CALL FUNCTION 'BAPI_LOG_CLOSE'
          TABLES
            return = lt_return.
        LOOP AT lt_return INTO wa_return WHERE type = 'E'.
          mac_msg_putx co_msg_error wa_return-number
                       wa_return-id
                       wa_return-message_v1
                       wa_return-message_v2
                       wa_return-message_v3
                       wa_return-message_v4
                       space.
        ENDLOOP.
        RAISE input_error.
      ENDIF.
      * transfer to data base without commit
      CALL FUNCTION 'CACL_CLASSIFICATION_SAVE'
           EXPORTING
                i_commit      = ' '
                i_no_upd_task = 'X'.
    close internal log
      CALL FUNCTION 'BAPI_LOG_CLOSE'
        TABLES
          return = lt_return.
    set update flag if everything went well
      db_update = 'X'.

  • BAPI or Function Module to Update the Alternative Payer  (KNZA) of Customer

    Hi Experts,
    My client requirement is to update the Customer Permitted Alternative Payer during creation of BP
    Would you please let me know the any BAPI or Fictional Module available to UPDATE the u201CPermitted Alternative Payer (KNZA)u201D of Customer Master.
    iam trying  SD_CUSTOMER_MAINTAIN_ALL function module, its failed to update the  KNZA tables. please help to close the issue. 
    Thanks in Advance.
    Venkatesh M.

    Hi Ravi,
    Thanks for the quick reply.
    The Function Module, what you are given is BTE. it will not trigger when creating of contract.
    My Requirement is when creating the contract for the particular BP, we need to UPDATE the Alternative Payer of Customer.
    Here i required BAPI or Function Module to change or Update the customer master Alternative Payer (KNZA).   
    Regards,
    Venkatesh M

  • Function module to update the SPRPS field in infotypes

    Hi Guru's
         I m developed the workflow for personal data maintain in ESS with single approval. Employee can able to update his personal data and saved.
    Now the workflow will trigger to HR for approval .Before the workitem send to approval   i  need to  update the PA0002-SPRPS = X  and after getting approval i have to remove the flag.
    Is the any function module /  BAPI to upadte PA0002-SPRPS = X.
    Thanks,
    Pasumpon Karuppaiah

    Hello,
    Use BAPI_PERSDATA_CHANGE with  LOCKINDICATOR = 'X'.
    Below are call sequence,
    BAPI_EMPLOYEE_ENQUEUE
    BAPI_PERSDATA_CHANGE
    BAPI_EMPLOYEE_DEQUEUE
    Regards,
    Sameer

  • Function Module to Update the Profit Center in Profit Segment of SO?

    Hi,
           I am updating the profit center with help of user exit in the sales order at the time of saving it. But my problem is it doesnt appear in the Profit Segment in the Account Assignment.
           So if i go to the change mode of a Sales Order do some change and save it, the profit center get determined automatically. Now if one goes into the display mode of the same order and goes into Account Assignment of a particular item we can see that the Profit Center in the Profit Segment pop-up is not updated.
          My question here is, is there a function module to derive/update the profit segment so all the details get updated in the user exit used to update the profit center?

    Hi Deepika,
    Did you find any way to update the discount pricing in camapign.
    Thanks,
    Satya

  • To find function module to update the field kbetr.

    hello friends  ,
                                i have a problem , i want to update kbetr field in konp table and  i am searching for a function module  .  Is there any function module with which we can update kbetr field in konp table.

    Hi,
    check th thread:
    Problem with BAPI_PRICES_CONDITIONS

Maybe you are looking for

  • How can I delete the Auto-Fill Cache For My Email in Snow Leopard?

    When I start to type an email in Snow Leopards Mail program I am getting the Auto-Fill selection but it contains email addresses that are no longer valid and have been deleted from my contacts.  It must be getting the information from a cache file is

  • ***TDS on Advance**

    Hi, Iam testing TDS on advance. its working fine at DP entry (f-48)( W/TAX ALSO GOT CREDITED HERE) but while at clearing the DP (f-54) its not debiting witholding tax. ( there is no line item created for this. How can get the W/tax line item here in

  • JPGS not converting to DNGs

    Hi, When trying to convert JPGs to DNG is it currently failing. Steps: 1. Select the JPG images in Grid view 2. Go to Library, and choose Convert Photo to DNG 3. Untick Only convert RAW files, click OK 4. The conversion starts and the DNG files shows

  • It is possible to generate the graphs based on policy that we set?

    As i found that the Cisco Service Control Application Reporter only have the template graphs like top ten bandwidth user, can we generate the graph based on the policy that we defined on the subscriber policies?

  • IMove HD improt to iMove v7 (iLife 8)

    I have found I can not import my iM HD project into iM V7. There is a menu choice for this but the file is blank when imported. Anyone have an idea about this? I can still load the project into iM HD. Thanks