04-24-2007 12:16 PM
Hi All,
can anyone explain me in detail, how this program works ( especially how this command button fun1,fun2.... are created). the code is:
REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
START-OF-SELECTION.
WRITE: 'Basic List',
/ 'SY-LSIND:', sy-lsind.
TOP-OF-PAGE.
WRITE 'Top-of-Page'.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-pfkey.
WHEN 'TEST'.
WRITE 'Self-defined GUI for Function Codes'.
ULINE.
ENDCASE.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
PERFORM out.
sy-lsind = sy-lsind - 1.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'FC1'.
PERFORM out.
WRITE / 'Button FUN 1 was pressed'.
WHEN 'FC2'.
PERFORM out.
WRITE / 'Button FUN 2 was pressed'.
WHEN 'FC3'.
PERFORM out.
WRITE / 'Button FUN 3 was pressed'.
WHEN 'FC4'.
PERFORM out.
WRITE / 'Button FUN 4 was pressed'.
WHEN 'FC5'.
PERFORM out.
WRITE / 'Button FUN 5 was pressed'.
ENDCASE.
sy-lsind = sy-lsind - 1.
FORM out.
WRITE: 'Secondary List',
/ 'SY-LSIND:', sy-lsind,
/ 'SY-PFKEY:', sy-pfkey.
ENDFORM.
regards
vivek
04-24-2007 12:18 PM
Hi!
The menu and screen are developed separately in the transactions SE41 and SE51 for that program.
Regards
Tamá
04-24-2007 12:18 PM
Hi!
The menu and screen are developed separately in the transactions SE41 and SE51 for that program.
Regards
Tamá
04-24-2007 12:18 PM
double click on PF-STATUS , there u will find out PUSH buttons.
Regards
Prabhu
04-24-2007 12:19 PM
1. double click on TEST you will get the toolbar, menubar for the program.
Whatever the buttons for which the function code is set that will be enabled.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
04-24-2007 12:21 PM
when we write a program we can create a PF-STATUS where we can include various buttons needed. In below code in same manner the PF-STATUS <b>TEST</b> has been craeted in which the buttons <b>FC1</b> & <b>FC2</b> & <b>FC3</b> & <b>FC4</b> & <b>FC5</b> have been created.
now when u press any of these buttons the ucomm of the button gets stored in sy-ucomm and it triggers what ever code is written for the ucomm functionality.
04-24-2007 12:32 PM
Hi Vivek,
In this program, they created the buttons using Menu Painter.I think right nw u r working with standard screens. In that Title Bar,Menu Bar,Standard Tool Bar,Application Tool Bar,All are pre-defined.When u go for user-defined screens u will define all those things.
In ABAP Editor screen,there is one button called 'Display Object List (CtrlShiftF5)'.U click that one & expand all those nodes u will find the answer.
Transaction for Menu Painter is se41.
Reward if Helpful