BAPI to update EKPO-LOEKZ

Hello All,
Is there a BAPI to update ekpo-loekz field.
Thanks
Aravind

Hi Arvind
Currenty you are passing only one line in the FM not internal table for the poitmes...
Main thing is you have to pass internal table for line items inf BAPI BAPI_PO_CHANGE instead of work area or single line
** Fill purchase order from ekko
    l_purchaseorder = wa_ekko-ebeln. " Try to use EKKO-EBELN and change the logic accordingly..
LOOP AT it_ekpo INTO wa_ekpo where ebeln = wa_ekko-ebeln. " B4 this write FOR ALL ENTRIES logic to fill EKPO
    CLEAR: l_purchaseorder,
           l_r_poheader,
           l_r_poheaderx.
    l_poitem-po_item = wa_ekpo-ebelp.
    l_poitem-delete_ind = C_X.
    APPEND l_poitem.
    l_poitemx-po_item = wa_ekpo-ebelp.
    l_poitemx-PO_ITEMX = C_X.
    l_poitemx-delete_ind = C_X.
    APPEND l_poitemx.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CHANGE'
         EXPORTING
              purchaseorder = l_purchaseorder
         TABLES
              return        = l_t_return
              poitem        = l_poitem[] " Pass Internal Table instead of one row
              poitemx       = l_poitemx[] . " Pass Internal Table instead of one row
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
                wait = C_X
   ENDIF.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya

