Af:tree table populate data with viewobject
Hi all,
I am trying to populate data into af:tree which binds with viewobject.
so i create recursive view object using view link.
then i populate data into view object programmatically.
but i found that those data show as normal table rather than tree structure.
is there any way to achieve this?
With Regard,s
Wai Phyo
Hi,
this doesn't work without partially refreshing the table I guess. You would need to set the link to disabled for the non-current row followed by a table refresh
Frank
Similar Messages
-
Selected node in a tree table (via Data Controls and not managed bean)
I am facing some problems in getting the selected row in a tree table.I have used data controls for creating the tree on the page.
I have 3 POJO's,ex; Class AB which has a list of Class CD.And Class CD has a list of class EF. (Used for the tree table)
Now i have a java class, called MyDelegate.java which has a list of AB.I generated data controls off this MyDelegate class and have dropped the ABlist as a tree table (also displaying CD and EF in the tree table).
It displays fine with nodes of AB,CD (child of AB)and EF(child of CD)
The tree table is not bound to any managed bean.
For performing actions on the tree, i create a method - "doSomething() in the delegate class",generate data controls and drop it as a button.
Inside doSomething(), i need acess to the selected node in the tree (it can be a node of type AB or CD or EF).
The problem: I always get access to the node of type AB, and not the child nodes no matter what i click in the tree table.
doSomething(){
DCBindingContainer dcBindingContainer = (DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
DCIteratorBinding dcTreeIteratorBinding = dcBindingContainer.findIteratorBinding("lstABIterator");
RowSetIterator rowTreeSetIterator = dcTreeIteratorBinding.getRowSetIterator();
DCDataRow rowTree = (DCDataRow)rowTreeSetIterator.getCurrentRow();
if (rowTree.getDataProvider() instanceof AB) {
//do something
AB selectedAB = (AB)row.getDataProvider();
} else if (rowTree.getDataProvider() instanceof CD){
//do something
} else if (rowTree.getDataProvider() instanceof EF) {
// do something
How do i access the "selected child node of the tree table" here in the delegate class method? Pls help.Hi Frank,
Thanks for the response. In my case, i dont have a managed bean, so i am slightly unsure how to do it.
There is a mention "Note that another way to access the treeTable component at runtime is to search for it in JavaServer Faces UIViewRoot. This latter option allows you to write more generic code and does not require to create a page dependency to a managed bean"
How do i use this adf view root (without a managed bean) to get hold of the selected row in the tree table. Pls help.
Thanks. -
Hi,
I wonder if there is a way to get the meta data from a table or structure using RFCs.
More detailed:
I am using RFCs to read data from tables and structures. It would be nice to have a way to also get the table definitions, like column headers, column types and contraints, etc. using RFC.
Does somebody know how to do that? (My test system is an IDES)
Thanks in advance
StefanIt's me again,
Today, I had a closer look on what you gave me yesterday. I think the problem is that I asked for the wrong information.
What I am actually looking for isn't meta information for tables, but information about the "Associated Type" that is associated with every import, export, or table parameter of a function module.
If I double-click on one of those types in transaction se37 after choosing a function module, I get a wonderful overview about the structure including 'component', 'component type', 'data type', 'length', etc.
Is there an RFC I can call that gives me exactly this information?
Best,
Stefan -
How can an external table handle data with line feed between delimiters?
I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
I have found that some of my VARCHAR fields have embeded line feeds.
Is it possible to have a definition that would remove any line feed characters between the delimiters?
Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
to also do this.
I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
Thanks for any help
Eric
CREATE TABLE table_ext
id NUMBER,
desc1 VARCHAR2(64 CHAR),
desc2 VARCHAR2(255 CHAR),
add_date DATE
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY data_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
CHARACTERSET WE8ISO8859P1
BADFILE log_dir:'table_ext.bad'
DISCARDFILE log_dir:'table_ext.dis'
LOGFILE log_dir:'table_ext.log'
FIELDS TERMINATED BY '|' LDRTRIM
MISSING FIELD VALUES ARE NULL
id INTEGER EXTERNAL(38),
desc1 CHAR(64),
desc2 CHAR(255),
add_date CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
LOCATION( 'data.txt' )
PARALLEL
REJECT LIMIT UNLIMITED;
1|short desc|long desc|2001-01-01 00:00
2|short desc| long
desc |1999-03-03 23:23
3|short desc| long desc | 2011-02-02 02:02Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
Eric -
Synchronize form with self-referencing VO in tree table. POJO Based Model
Hello. I need your help
ADF Code Corner sample #32 show how to build a tree table from a self referencing VO:
[http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples]
ADF Code Corner document Oracle JDeveloper OTN Harvest 09/2011 by Frank Nimphius show how to build an edit form for the table data and how to synchronize it with the selected row in the tree table:
[http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf]
This examples are helpful, but i have a problem, i have not a model based on a database, my application datamodel is based in POJO objects, there are no appModules or ViewObjects so I do not know how to reference the tree table target attribute with the edit form iterator.
Can anyone help me?
Maybe (i dont know how) i need make a VO and a AppModule that wraps the POJO model ?
thank you very muchHi,
this should work the same. You create a tree from a POJO Data Control based on your POJO Model. Expose another collection pointing to the same data set and drag it as the form. Use the setting on the tree configuration dialog to set the current row in the tree as the current in the form iterator.
Frank -
Tree Doesnt populate the whole data with HTTPService request
Hi,
I am working with the tree control which populates the tree
with the HTTPService request.
Step1. Make a HTTPService Request and fetch the top level
entries.
Step2. When ever the user opens an treeItem by clicking on
the Triangular icon besides the tree item
Make a HTTPService, fetch the data, on the callback method
append the Datasource with the new data for the item to open.
problem is the tree branch gets populated with partial data
instead of the full data where as the DataSource has the full data.
Step3. when ever the user clicks on the item
Make a HTTPService, fetch the data, on the callback method
append the Datasource with the new data for the item to open.
Now the tree item gets populated with the correct data.
tried every thing to refresh the tree....private function refreshTree():void{
tree.expandItem(rootNode, false);
tree.expandItem(rootNode, true);
this helped -
I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
1. Party (PartyId, Name)
2. Case (CaseId, CaseNo)
3. Petitioner (CaseId, PartyId) ............. Link Table
I am completely new to .Net and to begin with I download Microsoft's sample application and
following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
users can choose one from the dropdown list to add or edit the petitioner.Hello Barry,
Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
the sample available at the link you supplied.
To get the idea of the thing here is my code behind of a view vBoxPetitioner:
<UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:v="clr-namespace:CCIS.View.Case"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
d:DesignWidth="300"
d:DesignHeight="200">
<UserControl.Resources>
<DataTemplate DataType="{x:Type vm:vmPetitioner}">
<v:vPetitioner Margin="0,2,0,0" />
</DataTemplate>
</UserControl.Resources>
<Grid>
<HeaderedContentControl>
<HeaderedContentControl.Header>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Margin="2">
<Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
| <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
</TextBlock>
</StackPanel>
</HeaderedContentControl.Header>
<ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
</HeaderedContentControl>
</Grid>
</UserControl>
This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
Here is the code of vmPetitioner, a ViewModel:
Imports Microsoft.VisualBasic
Imports System.Collections.ObjectModel
Imports System
Imports CCIS.Model.Party
Namespace CCIS.ViewModel.Case
''' <summary>
''' ViewModel of an individual Email
''' </summary>
Public Class vmPetitioner
Inherits vmParty
''' <summary>
''' The Email object backing this ViewModel
''' </summary>
Private petitioner As tblParty
''' <summary>
''' Initializes a new instance of the EmailViewModel class.
''' </summary>
''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
Public Sub New(ByVal detail As tblParty)
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Me.petitioner = detail
End Sub
''' <summary>
''' Gets the underlying Email this ViewModel is based on
''' </summary>
Public Overrides ReadOnly Property Model() As tblParty
Get
Return Me.petitioner
End Get
End Property
''' <summary>
''' Gets or sets the actual email address
''' </summary>
Public Property fldPartyId() As String
Get
Return Me.petitioner.fldPartyId
End Get
Set(ByVal value As String)
Me.petitioner.fldPartyId = value
Me.OnPropertyChanged("fldPartyId")
End Set
End Property
End Class
End Namespace
And below is the ViewMode vmParty which vmPetitioner Inherits:
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports CCIS.Model.Case
Imports CCIS.Model.Party
Imports CCIS.ViewModel.Helpers
Namespace CCIS.ViewModel.Case
''' <summary>
''' Common functionality for ViewModels of an individual ContactDetail
''' </summary>
Public MustInherit Class vmParty
Inherits ViewModelBase
''' <summary>
''' Gets the underlying ContactDetail this ViewModel is based on
''' </summary>
Public MustOverride ReadOnly Property Model() As tblParty
'''' <summary>
'''' Gets the underlying ContactDetail this ViewModel is based on
'''' </summary>
'Public MustOverride ReadOnly Property Model() As tblAdvocate
''' <summary>
''' Gets or sets the name of this department
''' </summary>
Public Property fldName() As String
Get
Return Me.Model.fldName
End Get
Set(ByVal value As String)
Me.Model.fldName = value
Me.OnPropertyChanged("fldName")
End Set
End Property
''' <summary>
''' Constructs a view model to represent the supplied ContactDetail
''' </summary>
''' <param name="detail">The detail to build a ViewModel for</param>
''' <returns>The constructed ViewModel, null if one can't be built</returns>
Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Dim e As tblParty = TryCast(detail, tblParty)
If e IsNot Nothing Then
Return New vmPetitioner(e)
End If
Return Nothing
End Function
End Class
End Namespace
And final the code behind of the view vPetitioner:
<UserControl x:Class="CCIS.View.Case.vPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
Width="300">
<UserControl.Resources>
<ResourceDictionary Source=".\CompactFormStyles.xaml" />
</UserControl.Resources>
<Grid>
<Border Style="{StaticResource DetailBorder}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Petitioner:" />
<ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
</Grid>
</Border>
</Grid>
</UserControl>
The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
what I need to Know is how to route the binding path if it exists in a different ViewModel?
Sir, I look forward to your early reply bringing a workable solution to the problem I face.
Warm Regards,
Arun -
Issues while Populating data in Tree Table..
Hi,
I am using Tree Table component to populate Hierarchical data in it.
I create data controls based on web service proxy.
While creating Tree table i selected the Display Attributes to show in Tree table.
Now i am struck with two requirements:
1. At run time when i see the data in Tree table i can see that Display Attributes for mixed.
For Example:
Andrew> Phone
Work 123456789 // Here we can notice that, two attributes data displayed with on space gap. Phone Type and Phone number
Home 987654321 need to show some separation character between thenm something like : Work - 123456789 Is it possible?
> Email
work [email protected]
2. I need to show popup on click on Root node of the Tree table. If we take the above example, i want to perform a click event on "Andrew" so that i can popup and show some details.
But when i try to insert a command link in Node. Parent & Child nodes are populated with command link. How to have command link only for parent Node.
Code i am using:
*<af:treeTable value="#{bindings.contact.treeModel}" var="node"*
*selectionListener="#{bindings.contact.treeModel.makeCurrent}"*
*rowSelection="single"*
*binding="#{backingBeanScope.EditValidationDetails.tt1}"*
*id="tt1" width="920">*
*<f:facet name="nodeStamp">*
*<af:column id="c1" width="800" filterable="true">*
*<af:commandLink text="#{node}" id="cl2"/>*
*</af:column>*
*</f:facet>*
*<f:facet name="pathStamp">*
*<af:outputText value="#{node}"*
*binding="#{backingBeanScope.EditValidationDetails.ot3}"*
*id="ot3"/>*
*</f:facet>*
*</af:treeTable>*
Thanks in Advance...
Regards
ThoomHi,
I am using Tree Table component to populate Hierarchical data in it.
I create data controls based on web service proxy.
While creating Tree table i selected the Display Attributes to show in Tree table.
Now i am struck with two requirements:
1. At run time when i see the data in Tree table i can see that Display Attributes for mixed.
For Example:
Andrew
--Phone
----Work 123456789 // Here we can notice that, two attributes data displayed with on space gap. Phone Type and Phone number
----Home 987654321 need to show some separation character between thenm something like : Work - 123456789 Is it possible?
--Email
----work [email protected]
2. I need to show popup on click on Root node of the Tree table. If we take the above example, i want to perform a click event on "Andrew" so that i can popup and show some details.
But when i try to insert a command link in Node. Parent & Child nodes are populated with command link. How to have command link only for parent Node.
Code i am using:
<
<af:treeTable value="#{bindings.contact.treeModel}" var="node"
selectionListener="#{bindings.contact.treeModel.makeCurrent}"
rowSelection="single"
binding="#{backingBeanScope.EditValidationDetails.tt1}"
id="tt1" width="920">
<f:facet name="nodeStamp">
<af:column id="c1" width="800" filterable="true">
<af:commandLink text="#{node}" id="cl2"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}"
binding="#{backingBeanScope.EditValidationDetails.ot3}"
id="ot3"/>
</f:facet>
</af:treeTable>
>
Thanks in Advance...
Regards
Thoom -
How to populate data in dynamic internal table
Hi Expert,
fyi. My dynamic internal table field is created base on data selected. Eg. select table qpcd has 5 records. These 5 recods will become fieldname to my dynamic internal table. My dynamic internal table will be
...itab
01
02
03
04
05
The 5 records from qpcd is populated in another table call viqmel. I need to find the occurance of each code in viqmel and populate the number of occurance in itab in each of column. The final dynamic itab will be like this
table itab
01 02 03 04 05 -
> field name
2 0 1 0 1 -
> data
my source code like below
Report ZPLYGRND2.
TABLES: mara, makt.
TYPE-POOLS: slis, sydes.
DATA:it_fcat TYPE slis_t_fieldcat_alv,
is_fcat LIKE LINE OF it_fcat,
ls_layout TYPE slis_layout_alv.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
DATA: new_table TYPE REF TO data,
new_line TYPE REF TO data,
ob_cont_alv TYPE REF TO cl_gui_custom_container,
ob_alv TYPE REF TO cl_gui_alv_grid,
vg_campos(255) TYPE c,
i_campos LIKE TABLE OF vg_campos,
vg_campo(30) TYPE c,
vg_tables(60) TYPE c.
types : begin of t_qpcd,
codegruppe like qpcd-codegruppe,
code like qpcd-code,
end of t_qpcd.
data:wa_qpcd type t_qpcd,
i_qpcd type standard table of t_qpcd initial size 0.
FIELD-SYMBOLS: <l_table> TYPE table,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
select * into corresponding fields of wa_qpcd from qpcd
where katalogart = 'D'
and codegruppe = 'OOT01'.
append wa_qpcd to i_qpcd.
endselect.
loop at i_qpcd into wa_qpcd.
is_fcat-fieldname = wa_qpcd-code.
APPEND is_fcat TO it_fcat.
endloop.
LOOP AT it_fcat INTO is_fcat.
is_fieldcat-fieldname = is_fcat-fieldname.
is_fieldcat-ref_field = is_fcat-ref_fieldname.
is_fieldcat-ref_table = is_fcat-ref_tabname.
APPEND is_fieldcat TO it_fieldcat.
ENDLOOP.
*... Create the dynamic internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
if sy-subrc = 0.
endif.
*... Create a new line
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
LOOP AT <l_table> INTO <l_line>.
ENDLOOP.hello dear i m giving u a code in this a dynamic table is made on the basis of table in database , and u can download this data correct it , see it, or even change it....and upload in tht table help full if u dont know the table name...in advance.
also the code to populate data in dynamic table is in this code like:
SELECT * FROM (MTABLE_N)
INTO CORRESPONDING FIELDS OF TABLE <FS_ITAB> .
look at the whole program .hope this solve ur problem thanks.
REPORT ZTESTA MESSAGE-ID ZIMM .
TYPES : DATA_OBJECT TYPE REF TO DATA.
DATA : MITAB TYPE REF TO DATA .
TYPE-POOLS : SLIS .
DATA : IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV
WITH HEADER LINE .
DATA : IT_FIELDCATALOG TYPE LVC_T_FCAT .
DATA : WA_FIELDCATALOG TYPE LVC_S_FCAT .
DATA : I_STRUCTURE_NAME LIKE DD02L-TABNAME .
DATA : I_CALLBACK_PROGRAM LIKE SY-REPID .
DATA : DYN_LINE TYPE DATA_OBJECT .
FIELD-SYMBOLS : <FS_ITAB> TYPE STANDARD TABLE .
DATA : TABLE_NAME_IS_VALID TYPE C .
DATA : DYNAMIC_IT_INSTANTIATED TYPE C .
CONSTANTS BUTTONSELECTED TYPE C VALUE 'X' .
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_TABL.
PARAMETERS : MTABLE_N LIKE RSRD1-TBMA_VAL
MATCHCODE OBJECT DD_DBTB_16 OBLIGATORY .
DATA CHECKTABLED.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_FILE.
PARAMETERS : MFILENAM LIKE RLGRAP-FILENAME .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_DOWN.
PARAMETERS : P_DOWNLD RADIOBUTTON GROUP GRP1
USER-COMMAND M_UCOMM .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_CHKF.
PARAMETERS : P_CHKFIL RADIOBUTTON GROUP GRP1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_UPLD.
PARAMETERS : P_UPLOAD RADIOBUTTON GROUP GRP1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_SHOW.
PARAMETERS : P_SHOW_T RADIOBUTTON GROUP GRP1 .
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT .
PERFORM CHECK_FILENAME .
AT SELECTION-SCREEN.
IF SY-UCOMM = 'ONLI'.
CHECKTABLED = MTABLE_N+0(1).
IF CHECKTABLED NE 'Z'.
MESSAGE I017.
LEAVE TO SCREEN 1000.
ENDIF.
IF SY-UNAME NE 'KAMESH.K'.
MESSAGE I023 WITH SY-UNAME.
LEAVE TO SCREEN 1000.
ENDIF.
ENDIF.
IF SY-UCOMM = 'PRIN'.
CHECKTABLED = MTABLE_N+0(1).
IF CHECKTABLED NE 'Z'.
MESSAGE I017.
LEAVE TO SCREEN 1000.
ENDIF.
IF SY-UNAME NE 'KAMESH.K'.
MESSAGE I023 WITH SY-UNAME.
LEAVE TO SCREEN 1000.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MFILENAM .
PERFORM F4_FOR_FILENAME .
INITIALIZATION .
T_TABL = 'Table Name' .
T_FILE = 'File Name' .
T_DOWN = 'Download Table' .
T_CHKF = 'Check File to Upload' .
T_UPLD = 'Upload File' .
T_SHOW = 'Show Table Contents' .
START-OF-SELECTION .
PERFORM CHECK_TABLE_NAME_IS_VALID .
END-OF-SELECTION .
IF TABLE_NAME_IS_VALID EQ ' ' .
MESSAGE I398(00) WITH 'INVALID TABLE NAME' .
ELSE .
PERFORM INSTANTIATE_DYNAMIC_INTERNAL_T .
CHECK DYNAMIC_IT_INSTANTIATED = 'X' .
CASE BUTTONSELECTED .
WHEN P_DOWNLD .
PERFORM SELECT_AND_DOWNLOAD .
WHEN P_CHKFIL .
PERFORM CHECK_FILE_TO_UPLOAD .
WHEN P_UPLOAD .
PERFORM UPLOAD_FROM_FILE .
WHEN P_SHOW_T .
PERFORM SHOW_CONTENTS .
ENDCASE .
ENDIF .
FORM CHECK_TABLE_NAME_IS_VALID.
DATA MCOUNT TYPE I .
TABLES DD02L .
CLEAR TABLE_NAME_IS_VALID .
SELECT COUNT(*) INTO MCOUNT FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'TABL'
AND OBJ_NAME = MTABLE_N .
IF MCOUNT EQ 1 .
CLEAR DD02L .
SELECT SINGLE * FROM DD02L WHERE TABNAME = MTABLE_N .
IF SY-SUBRC EQ 0.
IF DD02L-TABCLASS = 'TRANSP' .
TABLE_NAME_IS_VALID = 'X' .
ENDIF .
ENDIF.
ENDIF .
ENDFORM. " CHECK_TABLE_NAME_IS_VALID
FORM SELECT_AND_DOWNLOAD.
CLEAR : <FS_ITAB> .
SELECT * FROM (MTABLE_N)
INTO CORRESPONDING FIELDS OF TABLE <FS_ITAB> .
PERFORM CHECK_FILENAME.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = MFILENAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = <FS_ITAB>
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC EQ 0.
MESSAGE I398(00) WITH 'Table' MTABLE_N
'successfully downloaded to '
MFILENAM .
ENDIF.
ENDFORM. " SELECT_AND_DOWNLOAD
FORM UPLOAD_FROM_FILE.
DATA : ANS TYPE C .
DATA : LINES_OF_ITAB TYPE I .
DATA : MSY_SUBRC TYPE I .
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
TEXTLINE1 = 'Are you sure you wish to upload'
TEXTLINE2 = 'data from ASCII File to DB table '
TITEL = 'Confirmation of Data Upload'
IMPORTING
ANSWER = ANS.
IF ANS = 'J' .
PERFORM CHECK_FILENAME.
CLEAR MSY_SUBRC .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = MFILENAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = <FS_ITAB>
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
MSY_SUBRC = MSY_SUBRC + SY-SUBRC .
IF SY-SUBRC EQ 0.
DESCRIBE TABLE <FS_ITAB> LINES LINES_OF_ITAB .
IF LINES_OF_ITAB GT 0 .
MODIFY (MTABLE_N) FROM TABLE <FS_ITAB> .
MSY_SUBRC = MSY_SUBRC + SY-SUBRC .
ENDIF .
ENDIF.
IF MSY_SUBRC EQ 0 .
MESSAGE I398(00) WITH LINES_OF_ITAB
'Record(s) inserted in table'
MTABLE_N .
ELSE .
MESSAGE I398(00) WITH
'Errors occurred No Records inserted in table'
MTABLE_N .
ENDIF .
ENDIF .
ENDFORM. " UPLOAD_FROM_FILE
FORM F4_FOR_FILENAME.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = 'C:\'
MASK = ',.,..'
MODE = '0'
IMPORTING
FILENAME = MFILENAM
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDFORM. " F4_FOR_FILENAME
FORM CHECK_FILENAME.
IF MFILENAM IS INITIAL
AND NOT ( MTABLE_N IS INITIAL )
AND P_SHOW_T NE BUTTONSELECTED.
CONCATENATE 'C:\'
MTABLE_N '.TXT' INTO MFILENAM.
ENDIF .
ENDFORM. " CHECK_FILENAME
FORM INSTANTIATE_DYNAMIC_INTERNAL_T.
CLEAR DYNAMIC_IT_INSTANTIATED .
I_STRUCTURE_NAME = MTABLE_N .
CLEAR IT_FIELDCAT[] .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = I_STRUCTURE_NAME
CHANGING
CT_FIELDCAT = IT_FIELDCAT[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC EQ 0.
LOOP AT IT_FIELDCAT .
CLEAR WA_FIELDCATALOG .
MOVE-CORRESPONDING IT_FIELDCAT TO WA_FIELDCATALOG .
WA_FIELDCATALOG-REF_FIELD = IT_FIELDCAT-FIELDNAME .
WA_FIELDCATALOG-REF_TABLE = MTABLE_N .
APPEND WA_FIELDCATALOG TO IT_FIELDCATALOG .
ENDLOOP .
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FIELDCATALOG
IMPORTING
EP_TABLE = MITAB .
ASSIGN MITAB->* TO <FS_ITAB> .
DYNAMIC_IT_INSTANTIATED = 'X' .
ENDIF.
ENDFORM. " INSTANTIATE_DYNAMIC_INTERNAL_T
FORM SHOW_CONTENTS.
CLEAR : <FS_ITAB> .
SELECT * FROM (MTABLE_N)
INTO CORRESPONDING FIELDS OF TABLE <FS_ITAB> .
I_CALLBACK_PROGRAM = SY-REPID .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = I_CALLBACK_PROGRAM
IT_FIELDCAT = IT_FIELDCAT[]
TABLES
T_OUTTAB = <FS_ITAB>
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. " SHOW_CONTENTS
FORM CHECK_FILE_TO_UPLOAD.
PERFORM CHECK_FILENAME.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = MFILENAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = <FS_ITAB>
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC EQ 0.
I_CALLBACK_PROGRAM = SY-REPID .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = I_CALLBACK_PROGRAM
IT_FIELDCAT = IT_FIELDCAT[]
TABLES
T_OUTTAB = <FS_ITAB>
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDIF .
ENDFORM. " CHECK_FILE_TO_UPLOAD
Message was edited by:
SAURABH SINGH
SENIOR EXECUTIVE
SAMSUNG INDIA ELECTRONICS LTD.,NOIDA -
How to populate data in PAY_PEOPLE_GROUPS table (People Group Flexfiled)
Hello
We are migrating the data from one oracle instance to another oracle instance which are in same version of Oralce Applications 11.5.10.2. As a part of migration can anybody let me know how to populate data in "People Group Key Flexfiled" (PAY_PEOPLE_GROUPS table), ideally I will create or update employee records from the source instance to destination instance, so while creating or updating the employee records in can pass people_group_id while calling to the assignment api but my question here is before passing group id to the api i should have the data populated in PAY_PEOPLE_GROUPS TABLE so that i can fetch the group id as per the combination and pass it in to the api.. please suggest...Thanks for your information! by any chance do you have any sample code which will create/update assignments with People Group Flexfield; when i check "hr_assignment_api.update_emp_asg_criteria" it only has parameter to pass people group id and not having segments parameters to pass individual segments.
Also let me know the links if you have any for all HR API guide which will help me to develope the interfaces...
My requirement is we have two instances in which in one instance we are treating as source for HR which will be used to master for all HR related activities and we are planning to develope an interface which will bring master instance in sync with dummy instance. -
How to use tree tables with CRUD operation for begineers ADF 11g
This is Friday night call for help.
This is only few sample ressources on the web for tree table and only one with CRUD operation.
I used this one http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html because this is the only one that address CRUD.
And it is shaky. Deletion works fine but insertion not very well. This is working using custom code provided below.
Depending if the user selection in the tree, the code insert from the master node to the children node.
Any other options because it is not working well.
Also where Oracle describes how to use the row, rowset, itorator API? This is really hard to understand like almost if we should not use it.
then if not how can I insert in tree with two nodes and insert in the parent or children depending the users selection.
Lately I 'been posting questions on this forum with no response. This hurts. I understand developers cannot spend their time on this but People from Oracle, please help. We pay licenses...
public void createChildren(RowIterator ri, Key selectedNodeKey) {
final String deptViewDefName = "model.DepartmentsView";
final String empViewDefName = "model.EmployeesView";
if (ri != null && selectedNodeKey != null) {
Row last = ri.last();
Key lastRowKey = last.getKey();
// if the select row is not the last row in the row iterator...
Row[] found = ri.findByKey(selectedNodeKey, 1);
if (found != null && found.length == 1) {
Row foundRow = found[0];
String nodeDefname =
foundRow.getStructureDef().getDefFullName();
if (nodeDefname.equals(deptViewDefName)) {
RowSet parents =
(RowSet)foundRow.getAttribute("EmployeesView");
Row childrow = parents.createRow();
parents.insertRow(childrow);
} else {
RowSet parents =
(RowSet)foundRow.getAttribute("EmployeesView");
Row childrow = parents.createRow();
childrow.setAttribute("DepartmentId",
foundRow.getAttribute("DepartmentId"));
parents.insertRow(childrow);
} else {
System.out.println("Node not Found for " + selectedNodeKey);
}I am looking for a sample that describe how to design a jsf page with a tree table.
So you have Department and employees. In the tree first comes Department and if you click the node you see the employees assigned to this department.
I need to be able to insert a new department or a new employee from the tree table by clicking on a insert button in the panel collection toolbar depending on user selection in the tree.
I got part of it working but not good enough.
By problem is the get insertion working
I have a createChildren method in my AM implementation that get in input a RowIterator and selected node key.
To goal is to create new records depending of the user selection and the input parameters get populated by the binding like this:
#{backing_treeSampleBean.selectedNodeRowIterator} #{backing_TreeSampleBean.selectedNodeRowkey} via method binding with parameters.
Is it the right approach?
First to be able to insert a parent record, I select nothing in the tree and ri and selectedNodeKey comes to null
we run this code
ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
//ViewObjectImpl vo = getDepartmentsView1();
Row foundRow = vo.first();
Row childrow = vo.createRow();
vo.insertRow(childrow);
A new blank entry appears in the parent node and we enter a value.
The the problem starts when we want to add a child to this parent.
We select the created parent and press the insert button, this code get executed
if (nodeDefname.equals(deptViewDefName))
//list of the children of the parent and create an new row
RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
Row childrow = childRows.createRow();
childRows.insertRow(childrow);
But the new entry does not appear, it is almost like it would be created for a different parent because this is a mandatory field that is not feel in yet and the interface complaints of a missing value. It is created somewhere just not a the right place... This is my guess.
Do you see something wrong with the code?
The full code og my create children method is there below
I am using jdeveloper 11.1.1.3.0 any issues with tree table to know about with this version?
Thanks for your help
public void createChildren(RowIterator ri, Key selectedNodeKey) {
final String deptViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidaySchedExceptionsView";
final String empViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidayExceptionDatesView";
if (ri != null && selectedNodeKey != null) {
// last row
Row last = ri.last();
Key lastRowKey = last.getKey();
// if the select row is not the last row in the row iterator...
Row[] found = ri.findByKey(selectedNodeKey, 1);
if (found != null && found.length == 1) {
// foundRow is the row selected
Row foundRow = found[0];
// The row selected can be the parent node or the child node
String nodeDefname = foundRow.getStructureDef().getDefFullName();
// if parent row
if (nodeDefname.equals(deptViewDefName))
//list of the children of the parent and create an new row
//works but we try to resolve the creation of a parent
RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
Row childrow = childRows.createRow();
//childrow.setAttribute("HolidayDate", new java.util.Date().getDate());
System.out.println("insert child row from master");
childRows.insertRow(childrow);
} else
//RowSet ParentRow = (RowSet)foundRow.getAttribute("SchHolidaySchedExceptionsView");
//RowSet childRows = (RowSet)ParentRow.first().getAttribute("SchHolidayExceptionDatesView");
Row childrow = ri.createRow();
System.out.println("insert child row from child ");
} else {
System.out.println("Node not Found for " + selectedNodeKey);
} else {
System.out.println(" param null try creating for first row : " +
ri + " * " + selectedNodeKey);
ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
Row foundRow = vo.first();
Row childrow = vo.createRow();
vo.insertRow(childrow);
} -
Hi how can i fetch the data from tree table
Hi i am designing a UI in which i am creating a java tree table as on sun java site http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html now i have to fetch the perticular column value on the mouse click.I have implemented mouse listener and on mouse clicked event I tried :
Object obj=tableInputOutputEntities.getValueAt(tableInputOutputEntities.getSelectedRow(),tableInputOutputEntities.getSelectedColumn());
as we usually do in case on JTable but it is also throwing null exception. Again after going through forum i found some code to get the current row and current column selected values and tried with getValueAt(int,int) method but still it is throwing nulll pointer exception. Please help me out.
public void mouseClicked(MouseEvent e)
Point p = e.getPoint();
int row = treeTable.rowAtPoint(p);
int column = treeTable.columnAtPoint(p);
Object obj=treeTable.getValueAt(row,column);
System.out.println("Object value: "+obj.toString());
}Regards
NaxyHello Kevin,
The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier. -
ADF Issue with Tree Table , Child Row not getting rendered.
Hi All,
I am trying to show a single Level Master-Detail Table via ADF Tree Table.
I have MasterVO : InventoryVO (1 SubInventoryCode)
DetailVO: SubInventoryVO (n :SubInventoryCode)
Both VOs are SQL query based VO with bindVariables.
I have a viewLink between MasterVO and ChildVO (1:n relationship)
I dragged and drop the MasterVO as a tree Table. I added the Rule in the Tree Binding too.
I have the Tree table under a Tab , I execute the AM impl method when the Tab is clicked where I set the bindvariables of the MasterVO and ChildVO and execute it.
when I run the Page , the VO query gets executed but the I am able to see only the MasterVO Datas, and when I click MasterVO ROW , the Table doesnt expand and it doesnt render any ChildVO ROws.
Please find the Page Definition and Jspx Page Code Below
Page Definition Code
<tree IterBinding="ItemsLocatorIterator" id="ItemsLocator">
<nodeDefinition DefName="xxplp.oracle.adf.items.model.view.ItemsLocatorVO"
Name="ItemsLocator0">
<AttrNames>
<Item Value="SubinventoryCode"/>
<Item Value="Openorderqty"/>
<Item Value="Openwoqty"/>
<Item Value="Qoh"/>
</AttrNames>
<Accessors>
<Item Value="ItemSubInventoryVO"/>
</Accessors>
</nodeDefinition>
<nodeDefinition DefName="xxplp.oracle.adf.items.model.view.ItemSubInventoryVO"
Name="ItemsLocator1">
<AttrNames>
<Item Value="Locator"/>
</AttrNames>
</nodeDefinition>
</tree>Jspx Page Code
<af:treeTable value="#{bindings.ItemsLocator.treeModel}"
var="node"
selectionListener="#{bindings.ItemsLocator.treeModel.makeCurrent}"
rowSelection="single" id="tt2"
styleClass="AFStretchWidth"
rowDisclosureListener="#{backingBeanScope.TabListenerBean.LocationTableRowDisclosureListener}">
<f:facet name="nodeStamp">
<af:column id="c110">
<af:outputText value="#{node.SubinventoryCode}" id="ot116"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}" id="ot117"/>
</f:facet>
<af:column id="c111"
headerText="#{bindings.ItemsLocator.hints.Qoh.label}">
<af:outputText value="#{node.Qoh}" id="ot118"/>
</af:column>
<af:column id="column1"
headerText="#{bindings.ItemsLocator.hints.Openorderqty.label}">
<af:outputText value="#{node.Openorderqty}"
id="outputText1"/>
</af:column>
<af:column id="column2"
headerText="#{bindings.ItemsLocator.hints.Openwoqty.label}">
<af:outputText value="#{node.Openwoqty}"
id="outputText2"/>
</af:column>
<af:column id="column3"
headerText="Locator">
<af:outputText value="#{node.Locator}"
id="outputText3"/>
</af:column>
</af:treeTable>I was able to find the issue which is causing the problem, both the VOs are SQL Query Based VOs.
The ChildVO (SubInventoryVO) is has a bindvariable in its Query, which is losing its value when the viewlink accessor query gets appended to it.
Please find the query below
SELECT * FROM (SELECT MOTV.ORGANIZATION_CODE, MOTV.SUBINVENTORY_CODE
FROM MTL_ONHAND_TOTAL_V MOTV
WHERE INVENTORY_ITEM_ID = :P_INVENTORY_ITEM_ID) QRSLT WHERE ORGANIZATION_CODE = :Bind_OrganizationCode Though I am setting the VO query before the Table is rendered, ":P_INVENTORY_ITEM_ID".
Its Losing its value, when the above whereclause "ORGANIZATION_CODE = :Bind_OrganizationCode " gets appended to it.
I am thinking to use ExecuteWithParams Operation on SelectionListener method of the Tree Table to set the ":P_INVENTORY_ITEM_ID" bind variable, but I also want the viewLinkAccessor rule also to be applied ..
Please suggest me how to retain the implicit bindVariable of the Query. -
Hi,
I have the following requirement where i need to display a tree table. Here is how the initial implementation is:
I have created the read only view for : ManagersVO > PoolsVO > MachinesVO. Where 'MachinesVO' is the destination view. And created view links between ManagersVO & PoolsVO using ManagerId and PoolsVO & MachinesVO using PoolId.
And using this implementation, successfully created tree table on the UI. Now we got an enhancement for this:
i.e., MachinesVO should return list of machines as per user logs in. i.e., we have 4 different roles. 'Super Admin', 'Sys Admin', 'App Admin', 'End User'. The default query for MachinesVO is for 'Super Admin'. The query for other user roles is different except the SELECT statement.
The requirement is to dynamically change the query of MachinesVO based on user logs in and display the tree table accordingly. To implement the same i have tried using setQuery() operation on 'MachinesVO' which results with the following error:
JBO-26016: InvalidOperException
Cause: You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.
Action: Do not call setQuery() if the view object is a detail.
Can one suggest me a best solution to implement this.
Thanks & Regards,
KiranHi Navaneetha Krishnan,
Here is how i implemented based on your comments. As i have tree table based 3 different VO's, created the following method at middle view(i.e., PoolsVO).
1.Tree Model hierarchy
ManagersVO > PoolsVO > MachinesVO
I actually want to filter the data at Machines level. Hence wrote a method at PoolsVOImpls and exposed it in the PoolsVO client interface. Here is the code that i have placed in the PoolVOImpl
public class PoolsVOImpl extends ViewObjectImpl implements PoolsVO{
* This is the default constructor (do not remove).
public PoolsVOImpl () {
public void filterMachinesDataByUserRole(String userRole,String vzId){
Row row = getCurrentRow();
String query = "";
if(row != null){
RowSet rowSet = (RowSet)row.getAttribute("MachinesVO");
if(rowSet != null){
MachinesVOImpl machinesVOImpl = (MachinesVOImpl)rowSet.getViewObject();
if(userRole.equalsIgnoreCase("SYS ADMIN")){
machinesVOImpl .setWhereClause(query related to sysadmin);
//Similarly for other user roles.
executeQuery();
}And this piece of code needs to be executed before the jsff(which has the tree table) renders. Hence, i created a this methodAction as a default activity in the respective taskflow where the jsff is placed. Once this method get executed, the page should render the machines specific to the user.
Here is the issue: getCurrentRow() method call is returning always NULL.
Please correct me if i'm doing something wrong. I do tried the above mentioned approach by creating the method at '*ManagersVOImpl*' level too. Still the same issue.
Thanks & Regards,
Kiran -
To populate data in a dynamic internal table
Hi,
I have an internal table <FS_1> which I have created dynamically. Now i need to populate the columns (7th column onwards) in the internal table with my data in GT_REQMT which is an internal table.
Data: L_IDX type I.
L_IDX = 6.
Loop at <FS_1> assigning <FS_2>.
If sy-tabix = 1.
Loop at GT_REQMT.
Add 1 to L_IDX.
*****I need to populate GT_REQMT-DATA to column 7 then 8 etc depending on the number of loops.
Modify <FS_1> from <FS_2>.
Endloop.
Else.
**do other things here**
Endif.
Endloop.
I have search through the forums and weblogs but the solutions are catered to populating the internal tables from SAP database using SQL statements.
I couldn't find anything on populating own data in dynamic table by looping it. Please help. THANKS!!
Cheers,
ChelseaHi!
I have used classes for dynamic internal table, SO i here give you my sample code for your help.
DATA : new_table TYPE REF TO data,
new_line TYPE REF TO data.
FIELD-SYMBOLS : <TAB1> type standard table,
<l_table> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
count = count + 1.
clear wa_fieldcat.
wa_fieldcat-col_pos = count.
wa_fieldcat-fieldname = 'CONDITION'.
wa_fieldcat-coltext = 'Condition Value'.
wa_fieldcat-ref_field = 'KWERT'.
wa_fieldcat-ref_table = 'KONV'.
wa_fieldcat-outputlen = 13.
append wa_fieldcat to it_fieldcat.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
ASSIGN COMPONENT KWERT OF STRUCTURE <l_line> TO <l_field>.
<l_field> = t_kschlkonv-vtext.
NOw u append internal table
IF its helps you then dont forget to rewards points.
Regards From
Priyank
Maybe you are looking for
-
-- both my machine and their machine are intel macs running snow leopard. Thanks, NEIL
-
Acrobat 9 Pro resets printer after using "Summarize Comments"
When trying to print comments, if you chose your printer, then go through the "Summarize Comments" dialog box, after you hit "Print Comment Summary" it resets to the default printer. Is there any way, other than changing the default printer, to fix t
-
Partial divestiture : transaction type
Dear SDNers, I have a simple question concerning the Partial divestiture activity : Is it normal that the system doesn't post with "Disposal" transaction type when we have a Partial Divestiture ? Is it possible to change this behaviour ? Many thanks
-
MBGMCR03 (DC_STOCKCHNG_IN) shows wrong message in Status 53
Hi all, We successfully processed the MBGMCR03 (DC_STOCKCHNG_IN) IDoc. Yet, in Status Record 53 the message "BAPI CREATEFROMDATA has been called successfully" has been shown, while we expected a message like "Document xxxxxxxxxx posted". In which "xx
-
A plethora of complaints about LR 1.4.1
Can't rename large batch of files at once. When I try to rename more than a couple of hundred files, I inevitably get an error that such and such a file can't be renamed. Upon checking I find that no files after that file were renumbered. I go to the