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

SET PF-STATUS

Former Member
0 Likes
1,599

Hi,

I have a small question, I have initially deactivated 'SAVE' in toolbar by using

DATA: BEGIN OF TAB OCCURS 10,

FCODE(4),

END OF TAB.

TAB-FCODE = 'SAVE'.

APPEND TAB.

set pf-status '100' excluding tab.

After certain condition, I have to reactivate the 'SAVE' in toolbar.

I have used the following code but the 'SAVE' option is not active,

refresh tab.

clear tab.

set pf-status '100' excluding tab.

Can anybody please help me.

Thanks in Advance.

Hi,

I have a small question, I have initially deactivated 'SAVE' in toolbar by using

DATA: BEGIN OF TAB OCCURS 10,

FCODE(4),

END OF TAB.

TAB-FCODE = 'SAVE'.

APPEND TAB.

set pf-status '100' excluding tab.

After certain condition, I have to reactivate the 'SAVE' in toolbar.

I have used the following code but the 'SAVE' option is not active,

refresh tab.

clear tab.

set pf-status '100' excluding tab.

Can anybody please help me.

Thanks in Advance.

6 REPLIES 6
Read only

Former Member
0 Likes
1,093

Second time just use ..

set pf-status '100' .

Read only

Former Member
0 Likes
1,093

Hi,

Use:

refresh tab.

clear tab.

set pf-status '100' .

Check the documentation given below

SET PF-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".

Regards,

Shiva Kumar

Read only

0 Likes
1,093

Hi Shiva Kumar,

Thanks for you response, I tried

REFRESH tab.

CLEAR tab.

SET PF-STATUS '100'.

but I am getting the same problem, 'SAVE' is not active.

Read only

Former Member
0 Likes
1,093

Hi,

Here you are again excluding here.

No need of that.

Jus use

SET PF-STATUS '100'

Regards

Sandeep Reddy.

Read only

Former Member
0 Likes
1,093

Hi Ranjith,

you can change the pf-status dynamically at runtime.

by excluding the function code from it.

like this.

codeTYPES: BEGIN OF TAB_TYPE,

FCODE LIKE RSMPE-FUNC,

END OF TAB_TYPE.

DATA: TAB TYPE STANDARD TABLE OF TAB_TYPE WITH

NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,

WA_TAB TYPE TAB_TYPE.

CLEAR TAB.

MOVE 'DELE' TO WA_TAB-FCODE.

APPEND WA_TAB TO TAB.

MOVE 'AUSW' TO WA_TAB-FCODE.

APPEND WA_TAB TO TAB.

SET PF-STATUS 'STA3' EXCLUDING TAB.[/code]

Regards,

Raj.

Read only

Former Member
0 Likes
1,093

Solved..