Skip to Content

Diff b/w At Selection-Screen Output and At Selection-Screen on Radio Button

Hello Friends,

Could anybody help me out in knowing the difference between At Selection-Sreeen Output & At Selection-Screen on Radiobutton.

When there is a screen modification based on Radia Button. What would be triggered?, How the Process goes exactly?.

Thanks & Regards

Sathish Kumar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 01:03 PM

    Hi Sathish,

    Once you assign the radiobuttons a user command then the AT SELECTION SCREEN ON and AT SELECTION SCREEN OUTPUT trigger when the user chooses a radiobutton. All screen modifications can be performed in the AT SELECTION SCREEN OUTPUT event.

    The code is given below:

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS : p_isfee RADIOBUTTON GROUP g1 USER-COMMAND f1 DEFAULT 'X'.

    SELECTION-SCREEN COMMENT 3(14) text-002 FOR FIELD p_isfee. "Issue Fee

    PARAMETERS : p_trfee RADIOBUTTON GROUP g1.

    SELECTION-SCREEN COMMENT 20(14) text-003 FOR FIELD p_trfee."Transfer Fee

    SELECTION-SCREEN END OF LINE.

    AT SELECTION-SCREEN OUTPUT perform Screen modifications

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 01:04 PM

    Just wanted to add that the AT SELECTION SCREEN event is triggered before the AT SELECTION SCREEN OUTPUT event.

    Hope this helps you.

    Regards,

    Ganesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 01:07 PM

    Hi satish,

    The order of all the events of classical reports

    1. Initialization

    2. <b>At selection-screen output</b>

    3. At selection-screen on value request for field

    4. At selection-screen on help request for field

    5. At selection-screen on select-option field

    6. At selection-screen on parameter field

    7. At selection-screen on Block Blockname

    8. <b>At selection-screen on Radiobutton Group Groupname</b>

    9. At selection-screen

    10. start-of-selection.

    11. Top-of-page

    12. End-of-page

    13. End-of-selection

    <b>At selection-screen on Radiobutton Group Groupname</b>

    This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi .If the report starts an error dialog at this point, precisely these fields of the radio button group radi become ready for input again.

    <b>At selection-screen output</b>

    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.

    Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.

    Example

    REPORT zex33 message-id zsmg .

    PARAMETER :p_vbeln LIKE vbak-vbeln MODIF ID md1,

    p_erdat LIKE vbak-erdat MODIF ID md2 default sy-datum,

    p_auart like vbak-auart.

    DATA: return TYPE TABLE OF ddshretval WITH HEADER LINE.

    At selection-screen .

    if p_vbeln ne space.

    message e001(zsmg) with 'select by pressing F4'.

    endif.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vbeln.

    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

    EXPORTING

    tabname = 'VBAK'

    fieldname = 'VBELN'

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    dynprofield = 'P_VBELN'

    TABLES

    return_tab = return

    EXCEPTIONS

    field_not_found = 1

    no_help_for_field = 2

    inconsistent_help = 3

    no_values_found = 4

    OTHERS = 5.

    LOOP AT SCREEN.

    IF screen-group1 = 'MD1'.

    screen-input = '0'.

    MODIFY SCREEN.

    CONTINUE.

    ENDIF.

    ENDLOOP.

    at selection-screen on p_auart.

    if p_auart eq space.

    message e002(zsmg) with 'Enter Sales document Type'.

    endif.

    At selection-screen output.

    LOOP AT SCREEN.

    IF screen-group1 = 'MD2'.

    screen-input = '0'.

    MODIFY SCREEN.

    CONTINUE.

    ENDIF.

    ENDLOOP.

    START-OF-SELECTION.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 01:15 PM

    AT SELECTION-SCREEN is used process the user commands

    AT SELCTION-SCREEN OUPUT is used for the display/change mode of selection screen fields

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2007 at 01:28 PM

    Hi Satish,

    n the PBO of the selection screen, the

    AT SELECTION-SCREEN OUTPUT.

    event is triggered. This event block allows you to modify the selection screen and its fields directly before it is displayed.

    In the PAI event of the selection screen, the event

    AT SELECTION-SCREEN ON RADIOBUTTON ...

    event is triggered.

    That means: If the selection-screen is displayed and ready for input, you are between PBO (process before input) and PAI (process after input). When any command function is executed (ENTER, EXECUTE,...), PAI is triggered allowing you to check the fields and if necessary, do further action.

    If you want a PAI immediately when a radiobutton is changed, you need a function code assigned to a checkbox or radio button, clicking it not only changes the field contents, but also triggers the PAI event and places the function code in the OK CODE field.

    Regards,

    Clemens

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.