Problem in update PO's partner function using BAPI_PO_CHANGE

Hi All,
I have some problem when i try to update PO partner function using BAPI_PO_CHANGE.
If i update partner function where business partner number is vendor (eg. GS) , it run successfully. But when I try to update partner function where business partner number is personnel number (eg. CS, VW, etc) , it was failed. And BAPI return message is "Please enter a partner role".
Please advice.
Thanks

Hi,
         are you executing BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE?
Check this code for PO update..
PARAMETERS: p_ebeln LIKE ekko-ebeln.
DATA: t_poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
DATA: t_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
t_poitem-po_item = '00010'.
t_poitem-net_price = '17.00'.
APPEND t_poitem.
t_poitemx-po_item = '00010'.
t_poitemx-net_price = 'X'.
t_poitemx-po_itemx = 'X'.
APPEND t_poitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln
TABLES
return = t_return
poitem = t_poitem
poitemx = t_poitemx.
COMMIT WORK.
<b>Reward points</b>
Regards

Similar Messages

  • Regarding sample code to update partner function using SD_PARTNER_UPDATE

    Hi All,
    Please provide some sample code to update/add partner function using FM 'SD_PARTNER_UPDATE'.
    regards
    Vishnu

    A better option would be to use a break point on this FM while creating a sales order. That way you will know how standard uses this FM.
    Thanks,
    Vikram.M

  • Updating and deleting Partner functions for functional location

    Hi ,
    I am having a requirement of updating and deleting partner function for functional location .
    If anyone can suggest some BAPI or function module for same .
    Thanks n Regards
    Manik

    Hi Fritz,
    Thank you for your response,
    My need is to create a PARTNERS for the FUNCTIONAL LOCATION.
    LET ME DESCRIBE IT.
    WHEN I AM CREATING A FUNCTION LOCATION USING IL01, AS I ENTER A FUNCTIONAL LOCATION AND PRESS ENTER IN THE NEXT SCREEN.
    AND
    I NEED TO ENTER THE PARTNERS FROM THE DROP DROWN MENU  GOTO ->PARTNERS
    WHICH TAKES ME TO THE NEXT SCREEN WHERE I NEED TO FILL THE INFORMATION IN THE TWO FIELDS : FUNCT & PARTNER.
    I need a partner for the functional location that i mentioned above.and i need to upload that information in through Emigall.
    So my query was that can we customize that partner for this functional location and if yes, what should the constraints,
    what are steps required? Do we require a custom service module?
    Regards,
    Robert.

  • Update partner function using DEBMAS06

    Hi
    I am using DEBMAS06 to add partner to partner function of  a customer. As I need to update only the partners i am passing partner no and partner function to e1knvpm segment.
    But the Idoc actually tries to delete the existing partners of the customer.
    I just want to add a new partner.

    no1 answered

  • How to update the business partner title using the function module

    Hi ,
    I have to update the business partner title to Mr or Ms based on the gender.
    If BP is male title should be updated as Mr else Ms.
    Please provide some inputs on which function module to use to do it in mass update.I have to search the BP's whose title is not created and i have to change those titles to Mr or Ms.

    Hello,
    Try with BBP_USER_CHANGE_FIELDS :
    - set CHANGE_FORM_OF_ADDRESS,
    - put corresponding key you want (see TSAD3 table) in FORM_OF_ADDRESS_KEY.
    Regards.
    Laurent.

  • Create, Update and Delete Partner functions for a Functional location.

    Hello
    I have a  requirement where I need to
    a.  Create /  Assign Partner functions to a Functional location,
    b. Update the new  Partners values ( PARNR ) for particular Partner Functions ( Replace new Partner values in place of old partner values )
    c.  Delete the Partner values and Partner functions for a Functional location.
    when the above changes are done, the changes should be reflected in IFLO ( Table-IFLOT ) and IHPA  ( Table-IHPA ) transactions .
    I wanted to make the above changes by using FM's or BAPI. I have searched many forums and threads, but still I was not able to get the correct solution.
    Can anyone help me out in finding BAPI or FM's to do the above changes. ?
    Note : I will have an excel sheet which has coloumns like Functional location, Partner function, Old Partner value ( PARNR ) and New Partner value (PARNR ). This data needs to be updated in IFLO and IHPA.
    Thanks and Regards,
    Karthik Ganti.

    Hello
    I have a  requirement where I need to
    a.  Create /  Assign Partner functions to a Functional location,
    b. Update the new  Partners values ( PARNR ) for particular Partner Functions ( Replace new Partner values in place of old partner values )
    c.  Delete the Partner values and Partner functions for a Functional location.
    when the above changes are done, the changes should be reflected in IFLO ( Table-IFLOT ) and IHPA  ( Table-IHPA ) transactions .
    I wanted to make the above changes by using FM's or BAPI. I have searched many forums and threads, but still I was not able to get the correct solution.
    Can anyone help me out in finding BAPI or FM's to do the above changes. ?
    Note : I will have an excel sheet which has coloumns like Functional location, Partner function, Old Partner value ( PARNR ) and New Partner value (PARNR ). This data needs to be updated in IFLO and IHPA.
    Thanks and Regards,
    Karthik Ganti.

  • Update customer adding partner functions (KNVP)

    Hi,
    I need to insert new partner functions in a customer. I have been looking for a BAPI but it does not exist. Here in the forum I have seen some threads saying you can use SD_CUSTOMER_MAINTAIN_ALL but there are other threads saying you have to do a BDC because SD_CUSTOMER_MAINTAIN_ALL have not to be used for that at all.
    Do you know the good way to do that?
    Regards,
    Manel

    Hi,
    We did that via batch input. No BAPI was found.
    We used VD02 transaction so save a recording via SM35 transaction and use the code returned
    Regards,
    Manel

  • Update Schedule line Delivery date using Bapi_po_Change

    Hi all,
    I am using Bapi_po_change to Update the Schedule line Delivery date(EKET-EINDT) for the PO based on the Item and the Schedule line.
    I am passing the PO number, Po header, Item structure, Schedule line Structure.
    But the Date is not getting updated in the Eket table.
    Please suggest.

    Hi Sukriti,
    Thanks for the Response, yes i have used the Bapi Transaction Commit Also .
    The point is I am able to Update the Statistical Delivery Date in the Same EKET table using BAPI_PO_Change .I have Checked all the Ways to update the EKET-EINDT(Delivery Date)but no Unable to do it.

  • Problems with updating data in excel spreadsheet using ODI

    That's my first post on this forum, therefore I'd like to say Hello to everybody reading it before I present my problem.
    First I configured the ODBC connection to the xls file which conteins my data - the file isn't defined as read-only in the ODBC connection. The next step was setting up a Microsoft Excel Data Server in the topology manager in which I inserted the physical model and of course a logical one referencing the physical one. These steps allowed me to insert a model with my table in the Designer - I can view data throug the option 'view data' appearing after the right-click on the datastore. One of the columns was defined as primary key in constraints. I can use this xls file datastore as a source in an interface - loading the target finishes with a success. But I can't update the data in the xls file using the 'data' option appearing after right-click on the datastore correspondig to it in the designer. The new window with data from file appears without any problem, but when I try to update any of the fields I recieve an error:
    *"See com.borland.dx.dataset.DataSetException error code: BASE+37*
    *com.borland.dx.dataset.DataSetException: DataSet has no unique row identifiers.*
    *Note: For QueryDataSets you need to disable metaDataUpdate.ROWID in the MetaDataUpdate property, in addition to setting the RowId property on a column.* - don't know where to configure it
    at com.borland.dx.dataset.DataSetException.c(Unknown Source)
    at com.borland.dx.dataset.DataSetException.kb(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.fb(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
    at com.borland.dx.dataset.DataSet.startEditCheck(Unknown Source)
    at com.borland.dx.dataset.DataSet.startEdit(Unknown Source)
    at com.borland.dbswing.TableMaskCellEditor.textModified(TableMaskCellEditor.java:340)
    at com.borland.dbswing.TableMaskCellEditor.insertUpdate(TableMaskCellEditor.java:319)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
    at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
    at javax.swing.text.AbstractDocument.insertString(Unknown Source)
    at javax.swing.text.PlainDocument.insertString(Unknown Source)
    at com.borland.dbswing.DBPlainDocument.insertString(DBPlainDocument.java:77)
    at javax.swing.text.AbstractDocument.replace(Unknown Source)
    at javax.swing.text.JTextComponent.replaceSelection(Unknown Source)
    at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(Unknown Source)
    at javax.swing.SwingUtilities.notifyAction(Unknown Source)
    at javax.swing.JComponent.processKeyBinding(Unknown Source)
    at javax.swing.JComponent.processKeyBindings(Unknown Source)
    at javax.swing.JComponent.processKeyEvent(Unknown Source)
    at com.borland.dbswing.TableMaskCellEditor.processKeyEvent(TableMaskCellEditor.java:627)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)"
    What should I do to be able to modify data from the xls file that way (is it possible in any way)?

    It is not possible to update the data directly from ODI on some technologies, mainly due to some driver limitations.
    I would suggest to edit the spreadsheet in Excel.
    Thanks,
    Julien

  • Problem in updating the GR processing time using BAPI 'BAPI_SAG_CHANGE'

    Hi,
    I am using the BAPI 'BAPI_SAG_CHANGE' for uopdating the GR processing time(BAPIMEOUTITEM-GR_PR_TIME) of the scheduling agreements.
    Issue: when there is no value maintained for GR processing time for a particular scheduling agreemnet the BAPI updates the GR processing time successfully but when there is some value already existing for a particular scheculing agreement then the BAPI does not update this field eventhough the return parameter shows the message 'successfully updated'.   
    Can somebody suggest what could be the reason.
    OR
    Is there any other way/FM to update the scheduling agreements.  
    Thanks,
    Ravindra

    This appears to be old-style BAPI, with ....X tables.  Did you populate the field in the X version of the outitem for the column(s) to be changed?  Did you call the COMMIT bapi after the update?

  • Persistent problems with updating, uninstalling and the functioning of the setup discs.

    I am having problems with the Reader (9) and Acrobat Pro 9 aspects of my registered copy of CS4 Design Premium. When acting on the prompts from the updater, neither of these products will update, giving me a 1301? error (essentially telling me that i have modified the content of the folders?????) This is rubbish. I then decided to uninstall Acrobat 9 Pro and reinstall from the startup disc, well I was wrong, That refuses to work either, 1) The Acrobat uninstaller is stating that Acrobat is not the correct program for this uninstaller to uninstall, ??????? So I just deleted it and went to the startup disc. It gets to the 'preparing to install' stage and that is all, (waited for 3 hours for something to happen, I think that is quite enough).
    Please explain to me what is going on and more importantly get me my Acrobat Pro back so I can update it. NOT HAPPY.
    I have successfully downloaded and installed Reader X from the site, so we will see if that behaves itself when updating.

    Uninstall everything Adobe (yes, including CS4), run the Creative Suite Cleaner Tool, then reinstal lfrom scratch. Only run upates after both CS4 and Acrobat have been successfully reinstalled, then carefulyl re-apply all patches/ updates based on priority. Something busted/ locked your installer database which could include an update gone wrong. Can happen again, but updating from a fresh install is usualyl less prone to such issues and it might actualyl go through....
    Mylenium

  • Problem changing the Condition Value in Po using BAPI_PO_CHANGE

    Hi Experts,
    My issue is BAPI_PO_CHANGE is not changing the Condition value. and giving message in bapi return as 'cannot be processed manually'.
    Can anybody please help me on this.
    Thanks & Regards,
    Sudheer

    Check this link http://forums.sdn.sap.com/thread.jspa?threadID=652278
    Regards,

  • Partner function updation

    hi,
    There is a BDC program for creating an outbound delivery.
    it has to update the partner function field and few other fields. it works fine in sap and the shipment is complete.
    But in the third party system the shipment is not complete.
    the log shows an error message in partner function updation.
    The partner fucntion used is 'SP' - Forwarding agent.
    sy-subrc for the call transaction statement is coming as 1001.
    Can anyone suggest me where the problem can be.

    the screen where you enter partner involves Tablecontrol, so you need to take care of the tablecontrol. that is the reason it is giving the error.
    Run it foreground mode, and see how it behaving at that particular partners screen.
    I suspect it is not identifying the Tablecontrol fields where you insert the partner. it is because of your coding, you didn't handle the table control properly...

  • LSMW problem with Partner functions in Customer Master

    Hi All,
    Requirement is to load the Customer Master Data using LSMW.
    Loading General data is ok, But when I am planning to load the
    partner function using the recording method in LSMW, How do I upload
    more than '1' Ship to party partners and more than '1'
    Bill to party partners using LSMW.
    Normally in table control there is a "+" button at the end of the
    table control which when pressed enters one line in table control,In
    Partner function screen , there is no such button available, so how
    can I determine which line am I supposed to enter data using LSMW.
    One partner can have multiple no of BP and SH partners like more than 10
    of both types. How do I upload these partner functions in SAP using LSMW?
    Regards,
    Ajay

    That a customer master has several business partners is just usual, a customer can have as well several company codes and sales areas. So where exactly is the problem?
    Most problems come with recordings, recordings should be the last option, not the first.
    What import method do you use?

  • Whats the use of PARTNER FUNCTIONS node in NACE transaction

    hello
    i would like to know when a output type is selected as medium EDI or ALE what needs to be entered in the PARTNER FUNCTIONS node and what is the main purpose of this node. Pls help
    ~Suresh

    Hi Suresh,
    Partner Functions Uses
    You use partner functions in transactions, in all areas of partner processing and in some areas of business partner master data.
    ·        For example, you have a real estate business and define the function tenant to refer to your customers.
    ·        Tenant is then displayed in the header and Partner tab page in transactions, and on the Buying Center tab page, when relevant.
    ·        It appears in the Customizing settings for access sequences, partner determination procedures and partner teams
    ·        It appears in business partner master data when you assign partners to partner functions as part of maintaining sales area-specific data, and when you enter excluded partner functions.
    Nace Transaction
    The Tcode NACE is used to link the Standard SAP forms (SCRIPTFORM or SMARTFORM) or the customized form or the new form to its respective print programs. Also the output types, Form entry are linked with their forms and print programs. In short term, i can tell u that configuration or customization of forms to print programs, assigning output types, form entry to the forms are done using this Tcode.
    NACE is used to create output type while creating the output type you will mention forms, and driver program.
    that will be maintained in the table TNAPR.if you create the output type using NACE then it will be automatically visible in table NAST and TNAPR.
    so check in NAST, TNAPR table
    Reward if useful.
    Thankyou,
    Regards.

Maybe you are looking for