Assigning a value to the String array - geting exception
Hi,
All I'm trying to do is
String[] appName = null;
appName[0] = "all";
This is throwing a Null Pointer Exception!
Of course it is. You have to init. the object. Ex:
String[] appName = null;
appName = new String[1];
appName[0] = "all";
or even better:
String[] appName = new String[1];
appName[0] = "all";
Similar Messages
-
labview 6i. Using sr785 instrument.
Two ways. Use Fract/Exp to Number function on the Strin>Strin Number Conversion palette. It accepts both individual or strin array inputs. Wire your string array in an get an array of doubles out. You can also use Scan From String on the String palette inside of a for loop. The for loop will autoindex the string array in and autoindex an array of doubles out.
Attachments:
string_to_double.jpg 10 KB -
How do you assign a value to the APEX field APP_USER
Application Express 4.0.2.00.07
Hi
Is there a special function/procedure to assign a value to the APP_USER field
or a simple APP_USER := :P1_LOGIN_NAME would do
ZHello Zac,
>> or a simple APP_USER := :P1_LOGIN_NAME would do
The APEX engine is already doing it for you after a successful login – setting the value of APP_USER as the user login name. You can use it as a substitution string or with the bind variable notation (:APP_USER).
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More -
Hi Friends,
How to assign a value to a string. Coz I need to compare the strings with the user entered string and process the logic.
Example : p_pass TYPE string p_pass = 'APPLE'.
Regards,
SMPHi,
Try like this.
parameters : p_pass TYPE string value 'APPLE'.
at selection-screen on p_pass.
If p_pass co 'APPLE'.
statement
endif.
Regards,
Prashant -
Can we assign two values to the same parameter? If yes how? For details ple
Can we assign two values to the same parameter? If yes how? For details please go through the following SAP related program.
Here I need to print 2 queries using the same parameter "QUERY" the value assigned to this parameter(query) is REPORT_TEST1. I want to assign one more value to this Parameter. Is is possible? This question may sound stupid if it is not possible please kindly reply.
I want to do this to print two documents(values) with a single command (parameter)
Anybody please help quickly,
Now, I have 2 tables from different queries. I have a print (HTML written) option in my WEB Template
JAVA PROGRAM:
<param name="QUERY" value="REPORT_TEST1"/>
function PrintReport(typePaper) {
document.title ='Report';
if (typePaper == "0")
{var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('39') + '&qtitle=' + escape(document.title);};
if (typePaper == "1")
{var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('52') + '&qtitle=' + escape(document.title);};
CurrentReportName += '&ASOFDATE=' + escape(AsOfLabel.innerText);
var openCMD='<SAP_BW_URL>';
openCMD += '&DATA_PROVIDER=REPORT_TEST1&TEMPLATE_ID=DPW_PRINT_PAGE&CMD=RELEASE_DATA_PROVIDER';
openCMD += CurrentReportName;
openWindow(openCMD,'MainTitleNow',800,600);
The data provider here is REPORT_TEST1. Now it only prints the corresponding data for the data proviedr 1 i.e., REPORT_TEST1. I have a second table whose data comes from the data provider 2 when i use this HTML to print I want the second table contents from the data provider 2 (REPORT_TEST2)also to be printed simlutaneously.
Please help.
THANX A LOT,
SRINIHi,
Try assigning two values seperated by a delimiter ( say '|') to the same parameter.
In the function get the parameter value and seperate the values using the same delimiter.
<param name="QUERY" value="REPORT_TEST1|REPORT_TEST2"/>
Regards,
Uma -
Can we assign two values to the same parameter? If yes how?
Can we assign two values to the same parameter? If yes how? For details please go through the following SAP related program.
Here I need to print 2 queries using the same parameter "QUERY" the value assigned to this parameter(query) is REPORT_TEST1. I want to assign one more value to this Parameter. Is is possible? This question may sound stupid if it is not possible please kindly reply.
I want to do this to print two documents(values) with a single command (parameter)
Anybody please help quickly,
Now, I have 2 tables from different queries. I have a print (HTML written) option in my WEB Template
JAVA PROGRAM:
<param name="QUERY" value="REPORT_TEST1"/>
function PrintReport(typePaper) {
document.title ='Report';
if (typePaper == "0")
{var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('39') + '&qtitle=' + escape(document.title);};
if (typePaper == "1")
{var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('52') + '&qtitle=' + escape(document.title);};
CurrentReportName += '&ASOFDATE=' + escape(AsOfLabel.innerText);
var openCMD='<SAP_BW_URL>';
openCMD += '&DATA_PROVIDER=REPORT_TEST1&TEMPLATE_ID=DPW_PRINT_PAGE&CMD=RELEASE_DATA_PROVIDER';
openCMD += CurrentReportName;
openWindow(openCMD,'MainTitleNow',800,600);
The data provider here is REPORT_TEST1. Now it only prints the corresponding data for the data proviedr 1 i.e., REPORT_TEST1. I have a second table whose data comes from the data provider 2 when i use this HTML to print I want the second table contents from the data provider 2 (REPORT_TEST2)also to be printed simlutaneously.
Please help.
THANX A LOT,
SRINIHi,
Try assigning two values seperated by a delimiter ( say '|') to the same parameter.
In the function get the parameter value and seperate the values using the same delimiter.
<param name="QUERY" value="REPORT_TEST1|REPORT_TEST2"/>
Regards,
Uma -
How can I get all the values of a String array profile property using javascript?
I am trying to build functionality into our site that records all products added to the basket against a user's profile.
I have so far been able to store the product codes against the profile as a property using Ajax:
var dataString = ":formid=addProduct&:formstart=/apps/thread/templates/page_product/jcr:content/par/produc t/formstart&:redirect=/content/thread/en/user/cart.html&productId=151515:profile="+profile ;
$.ajax({
type: "POST",
url: "/content/women/evening/dresses/l-k-bennett-davinadress.html",
data: dataString,
success: function(data) {
In this example I have hardcoded a product ID of 151515.
In order to save the property as a multi string field you simply replace &productId=151515 with &productId=151515&productId=131313&productId=141414 or as many extra values as you want to build into that string. This stores a productId property against a user profile.
The issue comes from calling that data back. Using var value = CQ_Analytics.ProfileDataMgr.getProperty("productId") I can get the first value of this array (or the single value if only one is stored).
However there does not seem to be a way to get any of the other stored values in the array using getProperty. Does anyone know how I can achieve this?Hi,
Don't think that's possible. Even if it were, you wouldn't be able to use/display BOOLEAN type in SQL.
If you just aim to see what they are, you could do something like this
select text
from all_source
where owner = 'SYS'
and name = 'DBMS_DB_VERSION'
and type = 'PACKAGE';Or even
select dbms_metadata.get_ddl('PACKAGE', 'DBMS_DB_VERSION', 'SYS') from dual;My version is:
SQL> select * from v$version where rownum = 1;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
1 row selectedIn 11g you also have [PL/SCOPE|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_plscope.htm#ADFNS02203] which might help you even more.
Regards
Peter -
How to assign a value to the viewcriteria attribute from backing bean ?
Hi,
I have a readonly VO with the following query
select attr1,attr2, attr3, attr4
from sometable
I have a view criteria in the above VO something like
attr1=
and attr2=
I have dragged and dropped this criteria on a Status.jsff page as query panel with table. So the user can search the records by manually entering the values in the query panel. Also, there is another page Main.jsff where, if the user clicks on a button, it redirects him to Status.jsff page carrying a numeric value from the Main.jsff page. Now I have to assign this numeric value to "attr1" of the view criteria and execute this VO and show the updated results in the Status.jsff page.
I used the below code :
ViewObject vo = appModule.findViewObject("VOName");
ViewCriteria criteria = vo.getViewCriteriaManager().getViewCriteria("CriteriaName");
criteria.getVariableManager().setVariableValue("attr1", numericValue);
vo.applyViewCriteria(criteria);
vo.executeQuery();
For the above code, i got an error saying that Variable "attr1" not defined in "VOName"
Then i tried setting simple where clause
vo.setWhereClause("attr1="+numericValue);
vo.executeQuery();
For this code, i got an error saying that SQL error during statement preparation.Statement: SELECT * FROM (select attr1 ,attr2,attr3,attr4,from VOName) QRSLT WHERE (attr1=1234)
Please let me know the solution to this problem.Thank you all for the suggestions.
The idea of Bind Variable works to query the criteria. But I have a Status.jsff page where User can even manually enter the attr1 value and query the results. When I added a bind variable to my VO, one extra input text field with the Bind variable name got added to the query panel in Status.jsff page. Also the table in the page did not show any results even after performing the executeQuery() on the VO(as per the steps explained in the Andrejus blog link that Navneeth has provided)
Please suggest -
Assigning of values to the charecteristics while doing GR
Dear Gurus
I have created a charecteristic and assigned it to a class of classtype 23 (batch class).I assigned this class to a material.Now while doing GR of this material through TCODE MB1C and movement type 561 the system is giving the automatic batch number.But it is not giving any options for assigning the values for the charecteristic that I have kept in the class.How to assign the value while doing GR ?.I am able to assign the value by going to TCODE MSC2N.
Regards
Sandip SarkarHi Sandip,
One option will be mark all those characteristics as Entry Required in T.code CT04.
So that you will get a warning msg. during GR if value is not maintain.
Msg. No is LB045 and msg is,
The characteristic values for the batch are incomplete.
If required you can convert that warning msg to Error also.
You can do it by using T.code OCHS.
But keep notice that you have to go that Classification tab manually - there is no other option in
Regards,
Dhaval -
Hello Guys,
I am trying to build a sinogram from 180 projection images and I am not able to store the summed values into the array as it is moving the values and then populating all the rows except for the last with ZERO.
Thanks in advance.
Attachments:
sinogram.vi 53 KBYour loop runs only three times, so all you can possibly populate is 3 rows.
Typically, you would initialize a shift register with the initialized array, then use replace array subset, feeding the modified array back into the shift register. However, in this case you could just autoindex the 1D array at the output tunnel to build the resulting 2D array.
Sorry, I am not familiar with sinograms. Do you have a link describing the algorithm?
LabVIEW Champion . Do more with less code and in less time . -
Search for a value in the string.
Hi,
I have an issue with my table data.
I have a lot of junk values like 'AAA', 'BBB', 'CCC' etc....
So Now, Can I have a regular expression string or a query which would generalise my requirement of cleansing these values in the first name and last name columns of my table??
I use Oracle 11G as my development Box.
Any help would be appreciated..something to play with (I'm not a heavy regexp user so bear with me)
select :your_string dirty,
regexp_replace(upper(:your_string),
'(A{3,}|B{3,}|C{3,}|D{3,}|E{3,}|F{3,}|G{3,}|H{3,}|I{3,}|J{3,}|K{3,}|L{3,}|M{3,}|N{3,}|O{3,}|P{3,}|Q{3,}|R{3,}|S{3,}|T{3,}|U{3,}|V{3,}|W{3,}|X{3,}|Y{3,}|Z{3,}|_{3,})+',
) clean
from dualrecursive with might be more efficient
with
cleaner(k,x,n) as
(select 0 k,'' x,'aaaaabcccccdaaaae' n
from dual
union all
select k+1,
x || case when length(n) - length(ltrim(n,substr(n,1,1))) < 3
then lpad(substr(n,1,1),length(n) - length(ltrim(n,substr(n,1,1))),substr(n,1,1))
end,
ltrim(n,substr(n,1,1))
from cleaner
where n is not null
select x
from (select n,x || case when length(lead(n) over (order by k desc)) < 3
then lead(n) over (order by k desc)
end x
from cleaner
where n is nullRegards
Etbin -
Assigning variable values in the virtual key figures Badi
Hi,
I'm currently using the virtual chars and key figures RSR_OLAP_BADI to calculate days late as 0NETDUEDATE - sy-datum. This works fine, but the query actually uses variable 0P_KEYDT to determine the key date (set in restricted key figures so not directly).
I want to use this key date variable value rather than the system date to calculate Days Late in the CALCULATE method of the Badi. In the old user exits I could have retrieved the value from internal table i_t_var_range in the variables user exit ZXRSRU01 and stored it globally.
Does anyone know how to get a query variable value within the RSR_OLAP_BADI Badi? I've tried using BAPI_REPPROV_GETVARIABLES but don't know how to pick up the session id to make it work. Is there a BADI equivalent of EXIT_SAPLRRS0_001?
I'm sure one of you out there has the answer!
Thanks,
StuartHi József
Yes I have, I think using SAP's white paper on virtual characteristics and key figures.
My only outstanding question would be: is there a replacement BADI for the variables user exit and if not why not, since BADIs are supposed to be the preferred way now? -
How to assign a value of the bean to a js variable.
Hi,
Im getting some values from the DB which is stored in a list , Now the list is sent across to the jsp through the bean.
I need to get the length of the list
I tried something like this.
<script>
var size = <% rmaLicenseTransferForm.slfextUiElements.size(); %>
</script>rmaLicenseTransferForm is the name of the formBean and slfextUiElements is the name of the list.
I guess this wont work....by the way i using struts framework.....
ThanksUse the JSTL fn:length tag.
-
How to assign date value in the report
Hi,
I want to compared between two dates. One date is dynamic and other one is fixed.
for example Date1 = today's date
Date2 = 12/31/9999
How do i fix the date2 in the report.
Please any one help me
Thanks & Regards
Jagannadha Rajuyou can use default values in the properties of the date variable that will allow it to be the data yo uwant it to be
the 2nd date which is current use sap provided variable current data on it as restrickted value( Not default).
hope that helps -
How can I dynamically pass values to the DayOfWeek array given below?
I have this below code:
var onMondayAndTuesday = DailyTimeIntervalScheduleBuilder.Create()
.OnDaysOfTheWeek(new DayOfWeek[] { DayOfWeek.Monday, DayOfWeek.Tuesday });
var trigger = TriggerBuilder.Create()
.StartAt(DateBuilder.DateOf(StartHour, StartMinute, StartSeconds, StartDate, StartMonth, StartYear))
.WithSchedule(onMondayAndTuesday)
.WithCalendarIntervalSchedule(x => x.WithIntervalInWeeks(Int32.Parse(nWeekInterval)))
.EndAt(DateBuilder.DateOf(0, 0, 0, EndDay, EndMonth, EndYear))
.WithIdentity(triggerKey)
.Build();
Here depending on the days users have selected any weekday would be passed in to the DaysOfWeek array. It might be just monday or monday
and friday etc. How can I achieve this? Please advice.
mayooran99Try this:
DayOfWeek[] days = new DayOfWeek[7];
days[0] = DayOfWeek.Friday;
days[1] = DayOfWeek.Monday;
days[2] = DayOfWeek.Saturday;
var onMondayAndTuesday = DailyTimeIntervalScheduleBuilder.Create()
.OnDaysOfTheWeek(days);
also you can use it as a list:
List<DayOfWeek> d = new List<DayOfWeek>();
d.Add(DayOfWeek.Friday);
Fouad Roumieh
Maybe you are looking for
-
How to specify an initial value for a sequence? (using DPL)
I've been trying to come up with a piece of code that would initialize the sequences defined within the annotations in my persistent classes, with no success. According to the documentation I could find, I figured that the following method would work
-
Configuring UK Local Area Codes for BE3000 Site
When configuring sites for the BE3000, it is possible to define a local area code. This creates entries in the dial plan that allow users to just dial a local number with the system automatically adding the area code. Currently (as of version 8.6.4)
-
Too contrast colors in Safari 6.0
Colors in new Safari 6.0 have become weird, too contrast if you will. Chrome: New Safari (look at the background of the icons and on the edges of blocks):
-
I am trying to execute this Select against my excel file SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; HDR=NO; IMEX=1; Database=C:\Temp\test.xlsx', 'SELECT * FROM [Sheet1$]') I have followed every single step according to this art
-
Can't connect to bluetooth device with iPhone 5 on iOS 8.1
hi So unfortunately i can't connect my iPhone 5 (software is up to date on iOS 8.1) to my Jawbone device, It worked fine last week. and now it doesn't find it. turned my phone off and on again and it didn't change anything. Can somebody help me? Than