SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.

CRM Companies List
Web Based CRM Software

How to Display SAP Transaction in a New Session Or in New Window using ABAP4_Call_Transaction Function Module

Using ABAP function module ABAP4_CALL_TRANSACTION, ABAP developers can open SAP transaction in a new window or in a new session.
Using abap4_call_transaction, function module parameters can also be set for the SAP Transaction first screen.
So that SAP users can be directly navigated to SAP Transaction screens like VA02 or VA03.

In this sample ABAP program, a main ABAP report will execute and display a dummy message on the screen.
On the other hand, the ABAP function module abap4_call_transaction will work and by setting the required VBELN parameter which is the target sales document's number, the user will see the VA03 SAP transaction screen in front of him or her in a new window / new session.


Here is the ABAP report source code for the sample program.


  WRITE 'This is the main ABAP report calling the SAP Transaction VA03 in a new session or in a new window'.

  wa_spa TYPE rfc_spagpa,
  itab_spa TYPE TABLE OF rfc_spagpa.

wa_spa-parid = 'AUN'.
wa_spa-parval = '1500000010'.
APPEND wa_spa TO itab_spa.

    tcode = 'VA03'
    skip_screen = 'X'
    spagpa_tab = itab_spa
    communication_failure = 1
    system_failure = 2.

IF sy-subrc <> 0.

ABAP developers can find a similar ABAP function module cc_call_transaction_new_task which can be used to open new window and display SAP transaction with first screen parameters are passed.

SAP Resources

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Copyright © 2004 - 2018 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems