Ga sempat bilang apa-apa dulu, lagi sibuk buk. Pokoknya ini contoh selection-screen atau parameter yang lookupnya diatur dari ABAP.
// generate lookup di trigger dari event ini
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_perio.
* Display possible entry for vendor number field on help screen
PERFORM f_display_help_val TABLES i_period_grp
USING c_group
'Group of Period'(t03).
// ini dia prosedur yang bertanggung jawab mengisi lookup
FORM f_display_help_val TABLES pi_helptab
USING p_retfield TYPE c
p_title TYPE c.
DATA: l_help_field TYPE help_info-dynprofld.
DATA: i_get_help_return LIKE ddshretval OCCURS 0.
DATA: l_get_help_retfield LIKE dfies-fieldname,
l_get_help_dynnr LIKE sy-dynnr,
l_get_help_repid LIKE sy-repid,
l_get_help_stepl LIKE sy-stepl,
l_get_help_field LIKE help_info-dynprofld.
CLEAR: l_help_field,
l_get_help_retfield,
l_get_help_dynnr,
l_get_help_repid,
l_get_help_stepl,
l_get_help_field.
REFRESH i_get_help_return.
GET CURSOR FIELD l_help_field.
l_get_help_retfield = p_retfield.
l_get_help_dynnr = sy-dynnr.
l_get_help_repid = sy-repid.
l_get_help_field = l_help_field.
l_get_help_stepl = sy-stepl.
CHECK NOT pi_helptab[] IS INITIAL.
* Display entry on help screen, allow user to select the value and
* passing the selected value back to selection screen.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = l_get_help_retfield
dynpprog = l_get_help_repid
dynpnr = l_get_help_dynnr
dynprofield = l_get_help_field
stepl = l_get_help_stepl
window_title = p_title
value_org = 'S'
TABLES
value_tab = pi_helptab
return_tab = i_get_help_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDFORM. " f_display_help_val
3.14.2008
Manually Fill Selection-Screen
Labels: abap
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment