Free SAP Training & Tutorial A Free SAP Functional And Technical Tutorial And Training For ABAP, SAP QUERY, ALV, SMARTFORMS, SD, PP, MM, QM, FICO
30.08.2010 | Author: | Posted in ABAP 

In this tutorial, you will learn how to call a transaction remotely using function module ‘ABAP4_CALL_TRANSACTION’, what I mean by remotely is that you can call it from an external system that can be SAP or non SAP. But make sure that you have the proper authority in the calling system.

This ABAP code below will demonstrate you how to call transaction code QA01to create an inspection plan data.

Data: itab_bdc like BDCDATA occurs 0 with header line,
itab_SPAGPA like RFC_SPAGPA occurs 0 with header line ,
itab_messTab like BDCMSGCOLL occurs 0 with header line.

Data: d_sysubrc like sy-subrc.

CALL FUNCTION ‘ABAP4_CALL_TRANSACTION’
EXPORTING
TCODE = ‘QA01′
SKIP_SCREEN = ‘ ‘
MODE_VAL = ‘A’
UPDATE_VAL = ‘A’
IMPORTING
SUBRC = d_sysubrc
TABLES
USING_TAB = itab_bdc
SPAGPA_TAB = itab_SPAGPA
MESS_TAB = itab_messTab
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

When you execute the program, you will see that it opened the Transaction QA01 just like the picture below.

30082010-crt-01

Popularity: 1% [?]

 


 
 

Related Tutorial " ABAP" 

  •  
     
    Recent Tutorials
    Create Table Maintenance Display In SAP Create table display to maintain tables values using SM30
    Create Table Maintenance Generator In SAP Maintaining SAP Transparent table values using maintenance generator
    Table Relationship In SAP Learn How To Find Tables Relationships in SAP
    Convert Number To words Using ABAP Find out how to convert numbers into words Using ABAP
    How To Maintain Long Text Object in SAP Maintain long text object in SAP
    How To Know What TCODE Used In ABAP Program Find TCODE For your ABAP Program Report
    How does CRM Work? Learn how CRM system works to run your business
    Why SAP CRM is the Best Choice? The reasons why CRM application is the best choice
    Difference Between CRM System and CRM Strategy What's the difference between CRM system and its strategy
    CRM for a Better Customer Service Learn how CRM could make your customer service much better
    Costs of Implementing CRM Software Learn the how much cost you need to prepare when implementing CRM
     
    Popular Tutorials
  • (none)
  •  
    Categories
    ABAP   Basis & Configuration  
    ALV SAP BW (Business Warehouse)
    BAPI   SAP Interview Questions
    SAP Tables   SAP Overview
    Transaction Codes FI SAP Query
      MM SAP Script  
      PP SAP Tutorial FI Module
      QM   MM Module
      SD   PM Module
    SAP Functional MM   PP Module
      SD   QM Module
    White Papers     SD Module
    Uncategorized   SmartForms  
      User-Exits  
     
     

     

    Home | About | Contribute | Privacy

    Copyright 2011 freesaptutorial.com.

    Free SAP Tutorial is not associated with SAP AG in Germany or in any other country.

    SAP is a registered trade mark of SAP AG.