Update partner in equipment master

Hi
I want to update partners in equipment master, I can do this using FM 'PM_PARTNER_UPDATE'. But its not updating change document. So I want do this through FM 'PM_PARTNER_INIT' and 'PM_PARTNER_MAINTAIN'. Can any one tell me what are the parameters needs to be passed in these two FMs.
I am passing the following paramters but its not updating.
    CALL FUNCTION 'PM_PARTNER_INIT'
      EXPORTING
        aktyp              = 'V'
        objnr              = 'IE000000000010008557'
        obtyp              = 'IEQ'
        pargr              = 'ZSV'
        parvw_kund         = wa_ihpa-parvw
       refresh            = ' '
        no_sort            = 'X'
     IMPORTING
       offset             = lv_offset
    CALL FUNCTION 'PM_PARTNER_MAINTAIN'
      EXPORTING
       objnr               = 'IE000000000010008557'
        parnr               = wa_ihpa-parnr
        parvw               = wa_ihpa-parvw
       tabix               = v_tabix
       tabix_objnr         = v_tabix
     IMPORTING
       counter             = lv_cntr
     EXCEPTIONS
       invalid_parnr       = 1
       cpd_customer        = 2
       invalid_parvw       = 3
       parvw_unique        = 4
       OTHERS              = 5.
Thanks

report  zzupdate_equipment_partner.
data: w_equi       type equi.
data: w_offset     type sy-tabix.
data: it_ihpa_time type ipar_t_ihpa_time.
data: w_ihpavb     type ihpavb.
data: xihpa        type table of ihpa.
data: ihpa_tab1    type table of ihpavb.
data: w_counter    type i_count.
parameters: p_equnr type equi-equnr default '10262811'.
parameters: p_parnr type ihpa-parnr default '100171'.
parameters: p_cpnr type parnr default '532'.
clear w_equi.
select single * from equi into w_equi where equnr = p_equnr.
refresh: xihpa.
select * from ihpa into table xihpa where objnr = w_equi-objnr.
*-Find the last counter (unic key) -*
sort xihpa by parvw counter descending.
loop at xihpa into w_ihpavb where parvw = 'Z1'.
  w_counter = w_ihpavb-counter.
  exit.
endloop.
call function 'PM_PARTNER_INIT'
  exporting
    aktyp          = 'V'
    objnr          = w_equi-objnr
    obtyp          = 'IEQ'
    pargr          = 'ZE'
*   PARVW_AP       = 'AP'
*   PARVW_INT      = 'ZM'
*   parvw_kund     = 'AG'
*   PARVW_LIEF     = 'LF'
*   PARVW_HER      = 'HR'
*   PARVW_VERA     = 'ZM'
*   PARVW_AUTO     = 'ZM'
    refresh        = 'X'
*   VKORG          = ' '
*   VTWEG          = ' '
*   SPART          = ' '
*   EQUNR          = ' '
*   TPLNR          = ' '
*   READ_ALL       = 'X'
*   SERVICE_FLAG   = ' '
*   TEXT           = ' '
    no_sort        = 'X'
*   NO_TABIX_DET   =
*   NO_TEXT_DET    =
*   IP_OBJECT_ARCH = ' '
  importing
    offset         = w_offset.
clear w_ihpavb.
w_ihpavb-mandt     = sy-mandt.
w_ihpavb-counter   = w_counter + 1.      "Unic key to allow duplicates
w_ihpavb-objnr     = w_equi-objnr.
w_ihpavb-parvw     = 'Z1'.
w_ihpavb-obtyp     = 'IEQ'.
w_ihpavb-parnr     = p_cpnr.
w_ihpavb-adrda     = '3'.                "3=Contact person
w_ihpavb-updkz     = 'I'.                "Insert
w_ihpavb-erdat     = sy-datum.
w_ihpavb-erzeit    = sy-uzeit.
w_ihpavb-ernam     = sy-uname.
append w_ihpavb to ihpa_tab1.
call function 'PM_PARTNER_UPDATE' in update task
  exporting
    it_ihpa_time = it_ihpa_time
  tables
    fxihpa       = ihpa_tab1.
commit work and wait.
write: 'Hurra'.

