Make your SAPGUI Disappear and Appear Again

During data processing, you can make your SAPGUI invisible and then visible again once the process is completed.

*&---------------------------------------------------------------------*
*& Report  ZTEST_INVISIBLE_TRICK                                       *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  ZTEST_INVISIBLE_TRICK         .

*************************************************************
START-OF-SELECTION.
*SAPGUI screen vanishes from user screen list

CALL FUNCTION 'SAPGUI_SET_PROPERTY'
DESTINATION 'SAPGUI'
EXPORTING property = 'VISIBLE'
value = ' '
EXCEPTIONS system_failure = 1
communication_failure = 2
OTHERS = 3.

************************************************************************


DO 1000 TIMES.

*doing some work which takes lot of time
    DO 1000 TIMES.
    ENDDO.
*Resetting time counter of dialog process so that time-out does not
*happen. Use this fm within your programs at appropriate locations to
*reset time counter.

CALL FUNCTION 'TH_REDISPATCH'.

ENDDO.

*************************************************************
*Work is complete and now wake up the SAPGUI screen

CALL FUNCTION 'SAPGUI_SET_PROPERTY'
DESTINATION 'SAPGUI'
EXPORTING property = 'VISIBLE'
value = 'X'
EXCEPTIONS system_failure = 1
communication_failure = 2
OTHERS = 3.

*** End of Program

Related ABAP Topics:
Table CDHDR and CDPOS Usage

Get help for your ABAP problems
Do you have a ABAP Question?

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.