Similar Messages

  • Bapi to update Ekpo table

    Hi all,
    I want to update field TXZ01 from table EKPO, Is there any bapi to do the same.
    Please help its urgent.
    Thanx in advance,
    Amruta.

    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • Difference between EKKO-LOEKZ & EKPO-LOEKZ

    Dear Friends,
    May i know the use of following tables & fields
    EKKO-LOEKZ & EKPO-LOEKZ
    I have create a PO with 3 line item..
    And deleted one line item & passed the PO in EKPO table i m able to find deletion indicator(LOEKZ) for that line item...
    Then I have dleted all 3 line Items in that PO...then checked in EKPO-LOEKZ filed able find deletion indicator for those line items..
    But i am not finding any changes in EKKO-LOEKZ filed(header Level)..
    may i knw wat is the reason for that?How i can acheive that?
    Regds,
    Sankar D

    Sankar Dharmaraj wrote:
    Dear Friends,
    > May i know the use of following tables & fields
    > EKKO-LOEKZ & EKPO-LOEKZ
    >
    > I have create a PO with 3 line item..
    > And deleted one line item & passed the PO in EKPO table i m able to find deletion indicator(LOEKZ) for that line item...
    >
    > Then I have dleted all 3 line Items in that PO...then checked in EKPO-LOEKZ filed able find deletion indicator for those line items..
    > But i am not finding any changes in EKKO-LOEKZ filed(header Level)..
    > may i knw wat is the reason for that?How i can acheive that?
    >
    > Regds,
    > Sankar D
    Hi Sankar,
    EKKO has header data and since you have not marked PO as Archived the same is not updated. Where as EKPO has item data hence when you delete an Item the same gets updated in EKPO-LOEKZ field.
    Hope this helps!
    Reetesh

  • BAPI to update a single characteristic in IE02

    Hi,
          I am trying to update a single characteristic in IE02.I am able to do that with the BAPI "BAPI_OBJCL_CHANGE",but this BAPI is updating only 1 characteristic and is initializing all the remaining characteristcs.
          Any pointers on this is highly appreciable.
    Navin

    Hi,
    the documentation of the bapi says:
    Caution
    This BAPI only changes the parameters of an existing assignment (or creates a whole new assignment), but it does not delete the assignment to a class and replace it with an assignment to another class. If you want to reassign an object, the old assignments must be read with BAPI_OBJCL_GETCLASSES and deleted with BAPI_OBJCL_DELETE, then the new assignments must be created with BAPI_OBJCL_CREATE.
    The information transferred by this BAPI replaces all old information. An empty field means "delete entry!", not "no change".
    This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
    You can only use this BAPI for objects that are not classes!
    This BAPI only processes assigned values for classification - not for configuration
    so i guess you have to pass all information you do not want to lose.
    i´ve  found this as well:
    http://www.sapfans.com/forums/viewtopic.php?t=125320
    Best regards.
    Edited by: Pablo Casamayor on Jan 2, 2009 7:08 PM

  • BAPI for updating Maintain Duration in Transportation and Delivery scheduling

    Hi all,
    Iam looking for a BAPI to update the Duration Times in Transportation and Delivery scheduling. I reluctant to use recording on SM30 Table maintenance T code and use it in LSMW. Is there a BAPI or Standard i/p Program to load these details. I have more than 200000 records to input.
    A list of all BAPI's in Transportation Management module would be great as well.
    Regards,
    Avi

    Hi,
    @praveen: I tried the solution provided by you and it worked for me in this context. But it seems this BADI gets triggered every time the delivery is getting saved. So for my test purposes, I'm triggering this BADI in a program, but in actual scenario, the BADI would be called on every sy-ucomm = 'SICH_T' i.e. SAVE. hence, I can't separate my piece of code using this condition.
    I'm trying to call my FM(update module in collective run mode) inside this BADI in backgrnd task as a separate unit but this doesn't seem to work.
    Any more suggestions?
    Thanks
    Ashish

  • BAPI to Update the OA/PO with the new partners from vendor masters

    Hello All,
    We got a requirement to update the Contract or purchase order with new partners from vendor  master.
    In brief the partner information of a  PO when created with reference to a contract  will be reflected from the contract but not from Vendor Master partners .So when the vendor master got changed after the creation of the Contract the partner information in the PO is not in synchronous with Vendor Master partnes.
    Hence please help us with any BAPI to update the PO partners with Vendor masters .
    Regards
    Kalyani

    MAP2e_lfa1_to_bapivendor_04
    MAP2e_lfa1_to_bapivendor_05
    will be helpful

  • Need name of a function module or BAPI to update the Tax Classification val

    Hi Guru's
    Need name of a function module or BAPI to update the Tax Classification value for Material master.
    Thanks in advance.

    Hi
    U can try to use BAPI_MATERIAL_SAVEREPLICA
    Max

  • FM'S or BAPI to update the condition records in VB22 transaction

    Hi,
    I need your help in getting the FM'S or BAPI to update the condition records in sales deal.
    The transaction is VB22.
    If you can send me a smaple code it will be really helpful.
    Regards,
    Sasi

    Check this:
    http://www.sapnet.ru/viewtopic.php?p=1644
    Bapi for VK11 & VK12
    Reddy

  • BAPI to update  Profit Center Group

    Hi ,
    Is there any BAPI To update PCG ?
    Moderator message : Search for available information, duplicate thread locked.
    Edited by: Vinod Kumar on Oct 17, 2011 2:19 PM

    Hi
    Try This BAPI...
    BAPI_PROFITCENTER_CHANGE
    Regards
    Ajit

  • BAPI to update data in KNA1 and ADR* tables

    Hi,
    I have to change customer data via BAPI.
    I'm searching for a BAPI that updates KNA1 and ADR* tables.
    (so that data will be coherent).
    I found BAPI_CUSTOMER_CHANGEFROMDATA1 but it seems to only update KNA1
    and BAPI_ADDRESSORG_CHANGE that only updates ADR* tables.
    Can you help me ?
    Thanks,
    Sandrine.

    I came accross such a requirement but couldn't find a single function module.
    I think try using both the FM's else BDC is the only option left.
    you can use the FM "DEBITOR_BDCDATA" to get the BDC data for vendor and then edit it to add the address fields required.

  • Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng)

    Hi,
    I have a requirement to use a Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng), which one (Function Module or BAPI) should I use? is there any sample codes?
    Thanks a lot!!

    Hi,
    *& Report  ZTEST
    REPORT  ztest.
    DATA : wa_header TYPE bapisdh1x,
                i_item TYPE TABLE OF bapisditm WITH HEADER LINE,
                i_itemx TYPE TABLE OF bapisditmx WITH HEADER LINE,
                i_return TYPE TABLE OF bapiret2.
               wa_header-updateflag = 'U'.
               i_item-itm_number = '000010'.
               i_item-target_qty = '4'.
               APPEND i_item.
              i_itemx-itm_number = '000010'.
              i_itemx-updateflag = 'U'.
              i_itemx-target_qty = 'X'.
              APPEND i_itemx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = '1234567890'
        order_header_inx            = wa_header
      TABLES
        return                            = i_return
        order_item_in                 = i_item
        order_item_inx               = i_itemx
    Hope this will help you.
    Regards,
    Anand.

  • Need a bapi to update person data in IR02 tcode.

    Hi experrts,
    I need to update person data in IR02 tcode through plant and workcenter. But I am looking for BAPI to update this person data.
    Please help me on this as I caught up badly.
    Thanks in Advance.
    J.P

    I have closed this myself by creating a custom program.

  • Is there any standard BAPI to update the standard transaction GS03 ?

    Is there any standard BAPI to update the standard transaction GS03 ?
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Jun 16, 2011 2:02 PM

    hi,
    I think this link will help you to find that.
    list of all bapis:
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • No standard BAPI to update Customer???

    Hi All,
    We are trying to find BAPI to update the changed customer details (address, phone numers ...any details). In ABAP forum they mentioned following 3 BAPIS:
    BAPI_CUSTOMER_CHANGEFROMDATA1
    SD_CUSTOMER_MAINTAIN_ALL
    BAPI_CUSTOMER_EDIT
    I can't use any of these because of the following reasons:
    I tried BAPI_CUSTOMER_CHANGEFROMDATA1, imported to XI. But it has the following Parameter Names and corresponding Associated Types respectively:
    PI_PERSONALDATA, PI_PERSONALDATAX, PI_OPT_PERSONALDATA, PI_OPT_PERSONALDATAX, PI_COMPANYDATA, PI_COMPANYDATAX, PI_OPT_COMPANYDATA, PI_OPT_COMPANYDATAX
    BAPIKNA101_1, BAPIKNA101_1X, BAPIKNA105, BAPIKNA105X, BAPIKNA106,BAPIKNA106X, BAPIKNA105, BAPIKNA105X.
    For the above 8, I am getting following message in XI: Schema for type urn:sap-com:document:sap:rfc:functions: BAPIKNA106 (Category Data Type) not found
    Can I import those associated types to XI?? They are structures in SAP. If not is there any way that I can do this??
    2) SD_CUSTOMER_MAINTAIN_ALL
    It is not Remote-enabled module. Can't import to XI.
    3) BAPI_CUSTOMER_EDIT
    I dont think I can update details of the customer using this BAPI...I am not sure...Because it has only Customer ID in request parameters....If I want to change name or address...how would I send them in Request to BAPI??
    Any other RF Modules that I can use ??
    Thx
    Navin
    Message was edited by:
            navin kumar

    Hi Navin,
    How did you import the BAPI_CUSTOMER_CHANGEFROMDATA1 into XI? Normally datastructures for the BAPI will be imported together with the BAPI....
    Regards,
    John.

  • Is there any BAPI to update LFA1/LFB1?

    Hi, Expert:
    I wrote one customer program to upate the following two fields. Is there any BAPI I can use, because It's master data. we need create CHANGE POINTERS.  we can't directly update them.
    LFA1-SPERQ (2)  Function That Will Be Blocked
    LFB1-ZAHLS (1) - Block key for payment
    Regards,
    Zhang

    Hi experts, I have to modify the master data also, but, the scenario for me is diferent. I have to update the withholding - tax information. I need to create new rows , and also modify others. I know that´s information is in the LFBW table, but i can´t find any bapi to update it. Any Idea?
    Thanks in advance.

