Hello Experts,
I have the following requirement,
I have to display the report using 'REUSE_ALV_GRID_DISPLAY'. After displaying the ALV , the ALV screen must have a button say 'B1', which i have done by creating a GUI. In ALV the fisrt column is a checkbox column, so whenever i select few rows by selecting the check box and click on that button it lead to new screen on which few messages will be written. For this i have created a form and gave that form in the FM as below,
i_callback_user_command = 'f_Form1'.
I have also created a new screen.
My Problem is whenever i select a checkbox and click on the button it is leadin to the new screen and even the title is getting displayed,but my messages that i write there are not getting displayed, furthur the function key in the screen used for back is also not working. I have coded the form as below,
FORM f_Form1 USING p_ucomm TYPE sy-ucomm rs_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN 'B1'.
DATA ref TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref.
CALL METHOD ref->check_changed_data.
LOOP AT gt_output INTO wa_output WHERE chkbox = 'X'.
MOVE-CORRESPONDING wa_output TO wa_create.
APPEND wa_create TO gt_create.
ENDLOOP.
IF gt_create IS NOT INITIAL.
CALL FUNCTION 'FM TO CREATE ORDER' ---> This is a customized FM to create order which is working fine
TABLES
t_flthdr = gt_create.
SET SCREEN 9001.
CALL SCREEN 9001.
LOOP AT gt_create INTO wa_create.
IF wa_create-zfltcd IS INITIAL.
WRITE: /'Creation is successful for order no:', wa_create-ZSRORD.
ELSEIF wa_create-zfltcd IS NOT INITIAL.
WRITE: /'Creation of is not successful'.
ENDIF.
ENDLOOP.
ELSEIF gt_create IS INITIAL.
MESSAGE e018(xxx) DISPLAY LIKE 'I'. --> This message will indicate to select a checkbox if user has not selected any.
ENDIF.
ENDCASE.
ENDFORM.
And in the PAI of the screen i have coded like this,Even this function key is also not working, I want the screen to leave to the previous page.
CASE sy-ucomm.
WHEN 'FC_BACK'.
LEAVE SCREEN.
ENDCASE.
Can you please guide me in rectifying these issues. Your immediate response is highly appreciated and am very thankful to you
Thanks and regards,
Satish Kumar Balasubramanian.