결과화면에서 possible entry 를 띄울려고 버튼을 누르면 상태바에
"기능코드를 선택할수 없다"고 나오면서 possible entry 나오지 않네요.
제가 작성한 소스를 사이트에 있는 소스와 비교해서 붜가 잘못됐는지 알수가 없네요.
DATA: con1_ref TYPE REF TO cl_gui_custom_container.
DATA: grid1 TYPE REF TO cl_gui_alv_grid,
gs_variant LIKE disvariant,
gs_cs_variant LIKE disvariant,
gt_sflight TYPE TABLE OF sflight.
DATA: ok_code TYPE sy-ucomm.
PARAMETERS: p_vari LIKE disvariant-variant.
INITIALIZATION.
gs_variant-report = sy-repid.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = gs_variant
i_save = 'A'
IMPORTING
es_variant = gs_cs_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3
.
IF sy-subrc <> 0.
p_vari = gs_cs_variant-variant.
ENDIF.
START-OF-SELECTION.
SELECT * FROM sflight INTO TABLE gt_sflight.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module INIT_CON OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE init_con OUTPUT.
IF con1_ref IS INITIAL.
CREATE OBJECT con1_ref
EXPORTING container_name = 'CON1'.
CREATE OBJECT grid1
EXPORTING
i_parent = con1_ref.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
i_save = 'A'
is_variant = gs_variant
CHANGING
it_outtab = gt_sflight.
ENDIF.
ENDMODULE. " INIT_CON OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'BACK' OR 'EXIT' OR 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'G100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
안녕하세요.
ALV에서 variant를 저장한게 없어서 안뜨는거 같은데요?