Creating Input Field inside Docking Container bar
Hello.
Does anyone know how I can put an input field inside a docking container object ? Just like it appears in SE80.
I have created a docking container bar, and in one of those bars i want to put a text field.
Anyone please ?
Thank you
EDIT----
I found how to do this with cl_gui_container_bar_2 and with dynamic documents.
Edited by: Ricardo Monteiro on Aug 25, 2010 1:30 PM
Hi,
Check Program SAPSIMPLE_TREE_CONTEXT_MEN_DEM and check event node_context_menu_request
Hope this helps you.
Thanks,
Prashanth
Edited by: Prashanth KR on Jun 2, 2009 7:50 AM
Similar Messages
-
How to get the co-ordinates of a dynamically created input field
Hello Frn's
i have created a dynamic text view . but this text view is not appearing at proper position . I want palce it infront of a dynamically created input field . how can i do this ?
as i am thinking ...i should first of all get info about the co-ordinates of dynamaclly creatd input field . and with respect to these co-ordinates ...set the position of text View .
Please suggest your thoughts .
Thanks and Regards
Priyank DixitHi,
There is no provision in WD for getting screen coordinates and then placing the UI element.
You to add the UI element to layout editor and based on the layout type it will add the UI element to respective position.
I would advice not to create dynamic UI elements( instead you can create them statically and then play with visibility status through context binding ). This will be more effective way and less error prone. This is also recommended practice.
still,For dynamic creation you can refer to following wiki:
http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
regards
Manas Dua -
How to delete Dynamically created input field UI Element
Hi all,
I want to delete dynamically created input field and label.
Is there any method please tell.
Thanks in advance
HemalathaHi,
In the WDEVENT parameter of the action handler you can find the event id.
***Variables
DATA:
lv_selected type string. "Selected tab value
***Structure and internal table for the Events and messages
DATA:
lt_events type WDR_EVENT_PARAMETER_LIST,
ls_events type WDR_EVENT_PARAMETER.
***Field symbols
field-symbols: <fs_value> type any. "Attribute value in events table
***Move the event table to lt_events
lt_events = wdevent->parameters.
read table lt_events into ls_events with key name = 'SAVE'. "Button Id
if sy-subrc eq 0.
assign ls_events-value->* to <fs_value>.
if sy-subrc eq 0.
lv_selected = <fs_value>.
endif. "IF sy-subrc eq 0.
endif. "IF sy-subrc eq 0.
Regards,
Lekha. -
Creating Context Menu in ALV tree defined inside DOCKING CONTAINER
Dear Experts.
Can you please tell me which EVENTS should i use in CLASS: CL_GUI_SIMPLE_TREE to get a Context menu after right click on any tree node in ALV Tree which has been defined inside a Docking Container.
Regards Arnab.Hi,
Check Program SAPSIMPLE_TREE_CONTEXT_MEN_DEM and check event node_context_menu_request
Hope this helps you.
Thanks,
Prashanth
Edited by: Prashanth KR on Jun 2, 2009 7:50 AM -
Create Input Field within ALV Toolbar
Hi,
I've created an ALV table using the CL_SALV_TABLE class. I'm now trying to include an input field within the ALV toolbar. I would also require this field to do an F4 to obtain its values. Can anyone help me?
Thanks and regards,
Adeline.Hi Adeline,
as Rich explained: Not inside ALV toolbar. If you do not use full screen display but have a screen container for this, you may define a subscreen area on top of ALV container. Use CALL SUBSCREEN <area> INCLUDING <prog> <dynp> syntax to process the subscreen. Define PROCESS ON VALUE-REQUEST for F4. In PAI (PROCESS AFTER INPUT) you can modify the table displayed in the grid and do a new display.
Regards,
Clemens -
I/p parameter field in docking container
How to get the field parameters in a docking container that shud be able to fetch data from Database ? for eg., in se80 tcode(in left container) we have an i/p field for program/class and another i/p field for their name.....
Hi,
You can use the following class cl_gui_textedit, and an object for the same can be created in the docking container.
data : text type ref to cl_gui_textedit.
* create the docking container
CREATE OBJECT docking
EXPORTING repid = repid
dynnr = dynnr
side = docking->dock_at_left
extension = 180.
* create the text container
CREATE OBJECT text
EXPORTING parent = docking.
for further options look for the class CL_GUI_TEXTEDIT.
also for reference you can see the BC example RSDEMO_DOCKING_CONTROL.
Hope this helps.
Regards,
Kinshuk -
Place a Tabstrips Inside Docking Container
All,
I have a docking container like the following
i need to place a tabstrip in the bottom container. I have the following code
if gc_docking_t is initial.
create object gc_docking_t
exporting
repid = sy-repid
dynnr = '0300'
extension = 75
style = style
side = cl_gui_docking_container=>dock_at_top
metric = cl_gui_docking_container=>metric_pixel.
endif.
if gc_docking_l is initial.
create object gc_docking_l
exporting repid = sy-repid
dynnr = '0300'
extension = 9999
side = cl_gui_docking_container=>dock_at_bottom.
endif.
I have created a screen 310 with tabstrips inside, how can i call this screen inside this docking container
Any Info ?
a®Hi,
SCN -Wiki->My Home->Code Gallery->Community Code Gallery->TabStrip in ALV(OOPS)
Please refer http://wiki.sdn.sap.com/wiki/display/Snippets/TabStripinALV(OOPS) -
Create input field dynamically
Hi.
I need to create always a new input field to page when pushing button. How this can be done? How can I define that a new field is placed under another?
Something like this?
javax.faces.component.UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
UIComponent form = root.findComponent("form1");
HtmlInputText input2 = new HtmlInputText();
input2.setSize(50);
form.getChildren().add(input2);
Message was edited by:
basti78javax.faces.component.UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
UIComponent form = root.findComponent("form1");
HtmlInputText input2 = new HtmlInputText();
input2.setSize(50);
form.getChildren().add(input2);
I did this in doActionMethod but nothing happened. Is that panelGrid only for layout and it has nothing to do component visibility? Could you pass me an example?
I also find this kind of example:
Application application =
FacesContext.getCurrentInstance().getApplication();
outputText = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
outputText.setValue("test outputText ");
form.getChildren().add(outputText);
try {
outputText.encodeBegin(FacesContext.getCurrentInstance());
outputText.encodeChildren(FacesContext.getCurrentInstance());
outputText.encodeEnd(FacesContext.getCurrentInstance());
} catch (IOException e) {
e.printStackTrace();
null -
Ability to populate an input field by scanning a bar code or manually
Hi All,
We are developing a NW Mobile 7.1 OCA application. The user requires ability to enter values in input fields either by scanning a barcode or enter manually. We are on SP08 ... Right now we are able to scan and populate values or enter them manually(any of the two but not both)... Any ideas on how we can achieve these are higly appreciated.
Thankswhy try to use the label when the field has a clearly defined name:
web:input_text[@name='my/id -
Module pool to create input field dynamically.
Hi All,
I have a requirement in module pool programming,
Where I have one input field,based on the value given in this input I have to get the
input fields dynamically in the screen.
Is it possible to achieve this?
If yes, please do tell me the solution to approach this requirement.
With Regards,
S.Asha.Hi,
You can use IMPORT DYNPRO / EXPORT DYNPRO.
Please check this URL: [Import/Export dynpro not working|Import/Export dynpro not working]
[EXPORT DYNPRO or GENERATE DYNPRO|EXPORT DYNPRO or GENERATE DYNPRO]
Cheers, -
How to create table field inside the dynamically created table?
Hi, All!
I have created dynamic internal table (using field catalog and CALL METHOD cl_alv_table_create=>create_dynamic_table )
and put this table into FM REUSE_ALV_GRID_DISPLAY. ALV grid work. Now I need to color rows of my ALV, therefore I have to insert new column with name "COLORS" and type lvc_t_scol. I see three ways to do it , but all ones are unsuccessful:
1. Insert column into field catalog. FM REUSE_ALV_FIELDCATALOG_MERGE does not return info about "COLORS" I guess because COLORS is a table.
2. Insert column into field catalog manually. It provides a short dump during dynamic table creating or during call of REUSE_ALV_GRID_DISPLAY.
3. Create dyn table first, then add new field . I could not find a way how to do it :(((((((
Can somebody help me?
TatianaHi,
Here is the solution for this problem, Sample code:
*& Report ZCHA_ALV_GRID_CELL_COLOR *
REPORT ZCHA_ALV_GRID_CELL_COLOR .
TABLES:MARA.
DATA: W_CONTAINER TYPE SCRFNAME VALUE 'ALV_CONTAINER',
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
W_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
W_EVENT_RECEIVER TYPE REF TO LCL_EVENT_RECEIVER.
*layout
DATA: WA_LAYOUT TYPE LVC_S_LAYO.
*field catalog
DATA: IT_FIELDCAT_WRT_OFF TYPE LVC_T_FCAT,
WA_FIELDCAT_WRT_OFF TYPE LVC_S_FCAT.
DATA:BEGIN OF IT_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MAKTX LIKE MAKT-MAKTX,
CELLCOLORS TYPE LVC_T_SCOL,
END OF IT_MARA.
SELECT P~MATNR
Q~MAKTX
INTO CORRESPONDING FIELDS OF TABLE IT_MARA
FROM MARA AS P INNER JOIN
MAKT AS Q ON
PMATNR = QMATNR.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
SET TITLEBAR 'xxx'.
IF NOT W_CONTAINER IS INITIAL.
CREATE OBJECT W_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = W_CONTAINER.
CREATE OBJECT W_GRID
EXPORTING I_PARENT = W_CUSTOM_CONTAINER.
ENDIF.
CLEAR IT_FIELDCAT_WRT_OFF.
REFRESH IT_FIELDCAT_WRT_OFF.
WA_FIELDCAT_WRT_OFF-FIELDNAME = 'MATNR'.
WA_FIELDCAT_WRT_OFF-COL_POS = '1'.
WA_FIELDCAT_WRT_OFF-OUTPUTLEN = '35'.
WA_FIELDCAT_WRT_OFF-SCRTEXT_L = 'Material No'.
APPEND WA_FIELDCAT_WRT_OFF TO IT_FIELDCAT_WRT_OFF.
CLEAR WA_FIELDCAT_WRT_OFF.
WA_FIELDCAT_WRT_OFF-FIELDNAME = 'MAKTX'.
WA_FIELDCAT_WRT_OFF-COL_POS = '2'.
WA_FIELDCAT_WRT_OFF-OUTPUTLEN = '45'.
WA_FIELDCAT_WRT_OFF-SCRTEXT_L = 'Material Desc'.
APPEND WA_FIELDCAT_WRT_OFF TO IT_FIELDCAT_WRT_OFF.
CLEAR WA_FIELDCAT_WRT_OFF.
DATA LS_CELLCOLOR TYPE LVC_S_SCOL.
READ TABLE IT_MARA INDEX 5 .
LS_CELLCOLOR-FNAME = 'MATNR'.
LS_CELLCOLOR-COLOR-COL = '3'.
LS_CELLCOLOR-COLOR-INT = '1'.
APPEND LS_CELLCOLOR TO IT_MARA-CELLCOLORS.
MODIFY IT_MARA INDEX 5.
WA_LAYOUT-CTAB_FNAME = 'CELLCOLORS'.
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = WA_LAYOUT
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT_WRT_OFF
IT_OUTTAB = IT_MARA[].
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Try to assign appropriate points.
Regards,
Suman -
Dynamically created Text field inside of empty Movieclip
Hi there.
My goal is to have a button that, when clicked, an empty
movieclip is created and a text field is attached to it.
I could write it easily if the newly created instance names
where hard coded, the problem comes with the syntax to generate
them dynamically.
Here's the code i have so far:
ActionScript Code:
button.onRelease = function() {
createText();
var count:Number = 1;
createText = function () {
_root.createEmptyMovieClip("placeholder"+count,this.getNextHighestDepth());
this["placeholder"+count].createTextField("my_txt"+count,
this.getNextHighestDepth(), 100, 100, 100, 100); count++;
After that's done i still need to assign a text value to the
text field, which i have no clue on how to do it...
In other words I want to accomplish something like:
placeholder[count].my_txt[count].text = "my text";
I hope it's not confusing... Any help would be greatly
appreciated.
Thanks in advance!if your createText() function isn't working the way you want
check your use of "this" and "_root". if they're not the same,
you're not referencing your newly created movieclip correctly. and
your textfield depth isn't what you really want, but it should work
ok. -
Disabling the input field inside a table
I am using a table having 5 fields. i am displaying the data in the table with all the fields as inputfields. When i click a button, the rows having the data should become disable and the rows which doesn,t have the records should be in enable mode only.
Can we achieve this functionality ?Hi Manjunath,
Thatu2019s what I had suggested the solution foru2026 I will try to put it down again. Take 2 Boolean attributes at your context level:
1) Would be a flag to know whether the user has entered any data in this particular row (Lets say flag1). By default set it to false so that it would mean that for the 1st time the entire table being displayed would have the flag1u2019s value as u2018 u2018.
2) Would be a variable for using to bind to the table columnu2019s readOnly property (Lets say flag2) By default have this value to false so that the entire column would be in editable mode by default.
Say suppose you want to make all the working days for which the user has made entries you should bind the cell editors readOnly property of all those columns to flag1.
When the user enters some data into a row and presses on the save then change the flag1 value for that particular row to X. (So this changes should get reflected on the context nodes data) So for example the user has entered data for first 2 rows then flag1 would be X for both these rows in the context node.
Now when the user presses on the Freeze button just get your entire contexts data & loop through only those records where you have flag1 = u2018Xu2019
Loop at it_data into wa_data where wa_data-flag1 = u2018Xu2019.
Wa_data-flag2 = u2018Xu2019.
Modify it_data from wa_data transporting flag2.
Endloop.
So now you would only set the readOnly value for the rows where flag1 = u2018Xu2019 (i.e., where the user has made his entries). The rest of the rows would still continue to have the default value defined at context level u2018 u2018 and so would remain as editable. I hope that you have understood what I intended to say.
Regards,
Uday -
Can we do input field readonly and it will takes data only from F4
Hi experts,
I want user only fill data in inputfield by F4, not manualy , can we do somwthing for that.
Thanks & Regards
Prashant GuptaHi Prashanth,
We can handle your requirement. I will give one example and it is working.
Address - Node
Firtst_Name- Node attribute and this attribute will have DDIC search help.
Create Input field 'FIRSTNAME' for this attribute in screen with transparent container 'TC' and bind the above context to the UI element. Now this UI element is Context is 'ADDRESS.FIRSTNAME'.
Now add the below code in MODIFYVIEW hook method.The below code will add search help with read only input field but for display mode again you have to disable the search help for this field. i have not written code for that.
DATA: lo_first_name TYPE REF TO cl_wd_input_field,
lo_first_name_new TYPE REF TO cl_wd_input_field, " New input field
lo_transp_cont TYPE REF TO cl_wd_transparent_container. " TC container
lo_new_container TYPE REF TO cl_wd_transparent_container.
DATA: lv_bound_value TYPE string,
lv_read_only TYPE wdy_boolean.
IF iv_first_time EQ abap_true.
lo_first_name_input ?= io_view->get_element( id = 'FIRST_NAME' ).
lo_first_name_input->set_width( '0' ).
lv_bound_value = lo_first_name_input->bound_value( ). "ADDRESS.FIRST_NAME"
Create new dynamic Input Field
CALL METHOD cl_wd_input_field=>new_input_field
EXPORTING
bind_value = lv_bound_value
id = 'FIRST_NAME_NEW'
read_only = abap_true
view = io_view
RECEIVING
control = lo_first_name_new.
Create new dynamic Transparent Container
CALL METHOD cl_wd_transparent_container=>new_transparent_container
EXPORTING
id = 'TC_NEW' " New container
view = io_view
RECEIVING
control = lo_new_container.
" I used flow layout thats why i am using the flow layout
cl_wd_flow_layout=>new_flow_layout( container = lo_new_container ).
cl_wd_matrix_data=>new_matrix_data( element = lo_new_container ).
" Get old field container
lo_transp_cont ?= io_view->get_element( id = 'TC' ).
IF NOT lo_transp_cont IS INITIAL.
"Using a new Transparent Container both Fields for FIRST_NAME are shown as only one Field
cl_wd_flow_data=>new_flow_data( element = lo_first_name_new ).
lo_new_container->add_child( the_child = lo_first_name_new ).
" remove the child means old FIRT_NAME
lo_first_name ?= lo_transp_cont->remove_child( id = 'FIRST_NAME' ).
cl_wd_flow_data=>new_flow_data( element = lo_first_name ).
lo_new_container->add_child( the_child = lo_first_name ).
lo_transp_cont->add_child( index = 2
the_child = lo_new_container ).
ENDIF.
endif.
Regards,
Devi -
Background Execution Problem-Docking Container with 2 ALV Grids in one scre
Hi Friends,
I have created 2 ALV Grids in one screen - one below another using DOCKING CONTAINER.
The objects are 'g_dock_cont' and 'g_dock_cont1'.
I am getting the foreground output as expected with 2 ALV Grids.
While executing in background (F9), I am getting only output of first ALV grid. Second ALV is not getting displayed in BACKGROUND(F9) mode.
How to solve this.
FORM create_objects.
* Materials with data
IF g_dock_cont IS INITIAL.
IF sy-batch NE 'X'.
*CREATE THE OBJECT FOR DOCKING CONTAINER
CREATE OBJECT g_dock_cont
EXPORTING
side = cl_gui_docking_container=>dock_at_top
extension = 300.
ENDIF.
*CREATE THE OBJECT FOR ALV GRID
CREATE OBJECT g_alvgrid
EXPORTING i_parent = g_dock_cont.
wa_layout-grid_title =
'Materials with Data'.
ENDIF.
IF NOT I_DETAIL[] IS INITIAL.
CALL METHOD g_alvgrid->set_table_for_first_display
EXPORTING
IS_VARIANT = WA_VARIANT_STX
IS_LAYOUT = wa_layout
CHANGING
it_outtab = I_DETAIL
IT_FIELDCATALOG = LIT_FIELDCATALOG[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF sy-subrc <> 0.
ENDIF.
ENDIF.
*MATERIALS WITHOUT DATA
IF g_dock_cont1 IS INITIAL.
IF sy-batch NE 'X'.
*CREATE THE OBJECT FOR DOCKING CONTAINER
CREATE OBJECT g_dock_cont1
EXPORTING
side = cl_gui_docking_container=>dock_at_bottom
extension = 300.
ENDIF.
*CREATE THE OBJECT FOR ALV GRID
CREATE OBJECT g_alvgrid1
EXPORTING i_parent = g_dock_cont1.
wa_layout1-grid_title =
'Materials without Data'.
ENDIF.
IF NOT I_MARA[] IS INITIAL.
CALL METHOD g_alvgrid1->set_table_for_first_display
EXPORTING
IS_LAYOUT = wa_layout1
CHANGING
it_outtab = I_MARA
IT_FIELDCATALOG = i_fieldcat[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDFORM. " create_objects
Regards,
Viji.Hi,
What i was saying is that you need to code again for background mode of execution.
AT END OF SELECTION.
IF SY-BATCH EQ 'X'.
PERFORM DISPLAY1.
PERFORM DISPLAY2.
In DISPLAY1 use REUSE_ALV_LIST_DISPLAY to display data from outtab1.
In DISPLAY2 use REUSE_ALV_LIST_DISPLAY to display data from outtab2.
For example : execute this report in background mode.this will not execute in online mode.
After execution you will get two spools one for KNA1 and one for LFA1 data. Spool can be controlled via IS_PRINT structure.
report zrbackground.
data gt_lfa1 type standard table of lfa1.
data gt_kna1 type standard table of kna1.
start-of-selection.
select * from lfa1 into table gt_lfa1 up to 10 rows.
select * from kna1 into table gt_kna1 up to 20 rows.
end-of-selection.
if sy-batch eq 'X'.
perform display_lfa1.
perform display_kna1.
endif.
*& Form DISPLAY_LFA1
text
--> p1 text
<-- p2 text
form display_lfa1 .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = sy-repid
i_structure_name = 'LFA1'
tables
t_outtab = gt_lfa1
exceptions
program_error = 1
others = 2.
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. " DISPLAY_LFA1
*& Form DISPLAY_KNA1
text
--> p1 text
<-- p2 text
form display_kna1 .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = sy-repid
i_structure_name = 'KNA1'
tables
t_outtab = gt_kna1
exceptions
program_error = 1
others = 2.
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. " DISPLAY_KNA1
Please let me know if its not clear or you need more info.
Thanks,
Abhishek
Edited by: abhishek sinha on May 8, 2009 7:42 PM
Edited by: abhishek sinha on May 8, 2009 8:45 PM
Maybe you are looking for
-
Safari doesn't open some websites correclty
Safari doesn't open some websites correclty. For example Interpals: My Internet speed is fine. It's playing videos from Youtube without any problem and displays Youtube correctly. I also resetted Safari, but it didn't help. What am I supposed to do?
-
ALV Header getting truncated in excel
I am using the GRid Layout. but when i am downloading the output in the Excel sheet, the headers are getting truncated. I have tried increasing the width in the FIELDCAT and also removing the coulmn-optimze option in the layout also. but still after
-
Problems with JNDI lookup for java:comp/env/ejb
Hi all, I'm using OC4J 9.0.3 and I have problems when looking up for the local EJB context. I have a SLSB which refers to another SLSB via a JNDI mapping like shown below. Both services are deployed within one EAR file. (snippets of ejb-jar.xml and o
-
Ho to run LV-DLL in TestStand with bool-parameters?
Hello, i´m using LabView 8.21 and Teststand 3.5. Currentlly i´m playing with the project-Explorer where i´m creating DLLs. The first and easiest step was to create a new VI with string-in and string-out. Then i added this vi to my project and created
-
XML Forms - Cannot append a text to a document node.
Hi, I just created a new xml form as a copy of another working form. I changed a bit in it and tried to run both i preview an real. Edit worked and renderlistitem worked. On the Show I got the error in the bottom. I tried to remove all the element