WORKING WITH MENU PAINTER

WORKING WITH MENU PAINTER:

Menu painter is a tool to design the user interface to the program.
The transaction code for menu painter is SE41.


Note: The menu bar contains maximum 8 menu items, in this we can create upto 6 menu items and
          2 menu items are default (System and Help).

Note: We can design upto 35 buttons in the application tool bar.

Steps to create our own GUI to the program:-

1. Execute SE41 transaction.
2. Provide the program name (Eg: ZR_WORKING_WITH_MENU_PAINTER) for which program         we want to design the our own GUI.


3. Provide the status name (Eg: STATUS), short text and click on ok.


4. Expand the function keys to enable the back button.
    Provide the function code (Eg: BACK) and click on save.


5. Expand the Application tool bar to create the buttons.
    Provide the function code (Eg: DOWN)


6. Double click on function code (DOWN) .
    Click on ok.
    Provide the funtion text and click on enter.


7.  Choose a function key and click on enter.
     Save, check and activate the GUI.

8. Use this GUI status in program by using SET PF-STATUS <status name>.

PROGRAM:

 REPORT ZR_WORKING_WITH_MENU_PAINTER.

Data V1 type EKKO-EBELN.

Select-options S_EBELN for V1.
TypesBegin of TY_EKKO,
       EBELN 
type EKKO-EBELN,
       BEDAT 
type EKKO-BEDAT,
       LIFNR 
type EKKO-LIFNR,
       End of TY_EKKO.
Data WA_EKKO type TY_EKKO.
Data IT_EKKO type table of TY_EKKO.

*Fetch dataSelect EBELN BEDAT LIFNR 
       from EKKO 
       INTO TABLE IT_EKKO 
       where EBELN in S_EBELN.

*Display dataLoop at IT_EKKO into WA_EKKO.
 
Write/ WA_EKKO-EBELNWA_EKKO-BEDATWA_EKKO-LIFNR.
Endloop.

*Gui status
SET PF-STATUS 'STATUS'.
At user-command.

 
If SY-UCOMM 'DOWN'.

*Download the output data CALL FUNCTION 'DOWNLOAD'
   
EXPORTING
     FILETYPE 
'DAT'
   
TABLES
     DATA_TAB 
IT_EKKO.

 
Endif.

OUPPUT:


Click on download button then it display the following screen.


Click on transfer button then output will be saved in given location.