Selection screen elements in docking container
Hi fellow abapers
Is there any way to create pushbutton, input fields (Parameters or select-options ) in a docking container.
Plz help.
Regards
Prabumanoharan
Abhi,
I can understand what are you trying to do. But that is not possbile with a DOCKING container.
Here is a work around. Have two screens, one with the fields that you want to display and other one empty. Whenever you want to decrease the size, just replace the actual screen with fields with the dummy empty screen.
There is NO other way of doing this.
Regards,
Ravi
Note : Please mark the helpful answers
Similar Messages
-
How to deal with dynamic selection screen elements when macros are used?
Hello experts,
This is regarding the dynamic selection screen elements. Actually the requirement is to modify the existing standard report program RFUMSV00 by copying it into a Z report, adding a few selection screen elements and new fields in the output. I actually did everything required except for the one thing that is going out of my reach.
There are a certain fields which are coming when they are not supposed to get displayed. I don't understand the code because of its obsoleteness. Neither can I debug it because it is just data declaration.
This is the code where there is a fault. If I copy the entire code into a new Z report, I'm getting new fields like Entry Date, Document Type, Reference Transaction, Reference key, Logical system.
DEFINE selection_screen_line.
selection-screen: begin of line.
parameters &3 like &4 default 'X' modif id mc4.
selection-screen: comment (30) &1 for field &3 modif id mc4.
selection-screen: comment pos_low(10) text-019
for field &2 modif id mc4. "neu
parameters &2 like rfums_alv-variante modif id mc4.
selection-screen:
position pos_high.
selection-screen: pushbutton (15) text-028
user-command &5 modif id mc4.
selection-screen end of line.
END-OF-DEFINITION.
Kindly, suggest me the right solution.In the program attributes ( SE38 > RFUMSV00 > GOTO > Properties ), you will find a logical database BRF declared. The include DBBRFSEL is part of the selection screen of this logical database.
The selection screen is actually the selection screen of this logical database.
Under the Logical Database field, there is a Selection screen field where you can input which selection screen of the logical database to be used.
But, this is just to change the selection screen that is displayed. To completely suppress it you need to remove logical database declaration from the properties of the program and call it inside your program through function module.
You cannot just remove it from the declaration because many of its variables are used in the program.
So call it using function module as the first step in INITIALIZATION section of the program.
The syntax and function module to call it in your program can be found in the following thread :
How to hide the selection screen of a Logical datebase?
Regards,
Ashish -
How to get selection screen elements and its table reference of a report ?
halo experts
How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
For eg if my selection screen 1000 is
parameters: p_carrid type spfli-carrid,
select-options :s-_connid type sflight-connid.
is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time. The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table. Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
REPORT ZTEST_PROG.
TABLES sflight.
DATA:
screen_tab TYPE STANDARD TABLE OF screen,
wa_screen TYPE screen,
scrn_nm TYPE string,
scrn_leftover TYPE string,
l_type TYPE REF TO cl_abap_typedescr,
typ_nm TYPE string,
typ_pre TYPE string.
FIELD-SYMBOLS <fs_data> TYPE ANY.
PARAMETERS p_carrid TYPE spfli-carrid.
SELECT-OPTIONS s_connid FOR sflight-connid.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group3 = 'PAR'
OR screen-group3 = 'LOW'.
APPEND screen TO screen_tab.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
LOOP AT screen_tab INTO wa_screen.
ASSIGN (wa_screen-name) TO <fs_data>.
l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
IF wa_screen-group3 = 'LOW'.
SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
TRANSLATE scrn_nm TO UPPER CASE.
ELSE.
scrn_nm = wa_screen-name.
ENDIF.
SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
WRITE:
/ 'Screen Name: ', scrn_nm,
/ 'DDIC Type: ', typ_nm.
ENDLOOP.
When you get into defining internal tables you can determine those at run time with cl_abap_structdescr. The following is an example of how you might do that. You can loop through the "components_table" and evaluate each field of the structure in this way.
DATA: structure_reference TYPE REF TO cl_abap_structdescr,
components_table TYPE abap_compdescr_tab,
components_structure LIKE LINE OF components_table.
structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
components_table = structure_reference->components.
I don't know if this answers any of your questions but I hope that some of it is useful. -
How to remove an selection screen element at the event
hi,
can any one tell me how to remove / Disable an selection screen element at the runtime after an event occurs like selection of Value from a parameter.
Thanks and Regards
Guhapriyan SubrahmanyamTABLES : BKPF.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_BUKRS LIKE BKPF-BUKRS OBLIGATORY.
"Company code
SELECT-OPTIONS : S_BELNR FOR BKPF-BELNR MODIF ID M01.
"Accounting Doc No
PARAMETERS: P_GJAHR LIKE BKPF-GJAHR MODIF ID M02.
"Fiscal year
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON S_BELNR.
IF S_BELNR IS NOT INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M02' .
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF. -
Embedding a screen in a docking container - Is it possible at all??
I am working on a screen design similar to SE80, where I will be required to display a tree structure in screen say '0100' to the left of the screen and upon node_double_click event, I should be able to bring up another screen '0200' on to the right side with out navigating away from the screen 0100.
I have a custom control in my initial screen 0100, covering the full area, and I am instantiating the docking container object in the node_double_click handler method of the tree control. I have passed sy-repid and dynpro number '0200' but to no avail.
The following is the code sample.
IF docking_right IS INITIAL.
CREATE OBJECT docking_right
EXPORTING
repid = g_repid
dynnr = '0200'
side = cl_gui_docking_container=>dock_at_right
extension = 900.
ENDIF.
I have gone through many posts in this forum but none of them have a definitive indication if that can be possible, that is why I had to create this new thread. I will be glad if any of you could let me know if there is way accomplishing this.
Thanks in advance,
Raghu.Hi Raghu,
I was specifically interested in exploring the option (if any) of combining conventional controls and the new GUI controls because I am trying to get to a scenario where I should be able create conventional controls like list boxes and buttons dynamically based on user actions. .
For GUI controls you always need some container which is a "bridge" b/w control created in program and the screen. For standard dialogs you don't need such container. You just place them on the screen. Therefore you can combine these techniques by simply placing a container (which you already have and will use for tree control). The rest of the screen area can be used by standard controls (listoboxes, i/o fields etc). This way standard controls would be statically set, whereas container would store GUI control assinged dynamically in program.
If, on the other hand, you want both controls and GUI controls be dynamically determined, just keep you container (for GUI control) and create a subscreen area where you dynamically swap different screens. These screen must be set as subscreens and must have statically defined layout, thus only determination of the screen to be displayed is dynamic here.
Anyhow, there is no way to dynamically set standard controls on the screen. You could, however in turn switch them on/off in PBO (based on certain conditions) but this would require placing all the possible controls and just hiding/showing them. No replacment is then possible, so image empty gaps which this approach would produce.
Ironically the constructor of docking container supports repid and dynpro for no apparent utility.
As I said, container is used only to place some GUI control in it and then send this entire package (container+ GUI control) to appropriate place on the screen. That's why in container's constructor there is both repid and dynpro. These only determine where this container should be attached.
Regards
Marcin -
Issue with selection screen element on At slection scree
Hi All,
I am facing an issue with a checkbox which is present within the subscreen of a standard selection screen.
The issue is that the value of the combobox get toggled by itselfon the event mentioned below. I am unable to find out how this combo box value gets changed by itself on the screen events.I tried clear statemetns etc nothing is helping. I debugged with a watch point on this screen element and found this to happen.It just changes the value of the element to a previously held state.I m trying to clear the combobox but this event puts back the tick mark.How can I stop this.
AT SELECTION-SCREEN ON COL_FROM. "COL_FROM is another screen element diffrent from the combobox
ThanksHi Vighneswaran CE,
This event corresponds to the PAI module of the COL_FROM field. So, it gets executed each time you press any valid function code on the screen (unless there was an error in a previous field). Nothing abnormal here.
That's difficult to help you on that topic, you'd better tell us exactly what report it is, where you have added your code (and what code) to change the checkbox, ...
Best regards,
Sandra -
Adding selection screen elements at run time
Hi,
I have a selection screen with four drop down list which has 20 elements.
When i select any element from drop down, i must be able to add some other UI in the same line.
DD1
DD2
DD3
DD4
If i choose a first item in DD1,
DD1 Lable1 IP1 lable2 IP2
DD2
DD3
DD4
these lables and input fields are not known till selecting the item.
Will i be able to do this in selection screen?
Thanks
VimalrajHave a look at this Report. you have to Capture events on User Command and modify the screen accordingly.
REPORT ztesttt.
PARAMETERS: test1(10) TYPE c MODIF ID sc1,
test2(10) TYPE c MODIF ID sc2,
test3(10) TYPE c MODIF ID sc1,
test4(10) TYPE c MODIF ID sc2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-active = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF screen-group1 = 'SC2'.
screen-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
Selection screen inside a custom container
hey guys,
I have a requirement to display a selection-screen inside a container,How can we solve this problem?
Hey guys Help me out.
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 7, 2008 7:08 AMyou can call a selection screen in sub screen area
declare selection screen as
begin of selection-screen 0100 as subscreen.
end of selection-screen...
then,
in flow logic of your module pool screen
PBO
call subscreen <sub_area> including sy-repid '0100'.
" at selection-screen output event is called
PAI.
call subscreen <sub_area>.
"at selection-screen is called -
How to disable the selection screen element?
Hello Colleague,
I have a report which has a checkbox in the selection screen. Currently I need to create two transaction codes for the report. When Tcode1 is executed, the program will execute in normal way. When Tcode2 is executed, the checkbox should be selected and greyed (not ready to input).
To implement the requirement, I think I should control the screen in the INITIALIZATION event according to the SY-TCODE. But when I tried to use LOOP AT SCREEN, I find SCREEN is empty.
I search a lot of threads. They all introduce the selection control after screen is displayed.
Can any expert help me on the problem?
Thansk & Regards, Yongbo.I think you can use Screen Variants T.Code SHD0.
-
How to use a logical database's selection screen elements
Hi all,
I have used the logical db, pnp, in my report, however when I want to select data about a personel , ie. her name surname plans-positions, how will I join the two tables pa0001 and logical db? and the table t528t - text for plans?
Thanks.Hi Deniz,
First of all give Logical database PNP in program attributes(Goto->Attributes).
In program write the following code.
Infotypes : 0000,
0001.
start-of-selection.
get pernr.
rp-provide-from-last p0000 space pn-begda pn-endda.
if pnp-sw-found = '1'.
w_itab-pernr = p0001-pernr.
else.
reject.
endif.
rp-provide-from-last p0001 space pn-begda pn-endda.
if pnp-sw-found = '1'.
w_itab-vorna = p0001-plans.--->position
else.
reject.
endif.
rp-provide-from-last p0002 space pn-begda pn-endda.
if pnp-sw-found = '1'.
w_itab-vorna = p0002-vorna. -
>first name
w_itab-nachn = p0001-nachn.--->last name
else.
reject.
endif.
append w_itab to t_itab.
end-of-selection.
Dont forget to reward points if found useful.
Thanks,
Satyesh -
Difficulty in adding new parameter in selection screen of GR55 report
Hi Gurus,
I have a requirement to add an extra field in Cost center:Act/Plan/Comm CC Cur report.This is otherwise a Z report in report painter with 0% code (T-code : GR55-> Report group->Report).But,when we go to technical information of this report,it has four standard sap programs,which contains code for this selection screen.It does not even have a modification scope.
Selection screen of this report contains following parameters:
Selection values:
Controlling Ar
Fiscal Year
From Period
To Period
Plan Version
Selection Groups:
Cost Center Group
Or value(s)
Cost Element Group
Or value(s)
My requirement is to add one more parameter : Purchase oeder in new block:
Is there any way to achieve it.
Note: Copying the standard progs into custom prog is not working,i already tried that.
Please let me know your suggestions,if any one of you came across such requirement before.it is very impoertant for me.
Thanks in advance,
MeenakshiHi meenakshi239,
you can always use implicit enhancement spots.
Regards,
Clemens -
Distance of a Docking Container from the Top
Hello,
it is possible to distance an docking container from the top. The container is class CL_GUI_DOCKING_CONTAINER.
I want to show an textfield above the container in my dynpro.
German:
Servus,
ich habe ein Problem.
Ich erzeuge einen Docking Container der Klasse CL_GUI_DOCKING_CONTAINER und möchte nun, dass dieser zum Top einen Abstand hat, damit auf meinem Dynpro noch ein Textfeld überhalt angezeigt wird.
Ist dies möglich?Hi Sebastian,
Check the below code......
I hav used selection screen as base screen and a docking container at top (for texteditor) and a docking container at bottom (for ALV grid).........
PARAMETER p. " Dummy
DATA : container1 TYPE REF TO cl_gui_docking_container,
container2 TYPE REF TO cl_gui_docking_container,
text_editor TYPE REF TO cl_gui_textedit,
alv_grid TYPE REF TO cl_gui_alv_grid,
lt_mara TYPE TABLE OF mara WITH HEADER LINE,
lt_texttab TYPE soli_tab.
AT SELECTION-SCREEN OUTPUT.
CHECK container1 IS NOT BOUND.
CREATE OBJECT container1 EXPORTING repid = sy-repid
dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_top
extension = '100' .
CREATE OBJECT text_editor EXPORTING parent = container1
wordwrap_mode = '1'.
APPEND 'First line in TextEditControl' TO lt_texttab.
text_editor->set_text_as_r3table( EXPORTING table = lt_texttab[] ).
CHECK container2 IS NOT BOUND.
CREATE OBJECT container2 EXPORTING repid = sy-repid
dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_bottom
extension = '300' .
CREATE OBJECT alv_grid EXPORTING i_parent = container2.
SELECT * FROM mara INTO TABLE lt_mara UP TO 20 ROWS.
alv_grid->set_table_for_first_display( EXPORTING i_structure_name = 'MARA'
CHANGING it_outtab = lt_mara[] ).
Cheers,
Jose.
Edited by: Jose on Jun 6, 2008 10:58 AM -
Hello,
Could you please tell me what is wrong either in the code below or in my logic:
DATA: d_container TYPE REF TO cl_gui_docking_container,
e_control TYPE REF TO cl_gui_abapedit.
CALL SCREEN 200.
CREATE OBJECT d_container
EXPORTING
* repid = sy-cprog
* dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_left.
check sy-subrc = 0.
CREATE OBJECT e_control
EXPORTING
parent = d_container.
Logic
- create empty screen 0200
- create docking container docking it to the left part of screen
- embedding abap editor control to this docking container
My question is: why when running program I don't see anything, as the docking container with the control inside wouldn't be there?
Thank you for help in advance.
MarcinHi Jonathan,
The problem was obvious. The code simply should be included in PBO module of the screen.
There is no need to pass neither sy-repid nor sy-dynnr unless it displayed in other screen/program.
Gr8 thanks for your help:)
Regards,
Marcin -
Hi Experts,
Please can any one give me the details ..
1)What is the actual use of selection screen validation?
2) When we use Selection-screen validation?
3)If we are not written the selection-screen validation is there any effect?
I know how to write the validation for a selection screen. But why i am asking above questions is I am very new to ABAP .My Functionl people also new to ABAP. They told me one report.I asked me what are the validation for selection screen . At that time they told there is no validation.
Thats the reason to ask above questions..
please tell me the details..
Thanks In Advance..
Thanks and Regards
Siri..Abhi,
Selection Screen Validation are used for correct input processing.
Selection screen elements are used further in select queries to fetch data. if user enters some wrong input
we will unnecessarily hit the data base with wrong values and select will fail , hence validation of the input
will avoid unnecessary data base hit.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 12:26 PM -
How to position a check box in an ABAP query's selection screen?
Hi Experts,
I am working on SAP queries and for that I have created an infoset. There was a requirement to have a checkbox at selection screen, which we can obtain by Infoset-> Extras->"Selections" tab -> create a parameter as a checkbox.
However, it is appearing at the first place among all the selection screen elements which are defined in the infoset.
Is there any way to have it positioned as per the requirement? (We have checked the option of "sequence on selection screen" provided while creating the checkbox, however, it does not work for us).
Kindly have a look at the attached screen shots.
Here , in the file, “Test Par” is the selection text for the parameter declared.
Thanks
MohitI think I have it 90%there. I have no error now, it edits a
record fine, if you add the checkbox to the record it adds it, and
if you take it away, it does that. BUT now it will not add a new
record.
This is my code now for the update / insert
<cfif not IsDefined("FORM.admin")>
<cfset IsAdmin= 0>
<cfelse>
<cfset IsAdmin= 1>
</cfif>
<cfif isDefined("Form.RecordID")>
<cfquery datasource="#APPLICATION.dataSource#">
UPDATE user
SET user.Fname=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Fname#">,
user.Lname=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Lname#">,
user.userName=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.userName#">,
user.password=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.password#">,
user.email=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.email#">,
user.admin =<cfqueryparam value="#IsAdmin#"
CFSQLType="CF_SQL_INTEGER">
WHERE ID =<cfqueryparam value="#form.RecordID#"
cfsqlType="CF_SQL_INTEGER">
</cfquery>
<cflocation url="indexUser.cfm?RecordID=#Form.RecordID#"
addtoken="no">
<cfelse>
<cfquery result="GetNewRecord"
datasource="#APPLICATION.dataSource#" dbtype="ODBC">
INSERT INTO user
(Fname, Lname, userName, password, email, admin)
VALUES (<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Fname#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.Lname#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.userName#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.password#">,
<cfqueryparam cfsqltype="cf_sql_varchar"
value="#form.email#">,
<cfqueryparam value="#IsAdmin#"
CFSQLType="CF_SQL_INTEGER">)
</cfquery>
<cflocation url="indexUser.cfm">
</cfif>
Is there a better way to write this so it will work? I have
everything else working including the checkbox showing checked if
it is checked in the db, I believe this is my last hang up on a
checkbox.
Any ideas?
Maybe you are looking for
-
Auto start and shutdown 9iR2 on Mac OS X?
Does anybody know how to set up Mac OS X to auto start and auto shutdown 9iR2 on Mac OS X?
-
Sqlserver time out when use multiple leftjoin in searcing
Can anyone explain what reason cause follow #2,#3,#4,#5, i'm confusing for this problem in whole afternoon . thank you very much. you can copy the follow small example to see the timeout issue , if your pc is too quick, haven't yet see timeout issue
-
Sales Employee......master
Dear FNds, I tried with all thread ,seems need some more clarityu2026gurus We are not going to implement any HR module, but we need Sales employee masteru2026 In Partner determination..I tried to add this partner function in Sales Headeru2026 I am ge
-
I allowed my iphone 4 to update 7.0.6 which has blocked whatsapp and wont allow it to connect. I have deleted the app and reinstalled. I have restarted the phone after a power off and still nothing.
-
REP-1241 Circular column dependency originating with column
Dear, I receive the error, REP-1241 Circular column dependency originating with column 'cenvat_opening' I have the following return statement for a column total_credit; function total_creditFormula return Number is begin Return (return nvl(:cf_cenvat