一般来说,标准的字段都可以用SE11来创建搜索帮助,但是有时候这里的满足不了需求或者,相同的数据元素需要用不同的搜索帮助类型,就需要用别的方式实现

1、用函数:F4IF_INT_TABLE_VALUE_REQUEST 来传递内表显示

    AT SELECTION-SCREEN ON VALUE-REQUEST FORs_kunnr2.PERFORMshow_f4.FORMshow_f4.TYPES: BEGIN OFt_kunnrhelp,
kunnr
TYPE kna1-kunnr,
name1
TYPE kna1-name1,
stras
TYPE kna1-stras,END OFt_kunnrhelp.DATA:wa_kunnrhelp TYPEt_kunnrhelp,
it_kunnrhelp
LIKE TABLE OFwa_kunnrhelp.SELECT kna1~kunnr kna1~name1 kna1~stras INTO CORRESPONDING FIELDS OF TABLEit_kunnrhelpFROM kna1 INNER JOIN knvv ON kna1~kunnr =knvv~kunnrWHERE knvv~vkorg = '1006' AND kna1~name1 LIKE '%湖南省%'.CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTINGretfield= 'KUNNR'dynpprog= sy-cprog
dynpnr
= '1000'dynprofield= 'S_KUNNR2'value_org= 'S' TABLESvalue_tab=it_kunnrhelpEXCEPTIONSparameter_error= 1no_values_found= 2OTHERS= 3.IF sy-subrc <> 0.MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgnoWITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.ENDIF.CLEARit_kunnrhelp.FREE: it_kunnrhelp.ENDFORM.

标签: none

添加新评论