MXML: “true && true” error
Stumbled across this strange error while doing some development. I’ve needed to determine the enable function of a button based on two boolean conditions and as a result created the following bit of code:
<com:Component enabled=”{booleanA && booleanB}”/>
The compiler didn’t like what I’ve put together and threw the following error: The entity name must immediately follow the ‘&’ in the entity reference.
At first I litteraly thought that I’ve forgotten how to code and trivially tried a simple if statement in a <fx:Script> tag – that worked without a problem. I’ve also tried to see if the or ”||” operator worked within the enabled attribute – which it did. My last thought before searching for a solution online was that the latest version of Adobe Flex had a bug in it.
Some of the solution that I’ve discovered are:
- use ;& instead
- use (booleanA) ? (booleanB):false
- use !(!active1 || !active2)
SAP: ABAP: Subroutine does not exist – bug
Scenario: you’re editing your code and when you try to double click on a previously defined subroutine you get a popup stating that it doesn’t exist. You check and confirm that the subroutine is included, the report compiles and runs properly.
Resolution: to fix the problem do the following steps:
- Click Utilities
- Click Update Navigation Index
The report will be regenerated and your problem should be solved.
Adobe Flex: smooth out the images – scaleContent
When you’re dealing with a situation that requires the use of the following image settings:
width="100%"
height="100%"
scaleContent="true"
maintainAspectRatio="true"
You can find your self in a situation where the loaded content will result in a pixelated bitmap. Simply add a complete event handler to your image component and update the contents of the event in the following way:
var lv_btmp:Bitmap = ((event.target as Image).content as Bitmap);
if ( lv_btmp != null )
lv_btmp.smoothing = true;
this will smooth out the image that you have loaded.
ABAP: link company code and controlling area
Quick way to find a controlling area derived from the company code is to use the following BAPI_CONTROLLINGAREA_FIND. Examining further you will see that there is a reference to table TKA02 with parameters of company code and business area.
ABAP: how to switch to a classic screen painter [4.6C]
Simple: select Utilities and navigate to the Screen Painter tab. There you will see a check box corresponding to the desired action.
FLEX: convert HTML format to RichText
If you are working with rich text editors you will run in to a situation where you have to format an HTML string to RichText value.
Following code can accomplish this:
gc_ta_bio.textFlow =
TextConverter.importToFlow( "<h1>Your String</h1>,
TextConverter.TEXT_FIELD_HTML_FORMAT )
Where the MXML control will look something like this:
<s:RichEditableText id="gc_ta_bio" />
SAP: ABAP: ALV grid color scheme
Here’s a list of colors that you can use to color your ALV grid.
To actually use create a field of 4 characters and use ‘CX00′ where X is the number specified above.
SAP: transport classes
If you know how to transport copies of objects then you are half way there. So a quick and easy way to figure out what to put in to your transport [Change Object List] perform the following steps:
- go to SE24
- type in your class name
- click Goto – Object Directory Entry
At this point you should see your object definition entries: R3TR – CLAS – <CLASS NAME>. Grab that and move your transport.
SAP: Generating a Class Actor – CREATE_PERSISTENT
Been playing with the persistent objects and finally figured a part that involves generating a CREATE_PERSISTENT method in the Base agent class.
To do this
- Go to Persistence Representation

- Select Utilities – Generate – Class Agent – Class
- Click the Yes button
That’s all.
Flash Cross-Domain policies
A nice introduction to what the cross-domain policy are all about
