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.
GUI COMPONENTS:
===========
1. GUI TITLE. 2. GUI STATUS
title bar menu bar
standard toolbar
application tool bar
function keys
note :
=======
in the menu bar we can design up to 6 menu items and sap provided 2 menu items default(totally 8 menu items)
system and help is the default menu items
in the application tool bar we can design up to 35 buttons.
object :
========
based on the given sales document numbers to display the sales document numbers , document date , customer numbers
as shown in the belwo and also attach one download button in the application tool bar .
if the user click on downloadbutton , then we download the displayed records into presentation server [cdrive,drive].
diagram.
STEPS TO DESIGN OUR OWN GUI TO THE PROGRAM.
===========================================
EXECUTE SE41.
PROVIDE THE PROGRAM NAME .
PROVIDE THE STATUS.
CLICK ON CREATE.
PROVIDE THE SHORT DESCRIPTION.
ENTER.
EXPAND THE FUNCTION KEYS
ENABLE THE BACK BUTTON , BY PROVIDING BACK.
EXPAND THE APPLICATION TOOL BAR.
PROVIDE THE FUNCTION CODE FIRST(ANY NAME).
EX ABC.
DOUBLE CLICK ON THE FUNCTION CODE.
CLICK ON ENTER.
PROVIDE THE FUNCTION TEXT.
EX DOWNLOAD.
ENTER.
SELECT THE SHORT CUT KEY.
ENTER.
REPEAT THE SAME STEPS FOR ALL OTHER BUTTONS IN APLLICATION TOOL BAR.
SAVE , CHECK, ACTIVATE THE GUI.
Syntax of attaching the own gui to the program.
================================================
SET PF_STATUS'<STATUS NAME>'.
EG :
SET PF_STATUS 'STAT'.
NOTE :
=====
DOWNLOAD is the function module which is used to browser the file as well as
download the data from the internal table to the file.
the input for the above function module is
1.file type -----DAT
2. data internal table.
this is obsolte now we use another one in the next tutorials.
program :
========\
tables vbak.
select-options s_vbeln for vbak-vbeln.
types : begin of ty_vbak,
vbeln type vbak-vbeln,
audat type vbak-audat,
kunnr type vbak-kunnr,
end of ty_vbak.
data : wa_vbak tyep ty_vbak,
it_vbak type table of ty_vbak.
select vbeln audat kunnr from vbak into it_vbak where vbeln in s_vbeln.
loop at it vbak into wa_vbak.
write :/ wa_vbak-vbeln , wa_vbeln-audat, wa_vbak-kunnr.
endloop.
set pf_status 'STAT'.
AT user-command.
if sy-ucomm = 'ABC'.
CALL FUNCTION 'DOWNLOAD'.
EXPORTING
FILETYPE = 'DAT'
TABLES
DATA-TAB = IT_VBAK.
ENDIF.
=========================
Menu painter is a tool to design the user interface to the program.
The transaction code for menu painter is SE41.
GUI COMPONENTS:
===========
1. GUI TITLE. 2. GUI STATUS
title bar menu bar
standard toolbar
application tool bar
function keys
note :
=======
in the menu bar we can design up to 6 menu items and sap provided 2 menu items default(totally 8 menu items)
system and help is the default menu items
in the application tool bar we can design up to 35 buttons.
object :
========
based on the given sales document numbers to display the sales document numbers , document date , customer numbers
as shown in the belwo and also attach one download button in the application tool bar .
if the user click on downloadbutton , then we download the displayed records into presentation server [cdrive,drive].
diagram.
STEPS TO DESIGN OUR OWN GUI TO THE PROGRAM.
===========================================
EXECUTE SE41.
PROVIDE THE PROGRAM NAME .
PROVIDE THE STATUS.
CLICK ON CREATE.
PROVIDE THE SHORT DESCRIPTION.
ENTER.
EXPAND THE FUNCTION KEYS
ENABLE THE BACK BUTTON , BY PROVIDING BACK.
EXPAND THE APPLICATION TOOL BAR.
PROVIDE THE FUNCTION CODE FIRST(ANY NAME).
EX ABC.
DOUBLE CLICK ON THE FUNCTION CODE.
CLICK ON ENTER.
PROVIDE THE FUNCTION TEXT.
EX DOWNLOAD.
ENTER.
SELECT THE SHORT CUT KEY.
ENTER.
REPEAT THE SAME STEPS FOR ALL OTHER BUTTONS IN APLLICATION TOOL BAR.
SAVE , CHECK, ACTIVATE THE GUI.
Syntax of attaching the own gui to the program.
================================================
SET PF_STATUS'<STATUS NAME>'.
EG :
SET PF_STATUS 'STAT'.
NOTE :
=====
DOWNLOAD is the function module which is used to browser the file as well as
download the data from the internal table to the file.
the input for the above function module is
1.file type -----DAT
2. data internal table.
this is obsolte now we use another one in the next tutorials.
program :
========\
tables vbak.
select-options s_vbeln for vbak-vbeln.
types : begin of ty_vbak,
vbeln type vbak-vbeln,
audat type vbak-audat,
kunnr type vbak-kunnr,
end of ty_vbak.
data : wa_vbak tyep ty_vbak,
it_vbak type table of ty_vbak.
select vbeln audat kunnr from vbak into it_vbak where vbeln in s_vbeln.
loop at it vbak into wa_vbak.
write :/ wa_vbak-vbeln , wa_vbeln-audat, wa_vbak-kunnr.
endloop.
set pf_status 'STAT'.
AT user-command.
if sy-ucomm = 'ABC'.
CALL FUNCTION 'DOWNLOAD'.
EXPORTING
FILETYPE = 'DAT'
TABLES
DATA-TAB = IT_VBAK.
ENDIF.
Comments
Post a Comment