Purchase Requisition Value

Hi all,
I'm Creating a Workflow for Purchase Requisition using BUS2105, Once workflow started it should check for PR Value in the particular activity. for this whether we need to create a new task or any existing one available. based on this check how can we send the extended notification.
eg: If Purchase value is 299-999 Approver 1
                                  1000-1599 Approver 2
                                   1600-2000 Approver 3.
I need to send mail for approver
Please help me for above details.
Advance Thanks!

Hi,
First of all I should Thank you for your Information!
Actually the setting which you specified one are done by Functional consultant, but now i need to check the single PR and it's value if PR value lies between 299-999 then I should send mail to APPR1, if PR value 1000-1599 it should send to APPR2... like this i need to do.
Initially I have Created a ZBUS2105 with subtype of BUS2105.
I need to get Value of PR value so I need to add a task and whether i need to write any code on to get PR value.
Please Help for this, I'm very new to Workflow environment.

Similar Messages

  • FF7B-Liquidity Forecast doesn't show Sales Order & Purchase Requisiti Value

    Hi Experts ,
    Sales Order and Purchase Requisition value not displaying in the Liquidity forecast report - FF7B. I have already created Planning Levels and assigned to the internal codes in tcode - OT47. Sales Order and Purchase Requisition has been created after assigning planning levels to the internal codes. Please help.
    Thanks and Regards,
    Arabinda Parida

    HAve you other levels included in FF7b?
    Did you do a rebuild in FDFD?
    Regards
    Hein

  • To find Purchase Requisition value

    Hi Workflow gurus,
    I have an issue with respect to workflow, where I need to send an external mail to MS outlook, once the Purchase requisition is saved (created). Based on Purchase requisition value, a different person like Manger, Director, President or Vice president has to approve the requisition. Mail has to go any one of these.
    Here I can use the business object BU2105 and incorporate a task which contains the function module ''SO_DOCUMENT_SEND_API1' to send the external mail.
    However I don't know how to get the value of Purchase requisition and mail id of these people.
    I request your valuable suggestion.
    Regards
    Harikrishna

    Hi,
    You can chek the Value of the  Purchase requisition in
    Table EBAN
    and mail id will be triggered through the User Id of  these people (SU01 trx)...
    Thx
    Raju

  • Overall Purchase Requisition

    Dear Gurus
    I am facing the problem of overall purchase requisition.
    I have GFWRT - Total Purchase Requisition Value as a characteristic in Class ZPR_Release.
    Now I am attaching this ZPR_Release with PR Release Group.
    Now if I use this class in PR Group with overall Requisition Option Either in document type or in Purchase Requisition Group state, it is not working however when I remove the check of overall Req, it is working fine.
    Can you please tell me what is the issue and what configuration I am missing
    Regards
    Sajid

    Hi Sajid,
    Few things to check:
    1. Check the Class Characterisitc definition in CT04 and make sure the field GFWRT is mapped from the Communication Structure (table) CEBAN.
    2. Check if the Overall Rel indicator is set for the PR Doc type definition in addition to the Rel Group settings
    Set your Rel Strategy parameters in IMG andgo to ME54N and you should see the Release Strategy tab at the PR HEADER (Not at item detail section this time)
    Let me know if this was helpful

  • Default Values in Purchase Requisition

    Hi MM Experts,
    I want to set default values for Purchasing Organisation and delivery address for a particular user in transaction ME51N(Purchase requisition creation).
    Can someone please advise me on how to do it?
    I tried using the "Default Values" button, but the fields Purch Org and Delivery address are not there.
    Thanks in advance.
    cheers,
    Randi

    Hi Randi,
    In ME51N, once the source of supply is assigned, the purchasing org will default to the porg defined for the vendor that is
    assigned. For MRP, Purchase Organization will only be taken from the Source List. The POrg. cannot be dopted automatically due to the reasons mentioned in the Note 73241.
    73241 ME51: User parameter EKO is not generated
    Regards,
    Purnima

  • Rounding Values while creating purchase requisitions using ME51N

    Hi MM Experts,
    I have created some materials with a Rounding Value maintained in MRP1 View of the material master.
    Whenever I raise a purchase order, the order quantity rounds off to the value maintained in the material master which is the correct functionality.
    But when i try to create a purchase requisition using ME51N, the rounding functionality doesn't work.
    Example: Rounding value (in MRP1 view) of a material is 25.
    The order quantity entered is 4. But before saving the PURCHASE ORDER the order quantity will be changed to 25(which is the rounding value). This is the correct functionality but doesn't happen with the PURCHASE REQUISITION (ME51N)
    Can someone guide me on how to make the rounding value work for purchase requisitions when using ME51N?
    Thanks in advance.
    cheers,
    Randi

    Hi!
    i had the same problem with a company.
    i did not find any customizing possibilities.
    I solved it with BAdI ME_PROCESS_REQ_CUST
    Method PROCESS_ITEM.
    I hope this helps
    Flo

  • Do not want Budget check & Commitment value for purchase Requisition

    Hi Experts,
    I hope you all are doing well.
    My client's requirement is that at the time of Creation of Purchase Requisition there should be no budget check against WBS element and also Commitment value should not be for Purchase Requisition.
    Please suggest.
    Thanks & Regards

    Hi Gokul,
    Thanks for ur quick reply.
    I have done changes in tolerence limit (activated it for PO only).
    Now i created 1 Project PR of more than value of budget (system didnt check the Budget against WBS) but when i am trying to create PO with reference to same PR, system is giving error of budget. That is OK for me.
    Now my requirement is to not take PR value as commitment in my reports, i want only PO value in Commitment column of repport.
    I have read all 3 notes suggested by you. Can u tell me whcih one should i implement to stop PR value as commitment in reports.
    Thanks & Regards

  • Creation of Purchase Requisitions from Forecasting Values

    Dear Friends
    I coud do forcasting and generated the forecasting values and the values are also visible in the MD04 Stocks/Requirements List. Please guide me to create the Purchase Requisitions from the forecasting values.
    Thanks and Regards
    Suresh

    Depending on the MRP type in the material master you'll need to run either MRP or MPS.  I'd start with single item single level which will just plan the one material.  The Tcode is MD03 for MRP items and MD42 for MPS items.  It sounds like you're new to this so you should look around at the settings in the MRP1 - 4 views of the material master to understand the different settings that control the output of MRP (e.g. MRP Type, Lot Size Data, etc).  Lastly, check the MRP Control parameters that are entered when you run the MRP transaction.  Specific to your question, running it with Create Purchase Req 1 or 2 will create Purchase Reqs directly.
    Hope this helps.

  • Purchase requisition total (header) value

    Hi Everybody
    I have this scenario: When doing the PReq approval, I don't see the total value of the requisition, so my question is, Where can I find the value of the total requisition. In TCodes ME52N and ME54N I can see only the value at item level.
    Thanks
    Joules

    What release procedure did you define:
    Release Procedure for Purchase Requisitions
    Two different procedures are available for requisitions:
    With classification
    With this procedure, requisitions can be released both at item level (i.e. item-by-item) and in total. The latter approach is also termed "overall release".
    Without classification
    With this procedure, requisitions can only be released at item level.
    The two procedures are mutually exclusive (that is to say, you must decide in favor of one of them only - you cannot use both).

  • Changing Item Values before saving Purchase Requisition in me51n, set_data function

    Hello,
            I have written a user exit, which is called whenever changes are made to a purchase requisition. User Exit is MEREQ001 , function module EXIT_SAPLMEREQ_010 . My requirement here is that the Requisitioner should be 135 for every PR item under certain conditions. Therefore whenever there is any change made to the PR, before saving the PR item, I need to set the Requisitioner to 135, give a status message saying that the Requisitioner is set to 135 and save the Pr with the changed values. Following is the code I have written in EXIT_SAPLMEREQ_010. However, the set_data function called below does not change the PR values. Pls help
    data: lt_item type mmpur_requisition_items,
           wa_item type mmpur_requisition_item,
           wa_itemdet type mereq_item,
           wa_itemref type ref to if_purchase_requisition_item,
           w_message type i.
    constants: c_135 type afnam value '135'.
    call method im_req_header->get_items
         receiving
                 re_items = lt_item.
        loop at lt_item into wa_item.
         wa_itemref = wa_item-item.
         wa_itemdet = wa_itemref->get_data( ).
         if wa_itemdet-afnam ne c_135.
           w_message = 1.
           wa_itemdet-afnam = c_135.
           call method wa_itemref->set_data( wa_itemdet ).
         endif.
       endloop.
      IF w_message = 1.
        MESSAGE 'Requisitioner defaulted to 135 for all items' TYPE 'I'.
      ENDIF.

    Hi Sachin,
               I am able to get a reference to if_purchase_requisition_item in my code (wa_itemref ) and am also able to access each of the line items in the PR in the work area wa_itemdet.
    At this point in the code ( wa_itemdet-afnam = c_135 ) , the work area value is set to '135', However, call method wa_itemref->set_data( wa_itemdet ), does not change the values of the work area wa_itemdet . Pls help

  • Error in new purchase requisitions, for already deliverd materials

    Dear all,
    I have a problem with newly created purchase requisitions, although material was partially delivered and no delivery is expected anymore.
    For example I have ordered 1767kg of oil and a total sum of 1766.2kg was deliverd. This means only a minor amount of material was not deliverd and only 80gramm are missing. The purchase value key allows a 5% over and under delivery.
    Usually I would expect, that because of the purchasing value key of 5 % over and under deliverance allowence this situation should not occur anymore. Additionally at the time of goods receipt the key of final delivery was set and the purchase order is updated correctly.
    But when I run the MRP again I will have another purchase requisition. The dependend requiement of the material above still existis as production is not finished yet or this is still a planned order.
    What keys do I need to set in total for allowing a "partial delivery"?
    - Purchaseing value key in the material master
    - Delivery completed at the time of goods receipt
    Maybe this question is to basic as I cannot find any questions / answers related to this issue here in the forum.
    In some points, I found that I need to set up the vendor accordingly to set up partial deliveries. But I cannot find the right setting to allow the vendor to do so. I use MK02 for the change of the vendor settings.
    Thank you very much for your support!
    With best greetings,
    Bjoern

    Hello Jürgen,
    yes after thinking about this issue again, I think this might not be an appropriate solution. Now I am thinking about other possibilities.
    1) Automatically change the value in the production order at the time of saving MIGO - will not create any more missing material messages and no new purchase requisitions .
    2) Errror message, that for this positions no more postings are possible as the purchase order still remains "open"
    3) I need to find the customizing of the indicator "delivery completed". At the moment I just dont see, the influence of this indicator.
    Sorry for my "stupid" questions, but I am quiete new to these MM topics. Up to now I was always doing only PP and QM but our collegue for MM has left the team and there are some open issues which now belong to me. Lucky me.
    I have created a new posting at:
    With best greetings,
    Bjoern

  • Help needed for enhancement in Purchase requisition

    Hi all,
    Our client uses me59n to generate PO's automatically using purchase requisitions.
    Now, the requirement is ...
    If net Purchase value  is 0 in purchase requisition, then
    Free(UMSON) field in Purchase order shoud be "checked".
    lemme explain the steps a bit detail.
    1. lots of purchase requisitions will be created in me51n.
    2. Client will use me59n to generate PO's automatically, using Purchase requisitions.
    3. purchase orders will be created.
    3. Now, i am in search of a badi/user exit , which will
         if netPurchasevalue(gswrt) = 0
            (free)umson = X.
         endif.
    so , i need a enhancement, which links both fields(gswrt) from purReq & (umson) in PO. 
    please lemme know if anybody have experience on similar issues earlier.
    Regards.
    santosh.

    Hi,
    Try implementing the BADI -ME_PROCESS_PO_CUST ...the method "PROCESS_ITEM" can be used to do the check that you want...
    Thanks,
    Renjith

  • Purchase requisition is not being displayed in FM area, CJIA

    Hi
    Project cash management is activated in our system, when creating purchase requisition from project builder with account assignment 'Q' system does not generating any document in FM area (CJIA). Contradicting to this, system generating document in FM area when creating purchase requisition through ME51N transaction with account assignment Q and setting project WBS to account assignment object.
    Later, comparing both purchase requisitions using ME5J, field committed item showing different values (default layout do not display this field, need to added from change layout settings). Can any one help us to find the settings which derives the committed item field in purchase requisition?
    Screen shots are attached for detailed understanding.
    Thanks

    Sanjeev,
    In EBAN table both records are present with special stock indicator Q.  But these documents are not available in second table COOI.
    In customizing, KOAB for order category 20 (network) don't have indicator commitment management, whereas different order category having this indicator. Possibly, this would be causing the issue?? if so please help us in this direction. One more point that component with item category L (non-stock) are displayed in CJIA report.
    Checked OPSV and found both the check boxes are ticked for order category 20.
    Thanks

  • Release strategy for purchase requisition does not kick in

    Hi Gurus!
    I've been struggling with this issue for some weeks now.
    I have set up the release strategy configuration for purchase requisitions with classifications.
    However, if I create a purchase requisition the release functionality is not taken into account by the system.
    See below some more information regarding my configuration:
    1. I've created a new characteristic "REL_PR_GROUP". Status: released, Multiple values, Number of Chars 3, 7 values (TR1, TR2, TR3....TR7), Table name: CEBAN, Field name: EKGRP, Procedure for value assignment set to not ready for input.
    2. I've created a new class: "REL_PR_ANPC". Class type 032, Status: released, Same classification: do not check, Char: "REL_PR_GROUP"
    3. I have one release group "T1", Rel. object 1, OverReqRel is marked, Class: "REL_PR_ANPC"
    4. I have 5 release codes. Grp: T1, Code: 01....05
    5. I have 2 release indicators:
    "R = Released", Rel. for ordering is marked, Changeabil: 4, Value chgs. 100,0
    "X = Blocked",  Changeabil: 4, Value chgs. 100,0
    6. I have 1 release strategy:
    "T1 with Grp T1"
    - one release group, 01 Manager
    - release prerequisites not applicable because of only one release group
    - release status, nothing marked = blocked, 01 marked = released
    - classification, purchasing group is TR1 or TR2 or TR3 or TR4 or TR5 or TR6 or TR7
    I intentionally kept the configuration as simple as possible so I can try to get it working first.
    Now if I create a purchase requisition for an item with release group T1, I would expect the release strategy to be activated. However, this is not the case. I don't see the "release status" tab in the PR, and if I try to relase via ME54 the system says the PR is not relevant for release.
    Could you please assist in getting this working?

    Hi,
    Have you checked in CL30/CL30N if your release strategy is derived successfully?
    See section 3 of Note 365604. A small section of it:
    You can use transaction CL30 search for an object using the data
    of the purchase requisition/purchase order. Here, it is important
    that the object search determines exactly one strategy. If this
    is not the case, this indicates that there are overlapping
    strategies in the system or that the release strategies in
    Customizing do not correspond with those from transaction CL24.
    See the previous point. If the object search returns more than
    one result, the system subsequently determines an incorrect
    release strategy or no release strategy at all.
    If it is derived successfully, next, check the user exit EXIT_SAPLEBND_001 as per Note 371667:
    The following assignment statement has to exist within activated SAP
    enhancements M06B0002 (include zxm06u13) and M06B0005 (include zxm06u31)
    for purchase requisitions:
         E_CEBAN = I_CEBAN.
    Regards,
    Purnima.

  • Generated a report which gives PR(Purchase Requisition) analysis using ALV.

    hi experts,
    please give me tables and fields for following report, and also exlain me briefly,
    Generated a report which gives PR(Purchase Requisition) analysis using ALV.
    thanks in advance,
    radhakrishna

    Hi
    please find this report which link SO PO PR and Prd Ord and there status.
    >
    REPORT z_so_info.
    TABLES: vbak, vbap, afko, afpo.
    *Field catalog
    TYPE-POOLS: slis.
    DATA: lv_repid TYPE sy-repid VALUE sy-repid,
    xfield TYPE slis_t_fieldcat_alv,
    afield TYPE slis_fieldcat_alv.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(25) text-002.
    SELECT-OPTIONS: so_so FOR vbak-vbeln OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
    PARAMETERS:
    p_kunnr LIKE vbak-kunnr, " sold-to
    p_kunwe LIKE vbak-kunnr. " ship-to
    SELECTION-SCREEN END OF BLOCK b2.
    *Constants
    CONSTANTS: c_zor TYPE vbak-auart VALUE 'ZOR',
    c_we TYPE vbpa-parvw VALUE 'WE',
    c_ag TYPE vbpa-parvw VALUE 'AG'.
    c_space TYPE space.
    *Ranges
    RANGES: ra_parvw FOR vbpa-parvw,
    ra_kunnr FOR vbpa-kunnr.
    *Tables
    DATA: BEGIN OF gt_output OCCURS 0,
    vbeln LIKE vbak-vbeln, " sales order number
    posnr LIKE vbap-posnr, " SO item number
    matnr LIKE vbap-matnr, " material number
    sh LIKE vbpa-kunnr, " Ship-to
    sp LIKE vbpa-kunnr, " Sold-to
    lifnr LIKE ekko-lifnr, " Vendor
    bstnk LIKE vbak-bstnk, " PO number
    banfn LIKE vbep-banfn, " Purchase requi
    po_st TYPE char30, " PO status text
    pstyv TYPE vbap-pstyv, " Item catagory
    aufnr LIKE afpo-aufnr, " Production Order
    prd_stat TYPE string, " Prd order status
    END OF gt_output.
    DATA: wa_output LIKE gt_output.
    FIELD-SYMBOLS: <fs_output> LIKE gt_output.
    *Table for sales order and PO
    TYPES : BEGIN OF gs_data,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    pstyv TYPE vbap-pstyv,
    matnr TYPE vbap-matnr,
    END OF gs_data.
    DATA: gt_data TYPE STANDARD TABLE OF gs_data,
    wa_data TYPE gs_data.
    *Table for Production Orders
    TYPES: BEGIN OF gs_prd,
    aufnr TYPE afpo-aufnr,
    posnr TYPE afpo-posnr,
    kdauf TYPE afpo-kdauf,
    kdpos TYPE afpo-kdpos,
    wepos TYPE afpo-wepos, "Goods Receipt Indicator
    elikz TYPE afpo-elikz, "Delivery Completed Indicator
    objnr TYPE aufk-objnr, "Object number
    getri TYPE afko-getri, "Confirmed Order Finish Date
    gltri TYPE afko-gltri, "Actual finish date
    END OF gs_prd.
    DATA: gt_prd TYPE STANDARD TABLE OF gs_prd,
    wa_prd TYPE gs_prd.
    *Table for partner data
    TYPES: BEGIN OF gs_partner,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr,
    parvw TYPE vbpa-parvw,
    kunnr TYPE vbpa-kunnr,
    END OF gs_partner.
    DATA: gt_partner TYPE STANDARD TABLE OF gs_partner,
    wa_partner TYPE gs_partner.
    TYPES: BEGIN OF gs_po,
    ebeln TYPE ekkn-ebeln,
    ebelp TYPE ekkn-ebelp,
    vbeln TYPE ekkn-vbeln,
    vbelp TYPE ekkn-vbelp,
    END OF gs_po.
    DATA: gt_po TYPE STANDARD TABLE OF gs_po,
    wa_po TYPE gs_po.
    TYPES: BEGIN OF gs_preq,
    vbeln TYPE vbep-vbeln,
    posnr TYPE vbep-posnr,
    banfn TYPE vbep-banfn,
    END OF gs_preq.
    DATA: gt_preq TYPE STANDARD TABLE OF gs_preq,
    wa_preq TYPE gs_preq.
    TYPES: BEGIN OF gs_po_stat,
    ebeln TYPE ekko-ebeln,
    procstat TYPE ekko-procstat,
    lifnr TYPE ekko-lifnr,
    END OF gs_po_stat.
    DATA: gt_po_stat TYPE STANDARD TABLE OF gs_po_stat,
    wa_po_stat TYPE gs_po_stat.
    *Field symbols
    FIELD-SYMBOLS: <fs> TYPE tj02t-txt04,
    <fs_temp> TYPE tj02t-txt04,
    <fs_stat> TYPE char30.
    START-OF-SELECTION.
    PERFORM fr_build_range.
    PERFORM fr_get_data.
    PERFORM fr_build_fc.
    PERFORM fr_output.
    *& Form fr_get_data
    text
    --> p1 text
    <-- p2 text
    FORM fr_get_data.
    *Get SO
    SELECT avbeln aposnr apstyv amatnr
    FROM vbap AS a
    JOIN vbak AS b
    ON avbeln = bvbeln
    JOIN vbpa AS c
    ON bvbeln = cvbeln
    INTO TABLE gt_data
    WHERE b~vbeln IN so_so
    AND b~auart EQ c_zor "Only Sales Orders
    AND c~kunnr IN ra_kunnr. "from selection screen
    DELETE ADJACENT DUPLICATES FROM gt_data COMPARING vbeln posnr.
    *get data of the production order
    IF NOT gt_data[] IS INITIAL.
    SELECT aaufnr aposnr akdauf akdpos awepos aelikz
    b~objnr
    FROM afpo AS a
    JOIN aufk AS b
    ON aaufnr = baufnr
    INTO TABLE gt_prd
    FOR ALL ENTRIES IN gt_data
    WHERE a~kdauf EQ gt_data-vbeln
    AND a~kdpos EQ gt_data-posnr.
    ENDIF.
    *Get partner data
    IF NOT gt_data[] IS INITIAL.
    SELECT vbeln posnr parvw kunnr
    FROM vbpa
    INTO TABLE gt_partner
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln.
    ENDIF.
    *Get Purchase Order
    IF NOT gt_data[] IS INITIAL.
    SELECT ebeln ebelp vbeln vbelp
    FROM ekkn
    INTO TABLE gt_po
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND vbelp EQ gt_data-posnr.
    SELECT vbeln posnr banfn
    FROM vbep
    INTO TABLE gt_preq
    FOR ALL ENTRIES IN gt_data
    WHERE vbeln EQ gt_data-vbeln
    AND posnr EQ gt_data-posnr.
    ENDIF.
    IF NOT gt_po[] IS INITIAL.
    SELECT aebeln aprocstat a~lifnr
    FROM ekko AS a
    JOIN ekpo AS b
    ON aebeln = bebeln
    INTO TABLE gt_po_stat
    FOR ALL ENTRIES IN gt_po
    WHERE b~ebeln EQ gt_po-ebeln
    AND b~ebelp EQ gt_po-ebelp.
    ENDIF.
    *Move data to output table
    LOOP AT gt_data INTO wa_data.
    wa_output-vbeln = wa_data-vbeln.
    wa_output-posnr = wa_data-posnr.
    wa_output-pstyv = wa_data-pstyv.
    wa_output-matnr = wa_data-matnr.
    READ TABLE gt_po INTO wa_po WITH KEY vbeln = wa_data-vbeln
    vbelp = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-bstnk = wa_po-ebeln.
    READ TABLE gt_po_stat INTO wa_po_stat WITH KEY ebeln = wa_po-ebeln.
    IF sy-subrc EQ 0.
    wa_output-lifnr = wa_po_stat-lifnr.
    CASE wa_po_stat-procstat.
    WHEN '01'.
    wa_output-po_st = 'Version in process'.
    WHEN '02'.
    wa_output-po_st = 'Active'.
    WHEN '03'.
    wa_output-po_st = 'In release'.
    WHEN '04'.
    wa_output-po_st = 'Partially released'.
    WHEN '05'.
    wa_output-po_st = 'Released Completely'.
    WHEN '08'.
    wa_output-po_st = 'Rejected'.
    ENDCASE.
    ENDIF. "inner read subrc
    ENDIF. "outer read subrc
    READ TABLE gt_preq INTO wa_preq WITH KEY vbeln = wa_data-vbeln
    posnr = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-banfn = wa_preq-banfn.
    ENDIF.
    READ TABLE gt_prd INTO wa_prd WITH KEY kdauf = wa_data-vbeln
    kdpos = wa_data-posnr.
    IF sy-subrc EQ 0.
    wa_output-aufnr = wa_prd-aufnr.
    *get the purchase requisition for production order as well
    SELECT SINGLE banfn
    FROM ebkn
    INTO wa_output-banfn
    WHERE aufnr EQ wa_prd-aufnr.
    *Get the status of the production order
    PERFORM fr_get_prd_stat USING wa_prd-objnr
    CHANGING wa_output-prd_stat.
    ENDIF. " sy-subrc
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_we.
    IF sy-subrc EQ 0.
    wa_output-sh = wa_partner-kunnr.
    ENDIF.
    READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
    parvw = c_ag.
    IF sy-subrc EQ 0.
    wa_output-sp = wa_partner-kunnr.
    ENDIF.
    APPEND wa_output TO gt_output.
    CLEAR: wa_data, wa_prd,wa_partner,wa_output.
    ENDLOOP.
    ENDFORM. " fr_get_data
    *& Form fr_build_range
    text
    --> p1 text
    <-- p2 text
    FORM fr_build_range .
    *Range for partner function
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SH' TO ra_parvw-low. " we
    APPEND ra_parvw.
    CLEAR ra_parvw.
    MOVE 'I' TO ra_parvw-sign.
    MOVE 'EQ' TO ra_parvw-option.
    MOVE 'SP' TO ra_parvw-low. " ag
    APPEND ra_parvw.
    CLEAR ra_parvw.
    *Range for ship-to and sold-to
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunnr TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    MOVE 'I' TO ra_kunnr-sign.
    MOVE 'EQ' TO ra_kunnr-option.
    MOVE p_kunwe TO ra_kunnr-low.
    APPEND ra_kunnr.
    CLEAR ra_kunnr.
    ENDFORM. " fr_build_range
    *& Form fr_build_fc
    text
    --> p1 text
    <-- p2 text
    FORM fr_build_fc .
    sales order number
    afield-fieldname = 'VBELN'.
    afield-seltext_s = 'Sales #'.
    afield-ref_tabname = 'VBAK'.
    APPEND afield TO xfield. CLEAR afield.
    sales ITEM number
    afield-fieldname = 'POSNR'.
    afield-seltext_s = 'Item #'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    Material Number
    afield-fieldname = 'MATNR'.
    afield-seltext_s = 'Material #'.
    afield-ref_tabname = 'VBAP'.
    afield-outputlen = 10.
    APPEND afield TO xfield. CLEAR afield.
    *Vendor Number
    afield-fieldname = 'LIFNR'.
    afield-seltext_s = 'Vendor Num.'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    ship-to-party
    afield-fieldname = 'SH'.
    afield-seltext_s = 'Ship-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    sold-to-party
    afield-fieldname = 'SP'.
    afield-seltext_s = 'Sold-to'.
    afield-ref_tabname = 'VBPA'.
    APPEND afield TO xfield. CLEAR afield.
    *PO number
    afield-fieldname = 'BSTNK'.
    afield-seltext_s = 'PO NUM'.
    afield-ref_tabname = 'EKKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PO status
    afield-fieldname = 'PO_STAT'.
    afield-seltext_s = 'Step'.
    afield-ref_tabname = 'zbacklog_v2'.
    APPEND afield TO xfield. CLEAR afield.
    *PO step status
    afield-fieldname = 'PO_ST'.
    afield-seltext_s = 'PO.Status'.
    afield-ref_tabname = 'zbacklog_v2'.
    APPEND afield TO xfield. CLEAR afield.
    *Purchase requisition
    afield-fieldname = 'BANFN'.
    afield-seltext_s = 'Pur. Req.'.
    afield-ref_tabname = 'VBEP'.
    APPEND afield TO xfield. CLEAR afield.
    *Item catagory
    afield-fieldname = 'PSTYV'.
    afield-seltext_s = 'Itm. Catg'.
    afield-ref_tabname = 'VBAP'.
    APPEND afield TO xfield. CLEAR afield.
    *Prodcution Order number
    afield-fieldname = 'AUFNR'.
    afield-seltext_m = 'Prod.Order'.
    afield-ref_tabname = 'AFKO'.
    APPEND afield TO xfield. CLEAR afield.
    *PRODCUTION status
    afield-fieldname = 'PRD_STAT'.
    afield-seltext_s = 'Prd. Step'.
    afield-ref_tabname = 'zbacklog_v2'.
    afield-outputlen = 20.
    APPEND afield TO xfield. CLEAR afield.
    *PRODUCTION step status
    afield-fieldname = 'PRD_ST'.
    afield-seltext_s = 'Prd. Status'.
    afield-ref_tabname = 'zbacklog_v2'.
    APPEND afield TO xfield. CLEAR afield.
    ENDFORM. " fr_build_fc
    *& Form fr_output
    text
    --> p1 text
    <-- p2 text
    FORM fr_output .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT =
    it_fieldcat = xfield[]
    i_default = 'X'
    i_save = 'A'
    TABLES
    t_outtab = gt_output
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDFORM. " fr_output
    *& Form fr_get_prd_stat
    text
    -->P_WA_PRD_OBJNR text
    FORM fr_get_prd_stat USING p_objnr CHANGING p_prd_stat.
    DATA: lt_status TYPE STANDARD TABLE OF jstat,
    wa_status TYPE jstat,
    lv_status TYPE tj02t-txt04,
    lv_temp2 TYPE char5,
    lv_buff TYPE string.
    CALL FUNCTION 'STATUS_READ'
    EXPORTING
    client = sy-mandt
    objnr = p_objnr
    only_active = 'X'
    TABLES
    status = lt_status
    EXCEPTIONS
    object_not_found = 1
    OTHERS = 2.
    LOOP AT lt_status INTO wa_status.
    IF wa_status-stat(1) EQ 'I'.
    SELECT txt04 FROM tj02t
    INTO lv_status
    WHERE istat EQ wa_status-stat
    AND spras EQ 'E'.
    ENDSELECT.
    lv_temp2 = lv_status.
    CONCATENATE lv_temp2 p_prd_stat INTO p_prd_stat
    SEPARATED BY ','.
    ENDIF.
    CLEAR: wa_status, lv_status, lv_temp2.
    ENDLOOP.
    lv_buff = p_prd_stat.
    *Status of Production Order
    IF lv_buff CS 'CRTD'.
    p_prd_stat = 'Not Active'.
    ENDIF.
    IF lv_buff CS 'REL'.
    IF lv_buff CS 'GMPS'.
    p_prd_stat = 'Printed In Prod'.
    ELSE.
    p_prd_stat = 'Printed'.
    ENDIF.
    ENDIF.
    IF lv_buff CS 'TECO'.
    p_prd_stat = 'Technically Compt.'.
    ENDIF.
    ENDFORM. " fr_get_prd_stat
    >

Maybe you are looking for

  • How to use Airport Time Capsule as a wireless hard drive?

    I have purchased the Airport Time Capsule 3TB but I really don't need a backup disk, so I want to use it as a wireless hard disk to be used in my network, how can I do this?  Can someone give me a clear step by step guide of how I can do this? I appr

  • Flash still won't play files in Firefox 4, even with latest version 10

    Despite what a Firefox support article states, Adobe Flash will not play videos in Firefox 4, even after Flash has been upgraded to the most recent version of Flash 10 (10.3.181.14). That is because the problem is not with Flash, it is in fact a prob

  • GET Method on JSF

    ADFBC/JSF (10.1.3.2) What should I do on the Calling Page to genete a URL with paramaters like this: http://localhost:8988/oramag/faces/ViewEmployee.jspx?id=7934 Say for example Employee id needs to be passed as a parameter when the user clicks on th

  • How can i buy starcall package, how can i buy starcall package

    how can i buy starcall package, how can i buy starcall package

  • Regarding SAP & Oracle logs deletion

    Hi, I have a concern on SAP & Oracle logs. I want to know what are all the logs mentioned below can be deleted and what are all the logs should be kept for the recovery of DB, if the system got crashed. Also how many days logs should be kept for the