Similar Messages

  • Check for Partner on Equipment Master (IE01)

    We have a requirement to check that sold-to partner function is mandatory during equipment creation (IE01). This can be done via configuration. However, the requirement is also to allow users to delete this partner using IE02. Hence they only want the partner to be mandatory during IE01 and not IE02.
    I believe only way to do this is using a user-exit. We know of a user-exit IEQM0003 that is allows us to put in logic before equipment is saved. However, this user-exit doesn't have parameters to partner data.
    Is there any other user-exit that can be used?

    You could check to see if you could read the partner from the memory within the FM. However you could potentially accomplish the same using the following steps without programming..
    You could use the View profile settings in configuration and  transaction variant functionality (SHD0) to accomplish this.
    -> As a first step Make sure to add the Partner view as a sub screen to the very first screen using View profile settings for the equipment category in SPRO. (This will force the partner field to be available directly on the initial screen when a piece of equipment is created).
    ---> Now create a Transaction variant for the standard transaction IE01 and here select the sold to partner custom type and leave the value field blank.Now on the configuration for the Transaction set the Partner type to be imported with value "SP" and mark the content field to be mandatory.Leave all other settings to default and save and exit.
    ---> Now set this Transaction variant as a standard variant for this transaction.
    This should do the trick.The user will be forced to enter the sold to party on the screen.However for change transaction(IE02) the user can delete this partner type without any issues.
    Regards
    Narasimhan

  • Equipment master ie03 partner getting deleted while doing material return

    Hi
    We are facing some problem in serial no
    1.We are creating equipment master in IE08 and assigning same equipment no as serial no in ie02
    Update partner functions in IE02
    2.Then we are creating a repair type sales order
    3.Do goods receipt using VRRE by assinging serial no
    4.While doing goods receipts(653 movement type) in transaction VRRE,the parter function gets deleted in equipment master IE03 for that serial number
    5.But at the same time when iam doing post goods issue for the same material after repair and same serial no using vl02n,601 movement type,Partner gets updated.
    Is this the normal SAP behaviour.While doing goods return from customer will the partner function get deleted in equipment master and while doing vl02n,goods issue 601 will it update again
    Regards
    Swetha

    Dear all
    Can you please reply
    Regards
    Swetha

  • Equipment master record updation in Asset master record

    Dear Friends,
    I have a query with regard to Equipment master record updation in asset master record. Here we have created equipment in Plant maintenance module and we have created asset in AS01 tcode. When we give the asset number to PM module guys, they can easily update the asset number in their equipment master by changing the equipment master record.
    But when we enter the same in asset master record in 3rd tab allocations tab, initially it is accepting the equipment details like equipment number, category, object and tech description, but the same is not available after saving.
    Please let me know whether I have to do any customization in asset settings inorder to get the equipment number populated in asset master record.
    Thanks,
    Dwarak.

    Hi,
    Thanks a lot for your reply.
    I did both these customization, but still it is not working. Any other customization to be done? Please let me know.
    And also in asset master record in allocations tab, do we need to select sync and workflow checkbox?
    Thanks
    Dwarak.

  • Problem with Equipment Master update

    Hi Gurus,
    We have a requirement where the equipment master is getting updated when we enter serial number in Delivery creation (VL01n). Here the equipment master description (EQKT-EQKTX) needs to be changed before equipment master gets created. This description is picked from the material master of the material in the item level. We are unable to find any User-Exit/BADI to change this. Please let me know if there is any USER EXIT or BADI available.
    Thanks,
    SP

    Perform a "safe boot" by holding down the Shift key from the startup tone to the logo.  If successful then go to System Preferences > Startup disks > select your boot drive > restart.

  • BAPI for PR Creation  and Equipment master updation

    Hi Gurus ,
    Please provide me the function module (BAPI) for the following.
    1. Create Purchase Requisition
    2. Update/Change Equipment master(Iq02)
    Thanks
    Tausif

    Hi Tausifur,
    You can goto Tcode BAPI and find all the relevant BAPIs that you want. This will help you in the future.
    Cheers
    Keshav

  • Equipment master Configuration data update

    Hi all,
    I need to update the configurable material field KMATN in the equipment master , i tried using BAPI_EQUI_CHANGE passing equipment number and new configurable material in structure (BAPI_ITOB_EQ_ONLY) but it doesnt update it and also it doesnt give any error.
    Any suggestions or different way to do it.I dont want to use BDC here.
    Thanks
    Vijay
    Edited by: Vijay jothimani on Sep 10, 2009 2:17 AM
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Sep 10, 2009 9:28 AM

    I'm able to change the decription of equipment no but the configurable material field doesnt change.
    I'm passing the update flag for configmat and also equipment along with the configmat new value.
    it_tab2-CONFIGMAT = 'X'.
    it_tab2-EQUIPMENT = 'X'.
    it_tab1-CONFIGMAT = '25567'.
    It's not updating the KMATN field.
    Any solution pls. ?

  • Equipment master update during MIGO

    Hi Experts
    Need a BAPI to update the equipment master fields. The equipment / serial number master  is created during goods receipt of a serialized material
    Thanks
    Jey

    The equipment master gets created after MIGO_GR and i wanted to populate the Manufacturer part number against the equipment master,
    is there any standard functionality to have the option to populate the equipment master fields that is captured during PO goods receipt
    example i order a pump and i want the maximum information to be populated in the equipment master during PO goods receipt
    Thanks
    Jey

  • Update equipment master

    Hi Experts,
    I have a requirement to update the equipment master data and used BAPI_EQUI_CHANGE
    but most of the sites that i have searched only shows an update for maintplant and planplant.
    I need to update the functional location, asset location and cost center. Please help. thanks.
    In my code im having a dump error : The function module interface allows you to specify only   fields of a particular type under "EQUIPMENT".   The field "GT_EQUIPMENT" specified here is a different   The field "GT_EQUIPMENT" specified here is a different.
    Here is my code:
    DATA: gt_data_general TYPE BAPI_ITOB,
           gt_data_generalx TYPE BAPI_ITOBX,
           gt_specific TYPE BAPI_ITOB_EQ_ONLY,
           gt_specificx TYPE BAPI_ITOB_EQ_ONLYX,
           lv_return LIKE bapiret2,
           gt_equipment TYPE bapi_itob_parms.
           gt_equipment-equipment = p_equnr.
           gt_equipment-funcloc_int = p_tplnr.
           gt_data_general-costcenter = p_koslt.
    *      gt_data_general-maintloc = p_tplnr.
           IF r_emp = 'X'.
             SELECT kostl
               INTO gt_data_generalx-maintloc
               FROM pa0001
               WHERE pernr EQ p_kunnr.
             ENDSELECT.
           ELSEIF r_third = 'X'.
              gt_data_generalx-maintloc = 'THIRDPARTY'.
           ENDIF.
           gt_data_generalx-costcenter = 'X'.
           gt_data_generalx-maintloc = 'X'.
          CALL FUNCTION 'BAPI_EQUI_CHANGE'
               EXPORTING
                 equipment      = gt_equipment-equipment
                 data_general   = gt_data_general
                 data_generalx  = gt_data_generalx
                 data_specific = gt_specific
                 data_specificx = gt_specificx
               IMPORTING
                 return = lv_return.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               wait   = 'X'
             IMPORTING
               return = lv_return.

    Hi Jepoy,
    Other than making sure you have the leading zeroes, as already pointed out, in your code it seems you are moving maintloc to the wrong structure:
    *      gt_data_general-maintloc = p_tplnr.
           IF r_emp = 'X'.
             SELECT kostl
               INTO gt_data_generalx-maintloc
               FROM pa0001
               WHERE pernr EQ p_kunnr.
             ENDSELECT.
           ELSEIF r_third = 'X'.
              gt_data_generalx-maintloc = 'THIRDPARTY'.
           ENDIF.
    shouldn't it be as below?:
           IF r_emp = 'X'.
             SELECT kostl
               INTO gt_data_general-maintloc
               FROM pa0001
               WHERE pernr EQ p_kunnr.
             ENDSELECT.
           ELSEIF r_third = 'X'.
              gt_data_general-maintloc = 'THIRDPARTY'.
           ENDIF.
    Also, are you sure you need to move a kostl (costcenter) to a maintenance location field? Sounds a bit weird to me, but if this is your process...
    Cheers,
    Custodio

  • Update Equipment Master with Warranty details

    Hi All
    Is there a function or BAPI I can use to update the master warranty details and start date on the Equipment Master(table EQUI)???
    Marius V

    I found a solution - A warranty or warranties are assigned to an equipment. The correct function to use is 'WARRANTY_ASSIGNMENT_RFC'. Hope this helps someone out there.
    Regards
    Marius

  • Interface between Legacy and SAP for Equipment Master

    Hello
    I got a requirement where I need to develop a interface between legacy system and R/3 system for Equipment Master Data update in R/3. I am thinking of getting a Idoc file from Legacy and then update the changes or any new creation of Equipments in R/3. I found a standard BAPI for this BAPI_EQUIPMENT_CREATE/CHANGE. This BAPI use a strcture BAPI_ITOB for data record of IDoc. But I got more data from legacy except what we have in BAPI_ITOB. I got Partner Data, Classification data also for Equipments. I am thinking of copying the BAPI to a Z function module and modify the Idoc structure , message type and all to capture all the data and then do a update in same way as standard transaction IE01(Equipment Create) is doing in Batch Input. Do you think if there is any better way of doing this? I am not used to transaction BAPI . just wondering if we Can use that in someway to include our modification?
    Thanks
    Harkamal

    20,000 is on quite higher side for IDOC.
    IBIP help doc says it needs 2 Kbyte for each record, i.e. 40 Mb for 20,000 rec. that should be ok. Since it has structures for Partner & classification data , I don't think u need to modify the BAPI.
    Transaction IE01 - Create equipment
    Transaction IE02 - Change equipment
    Structure - IBIPEQUI Equipment record
                     |->    IBIPNSTA     New status profile if necessary
                     |->>   IBIPSTAT     User status records
                     |->>   IBIPDOCU     Doc. from Doc. management system
                     |->>   IBIPPART     Partner details (comment below)
                     |-->>  IBIPTEXT     (see comment below)
                              for long text:          TEXT_MARK = " " empty
                              for internal comment:   TEXT_MARK = "1"
                     |-->>  IBIPCLAS    Classification record (eqpmt class)
                         |-->> IBIPFEAT     Classification characteristics,
                                               ie. features for the class
                     |-->>  IBIPBDCD     see below (from screen 102)

  • Equipment master data display of "ship to party"

    Hi experts!
    I got following problem:
    Delivering an equipment to a partner only the "sold-to-partner" number is filled by using the "BAPI_EQUI_CHANGE". The "ship-to-party" field remains grey. Therefore also the asset is updated the the "ship-to-party"-partner.
    Changing the equipment manually the "ship-to-party" field is then filled automatically.
    I already did the customizing, described in thread Partner Data in Equipment Master and thread Synchronisation between asset and equipment
    Many thanks and best regards,
    Nikolaus
    Edited by: Nikolaus Aigner on Aug 12, 2009 2:46 PM

    Dear Pete,
    I got the answer
    1.In Ih01 Valid date i was taking in past so it was showing the past history of equipment.
    2.whenever I m dismantling any functional location it is showing multiple changes at a single time.
    RC
    Edited by: Raju chauhan on Oct 12, 2008 3:31 PM

  • Creation of Equipment master throught Emigall

    Hi Fritz,
    Good Day!
    I need to create a Emigall object for Equipment Master, which we can't
    handle in LSMW because of the volume of data, I am using the same object as
    used for Device of ISU.
    The object name is EQUIPMENT in company ZISU. I have used those fileds only
    which are required to create a equipmetn master in STW. While uploading the
    data I am getting an error " Enter a valid device category" which is a
    device category of ISU.
    Can we do this or do we need to create some other customization in this case
    Thanks for your support Fritz.
    Regards,
    Robert.

    Robert,
    I did some research. Please confirm you are referring to the data as copied below from the documentation.
    Kind regards,
    Fritz
    Definition
    Partners (business partners) are internal and/or external organizational units. For example, internal partners can be logistics and sales departments that perform services. External partners can be customers as service recipients and vendors as supporting service providers. A partner can be a natural or a legal entity. You can use partners in CS- and PM processing.
    The following partner types are delivered with the Standard System:
    Customer
    Contact person
    Vendor
    User
    Personnel number
    Organizational unit
    Position
    Partner Function
    You define partner functions in Customizing for Plant Maintenance and Customer Service. They are freely definable and always refer to a partner type. Standard functions exist (for example, goods recipient) and you can also define your own functions.
    Partner Determination Procedure
    The partner determination procedure is a grouping of partner functions. It specifies which partner functions are permitted or must always be specified for a particular business transaction (for example, for the processing of a service or maintenance order). In Customizing you define the partner determination procedure and assign partner functions to it. If functions are assigned to the partner determination procedure, you can assign the partner determination procedure to an object (for example, to a notification type).
    Integration
    You can assign partners to the following objects: Functional location and equipment

  • Problem in creating equipment master using FM /ISDFPS/ETUPS_EQUI_CREATE

    hi all,
    i am trying to create an equipment master using the FM mentioned above .. after the FM gets executed there is no status/error/information message.. i have given all the values to the FM which we normally give to IE01 transaction for creation of equipment master...
    please advice on this ...
    thanks a ton.....

    Hi Shiva
    Did you got to know how to use this FM, I got a requirement where I need to build a interface to update and create equipments. I also tried using this but got simillar problem as you mentioned. Please let me know if you found any alternative for this?
    Thanks
    Harkamal

  • Bapi for creation of equipment master

    hi friends ,
    I have to made a BDC program for creation of equipment master .
    for that  I am using bapi i.e. ' BAPI_EQUI_CREATE '.
    I had matched the fields of transaction IE01 but in the additinal data part i could not able to map 'Partner' fields .
    pls some body can guide what should i do for it.

    Hi Das,
    If u r going to create equipment no against this Bapi BAPI_EQUI_CREATE"
    then u need to pass material no, Equipment type, Serial No. there is no need to give partner no .
    If its good, then plz give point.

Maybe you are looking for