Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

events

Former Member
0 Likes
704

can any body tell me about event AT PF detial please

can any body tell me about event AT PF detial please

5 REPLIES 5
Read only

Former Member
0 Likes
683

Hi,

at pF<key> : is used in interactive list

function key from F5 to F12 to perform interactive action on the list.

<b>Reward if helpful.</b>

Read only

varma_narayana
Active Contributor
0 Likes
683

Hi Venu..

AT PF<KEY> it is triggered when the user selects a Function key

Eg:

AT PF6. "When F6 Is pressed.

note: F1 TO F4 are reserved Function keys..

But this event is not Generally used.

Instead use AT USER-COMMAND.

<b>reward if Helpful</b>

Read only

Former Member
0 Likes
683

Hi,

Event Blocks for Function Codes PF<nn> (Obsolete)

When the user chooses a function code PF<nn> (<nn> can be between 01 and 24), the system always triggers the AT PF<nn> event. In the standard list status, the function keys F<nn> that are not reserved for predefined system functions all have the function code PF<nn> as long as a corresponding event block is defined in the program.

AT PF<nn>.

<statements>.

These event blocks are executed when the user chooses the corresponding function key. The

position of the cursor in the list is irrelevant.

If you use these event blocks at all, it should only be for temporary test versions. In

production programs, you should only use AT USER-COMMAND with a dialog status

of your own to assign function codes to function keys. When you use your own interfaces, the

system displays a function text explaining what the function does. This does not happen when

you use AT PF<nn> event blocks.

AT PF<nn> (obsolete)

All function keys of the keyboard F<nn> that are not used for predefined system functions,

are set to the function codes PF<nn>, where <nn> is a number between 01 and 24. During

list processing, the function codes PF<nn> are linked to the events AT PF<nn>. Choosing

PF<nn> always triggers AT PF<nn>. You should no longer use event blocks for PF<nn>.

Example for AT PF<nn>.

REPORT demo_list_at_pf.

START-OF-SELECTION.

WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.

AT pf5.

PERFORM out.

AT pf6.

PERFORM out.

AT pf7.

PERFORM out.

AT pf8.

PERFORM out.

FORM out.

WRITE: 'Secondary List by PF-Key Selection',

/ 'SY-LSIND =', sy-lsind,

/ 'SY-UCOMM =', sy-ucomm.

ENDFORM.

After executing the program, the system displays the basic list. The user can press the

function keys F5, F6, F7, and F8 to create secondary lists. If, for example, the 14th

key the user presses is F6, the output on the displayed secondary list looks as follows:

Secondary List by PF-Key Selection

SY-LSIND = 14

SY-UCOMM = PF06

Regards,

Bhaskar

Read only

Former Member
0 Likes
683

Hi,

YOu can go thru the below documentation and code, which is available in help.

AT PFn.

Effect

Event in interactive reporting

Here, n stands for a numeric value between 0 and 99.

This event is executed whenever the user presses a function key that contains the function code PFn in the interface definition. The default status for lists contains some of these functions.

Otherwise, the effect is as for the variant AT LINE-SELECTION. The cursor can be on any line.

Notes

To ensure that the chosen function is executed only for valid lines, you can check the current HIDE information.

This variant should be used only for test or prototyping purposes, since the default status is not normally used. Instead, you should set a program-specific status with SET PF-STATUS. This should not contain any function codes beginning with "PF".

Example

DATA NUMBER LIKE SY-INDEX.

START-OF-SELECTION.

DO 9 TIMES.

WRITE: / 'Row', (2) SY-INDEX.

NUMBER = SY-INDEX.

HIDE NUMBER.

ENDDO.

AT PF8.

CHECK NOT NUMBER IS INITIAL.

WRITE: / 'Cursor was in row', (2) NUMBER.

CLEAR NUMBER.

Thanks,

Sri.

Read only

Former Member
0 Likes
683

When the user chooses a function code PF<nn> (<nn> can be between 01 and 24), the system always triggers the AT PF<nn> event. In the standard list status, the function keys F<nn> that are not reserved for predefined system functions all have the function code PF<nn> as long as a corresponding event block is defined in the program.

AT PF<nn>.

<statements>.

These event blocks are executed when the user chooses the corresponding function key. The position of the cursor in the list is irrelevant.

If you use these event blocks at all, it should only be for temporary test versions. In production programs, you should only use AT USER-COMMAND with a dialog status of your own to assign function codes to function keys. When you use your own interfaces, the system displays a function text explaining what the function does. This does not happen when you use AT PF<nn> event blocks.

regards,

srinivas