Pending PO's report
Hi Everyone!
Well, my requirement is to develop a pending PO's report.
Since am new into abap am a bit confused as to which tables should i search for the GRN and PO numbers, coz i have to extract all the po's who have their items partially delivered even.
I was also suggested to go for bapi but i don't know where to find relevant FM and how should i use in my report.
Could anyone help me please...
Thanks a lot in advance.
Regards,
Parwez.
Hi
See this sample code
this is nothing but the open/pending Po report
*& Report ZMM_PO_REPORT
REPORT ZMM_PO_REPORT message-Id yb
NO STANDARD PAGE HEADING
LINE-COUNT 60(1)
LINE-SIZE 230.
D A T A B A S E T A B L E S D E C L A R A T I O N
TABLES: lfa1, " Vendor Master
t161, " PO Doc Types
t024, " Purchase Groups
ekko. " PO Header
T Y P E S D E C L A R A T I O N S
Purchase Orders Main Structure
TYPES: BEGIN OF s_po,
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
bstyp TYPE bstyp, " PO Category
bukrs TYPE bukrs, " Company Code
bsart TYPE bbsrt, " PO Type
lifnr TYPE lifnr, " Vendor No
ekgrp TYPE bkgrp, " Purchase Group
waers TYPE waers, " Currency
bedat TYPE etbdt, " PO Date
txz01 TYPE txz01, " Material Text
werks TYPE ewerk, " Plant
lgort TYPE lgort_d, " Storage Location
matkl TYPE matkl, " Material Group
menge TYPE bamng, " PR Quantity
meins TYPE bamei, " UOM
bprme TYPE bbprm, " Price Unit
netpr TYPE netpr, " Net price
peinh TYPE peinh, " Price Unit UOM
pstyp TYPE pstyp, " Item Category
knttp TYPE knttp, " Account Assignment Category
END OF s_po.
Purchase Orders History Structure
TYPES: BEGIN OF s_account,
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
gjahr TYPE mjahr, " Fiscal Year
belnr TYPE mblnr, " PO Invoice No
menge TYPE menge_d, " PR Quantity
wrbtr TYPE wrbtr, " Price in Local Currency
dmbtr TYPE dmbtr, " Price in Foreign Currency
waers TYPE waers, " Currency
shkzg TYPE shkzg, " Dr/Cr Indicator
END OF s_account.
Purchase Orders History Structure(Item Sum)
TYPES: BEGIN OF s_inv_sum,
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
menge TYPE menge_d, " PR Quantity
wrbtr TYPE wrbtr, " Price in Foreign Currency
waers TYPE waers, " Currency
END OF s_inv_sum.
Purchase Orders Main Structure
TYPES: BEGIN OF s_rep,
lifnr TYPE lifnr, " Vendor No
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
bstyp TYPE bstyp, " PO Category
bsart TYPE bbsrt, " PO Type
ekgrp TYPE bkgrp, " Purchase Group
waers TYPE waers, " Currency
bedat TYPE etbdt, " PO Date
txz01 TYPE txz01, " Material Text
werks TYPE ewerk, " Plant
lgort TYPE lgort_d, " Storage Location
matkl TYPE matkl, " Material Group
menge TYPE bamng, " PR Quantity
meins TYPE bamei, " UOM
bprme TYPE bbprm, " Price Unit
netpr TYPE netpr, " Net price
peinh TYPE peinh, " Price Unit UOM
pstyp TYPE pstyp, " Item Category
knttp TYPE knttp, " Account Assignment Category
name1 TYPE name1, " Plant
orewr TYPE netpr, " To be Invoiced Price
curr TYPE waers, " Inv Doc Currency
END OF s_rep.
D A T A D E C L A R A T I O N S
DATA: gv_title1 TYPE sylisel, " Report title
gv_dial. " Color flag
C O N S T A N T S D E C L A R A T I O N S
CONSTANTS: c_x VALUE 'X', " Flag X
c_h VALUE 'H', " Debit
c_vgabe TYPE vgabe VALUE '2'. " Transaction Type
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_po TYPE STANDARD TABLE OF s_po WITH HEADER LINE,
" Purchase Order
i_inv TYPE STANDARD TABLE OF s_inv_sum WITH HEADER LINE,
" PO Invoice Values
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE,
" PO Invoice Values
i_ekbe TYPE STANDARD TABLE OF s_account WITH HEADER LINE.
" PO Invoice Values
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kred,
s_ebeln FOR ekko-ebeln MATCHCODE OBJECT mekk,
s_bsart FOR t161-bsart,
s_ekgrp FOR t024-ekgrp,
s_bedat FOR ekko-bedat.
SELECTION-SCREEN END OF BLOCK b1.
I N I T I A L I Z A T I O N *
INITIALIZATION.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_screen.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
T O P - O F - P A G E *
TOP-OF-PAGE.
Header of the List
PERFORM header.
E N D - O F - P A G E *
Footer
END-OF-PAGE.
ULINE.
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
Display the Report Output data
PERFORM display_data.
At Line-Selection
AT LINE-SELECTION.
When double clicked on EBELN display the details of Purchase Doc
PERFORM line_sel.
*& Form validate_screen
Validation of Selection Screen fields
FORM validate_screen .
Validation of Vendor Number
CLEAR lfa1-lifnr.
IF NOT s_lifnr[] IS INITIAL.
SELECT lifnr UP TO 1 ROWS
INTO lfa1-lifnr
FROM lfa1
WHERE lifnr IN s_lifnr.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Vendor'(002).
ENDIF.
ENDIF.
Validation of PO Number
CLEAR ekko-ebeln.
IF NOT s_ebeln[] IS INITIAL.
SELECT ebeln UP TO 1 ROWS
INTO ekko-ebeln
FROM ekko
WHERE ebeln IN s_ebeln.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Document Number'(003).
ENDIF.
ENDIF.
Validation of PO Document Type
CLEAR t161-bsart.
IF NOT s_bsart[] IS INITIAL.
SELECT bsart UP TO 1 ROWS
INTO t161-bsart
FROM t161
WHERE bsart IN s_bsart.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Purchase Document Type'(004).
ENDIF.
ENDIF.
Validation of Purchasing Group
CLEAR t024-ekgrp.
IF NOT s_ekgrp[] IS INITIAL.
SELECT ekgrp UP TO 1 ROWS
INTO t024-ekgrp
FROM t024
WHERE ekgrp IN s_ekgrp.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Purchasing Group'(005).
ENDIF.
ENDIF.
ENDFORM. " validate_screen
*& Form fetch_data
Fetching the PO related data from Database Tables
FORM fetch_data .
CLEAR i_po.
REFRESH i_po.
SELECT a~ebeln " PO No.
b~ebelp " PO Item
a~bstyp " PO Category
a~bukrs " Company Code
a~bsart " PO Type
a~lifnr " Vendor No
a~ekgrp " Purchase Group
a~waers " Currency
a~bedat " PO Date
b~txz01 " Material Text
b~werks " Plant
b~lgort " Storage Location
b~matkl " Material Group
b~menge " PR Quantity
b~meins " UOM
b~bprme " Price Unit
b~netpr " Net price
b~peinh " Price Unit UOM
b~pstyp " Item Category
b~knttp " Account Assignment Category
INTO TABLE i_po
FROM ekko AS a JOIN ekpo AS b
ON a~ebeln = b~ebeln
WHERE a~ebeln IN s_ebeln AND
a~lifnr IN s_lifnr AND
a~ekgrp IN s_ekgrp AND
a~bsart IN s_bsart AND
a~bedat IN s_bedat.
SORT i_po BY ebeln ebelp.
break-point.
IF NOT i_po[] IS INITIAL.
Fetch the PO History/Invoice Details from EKBE Table
CLEAR i_ekbe.
REFRESH i_ekbe.
SELECT ebeln " PO No.
ebelp " PO Item
gjahr " Fiscal Year
belnr " PO Invoice No
menge " PR Quantity
wrbtr " Price in Local Currency
dmbtr " Price in Foreign Currency
waers " Currency
shkzg " Dr/Cr Indicator
INTO TABLE i_ekbe
FROM ekbe
FOR ALL ENTRIES IN i_po
WHERE ebeln = i_po-ebeln AND
ebelp = i_po-ebelp AND
vgabe = c_vgabe.
IF sy-subrc = 0.
SORT i_ekbe BY ebeln ebelp.
LOOP AT i_ekbe.
IF i_ekbe-shkzg = c_h.
i_ekbe-wrbtr = i_ekbe-wrbtr * -1.
ENDIF.
MODIFY i_ekbe.
ENDLOOP.
break-point.
Sum up the Item wise Invoice totals
LOOP AT i_ekbe.
AT END OF ebelp.
READ TABLE i_ekbe INDEX sy-tabix.
SUM.
MOVE-CORRESPONDING i_ekbe TO i_inv.
APPEND i_inv.
ENDAT.
CLEAR i_inv.
ENDLOOP.
SORT i_inv BY ebeln ebelp.
break-point.
ENDIF.
ENDIF.
Move the Vendor Name and Invoice Values to I_rep Internal Table
LOOP AT i_po.
MOVE-CORRESPONDING i_po TO i_rep.
CLEAR i_inv.
READ TABLE i_inv WITH KEY ebeln = i_po-ebeln
ebelp = i_po-ebelp.
IF sy-subrc = 0.
i_rep-orewr = ( i_po-menge - i_inv-menge ) * i_po-netpr.
i_rep-curr = i_inv-waers.
ELSE.
i_rep-orewr = i_po-menge * i_po-netpr.
i_rep-curr = i_po-waers.
ENDIF.
break-point.
Get the Vendor Name
CLEAR lfa1-name1.
SELECT SINGLE name1 FROM lfa1 INTO lfa1-name1
WHERE lifnr = i_po-lifnr.
IF sy-subrc = 0.
i_rep-name1 = lfa1-name1.
ENDIF.
APPEND i_rep.
CLEAR i_rep.
break-point.
ENDLOOP.
SORT i_rep BY lifnr ebeln ebelp.
DELETE i_rep WHERE orewr LE 0.
break-point.
ENDFORM. " fetch_data
*& Form display_data
Display the Report Output data
FORM display_data .
DATA: lv_flag, " New Flag
lv_rec TYPE i. " No of Records
CLEAR lv_rec.
IF i_rep[] IS INITIAL.
MESSAGE e000 WITH 'No Data found'(022).
ELSE.
LOOP AT i_rep.
Toggle Color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
At New Purchase Document
AT NEW ebeln.
WRITE:/1 sy-vline, 2(10) i_rep-ebeln INTENSIFIED OFF.
lv_flag = c_x.
lv_rec = lv_rec + 1.
ENDAT.
WRITE: 1 sy-vline,
12 sy-vline,13(4) i_rep-bsart,
17 sy-vline,18(10) i_rep-lifnr,
28 sy-vline,29(35) i_rep-name1,
64 sy-vline,65(4) i_rep-ekgrp,
69 sy-vline,70(10) i_rep-bedat,
80 sy-vline,81(5) i_rep-ebelp,
86 sy-vline,87(40) i_rep-txz01,
127 sy-vline,128(9) i_rep-matkl,
137 sy-vline,138(1) i_rep-pstyp,
139 sy-vline,140(1) i_rep-knttp,
141 sy-vline,142(4) i_rep-werks,
146 sy-vline,147(4) i_rep-lgort,
151 sy-vline,152(13) i_rep-menge UNIT i_rep-meins,
165 sy-vline,166(3) i_rep-meins,
169 sy-vline,170(15) i_rep-netpr CURRENCY i_rep-waers,
185 sy-vline,186(4) i_rep-waers,
190 sy-vline,191(5) i_rep-peinh,
196 sy-vline,197(4) i_rep-bprme,
201 sy-vline,202(15) i_rep-orewr CURRENCY i_rep-curr,
217 sy-vline,218(4) i_rep-curr,
222 sy-vline,223(7) i_rep-bstyp centered,
230 sy-vline.
NEW-LINE.
hide: i_rep-ebeln.
ENDLOOP.
ULINE.
FORMAT COLOR OFF.
WRITE : /2 'Total Number of Purchasing Documents:'(025) COLOR 3,
lv_rec COLOR 3.
ENDIF.
ENDFORM. " display_data
*& Form header
Write the Report Header
FORM header .
FORMAT RESET.
header
WRITE:/1(230) 'LIST OF PURCHASE DOCUMENTS PER VENDOR'(006) CENTERED.
SKIP.
FORMAT COLOR COL_HEADING.
ULINE.
WRITE:/1 sy-vline,2(10) 'Pur.Doc.No'(006) CENTERED,
12 sy-vline,13(4) 'Type'(007),
17 sy-vline,18(10) 'Vendor'(008) CENTERED,
28 sy-vline,29(35) 'Name'(009) CENTERED,
64 sy-vline,65(4) 'PGrp'(010) CENTERED,
69 sy-vline,70(10) 'Doc.Date'(012) CENTERED,
80 sy-vline,81(5) 'Item'(011),
86 sy-vline,87(40) 'Material Short Text'(024) CENTERED,
127 sy-vline,128(9) 'Mat.Group'(013),
137 sy-vline,138(1) 'I',
139 sy-vline,140(1) 'A',
141 sy-vline,142(4) 'Plnt'(014),
146 sy-vline,147(4) 'SLoc'(015),
151 sy-vline,152(13) 'Quantity'(016) CENTERED,
165 sy-vline,166(3) 'UoM'(017),
169 sy-vline,170(15) 'Net Value'(018) CENTERED,
185 sy-vline,186(4) 'Curr'(019),
190 sy-vline,191(5) 'Per'(020),
196 sy-vline,197(4) 'Unit'(021),
201 sy-vline,202(15) 'To be Invoiced'(023) CENTERED,
217 sy-vline,218(4) 'Curr'(019),
222 sy-vline,223(7) 'Doc.Cat'(026),
230 sy-vline.
ULINE.
ENDFORM. " header
*& Form toggle_color
This routine alters the color of the records in the list
FORM toggle_color.
IF gv_dial = space.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
gv_dial = c_x.
ELSE.
FORMAT COLOR 1 INTENSIFIED OFF.
CLEAR gv_dial.
ENDIF.
ENDFORM. " toggle_color
*& Form LINE_SEL
*When double clicked on EBELN field display the details of Purchase Doc
FORM line_sel.
CASE sy-lsind.
WHEN '1'.
DATA: lv_field(20),
lv_value(10),
lv_bstyp like i_rep-bstyp.
clear: lv_bstyp,lv_value, lv_field.
GET CURSOR FIELD lv_field VALUE lv_value.
IF lv_field = 'I_REP-EBELN'.
IF NOT lv_value IS INITIAL.
READ LINE sy-index FIELD VALUE i_rep-bstyp
INTO lv_bstyp.
READ CURRENT LINE FIELD VALUE i_rep-bstyp INTO lv_bstyp.
if lv_bstyp = 'F'.
SET PARAMETER ID 'BES' FIELD lv_value.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
elseif ( lv_bstyp = 'K' or lv_bstyp = 'L' ).
SET PARAMETER ID 'VRT' FIELD lv_value.
CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
elseif lv_bstyp = 'A'.
SET PARAMETER ID 'ANF' FIELD lv_value.
CALL TRANSACTION 'ME43' AND SKIP FIRST SCREEN.
endif.
ENDIF.
ENDIF.
ENDCASE.
ENDFORM. " line_sel
Regards
Anji
Similar Messages
-
Dear All,
please tell me report for Pending Service PO report.
Because in me2m,me2l,me2n To be del qty is zero though thers is pending qty in PO.
Thanks in advance.
Regadrs,
Gietsh>
gitesh mahamuni wrote:
> Dear All,
>
> please tell me report for Pending Service PO report.
>
> Because in me2m,me2l,me2n To be del qty is zero though thers is pending qty in PO.
> Thanks in advance.
>
> Regadrs,
>
> Gietsh
In ME2n, scope of list ALLES, SELECTION PARAMETER = M-OFFEN, item category = D and then execute the report. -
Invoice wise pending GR/IR report
hello ,
can anyone tell me how to find the invoice wise pending goor receipt and invoice receipt details ,
what tables contain that data.
i need to write the report on the basis of GL account,,posting date and document type .
thanksHi
Tables are
GoodsReceipt -
>MSEG or T663A
InvoiceReceipt -
>EKBE
Even you can see in BSEG
Regards
Venkat -
Pending order status report in PP module
what r the important table used for pending status *** dispatch plan report in pp module ? please help
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Jan 27, 2011 1:51 PMDear Sachin,
For this you get Functional Specs from Functional Person(PP)...
Sachin -
Report on daily sale,stock availability,pending order,Ageing report
Report on
daily sale for time period
stock availability
pending order
Ageing reportDear Goutam
Through VF05, you can see sales daily.
For stock MMBE
For Pending Order, VA05
Thanks
G. Lakshmipathi -
Purchase order pending for release report
Hi Gurus,
Is there any report which will give a list of POs pending for release?
Regards,
KumarHi ,
You can view through report ME2N..
In T-code you can select option dynamic selections > select header item> select Release status
Then you can view the pending report.
Regards
SAM -
Pending Leave Requests- Report
Hi
for all leave requests, we are using WS04200009.
Now I want a report of all the leave requests that have been applied by employees but are pending for approval, within a specific date range.
Can anyone help me on this?Hi,
I'm not sure if this helps:
PTARQ- Display Documents - Give Date Range in Period section and Document Status to SENT in Request Data section.
And execute it. The result shows all the requests in SENT status which are pending for approval.
I checked in ours and the documents are showing up.
Cheers-
Pramod -
Plz help me to create pending sales order report
Hi all,
I need these INPUT AND OUTPUT FIELDS :
Pending Sales Order Requirement Specification:
1. Fields on selection screen (input screen) : Plant From to , Distribution channel From to , division from to , date from to , Customer code from to.
2. Field in the output List : Customer Code , Customer Name , Sales Order Number , sales Order Date , Material , open Qty , Scheduled Qty , Deliver Qty , Balance Qty , Value , Total Value .Hi
use the tables
KNA1 -for Customer Number,Name (link KNA1-KUNNR =VBAK-KUNNR)
VBAK -Sales order Header (VKORG,VTWEG,SPART, AUDAT, KUNNR on selection screen) VBELn, AUDAT,NETWR for output fields
VBAP -Sales Order item .Take WERKS(plant) for selection screen
MATNR,KWMENG (qty) and NETWR for Output
VBEP- Schedule line data
LIPS - Delivery data equate lips-vgbel and lips-vgpos with vbap-vbeln and vbap-posnr and fetch the Delivery qty
OPEN qty = Order Qty - Delivery Qty
VBAP-KWMENG - LIPS-LFIMG
Regards
Anji -
Interactive Report for Pending Order
Hi Gurus,
Iam new to ABAP.
I have Requirement to display the Interactive Report for Pending Order Status Report which displays pending of purchase orders for material wise and Vendor wise .Using ALV. Can Any one help ...me which table data i need to read and what are the field required.
Thanks in advance.Hi G K,
For pending order : VA05 (select open sales orders).
cheers,
Hema. -
Pending tds report bills wise and date wise
Dear ALL,
In my client place they want Pending TDS Certificate Report Bill wise , it is there any standard tcode for that or else for this report preparation what are the tables we have to give to ababer for creating new report. Please guide to solve this issue.
girijaDear,
You can use following tables to get detailed report on TDS...
1. WITH_ITEM
2. J_1IEWTCHLN
3. J_1IEWT_CERTIF_N
4. BSIK or BSIS.
Regards,
Chintan Joshi. -
Report In Table Format in Email
Dear sir,
i want to send mail to user in format of report of issues in table Format in Body of mail.
Actully i want to send mail daily to user with Pending Issues of user.
HOD allote issue to user with Close target Date .Mail would be fire till tagget date >sysdate .
There can be Multiple issue with user.
so i want to create a list of All pending issue in report in table which are not Closed .
Report should be display with that column
eg. User 0010 has 3 Pending Issue
Issue No-----subject-----Create On-----Target Date
001---------ABC-------27-Mar-2011-------30-Jnn-2011
002--------BHN-------23-Jun-2011---------06-July-2011
003--------JHN--------05-Jun-2011---------02-July-2011
That Report Should be sent to User in mail.
My Code is
DECLARE
l_id number;
to_add varchar2(1000);
to_sub_by varchar2(1000);
from_add varchar2(1000);
l_body varchar2(4000):=:P33_DESCRIPTION;
l_sub varchar2(1000):=:P33_SUBJECT;
I_case varchar2(10):=:P33_CASE_ID;
I_isue_dte date:=:P33_SUBMITTED_ON;
l_regd varchar(100);
CURSOR C1 IS SELECT EMAIL_ID,(SELECT EMAIL_ID FROM USER_MAS WHERE USER_ID =:P33_SUBMITTED_BY_ID) AS D FROM USER_MAS WHERE USER_GR_ID=:P33_ASSIGNED_TO_GROUP_ID AND USER_ID NOT IN(:APP_USER);
BEGIN
if :P33_ASSIGNED_TO_GROUP_ID is not null then
open C1;
LOOP
FETCH C1 INTO to_add,to_sub_by;
EXIT WHEN C1%NOTFOUND;
select email_id,user_name into from_add,l_regd from user_mas where user_id=:app_user;
l_id:=APEX_MAIL.SEND(
p_to => to_add, -- change to your email address
P_cc => to_sub_by,
p_from => from_add,
p_body => 'Issue Information'||''||chr(13)||chr(10)||chr(13)||chr(10)||
'www.farhorizonindia.net:7777/crm'||''||chr(13)||
'Issue Title'||':'||l_sub||CHR(13)||chr(10)||
'Issue Number'||':'||I_case||CHR(13)||
'Issue Open Date'||':'||I_isue_dte||''||chr(13)||chr(10)||CHR(13)||chr(10)||
'Most Recent Comment'||':'||''||chr(13)||chr(10)||
l_body||chr(13)||chr(10)||''||CHR(13)||chr(10)||'Regards'||chr(13)||chr(10)||''||l_regd||CHR(13)||chr(10)||CHR(13)||chr(10)||'Please do not reply to this email.If you wish to update the call.please login to the issue Management.',
P_subj => I_case ||' Issue '||l_sub);
end loop;
close C1;
end if;
COMMIT;
apex_mail.push_queue(
P_SMTP_HOSTNAME => '102.111.0.9',
P_SMTP_PORTNO => 25);
commit;
END;How can i create that format in Body Of sending Email.
Thanks
Vedant
Edited by: Vedant on Jun 30, 2011 3:44 AM
Edited by: Vedant on Jul 5, 2011 9:17 PMLook at using an interactive reports and subscription routine..: http://st-curriculum.oracle.com/obe/db/apex/r40/apexirr/apexirrdev/apexirrdev_ll.htm
Death called while you were out, so I gave him your cell number.
Thank you,
Tony Miller
Webster, TX -
Hi,
Please tell me which table is used in pending po list ( report me2m, me2L, me2n etc), we have to make zreport using Pending PO and Pending PR.
Regards
GRHi,
In addition we could also look into EKET table which contains po schedule line wise qty & received qty. If we minus wemng from menge it gives the po open qty. Also we need check delivery completed indicator in EKPO Table.
regards,
JP -
Report layout - ME2N - Automatic background job
HI all
We are using the above report for Pending PO-RElease ie., dynamic selection - release indicator "B" thru automatic background programme schedueld thru SM36 (after setting the variant) for the relevant/concerned users.
The issue is, the report layout be default standard sap layout is taking, actually i have saved layout as PO no & date, but always, whenever background job is run, default sap report is taken in HTML.
request kindly help how i can ensure my our report layout for backgrounds jobs thru ME2N or is there any other report which can give the pending PO-Release report for my requirement.
thanks in advance
regards
srihariI am doing same as suggested by you for all other reports, but i am not successful with ME2N, because after having your own default layout, but for background it is default taking sap report. even i have tried to delete the sap - std report format but not allowed.
if any one knows how to change the sap-default std report layout then also it's okay for us, as default report as 15 columns whereas we need only max 5 columns in report layout
thanx in advance
regards
srihari -
dear All
We are required std report in MM,because we are creating whenever required report newly. It will just fine if we use the existing. Pls give.
Thanks
Rajakumar.KIf You want to Know the Pending Purchase Order Reports use the Following Reports with Selection Parameter WE101.
ME2M For Material wise
ME2N For Purchase order number wise
ME2L For Vendor Number wise
If You want to Know the Pending Invoice Reports(GR Done waiting for IR) use the Following Reports with Selection Parameter RECHNUNG.
ME2M For Material wise
ME2N For Purchase order number wise
ME2L For Vendor Number wise
For Purchasing Reports:
Use Reports
ME80 Purchasing Reporting
ME80A Purchasing Reporting: RFQs
ME80AN General Analyses (A)
ME80F Purchasing Reporting: POs
ME80FN General Analyses (F)
ME80R Purchasing Reporting: Outline Agmts.
List of standard Reports in MM
MB51 Material Doc. List
MB5L List of Stock Values: Balances
MBBS Display valuated special stock
MC$G PURCHIS: Material PurchVal Selection
MC$I PURCHIS: Material PurchQty Selection
MC.1 INVCO: Plant Anal. Selection: Stock
MC.2 INVCO: Plant Anal.Selection, Rec/Iss
MC.5 INVCO: SLoc Anal. Selection, Stock
MC.9 INVCO: Material Anal.Selection,Stock
MC.A INVCO: Mat.Anal.Selection, Rec/Iss
MC.L INVCO: Mat.Group Analysis Sel. Stock
MC48 INVCO: Anal. of Current Stock Values
MC50 INVCO: Analysis of Dead Stock
MCBA INVCO: Plant Analysis Selection
MCBC INVCO: Stor. Loc. Analysis Selection
MCBE INVCO: Material Analysis Selection
MCBK INVCO: MatGrp Analysis Selection
MCBR INVCO: Batch Analysis Selection
MCE1 PURCHIS: PurchGrp Analysis Selection
MCE3 PURCHIS: Vendor Analysis Selection
MCE5 PURCHIS: MatGrp Analysis Selection
MCE7 PURCHIS: Material Analysis Selection
MCW3 PURCHIS: Evaluate VBD Header
MCW4 PURCHIS: Evaluate VBD Item
MIR6 Invoice Overview
MMBE Stock Overview
Regards,
Ashok -
Z reports from MM point of view
hi sap guru's
i just want verious z reports which basically client required and which is not available in SAP MM plz send me reports
and how we can see the effect of z reports ( mean s which T code use to see )
regardsHi
Take a look at this
This is a report for pending purchase requisition
This involves abap coding
REPORT zmmr_pending_prs NO STANDARD PAGE HEADING LINE-COUNT
65 LINE-SIZE 255.
Structure declaration
TYPE-POOLS : slis.
TABLES : eban , ekbe ,ekko ,ekpo, lfa1,makt,mara,marc.
Work Variables and internal tables
**--Internal Table for Purchase Requisition -EBAN
DATA: BEGIN OF i_eban OCCURS 0 ,
banfn LIKE eban-banfn,
bnfpo LIKE eban-bnfpo,
bsart LIKE eban-bsart,
ekgrp LIKE eban-ekgrp,
afnam LIKE eban-afnam,
txz01 LIKE eban-txz01,
matnr LIKE eban-matnr,
werks LIKE eban-werks,
menge LIKE eban-menge,
badat LIKE eban-badat,
lfdat LIKE eban-lfdat,
ebeln LIKE eban-ebeln,
ebelp LIKE eban-ebelp,
bedat LIKE eban-bedat,
bsmng LIKE eban-bsmng,
END OF i_eban .
**-- Internal Table for Purchasing Document Item - EKPO
DATA : BEGIN OF i_ekpo OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
werks LIKE ekpo-werks,
banfn LIKE ekpo-banfn,
bnfpo LIKE ekpo-bnfpo,
END OF i_ekpo .
**--Internal Table for n History per Purchasing Docum - EKBE
DATA: BEGIN OF i_ekbe OCCURS 0 ,
ebeln LIKE ekbe-ebeln,
ebelp LIKE ekbe-ebelp,
belnr LIKE ekbe-belnr,
bwart LIKE ekbe-bwart,
budat LIKE ekbe-budat,
menge LIKE ekbe-menge,
matnr LIKE ekbe-matnr,
werks LIKE ekbe-werks,
END OF i_ekbe .
*-- final Intenral Table for displaying output.
DATA: BEGIN OF it_output OCCURS 0 ,
bsart LIKE eban-bsart,
badat LIKE eban-badat,
matnr LIKE eban-matnr,
werks LIKE eban-werks,
txz01 LIKE eban-txz01,
menge LIKE eban-menge,
banfn LIKE eban-banfn,
bnfpo LIKE eban-bnfpo,
ekgrp LIKE eban-ekgrp,
afnam LIKE eban-afnam,
lfdat LIKE eban-lfdat,
ebeln LIKE eban-ebeln,
ebelp LIKE eban-ebelp,
bedat LIKE eban-bedat,
belnr LIKE ekbe-belnr,
menge1 LIKE ekbe-menge,
budat LIKE ekbe-budat,
bwart LIKE ekbe-bwart,
lifnr LIKE ekko-lifnr,
END OF it_output .
***---- Data Declaration For ALV.
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.
**-- Input Screen
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR eban-matnr ,
s_badat FOR eban-badat,
s_werks FOR eban-werks.
PARAMETERS : p_afnam LIKE eban-afnam .
SELECT-OPTIONS : s_ekgrp FOR eban-ekgrp,
s_banfn FOR eban-banfn .
SELECTION-SCREEN END OF BLOCK blk .
*AT SELECTION-SCREEN ON p_werks.
PERFORM check_plant. " Validation for plant.
START-OF-SELECTION.
perform top-of-page .
**-- Validate input fields.
PERFORM validate_input.
**-- Get Data for P.R.and History per Purchasing Document
PERFORM get_data.
**-- Process Data
PERFORM process_data .
PERFORM build_fieldcatalog .
PERFORM display_data .
*& Form get_data
text
--> p1 text
<-- p2 text
FORM get_data .
***---- Get All the data for Purchase Requisition From EBAN
SELECT banfn bnfpo bsart ekgrp afnam txz01 matnr werks menge badat lfdat
ebeln ebelp bedat bsmng INTO TABLE i_eban FROM eban CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND banfn IN s_banfn
AND ekgrp IN s_ekgrp
AND afnam = p_afnam
AND matnr IN s_matnr
AND werks IN s_werks
AND badat IN s_badat. " Index EBAN~1 used
SORT i_eban BY banfn .
DELETE i_eban WHERE banfn NOT IN s_banfn .
IF NOT i_eban[] IS INITIAL .
SELECT ebeln ebelp matnr werks banfn bnfpo INTO TABLE i_ekpo
FROM ekpo CLIENT SPECIFIED
FOR ALL ENTRIES IN i_eban
WHERE mandt = sy-mandt
AND matnr = i_eban-matnr
AND werks = i_eban-werks
AND banfn = i_eban-banfn
AND bnfpo = i_eban-bnfpo.
ENDIF .
***---- Get All the data for History per Purchasing Document from EKBE
IF NOT i_ekpo[] IS INITIAL .
SELECT ebeln ebelp belnr bwart budat menge matnr werks
INTO TABLE i_ekbe
FROM ekbe CLIENT SPECIFIED
FOR ALL ENTRIES IN i_ekpo
WHERE mandt = sy-mandt
AND ebeln = i_ekpo-ebeln
AND ebelp = i_ekpo-ebelp
AND bwart = '105'
AND matnr = i_ekpo-matnr
AND werks = i_ekpo-werks. " ebeln ebelp primary keys
ENDIF.
ENDFORM. " get_data
*& Form build_fieldcatalog
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
DATA position TYPE i.
position = -1.
position = position + 1.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'BSART'.
fieldcatalog-seltext_m = 'PR Type'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'BADAT'.
fieldcatalog-seltext_m = 'PR Date'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Item Code'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 18.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'TXZ01'.
fieldcatalog-seltext_m = 'Material Description'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 40.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PR Qty'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 13.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'BANFN'.
fieldcatalog-seltext_m = 'PR No'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'EKGRP'.
fieldcatalog-seltext_m = 'Pur Grp'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 7.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'AFNAM'.
fieldcatalog-seltext_m = 'Raised By'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 12.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'LFDAT'.
fieldcatalog-seltext_m = 'Required Date'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 13.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'PO Number'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 18.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'BEDAT'.
fieldcatalog-seltext_m = 'PO Date'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'BELNR'.
fieldcatalog-seltext_m = 'GR NO'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 18.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'MENGE1'.
fieldcatalog-seltext_m = 'Supplied Qty'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 13.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'BUDAT'.
fieldcatalog-seltext_m = 'Supplied Date'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 13.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'BWART'.
fieldcatalog-seltext_m = 'movement type'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'LIFNR'.
fieldcatalog-seltext_m = 'Supplier'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. "build_fieldcatalog
*& Form display_data
text
--> p1 text
<-- p2 text
FORM display_data .
IF it_output[] IS INITIAL.
MESSAGE 'No Data Exist' TYPE 'E'.
ENDIF.
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'(001)
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_output
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_data
ENDFORM. " display_data
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 = 'Pending Purchase Requisition Report '
DESCRIBE TABLE i_eban LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records: ' ld_linesc
INTO t_line SEPARATED BY space.
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.
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'.0
ENDFORM . "top-of-page
*& Form validate_input
text
--> p1 text
<-- p2 text
*FORM validate_input .
*-- validate the input material.
SELECT SINGLE * FROM mara CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE 'Enter Valid Material Number' TYPE 'E'.
ENDIF.
*-- validate the input plant.
SELECT SINGLE * FROM t001w CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND werks = p_werks.
IF sy-subrc <> 0.
MESSAGE 'Enter Valid plant.' TYPE 'E'.
ENDIF.
*-- validate the input plant / material record
SELECT SINGLE * FROM marc CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND matnr IN s_matnr
AND werks = p_werks .
IF sy-subrc <> 0.
MESSAGE 'Material is not defined in Selected Entered Plant.'
TYPE 'E'.
ENDIF.
*-- validate the input Purchase Grp.
SELECT SINGLE * FROM marc CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND matnr IN s_matnr
AND werks = p_werks
AND ekgrp IN s_ekgrp.
IF sy-subrc <> 0.
MESSAGE 'Material is not defined in Selected Entered Plant.'
TYPE 'E'.
ENDIF.
*ENDFORM. " validate_input
*& Form process_data
text
--> p1 text
<-- p2 text
FORM process_data .
**-- Process All the data into Final Internal table it_output
LOOP AT i_eban.
it_output-bsart = i_eban-bsart.
it_output-badat = i_eban-badat.
it_output-matnr = i_eban-matnr.
it_output-werks = i_eban-werks.
it_output-txz01 = i_eban-txz01.
it_output-menge = i_eban-menge.
it_output-banfn = i_eban-banfn.
it_output-bnfpo = i_eban-bnfpo.
it_output-ekgrp = i_eban-ekgrp.
it_output-afnam = i_eban-afnam.
it_output-lfdat = i_eban-lfdat.
it_output-ebeln = i_eban-ebeln.
ebelp LIKE eban-ebelp,
it_output-bedat = i_eban-bedat.
READ TABLE i_ekpo WITH KEY matnr = it_output-matnr
werks = it_output-werks
banfn = it_output-banfn
bnfpo = it_output-bnfpo.
IF sy-subrc = 0.
it_output-ebeln = i_ekpo-ebeln.
it_output-ebelp = i_ekpo-ebelp.
ENDIF.
SELECT SINGLE lifnr INTO ekko-lifnr FROM ekko CLIENT SPECIFIED
WHERE mandt = sy-mandt
AND ebeln = it_output-ebeln.
IF sy-subrc = 0.
it_output-lifnr = ekko-lifnr.
ENDIF.
READ TABLE i_ekbe WITH KEY ebeln = it_output-ebeln
ebelp = it_output-ebelp
matnr = it_output-matnr
werks = it_output-werks.
IF sy-subrc = 0.
it_output-menge1 = i_ekbe-menge.
it_output-budat = i_ekbe-budat.
it_output-bwart = i_ekbe-bwart.
it_output-belnr = i_ekbe-belnr.
ENDIF.
APPEND it_output.
CLEAR it_output.
ENDLOOP.
ENDFORM. " process_data
Maybe you are looking for
-
Getting the values of a form (JSP, JavaScript involved)
Hi, basically I want to read the values from one page to another one, but I have found that when call the jsp from a javascript function it does not work!!! ... if I call the page "getValues.jsp" directly from the <form action>, everything works perf
-
Can we have listener on primary set up as 'LISTENER_PRIM' and on the standby as 'LISTENER' for a data guard environment and if so how do we configure the data guard broker?
-
Airport won't connect to network
Hi there. I'm having heaps of trouble creating and maintaining my wifi network. I will set up the network the usual way, Preferences> Ethernet/Airport> Internet sharing etc. All is fine and dandy, I can now connect to my iMac's wifi network from my p
-
Mountain lion cant install no recovery
iam trying to upgrade to mountain lion from lion on my imac mid 2007 and when i try to install it a message pops up and says mountain lion cant be installed because no recovery i need help
-
Firefox will not open any webpage - including google, youtube and firefox help.
Firefox won't open anything. This includes support.mozilla.com - I am currently using my back-up browser, Internet Explorer. Firefox is enabled to access the internet, and browser cookies are not blocked. All it says every time I try to open any webp