?
Solved

Run SAP GUI in Background

Posted on 2011-03-10
3
Medium Priority
?
1,200 Views
Last Modified: 2013-11-27
Hi,
 I need a help with the follwed problem, How do I run SAP GUI in background or as process or even to be hidden

 and by inserting a transaction name to Text Box then press on button in .NET Application, the SAP GUI will be displayed for the user

 the porpse for being running in background or hidden or as proccess is to be displayed in minimum time to give the best reaction in MINIMUM TIME

Thanks
0
Comment
Question by:madmare
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:parnasso
ID: 35126396
Run the SAP GUI with SW_FORCEMINIMIZE flag or SW_HIDE in STARTUPINFO structure of CreateProcess WINAPI call.

STARTUPINFO si;
    PROCESS_INFORMATION pi;

    ZeroMemory( &si, sizeof(si) );
    si.cb = sizeof(si);
    si.dwFlags = STARTF_USESSHOWWINDOW;
    si.wShowWindow = // SW_HIDE or SW_FORCEMINIMIZE
    ZeroMemory( &pi, sizeof(pi) );
 
    if( !CreateProcess( NULL,   
        "SAP GUI command line...",        // Command line
        NULL,           // Process handle not inheritable
        NULL,           // Thread handle not inheritable
        FALSE,          // Set handle inheritance to FALSE
        0,              // No creation flags
        NULL,           // Use parent's environment block
        NULL,           // Use parent's starting directory 
        &si,            // Pointer to STARTUPINFO structure
        &pi )           // Pointer to PROCESS_INFORMATION structure
    ) 
    {
        printf( "CreateProcess failed (%d).\n", GetLastError() );
        return;
    }

Open in new window

0
 

Author Comment

by:madmare
ID: 35126588
is it C# code ??
0
 
LVL 4

Accepted Solution

by:
parnasso earned 2000 total points
ID: 35126686
I'm sorry it is C++ code. I should have posted the documentation reference too :

CreateProcess
0

Featured Post

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question