Display data in a custom container
Hi All,
My requirment is to just display data in a custom container.
I could able to display data in change mode but not display mode.Can you please let me now how can i do that.
Thanks in Advance
KV
Im using cl_gui_custom_container.
In PBO
here is my code whihc is fine for Change/Edit mode.
create control container
CREATE OBJECT g_editor_container
EXPORTING
container_name = 'DISP_CONT'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
do nothing
ENDIF.
create calls constructor, which initializes, creats and links
a TextEdit Control
CREATE OBJECT g_editor
EXPORTING
parent = g_editor_container
wordwrap_mode = cl_gui_textedit => wordwrap_at_fixed_position
wordwrap_to_linebreak_mode = cl_gui_textedit=>TRUE
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
do nothing
ENDIF.
In PAI
CALL METHOD g_editor->get_text_as_r3table
IMPORTING
table = Text_table
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
ENDIF.
Text_table contains messages which r supposed to be displayed.
Based on certain logical operations i will display the messages.
Similar Messages
-
Hi,
I want to reuse the same custom container screen for a different data.
First screen there will be button 1 and button 2
if I click button 1 then calculate and display data in custom container, if button 2 is clicked then calculate and display data with in the same custom container.
For this
1. Created Custom container - CONTAINER
2. In program defined and created custom container and custom alv grid
g_custom_container TYPE REF TO cl_gui_custom_container,
alv_grid TYPE REF TO cl_gui_alv_grid.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'CONTAINER'.
CREATE OBJECT alv_grid
EXPORTING
i_parent = g_custom_container.
ENDIF.
3. Display data using CALL METHOD alv_grid->set_table_for_first_display
every thing works great for button 1
4. when button 2 is clicked then calculate and display different set of data in same custom container which is used earlier.
5. here I used
call method alv_grid->free.
call method g_custom_container->free.
6. create above objects once again and tried to use
call method alv_grid->set_table_for_first_display
, to reuse the same custom container 'CONTAINER' again for a different set of data and getting ABAP dump.
In debug mode, when I used the above method FREE for both ALV_GRID and G_CUSTOM_CONTAINER objects are not clearing.
Please let me know how can I reuse the same container for a different set of data when button2 is pressed.
Thanks in advance,
Krishna
Please use code tags to format your code and post in the correct forum
Edited by: Rob Burbank on Oct 1, 2010 2:37 PMHello Krishna
I would recommend to use a different approach instead of trying to initialize your container instances:
DATA:
go_container_1 TYPE REF TO cl_gui_custom_container,
go_container_2 TYPE REF TO cl_gui_custom_container,
go_grid_1 TYPE REF TO cl_gui_alv_grid,
go_grid_2 TYPE REF TO cl_gui_alv_grid.
" NOTE: Do this coding BEFORE calling the screen
* (1) Create 2 containers
CREATE OBJECT g_container_1
EXPORTING
container_name = 'CONTAINER'.
CREATE OBJECT g_container_2
EXPORTING
container_name = 'CONTAINER'.
" NOTE: If it is not possible to use the same container name then either create an additional
" dummy screen having a second CUSTOM_CONTROL element or replace
" the customer containers with docking containers -> here you do not need to give a container name
* (2) Create 2 grid instances using a different container
* (3) Link the first container to the screen using its LINK method:
CALL METHOD go_container_1
EXPORTING
repid = <...>
dynnr = <...>.
* (4) Perhaps you need to define a second dummy screen to which you link the second container
* (5) Display first grid instance (as default)
Now when the user pushes button 2 (to display the second grid) link container_1 to the dummy screen
and link container_2 to your main screen.
Regards
Uwe -
Hello.
I have created a splitter container and display it in a custom container. Then I tried
to erase the splitter container and insert a new one but it still showed the deleted splitter container. It appears to me that custom containers could not be cleared and reuse.
If you know how to reuse custom containers please help me.
Thanks in advance,
Udi.hi
good
go through these links,might help you to solve your problem
http://help.sap.com/saphelp_nw2004s/helpdata/en/d3/2955360b00a115e10000009b38f839/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/64/9e7759068011d294f000a0c94260a5/content.htm
thanks
mrutyun^ -
In R/3 display smartform as pdf in a custom container
Hello,
I want to display smartform as pdf in a custom contianer . I was able to find all the right code from sdn.
but my problem is that when executed my sap gui is closed without any error.
I am unable to understand what is going wrong.
CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
IN_PLACE = 'X' ). does not show the pdf.
Can any one help me to find out if we need to do some setting for MIME type application/pdf. Because I tried to display a bar chart in the custom container of MIME type text/html , and this is working fine.
Is any setting missing in our R/3 because of which the code is not getting executed.
below code is the exact copy from a post in sdn:
report ztest_pdf.
DATA: LT_PDF TYPE TABLE OF TLINE,
LS_PDF LIKE LINE OF LT_PDF,
LV_URL TYPE CHAR255,
PDF_FSIZE TYPE I,
LV_CONTENT TYPE XSTRING,
LT_DATA TYPE STANDARD TABLE OF X255.
DATA : L_JOB_OUTPUT_INFO TYPE SSFCRESCL.
DATA : LS_CONTROL_PARAM TYPE SSFCTRLOP.
DATA : G_HTML_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
G_HTML_CONTROL TYPE REF TO CL_GUI_HTML_VIEWER.
* pdf_control type ref to cl_gui_pdfviewer.
DATA : P_VBELN TYPE VBELN_VL.
DATA : i_html TYPE w3htmltabtype.
", g_url TYPE w3url
FIELD-SYMBOLS <FS_X> TYPE X.
INITIALIZATION.
LS_CONTROL_PARAM-GETOTF = 'X'.
LS_CONTROL_PARAM-NO_DIALOG = 'X'.
START-OF-SELECTION.
CALL FUNCTION '/1BCDWB/SF00000298'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = LS_CONTROL_PARAM
* P_VBELN = P_VBELN
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
IMPORTING
* DOCUMENT_OUTPUT_INFO = L_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = L_JOB_OUTPUT_INFO
* JOB_OUTPUT_OPTIONS = L_JOB_ OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
data pdfxstring type xstring.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = PDF_FSIZE
bin_file = pdfxstring
TABLES
OTF = L_JOB_OUTPUT_INFO-OTFDATA
LINES = LT_PDF
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
CALL SCREEN 100.
module STATUS_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
CREATE OBJECT G_HTML_CONTAINER
EXPORTING
CONTAINER_NAME = 'PDF'.
CREATE OBJECT G_HTML_CONTROL
EXPORTING
PARENT = G_HTML_CONTAINER.
* Convert xstring to binary table to pass to the LOAD_DATA method
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = pdfxstring"LV_CONTENT
TABLES
BINARY_TAB = LT_DATA.
* PERFORM bar_chart .
* Load the HTML
CALL METHOD G_HTML_CONTROL->LOAD_DATA(
EXPORTING
TYPE = 'application' "'text' " 'application'
SUBTYPE = 'pdf' "'html' "'pdf'
IMPORTING
ASSIGNED_URL = lv_URL
CHANGING
DATA_TABLE = LT_DATA "i_html "LT_DATA
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_GENERAL = 2
CNTL_ERROR = 3
OTHERS = 4 ).
* Show it
CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
IN_PLACE = 'X' ).
Thanks,
Jaya.
Edited by: kishan P on Jun 9, 2011 1:40 PMHello Sandra,
Thanks for your reply, but eventhen it fails to load the pdf. Is ADS required to be installed for this?
Can I just pass the pdf_fsize imported from CONVERT_OTF which is of type i.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = PDF_FSIZE
bin_file = pdfxstring
TABLES
OTF = L_JOB_OUTPUT_INFO-OTFDATA
LINES = LT_PDF
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
CALL METHOD G_HTML_CONTROL->LOAD_DATA(
EXPORTING
TYPE = 'application' "'text' " 'application'
SUBTYPE = 'pdf' "'html' "'pdf'
size = PDF_FSIZE
IMPORTING
ASSIGNED_URL = lv_URL
CHANGING
DATA_TABLE = LT_DATA "i_html "LT_DATA
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_GENERAL = 2
CNTL_ERROR = 3
OTHERS = 4 ).
Thanks,
Jaya. -
Displaying ALV output in whole screen when using with custom container
I have created a custom container and displaying output of a table in the ALV format using call method grid->set_table_for_first_display. But the output does not display in the entire screen. I want the output to cover the whole screen depending on user screen resolution. The code is given below for reference.
create object grid
exporting
i_parent = g_custom_container.
call method grid->set_table_for_first_display
exporting
IS_VARIANT = ld_variant
I_SAVE = 'A'
is_layout = layout_alv_grid
changing
it_outtab = final_display_itab
it_fieldcatalog = itab_fieldcatalogHello,
DATA: go_splitter TYPE REF TO cl_gui_splitter_container,
go_container TYPE REF TO cl_gui_container,
go_grid TYPE REF TO cl_gui_alv_grid.
CREATE OBJECT go_splitter
EXPORTING
parent = cl_gui_container=>default_screen
rows = 1
columns = 1
metric = '0001'.
go_container = go_splitter->get_container( row = 1 column = 1 ).
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
Regards,
Ernst -
Help Regarding a Picture Display in Customer Container.
Hi,
I am generating a ALV report output with an ICON in every line to show the corresponding picture of the material in a Pop-up window.
Now for displaying the picture at usercommand from ALV ,
HTML browser is placed on the custom container screen and the URL is passed to the variable EDURL which helps in processing the material picture on the screen.
The issues that in this process is.. Picture pop-up currently shows briefly the previous picture before retrieving requested image .
Please help me to solve this,
Thanks
Priyanka.Hi,
While calling the pop up clear, refresh all the variables and pass the new values.
I guess when you are calling the Image for first time you are not getting any delay or previous image.
So basically see the variables when calling for the first time and implement for the rest of times also.
BR
Dep -
How to have header for CL_SALV_TABLE displayed in custom container?
Hello ABAP Objects Community, I am trying to write report using CL_SALV_TABLE and using a screen created in SE51 with a custom container control in which to put ALV grid. However, when I try to put a header on the table, it does not display.
In reading the SAP help for "Display List Header and Footer", there is a grid that shows under what conditions the SET_TOP_OF_LIST can be used. eg- Classic ABAP List, FullScreen, InTheContainer. And for InTheContainer it is showing "No".
I found the demo program SALV_DEMO_TABLE_SELECTIONS. Look at form d0100_pbo. This is what I am trying to do, except that I want it to have headers/footers.
If it is not possible to have headers/footers when using CL_SALV_TABLE in a container, what would be the coding technique for achieving this?
Best Regards,
Dean Atteberry.
Edited by: Dean Atteberry on Jul 27, 2009 11:01 PM
Edited by: Dean Atteberry on Jul 27, 2009 11:03 PM
Edited by: Dean Atteberry on Jul 27, 2009 11:03 PMThank you, Marcin, for your reply.
I implemented Namish Patel's code for exercises #1 (basic program) and #5 (header/footer) in abap and ran same. It created alv grid with headers/footers. However, upon looking at his factory statement, it is using the (default) "fullscreen" display type. I am needing to put the alv grid in a container created on a screen in SE51, so am having to use the EXPORTING statement with parameters r_container (points to container object instance) and container_name (literal string name of component).
I found a description of how to use the ABAP control framework in ERPGenie that shows how to do what I was needing.
[http://www.erpgenie.com/sap-technical/abap/abap-control-framework]
Thank you again for responding to my question.
Dean Atteberry.
Edited by: Dean Atteberry on Jul 28, 2009 10:09 PM -
Hiding customer container in first display
Hello all,
How to hide custom container during first display of screen. Loop at screen at PBO does not work as screen name field does not capture container name.
Regards,
DPMHi,
It is not possible to hide the custom container in dynpro , if you can brief your requirement will try to help
you out.
Instead of hiding you can use an empty subscreen and navigate to it before displaying actual screen with
the custom container. -
Refresh Editable ALV Grid inside a custom Container
Hello all,
I am having a screen with custom container in which i am populating datas and a entry screen which is going to have my
filtering condition for this custom container screen..
The problem i am facing is whenever i come out of the custom container screen after displaying and again give the
necessary filtering data in the previous screen...
the custom container screen displays wrong values...
But when i refresh the data with the refresh icon in the container right datas are coming...
I even used CALL METHOD C_ALVGD->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE = STABLE
EXCEPTIONS
FINISHED = 1
OTHERS = 2. after displaying the values using
CALL METHOD C_ALVGD->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = T_FUNC
IS_LAYOUT = IT_LAYOUT
I_SAVE = 'A'
CHANGING
IT_OUTTAB = IT_ZCAWNT_V
IT_FIELDCATALOG = IT_FCAT
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I have refreshed my internal table once when i display and again fetched from the DB according to the filtering conditions given
in the first screen.
I have tried clearing the Object created once when i display and again recreated it.But could not get the output.
solution would be really helpful...Hey all,
Thanks a lot for helping me...
The problem is solved....
i just used,
CALL METHOD C_ALVGD->FREE. 'Grid inside the container
CLEAR C_ALVGD.
CALL METHOD C_CCONT->FREE. "Container
CLEAR C_CCONT.
when i click BACK Button from screen 2 to screen1. -
How to display a report in a container
Hello All,
There are 2 scenarios:-
1) On left side navigation panel, I have a tree control. On double click on a node of a tree, I want to display a "report output" on the right panel. I have created the left panel and right panel by splitting the main custom container using splitter control. But I am not able to submit a report output on double click event of tree node as I dont know how to specify the parent container for the report.
2) I want to divide the custom container into 4 equal parts. Then each part should display four reports which are output of 4 different programs.
Kindly help me out with his issue.
Needless to say that points will be awarded
Thanks n Regards,
AbhishekHi Abhishek,
you can't run a program in an container. That's not possible. But you can handle your requirement using one of the following ways:
Way 1:
Call the program in the double click event handler method by using the the statement e.g. submit and return. The program is then called in a separate screen(not in the container).
Way 2:
Copy the functionnality of the program in e.g. function module(FM). This FM gets the input parameters, processes the input and returns the results. The results are displayed e.g. in an ALV Grid. The steps getting the display results and setting the display data for the ALV are handled in the double click event handler method.
Best Regards, Edemey -
Customer Creation - Want to pass custom field data to KNA1(Customer Master)
Hi,
I have created BAPI for customer creation which uses standard program RFBIDE00 for customer creation.
I have appended new custom field(ZZATTR1) in the table KNA1 and its currosponding stucture used in the standard program BKNA1.
Import parameters of my BAPI is one structure which is having this custom field, on executing this BAPI it creates the customer but data which I give through this field is not getting transfered in the table KNA1.
This sstandard progaram uses file to containing customer information, In the BAPI I on the data from the structure to the file and further it gets submitted to the program.
My requirement is to pass the data of teh custom field which I have created, How to achieve this ?
Pls Suggest.
Regards
VishalHi Vishal,
When implementing a customer exit (i.e. field, user etc) have you ever wanted to be able to read additional
field values available in the main SAP program but not available in your exit. Now with the use of
field-symbols you can have access to any field available in the main SAP program. The code below
demonstrates how this is done within a field exit on BSTNR which can be tested using transaction
ME21. Information on creating field exits can be found here.
FUNCTION field_exit_bstnr.
""Local interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
create field symbol
FIELD-SYMBOLS: <status>.
Assign value of variable from calling prog to field symbol
ASSIGN ('(SAPMM06E)RM06E-BSART') TO <status>.
Display value retrieved in message
Note: Messages of type i and w are not allowed
IF sy-subrc = 0.
MESSAGE e003(zr) WITH <status> 'kkk'.
ENDIF.
ENDFUNCTION.
Rewords some point if it is helpful.
Rgds,
P.Naganjana Reddy -
Hi all,
I have read that you use Custom container class for oops alv. But i have not found an answer as to why do we have to use the class.
Can't we just use ALV class only (Cl_gui_alv_grid) ?.
Regards
VarunYou can only create a grid display in a container...while creating the object for grid contol you have to pass the object reference of the custom container...check out the following for details...
*& Report ZTEST_DEMO_ALV
report ztest_demo_alv.
class cl_event_reciever definition deferred.
data:
wa_vbak type vbak.
data:
i_vbak type standard table of vbak,
i_vbap type standard table of vbap.
data:
v_container1 type scrfname value 'CONT1',
v_grid1 type ref to cl_gui_alv_grid,
v_custom_container1 type ref to cl_gui_custom_container,
v_container2 type scrfname value 'CONT2',
v_grid2 type ref to cl_gui_alv_grid,
v_custom_container2 type ref to cl_gui_custom_container,
ok_code type syucomm,
v_event_reciever type ref to cl_event_reciever.
* CLASS cl_event_reciever DEFINITION
class cl_event_reciever definition.
public section.
methods:
handle_double_click for event double_click of cl_gui_alv_grid
importing e_row e_column.
endclass. "cl_event_reciever DEFINITION
* CLASS cl_event_reciever IMPLEMENTATION
class cl_event_reciever implementation.
method handle_double_click.
read table i_vbak
into wa_vbak
index e_row.
if sy-subrc = 0.
select * from vbap
into table i_vbap
where vbeln = wa_vbak-vbeln.
if sy-subrc = 0.
set screen 00.
leave to screen 100.
endif.
endif.
endmethod. "handle_double_click
endclass. "cl_event_reciever IMPLEMENTATION
select-options:
s_vbeln for wa_vbak-vbeln.
start-of-selection.
select * from vbak
into table i_vbak
up to 50 rows
where vbeln in s_vbeln.
if sy-subrc <> 0.
message i000(z_zzz_ca_messages) with 'No data found!'.
leave list-processing.
endif.
end-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
* text
module status_0100 output.
set pf-status '100'.
* SET TITLEBAR 'xxx'.
if v_custom_container1 is not bound.
create object v_custom_container1
exporting container_name = v_container1.
create object v_grid1
exporting i_parent = v_custom_container1.
call method v_grid1->set_table_for_first_display
exporting
* i_buffer_active =
* i_bypassing_buffer =
* i_consistency_check =
i_structure_name = 'VBAK'
* is_variant =
* i_save =
* i_default = 'X'
* is_layout =
* is_print =
* it_special_groups =
* it_toolbar_excluding =
* it_hyperlink =
* it_alv_graphics =
* it_except_qinfo =
* ir_salv_adapter =
changing
it_outtab = i_vbak
* it_fieldcatalog =
* it_sort =
* it_filter =
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
create object v_event_reciever.
set handler v_event_reciever->handle_double_click for v_grid1.
endif.
if v_custom_container2 is not bound
and i_vbap is not initial.
create object v_custom_container2
exporting container_name = v_container2.
create object v_grid2
exporting i_parent = v_custom_container2.
call method v_grid2->set_table_for_first_display
exporting
* i_buffer_active =
* i_bypassing_buffer =
* i_consistency_check =
i_structure_name = 'VBAP'
* is_variant =
* i_save =
* i_default = 'X'
* is_layout =
* is_print =
* it_special_groups =
* it_toolbar_excluding =
* it_hyperlink =
* it_alv_graphics =
* it_except_qinfo =
* ir_salv_adapter =
changing
it_outtab = i_vbap
* it_fieldcatalog =
* it_sort =
* it_filter =
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
endif.
if v_custom_container2 is bound.
call method v_grid2->refresh_table_display.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
module user_command_0100 input.
case ok_code.
when 'BACK'.
if v_grid1 is bound.
call method v_grid1->free.
endif.
if v_grid2 is bound.
call method v_grid2->free.
endif.
set screen 00.
leave screen.
endcase.
endmodule. " USER_COMMAND_0100 INPUT -
How to display data in ComboBox when click on DataGrid Row.
Hi!
I am new to Adobe Flex. I am building one Project that was related to Comapny and Customer. First I created Company Master. Then I create Customer Master successfully and My Backkend is SQLite Database.
My Problem is I have two files one is CustomerMaster and second one is CustomerForm.
In CustomerMaster I have a datagrid in that data was displaying thru Array Collection. When ever we doublick on datagrid row it's displayed a CompanyForm. CompanyForm contains TextFiled and ComboBox. TextFiled populating data but Combobox doesnot. It display always prompt message.
Please help.
Thanks,
Sree KumarHi! Vibhuti Gosavi,
First of all thanks for your quick reply. Already I saw that link.
Actually, In CustomerForm successfully store the information into the database. While retrieving the data problem cames. Sample Code:
CustomerMaster:
private function createItem():void
openTab(new Object());
public function openTab(customer:Object):void
var children:Array = tn.getChildren();
var length:int = children.length;
for (var i:int = 0; i<length; i++)
if (children[i].customer.customerId == customer.customerId)
tn.selectedIndex = i;
return;
var form:CustomerForm = new CustomerForm();
tn.addChild(form);
form.customer = customer;
form.dao = dao;
form.addEventListener(CustomerEvent.CREATE, customerChangeHandler),
form.addEventListener(CustomerEvent.UPDATE, customerChangeHandler),
form.addEventListener(CustomerEvent.DELETE, customerChangeHandler),
tn.selectedChild = form;
private function customerChangeHandler(event:CustomerEvent):void
customerArrayList = dao.findByCustomerAll();
if (event.type == CustomerEvent.DELETE)
tn.removeChild(event.target as CustomerForm);
]]>
</fx:Script>
<mx:Canvas id="container" left="12" right="12" top="12" bottom="12">
<mx:Canvas left="0" top="2" right="0" height="33">
<mx:Button id="AddCustomer" x="1" width="108" height="32" click="createItem()"
icon="@Embed('assets/icon_plus.png')" label="Add Customer" toolTip="Add Customer"
verticalCenter="-1"/>
</mx:Canvas>
<code:SuperTabNavigator id="tn" x="0" y="39" width="681" height="197"/>
<mx:DataGrid id="customerList" x="1" y="262" width="680" height="231"
dataProvider="{customerArrayList}"
doubleClick="openTab(customerList.selectedItem)" doubleClickEnabled="true">
<mx:columns>
<mx:DataGridColumn dataField="customerId" headerText="Id"/>
<mx:DataGridColumn dataField="customerName" headerText="Name" />
<mx:DataGridColumn dataField="companyName" headerText="companyName" />
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
CustomerForm:
public function set customer(customer:Object):void
this._customer = customer;
public function get customer():Object
return this._customer;
private function saveCustomer():void
if (Validator.validateAll(customerValidators).length>0)
return;
_customer.customerName = customerName.text;
_customer.companyName = companyName.text;
if (_customer.customerId > 0)
updateCustomer();
else
insertCustomer();
private function insertCustomer():void
try
Alert.show(_customer.normalPkts);
dao.insertCustomer(_customer);
customerId.text = _customer.customerId;
dispatchEvent(new CustomerEvent(CustomerEvent.CREATE, _customer, true));
var alertText:String="Company Created Successfully!";
Alert.show(alertText,"",4,null,null,ConfirmMessage);
catch (error:SQLError)
var alertErrorCreate:String="Company not Created...";
Alert.show(alertErrorCreate+"\n"+error.details,"",4,null,null,ErrorMessage);
private function updateCustomer():void
try
dao.updateCustomer(_customer);
dispatchEvent(new CustomerEvent(CustomerEvent.UPDATE, _customer, true));
var alertText:String="Company Updated Successfully!";
Alert.show(alertText,"",4,null,null,ConfirmMessage);
catch (error:SQLError)
var alertErrorText:String="Company not Updated...";
Alert.show(alertErrorText+"\n"+error.details,"",4,null,null,ErrorMessage);
private function deleteItem():void
try
dao.deleteCustomer(_customer);
dispatchEvent(new CustomerEvent(CustomerEvent.DELETE, _customer, true));
catch (error:SQLError)
Alert.show(error.details, "Error");
]]>
</mx:Script>
<mx:Grid x="10" y="10" width="665" height="130" verticalAlign="middle">
<mx:GridRow width="665" height="100%">
<mx:GridItem width="85" height="100%">
<mx:Label width="85" text="Customer Id:"/>
</mx:GridItem>
<mx:GridItem width="115" height="100%">
<mx:TextInput id="customerId" text="{_customer.customerId}" editable="false" width="115"/>
</mx:GridItem>
<mx:GridItem width="102" height="100%">
<mx:Label width="102" text="Company Name:"/>
</mx:GridItem>
<mx:GridItem width="100" height="100%">
<mx:ComboBox id="companyName" dataProvider="{companyIdList}" labelField="companyName"
prompt="Select..." text="{_customer.companyName}" width="100"/>
</mx:GridItem>
<mx:GridItem width="230" height="100%" horizontalAlign="center" verticalAlign="middle">
<mx:Button label="Save" click="saveCustomer()"/>
<mx:Button label="Delete" click="deleteItem()"/>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
=====================================================================
I have two ArrayCollections 1) companyIdList (CustomerForm)
2) customerArrayList(CustomerMaster)
please go through the bold text. Please focus on two dataProviders. These dataproviders are binding for One Combo Field.
Thanks,
Sree Kumar
Message was edited by: sreekumar1976 -
Docking Container - Custom Container
Hi Friends,
I have the following doubts.
1. What all are the advantages of Docking and Custom Container.
2. Under what scenario's we use Docking over Custom Container.
3. I want to have 2 ALV GRID's in one screen one below another. Shall I use Docking Container?
internal table I_MARA with 10 records and I_MARC with 20 records.
Explain how to achieve this using Docking Container with code.
Regards,
Viji.hi vijayalakshmi
you can use 2 custom containers in that screen for two ALV grid
*& Report ZLISTBOX1 *
REPORT zlistbox1 .
*parameters: date like sy-datum.
TABLES: lfa1,ekko.
TYPE-POOLS: slis,sdydo.
*select-options: vendor for lfa1-lifnr.
DATA: itab TYPE TABLE OF ekko,
identity TYPE REF TO cl_gui_custom_container,
l_list TYPE slis_t_listheader,
l_logo TYPE sdydo_value,
l_identity TYPE REF TO cl_gui_custom_container,
l_tree TYPE REF TO cl_gui_alv_tree_simple,
tree TYPE REF TO cl_gui_alv_tree_simple,
fcat TYPE lvc_t_fcat,
sort_b TYPE lvc_t_sort,
sort_w TYPE lvc_s_sort.
CALL SCREEN 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'DISPLAY'.
PERFORM col_head.
PERFORM output.
PERFORM sort.
IF l_identity IS INITIAL.
CREATE OBJECT l_identity
EXPORTING
container_name = 'LOGO'.
CREATE OBJECT l_tree
EXPORTING
i_parent = l_identity.
PERFORM logo USING l_logo.
CALL METHOD l_tree->create_report_header
EXPORTING
it_list_commentary = l_list
i_logo = l_logo.
ENDIF.
IF identity IS INITIAL.
CREATE OBJECT identity
EXPORTING
container_name = 'JANAGAR'.
CREATE OBJECT tree
EXPORTING
i_parent = identity.
CALL METHOD tree->set_table_for_first_display
CHANGING
it_outtab = itab
it_fieldcatalog = fcat
it_sort = sort_b.
ENDIF.
*refresh itab.
CALL METHOD tree->refresh_table_display.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form logo
text
-->P_LOGO text
FORM logo USING p_logo.
p_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "logo
*& Form col_head
text
FORM col_head.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'EKKO'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME = ITAB
CHANGING
ct_fieldcat = fcat.
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "col_head
*& Form output
text
FORM output.
SELECT * FROM ekko INTO TABLE itab WHERE lifnr = lfa1-lifnr.
ENDFORM. "output
*& Form sort
text
FORM sort.
sort_w-spos = 1.
sort_w-fieldname = 'EBELN'.
APPEND sort_w TO sort_b.
sort_w-spos = 2.
sort_w-fieldname = 'AEDAT'.
APPEND sort_w TO sort_b.
sort_w-spos = 3.
sort_w-fieldname = 'BUKRS'.
APPEND sort_w TO sort_b.
ENDFORM. "sort
cheers
s.janagar -
Multiprovider display data issue
Hello,
I'm using BI7.0 and created Multiprovider using Custom DSO and Infocube1.
the problem is, when i use display data through multiprovider, I'm not able to see data from DSO .
I have considered all common fields from DSO and Cube and assigned in multiprovider.
basically I'm selecting all IO and Keyfigures from Infocube1 and few IO from DSO
some reason I am not able to see data from DSO when i view data through multi provider.
Please help me to view data from both cube and dso through multi provider.
Thanks
GangaHi Ganga,
Please check whether there is any restrictions for the field 0PROVIDER. There may be restriction to get the data only from cube.
If there is no any restrictions then here may be your problem.
You need to maintain atleast one key figure in both targets.
Since there is no any key fig coming from DSO
please create a dummy key fig and try to check once again.
please go through the link.
Re: MULTIPROVIDER NOT GETTING DATA
hope this helps u.
Thanks,
Sai Chand
Maybe you are looking for
-
hi all, i would like to know whether import cycle is mapped into SAP or not, if so then how much it is present in SAP and how do we process the same ? along with that whether mode of payement - letter of credit in import proces i
-
Display issue with some browser : OnMouse based on An Application Process
Hello, I am playing a little bit with the Application Process and I tried to create something like the Aria Demo (onmouseover="ARIA_DETAIL(this, '#PERSON_ID#')") Indeed, no problem to make it work (using a default template among the 20 provided by Ap
-
Certain regularly visited websites, like youtube.com or my home page, are instantly being defaulted to this website "Design a Website - Photo Folio". I type in youtube, but what pops up is this design site. This morning even my Foxfire home page is i
-
My time machine backup disc has apps from Mountain Lion that won't open now that I have Yosemite. They all say need to be upgraded to Yosemite. Go to app store. But app store sees that I have yosemite so doesn't even show me an udate option. How can
-
Where is the Oracle 11g OEM console for unix commands ... Need to start/stop unix processes from OEM, is there an OEM interface for unix scripts. Goal: use OEM to review all unix applications. thank you