PARAMETERS P_CBZXZ TYPE KSGRU. "成本中心组
PARAMETERS P_CBYSZ TYPE KAGRU. "成本要素组
*************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CBZXZ.
PERFORM F4_PRNTP_HELP USING 'P_CBZXZ'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CBYSZ.
PERFORM F4_PRNTP_HELP USING 'P_CBYSZ'.
*************************************************************
FORM F4_PRNTP_HELP USING L_FIELD TYPE HELP_INFO-DYNPROFLD.
CASE L_FIELD.
WHEN 'P_CBZXZ'.
CALL FUNCTION 'K_GROUP_SELECT'
EXPORTING
class = '0101'
field_name = 'KOSTL'
searchfld_input = P_CBZXZ
table = 'CCSS'
kokrs = '1000'
ktopl = '8888'
fikrs = '1000'
set = '*'
IMPORTING
"class_name = l_conv-class
set_name = P_CBZXZ
"set_title = l_title
"table_name = l_table
"setid = l_conv-setid
EXCEPTIONS
no_set_picked = 1.
WHEN 'P_CBYSZ'.
CALL FUNCTION 'K_GROUP_SELECT'
EXPORTING
class = '0102'
field_name = 'KSTAR'
searchfld_input = P_CBYSZ
table = 'CCSS'
kokrs = '1000'
ktopl = '8888'
fikrs = '1000'
set = '*'
IMPORTING
"class_name = l_conv-class
set_name = P_CBYSZ
"set_title = l_title
"table_name = l_table
"setid = l_conv-setid
EXCEPTIONS
no_set_picked = 1.
ENDCASE.
ENDFORM.
可以实现如下效果: