Add column is grid
Private oGrid As SAPbouiCOM.Grid
oItem = objForm.Items.Add("dtgItems", SAPbouiCOM.BoFormItemTypes.it_GRID)
I have created grid using the above code.I have added two columns in grid and these coulmns are present in table.I want to add new column Edit in grid.
dear dilip,
u can add a column in grid by code as follow
Dim oGrid As SAPbouiCOM.Grid
oGrid = oForm.Items.Item("<Grid Name>").Specific
Dim oColumns As SAPbouiCOM.Columns
Dim oColumn As SAPbouiCOM.Column
oColumns = oGrid.Columns
oColumn = oColumns.Add("", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.DataBind.SetBound(True, "<SBO Table Name>", "<UDF Column Name>")
hope this can give u idea, if satisfied, rewards points
regards
nirdesh panwar
Similar Messages
-
How can I add a new column to Grid view under Tests tab
I understand in "ORACLE Test manager for web Applications", the Grid view under Tests tab should be customised.
How can I add a new column to Grid view under Tests tab? Thanks KatherineI don't think this is possible.
Regards,
Jamie -
Add column with preq number to ALV grid in me53n
hi all,
i am trying to add column with preq number (BANFN) to ALV with preq items in ME53N. it is not available in column set, when trying to add by "change layout" button - i dont understand why, when the strcucture MEREQ3211GRID contains it :-(
i also tried to add new field ZZBANFN into the structure CI_EBANMEM and after that, i could add the new field to ALV through change layout, but it was empty of course. so i implemented EXIT_SAPLMEREQ_001 from MEREQ001, but ZZBANFN is still empty, because this exit is not called when opening ME53N, but when clicking on tab "customer data" in preq item detail.
how to solve this? is there any exit that is called before displaying the ALV grid?Here is some more detail. I included my code from the Enhancement.
ENHANCEMENT-POINT MM06EFPO_POT_AUFBAUEN_02 SPOTS ES_MM06EFPO_POT_AUFBAUEN INCLUDE BOUND.
ENHANCEMENT 1 Z_MM06EFPO_POT_AUFBAUEN_1. "active version
SELECT SINGLE zz_old_material FROM mara
INTO pot-zz_old_material
WHERE matnr = pot-matnr.
ENDENHANCEMENT.
You will also need to change the layout in Item Overview to bring your field in. -
Hi All,
Can we add column to a grid in 2005 B.
Regards,
ManojHi Manoj,
You can make use of Query to get additional column. To add a check box column, you can query like SELECT 'N' AS CheckBoxColumnName, <field1>, <field2>,... FROM <TABLE>.
Hope this helps.
B Ravi Shankar -
Hello All,
In SBO,I want to add a column in Grid that is system defined.How is it possible.
Can anyone help me,it's urgent Pls.There's a sample in the SDK dealing with this ....
C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\06.MatrixAndDataSources\ -
Custom Facelets Handler to add Columns
Hi,
my application uses a custom grid based on Mojarra datatable.
The grid has fixed colums on the left side, dynamic scrollable columns in the middle part and fixed colums on the right side.
What i like to have is that i can define the fixed column inside the xhtml pages, the dynamic columns could be created in backing bean.
Something like:
<h:column ...>fixed left</h:column>
<my:columns cols="#{view.dynamicColumns}" />
<h:column ...>fixed right</h:column>
Is it possible to use a tag handler or component handler or whatever, which adds columns of a collection to the datatable?
thanx,
hammoudThe problem is that JSF 1.2 and the default HTML component set does not come by default with the concept of dynamic columns. You can find ui components like these in other libraries like the RichFaces component set. Other than that you would need to write your own data table renderer. Since the default data table renderer wraps each UIColumn inside a <td> tag you don't have much control inside the actual column component to make it more than one columns. The default data table renderer only renders children of type UIColumn anyways there is not much you can do there.
Using a TagHandler, you could have it add an arbitrary amount of UIColumn/HtmlColumn components depending on certain parameters, this can be made to work. For instance inside the apply() method for the handler you could do:
Map columns = (Map) this.getRequiredAttribute("columns");
for (Object key : columns.keySet()) {
UIColumn column = new UIColumn();
// you can setup the column component here
parent.getChildren().add(column);
}The problem with this type of solution is maintaining state. If what is displayed is only text then it should work. Otherwise, if you happen to have UIInput components inside your columns then it gets ever complicated. The best thing is to choose one of the library sets that comes with a data table that supports multiple dynamic columns like RichFaces and some others.
Ponderator -
To add column in an alv of FITV_POWL_TRIPS component
Hi all
I have a requirement to add column to an alv which is in FITV_POWL_TRIPS.Now the prob is that in that component we r using another compent SALV_WD_TABLE from which alv is taken.This what I understood
fitv_powl_trip
powl_ui_comp- <-getting tabstrips
powl_table_comp-<-getting refresh link
salv_wd_table- <- getting table
As far as I understood I think I have to find the comtext binded to DATA of SALV_WD_TABLE .Im not able to get it.If anyone has previous experience with this pls share
Edited by: m.reeha verma on Apr 30, 2009 6:15 AMHello Reeha,
Could you please share the solution for this ?
Thanks in Advance.
Thanks,
Prakhar -
How to add column dynamically based on user input in oracle?
**how to add column dynamically based on user input in oracle?**
I am generating monthly report based on from_date to to_date below is my requirement sample table
EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE | 01-OCT-12 | 02-OCT-12 | 03-OCT-12
100001.............John...........02-OCT-12...............6
100002.............chris...........01-OCT-12...............4
Based on user input, that is, if user need the report from 01-OCT-12 TO 03-OCT-12, i need to add that dates as column in my table, like 01-OCT-12 | 02-OCT-12 | 03-OCT-12....
below is my code
create or replace
procedure MONTHLY_LVE_NEW_REPORT_demo
L_BUSINESS_UNIT IN SSHRMS_LEAVE_REQUEST_TRN.BUSINESS_UNIT%TYPE,
--L_LEAVE_TYPE_CODE IN SSHRMS_LEAVE_REQUEST_TRN.LEAVE_TYPE_CODE%TYPE,
L_DEPARTMENT_CODE IN VARCHAR2,
--L_MONTH IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
L_FROM_DATE IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
L_TO_DATE in SSHRMS_LEAVE_REQUEST_TRN.LVE_TO_DATE%type,
MONTHRPT_CURSOR OUT SYS_REFCURSOR
AS
O_MONTHRPT_CURSOR_RPT clob;
v_return_msg clob;
BEGIN
IF (L_BUSINESS_UNIT IS NOT NULL
AND L_FROM_DATE IS NOT NULL
and L_TO_DATE is not null
-- AND L_DEPARTMENT_CODE IS NOT NULL
THEN
OPEN MONTHRPT_CURSOR FOR
select EMPLOYEE_CODE, EMPLOYEE_NAME AS NAME, DEPARTMENT_CODE AS DEPARTMENT,DEPARTMENT_DESC, CREATED_DATE,
NVL(WM_CONCAT(CL_RANGE),'') as CL_TAKEN_DATE,
case when NVL(SUM(CL2),0)<0 then 0 else (NVL(SUM(CL2),0)) end as CL_BALANCE,
from
SELECT DISTINCT a.employee_code,
a.EMPLOYEE_FIRST_NAME || ' ' || a.EMPLOYEE_LAST_NAME as EMPLOYEE_NAME,
a.DEPARTMENT_CODE,
a.DEPARTMENT_DESC,
B.LEAVE_TYPE_CODE,
B.LVE_UNITS_APPLIED,
B.CREATED_DATE as CREATED_DATE,
DECODE(b.leave_type_code,'CL',SSHRMS_LVE_BUSINESSDAY(L_BUSINESS_UNIT,to_char(b.lve_from_date,'mm/dd/yyyy'), to_char(b.lve_to_date,'mm/dd/yyyy'))) CL_RANGE,
DECODE(B.LEAVE_TYPE_CODE,'CL',B.LVE_UNITS_APPLIED)CL1,
b.status
from SSHRMS_EMPLOYEE_DATA a
join
SSHRMS_LEAVE_BALANCE C
on a.EMPLOYEE_CODE = C.EMPLOYEE_CODE
and C.STATUS = 'Y'
left join
SSHRMS_LEAVE_REQUEST_TRN B
on
B.EMPLOYEE_CODE=C.EMPLOYEE_CODE
and c.EMPLOYEE_CODE = b.EMPLOYEE_CODE
and B.LEAVE_TYPE_CODE = C.LEAVE_TYPE_CODE
and B.STATUS in ('A','P','C')
and (B.LVE_FROM_DATE >= TO_DATE(L_FROM_DATE, 'DD/MON/RRRR')
and B.LVE_TO_DATE <= TO_DATE(L_TO_DATE, 'DD/MON/RRRR'))
join
SSHRMS_LEAVE_REQUEST_TRN D
on a.EMPLOYEE_CODE = D.EMPLOYEE_CODE
and D.LEAVE_TYPE_CODE in ('CL')
AND D.LEAVE_TYPE_CODE IS NOT NULL
group by EMPLOYEE_CODE, EMPLOYEE_NAME, DEPARTMENT_CODE, DEPARTMENT_DESC, CREATED_DATE
else
v_return_msg:='Field should not be empty';
end if;
END;
my code actual output
EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE
100001....................John............02-OCT-12.................6
100001....................chris...........01-OCT-12.................4
how to add column dynamically based on from_date to to_date?
Thanks and Regards,
Chris Jerome.You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);
-
How to add columns in field-symbol
Dear All,
Have made a report for HR - ZHR_CTC by using logical database and field-symbol. Report is working fine, but now have to add columns e.g business area text, positions text etc.
Have added columns in field-symbol.But not able to fetch data into that.
Data has to be fetched from different trasparent table comparing <field-symbol>-field.
Plz suggest the proper way to do it.
<<text removed>>
Regards,
Gulrez Alam
Edited by: Gulrez Alam on Dec 16, 2008 11:02 AM
Edited by: Matt on Dec 16, 2008 11:36 AMHi Rimpa,
Thanks a lot for you reply, have tried ur suggestion but it's not working. I am not able to understand how to insert data into field-symbol. Plz give some more clarifications about the same.
Regards,
Gulrez Alam -
How to add column access BADI to appraisal template.
I am not able to see option to add column access BADI in template at Processing tab--> Further template behaviour.
Kinldy let me know how to add it.
I am able to see only following options
BC Business Check
D1 Default Appraiser
D2 Default Appraisee
DE Default Execution Period
DN Default Appraisal Document Name
DP Default Part Appraiser
DR Default Review Date
DV Default Validity Period
HA Header Data Change
PM Maximum Number of Part Appraisers
Thanks in advance.
DhananjyHello Ravikiran,
Based on the Role and Status of the appraisal form, turn the Column On/Off/Hide..
sample code...
case s_header_status-ap_status.
when c_status_in_preparation.
availability = 'H'.
column_owner = space.
when c_status_in_planning.
case s_body_columns-column_id.
when 'OBJ0'.
availability = 'X'.
column_owner = 'X'.
exit.
when 'Z003'.
availability = 'X'.
column_owner = 'X'.
Hope it helps...
Regards,
Jothi.P -
Hi experts,
I need help urgently. I want to add columns in the matrix of A/R invoice system form.
Can someone give me a solution?
Regards.
OlivierOlivier
You can add user defined fields into Marketing document rows, these will be new columns and will appear U_[COLUMNAME]
Regards
J
Edited by: János Nagy on May 18, 2010 2:01 PM -
Add Column name conditionally in a query
Hi i have an stored procedure where one parameter is passing
@Type
UserTable (columns) => username, canAdminDelete,canCustomerDelete,CanMerchantDelete
i wants to add column conditionally like when usertype =1 then query should be like
Select * from userTable where canAdminDelete=0
when userType=2
Select * from userTable where canCustomerDelete=0
Like in this way. I know i can write three if statments and write specific query.
But this is just an example i have very big query actually.
Please give some idea.
Thanks
NikiHi Niki,
As per my understanding, I think the query post by Olaf is correct. It only return the results when column canAdminDelete = 0 and userTpe = 1 or column canCustomerDelete = 0 and userType = 2.
So when userType=1 and column canAdminDelete=1, how could you get the results? Could you please test the issue again based on the query post by Olaf.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to Add column with default value in compress table.
Hi ,
while trying to add column to compressed table with default value i am getting error.
Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
Can anyone help me in this .
Thanks.Aman wrote:
while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
"+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
Nicolas. -
AdvancedDataGrid - Add columns with ActionScript
I'm trying to add columns to an AdvancedDataGrid via ActionScript.
I can't get it to work.
I've tried two approaches -- One with an intermediary array to store the columns then set the adg's columns to the array; One where I assign the columns directly to the adg's columns array.
They both fail in their own way. The columns don't "take" and the adg uses the dataProviders defaults, or there are no columns at all.
"adg_test.mxml" has the AdvancedDataGrids/code.
"adg_test_renderer.mxml" is a renderer for one of the columns.
Would appreciate learning what I'm doing wrong.
Thanks for any help.
=== START adg_test_renderer.mxml ===
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Button id="btnTest" label="Renderer Working"/>
</mx:VBox>
=== END adg_test_renderer.mxml ===
== START adg_test.mxml ====
<?xml version="1.0"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="init()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var dpADGExplicit:ArrayCollection = new ArrayCollection([
{Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
{Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
{Artist:'Saner', Album:'A Child Once', Price:11.99},
{Artist:'Saner', Album:'Helium Wings', Price:12.99},
{Artist:'The Doors', Album:'The Doors', Price:10.99},
{Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
{Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
{Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
{Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
{Artist:'The Doors', Album:'Strange Days', Price:12.99},
{Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
[Bindable]
private var dpADGActionScript:ArrayCollection = new ArrayCollection([
{Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
{Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
{Artist:'Saner', Album:'A Child Once', Price:11.99},
{Artist:'Saner', Album:'Helium Wings', Price:12.99},
{Artist:'The Doors', Album:'The Doors', Price:10.99},
{Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
{Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
{Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
{Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
{Artist:'The Doors', Album:'Strange Days', Price:12.99},
{Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
private function init():void
var arr:Array=[];//Intermediary array that will become the AdvancedDataGridColumn array
var col:AdvancedDataGridColumn = new AdvancedDataGridColumn();
col.dataField = "Artist";
arr.push(col);
col.dataField = "Album";
col.visible = false;
arr.push(col);
col.dataField = "Price";
col.itemRenderer = new ClassFactory(adg_test_renderer);
arr.push(col);
adgActionScript.columns = arr;
//ALTERNATE UNSUCCESFUL APPROACH
col.dataField = "Artist";
adgActionScript.columns.push(col);
col.dataField = "Album";
col.visible = false;
adgActionScript.columns.push(col);
col.dataField = "Price";
col.itemRenderer = new ClassFactory(adg_test_renderer);
adgActionScript.columns.push(col);
]]>
</mx:Script>
<mx:Label text="Explicit Columns"/>
<mx:AdvancedDataGrid
id="adgExplicit"
width="100%" height="100%"
sortExpertMode="true"
dataProvider="{dpADGExplicit}">
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Artist" />
<mx:AdvancedDataGridColumn dataField="Album" visible="false"/>
<mx:AdvancedDataGridColumn dataField="Price" itemRenderer="adg_test_renderer"/>
</mx:columns>
</mx:AdvancedDataGrid>
<mx:Label text="ActionScript Columns (If ActionScript works: Arist column should be hidden. Should see Album column with data and Price column with buttons."/>
<mx:AdvancedDataGrid
id="adgActionScript"
width="100%" height="100%"
sortExpertMode="true"
dataProvider="{dpADGActionScript}">
</mx:AdvancedDataGrid>
</mx:Application>
== END adg_test.mxml ====Thanks so much for your help.
Here's how I altered your code for my example. This logic allows easier assignment of additional column parameters.
=== START adg_test_renderer.mxml ===
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Button id="btnTest" label="Renderer Working"/>
</mx:VBox>
=== END adg_test_renderer.mxml ===
== START adg_test.mxml ====
<?xml version="1.0"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="init()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var dpADGExplicit:ArrayCollection = new ArrayCollection([
{Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
{Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
{Artist:'Saner', Album:'A Child Once', Price:11.99},
{Artist:'Saner', Album:'Helium Wings', Price:12.99},
{Artist:'The Doors', Album:'The Doors', Price:10.99},
{Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
{Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
{Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
{Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
{Artist:'The Doors', Album:'Strange Days', Price:12.99},
{Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
[Bindable]
private var dpADGActionScript:ArrayCollection = new ArrayCollection([
{Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
{Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
{Artist:'Saner', Album:'A Child Once', Price:11.99},
{Artist:'Saner', Album:'Helium Wings', Price:12.99},
{Artist:'The Doors', Album:'The Doors', Price:10.99},
{Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
{Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
{Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
{Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
{Artist:'The Doors', Album:'Strange Days', Price:12.99},
{Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
private function init():void
var arrCols:Array = adgActionScript.columns;
var col:AdvancedDataGridColumn;
col = new AdvancedDataGridColumn;
col.dataField = "Artist";
arrCols.push(col);
col = new AdvancedDataGridColumn;
col.dataField = "Album";
col.visible = false;
arrCols.push(col);
col = new AdvancedDataGridColumn;
col.dataField = "Price";
col.itemRenderer = new ClassFactory(adg_test_renderer);
arrCols.push(col);
adgActionScript.columns = arrCols;
adgActionScript.validateNow();
]]>
</mx:Script>
<mx:Label text="Explicit Columns"/>
<mx:AdvancedDataGrid
id="adgExplicit"
width="100%"
height="100%"
dataProvider="{dpADGExplicit}">
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Artist" />
<mx:AdvancedDataGridColumn dataField="Album" visible="false"/>
<mx:AdvancedDataGridColumn dataField="Price" itemRenderer="adg_test_renderer"/>
</mx:columns>
</mx:AdvancedDataGrid>
<mx:Label text="ActionScript Columns"/>
<mx:AdvancedDataGrid
id="adgActionScript"
width="100%"
height="100%"
dataProvider="{dpADGActionScript}">
</mx:AdvancedDataGrid>
</mx:Application>
== END adg_test.mxml ==== -
Add columns to RCOPOC_WKLT
Hi.
Does anyone know how can I add columns (from my structure) at the above report?
It's the CO60 transaction (Worklist for PI Sheets).
I think it's somthing about an enhancement for this report but how can I do it??
Thanks,
RebekaRobeka
There is no way you can do enhancement to add new column to the ALV.... See report RCOPOC_WKLT, subroutine "build_fieldcat"....
Though, you can modify this report by using access key or create Z-Copy of this report and modify it....
Thanks
Amol Lohade
Maybe you are looking for
-
How do I create a new event from a section of a long video clip
When I try to select a section of a long clip and drag it to a new event in the iMovie event library, the whole clip moves into the new event. Isn't there a way to just select and move a section to the new event?
-
How I can print an invoice (adobe connect)?
Somebody knows how I can print an invoice from my adobe connect account?
-
I tried to do the keychain first aid and it came up with the error of login keychain not found. I googled it and nothing was helpful. Should I take my mac in?
-
Hi all, I'm currently upgrading a CRM 2011 installation to CRM 2013 and there's a couple of areas which are using REST EndPoint in JavaScript to grab data from parent records. I was looking forward to trying out real time workflows and I've written t
-
Naming standards for BW queries
where could i get the naming standards for BW queries? Can somebody email me at singhpra(at)yahoo.com. thank you.