Reports from Transaction Tables
Hi Experts,
Can I develop a report using transaction tables.
Here I am trying to develop a report based on 2 transaction tables. In physical layer I joined one another table using primary key from table and the same column which is a foreign key in another table. And the dragged them to BBM and later to Presentation layer.
But when I tried to build a report it is showing error.
I think I missed something some where. Please help me with your inputs to develop a report directly using transaction tables.
Thanks
Surpie
Hi,
Double-click a physical table object to view its properties
Click the General tab to view and set general properties for a physical table object
The Table Type drop-down list allows you to specify the physical table object type. Physical Table is the default. You can also define the physical table as a stored procedure or a SELECT statement.
Select Table Type as "SELECT"
When you select either of these options, a text pane below the Table Type drop-down list becomes active, allowing you to enter the stored procedure or the SELECT statement
Enter the SQL statement
Click OK.
Select tables have an eyeglasses icon
A Select table serves as an opaque view in the repository metadata, but no corresponding view is actually created in the database. The Administration Tool provides a Deploy View feature that creates a corresponding view in the database.
To deploy a view, right-click the object and select Deploy View.
View deployment window will appear asking for confirmation.
Click ok. View will be created in database.
Mark if this is helpful/ correct.
Thanks
Azhar
Similar Messages
-
How to generate report from two tables using DAO design pattern?
Hi,
Iam using struts with DAO pattern for my application. According to DAO design im creating model class for each table in my database with getter,setter methods. i have no problem when im generating report from one table. but if have i have to join two tables whatis the better way for doing that? is it good practise to create a new model contains properties from both the tables?
Please help me
Thanks in Advance
RajeshDear Rajesh,
As per the pattern you are creating equivalent java objects for every database table under consideration in which each db field will become a private attribute and public getter and setter methods.
If you have to display data from one table the above approach is sufficient enough.
But in case your database is normalised ..lets take an example of Bank having Branch and Accounts tables. We dont need to repeat the whole information of the branch for every account in that branch. so we prefer to have a branch id in that table....this approach lot of insertion/deletion/updatation anomlies that may exists with the database...
now lets come back to our topic....we shall create two java objects 1) Branch 2) Account.....
When ever u just need to display simple report u can do it staright forward,,,,,now if u want to display branch information along with the account information....the two objects just created are not sufficient
So i suggest u the following approaches
1) Create an attribute of type Branch in the Accounts Object......
This shall serve the purpose of displaying the Btranch information
2) Create a collection object of type ( Vector or ArrayList) which can have objects of Account in the Branch Object,,,
Now its upto u how shall u fill up the objects with appropriate sql queries.
The method that i mentioned is followed by Oracle Toplink and Hibernate ....which provide Object to relation mapping layers.
Any queries ...revert back to me...
Mahesh -
Fatch data in ALV Reports from multiple Tables
Respected Sir,
How to fatch data in ALV Grid report from selected Field and selected Table.
Please Help and My require Field and Table is :
sono LIKE vbak-vbeln,
sodat LIKE vbak-erdat,
cust LIKE kna1-name1,
pono LIKE vbkd-bstkd,
podat LIKE vbkd-bstdk,
item_no LIKE vbap-posnr,
item_des LIKE vbap-arktx,
name LIKE vbak-kunnr,
pdate LIKE vbak-bstdk,
acdel LIKE lips-lgmng,
netweight LIKE likp-ntgew,
ordval LIKE VBRP-netwr,
CUST_MAT_NO LIKE VBAP-KDMAT,
order_qty LIKE vbap-kwmeng,
desp_qty(5) TYPE p DECIMALS 2, "LIKE lips-lfimg,
balance(5) TYPE p DECIMALS 2,
delv_no LIKE likp-vbeln,
delv_dat LIKE likp-bldat,
invoice LIKE vbrk-vbeln,
exnum like J_1IEXCHDR-exnum,
invoice_dat LIKE vbrk-fkdat,
invoice_val LIKE konv-kwert,
END OF it_out.
*Please Refere the following code and if u wnt to change at ur own ieda u can change and reply me back.*
*Thnaks In ADVANCE.*
*Please Do need full it.*
*Bhavesh Panchal*
*Baroda*
Also I Make Reports For SO : full coding is.
*& Report Z_NEW1
REPORT Z_NEW1.
TABLES : vbak, "Sales Document: Header Data
vbkd, "Sales Document: Business Data
likp, "SD Document: Delivery Header Data
vbrk, "Billing Document: Header Data
konv, "Conditions (Transaction Data)
lips, "SD document: Delivery: Item data
vbap, "Sales Document: Item Data
vbrp, "Billing Document: Item Data
kna1, "General Data in Customer Master
J_1IEXCHDR.
DATA : i_vbak LIKE vbak OCCURS 10 WITH HEADER LINE.
DATA : it_vbkd LIKE vbkd OCCURS 10 WITH HEADER LINE.
DATA : it_likp LIKE likp OCCURS 10 WITH HEADER LINE.
DATA : it_vbrk LIKE vbrk OCCURS 10 WITH HEADER LINE.
DATA : it_konv LIKE konv OCCURS 10 WITH HEADER LINE.
DATA : it_lips LIKE lips OCCURS 10 WITH HEADER LINE.
DATA : it_vbap LIKE vbap OCCURS 10 WITH HEADER LINE.
DATA : it_vbrp LIKE vbrp OCCURS 10 WITH HEADER LINE.
DATA : it_kna1 LIKE kna1 OCCURS 10 WITH HEADER LINE.
DATA : it_vbrp1 LIKE vbrp OCCURS 10 WITH HEADER LINE.
DATA : it_temp LIKE lips OCCURS 10 WITH HEADER LINE.
DATA : it_lips1 LIKE lips OCCURS 10 WITH HEADER LINE.
DATA : it_lips2 LIKE lips OCCURS 10 WITH HEADER LINE.
DATA : it_lips3 LIKE lips OCCURS 10 WITH HEADER LINE.
DATA : it_vbak1 LIKE vbak OCCURS 10 WITH HEADER LINE.
DATA : it_vbak2 LIKE vbak OCCURS 10 WITH HEADER LINE.
DATA : it_vbap1 LIKE vbap OCCURS 10 WITH HEADER LINE.
DATA : it_posnv LIKE zdelprt OCCURS 10 WITH HEADER LINE.
DATA : BEGIN OF it_out OCCURS 10,
sono LIKE vbak-vbeln,
sodat LIKE vbak-erdat,
cust LIKE kna1-name1,
pono LIKE vbkd-bstkd,
podat LIKE vbkd-bstdk,
item_no LIKE vbap-posnr,
item_des LIKE vbap-arktx,
name LIKE vbak-kunnr,
pdate LIKE vbak-bstdk,
acdel LIKE lips-lgmng,
netweight LIKE likp-ntgew,
ordval LIKE VBRP-netwr,
CUST_MAT_NO LIKE VBAP-KDMAT,
order_qty LIKE vbap-kwmeng,
desp_qty(5) TYPE p DECIMALS 2, "LIKE lips-lfimg,
balance(5) TYPE p DECIMALS 2,
delv_no LIKE likp-vbeln,
delv_dat LIKE likp-bldat,
invoice LIKE vbrk-vbeln,
exnum like J_1IEXCHDR-exnum,
invoice_dat LIKE vbrk-fkdat,
invoice_val LIKE konv-kwert,
END OF it_out.
SELECT-OPTIONS: sono FOR vbak-vbeln.
SELECT-OPTIONS: customer FOR vbak-kunnr.
SELECT-OPTIONS: d_date FOR likp-bldat.
LOOP AT it_OUT.
select * into table i_vbak from vbak
where vbeln IN sono.
sono = vbak-vbeln.
append it_out.
modify it_out.
endloop.
LOOP AT it_out.
SELECT single vbeln netwr FROM vbak
INTO (it_out-pono,it_out-podat)
WHERE vbeln = it_out-sono.
"it_out-item_no.
append it_out.
ENDLOOP.
select * into table i_vbak from vbak
where vbeln IN sono.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_structure_name = 'VBAK'
I_grid_title = 'Bhavesh Panchal'
tables
t_outtab = i_vbak
t_outtab = it_out
exceptions
others = 1.Hi Bhavesh Panchal ,
You have to create another internal table with fields which you would like to display in the ALV output.
once you fetch the data from different tables into respective internal tables. loop those internal tables and insert the field values to internal table which you want to display in ALV output.
Create field catalog for the internal table created for ALV output.
Hope it shall be useful.
Regards
Santosh Kumaar.M -
How to generate a report from crm table to find out user status changes
Dear all,
Could you please help me on generating a report from SAP CRM table level
to find out user status changes in crm orders for a specific period of time?
Thanks in advance,
Regards,
ShaikHi Shaik.
You would not need to write report for this. You need to create a Table view mainenance for the CRMD_ORDERADM_H or CRMD_ORDERADM_I for whichever you need.
Follow the below or search on google for more on table view maintenance.
Go to SE11, give the table name and click on change. Then Go to utilities--> Table maintenance generator.
In the table maintenance generator screen, you should give Authorization Group,
Function Group name (Function Group name can be same as table name),
Maintenance type can be one step or two step, usually you will create with one
step. You should give maintenance screen number. After clicking on create button,
a table maintenance generator will be created.
To check it go to SM30 . In SM30, you find display, Maintain options.
You can view the table contents by choosing Display and supplying the selection criteria of dates.
Regards
Apoorva -
AR aging report--from transaction date
Hi
Presently the 7/4 bucket aging report shows current and invoices no of days past due i.e. 31 days due past due date.
Is there a report or any way by which this aging report can be generated to show aging from transaction date.
Thanks
NinadHi ninad
Aging Reports by default are generated based on Transaction date only and not based on GL Date. Please explain your requirement clearly
Regards
Sivakumar -
Report from multiple tables - two tired
Hi,
I am trying to create a report with data coming from two tables in Apex, similar to one with a header record followed by detail records. The output would be similar to the output that would be generated from the statement below. Do you know if this is possible? Could you please help with the process to create this. Thank you.
SET SERVEROUTPUT ON
DECLARE
BEGIN
FOR rec IN (select SEQ_MAJ_GOALS as SEQ_MAJ_GOALS from MAJOR_GOALS where EMP_NO = :EMPNO and r_status = 'Open')
LOOP
DBMS_OUTPUT.PUT_LINE('SEQ_MAJ_GOALS');
DBMS_OUTPUT.PUT_LINE(rec.SEQ_MAJ_GOALS);
FOR tasks IN (select TASK_NO, TASK_DESC, LEAD_REQ, TASK_STATUS from TASKS where SEQ_MAJ_GOALS = rec.SEQ_MAJ_GOALS)
LOOP
DBMS_OUTPUT.PUT_LINE(rpad(ltrim(tasks.TASK_NO),11)||rpad(ltrim(tasks.TASK_DESC),30)||rpad(ltrim(tasks.LEAD_REQ),20)||rpad(ltrim(tasks.TASK_STATUS),10)||chr(10));
END LOOP;
END LOOP;
END;I do this by using a PL/SQL region and use of the htp.p('');
An example:
create a procedure and DECLARE a cursor with variables to hold each value from the cursor. In the BEGIN section create your FOR loop, use the cursor to populate the variables, then use the htp.p call to create your own table output.
It might look something like this:
declare
cursor c_rec is select SEQ_MAJ_GOALS
from MAJOR_GOALS where EMP_NO = :EMPNO and r_status = 'Open';
v_goals NUMBER;
cursor c_task is select TASK_NO, TASK_DESC, LEAD_REQ, TASK_STATUS
from TASKS where SEQ_MAJ_GOALS = v_goals;
v_taskno NUMBER;
v_taskdesc VARCHAR2(255);
v_leadreq VARCHAR2(42);
v_taskstatus VARCHAR2(20);
begin
htp.p('<table>');
open c_rec;
LOOP
FETCH c_rec into v_goals;
EXIT WHEN c_rec%NOTFOUND;
htp.p('<tr><th colspan="4">SEQ_MAJ_GOALS</th></tr>');
htp.p('<tr><td colspan="4">'||v_goals||'</td></tr>');
open c_task;
LOOP
FETCH c_task into v_taskno, v_taskdesc, v_leadreq, v_taskstatus;
EXIT WHEN c_task%NOTFOUND;
htp.p('<tr><td>'||v_taskno||'</td><td>'||v_taskdesc||'</td><td>'||v_leadreq||'</td><td>'||v_taskstatus||'</td></tr>');
END LOOP;
close c_task;
END LOOP;
close c_rec;
htp.p('</table>');
end;You can add your own styles and formatting. -
hi,
what is the syntax call a report from a transactionThere are different types based on ur functionality.
Call transaction 'T.code' using bdcdata mode 'N' update'S' into massages 'Messtab'.
Call transaction 'T.code' and skip first screen.
create a pgm in se38.
This transaction name is created in se93 ,where u will give ur pgm name and create a new trans name.
If you are asking about calling a report from a specific transaction (for eg.:specific industry solutions)
its usually done by creating a method in a BOR object.
u will code this call transaction statement inside this method.
for eg.
Include <object> this is an object in BOR.
Begin_method.
DATA
call transaction ' xyz' .
end method. -
Printing abap report from Transactional Iview
Hi All,
I have a abap report and i have created a transactional Iview to embed the report into Portal.
Now when i try to execute and print the report from portal end i am unable to print the report.
It opens another window saying please wait for the formatted data to be displayed in the window and please do not close the window and the download option comes at the top block bar. Aftter clicking on download file it promts to save the file . When saved and opned the file is corrupt and cannot be opened by adobe reader.
Thanks and Regards,
NuzhatNo answer
-
Unable to print the reports from Transaction iViews
Hi Experts,
We have configured SAP Transctions iViews in portal. These transactions are basically of reports, when we want to print the report from EP. When clicking on the Print from the Transaction iView we are getting the error "File does not begin with '%PDF".
iView launches in HTML Gui.
When we launch the same report from ECC directly login with GUI we are able to take the print.
Is there any settings need to be maintain in "FRONTEND_PRINT" service.
Thanks
MurthyHi,
Check the note Note 1042424 - Printing in WebGUI: Error "File does not begin with '%PDF-'"
This should help resolve the problem.
Cheers-
Pramod -
New report from transaction ST03N
Hi everybody,
In transaction ST03N you can have an overview about User or transaction for a period.
This helps to let you know what kind of work has been done in the system.
The data is shown separated, you have one place for transactions and one for user.
The only problem is that we do not have a combined list which shows, user + transaction at once.
Is there a way to do this, or has anybody any idea where the data from this transaction are stored, so I can get them from the database
Regards,
Dren Selimireport zbc_r_tcodes_by_user.
data:begin of gv_output,
user type string,
type type c,
title type string,
times type i,
end of gv_output,
gt_output like standard table of gv_output, "Output table
gv_title type char100. "Report title
perform get_data.
*& Form get_data
* text
form get_data.
data:lv_datum type d,
lt_data type standard table of swncaggusertcode,
lv_data type swncaggusertcode.
lv_datum = sy-datum.
gv_title = 'Objects executed by users from'.
write: sy-datum to gv_title+55.
do.
lv_datum+6 = '01'.
refresh lt_data.
call function 'SWNC_COLLECTOR_GET_AGGREGATES'
exporting
component = 'TOTAL'
periodtype = 'M'
periodstrt = lv_datum
tables
usertcode = lt_data
exceptions
error_message = 1
no_data_found = 1
others = 2.
if sy-subrc ne 0.
exit.
endif.
write lv_datum to gv_title+40(10).
subtract 1 from lv_datum.
loop at lt_data into lv_data where tasktype = '01'.
gv_output-user = lv_data-account.
gv_output-type = lv_data-entry_id+72.
gv_output-title = lv_data-entry_id(40).
gv_output-times = lv_data-count.
collect gv_output into gt_output.
endloop.
enddo.
sort gt_output.
gv_title+52(1) = '-'.
condense gv_title.
endform. "get_data -
Post Author: kevans
CA Forum: Data Connectivity and SQL
I really need help with this and so far I've had no luck finding a solution on Crystal's knowledge base, forums our even outside of this site.
I recently upgraded from crw8 to crw10 and of course after converting reports and placing them into production I now discovered that crw10 will place locks (blocking) on the SQL tables it is using.
Is there a setting in crystal so I can turn this off? Someone said I can use a statement like ... "with (nolock)" but I can't seem to figure out the correct syntax to use, I'm not even sure if this works since I can't find info on it. I desperately need help!!!
Example - if this is my select statement how would I add the "nolock" to it?
(DateTimeToDate (PDMTimeToDateTime ({call_req.open_date})) >= {?Starting Date}) AND (DateTimeToDate (PDMTimeToDateTime ({call_req.open_date})) <= {?End Date}) AND (if {?Select_Group} <> "ALL" then {ca_contact.last_name} = {?Select_Group} else if {?Select_Group} = "ALL" then true) AND {call_req.type} = {?Type}Post Author: sharonmtowler
CA Forum: Data Connectivity and SQL
no lock is used in the sql stored procedure. i believe you can look at your sql statement in the report and place the nolock(prior to the table name)
the only problem with this is you may get dirty data. most sql developers dont recommend it especially with real time data. -
Help me how to create report from below tables
I want to prepare a Z Report using tables J_1iexcdtl and J_1iexchdr. Use the LIFNR,DOCNO,EXYEAR,BUDAT,LIFNR from table J_1iexchdr and obtain fields EXBAS,EXBED,RDOC1,ECS from table J_1iexchdr with the STATUS field having value only P.
help me please
thanks in advanced.Hi,
U may follow the following steps.
1. Delcare 1 internal table itab1 for hodling all necessary data from table1
2. Delcare 1 internal table itab2 for hodling all necessary data from table2
3. Delcare 1 internal table itab3 for hodling all necessary data for outout purpose
4. select allnecessary fields
from table1
Appending table itab1
WHERE Condition .
if sy-subrc = 0.
SELECT all necessary fields
from table2
Appending table itab2
FOR ALL ENTRIES IN itab1
WHERE lifnr = itab1-lifnr and
status = 'P' and
rest of the condition.
endif.
5. you may move all the data into another internal table itab3 for out put purpose
Cheers. -
How to get the execution time of a Discoverer Report from qpp_stats table
Hello
by reading some threads on this forum I became aware of the information stored in eul5_qpp_stats table. I would like to know if I can use this table to determine the execution time of a worksheet. In particular it looks like the field qs_act_elap_time stores the actual elapsed time of each execution of specific worksheet: am I correct? If so, how is this value computed? What's the unit of measure? I assume it's seconds, but then I've seen that sometimes I get numbers with decimals.
For example I ran a worksheet and it took more than an hour to run, and the value I get in the qs_act_elap_time column is 2218.313.
Assuming the unit of measure was seconds than it would mean approx 37 mins. Is that the actual execution time of the query on the database? I guess the actual execution time on my Discoverer client was longer since some calculations were performed at the client level and not on the database.
I would really appreciate if you could shed some light on this topic.
Thanks and regards
GiovanniThanks a lot Rod for your prompt reply.
I agree with you about the accuracy of the data. Are you aware of any other way to track the execution times of Discoverer reports?
Thanks
Giovanni -
SQL Query Report from DB2 Tables
Team,
Our HTML DB application requires us to build a Report against a DB2 table. In addition, we are required to view the detail of the selected DB2 data on a second page, much like the 2 page report as generated by the wizard.
So...what is the best way to present DB2 data in both Report and Detail format using HTML DB? Better yet...how can DB2 tables be set up/connected/defined to HTML DB so they operate just like the Oracle tables which reside inside the Oracle database?
Thanks for your help.
HowardAn addendum to my original post....
How about the use of a JDBC driver? Is there one available to meet my requirements?
Thanks again
Howard -
How to get Row = 2 Details in report from JDT1 Table
Dear Experts,
SELECT T0.TransId, T0.Account, T1.[AcctName]Row1, T0.Debit, T0.Credit, T0.RefDate, T0.BaseRef, T0.Closed, T0.Ref1, T0.Ref2, T0.Ref3Line, T0.RelType
FROM JDT1 T0 INNER JOIN OACT T1 ON T0.Account = T1.AcctCode
WHERE T1.[AcctName] = [%0]
in above query i want ROW2 Detail from JDT1Table.
Any Help?
Regards,
Rahul
Edited by: RAVI_JHA_SAP on Mar 3, 2011 8:27 AMHi Ravi.......
Try this.....
SELECT T0.TransId, T0.Account, T1.AcctName, T0.Debit, T0.Credit, T0.RefDate, T0.BaseRef, T0.Closed, T0.Ref1, T0.Ref2, T0.Ref3Line, T0.RelType
FROM JDT1 T0 INNER JOIN OACT T1 ON T0.Account = T1.AcctCode
WHERE (T1.AcctName = '[%0]' or '[%0]'='') and T0.[Line_ID]=2
Regards,
Rahul
Maybe you are looking for
-
Windows on the internal disk, can this be done?
Hello everybody! I have an Intel Mac Mini 1.83 core duo w/80GB HD. I want to use the internal 80GB disk for Windows Vista or XP if Vista can't be installed (Apple drivers, etc) and an external 120GB FW disk to boot Mac OS X and be able to boot in any
-
How to convert doc to pdf using java?
-
Hi , this is Surya. can we use idoc adapter at receiver side (i.e receiver- sap Ecc6.0 ) like that normal sap system (4.7) with regrads, surya
-
Integration Events - Documentation
Hi, Does anyone have any documentation on Integration Events? My current issue is that when I have a workflow for 'Modified Record is Saved', not all the fields I have flag to be tracked are stored on the integration event. The field that is changed
-
Hi, I've installed the discussion forum portlet onto our Oracle 10g Application Server. When I try to access the forum, I get the following error :- Unable to perform the operation: JBO-30003: The application pool (config.AppModuleLocal) failed to ch