Posts

Showing posts from November, 2011

Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 2.

Image
REPORT ztest. PARAMETERS : p_file TYPE rlgrap-filename. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file. CALL FUNCTION 'KD_GET_FILENAME_ON_F4' CHANGING file_name = p_file EXCEPTIONS mask_too_long = 1 OTHERS = 2. IF sy-subrc <> 0. ENDIF. OUTPUT: On pressing F4 on the field, 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 SELECTION-SCREEN OUTPUT Event - Introduction With A Sample Code. - AT SELECTION-SCREEN ON VALUE REQUEST- Introduction With A Sample Code. - AT SELECTION-SCREEN ON HELP REQUEST- Introduction With A Sample Code. - AT SELECTION-SCREEN ON - Introduction With A Sample Code. - Sample Program On AT SELECTION-SCREEN OUTPUT - 1. - Sample Program On AT SELECTION-SCREEN OUTPUT - 2. - Sample Program On AT SELECTION-SCREEN OUTPUT - 3. - Sample Program On AT SELECTION

Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 1.

Image
REPORT ztest. PARAMETERS: p_ebeln TYPE ekpo-ebeln. TYPES: BEGIN OF x_ekpo, END OF x_ekpo. DATA: it_ekpo TYPE STANDARD TABLE OF x_ekpo, wa_ekpo TYPE x_ekpo, it_return TYPE STANDARD TABLE OF ddshretval, wa_return LIKE LINE OF it_return. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ebeln. SELECT * UP TO 2 ROWS FROM ekpo INTO CORRESPONDING FIELDS OF TABLE it_ekpo. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'EBELN' window_title = 'EKPO Records' value_org = 'S' TABLES value_tab = it_ekpo return_tab = it_return EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3. READ TABLE it_return INTO wa_return INDEX 1.     p_ebeln = wa_return-fieldval. 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 Sample Code. - AT SELECTION-S

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. OUTPUT: On Checking the Checkbox – Personal Number, the selection screen looks like: On Checking the Checkbox – Employment Status, the selection screen looks like: On selecting both the checkbox, the selection screen looks like:

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 SELECTION-SCREEN OUTPUT Event - Introduction