How to close po by using Bapi_po_change

Hi
I am passing some parameters to bapi_po_change to close PO's i am getting the sucess message but the field delivery complicted is not set ...........can someone tel me  which parameters i need to pass to bapi_po_change

Check out this sample program for usage
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
Regards,
Santosh

Similar Messages

  • How we close Views without using Java Script

    Hi All,
    can you please suggest me how i close view with out using java script.
    if possible please reply with code.
    Thanks
    Siva

    Hi Siva,
    You can do this either by hiding your window or by closing the window. Following is the sample code to do that
    IWDWindowInfo windowInfo = null;
    IWDWindow window =null;
    windowInfo = (IWDWindowInfo)  wdComponentAPI.getComponentInfo).findInWindows("<<WindowName>>");
    if(windowInfo!=null)
    window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
    window.hide();
    Try with this code, might be useful for your scenario.
    Thanks,
    Sandeep

  • How to close a popup using a function key in adf + Jquery

    Hello All,
    I want to display some error message using function key so I have used javascript function
    *function showText(event) {*
    var k = event.getKeyCode();
    *if (k == 115) {*
    ------------------------------------------CODE-------------------------------------------
    This is working fine on click of F4 it is invoking a popup and inside that popup in dialog it is showing some error messages. The property modal of dialog is true. So that user should not be able to navigate to main form until error message is closed.
    Now on click of F6 I want that error message to be closed. When I added af:clientListener on popup or dialog type="keyDown" is not available.
    So I thought using jquery for this. I have created a form.js file inside that I have written:
    *$(function first()*
    *               jQuery('*').bind('keydown', 'F6', function (evt){closePopup();evt.stopPropagation();return false;});*
    *function closePopup(){*
    *     alert("Do you want to close the error message");*
    I have also added jquery.hotkeys.js and jquery-latest.js file.
    My question here is How can i find that popup or dialog inside that jquery function and close it?
    On click of F6 I am getting that alert Do you want to close the error message but after that how can I find the popup or dialog and close it?
    I am new to jquery still I tried using some code:
    var dialog = event.getSource();
    var popup = dialog.findComponent("p1");
    popup.close();
    and
    var output1 = AdfUIComponent.findComponent("p1");
    output1.close();
    and
    curElm = document.activeElement;
    var frm = curElm.close();
    But none of them worked.
    Please help
    Thanks

    Hi,
    this whitepaper: http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf has an example of registering keyboard keys on a global level (see page 36). So you would define a key to close dialogs in general. The paper also explains how to search and find components. Note that you should always work with the ADF Faces client side API and never against the generated markup or DOM (which in fact your code does)
    Frank

  • How to: Close "Getting Playlist" using applescript ?

    Hi *,
    How is it possible to close the iTunes "Getting Playlist" Pop-up window using applescript ?
    Take a look at --> http://www.cronomik.org/t1.jpg
    I have tried to do the following, but iTunes doesn't act.
    tell application "System Events"
    tell application "iTunes" to key code 53
    end tell
    Any ideas of how to fix my question ?
    Stefan

    I have got it working with this script.
    If iTunes Pop-up a message, I press a key on my remote control and the Pop-up message / Box disappears.
    tell application "System Events"
    tell process "iTunes"
    -- get the front window's name
    -- get the name of the front window
    set whichWindow to (get the name of the front window)
    -- Ergebnis: "Getting Playlist"
    -- display dialog result
    -- display dialog whichWindow
    -- Ergebnis: {button returned:"OK"}
    set whichButton to (get the name of the front window's button)
    -- Ergebnis: {"Stop"}
    tell whichButton of window whichWindow to key code 53
    -- set the contents of the button to key code 53
    end tell
    end tell
    In a terminal I have typed in "while true; do ./diut.app; sleep 2; done" to see what happend, if iTunes is front most and an iTunes message Pop-up.
    Solved by myself.

  • How to close Browser by using a button

    I want to close my browser window using a button in ADF JSF Page.
    How it can be done .... ?
    Regards
    MS Arain

    Thanks to all of you i got a hint from your guys which resolve the issue
    however i want to share how i have resolved this issue i may be wrong
    or there may be any easy alternative that is why i am sharing it.
    I adopted the following steps
    1. Add a New Command Button in my JSF Page
    2. Attached a client listener with the command button
    <af:commandButton text="Close &amp; Exit" id="cb8">
    <af:clientListener method="closeWindow" type="action"/> ---// This is the attachment syntax
    </af:commandButton>
    3. Define a closewindow java script as follows
    <af:resource type="javascript"> --// this is how we declare/define java script in ADF
    function closeWindow(actionEvent) {
    window.close();
    </af:resource>
    Regards
    MS Arain

  • I want to find out how to close firefox to use other systems

    I am trying to down load adobe flash player and it wants me to closemozillafirefox down how do i do that

    File > Exit
    or
    orange Firefox button > Exit

  • Installing Elements 11- how to close ShellExtLoader?

    I am installing elements 11 on a iMac with OS 10.8.2 and installer wants me to close ShellExtLoader? I cannot find that application?
    How to close it?

    Using Activity Monitor
    Mylenium

  • How can I open and close private browsing using an IPAD mini in IOS 7?

    How can I open and close private browsing using an iPad mini in ios7?

    Tap the '+' to the right of the URL field to open a new tab, and at the bottom left of the screen there should be a 'Private' button - tap that and you can then go to the site that you want to go to

  • How to Close A/P Invoice in SAP B1 9.0 using SDK without creating an outgoing payment

    Hi Team;
    I have an issue about of how to close an A\P invoice that has two different tax definitions because I have recorded in a sap Business One A\P Invoice that Have Withholding tax (3%) and have Value Added Tax (18%) at once but when doing Payment of those invoices I did it separately without linking A\P  invoice with payment so that I can do a journal entry that credit the VAT Account and debit the Supplier to record that VAT while doing reconciliation I get I message ‘’ Use the same payment category withholding tax code for all transactions during reconciliation  [Message 3821-32]”” I need your help if there is a way that I can close (Changing the status of those invoices because they still open ) invoices without doing A reversal Transaction that affect the accounting  report in SDK.
    Please anyone can help me.

    Hi pallavi p,
    That's good but as I said above when I add the reference of UI API Version 9.0 in the project which has the system form or user form of sap b1 it exactly gives errors in menu.vb of the project.
    So let me give you the way you can try.
    1. Open new project/ visual basic/ sap business one/ sap business one add-on project. and save it any where
    2. Right click on your project
    3. Add new item
    4. Sap Business One
    5. System form (Employee master data) or user form
    6. Add
    And then if your form is opened
    7. Go to add the reference of UI API Version 9.0
    8. Check errors found in menu.vb (or in OutPut)
    So if it's possible try to solve that problem.
    Please anyone can help me.

  • How to insert new service condition in PO using BAPI_PO_CHANGE?

    Hi all,
    I'm trying to insert a new condition under a service line in a PO. This can be seen in ME23N under the services tab of the PO item. Then click on conditions (the button with the dollar and yen symbol).
    I tried using the internal table POCOND and POCONDX. But these tables update the conditions of the PO item itself and not the service conditions. In ME23N this is the conditions tab of the PO item.
                build condition item table
                  wa_conditem-change_id = 'I'.
                  wa_conditem-itm_number   = wa_items-po_item.
                  wa_conditem-cond_type    = c_condtypz.
                  wa_conditem-cond_value   = l_plndisamt.
                  wa_conditem-currency     = l_poheader-currency.
                  APPEND wa_conditem TO it_conditem.
                  CLEAR wa_conditem.
                build condition item change parameter table.
                  wa_conditemx-itm_number    = wa_items-po_item.
                  wa_conditemx-itm_numberx   = 'X'.
                  wa_conditemx-cond_type     = 'X'.
                  wa_conditemx-cond_value    = 'X'.
                  wa_conditemx-currency      = 'X'.
                  wa_conditemx-change_id     = 'X'.
                  APPEND wa_conditemx TO it_conditemx.
                  CLEAR wa_conditemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder    = wa_ekpo_u-ebeln
        TABLES
          return           = it_return
          poitem           = it_poitem
          poitemx          = it_poitemx
          pocond           = it_conditem
          pocondx          = it_conditemx
        EXCEPTIONS
          OTHERS           = 1.
    I tried using the internal tables POCONDHEADER and POCONDHEADERX but this doesn't seem to insert anything.
    Can anyone guide me how to insert a new service condition?
    thanks,
    Shafiq

    Found a SAP note 499626 quoted below. So it seems that it's not possible to use BAPI_PO_CHANGE.
    "Can I create or change conditions on the service level with BAPI_PO_CREATE1 or BAPI_PO_CHANGE?
    Answer:
    Such a function is currently not available."
    Anybody know any FM to do this?
    Edited by: shafiq shamsuddin on Mar 16, 2011 4:38 AM

  • HT1430 How do i close open icons using new ios 7 software?

    How do i close open icons using new ios 7 software?

    If you mean you wish to close apps running in the background or remove them from the app bar, double-click the Home button to bring up the app screen, then swipe upwards on the app.
    http://howto.cnet.com/8301-11310_39-57602601-285/how-to-force-close-apps-on-ios- 7/
    Regards.

  • How to change net Price by using BAPI_PO_change

    Hi experts..
    How i can change net price by using bapi_po_change.
    What parameters i have to pass in this fm.
    if possible please tell me , which table this FM will update.
    Thanks.
    I will award points for all help.

    See the below code and have tested and it works great..
    REPORT  ZTEST_PG_07 NO STANDARD PAGE HEADING
                        MESSAGE-ID z9_msg_prash.
    Tables Declaration  ****
    TABLES: ekpo.
    Variables Declaration  ****
    DATA: v_purchaseorder TYPE bapimepoheader-po_number.
    DATA: v_ebelp TYPE ekpo-ebelp.
    Constants Declaration  ****
    CONSTANTS: x VALUE 'X'.
    Internal Tables Declaration  ****
    DATA: it_return  TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA: it_poitem  TYPE STANDARD TABLE OF bapimepoitem WITH HEADER LINE.
    DATA: it_poitemx TYPE STANDARD TABLE OF bapimepoitemx WITH HEADER LINE.
    DATA: wa_return  TYPE bapiret2.
    Selection Screen  ****
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln OBLIGATORY.
    PARAMETERS: p_ebelp LIKE ekpo-ebelp.
    PARAMETERS: p_menge LIKE ekpo-menge.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN
    AT SELECTION-SCREEN ON p_ebeln.
      IF p_ebeln IS NOT INITIAL.
        SELECT SINGLE ebeln INTO v_purchaseorder FROM ekpo
        WHERE ebeln = p_ebeln.
        IF sy-subrc <> 0.
          MESSAGE e002.
        ENDIF.
      ELSE.
        MESSAGE e005.
      ENDIF.
    AT SELECTION-SCREEN ON p_ebelp.
      if p_ebeln is not initial.
      IF p_ebelp IS NOT INITIAL.
        SELECT SINGLE ebelp INTO v_ebelp FROM ekpo
        WHERE ebeln = p_ebeln AND ebelp = p_ebelp.
        IF sy-subrc <> 0.
          MESSAGE e003.
        ENDIF.
      ELSE.
        MESSAGE e006.
      ENDIF.
      endif.
    START-OF-SELECTION
    START-OF-SELECTION.
      v_purchaseorder = p_ebeln.
      it_poitem-po_item  = p_ebelp.
      it_poitem-quantity = p_menge.
      it_poitem-net_price = '20.00'.
      APPEND it_poitem.
      it_poitemx-po_item  = p_ebelp.
      it_poitemx-po_itemx = x.
      it_poitemx-quantity = x.
      APPEND it_poitemx.
    *&----Calling BAPI function module
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
         purchaseorder                = v_purchaseorder
        testrun                      = x
       TABLES
         return                       = it_return
         poitem                       = it_poitem
         poitemx                      = it_poitemx.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT          = space
         IMPORTING
           RETURN        =
    END-OF-SELECTION
    END-OF-SELECTION.
      LOOP AT it_return INTO wa_return.
        WRITE:/ wa_return-message.
      ENDLOOP.
    Thanks
    Seshu

  • I am trying to update the Subcontracting type of PO using 'BAPI_PO_CHANGE'. However i am able to update this field . Can someone advice me how to do.

    HI,
    I am trying to update the Subcontracting type of PO using 'BAPI_PO_CHANGE'. However i am able to update this field .
    Can someone advice me how to do.
    My code sample is :
    wl_poitem-po_item = l_ebelp.
    wl_poitemx-po_item = wl_poitem-po_item.
    wl_poitemx-po_itemx = c_x.
    *C--material procurement indicator need to update
    *   the type of procurement
    wl_materialind-po_item       = wl_poitem-po_item.
    wl_materialindx-po_item      = wl_poitem-po_item.
    wl_materialindx-po_itemx     = c_x.
    wl_materialind-item_no       = wl_poitem-po_item.
    wl_materialindx-item_no      = wl_poitem-po_item.
    wl_materialindx-item_nox     = c_x.
    wl_materialind-mat_provision = 'S'.
    wl_materialindx-mat_provision = c_x.
    wl_materialind-sched_line      = '0001'.
    wl_materialindx-sched_line     = '0001'.
    wl_materialindx-sched_linex    = c_x.
    wl_materialind-entry_quantity  = wl_poitem-quantity.
    wl_materialindx-entry_quantity = c_x.
    wl_materialind-plant           = wl_poitem-plant.
    wl_materialindx-plant          = c_x.
    wl_materialind-material        = wl_poitem-material.
    wl_materialindx-material       = c_x.
    wl_materialind-item_cat        = 'L'.
    wl_materialindx-item_cat       = c_x.
    wl_extensionin-structure  = 'BAPI_TE_MEPOITEM'.
    wl_extensioninx-structure = 'BAPI_TE_MEPOITEMX' .
    wl_extensionin-valuepart1+222(1) = '1'.
    wl_extensioninx-valuepart1+24(1) = c_x.
    APPEND wl_poitem  TO tl_poitem.
    CLEAR  wl_poitem.
    APPEND wl_poitemx TO tl_poitemx.
    CLEAR  wl_poitemx.
    APPEND wl_materialind TO tl_materialind.
    CLEAR  wl_materialind.
    APPEND wl_materialindx TO tl_materialindx.
    CLEAR  wl_materialindx.
    APPEND wl_extensionin  TO tl_extensionin.
    CLEAR  wl_extensionin.
    APPEND wl_extensioninx TO tl_extensioninx.
    CLEAR  wl_extensioninx.
    CALL FUNCTION 'BAPI_PO_CHANGE'
       EXPORTING
         purchaseorder = l_ebeln
         versions      = wa_version
       TABLES
         return        = tl_return
    *    poitem        = tl_poitem
    *    poitemx       = tl_poitemx
         pocomponents  = tl_materialind
         pocomponentsx = tl_materialindx
         extensionin   = tl_extensionin
         extensionout  = tl_extensioninx.
    READ TABLE  tl_return WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc NE 0.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    ENDIF.

    In the above question i mean- I am UNABLE to update

  • How do i close apps i used to to double click home button

    how do i close apps i used to to double click home button

    All you have to do is double tap the home button to bring up the multi-tasking view, then swipe up on the screenshot of the app you want to exit.

  • I am having problems transefering contacts to my I pod when syncing the message comes back with contact in use by I pod please close and try again, please could you let me know how to close contacts on the  pod or is there a setting that is wrong etc,

    I am having problems transfering contacts to my I pod when syncing the message comes back with contacts in use by I pod please close and try again, please could you let me know how to close contacts on the  pod or is there a setting that is wrong etc, i have restored the device. if i go to contact via settings the screen comes on for about 2 seconds and then goes off - Help

    Single click on the Home button. Then double click on the Home button. In the recently used row, touch and hold the Contact app till they start to wiggle and then tap the minus sing by the contacts app.
    Also make sure the Contact program on your computer is closed.

Maybe you are looking for