Tip

Add pop up window w/out programming objects

Wouldn't it be great to add a window to your custom transactions in SAP similar to Purchase Order Create (ME21N) "Document Overview On"?

It is very easy to add this window and impress your users at the same time.

You can program it in the user command area of your transaction so that it dynamically pops up when the user clicks on a button... the user can easily close it also.

Use this window to show help for your transaction, link to html, ... the possibilites are endless!

This can also be used on transactions that use ABAP custom containers.


DATA: BEGIN OF HELP_HTML_PAGE OCCURS 0.
 INCLUDE STRUCTURE  DOC_ID_STRUCT.
DATA: END OF HELP_HTML_PAGE.
DATA: f_doc_init        TYPE C.


MODULE USER_COMMAND_1000 INPUT.

  CASE FCODE.

* Help screen (icon selected from scrn)
    WHEN 'HELP'.

* If the document has not already been selected for display....
      IF F_DOC_INIT is initial.

* Add the link to your documentation 
* entered via transaction SE61
* - document class 'general text'
* - document name 
        help_html_page-key = 'TX'.
        help_html_page-id 
          = 'ZSAPMZ_PARTNER_INFO'.
        APPEND help_html_page.

* Display the document
        CALL FUNCTION
         'DOC_DISPLAY_INITIALIZE'
            EXPORTING
             REPID        
               = 'SAPMZ_PARTNER_INFO'
             DYNNR           = '1000'
            TABLES
              DOC_ID_TAB = 
                help_html_page.

       CALL FUNCTION 'DOC_DISPLAY_TEXT'
         EXPORTING
            DOCKEY = help_html_page-KEY.
            F_DOC_INIT = 'x'.

* If the document has already been
* displayed before, simply unhide it 
* for redisplay
     ELSE.
       CALL FUNCTION 
          'DOC_DISPLAY_UNHIDE'.
     ENDIF.

* to make close button work
 WHEN OTHERS.
   CALL METHOD cl_gui_cfw=>dispatch.

    Requires Free Membership to View

This was first published in May 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.