首页 > 其他 > 详细

ABAP Search Help 返回多列值到荧幕

时间:2019-11-20 10:18:40      阅读:105      评论:0      收藏:0      [点我收藏+]
form NUMBER_SHLP_ZHDNO_EB_01 using P_TABNAME P_FIELDNAME changing P_FIELDVALUE.
  data LT_RETURN type table of DDSHRETVAL.
  data P_FIELD type HELP_INFO-DYNPROFLD.
  P_FIELD = P_TABNAME && - && P_FIELDNAME.

  select DISTINCT *
    from LIPS
    into table @data(LT_NO)
    where VGBEL = @ZDB_HEAD-EBELN.

  call function F4IF_INT_TABLE_VALUE_REQUEST
    exporting
*     DDIC_STRUCTURE  = ‘ ‘
      RETFIELD        = ZHDNO "返回LT_NO的栏位
*     PVALKEY         = ‘ ‘
      DYNPPROG        = SY-REPID "返回的输入框所在的main program
      DYNPNR          = SY-DYNNR "返回的输入框所在屏幕
      DYNPROFIELD     = P_FIELD "荧幕绑定的字段
*     STEPL           = 0
*     WINDOW_TITLE    =
*     VALUE           = ‘ ‘
      VALUE_ORG       = S
*     MULTIPLE_CHOICE = ‘ ‘
*     DISPLAY         = ‘ ‘
     CALLBACK_PROGRAM       = SY-REPID
     CALLBACK_FORM   = RETURN_MUL_COLS_F07_03"返回多列值 
*     CALLBACK_METHOD =
*     MARK_TAB        =
*   IMPORTING
*     USER_RESET      =
    tables
      VALUE_TAB       = LT_NO”Search help显示的内表
*     FIELD_TAB       =
      RETURN_TAB      = LT_RETURN
*     DYNPFLD_MAPPING =
    exceptions
      PARAMETER_ERROR = 1
      NO_VALUES_FOUND = 2
      others          = 3.
  if SY-SUBRC <> 0.
    message id SY-MSGID type SY-MSGTY number SY-MSGNO
                        with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  else.
    if LT_RETURN[] is not initial.
      P_FIELDVALUE  = LT_RETURN[ 1 ]-FIELDVAL.
    endif.
  endif.
endform.

FORM RETURN_MUL_COLS_F07_03 TABLES record_tab STRUCTURE seahlpres
  CHANGING shlp TYPE shlp_descr
    callcontrol LIKE ddshf4ctrl.

  DATA: interface LIKE LINE OF shlp-interface.
  READ TABLE shlp-interface INTO interface INDEX 1.
  interface-shlpfield+4(1) = 5."返回荧幕栏位的字段索引
  interface-valfield = ZDB_ITEM-CHARG."返回荧幕的字段ID
  APPEND interface TO shlp-interface.
ENDFORM.

 

ABAP Search Help 返回多列值到荧幕

原文:https://www.cnblogs.com/kang2008/p/11895491.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!