2007 Aug 13 11:28 AM
Hi All,
I have a requirement in which when i click on the image in the module pool then i have to navigate to some other screen but
1. how could i know that the user has clicked the image ?
2. What is the use of PF_STATUS?
Please help me out i have already loaded the image in my module pool screen but don't know how to go further please help me as soon as possible.
Thanks in advance
Message was edited by:
Rachit Khanna
2007 Aug 14 7:21 AM
Hi..
PF-status means the GUI Status (Menubar + App Toolbar + Std Toolbar + F keys)
To Create it Tcode : SE41
To Call it use the statement SET PF-STATUS '<GUI STATUS>' . (in PBO)
Have u assigned any Function code to the Image?
In that case you IN PAI MODULE can check.
CASE OK_CODE.
WHEN 'IMAGE'. "Use the Fcode of the image here .
SET SCREEN <NO>.
ENDCASE.
<b>Reward if Helpful</b>
Hi All,
I have a requirement in which when i click on the image in the module pool then i have to navigate to some other screen but
1. how could i know that the user has clicked the image ?
2. What is the use of PF_STATUS?
Please help me out i have already loaded the image in my module pool screen but don't know how to go further please help me as soon as possible.
Thanks in advance
Message was edited by:
Rachit Khanna
2007 Aug 14 7:21 AM
Hi..
PF-status means the GUI Status (Menubar + App Toolbar + Std Toolbar + F keys)
To Create it Tcode : SE41
To Call it use the statement SET PF-STATUS '<GUI STATUS>' . (in PBO)
Have u assigned any Function code to the Image?
In that case you IN PAI MODULE can check.
CASE OK_CODE.
WHEN 'IMAGE'. "Use the Fcode of the image here .
SET SCREEN <NO>.
ENDCASE.
<b>Reward if Helpful</b>
2007 Aug 14 9:09 AM
When i see the properties of Custom control then i can see the FunctCode but it is disable and i m not able to assign anything to it ,
Its properties also has a switch but don't know what is its use.
Please tell what else could be done.
Please reply as it is urgently required.
Thanks for your reply.
2007 Aug 14 7:23 AM
Dialog Status for Lists
To allow the user to communicate with the system when a list is displayed, the lists must be able to direct user actions to the ABAP program. As described in User Actions on Screens, function codes are used to do this. Function codes are maintained in the GUI status of the list screen. You define a GUI status using the Menu Painter tool in the ABAP Workbench. The system assigns function codes to list-specific user actions.
The most important of these functions is for selecting list lines by double-clicking. As described in Using a GUI Status, the double-click function is always linked to the F2 key. If a function code is assigned to the F2 key in the GUI status, it will be triggered when you double-click.
The Standard List Status
As with normal screens, you can define your own GUI status for lists and attach it to a list level using the SET PF-STATUS statement. If you do not set a particular GUI status, the system sets a default list status for the list screen in an executable program. In other programs, for example, when you call a list from screen processing, you must set this status explicitly using the statement
SET PF-STATUS space.
This default interface always contains at least the functions described in the Standard List section.
Unlike normal dialog statuses, the default list status is affected by the ABAP program.
If you define event blocks in your program using the event keywords AT LINE-SELECTION or AT PF]
This statement sets the status parameters. To display an ampersand character &, repeat it in the title &&.
Examples
Example for dialog status in a list.
REPORT demo_list_menu_painter.
START-OF-SELECTION.
SET PF-STATUS 'TEST'.
WRITE: 'Basic list, SY-LSIND =', sy-lsind.
AT LINE-SELECTION.
WRITE: 'LINE-SELECTION, SY-LSIND =', sy-lsind.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'TEST'.
WRITE: 'TEST, SY-LSIND =', sy-lsind.
ENDCASE.
This program uses a status TEST, defined in the Menu Painter.
Function key F5 has the function code TEST and the text Test for demo.
Function code TEST is entered in the List menu.
The function codes PICK and TEST are assigned to pushbuttons.
The user can trigger the AT USER-COMMAND event either by pressing F5 , or by choosing List ® Test for demo, or by choosing the pushbutton Test for demo.The user can trigger the AT LINE-SELECTION event by selecting a line.
Example of setting a dialog status for the current list
REPORT demo_list_set_pf_status_1.
DATA: fcode TYPE TABLE OF sy-ucomm,
wa_fcode TYPE sy-ucomm.
START-OF-SELECTION.
wa_fcode = 'FC1 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC2 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC3 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC4 '. APPEND wa_fcode TO fcode.
wa_fcode = 'FC5 '. APPEND wa_fcode TO fcode.
wa_fcode = 'PICK'. APPEND wa_fcode TO fcode.
SET PF-STATUS 'TEST'.
WRITE: 'PF-Status:', sy-pfkey.
AT LINE-SELECTION.
IF sy-lsind = 20.
SET PF-STATUS 'TEST' EXCLUDING fcode.
ENDIF.
WRITE: 'Line-Selection, SY-LSIND:', sy-lsind,
/ ' SY-PFKEY:', sy-pfkey.
AT USER-COMMAND.
IF sy-lsind = 20.
SET PF-STATUS 'TEST' EXCLUDING fcode.
ENDIF.
WRITE: 'User-Command, SY-LSIND:', sy-lsind,
/ ' SY-UCOMM:', sy-ucomm,
/ ' SY-PFKEY:', sy-pfkey.
Suppose that the function codes FC1 to FC5 are defined in the status TEST and assigned to pushbuttons: The function code PICK is assigned to function key F2 .
When the program starts, the user can create detail lists by selecting a line or choosing one of the function codes FC1 to FC5. For all secondary lists up to level 20, the user interface TEST is the same as for the basic list:
On list level 20, EXCLUDING ITAB deactivates all function codes that create detail lists. This prevents the user from causing a program termination by trying to create detail list number 21.
Example of setting a dialog status for the current list
REPORT demo_list_set_pf_status_2.
START-OF-SELECTION.
WRITE: 'SY-LSIND:', sy-lsind.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' IMMEDIATELY.
After executing the program, the output screen shows the basic list and the user interface predefined for line selection (with function code PICK).
When you choose Choose, the user interface changes. However, since the AT LINE-SELECTION processing block does not contain an output statement, the system does not create a detail list: The status TEST is defined as in the previous example.
Example: Titles of detail lists.
REPORT demo_list_title .
START-OF-SELECTION.
WRITE 'Click me!' HOTSPOT COLOR 5 INVERSE ON.
AT LINE-SELECTION.
SET TITLEBAR 'TIT' WITH sy-lsind.
WRITE 'Click again!' HOTSPOT COLOR 5 INVERSE ON.
In this program, a new title is set for each detail list. The title is defined as follows: "Title for Detail List &1".
2007 Aug 16 8:30 AM
Hi Karthikeyan Pandurangan ,
Thanks for your reply but i came to know that for capturing the click event for custom control we have to use the ABAP OOP concept, i m using a class CL_GUI_CUSTOM_CONTAINER it has an event RIGHT_CLICK
But how could i use this i don't know.
Could you please help me out.