Maybe you are looking for

  • White screen of death - iMac OSX Lion

    I upgraded my 2007 iMac to Lion and after a few days of perfect running the think locked up.  When I forced the power off and back on it seemed to be booting fine (chimes, apple logo, disk spinning up and I could hear the drive head seeking) but then

  • How to call an Oracle Report from a Self Service HR page.

    Hi, I am trying to call an Oracle Report from a Self Service HR page. I personalized the page to add a button and link the report's URL to that button; but I am having issues passing/manipulating parameters to this report. Is there a better approach

  • Using Time Machine to create an OS Clone

    Can anyone provide me with either instructions or a link that explains whether you can create a clone backup of your OS. I want to clone my current Leopard OS set up onto an external drive that can be bootable if my internal drive for some reason cra

  • Flash content gets obscured by other tabs in Firefox

    I've had this problem for a while where when I'm viewing flash content in Firefox, changing to another tab and back again causes the content to be obscured by the previous tab, like this: (click for full size) I'm using flashplugin 11.2.202.336-1 fro

  • No HspEssbaseEnv in java.library.path (Planning + Weblogic + JRockit)

    Hello! When I'm running Planning in 64-bit JRockit JVM in SPARC box, аfter initialization EssBase API, in the log I get the following error: java.lang.UnsatisfiedLinkError: no HspEssbaseEnv in java.library.path at java.lang.ClassLoader.loadLibrary(Cl