AT SELECTION SCREEN OUTPUT ON VALUE REQUESt problem
hi I am fetching the values into second field based on first field by reading them like this
<b>
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ST_NAME.
CLEAR: FIELD_VALUE, DYNPRO_VALUES.
REFRESH DYNPRO_VALUES.
FIELD_VALUE-FIELDNAME = 'EXCH'.
APPEND FIELD_VALUE TO DYNPRO_VALUES.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = DYNPRO_VALUES.
READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
IF FIELD_VALUE-FIELDVALUE IS NOT INITIAL.
IF SY-SUBRC = 0 AND FIELD_VALUE-FIELDVALUE = 1.
FIELD_VALUE-FIELDVALUE = 'BSE'.
ELSEIF SY-SUBRC = 0 AND FIELD_VALUE-FIELDVALUE = 2.
FIELD_VALUE-FIELDVALUE = 'NSE'.
ENDIF.
SELECT STOCK ST_NAME
FROM
ZEXCH
INTO TABLE TEMP_ITAB
WHERE EXCH = FIELD_VALUE-FIELDVALUE.
IF SY-SUBRC = 0.
FLAG = 'X'.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'ST_NAME'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'ST_NAME'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = TEMP_ITAB.
ENDIF.
</b>
This is working fine, now my requirement is to fetch a value into 3rd field from database table when the user selects a value through 'F4IF_INT_TABLE_VALUE_REQUEST'
Please help me with this, hope u got my problem, i want to know how to continue and fill value into third field after filling the field ST_NAME
points guaranteed
Hi,
If you have two parameters, you want to display values(f4) in parameter 2
depending on the values entered in parameter 1.
REPORT Z_SRI_HELP_VALUE_FOR_TABLES .
tables tcurt.
DATA DYFIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.
PARAMETERS: P_WAERS LIKE TCURT-WAERS, "Currency
P_LTEXT LIKE TCURT-LTEXT, "Long Text
P_KTEXT LIKE TCURT-KTEXT. "Short Text
*--- Example of updating value of another field on the screen -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WAERS.
CLEAR: DYFIELDS[], DYFIELDS.
*--- select currency
CALL FUNCTION 'HELP_VALUES_GET'
EXPORTING
fieldname = 'WAERS'
tabname = 'TCURT'
IMPORTING
SELECT_VALUE = P_WAERS.
*--- get long text for the selected currency
SELECT SINGLE LTEXT FROM TCURT
INTO DYFIELDS-FIELDVALUE
WHERE SPRAS = SY-LANGU
AND WAERS = P_WAERS.
IF SY-SUBRC <> 0.
CLEAR DYFIELDS-FIELDVALUE.
ENDIF.
*--- update another field
DYFIELDS-FIELDNAME = 'P_LTEXT'.
APPEND DYFIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
tables
dynpfields = DYFIELDS .
*--- Example of reading value of another field -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KTEXT.
*--- read another field
CLEAR: DYFIELDS[], DYFIELDS.
DYFIELDS-FIELDNAME = 'P_WAERS'.
APPEND DYFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = DYFIELDS .
READ TABLE DYFIELDS INDEX 1.
*--- get short text and update current field
SELECT SINGLE KTEXT FROM TCURT
INTO P_KTEXT
WHERE SPRAS EQ SY-LANGU
AND WAERS EQ DYFIELDS-FIELDVALUE.
How to add F4 functionality to a paramter variable? Say P_name ie Parameters: P_name like dbtab-fieldname
in At selection-screen on value-request for p_name. How should I add the values john, abraham, linga etc so that these values appear when f4 is pressed on the field in the selection screen?
PARAMETERS: p_name(10).
DATA: BEGIN OF value_tab OCCURS 0,
name(10),
END OF value_tab.
DATA :field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.
DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE. DATA : x TYPE string.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_name.
REFRESH value_tab[].
REFRESH field_tab[].
REFRESH return_tab[].
field_tab-fieldname = 'ERNAM'.
field_tab-tabname = 'VBAK'.
APPEND field_tab.
value_tab-name = 'John'.
APPEND value_tab.
value_tab-name = 'Abraham'.
APPEND value_tab.
value_tab-name = 'Lingam'.
APPEND value_tab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = field_tab-fieldname
TABLES
value_tab = value_tab
field_tab = field_tab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
p_name = return_tab-fieldval.
ENDIF.
Regards
Sudheer
Similar Messages
-
At selection screen output problem when a field is obligatory
Hi All,
I have two radiobuttons on the selection screen and when I select first radiobutton one screen should display and the other should not be displayed and vice-versa. It is working fine if I do not have a mandatory field.I am pasting my code here.Can anyone please help me how to handle this situation when we have some mandatory fields on one of these screens.
TABLES : mara,marc.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_meth1 RADIOBUTTON GROUP g1 USER-COMMAND g1,
p_meth2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK matnr WITH FRAME TITLE text-002.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS : so_matnr FOR marc-matnr MODIF ID m1 obligatory.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS : so_werks FOR marc-werks MODIF ID m1 .
SELECTION-SCREEN END OF BLOCK matnr.
SELECTION-SCREEN BEGIN OF BLOCK file WITH FRAME TITLE text-003.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_fpath TYPE ibipparms-path MODIF ID m2 LOWER CASE.
SELECTION-SCREEN END OF BLOCK file.
SELECTION-SCREEN BEGIN OF BLOCK date WITH FRAME TITLE text-004.
SELECTION-SCREEN SKIP 1.
PARAMETERS : p_date TYPE datuv.
SELECTION-SCREEN END OF BLOCK date.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'M1'.
IF p_meth1 = 'X'.
screen-active = 1.
ENDIF.
IF p_meth2 = 'X'.
screen-active = 0.
ENDIF.
WHEN 'M2'.
IF p_meth2 = 'X'.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
IF p_meth1 = 'X'.
screen-active = 0.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
Thanks in advance
SandeepObligatory fields with your requirement will not work, reason : The GUI checks obligatory fields before passing the control back to the program (i.e Before triggering the PAI )
If you check for empty fields and give appropriate error message in the PAI, the program will not allow you to switch to the other radio button until you fill something in the fields because the moment you select a radiobutton, it will validate the field and issue the error message.
So it is like a catch 22 situation.
All you can really do is to check see which radio button is clicked and then do your processing. Also make sure to assign a user command to the radiobutton and query it in the AT SELECTION SCREEN and based on the radiobutton selected, decide which fields should be validated.
" Additon...
INITIALIZATION " Default values
p_meth1 = 'X'.
AT SELECTION-SCREEN. " General PAI
if p_meth1 EQ 'X'.
"validate fields for meth1.
elseif p_meth2 EQ 'X'.
" validate fields for meth2.
endif.
regards,
Advait -
Problems in at selection-screen output - setting pushbutton invisible
Hello,
I hope I can get some help here
I have a problem with setting a pushbutton invisible
i have a field (long-text) in my screen - and behind this a pushbutton for calling the editor
if in a variant the parameters field is set invisible i also want to set the pushbutton invisible
i have no idea why in the at selection-screen output event screen-invisible is always 0 - but in the variant the field is set invisible.
i need to know if the parameters field is invisible to set the pushbutton the same
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) S_TXB_L1.
PARAMETERS S_TXT_L1 TYPE ZHR_FC_STRING.
SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_1 USER-COMMAND YLTXT1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) S_TXB_L2.
PARAMETERS S_TXT_L2 TYPE ZHR_FC_STRING.
SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_2 USER-COMMAND YLTXT2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) S_TXB_L3.
PARAMETERS S_TXT_L3 TYPE ZHR_FC_STRING.
SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_3 USER-COMMAND YLTXT3.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME(7) = 'S_TXT_L'.
MERK_INVISIBLE = SCREEN-INVISIBLE.
ENDIF.
IF SCREEN-NAME(6) = 'P_LTX_'.
SCREEN-INVISIBLE = MERK_INVISIBLE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks very much...
HelmutI agree - there seems to be some confusion here. In the variant the field can only be "hidden" while in the code it is possible to make the field completely invisible. 'Hiding' the field in the variant merely hides it by default and adds a 'plus' button to the toolbar, by clicking which the hidden elements can be exposed.
As far as changing the screen fields goes, I find it usefull to use MODIF ID. Perhaps this blog could be helpful:
http://friendlyabaper.blogspot.com/2009/07/my-super-awesome-selection-screen.html
P.S. Please use the code tags for the code, per Forum Rules. -
Problem on "at selection-screen output." command
Hi ,
in my programe a part of code is :-
selection-screen : begin of block b0 with frame title text-000.
selection-screen: skip 1.
parameters: s_box1 radiobutton group g1 user-command u1 default 'X',
s_box2 radiobutton group g1.
selection-screen : end of block b0 .
selection-screen : begin of block b2 with frame title text-002.
select-options : s_vend for bseg-lifnr modif id m1 .
selection-screen : end of block b2 .
selection-screen : begin of block b3 with frame title text-003.
select-options : s_budat for bkpf-budat modif id m2 .
selection-screen : end of block b3 .
at selection-screen output.
if s_box1 = 'X'.
loop at screen.
if screen-group1 = 'M2'.
screen-active = '0'.
modify screen.
elseif screen-group1 = 'M1' .
screen-active = '1'.
modify screen.
endif.
endloop.
elseif s_box2 = 'X'.
loop at screen.
if screen-group1 = 'M2' .
screen-active = '1'.
modify screen.
elseif screen-group1 = 'M1'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif.
while executing this one...
while clicking S_BOX2 from S_BOX1 , S_VEND is changing to S_BUDAT but if I click again S_BOX1 this program goes to infinite loop.
Please help me to correct this problem.
Thankx in adv.
Biswajit
N.B:- This is a test code. no coding convention is followed.I just copied your code and Tested it is working fine with out any problem.
REPORT zscreen_test_.
TABLES:bseg,bkpf.
SELECTION-SCREEN : BEGIN OF BLOCK b0 WITH FRAME TITLE text-000.
SELECTION-SCREEN: SKIP 1.
PARAMETERS: s_box1 RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X',
s_box2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN : END OF BLOCK b0 .
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS : s_vend FOR bseg-lifnr MODIF ID m1 .
SELECTION-SCREEN : END OF BLOCK b2 .
SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS : s_budat FOR bkpf-budat MODIF ID m2 .
SELECTION-SCREEN : END OF BLOCK b3 .
AT SELECTION-SCREEN OUTPUT.
IF s_box1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M2'.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF screen-group1 = 'M1' .
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF s_box2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M2' .
screen-active = '1'.
MODIFY SCREEN.
ELSEIF screen-group1 = 'M1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
"If you have any code next to this place that under appropriate
"events. -
Problem in using at selection-screen output
Hai Frnds,
I am using 5 parameters in the selection screen . I am entering data in the 4 input fields. Then I am doing concatenate 4 fileds data into the 5th field in the event AT SELECTION-SCREEN OUTPUT, but my problem is When ever i click ENTER , then only 5th field is updating. With out ENTER key , Is it possible update 5th filed.
Thanks,
Kiran.Hi,
We can restrict the functionality of ENTER.
User the Concatenation in AT SELECTION-SCREEN EVENT
because AT SELECTION-SCREEN OUTPUT is triggered before
selection screen is displayed.Below code will definitly work.
Ex:
Tables:SSCRFIELDS.
At selection-screen.
IF SY-ucomm = ' '.
Clear SSCRFIELDS-UCOMM.
ENDIF.
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
CONCATENATE <FIELDS> INTO PARAMETER5.
ONLI is Function code of F8
' ' is for enter.
The above code will surely work.
Thanks. -
At selection screen output problem
Hi all,
I am trying to make a few fields disabled based on the selection of a radio button. I have done it in dialog programming, but in report its not working. Please tell me where i have gone wrong. My code:
* Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER : rb_dwld RADIOBUTTON GROUP radi DEFAULT 'X',
rb_upld RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
SELECT-OPTIONS : so_cctrl FOR /dceur/z_crconar-crdt_ctrldsa MODIF ID
sc1 NO INTERVALS OBLIGATORY,
so_cusno FOR /dceur/z_crdtlmt-dealer MODIF ID sc1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS : so_ctrl1 FOR /dceur/z_crconar-crdt_ctrldsa MODIF ID
sc2 NO INTERVALS OBLIGATORY.
PARAMETER pa_fname TYPE rlgrap-filename MODIF ID sc2.
SELECTION-SCREEN END OF BLOCK b3.Hi,
Please check the below code.
This is one of my requirement.
* Creation of two blocks with parameter fields for create and update
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER p_create LIKE rlgrap-filename MODIF ID crt.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
PARAMETER p_update LIKE rlgrap-filename MODIF ID upt.
SELECTION-SCREEN: END OF BLOCK b2.
* Making one parameter field active at a time
AT SELECTION-SCREEN OUTPUT.
IF rb_crt = 'X'. "CREATE BUTTON IS SELECTED
PERFORM hide_rb_options.
CLEAR p_create.
ELSE. "UPDATE BUTTON IS SELECTED
PERFORM hide_rb_options.
CLEAR p_update.
ENDIF.
*& Form hide_rb_options
FORM hide_rb_options .
IF rb_crt = 'X' .
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'CRT'.
screen-active = 1.
MODIFY SCREEN.
WHEN 'UPT'.
screen-active = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'UPT'.
screen-active = 1.
MODIFY SCREEN.
WHEN 'CRT'.
screen-active = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ENDIF.
ENDFORM. " hide_rb_options
May it helps you.
Regards.
DS. -
At-selection screen output and radio button together
Hi all,
I want to make a screen with radio buttons and a drop down menu on selection screen as soon as I check any button and click on Open from drop down menu the output should come according to the button cheked but the problem is that desired output is not coming.
Please see if something could be done.
Thanks,
ShwetaHi,
Here is the code see y it didnt responds,
I made ZMENU2 in SE41 with Menu bar as OPEN , also activated buttons BACK and EXIT.
tables : sscrfields.
CONSTANTS : buttonselected TYPE c LENGTH 1 VALUE 'X'.
DATA: ok_code LIKE sy-ucomm.
SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
SELECTION-SCREEN ULINE /1(60).
PARAMETERS: first RADIOBUTTON GROUP rad DEFAULT 'X',
second RADIOBUTTON GROUP rad,
third RADIOBUTTON GROUP rad,
fourth RADIOBUTTON GROUP rad,
fifth RADIOBUTTON GROUP rad.
SELECTION-SCREEN END OF BLOCK frame1.
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'ZMENU2'.
If first = buttonselected and ok_code = 'OPEN'..
WRITE 'You selected first button'.
ELSEIF second = buttonselected and ok_code = 'OPEN'..
WRITE 'You selected second button'.
ELSEIF third = buttonselected and ok_code = 'OPEN'.
WRITE 'You selected third button'.
ELSEIF fourth = buttonselected and ok_code = 'OPEN'.
WRITE 'You selected fourth button'.
ELSEIF fifth = buttonselected and ok_code = 'OPEN'.
WRITE 'You selected fifth button'.
ELSEIF ok_code ='BACK'.
LEAVE PROGRAM.
ELSEIF ok_code ='EXIT'.
LEAVE PROGRAM.
ENDIF. -
At selection-screen output probelm
Hi ,
I am using 4 parameters in the selection screen . I am entering data in the 3 input fields. Then I am doing concatenate 3 fileds data into the 4 th field in the event AT SELECTION-SCREEN OUTPUT, bur my problem is When ever i click ENTER , then only 4th field is updating. With out ENTER key , Is it possible update 4th filed.
regards,
ramajay reddyHi,
This is not possible without a user action on the screen, unless your fields are drop down lists, check box or radiobutton respectively, Reason is that the SAP Screen processing will not trigger the PAI event unless there is a user action on the screen like pushing a button, radiobutton , checkbox or selecting a value from a dropdown list. And hence PBO will not get triggered either. Thus entering value in input fields and pressing the tab key is not enough. The user must press 'Enter' if the PAI--PBO should be triggered.
Pressing 'Enter' is much more user friendly and convinient than adding a button/radiobutton/checkbox on the selection screen to update other fields on the selection screen as in your scenario.
regards,
Advait -
At selection screen output not responding
Hi ppl,
I've 4 selection options in my screen. however I just need user to insert only 1 of the 4 for searching. Therefore i included 4 radio buttons. when user select <i>rbf</i>, <i>sfileno</i> will activer and other 3 will be grayed out, when user select <i>rbi</i>, <i>sidnum</i> will active and other will not be active and so forth. You can see the codes below.
However, during the program running, I found out when i select <i>rbf,</i> the other select options fields - <i>sfileno</i>, <i>sidnum</i> n <i>scompsno</i> are not inactive/grayed. It is the same when I seledt the other radio button. I just seem that i receive no response from the program. What have i done wrong here. please help. TQ
SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-t01 .
SELECT-OPTIONS : sfileno FOR zlic_masterdb-nofailpermohonan modif id f01
sidnum FOR zcustomer-idnumber modif id i01,
sconame FOR zcustomer-contactname modif id n01,
scompsno FOR zcom_compdhdr-compsno modif id c01.
PARAMETERS: rbf RADIOBUTTON GROUP g1 ,
rbi RADIOBUTTON GROUP g1,
rbn RADIOBUTTON GROUP g1,
rbc RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK frm1.
INITIALIZATION.
sfileno = '00001'.
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'f01' OR
SCREEN-GROUP1 = 'i01' OR
SCREEN-GROUP1 = 'n01' OR
SCREEN-GROUP1 = 'c01'.
IF rbf = 'X'.
IF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 0.
ENDIF.
ELSEIF rbi = 'X'.
IF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 0.
ENDIF.
ELSEIF rbn = 'X'.
IF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 0.
ENDIF.
ELSEIF rbc = 'X'.
IF SCREEN-GROUP1 EQ 'c01'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-GROUP1 EQ 'f01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'n01'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-GROUP1 EQ 'i01'.
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
continue.
ENDLOOP.hi Enzo
Check my sample code
TABLES: eban,
SSCRFIELDS.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
p_matnr TYPE eban-matnr MODIF ID g1,
sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
str_loc TYPE eban-lgort MODIF ID g4.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
* declaration of internal tables and work areas to be used
DATA: BEGIN OF it_pr OCCURS 0,
banfn TYPE eban-banfn,
bnfpo TYPE eban-bnfpo,
loekz TYPE eban-loekz,
statu TYPE eban-statu,
ekgrp TYPE eban-ekgrp,
matnr TYPE eban-matnr,
werks TYPE eban-werks,
lgort TYPE eban-lgort,
preis TYPE eban-preis,
peinh TYPE eban-peinh,
END OF it_pr.
DATA: BEGIN OF it_mat OCCURS 0,
matnr TYPE eban-matnr,
END OF it_mat.
*DATA:BEGIN OF ITAB1 OCCURS 0,
DATA: l_answer.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF it_fieldcat,
it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
* declaration of variables to be used
DATA: r_ucomm TYPE sy-ucomm,
mat_no TYPE eban-matnr,
len TYPE i VALUE 1,
count TYPE i VALUE IS INITIAL,
iflag TYPE i VALUE IS INITIAL,
iflag1 TYPE i VALUE 0.
DATA :pr_id TYPE sy-repid,
rt_extab TYPE slis_t_extab.
INITIALIZATION.
pr_id = sy-repid.
probably it would sol;ve ur problem
regards
ravish
<b>plz dont forget to reward points if helpful</b> -
Enforcing event AT-SELECTION-SCREEN OUTPUT
Hi Gurus
Does anybody know how to force event AT-SELECTION-SCREEN OUTPUT ?
What I'm aiming for is changing screen somewere outside of this event. For example.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_param.
IF p_param = 'change'.
changes_in_screen = 'X'.
*???* "forcing AT-SELECTION-SCREEN OUTPUT event
ENDIF.
AT-SELECTION-SCREEN OUTPUT.
IF changes_in_screen = 'X'.
LOOP AT SCREEN.
"do something
ENDLOOP.
ENDIF.
I would be grateful for any hints.One alternative to define two selection screens. First selection screen (default selection screen of report #1000) having Client_type. After user hits execute (F8) then show the second selection screen with corresponding parameters.
PARAMETERS: p_client(1).
SELECTION-SCREEN BEGIN OF SCREEN 9000 AS WINDOW.
PARAMETERS: p_name(20),
p_lname(20),
p_cname(20),
p_oname(20).
SELECTION-SCREEN END OF SCREEN 9000.
AT SELECTION-SCREEN OUTPUT.
CHECK sy-dynnr = '9000'.
* Hide corresponding fields on second selection screen
* based on values of P_CLIENT.
* Also should make key parameters obligatory!
START-OF-SELECTION.
CALL SELECTION-SCREEN 9000 STARTING AT 5 5.
Another alternative is to use a dialog/module pool program to handle this. Such screen field controlling can easily be done in dialog programs because you have full PAI/PBO control, unlike report program selection screen 1000. Unfortunately in a dialog program it is not easy to reproduce the functionality of a select-option. -
AT selection-screen on ON HELP-REQUEST
Hi
What is normally done in the Selection Screen event :
AT selection-screen on ON HELP-REQUEST.
Normally pressing F1 helps gives Documentation present in Data Element assoicated with the field. Exactly in what cases would we be needing to use this event.Hi,
That event is used for search.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
field_name = 'p_file'
importing
file_name = p_file.
If you code in the same manner in the selection screen you will able to search and select a file from your work station, so that it will be uploaded in SAP.
I hope this will help you, if not plzzz be back.
CHEERS
If your problem is solved award points and close the thread. -
Selection-screen output , initialaization confusion
we have selectionscreen output, initialization events
first initializatuion,
than at selection-screen output
execute it, than we pressed f3 came bact to selection-screen
than which event ll trigger
thank you
kals.The different events in a report Program are:
Load-of-program
Triggers the associated event in an internal session after loading a program of type 1, M, F, or S. Also runs the associated processing block once and once only for each program and internal session. The processing block LOAD-OF-PROGRAM has roughly the same function for an ABAP program of type 1, M, F or S as a constructor has for classes in ABAP Objects
Initialization.
This event is executed before the selection screen is displayed .
Initialization of all the values.
You can assign different values other than the values defaulted on the selection screen .
You can fill your selection screen with some values at runtime.
At Selection-Screen.
The event is processed when the selection screen has been processed (at the end of PAI ).
Validation & Checks of inputted values happen here
Extras :
ON VALUE-REQUEST FOR psel_low_high .
The pushbutton for F4 (Possible entries) appears beside the appropriate field.
... ON HELP-REQUEST FOR psel_low_high
. ... OUTPUT
This event is executed at PBO of the selection screen every time the user presses ENTER
Start-of-Selection.
Here the program starts selecting values from tables.
End-of-selection.
After all the data has been selected this event writes the data to the screen.
Interactive Events
Used for interactive reporting. It is used to create a detailed list from a basic list.
Events in an ABAP/4 Report Program
Start-Of-Selection
Processing block is executed after processing the selection screen
All the data is selected in this block.
All the main processing on the data except for interactive reporting is handled in this block.
End-Of-Selection
Data which is selected and has been processed is printed to the screen in this block.
List Processing happens in this block
Top-of-Page.
New-Page.
End-of-Page.
Events during List Processing
Top-of-Page.
Triggered by the first write statement in the program
It is used to have a standard header in the program for all the pages.
TOP-OF-PAGE is only executed before outputting the first line on a new page
New-Page.
Can be used when one wants to display different data on different pages
Terminates the current page and continues output on a new page.
Will not trigger the Top-of-Page or End-of-Page.
End-of-Page.
It is used to have a standard footer for all the pages.
Triggered by the program if the number of records exceed the line-count of the program.
Hope u understood.... -
Help Needed in At selection screen output
Hi Experts,
I need your help in AT SELECTION SCREEN OUTPUT event. My issue is i have 4 radio button and with each radio button couple of parameters that need to be filled in selection screen of report. My requirement is that sometimes user enters details in second radio button parameters but forgot to change the radio button to second one so kindly suggest a solution so that radio button gets selected as per user input in parameter like if user clicks on certain parameter to enter value then automatically corresponding radio button gets selected.
Thanks in advance for all your help.example from a checkbox in one of my progs..but you can do same approach with radio butts
parameters p_test as checkbox default abap_on user-command test.
at selection-screen.
if sy-ucomm = 'TEST'.
perform birth_mnth_chck.
endif. -
At Selection-screen output event
Hi
can any one give me some examples for at selection-screen output event
with regards
nagaraj
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Nov 8, 2011 12:13 PMThanks Benedict
Creating Module %_S_KOSTL and write our own logic to bring the parameter id value of Cost center from User profiles is NOT possible in program RM06BF00, screen 1000.
We can do that in Copied program of RM06BF00 ..which is the very last option.
I wanted to do that with User-exits or BADI or Enhancement spot etc...which i Couldn't do it so far...
The alternate might be Zprog and Ztcode or an SNOTE..
if you ALL think its NOT possible with User-exits or BADI or Enhancement spot or SNOTE etc..Then i will close this Thread...
Please let me know ASAP...
Thanks
Govi -
AT SELECTION-SCREEN OUTPUT event of standard tcode
Hi
I need User-exit or BADI or Enhancment spot in AT SELECTION-SCREEN OUTPUT event of ME55.
I need to populate the default cost center into the cost center field from user parameters with pid 'KOS' when i execute the ME55.
I maintained the PID in user parameters but the value is not getting populated in ME55.
Please let me know
GoviThanks Benedict
Creating Module %_S_KOSTL and write our own logic to bring the parameter id value of Cost center from User profiles is NOT possible in program RM06BF00, screen 1000.
We can do that in Copied program of RM06BF00 ..which is the very last option.
I wanted to do that with User-exits or BADI or Enhancement spot etc...which i Couldn't do it so far...
The alternate might be Zprog and Ztcode or an SNOTE..
if you ALL think its NOT possible with User-exits or BADI or Enhancement spot or SNOTE etc..Then i will close this Thread...
Please let me know ASAP...
Thanks
Govi
Maybe you are looking for
-
Can I use two different iTunes accounts for one iPhone?
I have a UK iTunes account but am currently living in Qatar and for banking reasons wish to make purchases using a Qatar credit card only. For some idiotic reason Apple will not allow me to do this. If I have to open a new account to use my Qatar c
-
Can I fix the green color in the middle of my screen?
Over the past several months, I've been noticing a dark shape in the middle of my screen, but it hasnt affected anything so I haven't been concerned with it. Now, it has turned into a pale shade of green that are two circles in the middle of my scree
-
Why are my RMAN backup files still around?
Environment: Oracle 11.2.0.3 EE on Solaris 64-bit Good Morning (at least it's morning here at the moment), I have a test database that I currently have set up to do an Incremental Level 0 backup every morning at about 03:00. I also do an 'archivelog
-
Printer Characters on Top Left
Hi, When I print any oracle apps, report using USLWPORTRAIT style on my dot matrix printer, the printer initilialization characters like '0o0P8D2SU2A' etc., are always printed on top left of my report.( on the first page) Pls let me know how to avoid
-
Why between for date is not returning data for this query ?
Hello, i have a table with this structure and i am writing this query for fetching some rows based on some condition , but this query is not returning any data . Can you please tell why ? ID DT 003 11/8/2011 002 10/8/2011 001 9/8/2011