Posts

Showing posts with the label at selection-screen output

Sample Program On AT SELECTION-SCREEN OUTPUT - 4.

Image
PROGRAM ztest. TYPE-POOLS : vrm. DATA: p_temp TYPE vrm_id, it_value TYPE vrm_values, wa_value TYPE vrm_value. PARAMETERS: p_cond(10) AS LISTBOX VISIBLE LENGTH 15 . AT SELECTION-SCREEN OUTPUT. p_temp = 'P_COND'. wa_value-key = '1'. wa_value-text = 'YES'. APPEND wa_value TO it_value. wa_value-key = '2'. wa_value-text = 'NO'. APPEND wa_value TO it_value. wa_value-key = '3'. wa_value-text = 'NOT SURE'. APPEND wa_value TO it_value. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = p_temp values = it_value EXCEPTIONS id_illegal_name = 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. OUTPUT: ALSO READ: - ABAP EVENTS During Runtime Of A Report Program. - INITIALIZATION Event - Introduction With A Sample Code. - AT SELECTION-SCREEN Event - Introduction With A Samp...

Sample Program On AT SELECTION-SCREEN OUTPUT - 3.

Image
REPORT ztest. TABLES: zcust_req_header. DATA : v_chk_mdcc_appr(1). DATA : req_no1 TYPE zcust_req_header-req_no. DATA : it_tmp_req_hdr TYPE STANDARD TABLE OF zcust_req_header WITH HEADER LINE, wa_tmp_usr21 TYPE usr21. *--------------------------------------- * Selection Screen *--------------------------------------- SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE title1 NO INTERVALS. SELECT-OPTIONS: s_req_no FOR zcust_req_header-req_no. SELECT-OPTIONS: s_crt_by FOR zcust_req_header-created_by NO-EXTENSION NO INTERVALS DEFAULT sy-uname. SELECTION-SCREEN END OF BLOCK b1. SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE title2 NO INTERVALS. PARAMETERS: p_r1 RADIOBUTTON GROUP rad2 MODIF ID bl3 , " All p_r2 RADIOBUTTON GROUP rad2 DEFAULT 'X' MODIF ID bl3 ," CREATED should be selected by default p_r3 RADIOBUTTON GROUP rad2 MODIF ID bl3 , " Rejected p_r4 RADIOBUTTON GROUP rad2 MODIF ID bl3. " Approved by ABC team ...

Sample Program On AT SELECTION-SCREEN OUTPUT - 2.

Image
REPORT ztest. TABLES: pa0000, pa0001. PARAMETERS: p_chk1 AS CHECKBOX USER-COMMAND rusr, p_chk2 AS CHECKBOX USER-COMMAND rusr. SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME. SELECT-OPTIONS: s_pernr FOR pa0000-pernr MODIF ID a, s_stat2 FOR pa0000-stat2 MODIF ID d. SELECTION-SCREEN: END OF BLOCK blk1. AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN.    IF screen-group1 = 'A'.       IF p_chk1 = 'X'.           screen-active = 1.       ELSE.           screen-active = 0.       ENDIF.     MODIFY SCREEN.    ENDIF.    IF screen-group1 = 'D'.        IF p_chk2 = 'X'.            screen-active = 1.        ELSE.            screen-active = 0.        ENDIF.     MODIFY SCREEN.    ENDIF. ENDLOOP. ...

Sample Program On AT SELECTION-SCREEN OUTPUT - 1.

Image
This sample program will show how by selecting a particular radio button the selection screen will be modified. REPORT ztest. TABLES : mara, sscrfields. DATA : d_ucomm TYPE sscrfields-ucomm. SELECT-OPTIONS: s_matnr FOR mara-matnr. PARAMETERS: p_werks LIKE mard-werks. PARAMETERS : r1 RADIOBUTTON GROUP g1 USER-COMMAND sel, r2 RADIOBUTTON GROUP g1, r3 RADIOBUTTON GROUP g1. AT SELECTION-SCREEN OUTPUT. IF d_ucomm = 'SEL'. IF r3 = 'X'.   LOOP AT SCREEN.     IF screen-name = 'P_WERKS'.         screen-input = 0.         MODIFY SCREEN.     ENDIF.   ENDLOOP. ENDIF. ENDIF. AT SELECTION-SCREEN. d_ucomm = sscrfields-ucomm. OUTPUT: On selecting the third radio button: ALSO READ: - ABAP EVENTS During Runtime Of A Report Program. - INITIALIZATION Event - Introduction With A Sample Code. - AT SELECTION-SCREEN Event - Introduction With A Sample Code. - AT ...

ABAP Events - AT SELECTION-SCREEN OUTPUT Keyword, Example With Output.

Image
All About AT SELECTION-SCREEN OUTPUT Event With A Sample Code. This event gets triggered at the PBO of the selection screen every time the user presses “ENTER” button on the selection screen. In simple words, this event is triggered after loading the selection screen into memory but before it is displayed to the user. This event can be used to change the properties of the selection screen fields dynamically. Hence this event allows us to modify the selection screen and its fields directly before it is displayed. Attributes related to any selection screen fields are saved in a workarea called SCREEN during this event. In case you try to use two or more AT SELECTION-SCREEN OUTPUT events, you will get an error message “The event AT SELECTION-SCREEN OUTPUT was already specified in the program.” For example, if you select some radiobutton in the selection screen then you want some of the fields should become invisible or grayed out. Such scenarios can be achieved by using thi...