Date function update
Hi,
Is there a way to update a Date field by one sec? For example if my date is 03-Mar-2003 9:52:18, how can I update it so that the final result after update is 03-Mar-2003 9:52:19?
Thanks in advance
Arun
Why do you need to change the clock by 1 second?
Similar Messages
-
Inverte - Date function in Update Rules
Hi All,
We are writing a code for converting the data into a date field using INVERTE-DATE function.
The field GDATU in the Table TCURR needs to be converted.
GDATU - Date As of Which the Exchange Rate Is Effective. This is not in proper format, hence we used the below code to converte in to a proper one.
TABLES: TCURR.
DATA: tcurr_tab TYPE TABLE OF tcurr.
data: date_normal type sy-datum.
FIELD-SYMBOLS
<tcurr_wa> TYPE tcurr.
SELECT gdatu FROM tcurr INTO corresponding fields of
TABLE tcurr_tab.
SORT tcurr_tab BY gdatu.
LOOP AT tcurr_tab ASSIGNING <tcurr_wa>.
break-point.
CONVERT INVERTED-DATE <tcurr_wa>-gdatu
INTO DATE date_normal. "move that to normal date field
write:/ date_normal. "take a normal date field
ENDLOOP.
when I check for this code... it gives us the below error message
E:Variants with INVERTED-DATE are no longer supported in the OO context.
Use TRANSLATE ... USING '1928374664738291' instead
Can anyone suggest me what could be done to solve this issue.
Thanks,
MaddyHi Maddy,
If you do F1 help for 'Inverted-Date' you will get the reason as:
Cannot Convert Dates
The statements CONVERT DATE and CONVERT INVERTED DATE are not allowed.
An error message occurs in ABAP Objects if the following syntax is used:
CONVERT DATE f1 INTO INVERTED-DATE f2.
CONVERT INVERTED-DATE f2 INTO DATE f1.
Correct syntax:
CONSTANTS comp_nine(20) TYPE c VALUE '09182736455463728190'.
f2 = f1.
TRANSLATE f2 USING comp_nine.
f1 = f2.
TRANSLATE f1 USING comp_nine.
Reason:
Date conversions are used mainly to influence the sort sequence in in internal tables. This function can be replaced by the additions ASCENDING or DESCENDING of the statement SORT. If required, you can easily program the nines complement yourself using TRANSLATE.
Regards,
Saba -
Access master data in update rules
Hi,
I try to calculate a weight in my update rules. Therefore I need the product weight and the number of peaces. I try to read the product weight from master data. The problem is, that it always calculates zero as the result. Is it possible to read master data in update rules?
If I try to calculate the weight in the transfer rules, I get the message in the monitor, that the transfer rules don't finish. Do you have an idea what to do?
Regards,
GabiHi Robert,
here is my code in the update rule.
fill the internal table "MONITOR", to make monitor entries
DATA: l_s_errorlog TYPE RSMONITOR.
data: temp_prod_weight type /BIC/PZL2_P_ID.
general values
RESULT = COMM_STRUCTURE-/BIC/ZL2_POTMW. "weight
UNIT = COMM_STRUCTURE-UNIT_OF_WT.
RETURNCODE = 0.
ABORT = 0.
calculate weight from master data, if it is zero
IF COMM_STRUCTURE-/BIC/ZL2_POTMW = 0
or COMM_STRUCTURE-/BIC/ZL2_POTMW = '0'
or COMM_STRUCTURE-/BIC/ZL2_POTMW is initial.
select single /BIC/ZL2_NETW UNIT_OF_WT
from /BIC/PZL2_P_ID
into corresponding fields of temp_prod_weight
where /BIC/ZL2_P_ID = COMM_STRUCTURE-/BIC/ZL2_P_ID
and objvers = 'A'.
if sy-subrc <> 0.
l_s_errorlog-MSGTY = 'I'.
append l_s_errorlog to MONITOR.
RESULT = 0.
abort, if calculation is not possible
ABORT = 1.
else.
RESULT = temp_prod_weight-/BIC/ZL2_NETW
COMM_STRUCTURE-/BIC/ZL2_POTMQ.
UNIT = temp_prod_weight-UNIT_OF_WT.
endif.
ENDIF.
convert unit
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = RESULT
NO_TYPE_CHECK = 'X'
ROUND_SIGN = ' '
UNIT_IN = COMM_STRUCTURE-UNIT_OF_WT
UNIT_OUT = 'KG'
IMPORTING
ADD_CONST =
DECIMALS =
DENOMINATOR =
NUMERATOR =
OUTPUT = RESULT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10
IF SY-SUBRC <> 0.
l_s_errorlog-MSGTY = 'I'.
append l_s_errorlog to MONITOR.
UNIT = COMM_STRUCTURE-UNIT_OF_WT.
RESULT = COMM_STRUCTURE-/BIC/ZL2_POTMW.
ELSE.
UNIT = 'KG'.
ENDIF.
I'm loading via PSA, but I have problems to debug the code. If I set a break point in my code (command break-point), I can't stop at it.
Thanks,
Gabi -
Hello,
Currently I'm working with excel SAP interfacing. For this I am using VBA to call different BAPI functions.
I have already some interface scripts working, however I have also one which I cannot discover what I'm missing.
The VBA code is to reach BAPI_ACC_DOCUMENT_POST
My error is ---> FI/CO interface: Inconsistent FI/CO document header data for updating
So I'm appealing to you SAP bapi VBA gurus whether you have any ideas how to fix my issue.
I'm attaching below my code for you to review:
Option Explicit
' Declaration for the necessary objects
Dim objBAPICortrol, objConnection, objCreateMaterial, objReturn As Object
Dim objPRFCT, objNTXT, objDTXT As Object
Dim vLastRow, vRows As Integer
Dim objMaterial1, objMaterial2, retMess As Object
Sub Batch()
' Getting the last filled Row in Column
vLastRow = Cells(Rows.Count, "A").End(xlUp).Row
' Setting the necessary variables for R/3 connection
Set objBAPICortrol = CreateObject("SAP.functions")
Set objConnection = objBAPICortrol.Connection
objConnection.System = "SYSTEM NAME"
objConnection.Client = "Client number"
objConnection.user = "USERNAME"
objConnection.Password = "PASSWORD"
objConnection.Language = "EN"
' Establish a connection
If objConnection.logon(0, False) <> False Then
'MsgBox "Connection Established"
End If
On Error Resume Next
' Assign the Parameters
Set objCreateMaterial = objBAPICortrol.Add("BAPI_ACC_DOCUMENT_POST")
Set objMaterial = objCreateMaterial.Exports.Item("DOCUMENTHEADER")
Set objMaterial1 = objCreateMaterial.Tables.Item("ACCOUNTGL")
Set objMaterial2 = objCreateMaterial.Tables.Item("CURRENCYAMOUNT")
'Set Values
objMaterial.Value("USERNAME") = "USERNAME"
objMaterial.Value("HEADER_TXT") = "BAPITEST"
objMaterial.Value("COMP_CODE") = "0001"
objMaterial.Value("PSTNG_DATE") = "20140506"
objMaterial.Value("TRANS_DATE") = "20140506"
objMaterial.Value("DOC_DATE") = "20140506"
objMaterial.Value("FISC_YEAR") = "2014"
objMaterial.Value("DOC_TYPE") = "SA"
objMaterial.Value("REF_DOC_NO") = "BAPITEST"
objMaterial.Value("FIS_PERIOD") = "00"
objMaterial1.Rows.Add
objMaterial1.Value(1, "ITEMNO_ACC") = "1"
objMaterial1.Value(1, "GL_ACCOUNT") = "0007180000"
objMaterial1.Value(1, "ITEM_TEXT") = "BAPITEST1"
objMaterial1.Value(1, "DOC_TYPE") = "SA"
objMaterial1.Value(1, "COMP_CODE") = "0001"
objMaterial1.Value(1, "PROFIT_CTR") = "AZ1111" ---->'profit center is normally having 10CHARS but as there are letters I'm not using zeros at the beginning
objMaterial1.Value(1, "ITEMNO_ACC") = "2"
objMaterial1.Value(1, "GL_ACCOUNT") = "0007180000"
objMaterial1.Value(1, "ITEM_TEXT") = "BAPITEST1"
objMaterial1.Value(1, "DOC_TYPE") = "SA"
objMaterial1.Value(1, "COMP_CODE") = "0001"
objMaterial1.Value(1, "PROFIT_CTR") = "AZ1111"
objMaterial2.Rows.Add
objMaterial2.Value(1, "ITEMNO_ACC") = "1"
objMaterial2.Value(1, "CURRENCY") = "EUR"
objMaterial2.Value(1, "AMT_DOCCUR") = "-1.00"
objMaterial2.Value(1, "ITEMNO_ACC") = "2"
objMaterial2.Value(1, "CURRENCY") = "EUR"
objMaterial2.Value(1, "AMT_DOCCUR") = "1.00"
' Function call
objCreateMaterial.call
Set objReturn = objBAPICortrol.Add("BAPI_TRANSACTION_COMMIT")
objReturn.call
Set retMess = objCreateMaterial.Tables.Item("RETURN")
If retMess Is Nothing Then
MsgBox retMess.Value(1, "MESSAGE")
End If
' Get return parameters & display in excel
Set objReturn = objCreateMaterial.Tables("RETURN")
ActiveSheet.Cells(5, 1) = retMess.Value(2, "MESSAGE")
End Subafter some searching I've discovered that once I'm creating next line for accounting document it is not working properly.
When I debug the BAPI in SE37 after inserting new line it is asking for GL account input, however if I run it using VBA and delete the account from the code, the return message is not giving me any error that GL account is missing.
I appreciate any ideas. -
BPC-Add in "Action" between 'Send data" and "Update Tables"
Hi all,
After the click of "Send data" ,I want to take some CHECK before the data is updated in Database tables.
Note that this kind of CHECKs are much beyond the function of VALIDATIONs( standard function delivered by BPC).
So could I write some scripts( in v 5.1) to do such tasks. And how to get the eaxct Dimension/Memeber/Values in this input schedule, since I will base on these data to take checking ?
Thanks very much.Yes this is done all the time.
Create a button on the template and add a macro behind it.
Use one of the BPC macros that suite your needs to send data.
You can find more information in the online help or the BPC office user guide.
MNU_eSUBMIT_REFRESHINPUTCELL Refreshes EvSND - cells in an input schedule.
MNU_eSUBMIT_REFSCHEDULE_SHEET_NOACTION - Sends data without clearing or refreshing.
MNU_eSUBMIT_REFSCHEDULE_SHEET_CLEAR - Sends data and clears input cells.
MNU_eSUBMIT_REFSCHEDULE_SHEET_REFRESH - Sends data and refreshes the worksheet.
MNU_eSUBMIT_REFSCHEDULE_SHEET_CLEARANDREFRESH - Sends data and clears and refreshes the worksheet.
MNU_eSUBMIT_REFSCHEDULE_BOOK_NOACTION - Sends data without clearing or refreshing the worksheet.
This is just a few.
Also;
BEFORE_SEND
You use the BEFORE_SEND function to execute a custom operation before OutlookSoft for Excel sends
data.
Function BEFORE_SEND(Argument As String)
MsgBox Argument
BEFORE_SEND = True
End Function
AFTER_SEND
You use the AFTER_SEND function to execute a custom operation after OutlookSoft for Excel sends data.
Function AFTER_SEND(Argument As String)
MsgBox Argument
AFTER_SEND = True
End Function -
Using user hold data function in FB65
Dear Guru's
In FB65, I input amount, gl account, amount in doc currency, calculate tax tax box and tax type. Then I select Hold data function. When I exit FB65 and re-enter again, all saved data is available except for the calculate tax tick box and tax type.
Is there anyway to get this hold as well?
Regards
ShakeerHi,
This is standared functionality when you process final account document from Hold Doc user should Select Tax & Process the same.
Clear Information about Hold Doc
"With Hold Document, data which has been entered can be saved temporarily in order to continue the entries at a later time. Documents held by the system do not have to be complete. No account balances are updated and the data of the
document is not available for evaluation. No document number is assigned. The person making the entries is asked to name the document after selecting the Hold Document function. The document can be found under this name at a later time."
Regards
Viswa -
Hello Experts,
I have a question as to how the BPC 7.0 SP6 NetWeaver version "Import Master Data" function behaves when importing updates.
Currently I have a dimension that I imported master data to because it exceeded the 65K rows that the Admin Tool allows. When I load updates to this dimension using the same "Import Master Data" feature, it takes an extremely long time to import, even though I am adding ONE member to the dimension. I am certain that I am using the Update option.
My question is that is this normal to take this long to add a single member to the dimension? If so, what is the difference of loading one member from a file rather than the entire dimension again if you recieve no performance gains?
Thank you,
Mark Glowczewskihi andreas,
Use DTW oItems template include UDF's at end of last column.
You can import/update item master using DTW.
There are limitations in importing/updating item master using "Import From Excel".
Jeyakanthan -
About disable the cellular data function
Hi everyone, I get a big problem...
I have just come back to HK after my holiday. I'm really sure that I had turned off the cellular data function when I left HK.
However, I was really surprised when I received the bill. There is a big charge for data roaming. I have contact my mobile phone company and he replied that it is impossible to completely turn off the cellular data function of the iPhone. iPhone will get updating some data, such as weather automatically.
is it true??
Thx for your help!!!!Hi,
This topic interests me. Can I just confirm that navigating to Settings>General>Mobile Data and turning:
1) Mobile Data
2) Enable 3G
3) Data Roaming
to "Off" will not entirely prevent access to cellular data networks? What if you navigated a step further to >Mobile Data Networks and simply deleted all entries, or replaced existing entries with garbage? -
How add an time to date function
Hai all
How to add time to date function
My table called Daily_attend
Fields are
Name varchar
Empcode num
Intime date
Outtime date
Attend_date date
So now i can calculate the working Hours of an employees by subtracting
Outtime -Intime
I have fixed the intime as 0815 after 0815 coming will be account to late
So when the shift start late by 50 min now i need to add 50 min to the to start time
so the intime of all employee should be subtract with 0905
Thanks In Advance
Srikkanth.MAre you looking for something similar?
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table test1(intime date, outtime date, empid integer, idein number);
Table created.
SQL> insert into test1 values(to_date('12-Mar-2010 08:15:00','DD-Mon-YYYY HH24:MI:SS'), to_date('12-
Mar-2010 18:15:00','DD-Mon-YYYY HH24:MI:SS'),101,null);
1 row created.
SQL> create table test2(late_mins integer);
Table created.
SQL> insert into test2 values (40);
1 row created.
SQL> update test1
2 set idein = to_number(outtime-(intime+(select (late_mins/60)/24 from test2)))*24*60
3 where empid = 101;
1 row updated.
SQL> select * from test1;
INTIME OUTTIME EMPID IDEIN
12-MAR-10 12-MAR-10 101 560
SQL> -
Data Federator Universe Date Functions
Hi,
I created a Data Federator Universe from target tables (Source Tables from: Sql Server 2005 and Oracle 10g). Now, I want to create a object in the universe: "Days between 2 dates"(coming from 2 different target tables). I don't see any other date functions other than CURDATE(). How to create my object?
Alternatively, Can I create a caliculated column in the existing target table? For Example, I want to create a new column "Days between 2 Dates" from 2 different tables by using a formula in Default mapping of the target table.
Thanks & Regards,
PeterHi Amit,
Thanks for your reply.
Ok. So, Universe on top of Data Federator has limited functionality.
And, other option you mentioned is on report level. I am creating an adhoc universe and I have few objects which will calculate days between 2 dates coming from 2 different tables.
But, how can I achieve this on Data Federator level. I have no function there to find Days Between 2 dates. I see lot of time and date functions but not the one I required. Also, I added a column in the target table and tried to apply the formula there in the default mapping area. But, I see only the selected target table. I need another date column from another table, which is not displayed in the default mapping area.
How can I achieve this?
Regards,
-Peter -
Print a DayName without using Date functions
Hi,
I have an assignment like without using any date functions i should print a calendar.
Below is the code without using any datefunctions like dateadd, datediff, datename a calendar has been generated for month and year entered. I want a week name for the dates like sunday ... monday etc.
I can take any date from calendar as reference and calculate based on that date.
ex: today is 2/20/2014 thursday . Next 7days again will be thursday, same way before 7days will be thursday.
I need to loop in below procedure and get weekname.
Plz help in the code,
I am using SQL server 2008
IF OBJECT_ID ('dbo.Calendar1') IS NOT NULL
DROP PROCEDURE dbo.Calendar1
GO
CREATE PROCEDURE [dbo].Calendar1 --4,1991
@month int,
@Year int
AS
BEGIN
declare
@startdateofMonthYear date,
@EnddateofMonthYear Date
Set @startdateofMonthYear=(Select cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'01')
Set @EnddateofMonthYear = (SELECT case when @month IN (1,3,5,7,8,10,12) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'31'
when @month IN(4,6,9,11) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'30'
else cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+(CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN '29' else '28' End)
End)
;WITH CTE_DatesTable
AS
Select 1 daysint, Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(1 as varchar(2)) as DATE) Calendardates
UNION ALL
SELECT daysint+1,Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(daysint+1 as varchar(2)) as DATE) Calendardates
FROM CTE_DatesTable
WHERE daysint<=
(SELECT case when @month IN (1,3,5,7,8,10,12) then 31
when @month IN(4,6,9,11) then 30
else (CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN 29 else 28 End)
End)-1
Select
[DWDateKey]=Calendardates,
[DayDate]=daysint,
[MonthNumber]=@Month,
[MonthName]=Case when @month = 1 then 'January'
when @month = 2 then 'February'
when @month = 3 then 'March'
when @month = 4 then 'April'
when @month = 5 then 'May'
when @month = 6 then 'June'
when @month = 7 then 'July'
when @month = 8 then 'August'
when @month = 9 then 'September'
when @month = 10 then 'October'
when @month = 11 then 'November'
when @month = 12 then 'December'
End,
[Year]=@Year
From CTE_DatesTable
END
bhavanaIn the above code, where do i pass the year and month?
(Select 2000 YearID
Union All
Select YearID +1 From cte where YearID <2100
In above condition from 2000 year its displaying.
If i want in 90's year , Day name will not be correct.
Deepa -
Date function doesn't work in Message Subject when scheduling batch
Hi,
When I was scheduling a batch and went to PDF attached E-Mail panel, in the Message Subject line I added a function <<Date(yyyy-MM-dd)>>,but when the email was sent, the date function in the subject didn't show the actual date, just showed the original function text <<Date(yyyy-MM-dd)>>, Is there anyone can help on this? Thanks in advance.Hi,
Can I know the Hyperion Version you referring ?
regards,
Harish. -
Can I use cellular data for updating ios 7.0.2 to 7.0.4 in iPhone 5
Can I use cellular data for updating ios 7.0.2 to 7.0.4 in iPhone 5. I just want to know coz i only have 3G cellular data ....
No.
-
I have recently written my first stored procedure.
Its rather a bunch of SQL statements.
I had to hard code lot of dates. most of them are first day of the current monthe or last day of current month etc.
I thot of parametrizing all the dates, but if a business person has to include all the parameters they could go wrong and get the wrong results.
Now, I want to use date functions to achieve these requirements:
Can any one please throw some insght into this:....
1) First day of current month,
2) last day of current month.
3) first day of previious month
4) last day of previous month
5) first day of a month that is 3 months from now.
6) last day of a month that is 3 months from now.
7).....
Can any one please throw some light on any one of this.. I can try to work from there onwards ....
Thanks a lot in advance,
AcHi there,
1) First day of current month
select trunc(sysdate, 'MM') from dual;
2) last day of current month.
select trunc(add_months(sysdate, 1), 'MM') - 1 from dual;
3) first day of previious month
select trunc(add_months(sysdate, -1), 'MM') from dual;
4) last day of previous month
select trunc(sysdate, 'MM') - 1 from dual;
5) first day of a month that is 3 months from now.
select trunc(add_months(sysdate, 3), 'MM') from dual;
6) last day of a month that is 3 months from now.
select trunc(add_months(sysdate, 4), 'MM') - 1 from dual;cheers,
Anthony -
Problem overloading "set data" function on Button DataGrid Renderer
Hi all, I'm hoping this is something simple.
I have a class that extends mx.controls.Button and implements mx.core.IDataRenderer. I need to set the button icon whenever the Data property is set from the DataGrid. My problem is that my overloaded set/get Data function are never called (I've stepped through the code in debug). Instead the set/get functions in Container.as (Flex 3.4 SDK) get called.
Here's the basics code:
exportButtonRenderer.as
package controls
import flash.events.Event;
import flash.events.MouseEvent;
import mx.controls.Button;
import mx.core.IDataRenderer;
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.listClasses.BaseListData;
import mx.events.FlexEvent;
import mx.controls.Alert;
import model.descriptors.compDescriptor;
import events.exportClickedEvent;
public class exportButtonRenderer extends Button implements IDataRenderer
// embed your icons
[Embed(source='/assets/icons/export.png')]
[Bindable]
public static var imageExport:Class;
[Embed(source='/assets/icons/blank.png')]
[Bindable]
public static var imageBlank:Class;
public function exportButtonRenderer()
super();
private var _listData:DataGridListData;
override public function get listData():BaseListData
return _listData;
override public function set listData(value:BaseListData):void
_listData = DataGridListData(value);
private var _data:Object;
override public function get data():Object
return _data;
override public function set data(value:Object):void
_data = value;
override protected function clickHandler(event:MouseEvent):void
super.clickHandler(event);
Now I know I'm using the Flexlib TreeGrid and not a standard DataGrid but when I trace through all the code all code firing the set/get functions is coming from the DataGrid anyway.
Here's the my Grid def in my main app mxml:
Header 1
<flexlib:TreeGrid
id="MKTXGrid"
dragEnabled="false" sortableColumns="false" showRoot="false"
disclosureClosedIcon="@Embed(source='/assets/icons/arrow_right.png')"
disclosureOpenIcon="@Embed(source='/assets/icons/arrow_down.png')"
folderOpenIcon="@Embed(source='/assets/icons/psd.png')"
folderClosedIcon="@Embed(source='/assets/icons/psd.png')"
click="MKTXGrid_clickHandler(event)"
doubleClickEnabled="true" doubleClick="MKTXGrid_doubleClickHandler(event)" left="0" right="0" top="0" bottom="16">
<flexlib:columns>
<flexlib:TreeGridColumn dataField="Name" headerText = "Name" minWidth="200" width="200" editable="true"/>
<mx:DataGridColumn dataField="ExportName" headerText = "Export Name"/>
<mx:DataGridColumn dataField="Export" headerText = "Export" width="50" minWidth="20" resizable="false">
<mx:itemRenderer>
<mx:Component>
<mx:Box horizontalAlign="center" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<controls:exportButtonRenderer label="Export" icon="@Embed(source='assets/icons/export.png')" width="12" height="12" useHandCursor="true">
<controls:click>
<![CDATA[
import events.exportClickedEvent;
var e:exportClickedEvent = new exportClickedEvent();
e.itemData = data;
dispatchEvent(e);
]]>
</controls:click>
</controls:exportButtonRenderer>
</mx:Box>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</flexlib:columns>
</flexlib:TreeGrid>
Nothing too special going on.
I know this can be done, I've seen examples in the SDK:
http://opensource.adobe.com/svn/opensource/durango/trunk/ExternalFlexTools/com/dougmccune/ containers/accordionClasses/AccordionHeader.as
By the way I've stepped through the code of the TreeGridItemRenderer class in Flexlib which works correctly and the class def starts like this:
TreeGridItemRenderer.as
import flash.display.DisplayObject;
import flash.display.InteractiveObject;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flexlib.controls.TreeGrid;
import mx.controls.Image;
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.listClasses.BaseListData;
import mx.controls.listClasses.IDropInListItemRenderer;
import mx.controls.listClasses.IListItemRenderer;
import mx.core.IDataRenderer;
import mx.core.IFlexDisplayObject;
import mx.core.IToolTip;
import mx.core.SpriteAsset;
import mx.core.UIComponent;
import mx.core.UITextField;
import mx.events.FlexEvent;
import mx.events.ToolTipEvent;
import mx.events.TreeEvent;
import mx.managers.ILayoutManagerClient;
import mx.styles.IStyleClient;
public class TreeGridItemRenderer extends UIComponent
implements IDataRenderer,
IDropInListItemRenderer,
ILayoutManagerClient,
IListItemRenderer
Any help would be great!That's because you put your component in a Box. The DataGrid is setting the Box's .data property and no code is setting the one on your component. You shouldn't really need Box. You can override updateDisplayList to center your Button instead.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui
Maybe you are looking for
-
Im sorry if this is has been already answered, but its 4am here in aus and I just want to finish this schoolies project and then go to bed. Can anyone help me? When I try to import my movie from imovie to imovie HD this message comes up - The file co
-
Same Apple ID for different compueters and iphones
I already have an iTunes account (Apple ID) and we like to use the same account on different computers with my daughter's new iphones, How do we do that?
-
Problem with path (which contain spaces)
Hi, Im having problems when I use getAbsolutePath() method when the path contains spaces, like "c:\Program Files" my app have a different behavior if its installed in a path like C:\myApp\ The troubles occurs when I try to create a directory and crea
-
[Running] Walk mode: Set / Detect lower tempo than 140 BPM
In the Running feature, I would love to see a "cool down" function for when I'm finished running and want to set a new slower tempo (e.g. 70-100 bpm range) with a simple tap, for walking and/or winding down. It seems there is no manual way to set tem
-
Why won't my MacBook Pro switch to Intel integrated graphics?
My early 2011 MacBook Pro seems to be incapable of using it's integrated Intel graphics card, obviouslly affecting battery life when unplugged. I've verified the computer is using the discrete graphics card at all times and in all situations. Is th