BAPI to reject PO (like ME29N functionality to reject PO)

Is there a BAPI to reject PO (like ME29N functionality to reject PO).
The BAPI_PO_CHANGE does not have the functionality to change EKKO-
PROCSTAT. Is there a BAPI that can update EKKO-PROCSTAT?
Thanks,
Apollo

We just implemented an implicit enhancement to include  MM06EFDCM form MEPO_HEADER_FILL_PROCSTAT. This is being called in the BAPI_PO_CHANGE.
Here's a sample code I used in my method that rejects the PO:
  data: l_procstat type ekko-procstat value '08'.
  export l_procstat from l_procstat
      to database indx(st) id 'ZWF_POREJECT'.
  l_ebeln = v_zsc_po_hdr-doc_number.
call function 'BAPI_PO_CHANGE'
    exporting
      purchaseorder = PO number
    tables
      return        = lt_return.
Here's the implicit enhancement that I created in include MM06EFDCM form MEPO_HEADER_FILL_PROCSTAT:
FORM mepo_header_fill_procstat CHANGING ch_procstat TYPE ekko-procstat.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
data: l_procstat type ekko-procstat.
import l_procstat to l_procstat
    from database indx(st) ID 'ZWF_POREJECT'.
if sy-subrc = 0.
  delete from database indx(st) id 'ZWF_POREJECT'.
  dekko-procstat = l_procstat.
endif.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  ch_procstat = dekko-procstat.
  IF ch_procstat IS INITIAL.
    DATA: l_ekko TYPE ekko.
    l_ekko = dekko.
    PERFORM procstate_initialize USING trtyp CHANGING l_ekko.
    ch_procstat = l_ekko-procstat.
  ENDIF.
ENDFORM.                    "mepo_header_fill_procstat
Hope this helps.

