Report on list of purchase requisitions and related POs..

Hi,
I have a requirement to generate a simple abap report to display a list of purchase requisitions and its related POs. If my understanding is correct, for a single purchase requisition, multiple POs can exist, right ? Can someone help me with the select query for this ? also can you let me know typically what can be the basic fields displayd in such a report ?
I need to understand the relationship between the tables involved for pur req and Pur orders.
thanks

Hi check this code... to get PO and PR related to SO..
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

Similar Messages

  • Report with purchase requisitions and purchase orders: how?

    Hi,
    I need to get a list of items bought with their purchase requisitions and purchase orders (when they exist). This can be done looking at each purchase order (ME23N), ou purchase requisition (ME53N), and writing it down. But in some cases, I have to do it on about 450 operations. I'd like to get this list without having to search for each requisition ou order. I can get a complete list of orders and requisitions, but without any relationship between them (they are mixed as if they were the same thing, but there´s a field telling it that row is an order or a requisition). Using some macros in excel, I can find this relationship in 40% of the cases (for example, if item 421351 was purchased only once, an order for item 421351 is related to a requisition for item 421351). Is there any way to get this list automatically? Or is there any field that tell me this relationship?
    Thanks,
    Francisco Morbiolo
    Votorantim Cimentos
    Votorantim, SP - Brazil

    Sorry, I forgot to tell this: I don´t have access to SQ01/SQ02/SQ03.
    I get the orders and requisition reports using ZGLPS020.
    Thanks,
    Francisco Morbiolo
    Votorantim Cimentos
    Votorantim, SP - Brazil

  • Purchase requisition and invoice verification report

    Hi,
    pls. I need to display a report with purchase requisition and invoice verification pending, what I mean is an standard trx. to display purchase requisition with or without invoice verification.
    Thanks for cooperation.
    Regards.

    hi
    I guess thereis no standard report which combines both. You have to go for a Z-report. use the details FROM Txns ME5A &  MB5S for your requirement.
    Regards

  • 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
    >

  • Report  showing list of order confirmations and open/close reservations?

    Hi
    Can we have any standard report having list of  order confirmations and open/close reservations in SAP PM ?
    Regards
    Pooja

    Hi Pooja,
    Try IW12, Display Document flow, if you are looking for a combined report of Order confirmations and Material status.There are various other reports related to order confirmations and Material status seperately. For material status you can use IWBK.
    Better place to post PM questions is in Enterprise Asset management Forum.
    Warm regards,
    Srinivas Potluri

  • Which table holds the link between Purchase requisition and Reservations ?

    Hi Guys,
    We are using MRP and as a result of the MRP run the reservations are converted to purchase requisition. When i look at transaction MD04 it shows me the Purchase requisition against a reservations.
    I would like to know which table holds this information? I mean which table will give me the reservations tied to a purchase requisition or vice a versa.
    I have looked into RESB and RSBD but could not find what i am looking at. RESB table has BANFN field for purchase requisition but this field is not populated. RSBD table hold the Purchase requisition and reservations but it only holds the relation for Direct procurement and not for all.
    Any idea where i can find the Preq and Reservations created through MRP run?
    Thanks
    VJ

    Try RKPF..
    thanks
    jz

  • I Need interactive report to list the purchase orders details for a vendor

    I Need interactive report to list the purchase orders details for a vendor that has    interactive drill down options to give the detail of vendor from vendor master.

    Hi
    see this sample report
    this is Customer wise sales orders
    just make similar report just using LFA1, EKKO and EKPO tables instead of KNA1,VBAK,VBAP
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    Regards
    Anji

  • List of Purchase Requisition

    Dear SAP Gurus,
    Can anyone help me with the transaction Code to use in order to get a list of Purchase requisition that were raised by a particular user during a specified period.
    Regards,
    Davies

    Hi
    Try ME5A - In this under 'Dynamic selections' 3rd button on top, select 'Created by' and give the userid and execute
    Thank You,

  • Creating purchase Requisition and release Overview

    Hello,
    We have some User which have the authorization to create a purchase Requisition and also to release it by themselves.
    We have to Monitor this cases and I' looking for a possibility to check this on a easy way.
    I found the Report "Changedocu_read". There I can check several changes in the PR and see who released it. But there I can not see which User created the PR.
    The table EBAN has the informations about the User who created the PR and if it had to be released and some more informations. But the informations who released the PR is missing.
    I tryed a table-join of the tables EBAN and CDHDR. But it was not possible, because the PR Number (Filed "BANFN" in the EBAN)  has not the same format as the number in the Filed "object value" in the table CDHDR.
    Perhaps someone has an idea ?
    Or there is an Standard Transaction which I did not found to have an overview of the PR and the releases
    It would be enough to see following informations with one Join or Transaction:
    -PR Number
    -Creation Date
    - Transaction code
    -Change Date
    -Release Status
    -Released date
    -Released by User
    I have the same Topic also by purchase orders and the release of them.
    Thank you in advance
    Regards
    Dirk

    Thanks both for the quick reply.
    @AKPT
    The Transaction is nice and helpful to Display some informations. But similar results I also receive when I use the Programm : "changedoc_read". I also had the idea to join the informations of the 2 sources in Excel. For me this Workaround would be ok.
    But unfortunately I' m looking for an simply way (for the Enduser). To get this informations mentioned above in one overview directly in SAP.
    They have to use this check regularly, to Monitor if there were some wrong Releases.
    If there is not such a way then we have to join it in Excel.
    But if you have some other suggestions I'm happy to hear them.
    Regards
    Dirk

  • Planned orders to Purchase Requisitions and orders

    Hi,
            Just wondering if this is possible. I heard this from a client and want to confirm if it's true.
    The client owns the technology and has contractors manufacture the product.
    A planned order is generated by the client and based on the type of contractor, some of them are converted to Purchase orders and others to Purchase requisitions.
    Is this possible? I was thinking, planned orders ans purchase requisitions are completely different entities. Planned orders are for internal manufacturing which are subsequently changed to Production orders and purchase requisitions are for external procurement that would be converted to Purchase orders.
    But converting the Planned orders to Purchase Requisitions and orders is what I could not digest.
    Is there any possibility of this case?
    Thanks.

    Hi,
    We can create planned orders & convert them into purchase requisition or into production order.
    In the material master ,mrp2 view give the procurment type as 'X', for both internal & external procurement.
    Also include purchasing view for this material.
    When you run mrp using md02, a planned order will be created for the rquirement (Eg:say 100 nos given using t.code md61).
    Use t.code md04 to view the stock/requirement list.
    Here double click the planned order, you can see tabs such as convert into purchase requisition, into production order, into process order.
    Click convert into pur req & enter 50 Nos. Then a pur req will be created which can be further converted into pur order.
    Again come to md04 screen.
    You can see a planned order & pur req for 50 nos.
    This planned order can be converted into production order & 50 nos can be produced internally.
    Hope this clears your doubt.
    Regards,
    Senthilkumar SD

  • Planned orders to Purchase Requisitions and Purchase Orders

    Hi,
            Just wondering if this is possible. I heard this from a client and want to confirm if it's true.
    The client owns the technology and has contractors manufacture the product.
    A planned order is generated by the client and based on the type of contractor, some of them are converted to Purchase orders and others to Purchase requisitions.
    Is this possible? I was thinking, planned orders ans purchase requisitions are completely different entities. Planned orders are for internal manufacturing which are subsequently changed to Production orders and purchase requisitions are for external procurement that would be converted to Purchase orders.
    But converting the Planned orders to Purchase Requisitions and orders is what I could not digest.
    Is there any possibility of this case?
    Thanks.

    Hi,
    We can create planned orders & convert them into purchase requisition or into production order.
    In the material master ,mrp2 view give the procurment type as 'X', for both internal & external procurement.
    Also include purchasing view for this material.
    When you run mrp using md02, a planned order will be created for the rquirement (Eg:say 100 nos given using t.code md61).
    Use t.code md04 to view the stock/requirement list.
    Here double click the planned order, you can see tabs such as convert into purchase requisition, into production order, into process order.
    Click convert into pur req & enter 50 Nos. Then a pur req will be created which can be further converted into pur order.
    Again come to md04 screen.
    You can see a planned order & pur req for 50 nos.
    This planned order can be converted into production order & 50 nos can be produced internally.
    Hope this clears your doubt.
    Regards,
    Senthilkumar SD

  • A list of Purchase Requisition whith Account assignment category = A

    Hi All,
    could anyone tell me a report which shows a list of Purchase Requisition created since 2010.10.10 whith Account assignment category = A
    Thanks a lot

    Hi,
    Use the report ME5A, mainatin account assignment category 'A' , go to header, select Dynamic selections (SHift F4), enter date range in requisition date.
    Regards,
    Piyush

  • Purchase requisitions and purchase orders

    Hello Gurus,
         In contrast, by default, both purchase requisitions and purchase orders can be generated automatically for the item category ALES, will you please tell me the sequence and where to create purchase requisitions and purchase orders  ?
    Many thanks,

    Hello,
    The PO is getting created automatically because of the Create PO automatically check in the item categroy ALES.
    But in normal case, the PR will be generated, it is a request for purchase, it should get approved by the purchasign dept, then create PO with reference to the PR.
    Prase

  • Badi for purchase requisition and stock transfer order

    Hi,
    Could anybody please tell the BADI to update the item details (dates etc) in the 'Purchase requisition' and stock transfer orders.
    I could find ME_PROCESS_REQ etc but could not locate the methods to modify the item level data.
    Thanks & regards,
    Ravish

    Hi,
    You can use the same badi which you found out.
    ME_PROCESS_REQ.
    In that there is a method process_item.
    There you can get the line items of the PR.
    Then in the POST method you can do the stock transfer .
    In the check method also you can check the entire process of PR.
    With Regards,
    Sumodh.P

  • Automatic Link of  Documents in purchase requisition and purchase order

    Dear guru.
    I have created a document in CV01N and I have linked it in document data view of a material master(MM02).
    For every purchase requisition and purchase order position created for this material I need that the system execute an automatic link to this document.
    How can I do that ?
    Thanks

    Hello,
    You can only derive the attached documents from the preceding documents only (for example. Purchase Requisition). Deriving the attached document from the material master is not a standard scenario. This scenario is not in the system. You need to manually attach it.
    bg, Gabor

