Add Column Delete in report, How to delete row using this delete Option
Hi Friends,
i have a report ,iwant to add an option DELETE in last column.When i click on DElete then respective id sholund be deleted.
My Table Is
CREATE TABLE "DUMY_FILE"
( "ID" NUMBER,
"NAME" VARCHAR2(500),
"FILE_OBJ_ID" NUMBER,
"MIME_TYPE" CLOB,
"DOC_SIZE" NUMBER,
"BLOB_CONTENT" BLOB,
"DESCRIPTION" VARCHAR2(500),
"UPLOAD_DATE" CHAR(25)
How can i do this.
Thanks
Edited by: 805629 on Nov 16, 2010 11:51 PM
Trent,
Thanks for you suggestions. .. Let me explain my problem a little better ...
I have a report that lists fields associated with a report ... I have a delete icon which deletes a row and removes it from the underlying table ... however, I am trying to implement a Before header process which runs a pl/sql process that checks if the selected field is the last field in the report ... if so, I want a confirmation dialog to pop up ... if they click cancel .. then the deletion is aborted, else the field is deleted (which triggers other status changes).
Based on this logic if there is a way to implement this based on your suggestion I would appreciate it ...
Here is the process I was trying to use .... but the I have a few issues with this approach
declare
-- cursor to check if this is the last field
cursor fld_cnt is
select count(*) from prm_ptnr_rpt_fields
where report_uid = :P22_REPORT_UID;
num_flds number;
msg varchar2(300);
begin
open fld_cnt;
fetch fld_cnt into num_flds;
If num_flds > 1 then
delete from prm_ptnr_rpt_fields
where report_uid = :P22_REPORT_UID
and field_user_key = :P9_DELETED_FLD;
commit;
:P9_DELETED_FLD := NULL;
msg := :P9_FIELD_NAME || ' Field Excluded From Report' ;
apex_application.g_print_success_message := msg;
else
htp.p('<script type="text/javascript">');
htp.p('
var r=confirm("This is the last field included in this report .. \n Deleting it will Inactivate the report and remove it from schedule (if scheduled) ...\n Do you want to proceed?");
if (r==true)
{ delete from prm_ptnr_rpt_fields
where report_uid = :P22_REPORT_UID
and field_user_key = :P9_DELETED_FLD;
:P9_DELETED_FLD := NULL;
commit;
msg := :P9_FIELD_NAME || ' Field Excluded From Report' ;
update prm_ptnr_rpts
set report_status = 'INCOMPLETE',
active_report = 'N'
where report_uid = :P22_REPORT_UID;
msg := msg || ' and Report Status changed to INCOMPLETE';
apex_application.g_print_success_message := msg;
htp.p('}else {
alert("Delete Action Aborted");
htp.p('</script>');
End if;
Close fld_cnt;
end;
a) Even if I click cancel ... the field still gets deleted ...
b) :P9_DELETED_FLD is the id for the selected field ... I am setting it on the link attributes which places it on the URL ... I would rather user javascript (but not exactly sure how).
Thanks,
Gerald
Edited by: user5459177 on Feb 22, 2011 2:45 PM
Similar Messages
-
Add Columns to Updatable Report
Hello,
i need some help regarding an "Updatable Report".
My goal is to have some SelectLists in comluns named "2008_05", "2008_08", ....."2010_01", "2010_04".
The user must have the option to add more cloumns.
My process on submit is:
declare
SQL_STRING varchar2(4000);
begin
SQL_STRING := 'ALTER TABLE TAB_REPORTS ADD "' || :P3700_COLUMN_NAME || '" varchar2(100)';
EXECUTE IMMEDIATE(SQL_STRING);
return;
end;At the moment I have this code for a standard report returning a SQL query:
declare
q varchar2(4000);
begin
q := 'SELECT R_ID, PLANT_NAME, UNIT_NO, R_TSO_NO TSO_NO';
For i in (SELECT * FROM USER_TAB_COLUMNS
WHERE table_name = 'TAB_REPORTS'
AND column_name like '2%')
loop
q := q || ', ';
q := q || 'APEX_ITEM.SELECT_LIST_FROM_LOV (1, ';
q := q || chr(34);
q := q || i.column_name;
q := q || chr(34);
q := q || ', ';
q := q || chr(39);
q := q || 'LOV_QER';
q := q || chr(39);
q := q || ', ';
q := q || 'null';
q := q || ', ';
q := q || chr(39);
q := q || 'Y';
q := q || chr(39);
q := q || ') as "';
q := q || i.column_name;
q := q || '"';
end loop;
q := q || ' FROM TAB_REPORTS ';
q := q || ', TAB_SD';
q := q || ', TAB_CONTACT';
q := q || ' WHERE TSO_NO = R_TSO_NO';
q := q || ' AND CON_PLANT_NAME = TAB_SD.PLANT_NAME';
q := q || ' AND R_TSO_NO = decode(:P3700_FILTER_PLANT_NAME, ';
q := q || chr(39);
q := q || 'all';
q := q || chr(39);
q := q || ', R_TSO_NO, :P3700_FILTER_PLANT_NAME)';
q := q || ' ORDER by PLANT_NAME, UNIT_NO';
return q;
END;The function returning a SQL is not working for an updatable report.
It has to be static i think.
Any solutions or ideas?
Thx & greetings
ChrisProblem solved. See [this post|Add columns to CV04N report;
Regards.
Gregory. -
How can I delete/add Columns in my Report?
Hi everybody,
i´ve just a silly little question...
We´re using APEX to revise our Daily Reject-Rows and some other Dimensiontables.
For every Table, witch is to revise we´ve got a single Page in our APEX Application.
Also, in every Page we created a Report for our users,
so that they can revise the Data,
and published it in our intranet, using a Webserver.
Now my Question...
In one of these Pages we´ve more then 110 columns in the sql Region Source,
placed in the Region Definition.
But...in the Report Attributes, there are only shown 99 Columns.
I must integrate 3 or 4 more Columns from my Source Definitioned Table in the Report.
Where can i do this?
I only see how i can edit the columns, make them visible or hide them,
define their Propertys...but where can i add a new Column?
or delete one?
I´m very thankfull for every Awnswer :-)
Best Regards
LoneWolfOk, i found a Solution...
It seems to be a BUG. (?)
The Report Attributes will be realy generated automaticly
under using the Source Definition, but...
- There´s a Restriction in the Sum of all Columns,
it can be only 99 witch will be able to define and revise.
- If you´ver got more then 99 Columns in your Source
you have to specified them exactly, by Name
...AND...
- you have to create the Source SQL new.
It is not sufficiently if you change the Position of the Columns in the SQL Source (placed at the Region Definition).
I copied and pasted the Source SQL three Times,
before APEX accept the changes of the Position from the Columns.
At least...
In the Moment as i define the needed Column,
(now in the Report Attribute available),
APEX understands it an i can put the others Columns (Columns 99 till 110) back in the Source SQL, without loosing my needed Column in my Report again. -
Somehow my Itunes started a new music library and I lost the old library. Itunes will not allow me to sync new music from my computer to my Ipod because it is now in a different library. Itunes wants to delete all my Ipod music before sync any new music. How do I work around this. I think this happened during Itunes Upates.
Empty/corrupt library after upgrade/crash
Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
When you get it all working make a backup!
Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
tt2 -
OIM report / add column to working report
Hi,
I need some help with OIM reports.
Cannot add a column to a working report. What I have done is that I have changed the Stored procedure and then changed the Report XML Metadata to include that column.
The report just turns out to be blank after the changes made.
A snippet of the change to the Stored Procedure(added line in bold):
-- contruct the query
strColumnList := ' tusracc.system as "SYSTEM", ' ||
' vifs.ifsemp_employee_id as "EMP_ID", ' ||
' vusr.usr_first_name || '' '' || vusr.usr_last_name as "EMP_NAME", ' ||
*' vusr.usr_status as "USR_STATUS", ' ||*
' tusracc.attribute as "ATTRIBUTE", ' ||
' tusracc.attrvalue1 as "ATTRVALUE" ';
strFromClause := ' v_users vusr, v_ifsusers vifs, tmp_user_access tusracc ';
strWhereClause := ' tusracc.usr_key = vusr.usr_key ';
strWhereClause := strWhereClause || ' and vusr.usr_key=vifs.usr_key(+)';
IF strsortcolumn_in IS NULL THEN
strOrderByClause := ' 2 ' ;
ELSE
strOrderByClause := strsortcolumn_in ;
END IF;
IF strsortorder_in = 'DESC' THEN
intSortDirection_in := 0;
ELSE
intSortDirection_in := 1;
END IF;
-- run the report query
XL_SPG_GetPagingSql(strColumnList,
strFromClause,
strWhereClause,
strOrderByClause,
intSortDirection_in,
intStartRow_in,
intPageSize_in,
select_stmt
OPEN csrresultset_inout FOR select_stmt;
ELSIF intdocount_in = 2 THEN
OPEN csrresultset_inout FOR select dummy from dual;
END IF;
In the report XML Metadata I have added a line for the USR_STATUS column(change in bold):
<Report layout="Tabular">
<StoredProcedure>
<InputParameters>
<InputParameter name="v_resource_name" parameterType="varchar2" order="1" fieldType="LookupField" fieldLabel="report.ResourceAccessList.label.resourceName" required="true">
<ValidValues lookupCode="Lookup.Reports.Objects"/>
</InputParameter>
</InputParameters>
</StoredProcedure>
<ReturnColumns>
<ReturnColumn name="SYSTEM" label="customer.report.system" display="true" position="SectionHeader" primarySort="true" filterColumn="false" />
<ReturnColumn name="EMP_ID" label="customer.report.emp_id" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
<ReturnColumn name="EMP_NAME" label="customer.report.emp_name" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
*<ReturnColumn name="USR_STATUS" label="global.label.Status" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />*
<ReturnColumn name="ATTRIBUTE" label="customer.report.attribute" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
<ReturnColumn name="ATTRVALUE" label="customer.report.value" display="true" position="SectionHeader" primarySort="false" filterColumn="false" />
</ReturnColumns>
</Report>
Anything that I have missed to do? We have restarted the app server, but it still doesn't work.
Regards,
ThomasArghle.....
I found the reason for the blank result page with this...
apparently we are not allowed to name a resulting column in a stored procedure to USR_STATUS, silent fail :/
When I renamed this to EMP_STATUS it all works as intended...
Duh!
I wonder in where it says not to do this... -
HT1391 my touch stole from car, is there a way to report and know who is using this ?
1. Should I report ?
2. Can someone else use ?
3. Is there anyway to know who plugs in to use this serial #devise I registered to me ?1) As with any theft, you should report it to the police.
2) Yes.
3) No -
I have redeemed my itunes card for $25.00. This amount shows next to my account name. I chose songs from the itunes store and added to my wish list, but when I try to purchase these using my $25.00, it tells me this has already been redeemed. How do I buy songs and use my gift card to pay for them?
The amount is already credited to your account. Purchase something and it will use this balance.
-
Add column in FBL3N (report)
How do i insert a new field in transcation report FBL3N (G/L Account Line Item Display), that column is a sales order value.?
Regards
Carlos OrdenAdditional fields can be added to FBL3N layout using transaction code O7R3. But I don't think sales order value is in the available fields that can be added in O7R3. Go to O7R3 and check the tables that are available in table field. Only fields from those tables can be added.
-
Add Columns to Adhoc Reports Layouts?
Are there any config or sql injections or translations to add additional columns to the custom layouts in the Adhoc Reports in RPT?
Specifically, would like to display Related Specs when running reports for Trade Specs.
Edited by: Trey on May 1, 2013 11:26 AMYou could probably technically add related items as a search result column in a ready report, but it isn't an out of the box available result column. So it will require some undocumented customization work. I don't think the results grid is the best location for this data due to performance implications and even UI display challenges. I think your best option would be to create a BI Publisher report. Your PLM4P license includes a free limited use license for BI Publisher. This would be a good topic to discuss during a dev to dev call.
-
Dynamic add column in Bex report
Hi all,
we have input parameter is month wise. For example if i have input 12.2011 - 03.2012
Output:
12.2011--01.2012--02.2012-----04.2012
50kg -
70--90--
54
Like above dynamically have to change column based on month input parameter. Please guide me how to design bex query.
Thanks
Saravananhi,
restrict calmonth with variable type manual input, and put this calmonth in columns on top of amount or quantity. It will give you your desired output.
hope this helps,
regards,
ray
Edited by: ray100 on Mar 9, 2012 2:54 PM -
SAP Query-for Reporting how to create and use it
Hi SAP Gurus,
i need your help. in my project, client is asking to create queries to generate reports, i am not familiar with queries, so would appreciate it if any one can guide me and tell me the procedure for writing and creating queries soon.
also if you have any study material on steps on How to write and create queries for PP module
thank you very muchHi
Please refer below document
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Also refer below
How to Create Infoset Query (SAP Query)
Steps on how to proceed to create a Query:
ADHOC QUERY
A query can be created to extract information from master records i.e Infotypes. For example, by creating a query , the data relating to an employee contained in various Infotypes can be extracted.
Proceedure :
Decide on the various Infotypes we want to make the query. Decide on the area where we want to query i.e Global area or Standard area. Standard area is client specific and globel area will include all clients.
Menu : HR PM Admn - Information System - Adhoc Query
Select area standard and select the user group already created
Creation of new query :
TC SQ03 - Select Environment Select Standard Area - Enter -- If new user group is to be created, enter name of the user group, click on create and enter necessary information and exit after saving
TC SQ02 - Enter name of the Infoset Create enter name of Infoset - Data source -- > Table join by basis table give name of table e.g pa0000 - Enter - Click on insert table if we want to include more tables give name of table one by one and after finishing, place cursor on the joining lines and right click to delete unwanted relationships - check - and go back - field groups - include all table fields - click on generate button - go out
TC SQ03 - Select user group - eg. Payroll
Infoset - Enter name of newly created Infoset
Assign users and Infosets - Assign infosets - put tick on payroll - save and go back
TC PAAH - Expand the nodes and put tick on relevant fields depending upon necessity
Save the query by giving the same name as infoset for easyness..
For executing a query which is already created
1. Go to SQ01 transaction
2. Go to Environment menu->query areas->std areas
3. Then choose the user group where the query is created
4. It will display all the queries created for the group.choose the query you want to executeand click execute.
5. will take to the initial screen
6. Enter the required parameters and execute
Regards
Ranga
Message was edited by:
Ranganathan Srinivasamurthy -
Tabular report, how to split row into two lines per record
Hi, I have a tabular report based on a collection. The collection has 15 fields and appears horizontally across the screen. I would like to have a break after the 5th column so that each row is on two lines instead of one. Is this possible...any information would be helpful.
a shortened query is: and I would like the break to be between c028 and c029.
thanks
Karen
Select apex_item.select_list_from_lov_xl
(28,
c028,
'GEARS',
'style="width:200px;background-color:#FBEC5D; "'
|| 'onchange="f_set_casc_gear(this,f29_'
|| LPAD (seq_id, 4, '0')
|| ')"',
'YES',
'0',
'- Select Gear -',
'f28_' || LPAD (seq_id, 4, '0'),
NULL,
'NO'
) gear_code,
apex_item.select_list_from_query(29,
c029,
'select lma_desc e, lma_code r
from lobster_mgmt_area
where 1 in (select 1 from gears where gear_code = '
||nvl(c028,0)
||' AND (type_code in (''005'') and category_code in (''160'')) OR ('
||nvl(c028,0)
||' in (''130'')) ) order by lma_code ',
'style="width:75px"',
'YES',
'0',
'- Select -',
'f29_' || LPAD (seq_id, 4, '0'),
NULL,
'NO') lma_code,
apex_item.text
(30,
c030,
6,
NULL,
'style="width:50px;background-color:#FBEC5D;"'
) gear_quantity
from collections where collection_name = 'EFFORT_C'Hello Karen,
>> and each field needs to be updateble ( concatenating two fields does not allow for that).
Did you notice the ‘<br />’ component, as part of the columns concatenations?
The following example is using the same principle – every two updatable column, from the employees table, are sharing the same tabular form row - http://htmldb.oracle.com/pls/otn/f?p=22710:420 . The report query is:
select apex_item.text(10,first_name)||'<br />'||apex_item.text(11,last_name) col01,
apex_item.text(12,phone_number)||'<br />'||apex_item.text(13,email) col02,
apex_item.text(14,salary)||'<br />'||apex_item.text(15,commission) col03
from employeesThe same principle is being used to define custom headings.
Hope this time it will be more clear.
Regards,
Arie. -
Classical report how to write code for this task
coding
Delivery Due List: This Report program generates list with details of quantity available, quantity planned, quantity delivered and quantity still to be delivered for sales orders and stock transport orders based on shipping pointHi,
Try to get TABLE and FIELD names from your senoir or functional consultants.
or
search the field names in the following tables...
VBAP
LIPS
VBRP.
Regards,
Billa -
Advance Analysis for Microsoft Excel How end user will use this ?
Hi ,
I am working in Advance Analysis for Microsoft Excel Reporting tool, Now i am working in my system , how the end user will interact with this report ?
Is there any link is there , we need to send them or they will also open this from the system only ??Hello Guru BI,
Advance Analysis is only for micorsoft excel. You can check with your contact at SAP (TQM / Sales Representative) to check other solutions to have analysis on Web.
For the Analysis Office the only way to have informations at the web is like described at the latest reply.
For new solutions on web you can check the following links that have a brief describe of the web solutions:
http://www.sap.com/solutions/sapbusinessobjects/large/business-intelligence/reporting-analysis/analysis-olap/index.epx
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e07439f8-ba1c-2e10-98a8-f8d552eb31ff?quicklink=index&overridelayout=true
http://download.sap.com/download.epd?context=2D1D4DC34C0587B40660C12B4FD45C056D1BBE530E157D0EB6F2D54F126F520566AE5C5190940F14133BABCD0BF7DA7DCA12BBEC6228CDB1
Thanks
Diego Ferrary -
On the Firefox Features of Getting Started, "Smooth Scrolling" is described as "An elegant new feature lets you scroll through tabs easily to see them all and access the one you want quickly." But how does one do this??
I found this feature with the other "Tab" features like App Tab, Reopen Tab, Switch To, and Organize Tabs, etc...That doesn't disable them, but merely moves them to below the location bar.
If you want to disable them, go to Options | Options | Tabs and remove the checkmark from: "Always show the tab bar".
Hovering the mouse near the top of the screen reveals the toolbars, not just tabs.
If it's not working for you, try running Firefox in [[Safe Mode]]. If it functions properly in that configuration, then one of your add-ons is the culprit.
Maybe you are looking for
-
INSERT command in 11g not working
I m executing the following command in oracle 11g,but its saying column not allowed here.Is there any problem in command??interest_id is the primarry key. I tried all sorts.. but it isn't working... please some one tell me the solution.thank you. INS
-
My CD reader says all my CDs are empty when I know they are not. Is my reader down or is there a setting that is off?
-
If I update from IOS 5.0.1 to 5.1.1 will I lose all my GPSHD Motion X map data? When I updated to IOS 5.0.1 I lost about 25GBytes of map data because Itunes will not back up my GPSHD map data.
-
In Material Master Screen,functionally what is BAckward Consumption period
In Material Master Screen,functionally what is BAckward Consumption period & Forward Consumption period in the MRP Screen.Pls explain its functionality
-
HP back up files won't open with 7 zip
On my HP Paviliion with Windows 7 I tried updating Nvidia driver, BUT computer crashed. http://www.dedoimedo.com/computers/nvidia-freezes.html Used HP backup onto external HD before using HP Restore, not knowing HP Restore restored the computer to it