请教:ABAP中普通LIST报表下拉列表框的问题
各位大侠:请问如何在ABAP普通LIST报表中(屏幕输入条件中)实现下拉列表框,如点击屏幕输入条件中location,会在屏幕输入条件中显示一些location.谢谢!...
各位大侠:请问如何在ABAP普通LIST报表中(屏幕输入条件中)实现下拉列表框,如点击屏幕输入条件中location,会在屏幕输入条件中显示一些location.谢谢!
展开
3个回答
2013-08-26
展开全部
谢谢!楼主,顶一下!还有一个问题:请教:ABAP中普通LIST报表SELECT-OPTION的问题,下面的代码没有出来的结果,望大侠指教.谢谢!各位大侠:请问如何在ABAP普通LIST报表中(屏幕输入条件中)实现下拉SELECT-OPTION,如点击屏幕输入条件中location,会在屏幕输入条件中显示一些指定的location(只显示非1开头的位置编号).谢谢!代码如下:SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.SELECT-OPTIONS:s_umwrk FOR mseg-umwrk, "mseg-werks,s_umlgo FOR mseg-umlgo,s_matnr FOR mseg-matnr,s_budat FOR mkpf-budat.SELECTION-SCREEN END OF BLOCK block1.at selection-screen on value-request for s_umlgo-low.DATA: BEGIN OF value_tab OCCURS 0,umlgo LIKE mseg-umlgo ,END OF value_tab.DATA: return_values LIKE ddshretval OCCURS 0 WITH HEADER LINE."DATA: retfield LIKE dfies-fieldname VALUE 'UMLGO'.SELECT UMLGO FROM mseg INTO corresponding fields of tablevalue_tab WHERE umlgo NOT like '1%'."not like '1%'.REFRESH: value_tab, return_values.clear: value_tab, return_values.*SELECT DISTINCT knvv"kunnr kna1"name1*FROM knvv left join* kna1 on knvv"kunnr = kna1"kunnr and kna1"spras = sy-langu*INTO corresponding fields of table value_tab*where knvv"bzirk in s_area.CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'UMLGO'* dynpprog = g_repid* dynpnr = sy-dynnr* dynprofield = 'CLIENT-LOW' value_org = 'S' TABLES value_tab = value_tab return_tab= return_values EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.READ TABLE return_values index 1.MOVE return_values-fieldval TO s_umlgo-low.at selection-screen on value-request for s_umlgo-high.DATA: BEGIN OF value_tab OCCURS 0,umlgo LIKE mseg-umlgo ,END OF value_tab.DATA: return_values LIKE ddshretval OCCURS 0 WITH HEADER LINE."DATA: retfield LIKE dfies-fieldname VALUE 'UMLGO'.SELECT UMLGO FROM mseg INTO corresponding fields of tablevalue_tab WHERE umlgo NOT like '1%'. "not like '1%'.REFRESH: value_tab, return_values.clear: value_tab, return_values.*SELECT DISTINCT knvv"kunnr kna1"name1*FROM knvv left join* kna1 on knvv"kunnr = kna1"kunnr and kna1"spras = sy-langu*INTO corresponding fields of table value_tab*where knvv"bzirk in s_area.CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'UMLGO' value_org = 'S' TABLES value_tab = value_tab return_tab= return_values EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.READ TABLE return_values index 1.MOVE return_values-fieldval TO s_umlgo-high..
2013-08-26
展开全部
给你个例子:应该能满足你的需求。REPORT Z_BARRY_LISTBOX .TYPE-POOLS: vrm.DATA: it_val1 TYPE vrm_values, it_val2 TYPE vrm_values, w_line LIKE LINE OF it_val1.PARAMETERS: p_bukrs LIKE t001-bukrs AS LISTBOX VISIBLE LENGTH 25 OBLIGATORY, p_month LIKE t247-mnr AS LISTBOX VISIBLE LENGTH 12 OBLIGATORY.INITIALIZATION.SELECT bukrs butxt FROM t001 INTO (w_line-key, w_line-text). APPEND w_line TO it_val1. CHECK p_bukrs IS INITIAL. p_bukrs = w_line-key.ENDSELECT.SELECT mnr ltx FROM t247 INTO (w_line-key, w_line-text) WHERE spras = sy-langu. APPEND w_line TO it_val2. CHECK p_month IS INITIAL. p_month = w_line-key.ENDSELECT.AT SELECTION-SCREEN OUTPUT.CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'P_BUKRS' values = it_val1.CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'P_MONTH' values = it_val2.END-OF-SELECTION.WRITE: / 'Company Code:', p_bukrs.WRITE: / 'Month:', p_month.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-08-26
展开全部
"INITIALIZATION. 事件块"也加了,但是在屏幕上当选择LOCATION时候就是没有LOCATION,其实在TABLE中是是有LOCATION的,找了好久都没有找到原因,望赐教!谢谢!帮忙指点一下代码,谢谢!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询