Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7188973
  • 博文数量: 655
  • 博客积分: 10264
  • 博客等级: 上将
  • 技术积分: 8278
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-04 17:47
个人简介

ABAP顾问

文章分类

全部博文(655)

文章存档

2017年(2)

2014年(8)

2013年(3)

2012年(2)

2011年(18)

2010年(102)

2009年(137)

2008年(274)

2007年(134)

分类:

2007-06-07 21:56:18

*&---------------------------------------------------------------------*
*& Report  Z_BARRY_PARAMETERS                                          *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  z_barry_parameters                      .
TABLES tcurt.
DATA   dyfields LIKE dynpread OCCURS 1 WITH HEADER LINE.
PARAMETERS: p_waers LIKE tcurt-waers,
            p_ltext LIKE tcurt-ltext,
            p_ktext LIKE tcurt-ktext.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_waers.
  CLEAR: dyfields[], dyfields.

  CALL FUNCTION 'HELP_VALUES_GET'
    EXPORTING
      fieldname    = 'WAERS'
      tabname      = 'TCURT'
    IMPORTING
      select_value = p_waers.

  SELECT SINGLE ltext FROM tcurt
    INTO dyfields-fieldvalue
    WHERE spras = sy-langu
    AND   waers = p_waers.
  IF sy-subrc <> 0.
    CLEAR dyfields-fieldvalue.
  ENDIF.

  dyfields-fieldname = 'P_LTEXT'.
  APPEND dyfields.
  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname     = sy-cprog
      dynumb     = sy-dynnr
    TABLES
      dynpfields = dyfields.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ktext.
  CLEAR: dyfields[], dyfields.
  dyfields-fieldname = 'P_WAERS'.
  APPEND dyfields.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname     = sy-cprog
      dynumb     = sy-dynnr
    TABLES
      dynpfields = dyfields.
  READ TABLE dyfields INDEX 1.
  SELECT SINGLE ktext FROM tcurt
    INTO p_ktext
    WHERE spras EQ sy-langu
    AND   waers EQ dyfields-fieldvalue.

阅读(4642) | 评论(4) | 转发(0) |
给主人留下些什么吧!~~