Purchase Requisition fields & table
hi experts,
I have a requirement to make Purchase Requisition report. Is there any standard report so i can copy and modify it. Or u guys have made some report of the same. its urgent.
Or plz tell the table & field names of the following requirement. also help me on what fields I can join that tables.
Purchase Requisition (PR) date
Delivery date
PR No.
PR Material No.
PR Quantity
STO date
STO No.
STO material
STO Qty.
Supplying Plant
Delivery Plant
Delivery No.
Delivery Date ( when delivery created)
Delivery material
Delivery Qty.
PGI
thanks. alot.
Khan
REPORT ZPurchase_alvsample .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
regards,
srinivas
<b>*reward for useful answers*</b>
Similar Messages
-
Purchase Requisition field in TCode:- MD09
Dear Experts,
I have a requirement, currently in MD09 we can enter the only one 'Purchase Requisition' number to get Pegged Requirement Details. My requirement is to make the 'Purchase Requisition' field available for multiple input entries... is there any user exits with which i can do this modification the SAP Standard MD09 Tcode....????
Plz suggest...
Thanks in advance...It may be easier to create an enhancement or implementation. Did you try looking at a BADI like ME_PROCESS_REQ_CUST? Inside here you can create an implementation .
Or, to find a BADI to put your code into, put a breakpoint inside this method. After executing your transaction you will see every BADI that this transaction will hit inside of this method:
CALL METHOD cl_exithandler=>get_class_name_by_interface
EXPORTING
instance = instance
IMPORTING
class_name = class_name
CHANGING
exit_name = exit_name
EXCEPTIONS
no_reference = 1
no_interface_reference = 2
no_exit_interface = 3
data_incons_in_exit_managem = 4
class_not_implement_interface = 5
OTHERS = 6.
CASE sy-subrc. -
Maintaining the purchase requisition field mandetory for certain PO Doc typ
Hi,
I have tried to maintain the purchase requistion field in PO as mandetory field for certain PO docuemnt types and for transaction code ME21N.
I copied the standard fields setting NBF to ZBF and assigned the same to PO docuemnt types as well and in the reference data, item i mainatained purchase requisition as mandetory field . But observed that Purchase requisition field is still not mandetory. Then for ME21N in the reference data, item i mainatained purchase requisition as mandetory field .
Still it is not appear as mandetory field in po.
Please guide how to achieve this , is any customization i am missing.
Best Regards
MMHI
1) In transactiono OMET create Function Authorisation as Z1" there flag "Reference to Purchase Requisition".. then assign the "Z1" in txn. SU01 for parameter id EFB..and it wil make the user to create PO with reference to PO.
2) At screen layout level :
SPRO>MM>Purchasing>PO>Defince screen layout at screen level...
Select ME21N details and select "Reference data Item" flag required indicator for Purchase Requsition..
Regards,
BK -
Purchase Requisition Field Mandatory
Dear All,
I want to make purchase requisition field mandatory in selected purchase order types. i tried through field selection in SPRO, by changing the screen layout., but still its not coming as mandatory.
Kindly provide a solution ......
thanks in advance
regards
PatniHi Patni,
Make the Purchase requisition Field Mandetory (Reqd Entry) for Field selection group reference data ,item view for Field selection key.
Menu path
IMG->Materials Management->Purchasing->Purchase Order->Define Screen Layout at Document Level.
Assign this field selection Key to your document Type at Define Document Types.
Regards
Sanjay L -
Purchase Requisition Field mandatory in External Service processing order
Dear Team,
I am running one scenario, wherein i am creating an Corrective maintenance order and i am using control key for external Service processing and entering the services and its rate and releasing the order. Now While Releasing the order the purchase requisition field entry is mandetory. I want to set this field as optional only. I checked the settings in PM based on order type as well as checked in MM based on purchase requisition creation but i didnt fount this field set as mandetory.
can any body help me out for this
Regards
Amar JadhavHi
I think while creating Order you have made PR field as Mandatory
Please check in OIAN.
Steps as follows
Follow the path as below in Config
SPRO>Plant Maintenance & Customer Service>Maintenance & Service Orders-->Define Field Selection for Order Header(PM)
Go to Field selection for Order Header Data
(OIAN)
Go to Influencing
Double click on Order type
Now Enter the required Order type and Press Enter
Check for Field for Reservation/Purc.req --CAUFVD-AUDISP
Make it input if it is Required Field.
Give Points if it solves
Thanks,
Manish
Edited by: Manish Chachra on Aug 8, 2008 12:18 PM -
ME53N Purchase Requisition attachment tables
Hi,
Good day guys
I got a doubt on ME53n[Purchase Requisition ]. we got icon for services for object. If you click it then its show the tab where and which can create the ATTACHMENTS LIST or else Create the Attachment.
I want know the which Tables are storing the attchment document ?
REgards
KKHi All,
I got the solution.
We can use function module ARCHIV_GET_CONNECTIONS which gives the list of attachments.
We just need to pass PR Number as OBJECT_ID. The table CONNECTIONS will populate with the list of attachment.
Please refer below snapshot.
The count variable also gives the the number attachment in PR and I_connection internal table gives list of attachment in details with type of attachments. -
Purchase requisition and Purchase order fields in the APO system
Hi
I have to develop a report in the APO system for which material id needs to be linked with purchase order and purchase requisition fields. I am not able to locate the table to pick these fields.Please anyone can tell which table,FM or BAPI to use.
thanks in advanceYou should be able to retrieve the PegID for this particular material/plant combination using /SAPAPO/DM_PEGID_GET_MATERIAL and then using OM LC Get data you should be able to retrieve all the order categories you need for the report.
-
Customised Field in Purchase Requisition
Our requirement is to have a 4 digit departmental section (0001 - Finance dept, 0002 - HR dept, etc) in the Purchase Requisition line item (Table EBAN), there is no such field in standard SAP.
How to add this addiitonal customised field to Purchase Requisition document (table eban) so that we can enter the data in create/change PR transaction - ME51N or ME52N??hi,
check these USER EXITS:
MEQUERY1 - Enhancement for document overview ME21N / ME51N
MM06E005 - Customer fields in purchasing documents
MEREQ001 - Customer's own data in purchase requisitions
Hope it helps..
Regards
Priyanka.P -
Data Transfer from Sales Order to Purchase Requisition
We are trying to transfer data from Sales Order to purchase requisition in an individual purchase scenario.
We want to copy value in KUWEV-KUNNR in Sales Order and paste in CMMDA-KUNNR on purchase requisiton.
So in user-exit "USEREXIT_MOVE_FIELD_TO_ME_REQ" on include "MV45AFZB" we added the following code:
FORM USEREXIT_MOVE_FIELD_TO_ME_REQ.
DATA: BEGIN OF IT_VBEP OCCURS 0,
VBELN LIKE VBEP-VBELN,
BANFN LIKE VBEP-BANFN,
KUNWE LIKE VEPVG-KUNWE,
END OF IT_VBEP.
DATA: BEGIN OF TI_VBAK OCCURS 0.
INCLUDE STRUCTURE IT_VBEP.
DATA: END OF TI_VBAK.
SELECT A~VBELN B~KUNWE
INTO CORRESPONDING FIELDS OF TABLE IT_VBEP
FROM VBAK AS A INNER JOIN VEPVG AS B
ON B~VBELN = A~VBELN
WHERE A~AUART EQ 'PDIR'.
LOOP AT EBKN.
LOOP AT IT_VBEP.
IF IT_VBEP-VBELN = EBKN-VBELN.
IT_VBEP-BANFN = EBKN-BANFN.
ENDIF.
MODIFY IT_VBEP.
ENDLOOP.
ENDLOOP.
*Break-point.
SORT IT_VBEP BY vbeln.
LOOP AT IT_VBEP.
IF EBAN-BANFN = IT_VBEP-BANFN.
EBAN-KUNNR = IT_VBEP-kunwe.
MODIFY EBAN.
ENDIF.
ENDLOOP.
* Example
* EBAN-LIFNR = zzfield1.
* EBKN-KOSTL = zzfield2.
ENDFORM.
*eject
Right now it turns random values on the purchase requisition field.
Edited by: Carlos Salazar on Sep 15, 2010 5:19 PM
Moderator message: please use more descriptive subject lines from now on.
Edited by: Thomas Zloch on Sep 15, 2010 5:26 PM
Edited by: Carlos Salazar on Sep 15, 2010 5:30 PMHi,
Why are you using only the following line to read the VBEP table?
WHERE A~AUART EQ 'PDIR'.
Shouldn't you be using a sales document number or something more specific than document type?
Regards, Andy -
Get the approver for a purchase requisition
Hello
I am trying to retrieve who approved a purchase requisition. I have the PR number. Is there a bapi or FM returning this info. If not please let me know how to do that
ThanksHi Bobby,
For example, PR 10002620
(1) Browse table CDHDR (Change document header), specify:
Change doc. Object = BANF
Object value = PR number (remember to add first 2 zeros) i.e. 0010002620
Transaction = ME54N (release manually) and/or ME55 (collective release)
The result showing the user who has run transaction ME54N and/or ME55 for the PR, then user may be the approver of the PR. If multiple records found for a particular PR, it may be approve/reject several times. You may only extract the latest record.
(2) Because transaction ME54N can either approver or reject PR, it is necessary to further check table CDPOS (Change document items), specify:
Change doc. Object = BANF
Document number = <found in step (1)>
Table Name = EBAN (Purchase Requisition)
Field Name = FRGKZ (Release Indicator)
In the result, if field FRGKZ (Release Indicator) changed from Old value 'X' (blocked) to New value '2' (PO creation allowed), we know that the user found in step (1) is the PR approver.
Regards,
Donald -
Items missing in PURCHASE REQUISITION
Dear experts
PR was created with two line items, then PO was created.
Now in PO only line item 2 is appearing.
I have checked the status tab in PR it shows ' NOT EDITED'.
Now where to check the line item 1.
In PO there is no reference PR number also.
How to track the line item 1
Thanks & Regards.
Erfan,Hi Erfaan,
It depends on the user creating the PO if he creates line item 1 first w/o PR then creates the second line item then it will be created with PR ref.
If you want to restrict some of the users only to create PO with ref to PR, then refer the below link.
How to restrict the PO(With reference to PR only we have to create the PO)
Also to track the PO line items without a PR reference, you can check in table EKPO for the Purchase requisition field. -
How to create a purchase order for a purchase requisition
Dear Experts,
Explain the steps for creating purchase order for a purchase requisition.
and where can i find this purchase requisition field in PO creation.Hi Ravi,
Check out these documents:
http://www.olemiss.edu/projects/sap/MM_Create_PO_with_Ref_to_a_PR.pdf
http://www.sap.com/africa/services/education/pdf/Work_Instruction.pdf
Regards,
Chandra Sekhar -
Purchase Requisition with mat-nr and without mat-nr
Hi,
if I create a Purchase Requisition with a material number it will be transfered into the EPRTRANS,
but if I create a Purchase Requisition without a materialnumber (only with account assignment)
then it will be not transfered into EPRTRANS .
Do you have an idea why this strange behaivour happens.
Maybe there must be made some changes in Function Module BBP_EPRTRANS_MAINTAIN ?
Regards
ilhanin order to perform a Purchase Requisition-Upload from R/3 Backend system into another system there
are several steps necessary.
When I am creating a Purchase Requisition at the Backend regarding a valid material-number,
the Purchase Requisition will be automatically inserted into the table EPRTRANS.
But not in case of if you create a Purchase Requisition without a Material-Numnber.
e.g. Purchase Requisition with free text and account assignment.
Function Module BBP_EPRTRANS_MAINTAIN is reposible for transfering of Purchase Requisition
into table EPRTRANS.
I need these PR in the EPRTRANS in order to perform the report BBP_EXTREQ_TRANSFER finally.
It trnasfers all Purchase Requisition from EPRTTANS to the external system.
I hope it clarifys some of the confusion .
regds
ertas -
Purchase order with purchase requisition reference
Hi All,
I want to make config in system such that it should not allow me to create purchase order without purchase requisition.
Can anyone guide me to resolve this issue.
Which config i should do for this?
Regards,
Deepak.Hi,
please consider that the system is not coded to have the PR field MEPO1211-BANFN to be set to required.
The field BANFN cannot be made a required entry in ME21N. However you can use "Function Authorizations" (OMET) to restrict the user to only order with reference to a purchase requisition.
As both the agreement field and purchase requisition fields are reference fields they are populated when created in reference and thus the system would not accept attempting to make them a mandatory field.
Please use the OMET transaction and the PID EFB to accomplish your desired functionality.
And also check the below link:
PO with ref to PR -
Copy purchase requisition with me51n
Hi,
I have a problem when I want copy a purchase requisition in me51n.
I have two documents types in specific and I use a variant of transaction who fixed the document type.
I execute me51N
I search a purchase requisition with other types.
I do a drag & drop to copy the purchase requisition.
But in the first copy, there is a document type present on header level was copied and in the second copy it is a document type comes from reference that is copied.
I want for the first copy, the document type comes from reference in the copy.
What am I doing ?
Thanks.in order to perform a Purchase Requisition-Upload from R/3 Backend system into another system there
are several steps necessary.
When I am creating a Purchase Requisition at the Backend regarding a valid material-number,
the Purchase Requisition will be automatically inserted into the table EPRTRANS.
But not in case of if you create a Purchase Requisition without a Material-Numnber.
e.g. Purchase Requisition with free text and account assignment.
Function Module BBP_EPRTRANS_MAINTAIN is reposible for transfering of Purchase Requisition
into table EPRTRANS.
I need these PR in the EPRTRANS in order to perform the report BBP_EXTREQ_TRANSFER finally.
It trnasfers all Purchase Requisition from EPRTTANS to the external system.
I hope it clarifys some of the confusion .
regds
ertas
Maybe you are looking for
-
Extractor 2LIS_02_SCL -- behaviour when ELIKZ is set
Dear BI-colleagues, we are actually facing an issue with the standard extractor 2LIS_02_SCL - schedule line Level of purchase orders. Our system setup: The data of this extractor needs to be used to measure a supplier service sevel based upon single
-
Changing resolution automatically for a specific program??
so, i love my new hi res display, but a couple of my programs are much too small without dropping the res down. anybody know of a way to do this automatically when i run a certain application. i.e. run rosetta stone, res drops on its own to 1024*768
-
Hi all, can i configure metadata field to be parent for other field, so when i search by this parent return the document related to it and its child. OR can i make the returned value for one of the metadata field work as hyperlink once i click it it
-
If an has 3 hierarchies, which hierarchy will be shown in the Member selector dialog box when we click on the dimension to select a different member for the current view?
-
I have dimension members values with formula. Though values are generated at member level,at the parent hierarchy level the values are not getting rolled up. I am in BPC7NW...any suggestion , inputs welcome...