CALL TRANSACTION

Syntax Diagram

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.

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.

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.

  • 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.
  • 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.

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

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.

Addition 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:

  • For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
  • All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters

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.

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

... 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.

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.

ComponentDescription
PROGRAMName of the program of the called transaction
DYNPRONumber of the dynpro to be processed
DYNBEGINFlag for the beginning of a new dynpro (possible values are "X" and " ")
FNAMName of a dynpro field to be filled or batch input control statement, for example, to position the cursor
FVALValue 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.

System Fields

sy-subrcDescription
0The batch input processing of the called transaction was successful.
< 1000Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
1001Error 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.

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.

DATA class_name TYPE c LENGTH 30 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'.
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







  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

SAP剑客

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值