Maybe you are looking for

  • Need help setting up MoCa for superior speed for upstair room in house

    Hey guys i need some help. I just upgraded my plan to the 50/20 Fios and now i really want that speed upstairs to my gameroom. Before i had the 10/2 plan where wireless was sufficient (i could get 9mpbs download speed wirelessly everywhere i needed i

  • How to use standard pdf forms for HR

    Hi We just upgraded our system from 4.6C to ECC6.0. We just did technical upgrade. IF we want to use SAP provided pdf forms for any HR applications like w-2's or something else.. what do  we need.. Can we use them with out ADS ? and without a Java se

  • Text replacements synchronization doesn't work on my Mac

    Hello, I cannot make text replacements synchronization work on Yosemite (the same problem was on Mavericks – I hoped, that Yosemite will fix it, but it didn't). The symptoms are: Synchronization backend work properly: when I add or update shortcuts o

  • N8 Automatically Connects to the internet.

    Hi, My new Nokia N8 automatically connects to the internet. When I open applications that need internet connection it connects without asking. For example if I open Ovi Maps, SW update, or games that use the internet it automatically connects without

  • Installation Solution

    I downloaded iTunes 6 today and had the same installation headaches as everyone else. I tried installing with WinRar, I tried downloading the Quicktime standalone, I tried everything. I kept getting error code -3 and then error code 1402. Finally, th