Search Hardcoded values in Prg
Hi All,
I need to search for some Hard coded values inside the all Z PRograms.
IS there any way to do it other than manaully use Find on each of Inclueds and main prg?
I have 11 Company codes and respective VAT # for each.
I have more than 1000 Prgrams with minimum 5-6 includes in each.
Please suggest a way out.
Regards
Ramesh
go to transaction SLIN, type the program name for which you ned to remove the hard cocded values , uncheck all the checkboxes and check only the
" Character strings " check box... it will list all the hardcoded values in program...
Similar Messages
-
Program to search hardcoded value in all Z smartforms
Hi,
Is there a program to search in all Z smartforms to find a hardcoded value?
Regards,
AmelHi Gautam,
In order to search an entire smartform one must be first downloaded and then searched.
Otherwise every single smartform line has to opened to check whether a hardcoded value has been used there, think of condition option in almost every smartform element.
Am I thinking correct?
Regards,
Amel -
Search ConditionFormulas for hardcoded values.
Currently we have about 600 crystal reports in our system. Over time there has been some poor coding that has hardcoded values in the suppression logic of sections or fields in some of the reports. I am trying to programmatically look at each report and determine which reports need to be modified.
I query the infostore and have no problem looking into the DataDefinition.FormulaFields and ReportDefinition.Sections collections, but they do not show the suppression formula. That is apparently in the ConditionFormulas collection.
I have seen some examples, but most of them have this comment,
' crRepDef is type CrystalDecisions.ReportAppServer.ReportDefModel.ISCRReportDefinition,
when I try to cast this object it fails.
Here is an example of what I have already, all reports are being accessed properly. I just don't know how to get to the proper object (ConditionFormulas):
Dim boEnterpriseSession As EnterpriseSession
Dim boReportObjects As InfoObjects
Dim boSessionMgr As New CrystalDecisions.Enterprise.SessionMgr()
Dim crReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
' Log into BusinessObjects Enterprise
boEnterpriseSession = boSessionMgr.Logon(txtCEUser.Text, txtCEPassword.Text, dropServer.SelectedValue, "secEnterprise")
Dim query As String = "SELECT * FROM CI_INFOOBJECTS where si_name = 'my report' and si_instance = 0 And si_recurring = 0 and SI_PROGID='CrystalEnterprise.Report' ORDER BY SI_NAME"
Dim boEnterpriseService As EnterpriseService
Dim boInfoStore As InfoStore
litResults.Text = Nothing
'Create the Infostore Object
boEnterpriseService = boEnterpriseSession.GetService("", "InfoStore")
boInfoStore = New InfoStore(boEnterpriseService)
boReportObjects = boInfoStore.Query(query)
test(boReportObjects)
For Each boReportObject In boReportObjects
Dim rpt As ReportDocument = New ReportDocument
rpt.Load(boReportObject, boEnterpriseSession)
' search each formula for hardcoded values
For Each FormulaField As FormulaFieldDefinition In rpt.DataDefinition.FormulaFields
Next FormulaField
' search each section for hardcoded values
For Each sec As Section In rpt.ReportDefinition.Sections
Next sec
Next boReportObjectWhat is the error you get when the cast fails? I don't see any code trying to access the ConditionFormulas object.
I don't generally code in VB, but here's some C# code that accesses that property. You need to go through the ReportClientDocument object to get to it.
Notes:
- This is hardcoded. Logic is needed to generalize it for your own needs.
- You need CrystalDecisions.ReportAppServer.ReportDefModel to access the ConditionFormulas collection.
- The CD.CR.Engine assembly is aliased because both it and the ReportDefModel assembly contain a definition for the ReportDocument class. You can use the 'As' keyword for aliasing in VB, or fully qualify the assembly name for the variable declaration. (Personally I'd rather type less!)
using CrystalDecisions.ReportAppServer.ReportDefModel;
using CRENG = CrystalDecisions.CrystalReports.Engine;
//(other BOE references here to access InfoStore etc)
//(code here to log on to Enterprise, query for desired InfoObject, etc)
CRENG.ReportDocument crReport = new CRENG.ReportDocument();
crReport.Load(boeInfoObject, boeSession);
Response.Write("<br>Formula text: " +
crReport.ReportClientDocument.ReportDefinition.DetailArea.Sections[0].Format.ConditionFormulas[CrSectionAreaFormatConditionFormulaTypeEnum.crSectionAreaConditionFormulaTypeEnableSuppress].Text.ToString()); -
Search bar value from Interactive Report
Could someone help me to acces the value entered in the search bar and pass it to another page?
Basically our apex interactive reports has a link which allows to edit single records. However customer is looking to edit multiple records at the same time and I am thinking if I can pass the search bar value to an tabular form, then it will allow to update multiple records
Thanks
Rajesh AlexHi Rajesh,
There are a set of views that seem to contain the data for the IR:
APEX_APPLICATION_PAGE_IR
APEX_APPLICATION_PAGE_IR_CAT
APEX_APPLICATION_PAGE_IR_CGRPS
APEX_APPLICATION_PAGE_IR_COL
APEX_APPLICATION_PAGE_IR_COND
APEX_APPLICATION_PAGE_IR_RPT
You could have a look through these to see if any help.
Andy -
How to search this value in oracle database to find out the table
Hi expert,
I know there is a value in oracle database, please show me how to search this value in oracle database to find out the table holding this value.
Many Thanks,918440 wrote:
Hi friends,
this question is really practical, I already know there is value from application saved in database, I want to search the whole database to figure out which table the value is contained.write SQL that writes SQL to query every table.
Handle: 918440
Status Level: Newbie
Registered: Mar 2, 2012
Total Posts: 20
Total Questions: 10 (10 unresolved)
why do you waste time here when you NEVER get any answer to any question you post? -
Transferring Search Help values from ECC 6.0 to SRM 7.0
Hi SAP experts,
I have a requirement to display the search help values for a data element in ECC 6.0 into the custom data element that I created on SRM 7.0.
Is there a BAPI that I can use to retrieve the values for a search help element (for example SH_ANLKA) from the the ECC into SRM?
Your advise would be greatly appreciated!
Regards,
AndrewHi Andrew,
I have got a similar requirement to fetch the PO details from ECC search help to a new SRM search help. Please help me with the procedure you used for the above scenario.
Thanks,
Santosh. -
How to search a value in a string
Greate oracle programmers
how are u all doing. i am facing a problem in query. actually i wanna search a value in string using query. just read the piece of code below
DECLARE
LC_VALUE VARCHAR2(100) := '51,52,53,54';
CHK NUMBER;
BEGIN
SELECT 1 INTO CHK
FROM DUAL
WHERE TO_CHAR(51) IN (LC_VALUE);
MESSAGE(CHK);PAUSE;
EXCEPTION WHEN OTHERS THEN
MESSAGE(SQLERRM);PAUSE;
END;
I am unable to find my value in string using query. i have tried the instr function also but the problem with this function is that suppose if i wanna search '1' in '51,52,53' then the value is found in string although there is not as such value as but 51. also i dont want to use the dynamic SQL for this pupose
i m waiting for repsonse please help me out.
Regards
Kamran Ahmed
[email protected]you can do something like
select * from emp
where
'1000,2000,3000,4000,5000,6000,7000,8000,9950' like to_char(sal,'FM999999999990')||',%' or
'1000,2000,3000,4000,5000,6000,7000,8000,9950' like '%,'||to_char(sal,'FM999999999990')||',%' or
'1000,2000,3000,4000,5000,6000,7000,8000,9950' like '%,'||to_char(sal,'FM999999999990') or
'1000,2000,3000,4000,5000,6000,7000,8000,9950' = to_char(sal,'FM999999999990');
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7902 FORD ANALYST 7566 03-DEC-81 3000 20 -
Search Help values to Internal table
Dear Friends,
Is it possible to export Search Help values to Internal table?
On screen, when user click on Search button, the SAP standard search help will call (Customer Search). After entering values, some result get displayed and this result need to export to the internal table.
Thanks in stack
NileshHi:
try this:
DATA : wa_shlp TYPE shlp_descr,
it_records LIKE ddshretval OCCURS 0 WITH HEADER LINE.
wa_shlp-SHLPNAME = 'MAT0M'. "one of elementary search help name from mara-matnr.
wa_shlp-SHLPTYPE = 'SH'.
CALL FUNCTION 'F4IF_SELECT_VALUES'
EXPORTING
shlp = wa_shlp
MAXROWS = 0
SORT = ' '
CALL_SHLP_EXIT = ' '
IMPORTING
MAXROWS_EXCEEDED =
TABLES
RECORD_TAB =
RECDESCR_TAB =
return_tab = it_records
LOOP AT it_records.
WRITE:/ it_records.
ENDLOOP.
Follows is how to get the search help name:
CALL FUNCTION 'DD_SHLP_GET_HELPMETHOD'
EXPORTING
tabname = 'MARA'
fieldname = 'MATNR'
langu = sy-langu
NO_CHKTAB_MAPPING =
GET_ENTITYTAB = ' '
CHANGING
shlp = wa_shlp
callcontrol = callcontrol
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
OTHERS = 3
CALL FUNCTION 'F4IF_EXPAND_SEARCHHELP'
EXPORTING
shlp_top = wa_shlp
IMPORTING
shlp_tab = shlps.
好运,
启明星 -
Parameterized queries running much slower than ones with hardcoded values
Very often there is a huge performance difference when using parameters in a query, compared to running the same code after replacing the parameters with hardcoded values: the parameterized version of the code runs much slower!
The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed directly from the editor and the performance issue has been observed in different versions of SQL Server (2000 and 2005).
How is this explained and how can the parameterized queries have similar performance with the hardcoded ones?
Also, why does this happen in some cases and not always?
Finally, the same is sometimes the case with stored procs: a very slow running proc speeds up tremendously when running its code directly, instead of calling the procedure --and even faster, according to the previous, when its parameters are replaced with
hardcoded values>>The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed >>>directly
from the editor ?>>>and the performance issue has been observed in different >>>versions of SQL Server (2000 and 2005).
Something like below?
--SQL Server creates 3 execution plan rather only one
DBCC FREEPROCCACHE
GO
SELECT *
FROM Sales.SalesOrderHeader
WHERE SalesOrderID = 56000
GO
SELECT * FROM
AdventureWorks.Sales.SalesOrderHeader WHERE
SalesOrderID = 56001
GO
declare @i int
set @i = 56004
SELECT *
FROM Sales.SalesOrderHeader
WHERE SalesOrderID = @i
GO
select stats.execution_count AS exec_count,
p.size_in_bytes as [size],
[sql].[text] as [plan_text]
from sys.dm_exec_cached_plans p
outer apply sys.dm_exec_sql_text (p.plan_handle) sql
join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
GO
----This time only (we get parameterization)
DBCC FREEPROCCACHE
GO
EXEC sp_executesql N'SELECT SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader H
JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56000
GO
EXEC sp_executesql N'SELECT SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader H
JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56005
GO
select stats.execution_count AS exec_count,
LEFT([sql].[text], 80) as [plan_text]
from sys.dm_exec_cached_plans p
outer apply sys.dm_exec_sql_text (p.plan_handle) sql
join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
GO
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
SAP Systems find hardcoded value
Hi all,
Is there anything where we can find a word in SAP application.
Example :
In my system we have used many transcations and created many zprograms and in some place there is a hardcoded value, so i just want to find the hardcoded value (where all used) so do we have anything where my problem gets solved?
Cheers,
BhavanaHi Satya,
Thanks for ur reply,
what my problem is in our entire application of SAP we have created many zprograms and created my zfunction modules and manythings like so there in some places we have hardcoded the value i mean like 'X company' so i don't want to give this hardcoded value as X company, i want to change this so i don't remember where all we have placed this hardcoded value , so my question is do we have anything in SAP where we can find this hardcoded value?
hope you have understood my requirement.
cheers,
Bhavana -
How to control and use the search criteria values "%" ?
Hi,
When I searched some information in my employee name. I filled in search criteria values "%" and selected the "Go" button to see the result. But I got errors that the search criteria values should not begin with a "%" or "_" for at least one if the listed fields.
How to control and use the search criteria values "%" ?
Thanks,
sinoleesinolee,
These kinds of details are mentioned in Dev guide. Always have a look into dev guide before posting.
--Shiv -
Hardcoded values within XML tags
Inorder to generate an XML file, is it a requirement to have all the data in the database?
For example, if I do:
Select 'MyValue' From Dual -> it will return me with MyValue. Essentially, this is hardcoding values.
Is this achievable using sql to generate XML output
<Test>My Hardcorded Value</Test> -> where My Hardcorded Value is the value i want to embed within the <Test> tag.
ThanksWithout knowing what method you are even using to generate the XML nor what DB version, here is one solution for 10.x.x.x
select XMLElement("Test",'My Hardcoded Value')
from dual;
results in
<Test>My Hardcoded Value</Test> -
Hardcode values in segment.
Hi Experts,
I have one segment E1EDP05.
I have to give hardcode values in the filed of KSCHL of this segment.
How i can give these value in loop as hardcode.
Regards,Hi,
I can hardcode value with using constant, I know that.
but my problem is that I have 3 Values and one segment field KSCHL.
I have to create this segment 3 times with each value in KSCHL.
How i can do it ?
Regards,
Study SAP -
Hi all,
I am fetching data in the following manner,
1. Find the deliveries items based on the search criteria
2. Pull in the material numbers for each item in the delivery
3. Pull in Planned goods movement date LIKP-WADAT
4. Exclude materials in the list where MARA-MAGRV = TB01
5. Find the External material group value for the remaining list MARA-EXTWG
6. Search for values in class ZEHS_DATA
7. Pull in value for characteristics
i. ZEHS_PLANT
ii. ZEHS_RELEVANT
8. Eliminate delivery items where ZEHS_RELEVANT = N for next steps, however display what was found
9. With EMG for delivery items and ZEHS_RELEVANT = Y pull all fields.
In which the class ZEHS-DATA is having fields like:
ZEHS_FORM
ZEHS_RELEVANT
ZEHS_PLANT
COLOR_SUNNBR etc,
My question is how do I pull values from class ZEHS_DATA??
Thanks,
Debrup.Hi
if you have values in a variable declared in CLASS, just call another method of this CLASS with an export paramtere ( export means exporting to the program)
depending the requirement the method can be PUBLIC or PRIVATE etc
Regards
Ramchander Rao.K -
Variable vs hardcoded value in SQL query
Hi Gurus,
I have a SQL query inside a function that looks similar (i'm showing the "where" clause here only) to the below:
WHERE ID = variable_id (by the way this two have exactly the same type, number(20))
and
WHERE ID = 100
In the first option that uses variable it takes 4 secs to complete the query, while the second one that uses hardcoded value completes in milliseonds. Im new to oracle but been to other dbms and havent seen such behaviour. Anyone encountered or know what maybe the cause? I thought of not pasting here the explain plan since its just a question of variable vs hardcoded value.
rgds.Just want to add something, here is the stats for the two queries:
Statistics for variable_id (15 secs)
29 recursive calls
0 db block gets
24324 consistent gets
21556 physical reads
0 redo size
20676 bytes sent via SQL*Net to client
613 bytes received via SQL*Net from client
25 SQL*Net roundtrips to/from client
17 sorts (memory)
0 sorts (disk)
358 rows processed
Statistics for hardcoded value (5 secs)
4 recursive calls
0 db block gets
2631 consistent gets
0 physical reads
0 redo size
20469 bytes sent via SQL*Net to client
613 bytes received via SQL*Net from client
25 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
358 rows processed
There are differences consistent gets and physical reads. What coul dbe the problem here?
tnx!
Maybe you are looking for
-
Looking for a better validation, for GT
Hello folks, I have to make a validation on PT60 Transaction, I have to validate te schedule for the employees, I create a function on pe04 for TM and I have a form in the include RPTMOZ00 where I get the table P2011 where I have the schedule, so wha
-
Screensets don't work in full screen?
Seems that Screensets don't work when Logic Pro is in full screen mode.... Whether using keyboard short cuts or going to the menu item. Anyone else having this issue?
-
Anyone have any advice on how to get a batch file running on OSX 10.6.6 from scratch? Need to open an Ableton Live file using Flash but if someone shows me how to even open a text file using a batch file I should be ok to figure out the rest myself.
-
I tried to download Adobe Reader XI. But no where could I find the Acceptance Button.
I tried to download Adobe Reader XI. I was asked to press the Acceptance Button on the Agreements. But No where can I find it. Could anybody tell me why? Do I have to pay for the downloaded soft ware? I am a Comcast User. I am entitled to download a
-
We are porting an application from LabVIEW to Meas Studio 7, in C#. As each data point is received, we would like to see it displayed, using a WaveformPlot on a WaveformGraph. (we chose this object to utilize its display cursors) As we currently have