Why we don't dispose SPList object using or Dispose methods?
Hi Friends,
Why we don't dispose SPList object in SharePoint server side object model?
Could you please explain me indetails.
Thanks
Tiru
Tiru
SharePoint objects like SPWeb, SPSite holds a reference to an SPRequest object which holds a reference to a SharePoint COM object that is responsible to communicate with the backend SQL server.
In case that the SPWeb object is not disposed when it is no longer used, then the connection to the SQL server will stay open and the memory allocated by the COM object will stay in memory as the COM object has not been asked to close the connection and to
release the memory. However, SPList doesn't hold a reference to SPRequest. Hence it doesn't need to be disposed.
See this for more information: http://blogs.technet.com/b/stefan_gossner/archive/2008/12/05/disposing-spweb-and-spsite-objects.aspx
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field
Similar Messages
-
How to specify warehouse in item object using set GL Method by Warehouse
Hi all,
</p>
I have a sdk to import item master from excel using item object. In general setting, the default warehouse was not set. Therefore, when the program creates the item master, it will first set GL Method by Item Level in order to take in the warehouse code from the excel file and after the item master created, sdk will change the set GL Method from item level to warehouse using object cos customer wants item to manage by warehouse. This sdk was working fine until recently it upgraded to 2007 whereby the change of set GL Method is no longer available using object except thru B1 interface.
</p>
Does anyone know any workaround?
</p>
The below is my sample coding.
</p>
<pre>
Dim RetVal As Long
Dim errCode As Long
Dim errMsg As String
Dim dr As System.Data.DataRow
Dim objRows As DataRow() = dtHeader.Select
If objRows.GetUpperBound(0) >= 0 Then
For Each objDataRow In objRows
oITM = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
oITM.ItemCode = objDataRow("Item")
oITM.ItemName = objDataRow("Descr")
oITM.ItemType = SAPbobsCOM.ItemTypeEnum.itItems
oITM.ItemsGroupCode = objDataRow("ItmGrp")
oITM.IssueMethod = objDataRow("IssMthd")
oITM.SalesItem = objDataRow("SlsItem")
oITM.InventoryItem = objDataRow("InvItem")
oITM.PurchaseItem = objDataRow("PurItem")
oITM.ManageSerialNumbers = objDataRow("ManageSerial")
oITM.ManageBatchNumbers = objDataRow("ManageBatch")
oITM.CostAccountingMethod = SAPbobsCOM.BoInventorySystem.bis_FIFO
oITM.ManageStockByWarehouse = SAPbobsCOM.BoYesNoEnum.tYES
oITM.InventoryUOM = objDataRow("InvUom")
oITM.PurchaseUnit = objDataRow("PurUom")
oITM.PurchaseItemsPerUnit = objDataRow("PerPurUnit")
oITM.SalesUnit = objDataRow("SlsUom")
oITM.SalesItemsPerUnit = objDataRow("PerSlsUnit")
oITM.ShipType = objDataRow("ShipTyp")
oITM.Properties(1) = objDataRow("StdPart")
oITM.Properties(2) = objDataRow("FabPart")
oITM.UserFields.Fields.Item("U_Materials").Value = objDataRow("Material")
oITM.UserFields.Fields.Item("U_Treatment").Value = objDataRow("Treatment")
oITM.UserFields.Fields.Item("U_ProdType").Value = objDataRow("PrdTyp")
If objDataRow("Manufacturer") <> String.Empty Then
oITM.Manufacturer = objDataRow("Manufacturer")
End If
oITM.GLMethod = SAPbobsCOM.BoGLMethods.glm_ItemLevel
'Get detail
Dim oRows As DataRow() = dtDetail.Select("LineNo = " & objDataRow("LineNo") & "")
If oRows.GetUpperBound(0) >= 0 Then
For Each dr In oRows
With oITM.WhsInfo
.WarehouseCode = dr("Whs")
.RevenuesAccount = "_SYS00000000209"
.ExpensesAccount = "_SYS00000000003"
.SalesCreditAcc = "_SYS00000000209"
.PurchaseCreditAcc = "_SYS00000000003"
.Add()
End With
Next
End If 'oRows
RetVal = oITM.Add()
'Check for error
If RetVal <> 0 Then
oCompany.GetLastError(errCode, errMsg)
Throw New Exception("[Import Item Master]: " & errCode & "-" & errMsg)
End If
'Change GLMethods from ItemLevel to Warehouse
If oITM.GetByKey(objDataRow("Item")) = True Then
oITM.GLMethod = SAPbobsCOM.BoGLMethods.glm_WH
If oITM.Update() <> 0 Then
oCompany.GetLastError(errCode, errMsg)
Throw New Exception("[Update Item Master]: " & errCode & "-" & errMsg)
End If
End If
Next
End If 'objRows</pre>
</p>
Regards,</br>
CherineHello,
This code is working on 2007. What is the error message you get when you change the G/L method by WH?
Try it to change in SAP B1 GUI an item G/L Method tp WH which has been added via your code , I think settings of G/L Account is missing.....
And check that the Addd all warehouse is not checked in the System Settings.
Regards,
J. -
Why does my movieclip centre on click (using the drag method)
I have a movieclip, that is draggable (horizontally), i have this code (helped achieved by Kglad!):
It has a nice effect, but when i click to drag the movieclip jums to its registration point.
var completeTween:Boolean;
var finalMouseY:int;
var startMouseY:int;
mc.addEventListener(MouseEvent.MOUSE_DOWN, onDown1);
mc.buttonMode = false;
function onDown1(e:MouseEvent):void
startMouseY = mouseY;
completeTween = false;
stage.addEventListener(MouseEvent.MOUSE_UP,onUp1);
MovieClip(e.currentTarget).addEventListener(Event.ENTER_FRAME,tweenF);
function tweenF(e:Event):void
var mc:MovieClip = MovieClip(e.currentTarget);
if (completeTween)
mc.y = .5*(mc.y+Math.min(745.75,finalMouseY));
if (Math.abs(mc.y - Math.min(745.75,finalMouseY)) < 1)
e.currentTarget.removeEventListener(Event.ENTER_FRAME,tweenF);
else
mc.y = .5*(mc.y+Math.min(745.75,mouseY-startMouseY));
function onUp1(e:MouseEvent):void
completeTween = true;
finalMouseY = mouseY - startMouseY;
stage.removeEventListener(MouseEvent.MOUSE_UP,onUp1);
}Okay, I'm not sure what you mean, but when you set both x and y to drag, it should drag just fine - even when there are text fields inside the clip:
var completeTween:Boolean;
var finalMouseX:int;
var startMouseX:int;
var finalMouseY:int;
var startMouseY:int;
mc.addEventListener(MouseEvent.MOUSE_DOWN, onDown1);
mc.buttonMode = false;
function onDown1(e:MouseEvent):void {
startMouseX = e.target.mouseX;
startMouseY = e.target.mouseX;
completeTween = false;
stage.addEventListener(MouseEvent.MOUSE_UP, onUp1);
MovieClip(e.currentTarget).addEventListener(Event.ENTER_FRAME, tweenF);
function tweenF(e:Event):void {
var mc:MovieClip = MovieClip(e.currentTarget);
if (completeTween) {
mc.x = .5 * (mc.x + Math.min(745.75, finalMouseX));
if ((Math.abs(mc.x - Math.min(745.75, finalMouseX)) < 1) && (Math.abs(mc.y - Math.min(745.75, finalMouseY)) < 1)) {
e.currentTarget.removeEventListener(Event.ENTER_FRAME, tweenF);
} else {
mc.x = .5 * (mc.x + Math.min(745.75, mouseX - startMouseX));
mc.y = .5 * (mc.y + Math.min(745.75, mouseY - startMouseY));
function onUp1(e:MouseEvent):void {
completeTween = true;
finalMouseX = mouseX - startMouseX;
finalMouseY = mouseY - startMouseY;
stage.removeEventListener(MouseEvent.MOUSE_UP, onUp1);
I'm the same person, just changed my Display Name.
Message was edited by: StoneChameleon -
How to add CustomProperties to Excel object using BIPlatform service?
Hallo,
I got a Excel Info object using BIPlatform.Get method as follow
ResponseHolder rh = mPlatformService.Get("path://InfoObjects/Root Folder/fileName/", null);
Excel obj = (Excel)rh.InfoObjects.InfoObject[0];
But how can I add Custom properties and them save them back in Server?Not available/supported in any of our SDK's.
-
Hi Experts,
I am studying ABAP Objects, before that I need to know How to use the exsiting classes and Methods in our program and how to search for particular class and methods?
If it explanied with example well and good.
Thanks
saiHi Saikar,
Here i am sending you very useful content for the usage of classes and its methods.
It helped me a lot.
If you find it useful then do not forget to award points.
Table of Contents
Applies to:......................................................................................................................................1
Summary........................................................................................................................................1
Author Bio......................................................................................................................................1
Main Class CL_SALV_TABLE......................................................................................................3
Functions CL_SALV_FUNCTIONS..............................................................................................4
Display Settings CL_SALV_DISPLAY_SETTINGS......................................................................4
Columns CL_SALV_COLUMNS_TABLE and CL_SALV_COLUMN_TABLE..............................5
Sorts CL_SALV_SORTS..............................................................................................................8
Aggregations CL_SALV_AGGREGATIONS..............................................................................10
Filters CL_SALV_FILTERS........................................................................................................12
Layouts CL_SALV_LAYOUT......................................................................................................14
Related Content...........................................................................................................................15
Disclaimer and Liability Notice.......................................................................................................16
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 3
Main Class CL_SALV_TABLE
The main class used to create the simple 2D table is the class CL_SALV_TABLE. Create a reference variable for this class. Create an internal table and fill this internal table with data as show below.
REPORT ZALVOM_DEMO1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. start-of-selection. select * into table ispfli from spfli.
Next we need to create the ALV object for the 2D table. The FACTORY method allows you to create the ALV object in 3 ways. You can create the ALV Grid, as a classical list display, as a full screen grid, and finally embedded into a screen container. For this example, we will be working with the full screen grid. Create the call to the FACTORY method. We are importing the object reference into GR_TABLE and passing the internal table ISPFLI.
cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ).
Next we need to display the grid, for this we use the DISPLAY method . Simply call it.
gr_table->display( ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 4
Functions CL_SALV_FUNCTIONS
Next, add functions to the application toolbar. For this, use the CL_SALV_FUNCTIONS class. Create the object reference variable and receive the object using the GET_FUNCTIONS method of the GR_TABLE object. Call the method SET_ALL to force the ALV grid to show all standard functions.
report zalvom_demo1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions. start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_table->display( ).
The result is now you have the standard buttons on the application toolbar.
Display Settings CL_SALV_DISPLAY_SETTINGS
Next, we can change some display settings using the class CL_SALV_DISPLAY_SETTINGS. Create the object reference variable and receive the object using the GET_DISPLAY_SETTINGS method of the GR_TABLE object. In this example, we are setting the Striped Pattern for the ALV Grid rows, and setting the heading in the title bar.
report zalvom_demo1.
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 5
). data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions. data: gr_display type ref to cl_salv_display_settings. start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_display = gr_table->get_display_settings( ). gr_display->set_striped_pattern( cl_salv_display_settings=>true ). gr_display->set_list_header( 'This is the heading' gr_table->display( ).
Columns CL_SALV_COLUMNS_TABLE and CL_SALV_COLUMN_TABLE
Next, we can change some of the attributes of a specific column in the ALV grid. In this example we will change the Heading Text of a column as well as the color of a column. Create the object reference variable and receive the object using the GET_COLUMNS method of the GR_TABLE object. This will pass you the object for all columns of the ALV grid. To access just one column, call the method GET_COLUMN from the GR_COLUMNS object. In this example, we are accessing the CITYTO column and the CITYFROM column.
report zalvom_demo1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions.
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 6
data: gr_display type ref to cl_salv_display_settings. data: gr_columns type ref to cl_salv_columns_table. data: gr_column type ref to cl_salv_column_table.
data: color type lvc_s_colo.
start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_display = gr_table->get_display_settings( ). gr_display->set_striped_pattern( cl_salv_display_settings=>true ). gr_display->set_list_header( 'This is the heading' ). gr_columns = gr_table->get_columns( ). gr_column ?= gr_columns->get_column( 'CITYTO' ). gr_column->set_long_text( 'This is long text' ). gr_column->set_medium_text( 'This is med text' ).
gr_column->set_short_text( 'This is sh' ).
gr_column ?= gr_columns->get_column( 'CITYFROM' ). color-col = '6'. color-int = '1'. color-inv = '0'. gr_column->set_color( color ).
gr_table->display( ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 7 ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 8
Sorts CL_SALV_SORTS
Next, we can add some sorting to the ALV grid. Create the object reference variable and receive the object using the GET_SORTS method of the GR_TABLE object. Next, add the sort by calling the ADD_SORT method of the GR_SORTS object.
report zalvom_demo1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions. data: gr_display type ref to cl_salv_display_settings. data: gr_columns type ref to cl_salv_columns_table. data: gr_column type ref to cl_salv_column_table. data: gr_sorts type ref to cl_salv_sorts.
data: color type lvc_s_colo.
start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_display = gr_table->get_display_settings( ). gr_display->set_striped_pattern( cl_salv_display_settings=>true ). gr_display->set_list_header( 'This is the heading' ). gr_columns = gr_table->get_columns( ). gr_column ?= gr_columns->get_column( 'CITYTO' ). gr_column->set_long_text( 'This is long text' ). gr_column->set_medium_text( 'This is med text' ). gr_column->set_short_text( 'This is sh' ). gr_column ?= gr_columns->get_column( 'CITYFROM' ). color-col = '6'. color-int = '1'. color-inv = '0'. gr_column->set_color( color ). gr_sorts = gr_table->get_sorts( ). gr_sorts->add_sort 'CITYTO' ). gr_table->display( ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 9 ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 10
Aggregations CL_SALV_AGGREGATIONS
Since we sorted by CITYTO, we can add an aggregation to subtotal the DISTANCE by CITYTO. Create the object reference variable and receive the object using the GET_AGGREGATIONS method of the GR_TABLE object. Next, add the aggregation by calling the ADD_AGGREGATION method of the GR_SORTS object. We also need to modify the call to ADD_SORT to set the SUBTOTAL = ABAP_TRUE.
report zalvom_demo1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions. data: gr_display type ref to cl_salv_display_settings. data: gr_columns type ref to cl_salv_columns_table. data: gr_column type ref to cl_salv_column_table. data: gr_sorts type ref to cl_salv_sorts. data: gr_agg type ref to cl_salv_aggregations.
data: color type lvc_s_colo.
start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_display = gr_table->get_display_settings( ). gr_display->set_striped_pattern( cl_salv_display_settings=>true ). gr_display->set_list_header( 'This is the heading' ). gr_columns = gr_table->get_columns( ). gr_column ?= gr_columns->get_column( 'CITYTO' ). gr_column->set_long_text( 'This is long text' ). gr_column->set_medium_text( 'This is med text' ). gr_column->set_short_text( 'This is sh' ). gr_column ?= gr_columns->get_column( 'CITYFROM' ). color-col = '6'. color-int = '1'. color-inv = '0'. gr_column->set_color( color ). gr_sorts = gr_table->get_sorts( ). gr_sorts->add_sort( columnname = 'CITYTO' subtotal = abap_true ). gr_agg = gr_table->get_aggregations( ). gr_agg->add_aggregation( 'DISTANCE' ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 11
gr_table->display( ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 12
Filters CL_SALV_FILTERS
Using the CL_SALV_FILTERS class we can setup some filters for the data in our ALV GRID. Create the object reference variable and receive the object using the GET_FILTERS method of the GR_TABLE object, and then simply called the method ADD_FILTER with the parameters.
report zalvom_demo1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions. data: gr_display type ref to cl_salv_display_settings. data: gr_columns type ref to cl_salv_columns_table. data: gr_column type ref to cl_salv_column_table. data: gr_sorts type ref to cl_salv_sorts. data: gr_agg type ref to cl_salv_aggregations. data: gr_filter type ref to cl_salv_filters.
data: color type lvc_s_colo.
start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_display = gr_table->get_display_settings( ). gr_display->set_striped_pattern( cl_salv_display_settings=>true ). gr_display->set_list_header( 'This is the heading' ). gr_columns = gr_table->get_columns( ). gr_column ?= gr_columns->get_column( 'CITYTO' ). gr_column->set_long_text( 'This is long text' ). gr_column->set_medium_text( 'This is med text' ). gr_column->set_short_text( 'This is sh' ). gr_column ?= gr_columns->get_column( 'CITYFROM' ). color-col = '6'. color-int = '1'. color-inv = '0'. gr_column->set_color( color ). gr_sorts = gr_table->get_sorts( ). gr_sorts->add_sort( columnname = 'CITYTO' subtotal = abap_true ). gr_agg = gr_table->get_aggregations( ). gr_agg->add_aggregation( 'DISTANCE' ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 13
gr_filter = gr_table->get_filters( ). gr_filter->add_filter( columnname = 'CARRID' low = 'LH' ). gr_table->display( ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 14
Layouts CL_SALV_LAYOUT
If you want to allow the user to manage layouts of the ALV grid, you must use the class CL_SALV_LAYOUT. Create the object reference variable and receive the object using the GET_LAYOUT method of the GR_TABLE object. Then simply call the method SET_KEY with the parameters and set the save restriction using the SET_SAVE_RESTRICTION method.
report zalvom_demo1. data: ispfli type table of spfli. data: gr_table type ref to cl_salv_table. data: gr_functions type ref to cl_salv_functions. data: gr_display type ref to cl_salv_display_settings. data: gr_columns type ref to cl_salv_columns_table. data: gr_column type ref to cl_salv_column_table. data: gr_sorts type ref to cl_salv_sorts. data: gr_agg type ref to cl_salv_aggregations. data: gr_filter type ref to cl_salv_filters. data: gr_layout type ref to cl_salv_layout. data: color type lvc_s_colo. data: key type salv_s_layout_key. start-of-selection. select * into table ispfli from spfli. cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ). gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_display = gr_table->get_display_settings( ). gr_display->set_striped_pattern( cl_salv_display_settings=>true ). gr_display->set_list_header( 'This is the heading' ). gr_columns = gr_table->get_columns( ). gr_column ?= gr_columns->get_column( 'CITYTO' ). gr_column->set_long_text( 'This is long text' ). gr_column->set_medium_text( 'This is med text' ). gr_column->set_short_text( 'This is sh' ). gr_column ?= gr_columns->get_column( 'CITYFROM' ). color-col = '6'. color-int = '1'. color-inv = '0'. gr_column->set_color( color ). gr_sorts = gr_table->get_sorts( ). gr_sorts->add_sort( columnname = 'CITYTO' subtotal = abap_true ). gr_agg = gr_table->get_aggregations( ).
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 15
gr_filter = gr_table->get_filters( ). gr_layout = gr_table->get_layout( ). gr_layout->set_key( ). gr_table->display( ). gr_agg->add_aggregation( 'DISTANCE' ). gr_filter->add_filter( columnname = 'CARRID' low = 'LH' ). key-report = sy-repid. key gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
Related Content
Help - ALV Object Model
Utilizing the New ALV Object Model
SDN ABAP Forum
ALV Object Model Simple 2D Table - The Basics SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 16
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.
Regards,
Mandeep.
Note: Award points if contents are useful. -
Why in Ai CC 2014, when I use a pathfinder tool on two objects, their anchor points snap slightly off from where they were? I'm looking under all the snap to options under VIEW & cannot find the culprit. Please help!
You're welcome.
There are a couple of issues connected to it:
http://www.vektorgarten.de/problems-align-to-pixel-grid.html
I don't think that list is complete -
Can't figure out why colors don't totally change when you select type with curser? It looks like it has by looking at it, but when you highlight the area after the old color is still there. It happens with objects to. Driving me NUTZ. Help!
Select the text, and open the Appearance palette (Come on guys, text highlight is irrelevant, it happens to objects too says the OP), and see what's listed there. For a simple text object, there should only be a line item "Type", followed by "Characters", and when double-clicked the Characters line item expands to tell you the stroke and fill color. For a basic object, there should be a fill and/or stroke.
What happens sometimes, is that you end up adding extra strokes/fills to objects or text, and the appearance palette is where that will be noted. Especially when you are dealing with groups, and/or picking up a color with the eyedropper, you may inadvertently be adding a fill or stroke on top of something. You can drag those unwanted thingies from the Appearance palette into its own little trash can. -
Why do we use cl_gui_cfw= flush method in Object Oriented ALV programming
Dear Friends,
Please solve my query regarding control framework. Why do we use cl_gui_cfw=>flush method in Object Oriented ALV programming. I studied and found that this method transfers automation queue to Front end. But I could not find any further update on this.
Thanks & Regards
Amit SharmaGenerally this is to restrict the traffic b/w frontend and backend. This means that every operation in Control Framework should be first buffered in the backend and synchronized with the frontend at certain points (one of this point is calling synchronization method cl_gui_cfw=>flush ). This explicit order of synchronization is due to RFC call needed for every communication b/w front/back end. So to avoid to many RFC calls we do it only at certain time.
Please refer [Automation Queue|http://help.sap.com/saphelp_wp/helpdata/en/9b/d080ba9fc111d2bd68080009b4534c/frameset.htm]. I think it explains the concept quite well.
Regards
Marcin -
Why can't I set up POP/IMAP emails for my Muse website in Business Catalyst? I don't have the option 'use this service for email as well as hosting the website' under Advanced options.
Is this due to my Hosting Plan? Appreciate any answers.Your site is a CCM site which is on a WebBasics plan (This plan does not provide hosted emails on Business Catalyst).
If you want to create email addresses on this site, you would need to setup your email server elsewhere and configure the MX records on your site to point to that external mail server.
If you want to use Business Catalyst's hosted email services you would need to use a WebBasics+ or higher siteplan. To upgrade your CCM free site, Access your site's admin area -> Site Management -> Upgrade Now -> choose the desired site plan and billing frequency -> Add personal and credit card details -> Submit.
Please refer this article about setting up email accounts on your BC site: http://docs.businesscatalyst.com/user-manual#!/site-settings/email-users
For setting up records to point to external mail server, check out http://docs.businesscatalyst.com/user-manual#!/site-settings/email-users/creating-inboxes- for-your-users
Regards,
Surjeet -
I don't know why my iphone4 usually too hot when use about 15 minutes.
I don't know why my iphone4 usually too hot when use about 15 minutes.
can you get the another.
thank youYou're not addressing Apple here, this is a user to user support forum.
Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new). Has any of this been tried? -
Why don't sun provide Object.getInternalAdress()?
Why is it so hard for sun to add the method getInternalAdress()-> long/java.math.BigInteger to Object (which gives the internal adress of the object).
In documentation for Object.hashCode() it is stated: "This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)"
And when you call Object.toString() that String has the internal adress in it.
So why cannot sun simply give access to the internal adress? It's obviously there! I can understand it has to do with platform-portability since for an example an int-adress would only work for 32-bit platform. But won't long or at least java.math.BigInteger be platform-portable?
GilWhy is it so hard for sun to add the method
getInternalAdress()-> long/java.math.BigInteger to
Object (which gives the internal adress of the
object).For one reason, there would be no point to it. Java makes no guarantees about the memory layout of an object in memory or the size of objects, so what would you do with an address?
For another reason, objects move around in some JVMs (for example, when the heap is compacted), and in other JVMs objects stay still. If Sun provided a way to get the address of an object, programmers who developer with a JVM where objects stay still might assume objects stay still in all JVMs and write bad code.
For yet another reason, you cannot access arbitrary memory in Java, so there's nothing you could possibly do with an address anyway.
Can you give any reason why you might want the address of an object, keeping in mind the above points? -
Sorting a vector of objects using attribute of object class as comparator
i would like to sort a vector of objects using an attribute of object class as comparator. let me explain, i'm not sure to be clear.
class MyObject{
String name;
int value1;
int value2;
int value3;
i've got a Vector made of MyObject objects, and i would sort it, for instance, into ascending numerical order of the value1 attribute. Could someone help me please?
KINSKI.Vector does not implement a sorted collection, so you can't use a Comparator. Why don't you use a TreeSet? Then you couldclass MyObject
String name;
int value1;
int value2;
int value3;
// Override equals() in this class to match what our comparator does
boolean equals (Object cand)
// Verify comparability; this will also allow subclasses.
if (cand !instanceof MyObject)
throw new ClassCastException();
return value1 = cand.value1;
// Provide the comparator for this class. Make it static; instance not required
static Comparator getComparator ()
// Return this class's comparator
return new MyClassComparator();
// Define a comparator for this class
private static class MyClassComparator implements Comparator
compare (Object cand1, Object cand2)
// Verify comparability; this will also allow subclasses.
if ((cand1 !instanceof MyObject) || (cand2 !instanceof MyObject))
throw new ClassCastException();
// Compare. Less-than return -1
if ((MyObject) cand1.value1 < (MyObject) cand2.value1))
return -1;
// Greater-than return 1
else if ((MyObject) cand1.value1 > (MyObject) cand2.value1))
return 1;
// Equal-to return 0.
else
return 0;
}then just pass MyObject.getComparator() (you don't need to create an instance) when you create the TreeSet. -
Adobe Creative Cloud Muse: Why I don't receive anymore the email from the forms I created in several websites?
Hello Sanjit,
thank you for replying.
I had the problem on this website, I have two forms, one simple and the other more sofisticated:
www.oeso.org
(at the bottom I have a simple contact form) and
I created also a form on www.oeso.org/new-membership.html
but i didn't receive any reply so
I put the form on my website (architecturevisualdesign.ch) in a hidden form:
http://architecturevisualdesign.ch/oeso-new-membership.html
and here I receive the OESO New Membership Form Submission reply.
Thank you for your help.
Best regards,
Nicole
2014-09-09 11:17 GMT+02:00 Sanjit_Das <[email protected]>:
Adobe Creative Cloud Muse: Why I don't receive anymore the email from the forms I created in several websites?
created by Sanjit_Das in Help with using Adobe Muse CC - View the full discussion
Please provide the site url in question , also have you hosted the site on Business Catalyst ?
Emails can land to spam/junk folders so you should also check the folders.
Thanks,
Sanjit
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6713391#6713391
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Help with using Adobe Muse CC by email or at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0. -
How to change font/ font color etc in a graphic object using JCombobox?
Hello
My program im writing recently is a small tiny application which can change fonts, font sizes, font colors and background color of the graphics object containing some strings. Im planning to use Jcomboboxes for all those 4 ideas in implementing those functions. Somehow it doesnt work! Any help would be grateful.
So currently what ive done so far is that: Im using two classes to implement the whole program. One class is the main class which contains the GUI with its components (Jcomboboxes etc..) and the other class is a class extending JPanel which does all the drawing. Therefore it contains a graphics object in that class which draws the string. However what i want it to do is using jcombobox which should contain alit of all fonts available/ font sizes/ colors etc. When i scroll through the lists and click the one item i want - the graphics object properties (font sizes/ color etc) should change as a result.
What ive gt so far is implemented the jcomboboxes in place. Problem is i cant get the font to change once selecting an item form it.
Another problem is that to set the color of font - i need to use it with a graphics object in the paintcomponent method. In this case i dnt want to create several diff paint.. method with different property settings (font/ size/ color)
Below is my code; perhaps you'll understand more looking at code.
public class main...
Color[] Colors = {Color.BLUE, Color.RED, Color.GREEN};
ColorList = new JComboBox(Colors);
ColorList.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
JComboBox cb = (JComboBox)ev.getSource();
Color colorType = (Color)cb.getSelectedItem();
drawingBoard.setBackground(colorType);
});;1) providing the GUI is correctly implemented with components
2) Combobox stores the colors in an array
3) ActionListener should do following job: (but cant get it right - that is where my problem is)
- once selected the item (color/ font size etc... as i would have similar methods for each) i want, it should pass the item into the drawingboard class (JPanel) and then this class should do the job.
public class DrawingBoard extends JPanel {
private String message;
public DrawingBoard() {
setBackground(Color.white);
Font font = new Font("Serif", Font.PLAIN, fontSize);
setFont(font);
message = "";
public void setMessage(String m) {
message = m;
repaint();
public void paintComponent(Graphics g) {
super.paintComponent(g);
//setBackground(Color.RED);
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint
g2.drawString(message, 50, 50);
public void settingFont(String font) {
//not sure how to implement this? //Jcombobox should pass an item to this
//it should match against all known fonts in system then set that font to the graphics
private void settingFontSize(Graphics g, int f) {
//same probelm with above..
public void setBackgroundColor(Color c) {
setBackground(c);
repaint(); // still not sure if this done corretly.
public void setFontColor(Color c) {
//not sure how to do this part aswell.
//i know a method " g.setColor(c)" exist but i need to use a graphics object - and to do that i need to pass it in (then it will cause some confusion in the main class (previous code)
My problems have been highlighted in the comments of code above.
Any help will be much appreciated thanks!!!It is the completely correct code
I hope that's what you need
Just put DrawingBoard into JFrame and run
Good luck!
public class DrawingBoard extends JPanel implements ActionListener{
private String message = "message";
private Font font = new Font("Serif", Font.PLAIN, 10);
private Color color = Color.RED;
private Color bg = Color.WHITE;
private int size = 10;
public DrawingBoard(){
JComboBox cbFont = new JComboBox(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
cbFont.setActionCommand("font");
JComboBox cbSize = new JComboBox(new Integer[]{new Integer(14), new Integer(13)});
cbSize.setActionCommand("size");
JComboBox cbColor = new JComboBox(new Color[]{Color.BLUE, Color.RED, Color.GREEN});
cbColor.setActionCommand("color");
JComboBox cbBG = new JComboBox(new Color[]{Color.BLUE, Color.RED, Color.GREEN});
cbBG.setActionCommand("bg");
add(cbFont);
cbFont.addActionListener(this);
add(cbSize);
cbSize.addActionListener(this);
add(cbColor);
cbColor.addActionListener(this);
add(cbBG);
cbBG.addActionListener(this);
public void setMessage(String m){
message = m;
repaint();
protected void paintComponent(Graphics g){
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setColor(bg);//set background color
g2.fillRect(0,0, getWidth(), getHeight());
g2.setColor(color);//set text color
FontRenderContext frc = g2.getFontRenderContext();
TextLayout tl = new TextLayout(message,font,frc);//set font and message
AffineTransform at = new AffineTransform();
at.setToTranslation(getWidth()/2-tl.getBounds().getWidth()/2,
getWidth()/2 + tl.getBounds().getHeight()/2);//set text at center of panel
g2.fill(tl.getOutline(at));
public void actionPerformed(ActionEvent e){
JComboBox cb = (JComboBox)e.getSource();
if (e.getActionCommand().equals("font")){
font = new Font(cb.getSelectedItem().toString(), Font.PLAIN, size);
}else if (e.getActionCommand().equals("size")){
size = ((Integer)cb.getSelectedItem()).intValue();
}else if (e.getActionCommand().equals("color")){
color = (Color)cb.getSelectedItem();
}else if (e.getActionCommand().equals("bg")){
bg = (Color)cb.getSelectedItem();
repaint();
} -
How to get list of custom objects used in abap report program?
Hi friends,
I have a requirement in which I have to scan the entire abap report and retrieve list of custom objects used in it for example custom tables, data elements, structures, table types etc,. Is there any provision in SAP like fuction modules to do this functionality? As of now I am coding everything manually where so many possibilities are there for all kinds of objects. Provide your answers and suggestions...
Thanks,
NasteraHi,
The best way to do this is environment analysis. Follow the steps:
1. Open se38, type in the program name (don't click on on display/change or create button, stay on first screen only)
2. Click on environment analysis button (hot key SHIFT+F4)
3. It will throw a pop-up, which will ask for type of object you want to see, which are linked /used by this program. select all (or may be if you are only interested in Tables, then select table only)
4. Hit 'Enter'
You will get the full list of all objects used in this report program. Just note down the one which starts with Z or Y and that's it.
Cheers,
Anid
Maybe you are looking for
-
is there any options to download a better keyboard for the lumia 520 such as google keyboard? Solved! Go to Solution.
-
Error occurred while creating dimension attributes.
Hi All, I have restored the back up file in the NW 10.0 environment (In BW 7.3 system using UJBR tcode the backup file was colleted from NW 7.5 system). In this process I have got an error "Error occurred while creating the dimension attribu
-
Everytime when i try to download the free trial from the CC it says error i dont have permission so is there a link to download the free trial without the CC?
-
Hello my name is Lisa Hallman and I'm haveing problems installing my pdf converter from my disk that I bought. I can not find my Regestration code. All I have is the code for the trial. I down loaded from the adobe store. Now I'm trying to install fr
-
WDS not getting linked after disconect and reconnect to wall
Hello. I have a A.Extreme configure with WDS and 3 A.Express as remotes. I configured everything perfect and worked fine. Today I wanted to move one A.Express to another outlet and when I plugged in it took so many time to get sync (like an hour). I