Reg: PO and Requisition

Hi Consultants,
We have a requirement to report the all NOn sale Purchase order and Requision those were approved by a same person(user).
Anyone please advice me or send me any sample query.
i developed below query for this but need to include approval condition.
SELECT pv.vendor_name "SUPPLIER_NAME",
pv.segment1 "SUPPLIER_NUM",
prh.segment1 " REQUISITION_NUM" ,
poh.segment1 "PO_NUM",
nvl(por.release_num,0) "REL_NUM"
( select sum(unit_price * quantity)
from po_lines_all
where po_header_Id = poh.po_header_id) " PO_AMOUNT",
per.full_name "BUYER_NAME",
peb.full_name "REQUESTER_NAME"
FROM po_headers_all poh,
po_lines_all pol,
po_line_locations_all pll,
po_releases_all por,
po_distributions_all pld,
po_req_distributions_all prd,
po_requisition_liness_all prl
po_requisition_headers_all prh,
po_vendors pv,
per_all_people_f per,
per_all_people_f peb ,
WHERE poh.po_header_id = pol.po_header_id
AND poh.approved_flag = 'Y'
AND pol.po_line_id = pll.po_line_id
AND pll.line_location_id = pld.line_location_id
AND pll.po_release_id = por.po_release_id (+)
AND pld.distribution_id = prd.req_distribution_id
AND prd.requisition_line_id = prl.requisition_line_id
AND prl.requisition_header_id = prh.requisition_header_id
AND poh.vendor_id = pv.vendor_id
AND poh.agent_id = per.person_id (+)
AND pld.deliver_to_person_id = peb.person_id
Thanks,
Ar

Use the po_action_history table to find out who approved the req/po.
The object_id is the req_header_id or po_header_id depeneding on the object_type_code.
Object type code tells you if it was a po or a req.
Look for action_code='APPROVE'
Hope this answers your question.
Sandeep Gandhi

