CALL TRANSACTION

Syntax 语法

CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
                    | [USING bdc_tab [bdc_options]] }.

Extras: 附加项

1. ... AND SKIP FIRST SCREEN

2. ... USING bdc_tab [bdc_options]

Effect 作用

The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.

语句call transaction 调用一个事务码包含在数据对象ta中的事务。数据对象ta必须是字符型并且必须以大写字段包含事务码。如果指定在ta中的事务不能被找到,将会触发一个不能找到的异常。该附加项生成初始屏幕的显示并且充许用一个批输入会话执行事务。

At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.

在call transaction 调用程序和它的数据被保存下来,在退出被调用事务之后,在调用程序调用之后的处理将重新开始。

When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.

当事务被调用之后,和事务码相关的ABAP程序被加载到一个新的内部会话中。调用程序的会话被保持。被调用程序在它自己的SAP LUW(logical unit of work)中执行。

  • If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.

如果被调用事务是一个对话事务,在加载ABAP程序之后将会触发事件load-of-program,并且定义为该事务初始屏幕的屏幕被调用。初始屏幕是一个屏幕序列的第一个屏幕。当屏幕序列结束时,遇到下一个屏幕的屏幕号是0或者程序通过leave program语句退出,则事务完成。

  • If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.

如果被调用事务是一个面向对象事务(版本6.10),当加载除了类型池的所有程序时触发事件load-of-program,之后和事务码相关联的方法被调用。如果这个方法是一个实例方法,将会暗含的生成一个相关类的数据对象并且参照运行时环境。当方法完成时或者程序使用leave program退出时事务结束。

After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.

在事件调用结束后,调用程序恢复执行call transaction语句之后的程序。

Note

At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.

在语句call transaction中,当前用户运行被调用事务的权限将不会自动检查。如果调用程序不执行检查,被调用程序必须检查权限。为了做到这点,被调用程序必须调用函数模块AUTHORITY_CHECK_TCODE.

Addition 1 选项1

... AND SKIP FIRST SCREEN

Effect 作用

This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:

这个选项生成被调用对话事务的初始屏幕的显示屏幕。选项and skip first screen在这些前提下生成第一个屏幕。

  • For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.

对于初始屏幕,在屏幕绘制器中,屏幕自己的屏幕编号不能被指定为下一屏幕号。(应该是当前屏幕的next screen不能是屏幕本身)

  • All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters

初始屏幕的所有强制输入字段必须被全部填充并且被赋于恰当的值通过SAP/GPA字段(SAP内存参数设置参见http://www.cnblogs.com/clsoho/archive/2010/01/21/1653115.html)。

If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.

当有了这些前提条件,在屏幕绘制器中指定的做为初始屏幕下一屏的屏幕将会被显示出来。

Example 例子

If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.

如果被调用对话事务FLIGHT_TA的初始屏幕的静态下一屏幕不是初始屏幕本身,它的屏幕就会被生成,因为它的输入字段被SAP内存参数字段CAR和CON填充。

DATA: carrid TYPE spfli-carrid,
      connid TYPE spfli-connid.

...

SET PARAMETER ID: 'CAR' FIELD carrid,
                  'CON' FIELD connid.

CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.

Addition 2 选项2

... USING bdc_tab [bdc_options]

Effect 作用

Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.

使用这个附加项传送一个在ABAP字典中行类型为bdcdata的内表bdc_tab到一个对话事务中。选项bdc_options控制批输入处理。当一个具有using附加项的事务被调用时,系统字段sy-binpt在被调用程序中被设置成值“X”,当这个事务运行时,其它事务不能使用这个附加项被调用。

The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.

内表bdc_tab是程序内部一个批输入session的表现形式,并且必须被相应地填充。结构bdcdata有如下表显示的字段。

Component

字段

Description描述

PROGRAM

程序

Name of the program of the called transaction

被调用事务的程序名

DYNPRO

屏幕

Number of the dynpro to be processed

被处理的屏幕编号

DYNBEGIN

屏幕开始

Flag for the beginning of a new dynpro (possible values are "X" and " ")

一个新屏幕的开始标志。(可能的值为“X”和“”)

FNAM

字段名

Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor

一个需要填充的屏幕字段的名字或者批输入控制语句,例如,来定位光标。

FVAL

字段值

Value to be passed to the dynpro field or to the control statement

将要被传输到屏幕字段或者到控制语句的值。

Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.

使用内表bdc_tab,你可以提供任意数量被调用事务的具有输入字段和用户操作屏幕。

System Fields 系统字段

sy-subrc

Description描述

0

The batch input processing of the called transaction was successful.

被调用事务的批输入处理成功。

< 1000

Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.

在被调用事务中产生错误。如果在事务中,将会产生一个消息,可以用附加项messages来接收它。

1001

Error in batch input processing.

在批输入处理中产生错误。

Note

Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.

除了abap对象之外,你在一块指定指定and skip first screen和using是没有意义的,因为附加项and skip first screen设计的时候只是用来当指定有using的批输入表控制整个包含屏幕显示的事务流时用SAP内存参数字段来填充必须字段的。

Example 例子

Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.

调用类制作器(事务码SE24)并且显示类CL_SPFLI_PERSISTENT.内表bdcdata_tab包含事务的第一个屏幕(1000)的批输入处理数据。使用结构OPT,批输入处理被设置为生成第一个屏幕并且以标准大小显示下一个屏幕。

DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.

DATA: bdcdata_wa  TYPE bdcdata,
      bdcdata_tab TYPE TABLE OF bdcdata.

DATA opt TYPE ctu_params.

CLEAR bdcdata_wa.
bdcdata_wa-program  = 'SAPLSEOD'.
bdcdata_wa-dynpro   = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
bdcdata_wa-fval = class_name.
APPEND bdcdata_wa TO bdcdata_tab.

CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=CIDI'.
"注:在SAPrelease7.10中,此处的功能码为:WB_DISPLAY,大家可以测试一下,如果直接COPY过去只能进入SE24界面
APPEND bdcdata_wa TO bdcdata_tab.

opt-dismode = 'E'.
opt-defsize = 'X'.

CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.

Exceptions 异常

Non-Catchable Exceptions 不可捕捉的异常

  • Cause: Transaction not found. 事务未找到
    Runtime Error: CALL_TRANSACTION_NOT_FOUND
  • Cause: Transaction is an area menu and can therefore not be called. 事务是区域菜单,不可调用
    Runtime Error: CALL_TRANSACTION_IS_MENU
  • Cause: Transaction is locked. 事务被锁
    Runtime Error: CALL_TRANSACTION_LOCKED
  • Cause: Error in the internal storage administration.
    Runtime Error: CALL_TRANSACTION_MSG_NO_PAGING
  • Cause: Recursive call of a transaction with addition USING.
    Runtime Error: CALL_TRANSACTION_USING_NESTED

转载于:https://www.cnblogs.com/clsoho/archive/2010/03/09/1681243.html

CALL TRANSACTION相关推荐

  1. java.lang.IllegalStateException: Cannot modify managed objects outside of a write transaction. in /U

    错误内容如下 java.lang.IllegalStateException: Cannot modify managed objects outside of a write transaction ...

  2. redis 在 php 中的应用(事务 [ Transaction ] 篇)

    本文为我阅读了 redis参考手册 之后编写,注意 php_redis 和 redis-cli 的区别(主要是返回值类型和参数用法) 目录: Transaction(事务) WATCH UNWATCH ...

  3. Oracle Block浅析2:ITL(Interested Transaction List)

    一.ITL(Interested Transaction List): ITL(Interested Transaction List)是Oracle数据块内部的一个组成部分,位于数据块头(block ...

  4. Fragment提交transaction导致state loss异常

    下面自从Honeycomb发布后,下面栈跟踪信息和异常信息已经困扰了StackOverFlow很久了. java.lang.IllegalStateException: Can not perform ...

  5. sql server 2005 T-SQL BEGIN TRANSACTION (Transact-SQL)

    标记一个显式本地事务的起始点.BEGIN TRANSACTION 使 @@TRANCOUNT 按 1 递增. Transact-SQL 语法约定 语法 BEGIN { TRAN | TRANSACTI ...

  6. mysql中transaction的实现

    transaction在数据库编程中是一个重要的概念,这样做可以控制对数据库操作的事务提交. 但是要想在程序中实现事务,要求数据库本身支持事务. 现在的关系型数据库,我们日常使用的mysql,orac ...

  7. ACID+CAP+BASE+Transaction(事务)

    ACID+CAP+BASE+Transaction(事务) 数据库管理系统中事务(transaction)的四个特性(分析时根据首字母缩写依次解释):原子性(Atomicity).一致性(Consis ...

  8. CRM User Status profile中Business Transaction字段的用途

    有朋友问到User Status profile中Business Transaction字段的用途,如下图INPR, FINI所示. 实际上,这个字段作为一个桥梁,连接了User Status和Sy ...

  9. SAP QM 执行事务代码QS51维护使用决策的选择集,系统报错 – Transaction no longer valid for catalog ‘3’ -

    SAP QM 执行事务代码QS51维护使用决策的选择集,系统报错 – Transaction no longer valid for catalog '3' - 执行事务代码QS51,试图为工厂NMD ...

  10. We cannot activate inspection type for article master in transaction code MM41?

    We cannot activate inspection type for article master in transaction code MM41? Is it possible to pl ...

最新文章

  1. 强烈推荐8个很实用的神级软件,让人相见恨晚
  2. wxpython富文本_Python实例讲解 -- wxpython 基本的控件 (文本)
  3. 【Flutter】Image 组件 ( 配置本地 gif 图片资源 | 本地资源加载 placeholder )
  4. Svn正确的使用方法
  5. dba的前景_运维、测试、程序员,这些技术岗位哪个更有前景?
  6. vv7无法启动显示发动机故障_点火系统故障引起发动机不能启动的排除方法
  7. 使用Elizabeth为您的应用程序生成随机数据
  8. 解决 ifconfig: command not found
  9. composer使用慢的解决办法
  10. datagridview单元格合并居中_系统地学习Excel第17课,设置单元格格式
  11. java selenium2_Selenium2(webdirver)入门之环境搭建(Java版)
  12. 按要求编写Java程序(阶乘)
  13. 接口implement
  14. 正态分布基本概念及公式
  15. IntelliJ IDEA 创建普通 JavaSE 项目
  16. 8.linux中的远程登录服务
  17. 微信公众号开发(四)——点击菜单回复图片和语音
  18. 苹果软件扣费申请退款
  19. 短视频app开发:如何实现视频直播功能
  20. 使用Navicat快速生成数据库字典

热门文章

  1. python是多模型语言_Django多语言post模型
  2. bat命令 修改ini文件内容_Linux文件内容查看相关命令
  3. 认识 Linux 系统结构
  4. Java 虚拟机诊断利器
  5. 一文看懂 K8s 日志系统设计和实践
  6. mysql5.7+主从不一致_Mysql5.7安装错误处理与主从同步及!
  7. 稍等片刻 正在提取文件_电脑文件误删除并且清空了回收站,怎么恢复文件?教你一招!...
  8. jq 通过标签名称获取标签_怎样利用tag标签来获取长尾关键词排名
  9. 全球及中国高压和超高压波纹铝护套交联聚乙烯电缆行业产销现状与投资策略建议报告2021-2027年版
  10. 全球与中国人脸语音生物识别市场”十四“五规模状况与前景趋势分析报告2021-2027年版