Similar Messages

  • How to see the keyboard shortcuts in pages like " alt " function in word?

    how to see the keyboard shortcuts in pages like " alt " function in word?

    luisandre wrote:
    In word , if you press "alt" show you all the options you have . Appear numbers or letters  in each options of the toolbar. So is more easy to work with the keyboard. How do you do this in pages?
    Go to system preferences/language & text/input sources and check the box for Keyboard Viewer.  Then select Keyboard Viewer from the "flag" menu at the top right of the screen.  It will show all the special characters you can make when you press the alt and alt + shift keys.

  • When downloading an application from the App Store requires a map of all. And I would like the function is deactivated

    When downloading an application from the App Store requires a map of all. And I would like the function is deactivated

    Please post in your native language. This makes no sense.

  • Avoiding choosing any vendor like partner functions in PO

    For a vendor I have several partner functions in the Vendor Master. And several registers for each one.
    For example: Vendor 1 has defined this partners functions
    Vendor                  0001
    Ordering address  0001
    Ordering address  0002
    But in the purchase order I  can choose as partner function "ordering address" any vendor from the Vendor Master (for example anyone different from 0001 and 0002). Is there any way to restrict in the PO so the user can only choose any vendor defined like partner function in the vendor master?
    Thanks,
    Rodrigo

    Hi,
    Try making ordering address partner function as non editable for your PO, then possibly the system will give popuup only from address in vendor master,
    let us know how it works
    reg
    dheeraj

  • BAPI for customer details like in IDoc DEBMAS

    Hi,
    I'm stuck with a problem concerning the customer data. I need to write a function that returns all information about a customer (from tables kna1, knb1, .. wrf3). Basicly everything that can be found in the IDoc DEBMAS06. So far I couldn't find a BAPI/function that does that. There are only BAPIs like BAPI_CUSTOMER_GETDETAIL which return only a very limited amount of information about a customer.
    Does anyone know a function that does that or can help in any other way?
    Thx
    Stephan
    PS: I don't want to query the database tables myself as I don't know the relations between them and don't want to select wrong data.

    Sure, here you go ... 
    DATA: ls_i_main   TYPE cmds_ei_main,
            ls_e_main   TYPE cmds_ei_main,
            lt_custs    TYPE cmds_ei_extern_t,
            ls_cust     TYPE cmds_ei_extern,
            ls_head     TYPE cmds_ei_header,
            ls_instance TYPE cmds_ei_instance.
      CONSTANTS: lc_obj_task TYPE cmd_ei_object_task VALUE 'M'.
      ls_instance-kunnr = [customer xyz].
      ls_head-object_instance = ls_instance.
      ls_head-object_task = lc_obj_task.
      ls_cust-header = ls_head.
      APPEND ls_cust TO lt_custs.
      ls_e_main-customers = lt_custs.
      CALL METHOD cmd_ei_api_extract=>get_data
        EXPORTING
          is_master_data = ls_e_main
        IMPORTING
          es_master_data = ls_i_main
          es_error       = pe_error.
    Regards
    Stephan

  • BAPI for create/Update Vendor Partner functions (XK02)

    Hi,
    We have a requirement where in we need to update the partner functions of a vendor (table WYT3), transaction XK02.  Is there any BAPI to do so?
    Regards,
    Vinod Nagre

    Hi
    Can you help me, how is possible update vendor data using net. connector with RFC function (or some another way to update vendors data from 3th party program). Up to now I read only data from LFA1 using net. connector (using RFC function RFC_READ_TABLE) and now I need update vendor data (e.g. NAME1, NAME2, ADRNR etc. from LFA1)
    Our SAP system contains very much duplicate record (many LIFNR has the same STCD2, STCEG etc. but different NAME1 who contains typist's error or something like this. 6000 vendors has 1700 duplicates and incomplete record). Our Administrator don't know how set up SAP so that impossible create duplicite vendors! Because our system SAP contains very, very, very much elementary error, this system is not helpfull for our company.
    Thank you

  • User Exit / BAdI in ME29N on PO Rejection

    Howzit, Guru's!
    SAP has done some sweet things with the PO approval in 4.7. But, can anyone tell me whether there are any User Exits or BAdI's in ME29N that I could use to react to the user pressing the <b>Reject</b> button (SY-UCOMM = 'MEREJECT')?
    I have tried a bunch of possible enhancements and stuck a breakpoint in the GET_INSTANCE method of the CL_EXITHANDLER class. No success so far
    Any suggestions would be greatly appreciated!
    Cheers
    Lyal
    Message was edited by:
            Lyal Schumann

    Thanks a lot, Anji! That is exactly what I am doing. I have played with that BAdI, and, while it is not the exact one, it pointed me in the right direction. The one I eventually settled on is ME_CHECK_ALL_ITEMS. And it's a beauty
    Cheers
    Lyal
    Message was edited by:
            Lyal Schumann

  • Like operator functionality

    We have a simple select query which is using the 'Like' operator on a char(4) column.
    In a oracle windows environment when we have a query such as:
    select col1, col2, col3
    from table1
    where col1 like 'AB'
    it returns everything which is = to 'AB' and doesn't seem to be including the trailing 2 spaces as would be stored becasue the column is char(4)
    In a oracle unix environment when we the same query:
    select col1, col2, col3
    from table1
    where col1 like 'AB'
    it returns nothing...
    It appears as if the version running on a windows environment is truncating the trailing 2 spaces when using the like expression but in a unix environment, it is not. Does anybody have any idea or clue what could be occuring or if there is some database setting which could cause this to occur?

    Quote from Oracle Doc:
    Character Values
    Character values are compared using one of these comparison rules:
    Blank-padded comparison semantics
    Nonpadded comparison semantics
    The following sections explain these comparison semantics.
    Blank-Padded Comparison Semantics If the two values have different lengths, then Oracle first adds blanks to the end of the shorter one so their lengths are equal. Oracle then compares the values character by character up to the first character that differs. The value with the greater character in the first differing position is considered greater. If two values have no differing characters, then they are considered equal. This rule means that two values are equal if they differ only in the number of trailing blanks. Oracle uses blank-padded comparison semantics only when both values in the comparison are either expressions of datatype CHAR, NCHAR, text literals, or values returned by the USER function.
    Nonpadded Comparison Semantics Oracle compares two values character by character up to the first character that differs. The value with the greater character in that position is considered greater. If two values of different length are identical up to the end of the shorter one, then the longer value is considered greater. If two values of equal length have no differing characters, then the values are considered equal. Oracle uses nonpadded comparison semantics whenever one or both values in the comparison have the datatype VARCHAR2 or NVARCHAR2.
    "

  • Like/Upvote Functionality

    I am collecting user submissions for process improvement ideas using an InfoPath form housed on SharePoint.
    I would like to display items from the library behind this form on another page, and allow other users to "like" or "upvote" these ideas. Is there a way to use a webpart to display filtered items from the original library, and then add an
    additional column with a button to count clicks.
    As an extra measure to that functionality, I'd like to be able to sort this list by popularity (number of likes). I have seen similar functionality on the
    www.mystarbucksidea.com page and would like to replicate something similar.
    Is this possible to do on SharePoint?

    How I've achieved this in the past is to set up a separate "likes" list for tracking the number of likes different things have. The likes list had a lookup column going back to the list that contains the idea being liked. In other
    words, each item in the "likes" list was a record indicating that one person liked a specific idea.
    On the original ideas list, I then added a lookup column pointing to the lookup column on the "likes" list, and chose the "count related" option. This gives a count of the number of related likes for each idea.
    That handled the backend challenge of tracking likes per idea, so the only challenge left was giving people a way to like specific ideas--in other words, to easily add entries to the "likes" list.
    I chose to handle this through the JavaScript client object model. My script added an upvote link to the page, with code so that simply clicking the upvote link for an item would create a related entry in the likes list.
    To prevent people from liking the same thing multiple times, you can make a column on the likes list (such as Title) be populated with a combination of the author and the lookup field value, then enforce unique values on that column. You could
    also check the likes list via the JavaScript client object model and disable the upvote link if the user has already liked the specific thing.

  • "Like" sql function not working  in Business Service

    Hi all,
    I have created a query with few Joins (Processing around 4-5 tables).It has Two scenarios, One with Equals and the other with Like function.
    SELECT
    ST.STREET,
    ST.DECOMPLEMENT,
    ST.STATE,
    LC.LOCALITY,
    DS.DISTRICT,
    ST.CDZIP,
    SP.street_type
    FROM
    STREET ST,
    DISTRICT DS,
    Locality LC,
    Street_Type SP
    WHERE
    ST.CDZIP LIKE ?
    AND ST.STARTDISTRICT = DS.DISTRICT (+)
    AND ST.LOCALITY = LC.LOCALITY (+)
    AND ST.STREET_TYPE = SP.street_type (+)
    When There is an Equal Sign after Where clause, The query gives desired output. But when there is a LIKE it does not give any output at all. How can i use this Query using perform operation.

    Hi Arun,
    How are you using it? Using DB Adapter / X-Query function? I have run similar SQL Queries easily through DB Adapter.
    Regards,
    Anuj

  • BAPI to change partner data in Function location

    Hi,
    is there any BAPI,that can be used to change the Partner data in functional locations & equipments.
    Regards,
    Raghavendra

    You can use the BAPI <b>BAPI_EQUI_CHANGE</b> for this purpose.

  • BAPI for change documents like FB09

    Hi
    I need to change the Assignment Number (ZUONR) Field for several document positions just like FB09 ,
    Does somebody knows a BAPI for change document positions (BSEG) ?
    Regards
    Frank

    Hi,
    Please see this link, It may help you.
    Add documents to materials via BAPI
    Regards,
    Shamma

  • Can we implement payment(like paypal) functionality from iphone application

    Hi,
    I need to implement payment functionality like paypal which will provide functionality that user can pay the bill of restaurant.
    I want to know that is it possible and if yes then how can i implement this.
    Thanks,
    Hareh.

    I would imagine you would use the PayPal model where the diner would give his account name or number to the waiter. The waiter logs on and creates an invoice against the users account. The user logs on with his name and password and approves the transaction and the money is transferred to the restaurant's account immediately.
    You could write your own app that attaches to the server directly and prompts the user for their name and password, displays all waiting invoices and lets the user approve. This would also be possible from a regular web browser as well. But you could write a lightweight app specifically for that if you want. You could dress it up with a tip calculator and other things to make it fancy. (Although in the French market the tip is usually included in the bill.)
    The most important thing is to use the existing security measures because you will get much better security using https: to conduct your web transactions then writing your own security model. You also get better security holding this information on the server and not in the phone itself.
    I know you're asking about iPhone only but I would open it up to all browsers - Blackberry, laptops etc. Restaurants could even have a web terminal where I could log in and approve the transaction without the phone. The bigger your potential market the greater your chance of success.
    =Tod

  • Creating Frame-Like Resizing Functionality

    So I’m working on a web application at work, and the customer wants a functionality that we’re not sure how to deliver yet. The closest thing I can relate it to is using frames in HTML. If you were to set up a framed web site, with two frames side-by-side, and leave the frame bars visible, you’d have a bar in the middle, running vertically, to show you where the two windows are divided in half. You can drag that bar to the left or right, making the frames bigger or smaller.
    Our web app, being developed using JSP and Rich Faces, presents a lot of information to the user. This information will be divided in half like described above, and he would like to be able to drag a bar in the middle to make one side bigger or smaller.
    I’m new to web development, and we’re not sure how we’re going to accomplish this. We absolutely do not want to use frames. Any ideas?
    Thanks

    You could explore some of the other component libraries out there, such as Primefaces. The trouble is that you are using Richfaces: I know for a fact that it won't play nice with Icefaces, I don't know if Richfaces and Primefaces can be used together without conflicts.
    Otherwise it will be a manual Javascript job I'm afraid. Be careful when using Javascript toolkits - for example I have seen Richfaces components crash and burn when I included the JQuery js library :/

  • Custome BAPI - declare ITAB and define the Function Module and Subroutine

    Hello Experts
    I want to create a Custom BAPI and it has the following scenario:
    1) a Function Module which collects some records into it internal table, say ITAB
    2) a Subroutine which moved the records from ITAB to BAPI table
    Now, I want to declare ITAB and define the Function Module and Subroutine.
    Where and How can I do this?
    Plz suggest.
    Regards
    BD

    Hi,
      1) Got to SE37 and create an RFC .
      2) Declare the ITAB directly in the TABLES tab of the FM.
      3) Inside the FM source Code tab, collect all the data using SELECT query and directly or by using logic, put the data into the
          ITAB.
      4) Since the data collected is directly put into the itab you dont need a subroutine to be written.
      5) If subroutine is a necessity, then just write PERFORM SUB ROUTINE NAME.
           AND DEFINE THE FORM ENDFORM OF THE SUBROUTINE AFTER THE ENDFUNCTION OF THE FM
       Let me know if any issues....
    Regards,
    Vimal.

Maybe you are looking for