06-18-2013 8:17 AM
Hi all!
How to change the the selection field in the dynamic selection into selection field with selection screen?
Regards
Mio
06-18-2013 2:53 PM
Yes, Raymond's suggestion is the way to do it.
Dynamic selections are provided in logical database to specify selection criteria not defined in the selection screen.
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/content.htm
RFBILA00 uses the Logical Database SDF.
To remove dynamic selections within your program, we need to add the code in the initialization.
INTIALIZATION.
DATA: t_exclude TYPE STANDARD TABLE OF sypfkey.
APPEND 'DYNS' TO t_exclude.
*DYNS is the dynamic selection screen function code.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = t_exclude
.
06-18-2013 9:31 AM
06-18-2013 10:02 AM
I'm writing a custom report ZRFBILA00 (changing the standard report RFBILA00). The camp, for example, you can enter in the dynamic SEGMENT (free) selection. I would like to disable the user the ability to use dynamic (free) selection. I want to make that the input parameters can be entered only via selection screen.
In this case, after the insertion of field SEGMENT, via parameter selection screen, How can I simulate that it is inserted in the dinamic selection. I tried with FM FREE_SELECTIONS_RANGE_2_EX, but does not work. Maybe I'm wrong!?
06-18-2013 11:55 AM
If you want to deactivate accessibility of free selection, there are some solutions like a small code :
NODES: ska1, skb1, bsis, bkpf.
DATA: gv_status TYPE sy-pfkey,
gv_program TYPE sy-repid,
gt_exclude TYPE TABLE OF sy-pfkey.
INITIALIZATION.
GET PF-STATUS gv_status PROGRAM gv_program EXCLUDING gt_exclude.
APPEND 'DYNS' TO gt_exclude.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = gv_status
p_program = gv_program
TABLES
p_exclude = gt_exclude.
And to select from database, look at statement CHECK SELECT-OPTIONS.
Regards,
Raymond
06-18-2013 12:22 PM
Sorry Mio, Have not worked on such requirement. Please un mark my answer as helpful.
BR.
06-18-2013 1:22 PM
Your answer is helpful, because it is not clear to you, it means it is not clear even to many other experts .I explained badly.
So I clarified the question. I hope now it is clear and that someone will respond.
06-18-2013 2:23 PM
Raymond, according to you, you can set the fields of free selection with FREE_SELECTIONS_RANGE_2_EX and see them set up with RS_REFRESH_FROM_DYNAMICAL_SEL? I'd like to do it this way...
Mio
06-18-2013 2:48 PM
Hi Mio Rossi
Check the below links for your reference
definitely below threads will help you
How to get dynamic select options from logical ... | SCN
https://scn.sap.com/thread/990678
http://members.tripod.com/sap_abap/submit_i.htm
Regards,
Bastin.G
06-18-2013 9:48 AM
Hi Mio Rossi
Mio Rossi wrote:
Hi all!
How to change the the selection field in the dynamic selection into selection field with selection screen?
Regards
Mio
if i understand correctly,
you are asking about change the fields dynamically based upon selection in selection screen right
ABAP - Dynamic check boxes in selection screen | An SAP Consultant
SELECTION-SCREEN – Dynamic selection screen change « ABAP Wizard
Checkboxes and Radio Buttons with Function Codes (SAP Library - ABAP Programming (BC-ABA))
Change the Input Fields Dynamically in a Screen
Regards,
Bastin.G
06-18-2013 10:21 AM
Hi Rossi,
Using AT SELECTION-SCREEN OUTPUT event we can provide the dynamic changes on selection screen. All screen elements are dynamically stored in standard table SCREEN.
Example code.
LOOP AT SCREEN.
IF SCREEN-NAME = 'SELECTION SCREEN FIELDNAME'.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP..
LOOP AT SCREEN.
IF SCREEN-NAME = 'SCREEN FIELDNAME'.
SCREEN-ACTIVE = 0.
SCREEN-OUTPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks,
Satya Srinivas.
06-18-2013 2:53 PM
Yes, Raymond's suggestion is the way to do it.
Dynamic selections are provided in logical database to specify selection criteria not defined in the selection screen.
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/content.htm
RFBILA00 uses the Logical Database SDF.
To remove dynamic selections within your program, we need to add the code in the initialization.
INTIALIZATION.
DATA: t_exclude TYPE STANDARD TABLE OF sypfkey.
APPEND 'DYNS' TO t_exclude.
*DYNS is the dynamic selection screen function code.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = t_exclude
.
06-19-2013 8:03 AM
Thanks Susan, you have solved how to remove dynamic selections. Still not clear to me how I can allow users to enter values for only two fields SEGMENT and PRCTR without dynamic selections?
06-19-2013 8:50 AM
I could not find these fields SEGMENT and PRCTR in RFBILA00.
Are they fields on the selection screen?
If they are fields on the selection screen, then get the screen field names for those two fields.
and insert this code in at selection-screen output event.
at selection-screen output.
loop at screen.
if screen-name NS '<Screenfieldname for segment in caps>'
or screen-name NS 'Screenfieldname for prctr in caps'.
screen-input = 0.
endif.
modify screen.
endloop.
Input will be disabled for all fields except for segment and profit center.
Let me know if the issue is solved.
06-19-2013 9:14 AM
The fields SEGMENT and PRCTR are the fields of the table FAGLFREESEL (part of the logical database SDF).
In RFBILA00 are inserted via dynamic selection. There are not on the selection screen. My problem is that I would have them on the selection screen.
06-19-2013 11:08 AM
Yes, I think that can be done.
Just declare this in your selection screen declaration block along with other selection screen fields. (Insert this as the first selection screen field declaration in your program. So you will get the field just above the tabstrips. )
SELECT-OPTIONS s_prctr FOR FAGLFREESEL-PRCTR.
SELECT-OPTIONS s_segment FOR FAGLFREESEL-SEGMENT.
Now this will automatically be passed to the selection field in the dynamic selections if the table is declared. Since FAGLFREESEL is already declared, this criteria will be considered by the logical database. It will give the same result that you get when you enter the values in prctr and segment selection fields in dynamic selection.
http://help.sap.com/saphelp_40b/helpdata/en/9f/dba77a35c111d1829f0000e829fbfe/content.htm
(I tested this for the dynamic selection ska1-ktoks (Account group) using
SELECT-OPTIONS ktoks FOR Ska1-KTOKS.
in my program and it was working fine. Could not test for prctr due to lack of proper data. )
Hope it works. Let me know the result.
06-19-2013 1:02 PM
Thanks Susan!
The solution is perfect: simple, beautiful and even works !
Ciao, Mio
04-22-2014 1:26 PM