TYPE-POOLS: slis." alv global types DATA: g_repid LIKE sy-repid.
SELECTION-SCREEN : SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. PARAMETERS p_max(2) TYPE n DEFAULT '30' OBLIGATORY. SELECTION-SCREEN END OF LINE.
DATA: * Data displayed BEGIN OF gt_vbak OCCURS 0, vkorg LIKE vbak-vkorg, " sales organization kunnr LIKE vbak-kunnr," sold-to party vbeln LIKE vbak-vbeln, " sales document netwr LIKE vbak-netwr," net VALUE of the sales order line_color(4), " line color END OF gt_vbak.
ENDFORM. "f_read_data " f_display_data ***************** END OF PROGRAM Z_ALV_LINE_COLOR *********************
*&--------------------------------------------------------------------* *& Form menu_set *&--------------------------------------------------------------------* * text *---------------------------------------------------------------------* * -->RT_EXTAB text *---------------------------------------------------------------------* FORM menu_set USING lt_extab TYPE slis_t_extab. DATA: ls_extab TYPE slis_extab.
SET PF-STATUS '101'. "定义屏幕状态,然后在里面定义自己的按钮
ENDFORM."menu_set *&--------------------------------------------------------------------* *& Form execute_command *&--------------------------------------------------------------------* * text *---------------------------------------------------------------------* * -->R_UCOMM text * -->RS_SELFIELDtext *---------------------------------------------------------------------* FORM user_command USING ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield. CASE ucomm. WHEN '&IC1'."双击 * READ TABLE itab INDEX rs_selfield-tabindex . * REFRESH : i_t_params . CLEAR: i_s_params . * i_s_params-selname ='IV_GUID'. * i_s_params-kind ='S'. * i_s_params-sign ='I'. * i_s_params-option='EQ'. * i_s_params-low= itab-head_guid . * APPEND i_s_params TO i_t_params . * SUBMIT crm_report_start AND RETURN WITH SELECTION-TABLE i_t_params.
WHEN 'TRANSPORT'. *CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' * EXPORTING * textline1 ='您确认正确且继续吗?' * titel ='传输' * IMPORTING * answer = answer. *IF answer ='J'. *CALL FUNCTION 'Z1CRM_TRANSFER_2_R3_VC' * STARTING NEW TASK 'task' * EXPORTING * guid = itab-head_guid * sign ='X'. * * MESSAGE 'OK!'TYPE'I'. *ENDIF. ENDCASE. ENDFORM.