调用其他程序的几种方法与恶心的大小写

本文详细介绍了 ABAP 语言中 SUBMIT 语句的使用方法及其附加选项的效果,包括通过选择屏幕传递值、使用变体启动程序、填充选择标准等,并提供了实际代码示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SUBMIT... [VIA SELECTION-SCREEN]
          [USING SELECTION-SET var]
          [WITH sel criterion]
          [WITH FREE SELECTIONS freesel]
          [WITH SELECTION-TABLE rspar].
These additions have the following effects:
·        VIA SELECTION-SCREEN
The selection screen of the called executable program appears. If you transfer values to the program using one or more of the other options, the corresponding input fields in the selections screen are filled. The user can change these values. By default, the system does not display a selection screen after SUBMIT.
·        USING SELECTION-SET <var>
This addition tells the system to start the called program with the variant var.
·        WITH sel criterion
Use this addition to fill individual elements sel of the selection screen (selection tables and parameters) with the help of the language elements criterion.
·        WITH FREE SELECTION freesel
User dialog for dynamic selections. To use this option, the called program must be connected to a logical database that supports dynamic selections.
·        WITH SELECTION-TABLE rspar
Dynamic transfer of different values. An internal table rspar with the Dictionary structure RSPARAMS is created. This table can be filled dynamically in the calling program with all the required values for the selection screen of the called program.
For more information on these additions, refer to the keyword documentation.
Except for WITH SELECTION-TABLE, you can use any of the above options several times and in any combination within a SUBMITstatement. In particular, you can use the WITH sel addition several times for one single criterion sel. The only combination possible for the WITH SELECTION-TABLE addition is USING SELECTION-SET.

REPORT  zdavid_submit                           .

DATA: it_rspar TYPE TABLE OF rsparams,
      wa_rspar LIKE LINE OF it_rspar,
      gc_kunnr TYPE kna1-kunnr,
      gc_vdatu TYPE vbak-vdatu.

SELECT-OPTIONS s_kunnr FOR gc_kunnr MATCHCODE OBJECT debi.
SELECT-OPTIONS s_vdatu FOR gc_vdatu NO-EXTENSION OBLIGATORY.

INITIALIZATION.

AT SELECTION-SCREEN.

START-OF-SELECTION.

*  SUBMIT /dct/w575_is_mmo_ord_sumlist VIA SELECTION-SCREEN.
*  SUBMIT /dct/w575_is_mmo_ord_sumlist USING SELECTION-SET 'DAVID VAR1'.
*  SUBMIT /dct/w575_is_mmo_ord_sumlist WITH s_kunnr IN s_kunnr
*                                      WITH s_vdatu IN s_vdatu.
* Build selection table
  wa_rspar-selname = 'S_VDATU'.
  wa_rspar-kind = 'S'. "P is parameter
  wa_rspar-sign = s_vdatu-sign. "E is excule
  wa_rspar-option = s_vdatu-option.
  wa_rspar-low = s_vdatu-low.
  wa_rspar-high = s_vdatu-high.
  APPEND wa_rspar TO it_rspar.
  SUBMIT /dct/w575_is_mmo_ord_sumlist "VIA SELECTION-SCREEN

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值