Similar Messages

  • How to change category on open and closed PO and Requisition lines

    We realized a little late that our category definition needs change. But when we change the category definitions (including structure) how do we change the existing PO lines and Requisition lines to have the new categories? We checked for any APIs, but there are none. What other option do we have?

    changing the name of the home directory and the login name is not advisable. it can be done
    http://www.macworld.com/article/132693/2008/03/changeshortusername.html
    but a better way would be to make a new user account using system preferences->accounts. call it whatever you want. log into that and delete the old account. since you just got this computer you don't have any data on it yet, right?

  • What is the link between PO and Requisition in database side

    hello friends,
    please can any one tell me that what is the link between PO and Requisition in database side. means after creating the requisition we will go for create the PO based on that requisition.
    want to know that what is the link between both in database side.
    Thanks in advance
    krish.

    Hi,
    The link is at distribution level, between:
    PO_DISTRIBUTIONS_ALL.REQ_DISTRIBUTION_ID
    and
    PO_REQ_DISTRIBUTIONS_ALL.DISTRIBUTION_ID
    Hope it helps.

  • Creating Planned orders and Requisitions for a particular MRP controller and for all the others only Requisition is to be created.

    Hi Experts,
    Currently we run Program 'RMMRP000' as a batch job to create Planned orders and requisitions.
    The client wants that Planned orders and Requisitions should be created for a particular MRP controller and for all the others only Requisition is to be created.
    I implemented Exit 'EXIT_SAPMM61X_001' in the following manner by passing MRP controller to user_key.
      IF mt61d-dispo <> user_key.
        no_planning = 'X'.
      ENDIF.
    But as you can see that this will not meet my client requirement.
    If any of you has worked on similar requirement / if any one knows that this is achievable or not,
    please share your inputs.

    Moved from SAP ERP Sales and Distribution (SAP SD) to ABAP Development
    G. Lakshmipathi

  • Reservation and requisition for material in MO from the equipment BOM only

    Dear all,
    i want to create material reservation and requisition from the equipment BOM only which is maintain against that equipment ( in the 'list' tab of component).and which material is not in that BOM, system should not allow to create material reservation and requisition of that material in maintenance order.

    Shahanawaz,
    You could try making the material and material text fields display-only via field selection.
    Otherwise, try user-exit CNEX0026 (general inspection of material) via TCode SMOD.
    PeteA

  • E-Recruiting: Posting and Requisition relationship

    Greetings,
    My  question has a couple layers to it.  An internal audit dictates a review of job posting for a particular work location in a given time frame.
    I have requisition (NB) IDs for that site.
    First question: Is there a relationship between req (NB) and posting (NC)?  I need to identify the posting for each req ID that I have but was unable to do so through table 1001.  Is there a roundabout way to get to the NC object from NB?
    Second question: Once I've identified posting (NC), how might I produce the text objects associated with each posting ID en masse.  Table 5121 points to text objects, but I do not know of how to get to them.  I would like to avoid having to go through the posting text individually through the front end.  I've seen a couple posts regarding this topic, but I'm uncertain of the mechanics discussed.  The posts I've seen are:
    /community [original link is broken]
    Description of requirements field in e recruitment
    Thank you in advance for any assistance.
    Regards,
    Brad

    REPORT  zrwe_0001.
    *  Declarations
    *-- Type Pools --------------------------------------------------------*
    TYPE-POOLS:
      abap.
    *-- Types -------------------------------------------------------------*
    TYPES:
      BEGIN OF __ls_result,
        requ_key         TYPE hrobject,
        requ_header      TYPE rcf_requisition_header,
        post_key         TYPE hrobject,
        post_header      TYPE string,
        post_company     TYPE string,
        post_department  TYPE string,
        post_project     TYPE string,
        post_task        TYPE string,
        post_requirement TYPE string,
        pinst_guid       TYPE rcf_pinst_guid,
        pinst_start      TYPE rcf_posting_start_date,
        pinst_end        TYPE rcf_posting_end_date,
        pinst_chan       TYPE rcf_posting_channel,
        pinst_chan_txt   TYPE rcf_posting_channel_txt,
      END   OF __ls_result,
      __lt_result TYPE STANDARD TABLE OF __ls_result.
    *-- Field symbols -
    FIELD-SYMBOLS:
      <lv_any>      TYPE                   ANY.
    *-- Variables -
    DATA:
      lr_pins_hdl   TYPE REF TO            cl_hrrcf_posting_inst_bl,
      lv_plvar      TYPE                   plvar,
      lv_channel    TYPE                   rcf_posting_channel,
      lt_5122       TYPE STANDARD TABLE OF hrp5122,
      ls_5122       TYPE                   hrp5122,
      ls_requ       TYPE                   rcf_s_requisition_info_text,
      lt_result     TYPE                   __lt_result,
      ls_result     TYPE                   __ls_result,
      ls_chan       TYPE                   t77rcf_postchn_t,
      ln_count      TYPE                   i,
      lv_str_trick  TYPE                   string,
      lr_exc        TYPE REF TO            cx_hrrcf.
    Selection Screen
    *-- Selection Screen Definition -
    SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:
      o_chan FOR lv_channel.
    PARAMETERS:
      p_from TYPE rcf_posting_start_date,
      p_to   TYPE rcf_posting_end_date.
    SELECTION-SCREEN END   OF BLOCK b01.
    *-- Selection Screen Processing -
    AT SELECTION-SCREEN ON p_from.
      IF p_from IS INITIAL.
        MESSAGE e001(00) WITH 'Enter a from date'.
      ENDIF.
    AT SELECTION-SCREEN ON p_to.
      IF p_to IS INITIAL.
        MESSAGE e001(00) WITH 'Enter a to date'.
      ELSEIF p_to LT p_from.
        MESSAGE e001(00) WITH 'To date has to be greater or equal from date'.
      ENDIF.
    Processing
    -- Init the runtime -
    INITIALIZATION.
    get handler class instance
      lr_pins_hdl = cl_hrrcf_posting_inst_bl=>get_instance( ).
    get the active plan
      CALL FUNCTION 'RH_GET_PLVAR'
        EXPORTING
          no_message = abap_true
        IMPORTING
          plvar      = lv_plvar
        EXCEPTIONS
          OTHERS     = 0.
    make a 1 space string
      lv_str_trick = ' a'.                                      "#EC NOTEXT
      lv_str_trick = lv_str_trick(1).
    -- Processing -
    START-OF-SELECTION.
    get all publications which were really published (PUBLISHED_DOC <> 0)
    and which were published in the date borders
      SELECT * FROM hrp5122 INTO TABLE lt_5122
        WHERE
          plvar           =  lv_plvar                             AND
          otype           =  cl_hrrcf_posting_bl=>c_otype_posting AND
          subty           =  '    '                               AND "#EC NOTEXT
          istat           =  '1'                                  AND "#EC NOTEXT
          endda           =  '99991231'                           AND "#EC NOTEXT
          posting_channel IN o_chan                               AND
          published_doc   <> '000000'                             AND "#EC NOTEXT
          start_date      <= p_to                                 AND
          end_date        >= p_from.
    gather the posting texts and requisition information
      LOOP AT lt_5122 INTO ls_5122.
        CLEAR:
          ls_result,
          ls_chan.
      read the frozen doc
        TRY.
            ls_result-pinst_guid       = ls_5122-pinst_guid.
            ls_result-pinst_start      = ls_5122-start_date.
            ls_result-pinst_end        = ls_5122-end_date.
            ls_result-pinst_chan       = ls_5122-posting_channel.
            ls_result-post_key-plvar   = ls_5122-plvar.
            ls_result-post_key-otype   = ls_5122-otype.
            ls_result-post_key-objid   = ls_5122-objid.
            lr_pins_hdl->get_frozen_post_inst_data(
              EXPORTING
                p_pinst_guid               = ls_5122-pinst_guid
              IMPORTING
                p_post_header              = ls_result-post_header
                p_post_company_desc        = ls_result-post_company
                p_post_department_desc     = ls_result-post_department
                p_post_project_desc        = ls_result-post_project
                p_post_task_desc           = ls_result-post_task
                p_post_requirement_desc    = ls_result-post_requirement
                ps_requisition_info_text   = ls_requ ).
            ls_result-requ_key-plvar   = ls_requ-plvar.
            ls_result-requ_key-otype   = ls_requ-otype.
            ls_result-requ_key-objid   = ls_requ-objid.
            ls_result-requ_header      = ls_requ-header.
            " Channel Text
            cl_hrrcf_t77rcf_postchn=>read_description(
              EXPORTING
                langu            = sy-langu
                posting_channel  = ls_result-pinst_chan
              IMPORTING
                t77rcf_postchn_t = ls_chan ).
            ls_result-pinst_chan_txt   = ls_chan-description.
            APPEND ls_result TO lt_result.
          CATCH cx_hrrcf INTO lr_exc.
            cl_hrrcf_exception_handler=>write_exception_log( ex = lr_exc ).
        ENDTRY.
      ENDLOOP.
    excel download
      " replace all Tabs and CT/LF or the excel will be messed up
      LOOP AT lt_result INTO ls_result.
        ln_count = 1.
        WHILE 1 = 1.
          ASSIGN COMPONENT ln_count OF STRUCTURE ls_result TO <lv_any>.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
            IN <lv_any> WITH lv_str_trick.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf
            IN <lv_any> WITH lv_str_trick.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline
            IN <lv_any> WITH lv_str_trick.
          ADD 1 TO ln_count.
        ENDWHILE.
        MODIFY lt_result FROM ls_result.
      ENDLOOP.
      cl_gui_frontend_services=>gui_download(
        EXPORTING
          filename                  = 'C:\myfile.csv'
          write_field_separator     = abap_true
        CHANGING
          data_tab                  = lt_result
        EXCEPTIONS
          OTHERS                    = 0 ).
    simple list output
      LOOP AT lt_result INTO ls_result.
        WRITE: / 'Requisition:', ls_result-requ_header,
               / 'Posting    :', ls_result-post_header,
               / 'Channel    :', ls_result-pinst_chan_txt.
        SKIP.
        WRITE: / 'Company:', / ls_result-post_company. SKIP.
        WRITE: / 'Department:', / ls_result-post_department. SKIP.
        WRITE: / 'Project:', / ls_result-post_project. SKIP.
        WRITE: / 'Task:', / ls_result-post_task. SKIP.
        WRITE: / 'Requirement:', / ls_result-post_requirement. SKIP.
        ULINE. SKIP.
      ENDLOOP.

  • Item categories in agreement and requisition incompatible

    Hi gurus,
    I have this error message when i create a requisition with an outline agreement. Can anyone pls help me with this error. I do not know how to configure this.
    Thank you so much!

    Hi ,
    I  create a supply instruction po  with an contract. and i get error massege "Item categories in agreement and requisition incompatible" even the contract not reference to requisition ,Can anyone pls help me with this error. I do not know how to configure this
    Thanks
    Asher Binhas

  • Account assgt. cats. in agreement and requisition incompatible

    Hi.
    Pl help me.
    Error message at the time of CO01;
    "Account assgt. cats. in agreement and requisition incompatible"
    Regards,
    Vivek Nehete

    Hi Seema,
    I am trying to do automatic service PR with ref. to Value contract.After complition of production order service pr generated.Because first operatiob is inhouse and next is brazing but done in own premises with labour contract.
    A/c assignment cat.U and item category D.
    Pl help me above scenario .
    Regards,
    Vivek Nehete

  • PO and Requisition Notifications

    Using standard functionality in R12,
    1. When purchasing buyer returns the requisition with a reason, can the requestor, req approver be notified via email about this? How?
    2. Let say, the PO approver (someone from finance dept) rejects the PO due to lack of funds, the buyer will be notified via the workflow and he cancels the PO. What can the buyer do to notify this to the requestor and req approver(manager)? What happens to the requisition as the PO was already created in this case but cancelled?

    1. If a req. is returned, Oracle sends a notification to the preparer. If you need to expand this to include requestor or approver, you will have to write an alert.
    2. If a po gets rejected and was never approved, you can NOT cancel it. You have to delete it. (I am assuming that the "archive upon" option is set to approval)
    When a buyer deletes a PO, the req. goes back to the autocreate pool.
    When a buyer cancels a PO, he/she has a choice to cancel the underlying requisition. You will notice that there is a checkbox called "Cancel Requisition" on the Cancel PO window. If the box is unchecked, the requisition returns to the autocreate pool. If the box is checked, the requisition gets canceled. You may have to write an alert or modify the workflow to send a notification out if you want someone (e.g the approver) to be notified.
    Hope this helps,
    Sandeep Gandhi

  • Reg: Message and BPM

    Hi
    I'm having a scenario where i use a JDBC adapter to extract data from a DB. As a result of the query say, 10 rows are returned as message to XI server. I have a transformation (BPM) set and the receiver(target system) is a file. When i open the file to see its contents i can see only the first record been transfered. The mapping part used for the transformation node is having IF condition. But all the fetched records satisfies the conditions in the mapping.
    Pls let me know the corrective step.
    reg: Prabhu

    Hi,
    1)Check the input XML i.e all 10 records are coming into XI . This you can check in SXMB_MONI
    2) Then you can test the mapping in the integration Reposiotry .. So now you can get if any mapping problem. For this , check is the occurence of target strcuture is 1..n or 0.n
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    3) If mapping is correct , then check the RWB->Message Monitoring->Message Display Tool and check the payload.
    4) If this is correct, then check the File COntent Conversion of the Receiver File Adapter.
    Hope this helps,
    Regards,
    Moorthy

  • Purchase orders and requisitions - R12 user interfaces

    Hi,
    I see that the purchase order can be registered in the system by two different interfaces (I'm running R12.1.1): Using Oracle forms (Navigation path: Purchasing Super user: -> Purchase orders -> Purchase orders) and using Java html pages (Navigation path: Purchasing Super user: ->Buyer workspace ->Orders).
    I have two questions:
    1. The second option (using java pages) is not documented in the usersguide. Is it fully in production or they are still developing it? Why there are two different interfaces for the same purpose?
    2. I see that from Java pages interface I can only see requisitions, but I cannot enter new ones (Navigation path: Purchasing Super user: ->Buyer workspace ->Requisitions). Should I enable somewhere this or the requisition is not developed using Java pages interface?
    Thank you

    993322 wrote:
    Hi,
    I see that the purchase order can be registered in the system by two different interfaces (I'm running R12.1.1): Using Oracle forms (Navigation path: Purchasing Super user: -> Purchase orders -> Purchase orders) and using Java html pages (Navigation path: Purchasing Super user: ->Buyer workspace ->Orders).
    I have two questions:
    1. The second option (using java pages) is not documented in the usersguide. Is it fully in production or they are still developing it? Why there are two different interfaces for the same purpose?
    2. I see that from Java pages interface I can only see requisitions, but I cannot enter new ones (Navigation path: Purchasing Super user: ->Buyer workspace ->Requisitions). Should I enable somewhere this or the requisition is not developed using Java pages interface?
    Thank you
    http://docs.oracle.com/cd/E18727_01/doc.121/e13410/T446883T443956.htm
    http://www.apps2fusion.com/training_demo/puneetk/Professional-Buyer-Work-Center.pdf
    HTH
    Mahendra

  • How to create a new document type for PO and Requisition

    Hi All
    Can you please help me with the steps of creating a new document type for PO and PR. Also the steps that need to be update for the procure pay cycle to work properly. 
    Once the document type is been created. I want to create the PO referecing the new PR and PO document type.I am new in MM.
    Thanks, Ros

    Hi,
    1. You can create new PR and PO docu types at the following path:
    For PR docu type:
    First you need to create number range for docu type or you can use existing number range also. The path for creation of no. range is
    SPRO>Materials Management->Purchasing->Purchase Requisition->Define Number Ranges
    Then create PR docu type at below path and assign no. range to PR docu type here only
    SPRO>Materials Management->Purchasing->Purchase Requisition->Define Document Types
    For PO docu type:
    Follow same procedure as mentioned for PR docu type. Path is
    SPRO>Materials Management->Purchasing->Purchase Order->Define Number Ranges
    SPRO>Materials Management>Purchasing->Purchase Order->Define Document Types
    If you want to create PO referencing new PR docu type, link the PR docu type to PO docu type at below path:
    SPRO>Materials Management->Purchasing->Purchase Requisition->Define Document Types--> Link purchase requisition - document type
    Regards
    Chetan

  • No: of Approvers on PO and requisition

    How can we find from backend no: of approvers that a PO or requisition have?
    Thanks
    SS

    Not sure whether this is what you want, but you can check PO_ACTION_HISTORY and linked that table to PO_HEADERS_ALL.
    It is similar like you click - View Action History in PO Forms.

  • PO and Requisition approvals

    In R12, if we set the purchasing system to use position hierarchy after defining all the jobs and positions.
    Is it advisable to change back to the employee/supervisor relationships setup later just by unchecking the option in the financial options for that OU? Also does it apply the same to the vice versa too? System doesn't get corrupted right?

    1. Make sure that the approval rules and assignments are done accordingly. For position hierarchy the position is used as for the association; for employee supervisor job is used as key for the association.
    2. For PR approval, the approver list is generated when the requisition is submitted (unless you are using AME for requisition approval). But for PO the next approver is determined on the last approver's response. So the In Process PO Approvals will realize this change immediately; but the In Process PR approvals may have a lag (because of pre determined approval list). Please test the PR approvals once.
    - Shiva

  • WF - Purchase Order and Requisition

    hi,
    I'm work with 4.6c release 620. I set as active the trace of events workflow. But when i work with me21n, me51n and me54n my trace(swel) dont show nothing.
    How can i work with workflows and objects?
    Object: BUS2012, BUS2009..etc.
    thanks,
    Alexandre

    Alexandre,
    You need to maintain the customizing node MM-Purchasing-Purchase Requisition-Release Procedure.
    The event creation function module checks the tables maintained via the above customization and will trigger the requisition events only if the field T16FC-FRGWF is set to 1 or 9.
    Ask your functional contact to configure the release procedure to suit the above.
    -Kiran

Maybe you are looking for

  • Can't access iTunes shopping cart.  Who can help?

    For some reason I can not access my iTunes shopping cart. It shows me how much money I have to spend, but I can't see any of the songs that I have added to the shopping cart. Has anyone ever had this problem? Please advise ASAP. I'd like to buy some

  • Hi-can any body give me material of  (XI)

    HI ALL,       iam venu gopal ,i working in abap ,can any body give matetail of xi ..plz send to me my mail id [email protected] thanks & regards venu gopal

  • Acrobat Reader X "An Internal Error Has Occurred"

    I have a Windows 7 Professional 64-Bit machine running Acrobat Reader X.  Both the machine and Reader are updated with the latest patches. The primary user on the machine can use the program.  A second (also an administrator) user on the same machine

  • CAN FLEX HELP ME SOLVE THESE?

    Hi, We are using FLEX trail version tool and we need further clarifications on our requirements which are mentioned below, for evaluating the tool: Req. #1: We have *.DIR movies and we want to have *.PNG images out of these movies. Is it possible to

  • Multiple Delta Runs inGL4

    The requirement is to run a seperate delta for specific company codes on 0FI_GL_4 extractor. Here is the example. We need a seperate delta run for Company Codes 1400 to 1600, where as the range of company codes are 1 to 9999. The idea is to run 1. IN