SQL Report Program Name Status
I have this report that I need to modify. The problem here is that some of our deployments uses the same program/package but different advertisement. For example, I have package "ABC version 1" with program name "Install ABC version 1".
For this particular package I have two advertisement namely "Deployment A - ABC" and "Deployment B - ABC". Now when I run the report below I am encountering the error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression
I am encountering this error since I have two advertisement for a particular package/program. Is there a way I can use array on this report and how do I achieve this?
declare @Total int
declare @Accepted int
declare @AdvertID char(20)
--declare @OUname char(150)
set @AdvertID = (SELECT AdvertisementID FROM v_Advertisement WHERE ProgramName = @PckName)
select @Total=count(*), @Accepted=sum(case LastState when 0 then 0 else 1 end)
from v_ClientAdvertisementStatus
join v_RA_System_SystemOUName ou with (NOLOCK) on ou.ResourceID=v_ClientAdvertisementStatus.ResourceID
where AdvertisementID=@AdvertID and ou.System_OU_Name0 = @OUname
select LastAcceptanceStateName as C013, count(*) as C015,
ROUND(100.0*count(*)/@Total,1) as C016, AdvertisementID, @OUname as AD_OU
from v_ClientAdvertisementStatus
join v_RA_System_SystemOUName ou with (NOLOCK) on ou.ResourceID=v_ClientAdvertisementStatus.ResourceID
where AdvertisementID=@AdvertID and ou.System_OU_Name0 = @OUname
group by LastAcceptanceStateName, AdvertisementID
select LastStateName as C017, count(*) as C015,
ROUND(100.0*count(*)/@Accepted,1) as C016, AdvertisementID, @OUname as AD_OU
from v_ClientAdvertisementStatus
join v_RA_System_SystemOUName ou with (NOLOCK) on ou.ResourceID=v_ClientAdvertisementStatus.ResourceID
where AdvertisementID=@AdvertID and LastState!=0 and ou.System_OU_Name0 = @OUname
group by LastStateName, AdvertisementID
set @AdvertID = (SELECT AdvertisementID FROM v_Advertisement WHERE ProgramName = @PckName)
Haven't tried running the query, but it seems as if this line might return more than one row which then will cause "where
AdvertisementID=@AdvertID" to fail. You could use the "having" clause instead:
http://technet.microsoft.com/de-de/library/ms180199.aspx or "where AdvertisementID in (SELECT AdvertisementID FROM v_Advertisement WHERE ProgramName = @PckName)".
Torsten Meringer | http://www.mssccmfaq.de
Similar Messages
-
How to find Transaction code from Report/program name ?
Dear all,
How to find Transaction code if i know Report/program name ?Hi,
In se 38 when u open ur program,in the application toolbar u have a button beside the where-used list button as display object list.on clicking this button,a window will be opened at the left most corner for repository browser,in this u can find any tranasctions,fileds,screens,dictionary structures defined for the program.
if any transaction is created for the program u can find it under the transaction folder.
revert back for further queries.
Regards,
Sravanthi -
Fetch Report Program names for a given Package
Hi,
I need to fetch all the report program names for a given pakage. I tired TADIR table but couldnt fetch report details alone..
thanks,
sri
Moderator message: very basic, please do more own research before asking, e.g. look at a few TADIR entries of different object types, also discover the repository information system.
Edited by: Thomas Zloch on Feb 23, 2011 2:56 PMDan is right to be cautious, i've seen this cause problems.
It's not very difficult to make the chnages in BCS, and if you have a lot of them/frequent changes, you can always use create an upload method
and then make all future changes by .txt file -
Bapi/Fm to get all report program names
Hi All,
I need a BAPI or FM to get a list of all Z report program names in the repository.
I can do it through a select query , but it takes a lot of time and is effecting performance.
Thanks
PrafullhI ,
you can use table
DATA: t_trdir TYPE STANDARD TABLE OF trdir,
t_tstc TYPE STANDARD TABLE OF tstc,
s_trdir TYPE trdir.
SELECT * FROM trdir
INTO TABLE t_trdir
WHERE ( name LIKE 'Z%' OR name LIKE 'Y%' )
AND subc = '1'.
regards
Deepak. -
Azure SQL Reporting - Installing Fonts - Status after 10/31/14
As Azure is moving reporting service to VM.
Is it possible to get fonts installed on SQL Reporting with out migrating to VM until the 2015 deadline?
IF so how do we get the fonts onto the SQL reporting environment?
ThanksHI Michael,
Happy Morning!!!
We have not heard anything on this after sharing the links from Mekh. I am marking the thread as answer, in case you have any queries please unmark and write to us on the same thread.
Happy Day!!!Reply
Regards,
Lakshmeesha S P -
Dynamic SQL report on Oracle apex4.0
Hi Everyone,
I have two reports in one page.One is the Interactive and other is Sql report. Based on the selection of the row(using checkbox) in the interactive report, the sql report has to display the selected columns.
Note :The report has to be loaded whenever a row is selected and without submitting a button
Can anyone please suggest?
I am using oracle Apex4.0
Regards
RajI believe you store the values in the checkboxes. For example, your Interactive Report query looks like:
SELECT '<input type=checkbox value='||OBJID||' />' AS CHECKBOX, T.*
FROM SOME_TABLE T
and in "Report Atributes" the CHECKBOX is displayed as "Standard Report Column".
*1.Create a hidden check list input field.*
It will store a list values of selected checkboxes. make it long enough, eg. 1000.
Let's say the input name is: P000_X_CHECK_LIST
*2. Create Dynamic Action*
This dynamic action is supposed to fill in the P000_X_CHECK_LIST with a list of values, separated by ":" character.
These values will be an input for the SQL report.
Name: Update Check List
Event: Change
Selection Type: jQuery Selector
jQuery Selector: input:checkbox
Action: Set Value
Set Type: JavaScript Expression
function check_list() {
var n = "";
$(":checked").each( function () {
n = n + (n === "" ? "" : ":") + $(this).val();
return n;
check_list();
Selection Type: Item(s) - P000_X_CHECK_LIST
*3. Adjust the "SQL report" query with this magic formula*
AND SEARCHED_ITEM IN (
SELECT item
FROM (SELECT REGEXP_SUBSTR (str, '[^:]+', 1, LEVEL) item
FROM (SELECT :P000_X_CHECK_LIST str
FROM DUAL)
CONNECT BY LEVEL <= length (regexp_replace (str, '[^:]+')) + 1)
for example:
SELECT O.*
FROM SOME_OTHER_TABLE O
WHERE SEARCHED_ITEM IN (
SELECT item
FROM (SELECT REGEXP_SUBSTR (str, '[^:]+', 1, LEVEL) item
FROM (SELECT *:P000_X_CHECK_LIST* str
FROM DUAL)
CONNECT BY LEVEL <= length (regexp_replace (str, '[^:]+')) + 1)
*4. Adjust the Dynamic Action:*
Advanced: Event Scope: "live"
*5. Add one more True action to the Dynamic Action:*
Action: Refresh
Selection type: Region
Region: The region of the "SQL report".
Volia!
Best regards,
Krzysztof -
To find subroutinues / subprograms used in a report program
Hi,
In a report program it may called any number of subroutinues or subprogram.
So by giving the report program name alone, i need to find the subroutinues and subprogram used in it.
Is there any function module or tcode which gives this list?
Regards,
K.Tharani.HI..
I have tried se80. It lists all the subroutinues.
Is there any way to find which subroutinue is called from which part.
Say For eg:
GET_DETAILS subroutinue is called in main program and
PUT_DETAILS.subroutinue is called inside the GET_DETAILS.
So the output says
Report Name has
GET DETAILS has
PUT_DETAILS
Regards,
K.Tharani. -
Program Name: Transaction Register - Need select criteria
Can someone send me the select query for following report
Program Name: Transaction Register
Short Name: ARRXINVR
Executable Name: FARXPBSHHi,
Enable trace, submit the concurrent program and generate the TKPROF file to get the query -- See (Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12) for details.
Regards,
Hussein -
Regarding module pool programming,reports and gui status
hi,
I have created a mpp program in which i called a report using the SUBMIT statement.In the Report i have used Gui status for BACK.When i execute the MPP and press BACK it should call a another screen of the MPP,but it leaves to the program i.e., it comes out.
example,
case sy-ucomm.
When 'BACK'.
CALL SCREEN 0002.
endcase.
This is what i have used in my report program.
Please help me,
Thanks in advance,
ArunaHi.
Change the name BACK because it is standard FCode.
Try Changing the Fcode.
Awrd Points if useful
Bhupal -
Hi Experts
How to create toolbar in the Report program.
ie how to add gui status and how to code for it.
Pls suggest me.
Thanks in advance.
Regards
rajaramHi
This is my coding part inwhich i want to add a button in toolbar, Can you change this coding that where exactly changes needed and what.
Pls help me.
Regards
Rajaram
REPORT ZSAB_POLY_INVOICE.
tables : vbrp, vbrk, vbap.
DATA : BEGIN OF it_final OCCURS 0.
INCLUDE STRUCTURE ZINV_ORG.
DATA : END OF it_final.
data : wa like line of it_final.
data : mode type string.
data : flag type i,
flag1 type i.
DATA : fm_name TYPE rs38l_fnam.
DATA : w_formname TYPE tdsfname. "form name
w_formname = 'Z_POLY_ORGINAL'.
DATA: LX_OUTPUT TYPE SSFCOMPOP,
LX_CNTL TYPE SSFCTRLOP.
LX_CNTL-NO_DIALOG = 'X'.
LX_OUTPUT-TDDEST = 'LP01'.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
PARAMETERS vbeln TYPE vbrk-vbeln matchcode object ZINVOICE.
PARAMETERS rtim TYPE vbrk-ERZET.
SELECTION-SCREEN END OF BLOCK bk1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
parameter : p_org as checkbox,
p_dup as checkbox,
p_tri as checkbox,
p_qua as checkbox.
SELECTION-SCREEN END OF BLOCK b2.
select a~vbeln
a~bukrs
b~posnr
b~werks
a~stceg
a~FKDAT
a~INCO1
a~INCO2
b~MATNR
b~ARKTX
b~FKIMG
b~UEPOS
from vbrk as a
inner join vbrp as b on avbeln = bvbeln
into corresponding fields of table it_final
where a~vbeln = vbeln.
break pro01.
if p_org is not initial and p_dup is not initial
and p_tri is not initial and p_qua is not initial.
mode = 'Original for Buyer'.
perform original.
mode = 'Duplicate'.
perform original.
mode = 'Triplicate'.
perform original.
mode = 'Quadruplicate'.
perform original.
elseif p_org is not initial and p_dup is not initial
and p_tri is not initial.
mode = 'Original for Buyer'.
perform original.
mode = 'Duplicate'.
perform original.
mode = 'Triplicate'.
perform original.
elseif p_dup is not initial and p_tri is not initial
and p_qua is not initial.
mode = 'Duplicate'.
perform original.
mode = 'Triplicate'.
perform original.
mode = 'Quadruplicate'.
perform original.
elseif p_org is not initial and p_dup is not initial.
mode = 'Original for Buyer'.
perform original.
mode = 'Duplicate'.
perform original.
elseif p_tri is not initial and p_qua is not initial.
mode = 'Triplicate'.
perform original.
mode = 'Quadruplicate'.
perform original.
elseif p_org is not initial and p_tri is not initial.
mode = 'Original for Buyer'.
perform original.
mode = 'Triplicate'.
perform original.
elseif p_dup is not initial and p_tri is not initial
and p_qua is not initial.
mode = 'Original for Buyer'.
perform original.
mode = 'Duplicate'.
perform original.
mode = 'Triplicate'.
perform original.
elseif p_org is not initial.
mode = 'Original for Buyer'.
perform original.
endif.
*& Form original
text
--> p1 text
<-- p2 text
FORM original .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_formname
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION '/1BCDWB/SF00000447'
EXPORTING
RTIM = RTIM
MODE = MODE
*ARCHIVE_INDEX =
*ARCHIVE_INDEX_TAB =
*ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = LX_CNTL
*MAIL_APPL_OBJ =
*MAIL_RECIPIENT =
*MAIL_SENDER =
OUTPUT_OPTIONS = LX_OUTPUT
*USER_SETTINGS = 'X'
*BOL_NUM =
*CARRIER_NAME =
*SHIP_FROM_ADR =
*SHIP_TO_ADR =
*THIRD_PARTY_ADR =
*IMPORTING
*DOCUMENT_OUTPUT_INFO =
*JOB_OUTPUT_INFO =
TABLES
it_final = it_final
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. -
Append Today Date to the Attachement Name using SQL reporting services
I have a report on SQL reporting services, I have scheduled this report to be sent automatically by mail using Subscriptions but the client needs to append today date to the report name attached, currently the attachment is taking the report name as it is.
EX: CollectExport.txt but what I need is to have CollectExport_21-07-2010.txt .
Please advise.
Thanks.As I understand it, the purpose of the program is to route a report file that contains the name of the report with the current date appended to the end. So, have you tried to use the ReportViewer control and extrude the report as a PDF stream (which you
can name)?
William Vaughn
Mentor, Consultant, Trainer, MVP
http://betav.com
http://betav.com/blog/billva
http://www.hitchhikerguides.net
“Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)”
Please click the Mark as Answer button if a post solves your problem! -
Getting the variant name when the report program is run in background
Hi All,
How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
Any pointers to this will be highly appreciated.
Thanks and regards,
Nilesh.Hello Nilesh,
Please find the algo:
1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
2. Select data from TBTCP using these details:
DATA:
FP_EVENTID TYPE BTCEVENTID
FP_EVTPARM TYPE BTCEVTPARM
FP_ACTIVE TYPE BTCXPGFLAG
FP_JOBCNT TYPE BTCJOBCNT
FP_JOBNM TYPE BTCJOB
FP_STEPCNT TYPE BTCSTEPCNT.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = FP_EVENTID
EVENTPARM = FP_EVTPARM
EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
JOBCOUNT = FP_JOBCNT
JOBNAME = FP_JOBNM
STEPCOUNT = FP_STEPCNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* Error calling FM: GET_JOB_RUNTIME_INFO
ENDIF.
DATA: FP_VARIANT TYPE BTCVARIANT.
SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
FROM TBTCP
INTO TABLE L_IT_TBTCP
WHERE JOBNAME = FP_JOBNM
AND JOBCOUNT = FP_JOBCNT
AND STEPCOUNT = FP_STEPCNT.
IF SY-SUBRC = 0.
SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
IF SY-SUBRC = 0.
FP_VARIANT = L_WA_TBTCP-VARIANT.
ENDIF.
ENDIF.
Hope this helps.
BR,
Suhas -
The TADIR entry for Program name is missing in ABAP report
Hi,
I created an User group , Infoset & ABAP query, generated a report with the help of ABAP Query.
However when I did the extended syntax check for the same i got the fatal error.
"The TADIR entry for <Program name> is missing
(Message cannot be hidden using comment)"
Could you please let me know why the above error is being given & how we can remove the same.
Thanks
Vinay PasalkarMoved to ABAP General, thanks for pointing this out. In the future you can use the yellow triangle on the top right of each message to report such cases, they will be taken care of.
Thomas -
Standard report Programs to find the current status of workflows
Hi Experts,
Are there any Standard report Programs to find the current status of workflows or workflows which are pending.
Regards,
HariGo to SWI1 t-code
Give the appropriate Status - Ready or Inprocess or Waiting
Input the Task - either WF Template or Standard Task.
Choose the time period and execute the report.
Regards,
PR. -
How to find abap program name for web ui reports
Hi,
I need to know the abap program name which is developed and configured for
web ui.In our project web ui application crm version 7.0.there reports links are available
with label of business names.
I assume that there will be SPRO configuration for these reports.
Can anyone provide assistant on this to me.
Regards
VirenHi,
Which reports you are referring to? Are you referring to BI reports? If so then i suppose they are triggerred in BI and transferred to CRM.
Regards,
BJ
Maybe you are looking for
-
Setting up headers in interactive planning
Hi All, We adding almost 50 new users to our existing DP setup. We have specific requirement to set headers for specific users. Can anyone tell me how can I setup headers for users? I tried using user setting and in that navigation Path (Drill down)
-
Can't upgrade my MBP to iCloud Drive, even after installing OS X 10.10 Yosemite
WHY can't I upgrade to iCloud Drive on my MBP? I installed OS X 10.10 Yosemite last night but iCloud claims it needs the upgrade when I turned on my MBP today. Any ideas?
-
Officejet 6500A cannot enable web services/needs proxy
I bought this new 6500A so I could e-print. Can't set it up. It keeps telling me Web services has not been enabled. MAKE SURE PRINTER IS CONNECTED TO INTERNET AND TOUCH CONTINUE. I have been able to print my e-mails from my comcast account. I CA
-
Hi experts, I am new to BAPI. Can anyone tell me " How to catch error in BAPI ". Thanks, Shipra
-
Cant Contact Sony support from website-broken link
Try to click on "Xperia L" on this page to receive support: http://www.sony.it/support/jump/list this is how sony support its customer. thanks you.