Flex 3: syntax for populating ArrayCollection by loop
Hi, I'm a newb. I can't find an example of how to do this. Any examples would be greatl appreciated.
I want to chart some engineering data by populating my chart's dataprovider with an array collection (so far no problem). I want to poulate the array collection by looping through a math expression and I can't figure out the syntax for that. For example...
[Bindable]
private var myChartData:ArrayCollection = new ArrayCollection([
{vertNum:100, horizNum:100}
I want to loop through and add more points programmatically so if I loop 5 times I end up with...
[Bindable]
private var myChartData:ArrayCollection = new ArrayCollection([
{vertNum:100, horizNum:100},
{vertNum:110, horizNum:110},
{vertNum:43, horizNum:120},
{vertNum:88, horizNum:130},
{vertNum:140, horizNum:140},
// etc...
The number of horizontal variables to plot ould be in the hundreds, so I don't want to set up a huge static array collection with expressions in each location. I'd prefer to solve the expression as a loop iterates and populate the array collection as it goes. But I haven't got a clue how to 'word' that.
thanks!
Here is an example of adding data points from a simple formula using a random number generator and scaling the randomness up. The process is just to create a new Object for each iteration of the loop and add the object to your ArrayCollection. You can assign as many properties to the object as you need, which can be helpful for using one ArrayCollection that is displayed in multiple charts.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="build_model()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
private function build_model():void {
var obj:Object;
var chartAC:ArrayCollection = new ArrayCollection();
for (var i:uint = 0; i < 100; i++) {
obj = new Object();
obj.horizNum = 100 + 10 * i;
obj.vertNum = i * Math.random();
chartAC.addItem(obj);
linechart1.dataProvider = chartAC;
]]>
</mx:Script>
<mx:LineChart left="10" right="10" top="54" bottom="10" id="linechart1">
<mx:series>
<mx:LineSeries displayName="Series 1" yField="vertNum" xField="horizNum"/>
</mx:series>
</mx:LineChart>
<mx:Button x="10" y="10" label="Build Model" click="build_model()"/>
</mx:Application>
Chris
Similar Messages
-
Hey folks,
I've heard about for loops being the best way to accomplish what I need. With my coding level, i'm looking to have that when all the checkbox states are true, then go to a specific frame. the issue is when I was using event listeners inside each of the mouse click events, it would trigger on the ninth click as all conditions would have been met. The syntax for a loop appears daunting, is there any way to execute my function so it's always "listening" or will execute eimmeidatley if the conditions are met?
OFbandSEVENclose.addEventListener(MouseEvent.CLICK, OnFRYERbandSEVENclose);
function OnFRYERbandSEVENclose(e: MouseEvent): void
gotoAndPlay(1);
OFbandSEVENcheckONE.visible = false;
OFbandSEVENcheckTWO.visible = false;
OFbandSEVENcheckTHREE.visible = false;
OFbandSEVENcheckFOUR.visible = false;
OFbandSEVENcheckFIVE.visible = false;
OFbandSEVENcheckSIX.visible = false;
OFbandSEVENcheckSEVEN.visible = false;
OFbandSEVENcheckEIGHT.visible = false;
OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, checkbuttonONE, false, 0, true);
function checkbuttonONE(e:Event):void
if( OFbandSEVENcheckONE.visible == true){
OFbandSEVENcheckONE.visible = false;
}else{
OFbandSEVENcheckONE.visible = true;
OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, checkbuttonTWO, false, 0, true);
function checkbuttonTWO(e:Event):void
if( OFbandSEVENcheckTWO.visible == true){
OFbandSEVENcheckTWO.visible = false;
}else{
OFbandSEVENcheckTWO.visible = true;
OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, checkbuttonTHREE, false, 0, true);
function checkbuttonTHREE(e:Event):void
if( OFbandSEVENcheckTHREE.visible == true){
OFbandSEVENcheckTHREE.visible = false;
}else{
OFbandSEVENcheckTHREE.visible = true;
OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, checkbuttonFOUR, false, 0, true);
function checkbuttonFOUR(e:Event):void
if( OFbandSEVENcheckFOUR.visible == true){
OFbandSEVENcheckFOUR.visible = false;
}else{
OFbandSEVENcheckFOUR.visible = true;
OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, checkbuttonFIVE, false, 0, true);
function checkbuttonFIVE(e:Event):void
if( OFbandSEVENcheckFIVE.visible == true){
OFbandSEVENcheckFIVE.visible = false;
}else{
OFbandSEVENcheckFIVE.visible = true;
OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, checkbuttonSIX, false, 0, true);
function checkbuttonSIX(e:Event):void
if( OFbandSEVENcheckSIX.visible == true){
OFbandSEVENcheckSIX.visible = false;
}else{
OFbandSEVENcheckSIX.visible = true;
OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, checkbuttonSEVEN, false, 0, true);
function checkbuttonSEVEN(e:Event):void
if( OFbandSEVENcheckSEVEN.visible == true){
OFbandSEVENcheckSEVEN.visible = false;
}else{
OFbandSEVENcheckSEVEN.visible = true;
OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, checkbuttonEIGHT, false, 0, true);
function checkbuttonEIGHT(e:Event):void
if( OFbandSEVENcheckEIGHT.visible == true){
OFbandSEVENcheckEIGHT.visible = false;
}else{
OFbandSEVENcheckEIGHT.visible = true;
// SHOW FINAL SCREEN===============================================
function OFbandSEVENCOMPLETE(e:Event):void
if( OFbandSEVENcheckONE.visible == true && OFbandSEVENcheckTWO.visible == true && OFbandSEVENcheckTHREE.visible == true&& OFbandSEVENcheckFOUR.visible == true && OFbandSEVENcheckFIVE.visible == true && OFbandSEVENcheckSIX.visible == true && OFbandSEVENcheckSEVEN.visible == true && OFbandSEVENcheckEIGHT.visible == true){
gotoAndPlay(12);
stop();Yes all are on one frame, the movieclips for the checkmark and the buttons that trigger the checkmark. I put your code in and my ubttons still trigger the checkmarks to go visible but there is nothing signalling the end. basically just need it to go to frame 12. Here's my mods below
OFbandSEVENclose.addEventListener(MouseEvent.CLICK, OnFRYERbandSEVENclose);
function OnFRYERbandSEVENclose(e: MouseEvent): void
gotoAndPlay(1);
OFbandSEVENcheckONE.visible = false;
OFbandSEVENcheckTWO.visible = false;
OFbandSEVENcheckTHREE.visible = false;
OFbandSEVENcheckFOUR.visible = false;
OFbandSEVENcheckFIVE.visible = false;
OFbandSEVENcheckSIX.visible = false;
OFbandSEVENcheckSEVEN.visible = false;
OFbandSEVENcheckEIGHT.visible = false;
var checks:Array = new Array(OFbandSEVENcheckONE, OFbandSEVENcheckTWO, OFbandSEVENcheckTHREE, OFbandSEVENcheckFOUR, OFbandSEVENcheckFIVE, OFbandSEVENcheckSIX, OFbandSEVENcheckSEVEN, OFbandSEVENcheckEIGHT);
OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, doCheck); //buttons to click that trigger the checkbox movieclips
OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, doCheck);
OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, doCheck);
OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, doCheck);
OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, doCheck);
OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, doCheck);
OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, doCheck);
OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, doCheck);
function doCheck(e:MouseEvent):void
var sel:Boolean = true;
for(var i:int = 0; i < checks.length; i++){
if(!checks[i].visible){
sel = false;
break;
if(sel){
trace("all selected");
OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, checkbuttonONE, false, 0, true);
function checkbuttonONE(e:Event):void
if( OFbandSEVENcheckONE.visible == true){
OFbandSEVENcheckONE.visible = false;
}else{
OFbandSEVENcheckONE.visible = true;
OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, checkbuttonTWO, false, 0, true);
function checkbuttonTWO(e:Event):void
if( OFbandSEVENcheckTWO.visible == true){
OFbandSEVENcheckTWO.visible = false;
}else{
OFbandSEVENcheckTWO.visible = true;
OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, checkbuttonTHREE, false, 0, true);
function checkbuttonTHREE(e:Event):void
if( OFbandSEVENcheckTHREE.visible == true){
OFbandSEVENcheckTHREE.visible = false;
}else{
OFbandSEVENcheckTHREE.visible = true;
OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, checkbuttonFOUR, false, 0, true);
function checkbuttonFOUR(e:Event):void
if( OFbandSEVENcheckFOUR.visible == true){
OFbandSEVENcheckFOUR.visible = false;
}else{
OFbandSEVENcheckFOUR.visible = true;
OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, checkbuttonFIVE, false, 0, true);
function checkbuttonFIVE(e:Event):void
if( OFbandSEVENcheckFIVE.visible == true){
OFbandSEVENcheckFIVE.visible = false;
}else{
OFbandSEVENcheckFIVE.visible = true;
OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, checkbuttonSIX, false, 0, true);
function checkbuttonSIX(e:Event):void
if( OFbandSEVENcheckSIX.visible == true){
OFbandSEVENcheckSIX.visible = false;
}else{
OFbandSEVENcheckSIX.visible = true;
OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, checkbuttonSEVEN, false, 0, true);
function checkbuttonSEVEN(e:Event):void
if( OFbandSEVENcheckSEVEN.visible == true){
OFbandSEVENcheckSEVEN.visible = false;
}else{
OFbandSEVENcheckSEVEN.visible = true;
OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, checkbuttonEIGHT, false, 0, true);
function checkbuttonEIGHT(e:Event):void
if( OFbandSEVENcheckEIGHT.visible == true){
OFbandSEVENcheckEIGHT.visible = false;
}else{
OFbandSEVENcheckEIGHT.visible = true;
// SHOW FINAL SCREEN===============================================
function OFbandSEVENCOMPLETE(e:Event):void
if( OFbandSEVENcheckONE.visible == true && OFbandSEVENcheckTWO.visible == true && OFbandSEVENcheckTHREE.visible == true&& OFbandSEVENcheckFOUR.visible == true && OFbandSEVENcheckFIVE.visible == true && OFbandSEVENcheckSIX.visible == true && OFbandSEVENcheckSEVEN.visible == true && OFbandSEVENcheckEIGHT.visible == true){
gotoAndPlay(12);
stop(); -
Add a for each script to loop through HTTPService?
I'm using Flash Builder 4 with the Flex 4.1 SDK. I want to add a "for each" script to loop through my HTTPService XML file so only each nepName displays only once in my dropdown list. In my XML file I have multiple records associated with nepName. I would like ALL the records associated with each nepName to populate in my datagrid when it is selected from the dropdown. Currently in my dropdown there is a nepName entry for each XML tag. I hope I was able to explain that well enough. I'll try to put my code below so you can see everything I'm working with.
MXML:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:esri="http://www.esri.com/2008/ags"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
creationComplete="nepInfo.send()">
<s:layout>
<s:VerticalLayout horizontalAlign="center" paddingTop="25"/>
</s:layout>
<fx:Declarations>
<s:HTTPService id="nepInfo" url="http://www.epa.gov/owow/estuaries/nep_info.xml"/>
<!--s:RadioButtonGroup id="optiongroup"/-->
</fx:Declarations>
<s:Panel title="NEP Project Information">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:HGroup verticalAlign="middle">
<mx:Form x="188" y="34" width="338">
<mx:FormItem label="Search for NEP Information:">
<s:DropDownList enabled="true" id="dropDownList" prompt="Select NEP" dataProvider="{nepInfo.lastResult.records.record}" labelField="nepName">
</s:DropDownList>
</mx:FormItem>
</mx:Form>
</s:HGroup>
<mx:DataGrid id="resultsGrid"
dataProvider="{dropDownList.selectedItem}"
visible="{dropDownList.selectedItem != null}" x="20" y="62" width="1166" height="620">
<mx:columns>
<mx:DataGridColumn dataField="projectName" headerText="Project Name" wordWrap="true"/>
<mx:DataGridColumn dataField="projectDescription" headerText="Project Description" wordWrap="true"/>
<mx:DataGridColumn dataField="acres" headerText="Acres" wordWrap="true"/>
<mx:DataGridColumn dataField="habitatDescription" headerText="Habitat Description" wordWrap="true"/>
<mx:DataGridColumn dataField="neportCategory" headerText="Habitat Category" wordWrap="true"/>
<mx:DataGridColumn dataField="restorationType" headerText="Restoration Type" wordWrap="true"/>
<mx:DataGridColumn dataField="leadPartner" headerText="Lead Partner" wordWrap="true"/>
</mx:columns>
</mx:DataGrid>
</s:Panel>
</s:Application>
XML: http://www.epa.gov/owow/estuaries/nep_info.xml
Thank you in advance for your help!
-Alison($file, pwd);Assuming "pwd" is meant as the current directory, here a small example :
TEST@db102 SQL> create or replace procedure test_proc (p1 varchar2, p2 varchar2)
2 is
3 begin
4 dbms_output.put_line (p1||' '||p2);
5 end;
TEST@db102 SQL> /
Procedure created.
TEST@db102 SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
$ ls -l /tmp/test/*.sql
-rw-r--r-- 1 ora102 dba 69 Apr 18 23:23 /tmp/test/file1.sql
-rw-r--r-- 1 ora102 dba 112 Apr 18 23:23 /tmp/test/file2.sql
-rw-r--r-- 1 ora102 dba 120 Apr 18 23:23 /tmp/test/file3.sql
$ cat test_proc.sh
DIR=/tmp/test
cd $DIR
ls *.sql | while read file
do
echo "Processing file $file"
sqlplus -s test/test << EOF
set feed off
set pages 0
set serveroutput on
exec test_proc('$file', '`pwd`');
exit
EOF
done
$ ./test_proc.sh
Processing file file1.sql
file1.sql /tmp/test
Processing file file2.sql
file2.sql /tmp/test
Processing file file3.sql
file3.sql /tmp/test
$ -
Write the syntax for declaring table control in dialog programming?
1) Write the syntax for declaring table control in dialog programming?
2) Write the syntax to call a selection screen in a modal dialog box?hi,
check this code for table control.
DIALOG PROGRAMMING
TABLE CONTROL
IN SE51
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITVBAK WITH CONTROL TABCTRL. ## TABLE CONTROL NAME
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
LOOP AT ITVBAK.
ENDLOOP.
IN PAI FLOW LOGIC
PROGRAM YMODULE_PR4 .
TABLES : KNA1, VBAK.
DATA : BEGIN OF ITVBAK OCCURS 0,
VBELN LIKE VBAK-VBELN,
ERDAT LIKE VBAK-ERDAT,
ERNAM LIKE VBAK-ERNAM,
NETWR LIKE VBAK-NETWR,
END OF ITVBAK.
CONTROLS : TABCTRL TYPE TABLEVIEW USING SCREEN '0100'.
TO ACTIVATE SCROLL BAR
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
SELECT VBELN ERDAT ERNAM NETWR
FROM VBAK
INTO TABLE ITVBAK
WHERE KUNNR = KNA1-KUNNR.
TABCTRL-LINES = SY-DBCNT.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT -
Code to write syntax for JOB submit ( Please answer ASAP)
Hi,
I need sytax to submit a job
Right now I am using this code to send 4 parameters.
I need to send these 4 in a structure.
submit Ztestjob USER sy-uname
via job p_jobnm
number p_jobcount
with afko-rsnum eq afko-rsnum
with aufnr_d eq aufnr_d
with sernr_d eq sernr_d
with p_lmnga eq p_lmnga
AND RETURN.
So I have to pass a structure of values into the BGprogram through a submit and do a couple of loops in the BGPROGRAM.
I need the syntax for submit .
I also need to know how to catch the structure with values in the BGPROGRAM.
Anyone please answer ASAP
Message was edited by:
ramana peddu
Message was edited by:
ramana pedduHi,
<u>SUBMIT</u>
Calls an executable program of type 1.
Syntax
SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>]
[LINE-SIZE <width>]
[LINE-COUNT <length>].
Calls the program <rep>. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when <rep> has finished running. The other additions control the selection screen and set attributes of the default list in the called program.
Regards,
Bhaskar -
Do you need to have an array within an arraycollection for
the arraycollection to run the filterfunction properly?
<mx:ArrayCollection id="arrColl">
<mx:source>
<mx:Array>
<mx:Object name="ColdFusion" value="0.00" />
<mx:Object name="Dreamweaver" value="0.12" />
<mx:Object name="Fireworks" value="1.01" />
<mx:Object name="Flash" value="0" />
<mx:Object name="Flash Player" value="-0.00" />
<mx:Object name="Flex" value="0.00" />
<mx:Object name="Illustrator" value="2.92" />
<mx:Object name="Lightroom" value="0.32" />
<mx:Object name="Photoshop" value="0.06" />
</mx:Array>
</mx:source>
</mx:ArrayCollection>"nikos101" <[email protected]> wrote in
message
news:gb07gv$9v8$[email protected]..
> Do you need to have an array within an arraycollection
for the
> arraycollection
> to run the filterfunction properly?
>
> <mx:ArrayCollection id="arrColl">
> <mx:source>
> <mx:Array>
> <mx:Object name="ColdFusion" value="0.00" />
> <mx:Object name="Dreamweaver" value="0.12" />
> <mx:Object name="Fireworks" value="1.01" />
> <mx:Object name="Flash" value="0" />
> <mx:Object name="Flash Player" value="-0.00" />
> <mx:Object name="Flex" value="0.00" />
> <mx:Object name="Illustrator" value="2.92" />
> <mx:Object name="Lightroom" value="0.32" />
> <mx:Object name="Photoshop" value="0.06" />
> </mx:Array>
> </mx:source>
> </mx:ArrayCollection>
You have to have an Array within the ArrayCollection for it
to do anything,
since ArrayCollection is just a wrapper for Array... -
Hi,
can any one help me out for populating the appended field to data source.
<u><b>My requirement:</b></u> I have enhanced the data source 2lis_11_vahdr by appending the field zzmatnr in to its extract structure, Now i want to populate this field from the field available in the MARC table. so can any one help me out the whole code for this?
apart from this i have one another question that is if i append this field to the communication structure( like mcvbak, mcvbap... etc) then how we will populate this field.
and what is the exact difference between appending the field to the extract structure and appending the field to the communication structure.
Thanks1)Just a sample code to add old material code(zzoldmatno) to the data source
'2LIS_02_S012'.
The function module is EXIT_SAPLRSAP_001.
You have write the code in the include zxrsau01.
when '2LIS_02_S012' .
data : it_s012biws like s012biws .
tables : mara .
loop at c_t_data into it_s012biws .
l_tabix = sy-tabix.
select single bismt from mara into mara-bismt where matnr =
it_s012biws-matnr.
if sy-subrc = 0.
it_s012biws-zzoldmatno = mara-bismt .
endif.
clear mara-bismt .
modify c_t_data from it_s012biws index l_tabix.
endloop.
2) Replicate the datasource.
3) Now with the above code datasource R/3 part is finished.To receive the new column at the BW end you have to add a column to your ODS or infocube as well to the communication structure(say ZOLDMAT in my case) and map the new field(ZZOLDMATNO) to the field (ZOLDMAT).
4) Activate the Transfer Rule.
Hope this helps.
Regs
Gopi. -
BADI for populating virtual Key Figure : Exception Occurs
Hello,
I am using BADI for populating virtual Key Figure.
Since my info provider in a Cube , query is built on it with addition to Virtual Key figure.
I have used select statement for retrieving data from cube as input for the variables in BADI.
But after debugging it , it stop or exception occurs at the select statement.
Need help for the same.
My code : Cube name : ZGMR_C01
DEFINE ******
method IF_EX_RSR_OLAP_BADI~DEFINE.
DATA: l_s_chanm TYPE rrke_s_chanm,
l_kyfnm TYPE rsd_kyfnm.
FIELD-SYMBOLS:
<l_s_chanm> TYPE rrke_s_chanm.
Insert Code
CASE i_s_rkb1d-infocube.
WHEN 'ZGMR_C01'.
l_s_chanm-chanm = 'ZEC_PLOAD'.
l_s_chanm-mode = rrke_c_mode-read.
APPEND l_s_chanm TO c_t_chanm.
l_s_chanm-chanm = 'ZCOM_BLM'.
l_s_chanm-mode = rrke_c_mode-read.
APPEND l_s_chanm TO c_t_chanm.
APPEND 'ZVKF_TTBL' TO c_t_kyfnm.
ENDCASE.
endmethod.
DEFINE ******
COMPUTE *****
method IF_EX_RSR_OLAP_BADI~COMPUTE.
FIELD-SYMBOLS <fs_ZVKF_TTBL> TYPE ANY. -
Virtual Key Figure
FIELD-SYMBOLS <fs_ZEC_PLOAD> TYPE ANY. -
Variable 1
FIELD-SYMBOLS <fs_ZCOM_BLM> TYPE ANY. -
Variable 2
DATA: l_ZVKF_TTBL TYPE /BIC/OIZVKF_TTBL.
TYPES : BEGIN OF TY_ITAB,
PLOAD TYPE /BIC/OIZEC_PLOAD,
BLMONTH TYPE /BIC/OIZCOM_BLM,
TOTBL TYPE /BIC/OIZKF_TOTBL,
END OF TY_ITAB.
data: IT_ITAB TYPE STANDARD TABLE OF TY_ITAB,
WA_ITAB type TY_ITAB.
data: IT_ITAB1 TYPE STANDARD TABLE OF TY_ITAB,
WA_ITAB1 type TY_ITAB.
ASSIGN COMPONENT P_KYF_ZVIR_TOT OF STRUCTURE c_s_data
TO <fs_ZVKF_TTBL>.
ASSIGN COMPONENT P_CHA_ZVIR_POL OF STRUCTURE c_s_data
TO <fs_ZEC_PLOAD>.
ASSIGN COMPONENT P_CHA_ZVIR_MON OF STRUCTURE c_s_data
TO <fs_ZCOM_BLM>.
break-point id z_routines.
SELECT /BIC/DZGMR_C011SID_ZEC_PLOAD /BIC/DZGMR_C01TSID_0CALMONTH /BIC/VZGMR_C01F~/BIC/ZKF_TOTBL
FROM /BIC/VZGMR_C01F
INNER JOIN /BIC/DZGMR_C011 ON /BIC/VZGMR_C01FKEY_ZGMR_C011 = /BIC/DZGMR_C011DIMID
INNER JOIN /BIC/DZGMR_C01T ON /BIC/VZGMR_C01FKEY_ZGMR_C01T = /BIC/DZGMR_C01TDIMID
INTO TABLE IT_ITAB
WHERE /BIC/DZGMR_C011~SID_ZEC_PLOAD = <fs_ZEC_PLOAD>
AND /BIC/DZGMR_C01T~SID_0CALMONTH = <fs_ZCOM_BLM>.
break-point id z_routines.
LOOP AT IT_ITAB INTO WA_ITAB.
WA_ITAB1-PLOAD = WA_ITAB-PLOAD.
WA_ITAB1-BLMONTH = WA_ITAB-BLMONTH.
WA_ITAB1-TOTBL = WA_ITAB-TOTBL.
COLLECT WA_ITAB1 INTO IT_ITAB1.
CLEAR : WA_ITAB1 , WA_ITAB.
ENDLOOP.
break-point id z_routines.
IF sy-subrc EQ 0.
<fs_ZVKF_TTBL> = WA_ITAB1-TOTBL.
endif.
endmethod.
COMPUTE *****Exception :
Exception CX_SY_NO_HANDLER triggered
An exception with the type CX_SY_OPEN_SQL_DB occured, but was not handled
This comes when i debug the BADI. -
Syntax for using a variable in an equation.
Hi all,
Simple question here. What is tha appropriate syntax for using a variable in a calculation equation. Specifically, I am taking an established curve fitting equation from my channels and trying to calculate it over a lineargenerated data set to extend the curve beyond the original data sample. Here is the small portion of script I have that will not work. Thanks for any help.
dim a,b,c
a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")Hi Gloorious,
I am using diadem script. In my example above, for the equation, if I substitue a,b,and c with numerical values, the script runs just fine and the formula executes as desired. Is there a way to place the variables there instead as I have tried to do (I was hoping it was just a syntax issue) or do I have to approach it a completely different way?
This script will execute just fine:
Call Calculate("Ch(""[5]/Air Consumption LG"")= 4 + Ch(""[5]/LinearGenerated"")*5+6*ch(""[5]/LinearGenerated"")^2")
but this will not:
dim a,b,c
a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2") -
Flex 2 Plugin for QTP - Trial Version?
We are trying to automate an application that was developed in Flex Builder 2. We downloaded the Flex 2 plug in from Adobe site, but it is asking for serials while trying to install. Is there any way we can get a trial version of Flex 2 Plugin for QTP?
Thanks,
SenthilHi Chikkichintu,
According to my knowledge Flex Builder don't have any plug-in's for QTP 10.0 (ofcourse am not a Tester). You can make use of FLEX MONKEY
Try this.... This may help you..
http://www.gorillalogic.com/flexmonkey
Thanks,
Pradeep -
Syntax for Evaluate function in OBIEE
Hi
I have browsed through the docs but couldn't find syntax for Evaluate function. Could someone pass me the full syntax and if possible a helpful example against essbase.
ThanksHi
definitely
syntax:- EVAULATE('your db function(%1,%2)', parameter list)
here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
following exapmples are for ORACLE db,
ex1: EVALUATE('upper(%1)', 'kishore kumar') gives the result as -> KISHORE KUMAR
ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
you also can call the user-defined functions through evaulate
EVALUATE('functioname(%1,%2), column1, column2)
the above function has 2 parameters to be inputted
Thanks & Regards
Kishore Guggilla
Edited by: Kishore Guggilla on Jan 16, 2009 11:00 PM -
SQL Syntax for hour/date range in Query
Hi
I am trying to set up an query for sales order documents procesed in the last 30 minutes to be set as an alert to be run every 30 minutes to the sales manager. I am having difficulty getting the syntax for the last 30 minutes
Any suggestions?
Davidhi,
I'm not sure query is correct,but u can modify it futher to get correct one.
SELECT T0.DocNum, T0.DocDate, T0.CardName, T0.DocTotal FROM ORDR T0 WHERE DateDiff(dd, T0.DocDate ,getdate()) = 0 and
DateDiff(Minute,T0.DocTime,' ') <= 30
Jeyakanthan -
FAGLL03 : Submit syntax for dynamic selections
Hi Experts,
My z report contains following fields in selction screen.
1 . G/ L account
2. Comapny code
3. posting date
4. document type
5. layout
In my z report i used following syntax for passing selection screen values to standard program and getting data.
SUBMIT FAGL_ACCOUNT_ITEMS_GL
WITH SD_SAKNR IN S_SAKNR
WITH SD_BUKRS IN S_BUKRS
WITH X_OPSEL EQ ' '
WITH X_CLSEL EQ ' '
WITH X_AISEL EQ 'X'
WITH SO_BUDAT IN S_BUDAT
WITH PA_VARI EQ P_VAR
EXPORTING LIST TO MEMORY
AND RETURN.
The above syntax is not working for dynamic selection field ( document type ), entire document types data is fetching from standard program. I want to fetch document type data based on my z report selection values for document type field.
Expect for document type field , submit syntax is working.
kindly provide submit syntax for my above requirement .
Any suggestions from experts....
thanks & regards,
Hari priya
Edited by: Hari Priya on Aug 24, 2009 4:33 PMHi,
Try like this.
call function 'RS_REFRESH_FROM_SELECTOPTIONS'
exporting
curr_report = 'FAGL_ACCOUNT_ITEMS_GL'
tables
selection_table = i_sel[].
Fill your profit center values in i_sel
Submit FAGL_ACCOUNT_ITEMS_GL with selection-table i_sel and return
WITH FREE SELECTIONS TEXPR AND RETURN
Regards,
Shamma -
Syntax for how to call method of one comp in other comp wd java.
Let us assume,
there is method1 in view1 comp1.
tell me syntax for calling method 1 in view2 comp2
thanks in advance.
Edited by: madhu1011 on Nov 9, 2011 11:31 AMHi Madhu,
This is the situation:
comp1-> method 1 , view1
comp2-> view2
You need to access method1 in view2 of comp2.
For that, do the following steps:
1.) First create a method (for eg: method1) in comp1 (under implementation of view1).
eg: public void method1(){
<......some logic...>
2.)Save the meta data.
3.) In comp2, you will find an option called used components. In that right click and add the component comp2. (Carefully select comp1 itslef).
4.)Save the meta data.
5.) Then go to view2 of comp2 and take implementaion part and right the following logic in wddoinit() (or any other standard or custom method).
wdThis.wdGetComp2Interface().getMethod("method1");
By this way, we can access the method1 of comp1 in comp2.
Regards,
Jithin -
Authentication syntax for HTTP GET method using TCP functions in Labview on linux
Hi,
Currently, I am trying to communicate to web server. I have Labview installed on a Linux machine. The HTTP function blocks and other labview functions do not work. Hence, I am building a HTTP code string using TCP functions (port 80) to talk to the web server. I am successfully able to fetch a response from web sites (example www.ni.com) from my vi. However, when I try to communicate to my web server, it does not work. It requires an authentication. I am able to open http://ipaddress in my browser from my machine using username and password. Can someone help with Authentication string requirement for GET method?
so far the string is:
GET /index/ HTTP/1.1
Host: http://xx.xx.xx.xxAn easy option would be to try http://userassword@server syntax for the URL.
Else I posted a Twitter fetcher once (won't work anymore since Twitter moved to Oauth authentication) at LAVA. Based on code from @cloew.
The code is part of this LLB.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Maybe you are looking for
-
Hi everyone, OS 10.6, CS5 (7.04). (I also have access to CS5.5 if necessary) Here's the situation: I'm laying out a document that's set up like a calendar with a horizontal spine. Master spread has two facing pages. I used the Page Tool to move the r
-
Uninstall iTunes=delete music??
Hi everyone, This is probably a stupid question, but if I have to un-install iTunes, when I re-install it will all my music still be there or will it all be erased? Thanks!
-
How to open .WMV attachments
How do I open .WMV attachments that arrive in mail messages?
-
How to create multiplot with PlotHelper.VI 3d surface.VI
I selected PlotHelper.vi and 3D surface.vi because I could (according to the Help info) do " Successive calls to this VI with the same 3D Plot Input with different Plot ID values will create multiple plots"I attached my testing VI. The radius of eac
-
Syncing using only 2 nokia phones - possible?
Hi, Using only 2 nokia telephones I want to be able to sync my phone calender and the calender of my wife. But I don't want use any PC application. Once a day (when the phones can connect using bluetooth) I need to sync and see if we have any conflic