Generate graphical report
Hi,
Using XML and XSL, can anyone suggest how to generate a graph (either a bar chart or pie chart).
Thanks.
Eswari
To be more specific in my requirement I need to generate a graph similar to generating crystal reports in vb. I have an xml with column level/row level data and XSL format for generating a HTML or PDF report. I need to generate a graph like bar chart representation.
Thanks.
Eswari
Similar Messages
-
Very-Urgent ( Rep- 56048 : Eng Crashed in Oracle9i Graphical Report )
Hi friends,
I am getting problem in Oracle9i Reports while generating graphical report.
The error is : REP-56048 - Engine rwEng-0 Crashed.
This error is for only Grahical type report.
Thanks for help.
saroj gupta.When you create a .jsp report, Reports inserts an XML report definition in the <rw:objects> tag. This is why it appears to need an XML parser before it can open up a .jsp file.
You could try just taking this XML and saving it as a .xml file (ie: remove everything from the .jsp except the content of the <rw:objects> tag). This would at least tell you if the problem is in the XML of the JSP section of the file.
If you can open up the contents of the xml report then you could try opening the .jsp file up in JDeveloper and see if there are any inconsistencies in the file - ie: unmatched tags.
If you get an "unable to start the XML parser" error trying to open up the xml file, try creating a simple report and saving and loading to XML. -
My users are not very tech-savvy and they do not like the traditional grid looking report that is standard reporting (IR or classic) in APEX. I'd like to create a more graphical display of the data with column data displayed along with an icon in more of a cell or box layout as opposed to a record-per-row traditional layout.
The shop.oracle.com site has some good examples of what I mean by this:
https://shop.oracle.com/pls/ostore/f?p=dstore:2:198449711780121::NO:RIR,RP,2:PROD_HIER_ID:4509881204651805720002
Under the "Featured Products" section of this page, is this done through an Icon View in an IR ?
I'm hoping that someone can give me some insight to get me started conceptually on this. I'm not even sure where to begin to create a dynamically generated graphical report in APEX.
Many thanks,
ReidHi,
I guess that "Featured Products" is list region. Under that there is IR.
If you install Sample application you can see examples of interactive report icon and detail view e.g. on page 3
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/demo_view.htm#BCGGBEID
Regards,
Jari
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
How to generate a report in swing
Hi
I Would like to generate a report in the following formate. Could you please help me By providing some Sample code.
BOSCO COLLEGE LIBRARY
Book Details
BookID | Book Name | Book Author| Refrence/Non Reference
---------------------------------------------------------here the details should come from the Database.
Thank you very muchhi
i tried out your idea, It is working well But here with me the Problem is I am not able to align the Page with in the A4 Sheet and then Roport Heading is shown at the CENTER on the Screen But while Printing at the Papar it is going to the Top Right Corner. Here i am posting My code please check it and give me Solution for it
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.util.Vector;
import java.sql.*;
import java.util.*;
import java.text.*;
import java.io.*;
import java.awt.event.*;
import java.awt.print.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
public class Report extends JFrame implements Printable, ActionListener{
JPanel headerPanel,titlePanel,dataPanel,btnPanel,masterPanel;
String headerStr,titleStr;
JTable table;
DefaultTableModel dtm;
Vector dataVector,temp,colVec;
JScrollPane scrollPane;
JLabel headerLabel,titleLabel;
private JButton btnprint, btncancel;
private Connection con;
private Statement st;
// Founction FOR PRINTING
public int print(Graphics g, PageFormat pf, int page) throws PrinterException {
if (page > 0) { /* We have only one page, and 'page' is zero-based */
return NO_SUCH_PAGE;
/* User (0,0) is typically outside the imageable area, so we must
* translate by the X and Y values in the PageFormat to avoid clipping
Graphics2D g2d = (Graphics2D)g;
g2d.translate(pf.getImageableX(), pf.getImageableY());
/* Now print the window and its visible contents */
masterPanel.printAll(g);
/* tell the caller that this page is part of the printed document */
return PAGE_EXISTS;
public Report(Connection con){
headerPanel=new JPanel();
headerPanel.setLayout(new BorderLayout());
titlePanel=new JPanel();
titlePanel.setLayout(new BorderLayout());
dataPanel=new JPanel();
dataPanel.setLayout(new BorderLayout());
//you can take dynamic values here..
headerStr="DON BOSCO SCHOOL LIBRARY";
this.setSize(750,500);
titleStr="Book Details";
//Creating button for print
btnprint= new JButton("Print");
btnprint.addActionListener(this);
btncancel = new JButton("Cancel");
btncancel.addActionListener(this);
btnPanel = new JPanel();
btnPanel.add(btnprint);
btnPanel.add(btncancel);
//getContentPane().add(btnPanel,BorderLayout.SOUTH);
colVec=new Vector();
dataVector=new Vector();
headerLabel=new JLabel(headerStr);
headerLabel.setHorizontalAlignment(SwingConstants.CENTER);
titleLabel=new JLabel(titleStr);
titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
headerPanel.add(headerLabel,BorderLayout.NORTH);
headerPanel.add(titleLabel,BorderLayout.CENTER);
table=new JTable();
//table=new JTable();
//write your code to get details from database and return in vector if possible
//I am giving static values here it here
try
st=con.createStatement();
ResultSet rs=st.executeQuery("Select * from Books");
ResultSetMetaData md= rs.getMetaData();
int columns =md.getColumnCount();
String booktblheading[]={"BOOK ID","BOOK NAME","AUTHOR","REFERENCE","CATEGORY"};
for(int i=1; i<= booktblheading.length;i++)
colVec.addElement(booktblheading[i-1]);
while(rs.next())
Vector row = new Vector(columns);
for(int i=1;i<=columns;i++)
row.addElement(rs.getObject(i));
dataVector.addElement(row);
((DefaultTableModel)table.getModel()).setDataVector(dataVector,colVec);
rs.close();
st.close();
catch(Exception e)
System.out.println(e);
/**dtm=new DefaultTableModel();
dtm.setDataVector(dataVector,colVec);*/
table.setShowHorizontalLines(false);
table.setEnabled(false);
table.getTableHeader().setBackground(Color.WHITE);
scrollPane=new JScrollPane(table);
scrollPane.setAutoscrolls(false);
masterPanel = new JPanel();
dataPanel.add(scrollPane,BorderLayout.CENTER);
dataPanel.setPreferredSize(scrollPane.getPreferredSize());
dataPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
getContentPane().setPreferredSize(new Dimension(750,500));
getContentPane().setLayout(new BorderLayout());
headerPanel.setBackground(Color.WHITE);
dataPanel.setBackground(Color.WHITE);
masterPanel.setLayout(new BorderLayout());
masterPanel.add(headerPanel,BorderLayout.NORTH);
masterPanel.add(dataPanel,BorderLayout.CENTER);
getContentPane().add(masterPanel,BorderLayout.CENTER);
//getContentPane().setBackground(Color.WHITE);
getContentPane().add(btnPanel,BorderLayout.SOUTH);
pack();
setVisible(true);
public void actionPerformed(ActionEvent ae)
Object obj = ae.getSource();
if(obj==btnprint)
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(this);
boolean ok = job.printDialog();
if (ok)
try {
job.print();
catch (PrinterException ex)
/* The job did not successfully complete */
else if(obj== btncancel)
setVisible (false);
dispose();
}Thank you very much -
How to generate interactive report in alv
hi,
how to generate interactive report in alv,for this what are the requirements,
give me one sample report.
thankyou.Hi,
Chk these helpful links..
ALV
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Regards
Anversha -
Display Standard Program Graphic Report in Adobe Form
Hi All,
I'm new this field and really need you all expertise..
I have requirement which is to display Standard Program SAP Business Graphic Report (eg: Profile Matchup) in Adobe Form.
I also have read this blog but there is something i'm not clear...
/people/alex.liu/blog/2009/08/12/how-to-display-a-dynamically-generated-business-chart-from-igs-in-webdynpro-for-abap-application-and-adobe-interactive-form
What are the steps I should do:-
Looking forward for any reply..tqvm
Edited by: ahmad azlan on Jun 20, 2010 3:37 PMWhen you need to send a picture into the offline form:
another image question - using Regular ABAP not web dynpro and
Display a logo dynamically in adobe form
When you need to send a picture into the online form:
/people/bhawanidutt.dabral/blog/2007/11/15/how-to133-integrate-adobe-form-on-webdynpro-for-abap-and-deploy-it-on-portal
Otto
p.s.: refine your question, please -
Ressource Problem: Export with graphical reports from projects with integrated sub-projects
Hi all,
i have the following problem with the exported data of the graphical reports possibility.
Expected output:
OLAP Cube with processes and ressources
Setup:
Project Server 2010 with Enterprise ressource pool
One main project with 6 integrated sub-projects
Every ressource is assigned to just one sub-project or the main project
Problem:
The data (work and cost) in the OLAP Cube exported from the main project is 7 times (some reports 49 times) higher than the data in the main project
Tested scenarios:
Export just processes -> data is correct
Export just ressources -> data is 7 times higher
Generate another main project with 2 sub-projects and no ressources in the main project - Export of processes and ressources -> data is 2 times higher
Because of the tested scenarios I expect that this is a problem caused by ressources and integrated sub-projects.
I hope that this community is able to help me to solve this problem.
Thanks & all the bests,
HolgerUsing the "Baseline work report", I can't reproduce your issue:
I have 1 task in each project (2 projects) with a resource assigned on each task (80hrs). The report correctly shows me 160 hrs.
Which Project 2010 SP and CU do you have? I'd suggest you to install the
latest version and see if it helps.
Hope this helps,
Guillaume Rouyre, MBA, MVP, P-Seller | -
Problems in create graphical report from Oracle FSG xml output using BIP
We are trying to create graphical reports from Oracle Financial Statement Generator (FSG) xml output. I personally have extensive exposure working with XML (BI) Publisher but until recently I have never tried to use the BIP charting wizard to create graphical reports from FSG xml output out of EBS 11i/R12.
I created an SR with Oracle but they had to create an enhancement request for this issue. Does anyone know or have any idea on how we can accomplish this. The charting wizard pops up but the xml tags available do not make any sense.
If anybody has any idea please send me an email at [email protected]
Thanks,
LeoTry some thing like following
http://oraclebizint.wordpress.com/2008/03/10/oracle-bi-ee-101332-sending-reports-to-non-obi-users-delivery-manager-api-of-bi-publisher/ -
APiI for generating Quote report as Pdf in oracle iStore
hi,
Any one help me on which API is used for generating quote report in oracle istore...Are u sure about the report version.
Please do upgrade while even in oracle they almost stopped for new version -Developer suite -
Error while generating the report on Test env (for divide condition)
Hi All,
I am facing the below error while generating the report in test environment while the same report is working fine on Prod environment.
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression. [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression. [nQSError: 16015] SQL statement execution failed. (HY000)
Actually the error is coming for the below logics:
COUNT(DISTINCT RMA.RMA)/COUNT(DISTINCT User."User Name")
"RMA Fact"."Module Backlog"/COUNT(DISTINCT User."User Name")
Can anyone please tell if I need to make any configuration changes as the same logic works perfectly fine on production but not on test.
Thanks in advanceIs anyone having any idea about it...
-
Error while generating earlywatch report.
Hi Guru's
I am having problem in generating earlywatch report.
In solution manager i find these errors:-
The data for this session is overdue. Data has not yet been transferred from the associated satellite system.
Go to the Service Data Control Center (transaction SDCCN) in the satellite system and check why the data has not been sent.
Typical sources of errors are:
The RFC connection for the SAP Solution Manager system is not working.
The 'Task Processor' background job, which collects the session data, has been changed.
Problems arose while data was being collected (see the detail log for the task that collects the session data).
A periodic 'SDCC Maintenance Package' task has not been scheduled to check whether your SAP Solution Manager system requests session data.
Session number: 1000000002286
In source system tcode sdccn when i try to run Refresh sessions i get following error:-
31.05.2010 12:24:34 > Task rescheduled for 20100531125533 ( attempt 0001 ) /BDL/SAPLBDL11 0
31.05.2010 12:24:34 Refresh of session overview failed from destination SM_SMPCLNT100_BACK /BDL/SAPLBDL11 0
31.05.2010 12:24:34 > Sessions cannot be refreshed from destination SM_SMPCLNT100_BACK ( SMP , 0020275310 ) /BDL/SAPLBDL11 0
31.05.2010 12:24:34 > You cannot log on (CUA system assignment missing) /BDL/SAPLBDL11 0
31.05.2010 12:24:34 > error reading function module interface DSWP_API_SESSIONLIST_GET from SM_SMPCLNT100_BACK /BDL/SAPLBDL11 0
31.05.2010 12:23:58 Refresh of session overview started from destination SM_SMPCLNT100_BACK /BDL/SAPLBDL11 0
I have checked with the rfc's they are working fine.
Please help.
Regards
AkifHi Akif,
Could you please try deleting the RFC Connection and entering it again in the Managed system.
1) SDCCN
2) Goto-> Settings-> Task specific.
3) RFC Destinations-> Settings click on change mode.
4) Delete the RFC and then add the RFC Connection again and mark as Master and active.
Then check it, hope it solves the issue.
Thanks,
Raghavendra. -
Error while generating the report in BI using CRM
dear experts... . / friends ...
i have created a query long back called SERVICE REQUEST using Query designer
using that particular query i have generating the reports from MAY 1 to till date
in my report i have a characteristics called USER STATUS , for this user status i can restrict the below values i.e
open
reopen
waiting
in - transfer
resolved
new
completed
in the above values , i want to get the transaction numbers which are not completed i.e. i need to exclude complete
and i need to include all the above values
but after generating the report , am getting completed records too...
and in the report i saw for that completed record i have OPEN DOCUMENTS(key figures) and NO.OF DOCUMENT HEADERS(key figures) is 0
actually if we see any updated record for the particular report the key figure NO.OF DOCUMENT HEADERS should be 1 right?
so in my scenario if NO.OF DOCUMENT HEADERS getting 0 so the filter condition for COMPLETED , is not working
so that the reason even though i have filtered the COMPLETED value for the USER STATUS field , am getting those
fields....
so friends kindly help me in this regard to avoid completed value for the filed USER STATUS..
thanks in advance...for u r helping
regards...
GAdear experts,
for the above issue i have raised the OSS message and i got the below reply as well..
they told me to create a pre queris can any one help me in this regard?
=>
=> If you want to ensure that all completed transactions are filtered
from the report even when keyfigure "open documents" <> 0 then
you have to adjust your query definitions, e.g. by means of
pre-queries to create a list of records for which a "completed"
state-entry exists. -
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,
radhakrishnaHi
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
> -
Generating a report based on two analytics(for ex:PO and PR)
I have a question regarding generating reports on two analytics.
In our scenarios,
We need to generate a report based on Purchase order and Purchase request.Is it possible in OBIA?
if yes,please provide the solution.
Thanks in advanceHi ,
Thanks for your valuable time.
We are in designing phase of the project. we need to know ,Is there any inbuilt dashboards or reports built using both PO and PR repositories?
I would like to explain with ex:
Let's say we need a report or dashboard containing few fields from PO and few fields from PR.Let's assume both PO and PR data available at same granularity.
Do we have any such inbuilt reports or dashboard?
If not,could we customize the report generation using both PO and PS tables?
Please provide the solution.
Thanks in advance.
Edited by: user3561029 on Aug 31, 2008 9:03 PM -
How to generate a report for all Analyses which conatins a specific column
Hello Experts
I am trying to generate a report of all Analyses which contains a specific column. We are currently using OBIEE 11.1.1.7.0.
I have tried to use the command line options using ./runcat.sh, but did not find any arguments that can filter the analyses by a specific column used.
Any help is much appreciated.
Regards
RakeshHi Rakesh,
SampleApp has your answer: everything is available for free, just copy/paste and run on your own instance.
http://slc02ojw.oracle.com:7780/analytics/saw.dll?Dashboard&PortalPath=%2Fshared%2F10.%20Lifecycle%20and%20Admin%2F_port…
(as long as this instance will be up...)
In the dashboard named "10.31 Webcat Analysis" you have a columns to analysis report where you select the presentation column and you get all the reports using it.
This dashboard require a script to be run on your catalog, it will parse it and extract all the column info (and many other interesting things) and load it in a database. The scripts are simple and well documented, so you can easily adapt them to your own environment.
If you want the script there is no miracle solution: download SampleApp and extract it (it's not small, but with all the great content it has we can't complain about that ...).
Maybe you are looking for
-
(Control Design & Simulation) State-Space block doesn't give output
I've tried and tried but can't get the State-Space block module to give me a graph / output. I have no idea what the problem is and hope that somebody can help me. The numbers and calculations work in Matlab (Simulink) but i can't get it to simulate
-
I just got the flash update and downloaded AIR, but on clicking on the .air installer package, get the message, "This application requires a version of Adobe AIR which is no longer supported. Please contact the application author for an updated versi
-
I have a crystal sql command as follows select uni.uprovince,sum(Tamt_r1 + Tamt_r2 +Tamt_r3 +Tamt_r4 +Tamt_r5) / sum(uheadcount) as averagesales, from uni join guide on uni.uguicode = guide.gcode join travel on uni.utracode = travel.tagent where un
-
We have Cisco Unity connections ver 7.1.3. We also have some wav files that were created for call handlers. These wav files sound fine when playing through the computer. When I attmpted to upload them to the CUC server they upload fine, but when the
-
"my card" in address book for system accounts
I have four macs.. I would love to have them refer to the same card in the Address Book for my logon.. instead I have four seperate cards.. Can anyone give me any leads?