Wednesday, February 20, 2019

Adding info button in Selection screen/Input screen


Requirement:     Adding info button in selection screen next to execute button.

Note: Here in the same way you can add any button apart from Info button.

Based on requirement we need to copy respective GUI status into custom one.



TABLESSSCRFIELDS.

AT SELECTION-SCREEN OUTPUT.
DATAls_exclude LIKE rsexfcode,
         LT_EXCLUDE 
LIKE TABLE OF RSEXFCODE,
         ls_submit_info 
TYPE rssubinfo.

CALL FUNCTION 'RS_SUBMIT_INFO'
   
IMPORTING
     P_SUBMIT_INFO       
LS_SUBMIT_INFO.
            
.
 
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    
EXPORTING
      p_status  
'1000'
      p_program 
sy-repid
    
TABLES
      p_exclude 
LT_exclude
    
EXCEPTIONS
      
OTHERS    0
AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM 'INFOO'.

  
CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'
          
EXPORTING

            DOKCLASS                 
'TX'

            DOKNAME                  
'ZINFO_DOC'

         
EXCEPTIONS
           CLASS_UNKNOWN            
1
           OBJECT_NOT_FOUND         
2
           
OTHERS                   3.
*                  .
        
IF SY-SUBRC 0.
        MESSAGE 'Information Displayed Succesfully' TYPE 'S'.

        
ENDIF.
        
ENDIF.

START-OF-SELECTION.
  
PERFORM get_values
.



design GUI status  '1000' in SE41 as shown in below screenshots.
 A. go to SE41
give program name and click on copy  status button then provide info as shown below. and click enter

B. after dat give status as 1000 and click on change button inside in application tool bar delete unnecessary buttons and keep required buttons nly.

Most imp change the std fcode of info button from srch to u r desired fcode here am taken infoo.
after dat activate this gui status.


How to create documentation which we need to display when we click on info buton.

1. In SE61 create documentation with required information


give doc class as : General Text


name : zinfo_doc

click on create then text editor will open . inside write u r required information as shown in below screenshot.



Save.
Now we can use this documentation using F1 help fms.
DSYS_SHOW_FOR_F1HELP.

No comments:

Post a Comment

Create Dynamic Internal Table & Dynamic FIELD CATALOG Introduction: This document explains how to create dynamic internal table ...