Initialize value
I want to display value of quantity field as blank if it contains vaue as 0.00
This is the query which i hav written.
select * from resb into corresponding fields of resb_itab_wa
where aufnr = itab_wa-aufnr AND WERKS = ITAB_WA-DWERK.
IF RESB_ITAB_WA-ENMNG = 0.
RESB_ITAB_WA-ENMNG = ' '.
ENDIF.
i.e. if the value of resb_itab_wa is 0.00 then it should display blank
So i wrote the above query. But there is no change . 0.00 is yet being displayed.
Do i hav to write something else since it is a quantity field.
WHERE do you have your problem?
in SMARTFORMS? in SAP-Script? in a write statement?
in SMARTFORMS and in SAP-Script the solution is quite easy.
at your output variable in your form just add (I).
Example: &EKPO-NETWR(I)&
if EKPO-NETWR is initial (would be 0.00), then it wiont get printed.
if it differs from initial state, then it will be printed.
if you have that problem in a write statement, you should swap that value through a char field, and print (write) that char field.
Swap the value ONLY if your value is not initial.
Similar Messages
-
Hi all,
We reseted a company using :
-function "reset company code" ( line items only) (tcode OABL) for FIAA
-function "delete transaction date" (tcode OBR1) for FI and CO
We used AFAR to recalculate values for ANLC.
The problem is that some assets still have a value in ANLC.
Is there any way to initialize values in this table for all assets of a company code?
Thank you for your help,
Regards,
JulienHi Julien,
Did you the action behind the help from the field Delete Line Items?
When this field was not sellected all assets are deleted!!
Deletes only the transaction data in the company code, but not the asset master records.
Dependencies
The system deletes all transaction data of all fiscal years. From a technical perspective, this means the contents of the ANEK, ANEP and ANEA tables are deleted, but not the contents of table ANLC containing the master data.
After this, you have to recalculate depreciation. This requires that all fiscal years be open. If necessary, you have to reopen closed fiscal years.
If there are problems nonetheless afterward, delete all data in the company code, including master data, in order to avoid later errors due to data inconsistencies. -
Primary Classification field is showing Balance Initialization value
Dear Team,
I am facing problem in Element Screen, whenever i want to create an element i want to select Primary Classification but unfortunately when i click on the LOV of the Primary Classification to select the Earning or Deduction the LOV only show the "Balance Initialization Value"
I created my own responsiblity, i select the "GLB HRMS Navigator" Menu.
but when i switch responsibility to "Global HRMS Manager" or "Human Resource Vision Enterprise" then primary classification shows the complete seeded value list.
kindly guide me.
Thanks & Take Care.
Kamran J. ChaudhryDear Team,
The issue is resolved. Actually the problem in the "Legislation"... i created BG and select "Pakistan" in the Legislation for this many features become disabled and not able to access. i create new BG and only change the "Legislation"... and enter "United Kingdom" the problem resolved.
Thanks
Kamran J. Chaudhry -
I want to initialize values in IT1001 thrue a measure. Is it possible with a BADI or a User_Exit?If yes, which one?
Hi,
I want to know how can I initialise values in dynpro 1001 when I execute a measure 26. I also search in the BADi HRBAS00INFTY, but we can access to the fields of the screen. Does it exist another solution like the exit ZXPADU01 for PA.
Thanks for you response. -
H:inputText ; How To initialize value Property from back/bean method?
Hello Guys at Sun Forums.
I am a newbie at using JSF. and I'm having a bit of a Problem.
I don't know how to initialize the value property of a h:inputText from a method inside a backing bean that returns a String data type.
My Method inside the Backing bean is this:
public String getLastDate()
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
Date DateCapt = null;
String DateConv= null;
try{
Class.forName("com.sybase.jdbc2.jdbc.SybDrive").newInstance();
con = DriverManager.getConnection("jdbc:sybase:Tds:localhost/BAN_PRO_SNP", "xxxx", "xxxx");
if(!con.isClosed()){
stmt = con.createStatement();
stmt.executeQuery ("SELECT TOP 1 CONVERT(VARCHAR(10), fec_parametro, 103) fec_parametro FROM snp_sei_parametros" +
" WHERE cod_parametro = 'FECHA'" +
" ORDER BY fec_parametro DESC");
rs = stmt.getResultSet();
while (rs.next())
DateCapt = rs.getDate("fec_parametro");
rs.close();
stmt.close();
catch (Exception ex)
System.out.println("COULD NOT LOAD THE DRIVER!!!!");
System.out.println(ex);
DateConv = String.valueOf(DateCapt).toString();
return DateConv;
}As you can see the Method returns a String data type, and all I want to know is how put that returned String as the initial value of a h:inputText. when the jsf-jsp page loads.
Please Help Me.You should be able to do
<h:inputText value="#{bean.lastDate}"/>Where 'bean' is the managed bean name containing
the method getLastDate().
When the view is rendered, the getter (getLastDate())
will be called to display whatever value is returned. -
Button that initializes values then releases control of further booleans
I am attempting to create a button that turns on a series of other buttons but then releases control to allow individual switching. The problem is that for my project I must run the labview file continuously so when I change a control switch to true it keeps the value of the other booleans true. For example, I flick a switch to turn all the lights on at the same time but then later want to have the power to individually turn particular lights off. Then also have the ability to turn all the lights off again with a click of a button. I'm having trouble figuring this out. I don't have much so far, sorry for that.
Solved!
Go to Solution.
Attachments:
Switches.png 18 KBAttached are the 3 files necessary for running the Matrix Control VI. It's basically a solar tracking program.
Attachments:
MatrixControl.vi 38 KB
Building Location.vi 8 KB
angular placement compensation.vi 17 KB -
Obiee 11g - Master/detail : How to initialize details ?
Hi gurus,
I'm using the last version of obiee.
I have a dashboard with master/detail. The master/details are working great when I click on cells.
But I have some "initialization" problems.
- master/detail with a prompt list on the master table
a change on the list won't initialize the detail. I would like to have the detail refreshed with the first row of the master.
- master/detail with different order by on master and detail
the initialization value of the detail does not fit with the first row of the master.
Is it possible to achieve this ?
Thanks in advance for your help.
EmmanuelHi Dpka,
Thanks for sharing your view . I ,even observe the same 'error' message returining false value at the bottom-left of my browser when set up the Master detail even and clicked my table column to reflect the value in the graph .
But my situation is bit tricky . I can't expose two different views to see if separating the interaction works well or not . In my case I have only 1 report with 4 compound layout(with pivot table(master) and Graph(detail)) having view selector . So this is practically not separable as this incurs loss of other functionalities.
Do you have any suggestion in mind . I tried to see Supportweb and doesn't have any valid bug reported :(
Rgds,
DxP -
How to generate unique values while initializing values
I am initializing values in my pl/sql program and want to use a sequence to set my unique ids but it errors out. Below is what I use.
ie. table_id := table_seq.nextval;
How can I use my sequence to initialize values or is this possible?The method suggested by user605919 will work. However, you don't need to initialize a variable like this. It is better and more performant to do it like the third example below:
SQL> create table mytable
2 ( id number(6)
3 , description varchar2(30)
4 )
5 /
Tabel is aangemaakt.
SQL> create sequence table_seq start with 1 increment by 1
2 /
Reeks is aangemaakt.
SQL> declare
2 table_id mytable.id%type := table_seq.nextval;
3 begin
4 insert into mytable
5 ( id
6 , description
7 )
8 values
9 ( table_id
10 , 'Some description'
11 );
12 end;
13 /
table_id mytable.id%type := table_seq.nextval;
FOUT in regel 2:
.ORA-06550: line 2, column 41:
PLS-00357: Table,View Or Sequence reference 'TABLE_SEQ.NEXTVAL' not allowed in this context
ORA-06550: line 2, column 12:
PL/SQL: Item ignored
ORA-06550: line 9, column 5:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 9, column 5:
PL/SQL: ORA-00904: "TABLE_ID": invalid identifier
ORA-06550: line 4, column 3:
PL/SQL: SQL Statement ignored
SQL> declare
2 table_id mytable.id%type;
3 begin
4 select table_seq.nextval
5 into table_id
6 from dual
7 ;
8 insert into mytable
9 ( id
10 , description
11 )
12 values
13 ( table_id
14 , 'Some description'
15 );
16 end;
17 /
PL/SQL-procedure is geslaagd.
SQL> begin
2 insert into mytable
3 ( id
4 , description
5 )
6 values
7 ( table_seq.nextval
8 , 'Some description'
9 );
10 end;
11 /
PL/SQL-procedure is geslaagd.And if you need the id value for some code after the insert, you use the RETURNING clause.
Regards,
Rob. -
Error while fetching variable value from sqlserver database in 11g
Hi
We created a dynamic variable to fetch data from sqlserver database in 11g.But when we test it, it is erroring out as follows: "nqserror: 27024 the execute physical statement must specify a physical sql statement to execute".
Please help to overcome this issue.
Thanks.Hello,
First make sure that you're able to retreive data from the repository (right click on a table and view data?)
To create a session variable follow these steps:
From the Administration Tool menu bar, choose Manage > Variables.
In the Variable Manager dialog box, from the menu bar, choose Action > New > Session > Variable.
In the Session Variable dialog box, type a variable name.
Names for all variables should be unique. The names of system session variables are reserved and cannot be used for other types of variables.
For session variables, you can select the following check boxes:
Enable any user to set the value
Check box that allows you to set the session variables after the initialization block has populated the value (at user login) by calling the ODBC store procedure NQSSetSessionValue(). For example, this allows non-Oracle BI Administrators to set this variable for sampling.
Use the Initialization Block drop-down list to select an initialization block that will be used to refresh the value on a continuing basis.
To add a Default initializer value, perform one of the following steps:
To use the Expression Builder, click the ellipsis button to the right of the Default initializer work space.
Type the value into the Default initializer text box.
Click OK.
you can do the same for a repository variable except that you will have to specif a refresh interval.
Make sure the sql your are issuing is correct by running it first using a client.
Regards
PS: Please don't forget to close the thread and assign points when your question is answered -
Initializing values in an internal table
hi
how to initialize values in a internal table
according to my requirement i need to initialize (both character and currency) values present in the internal table based on certain conditions
vamsihi
As i understood you want to clear only selected fileds not the complet record..
create a Field symobl the loop at the table.. inside the loop check the condtion the just clear the filed.
example: you have itab type mara.
then
FIELD-SYMOBOLS <FS_WA_ITAB> TYPE MARA.
LOOP AT ITAB ASSIGNING <FS_WA_ITAB>.
IF X = XXX (YOUR CONDITION)
CLEAR: <FS_WA_ITAB>-FIELD2,
<FS_WA_ITAB>-FIELD3. (If u want to clear only filed2 and field3)
clear <FS_WA_ITAB>. (if you want to cleatr the complete record)
ENDIF.
ENDLOOP.
Why iam suggestin the filed-symobol is.. it is direcltly work on internal table body so u no need to update the table agian
Please Close this thread.. when u r problem is solved
Reward if Helpful
Regards
Naresh Reddy K -
How to initialize the variables in the subvi when the main vi running?
Hi, friends!
Now I am working on a project with labview. I make a main vi including many subvis.
When the main vi running, I want to reinnitialize the variables in the subvi to zero.
I know that I can realize that using the local variable when I enter the subvi,
but I want to keep the the values when I left the subvi and saw them when I
click in this subvi again. So, I do not reinitialize the subvi when it runs. But, I
don not know how to reinitialize the indicators in the subvi when I run the main
VI in the first instance. I try to use the global variables, but it seems do not work
well. Would you like to give me some advice? Thanks a lot!Hi dec,
If I understand your question, try using the "First Call?" node in your Sub-VI - to initialize values the first time the VI executes every time the top-level VI is Run.
If this doesn't work for you, just post again!
Cheers.
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare) -
Numeric values longer than 32bit?
Greetings,
I'm an EE student currently working as a LV instrument driver developer
for a well-known T&M equipment manufacturer here in Munich.
My problem is the following: Is it possible to handle numeric values
longer than 32bit in LV? Specifically, one of my instrument driver VIs
needs to supply an initialization value to the Wideband CDMA "long code"
configuration menu of a versatile vector signal generator. This value
can range from 0x0 to 0x1FF,FFFF,FFFF (which accounts for 41 bits, if
I'm not mistaken). The instrument expects this value in hexadecimal
form.
A quick and dirty solution could be either to split up the control range
in 32+9 bits, i.e. place two controls on the front panel, or to use a
string control an
d have the user specify the hex value as a string. Both
solutions are not very desirable though, especially since instrument
driver VIs are meant to be used as sub-VIs in customer-specific programs
and for that reason aren't usually accessed from their front panels.
So, are there any other, more elegant solutions than the ones mentioned
above?
Thanks a lot in advance!
(c) Tobias HermannIn <[email protected]> Tobias Hermann writes:
>My problem is the following: Is it possible to handle numeric values
>longer than 32bit in LV? Specifically, one of my instrument driver VIs
>needs to supply an initialization value to the Wideband CDMA "long code"
>configuration menu of a versatile vector signal generator. This value
>can range from 0x0 to 0x1FF,FFFF,FFFF (which accounts for 41 bits, if
>I'm not mistaken). The instrument expects this value in hexadecimal
>form.
FORMING THE 41-bit STORAGE
You can create any arbitray numerical data length by using a binary
array. This is the best and most direct solution to your needs.
Just remember, LabView allocates binary arrays in multiples of bytes,
so a 41-bit array will be rounded up to a length of 6 bytes or
48-bits; however, LabView knows to return only the first 41-bits to
you upon request.
GENERATING AN ARRAY OF 41-bit VALUES
The next issue is that you need an array of 41-bit numbers. You simply
define this as a 2-dimensional array of binary values. When
initializing this array, be certain you order the dimension indices
such that the fastest moving index has a size value of 41. The slowest
moving index will then be for the actual numerical size of your array.
If you transpose the index definition, nothing will work right! Be
careful!
When your array (above) is defined, it should be shown in LabView as a
brown wire, which deplicts it as a binary 2-dimensional array. If it
is instead shown in a magenta color, then you instead defined and array
(cluster) of 41-bit binary numbers. That will work okay too (and will
even be easier the used), but it will take more storage and will take
LabView longer to handle. However, if you're more confortable will the
latter choice, I can understand that. It does have the feature of being
able to address each 41-bits number directly. With the 2-dim approach
I initially outlined, you'll need to slice out each 41-bit number from
the 2-dim array each time you access (read/write) it.
FORMATTING BINARY INTO HEX
Formatting your storged numbers is an entirely _separate_ issue and
your 41-bits numbers only need to worry about formatting when you
send them to an output device. For a LabView control panel, simply
open a binary array control, then select the appropriate options so
they are displayed in base-2, octal, or hex. LabView supports all
three display formats with any binary indicator.
If you need to format your numbers to a hex string (for an output
device), try the "To Hexadecimal" or "Format & Append" function.
Again, if you're using the 2-dim binary array apprach, you'll need to
slice out each 41-bit number indivdually. If you're using the cluster
(array) if 1-dim 41-bit array approach, you can skip that step.
Frankly, I'm not sure how well LabView's formatting functions work with
1-dim binary arrays, but in principal they should. If they don't work
directly, no big deal. Just cast the 41-bit arrays into U8 numbers
(bytes) and have the formatting function format those numbers into hex
strings; simply one more step.
One question: Why on earth do you want to format the data going
into your instrument in the first place? Almost all instruments will
take binary input _directly_ without formatting it into ASCII (octal,
hex, etc) first. This is much faster because the ASCII of all this
hex stuff requires many more bytes to transfer to your instrument.
Moreover, the instrument then needs to convert the ASCII (hex) back
into binary before it can use any of it. You should investigate
skipping the formatting step altogether. The exception might be
if you're using an RS-232 connection to your instrument where raw
binary isn't allowed. Newer interfaces like GPIB, 1394, etc will
allow binary transfer directly.
COMMENTS ON STRINGS
Don't use strings in LabView. By default, each string get a minimal
memory allocation of 2K. If you define a 100 element (array) string,
that's 200K of memory just to hold those strings. Not a big deal, but
when the memory manager starts doing garbage collection (which is
required with string manipulations), things will really slow down.
String are important, but data should always be stored in a binary
form within any computer, not in ASCII formatted form (hex included).
/\ Mark M Mehl, alias Superticker (Supertickler to some)
<><> Internet: [email protected]
\/ Preferred UUCP: uunet!iastate.edu!mehl
Disclaimer: You got to be kidding; who would want to claim anything I said? -
Inheritance - instance variable initialization
Hi all.
I have a question regarding inherited instance variables.
class Animal {
int weight;
int age = 10;
class Dog extends Animal {
String name;
class Test {
public static void main(String[] args) {
new Dog();
}This is just an arbitrary code example.
When new Dog() is invoked, I understand that it's instance variable "name" is give the default
type value of null before Dog's default constructor's call to super() is invoked.But Im a little perplexed about
Animals instance variables. I assume that like Dog, Animals instance variables are given their default type values
of 0 & 0 respectively, before Animals invocation of super(); What im unclear about is that at the point that weight and age are given their default type values, are Dog's inherited weight and age variables set to 0 aswell at that exact moment? Or are Dog's inherited weight and age variables only assigned their values after Animals constructor fully completes because initialization values are only assigned to a classes instance variables after it's call to super().
Many thanks & best regards.Boeing-737 wrote:
calvino_ind wrote:
Boeing-737 wrote:
newark wrote:
why not throw in some print statements and find out?Super() or this() have to be the very first statement in a constructor..
Also you cannot access any instance variables until after super or this.
:-S
Kind regardsbut if you add the "print" statement in animal constructor, you can easily see what happened to the attributes of Dog ; that s the trick to print "before" super()You can never add a print before super(). It's a rule of thumb, super() and this() must always be the first statements
in a constructor, whether added implicitly by the compiler or not. In this case there are 2 default constructors (inserted by the compiler), each with a super() invocation. Even if i added them myself and tried to print before super(), the compiler would complain.
Thanks for the help & regards.you didn't understand what i meant ; take a look at that:
class Animal {
int weight;
int age = 10;
public Animal() {
Dog thisAsADog = (Dog) this;
System.out.println(thisAsADog.name);
System.out.println(thisAsADog.x);
class Dog extends Animal {
String name;
int x = 10;
public class Test {
public static void main(String[] args) {
new Dog();
}this way you will know what really does happen -
Set initialization for inputfild.
Hi ,every one,
I am a new to web dynpro for abap.
and I have one question need your help.
I have one inputfield , and I bind it to a Dictionary value ,such as "showView.InfoFrom.Get",This bind is important to me.
but I want to set initialization value of this inputfield.
such as : "please select value"
where Can I do this , can you tell me the code or the step?
thanks very much.Hi you can generate this code for your variable.
DATA lo_nd_flighttab TYPE REF TO if_wd_context_node.
DATA lo_el_flighttab TYPE REF TO if_wd_context_element.
DATA ls_flighttab TYPE wd_this->Element_flighttab.
DATA lv_seatsmax TYPE wd_this->Element_flighttab-seatsmax.
navigate from <CONTEXT> to <FLIGHTTAB> via lead selection
lo_nd_flighttab = wd_context->get_child_node( name = wd_this->wdctx_flighttab ).
@TODO handle non existant child
IF lo_nd_flighttab IS INITIAL.
ENDIF.
get element via lead selection
lo_el_flighttab = lo_nd_flighttab->get_element( ).
@TODO handle not set lead selection
IF lo_el_flighttab IS INITIAL.
ENDIF.
@TODO fill attribute
lv_seatsmax = 1.
set single attribute
lo_el_flighttab->set_attribute(
name = `SEATSMAX`
value = lv_seatsmax ).
in the value give the default value which ever you want.
Best regards,
Rohit -
Can I do the equivalent of a shift register with a variable start value?
I have an array of samping frequency values (determined by an external signal) and I would like to extract one value at a time from this array to use as the sampling frequency for another signal.
The shift register almost does what I want. The problem is that I don't always want to start at element 0, but rather at the first positive sampling frequency value, which has a slightly different index each time. Once this value is reached, I want the index to increment by 1 each loop iteration (which it already does).
I have attached a VI for reference. Any suggestions?
Solved!
Go to Solution.
Attachments:
indexing question.vi 69 KBLaura121,
I can think of two ways to do that. One is to place a copy of the DAQ Assistant outside the loop. Take one reading to get the initialization value for the shift register then proceed as you are now doing for subsequent measurements.
The other way is do the initialization in a case structure. When i = 0 (first iteration), initialize the shift register. For i > 0, use existing code. This method would only require one DAQ Assistant.
It is not clear that your code or either of the approaches I described actually does what you said you want to do in the original post: "...extract one value at a time from this array..." Each time through the loop you take another set of readings, discard all the old data, and take one sample from the array at the index determined by the shift register. This is not what I would consider extracting one value at a time from the array. If you really want to go through the entire array, you need to do the sampling frequency extraction many times for each DAQ Read.
You also should have some error handling to consider the case where no element in the Array of Sampling Frequencies is positive or the case where you have reached the end of the array.
Lynn
Maybe you are looking for
-
With the Form6i, I create a form in which one of the items is with type IMAGE. With this IMAGE item, I add a trigger for WHEN_IMAGE_PRESSED as below. read_image_file(get_file_name(),'TIFF','s_image.image'); If the data type of "s_image.image" is LONG
-
Kernal Panic... clues?
I was just installing and testing some RAM on my brothers G4 PowerBook and I got a kernal panic. After rebooting I was pulling up the system preferences and got another one. I can't tell from the panic log what's going on, maybe someone here has a cl
-
Hi all, we are in process starting workflow archiving and the scenario as below adding a dedicated application server to the existing setup due to huge data and planning to run archiving jobs in the particular server only. ran couple of Test jobs, in
-
ORA-011-2 cannot mount database in Exclusive mode
This is brand new both Oracle 10g and SUSE 9.3 install. The installation went fine, no errors. At the end I tried to verify the installation: sqlplus /nolog SQL>connect / as sysdba Connected to an idle instance SQL>startup ORA-01078: failure in proce
-
How to create cross tab reports using RAS SDK api with Crystal Reports XI
Hi Everybody, Iam generating reports in a web-based application with Crystal Reports XI using Report Application Server(RAS) SDK API. The columns in my report exceed that of an A4 sized page. So, when I export that report to pdf, only those columns t