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.07.2010 | Author: | Posted in ABAP 

Today I want to teach you how to call an executable program using ABAP, the function that we will be using is “GUI_RUN”. This function has 2 main parameters, COMMAND and PARAMETER. The COMMAND is used to pass the executable program’s name and the PARAMETER can be used to pass the file name (if any)

If you only supply the COMMAND parameter then it will only call the executable program, but if you want to call a specific file e.g. BOOK1.XLS then you should supply the PARAMETER with the file name.

Here’s the ABAP sample code to call an EXCEL workbook.

REPORT  Z_Calling_EXE_Program.

CALL FUNCTION 'GUI_RUN'
  EXPORTING
    COMMAND          = 'EXCEL.EXE'
   PARAMETER         = 'C:UsersUserDocumentsBOOK1.XLS'.
*   CD               = '
* IMPORTING
*   RETURNCODE       = .

When you run the program, make sure that you already created the Excel workbook in the destinated folder. You can also change the COMMAND parameter into another type of executable program, e.g. NOTEPAD.EXE, WORD.EXE, etc.

You can also call a web browser, e.g. FIREFOX and immediately open certain website. e.g. www.google.com.

CALL FUNCTION 'GUI_RUN'
  EXPORTING
    COMMAND          = 'FIREFOX.EXE'
   PARAMETER         = 'GOOGLE.COM'.
*   CD               = '
* IMPORTING
*   RETURNCODE       = .

Popularity: 3% [?]

 


 
 

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.