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

Pf-status not working

Former Member
0 Likes
6,865

Hi gurus,

i have created a pf-status for my program

but it is not working. with out pf-status evrythng is fine. but i have to add a push button on the output screen using pf-status

can anyone help me out

thanks in advance.

Hi gurus,

i have created a pf-status for my program

but it is not working. with out pf-status evrythng is fine. but i have to add a push button on the output screen using pf-status

can anyone help me out

thanks in advance.

17 REPLIES 17
Read only

Former Member
0 Likes
3,497

Hi,

Did you activate the PF-status.

Thanks

Naren

Read only

0 Likes
3,497

yes naren i have activated it.

Read only

Former Member
0 Likes
3,497

Hi

When you write the statement SET PF-STATUS 'STATUS_NAME', have you write the status_name in

upper case? It should be upper case.

Read only

Former Member
0 Likes
3,497

Hi Lucky,

[Creating a push button|]

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
3,497

Hi alex ,

I have written it in upper case only.

Read only

Former Member
0 Likes
3,497

I have executed the pf-status it is working fine, but its not working for my program please help me out.

Read only

0 Likes
3,497

Where you placed that code.

SET PT-STATUS 'AAA'.

Show the code , exactly where you put the above code. I mean which event you added that(i am assuming that you are talking about normal report programming)

Read only

Former Member
0 Likes
3,497

Hello Lucky.

I prefer using it this way as it works fine in my case,

START-OF-SELECTION.
---->
  SET PF-STATUS 'CHECK'.

And

AT USER-COMMAND.

CASE sy-ucomm.

    WHEN 'READ'.

      box = space.

      SET PF-STATUS 'CHECK' EXCLUDING 'READ'.

      DO w_linno TIMES.

        READ LINE sy-index FIELD VALUE box INTO box.

        IF box = 'X'.


          LOOP AT t_sflights INTO fs_sflights
                               WHERE carrid = fs_spflis-carrid
                                 AND connid = fs_spflis-connid.

            WRITE:/ fs_sflights-carrid   UNDER text-001,
                    fs_sflights-connid   UNDER text-002,
                    fs_sflights-fldate   UNDER text-009,
                    fs_sflights-seatsmax UNDER text-007,
                    fs_sflights-seatsocc UNDER text-008.

          ENDLOOP.

        ENDIF.

      ENDDO.

  ENDCASE.

Hope this works out.

Good Luck & Regards.

Harsh Dave

Read only

Former Member
0 Likes
3,497

i have created it for alv report. when i execute pf-status it is working fine, but it is not working with the report.

Read only

Former Member
0 Likes
3,497

Hi,

Setting F2 function key of PF Status to PICK will solve your problem.

if it is ALV Report

then assign

F2 key with

F2      '&IC1'         'CHOOSE'

Thanks,

Kamesh Bathla

Edited by: Kamesh Bathla on Aug 29, 2008 7:15 PM

Edited by: Kamesh Bathla on Aug 29, 2008 7:17 PM

Read only

Former Member
0 Likes
3,497

hi kamesh ,

i've already created

f2 with &ic1 choose

here the problem is menu it self is not visible in the output hope u got my point

Read only

0 Likes
3,497

Hi,

Are you giving the PF STATUS is the function module of ALV?

can you please write the code how you are calling alv gird?

Regards,

Kamesh

Read only

0 Likes
3,497

The General Approach to work with ALV PF-STATUS is

Go to SE41, Give the program name as SAPLKKBL and the status as STANDARD

Now click on the Copy Status button on the application Tool bar.

Now a Popup appears , in that Give the Target Program name as your program name(By Default it will be SAPLKKBL) Press Ok.

Now save and activate the status, If you want to add any button to the application toolbar then add them and activate.

Now come to your program..

call function 'REUSE_ALV_GRID_DISPLAY'
  exporting
    i_callback_program       = sy-repid
    i_callback_pf_status_set = 'STATUS'
    i_callback_user_command  = 'USER_COMMAND'

form status using p_extab type slis_t_extab.
  "Set the Button using the staus
  "Copy the Standard status from the program SAPLKKBL status
  " STANDARD using SE41, and use that here.
  "Pf status
  set pf-status 'STATUS' excluding p_extab.
endform. " STATUS

form user_command using r_ucomm like sy-ucomm
                        rs_selfield type slis_selfield.
"handling here..

endform.

if you still have any issues let me know.

Read only

0 Likes
3,497

Hi Vijay,

I have followed as said. But I am not able to see the any of the buttons at the application tool bar. I am using ECC 6.0 . Is any different behaviour with ECC 6.0 while dealing with set pf status.

Read only

Former Member
0 Likes
3,497

cALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = g_repid

I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

i_structure_name = 'TY_MBEW'

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

i_grid_settings = lc_glay

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

it_events = gt_events

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = itab_mbew_target

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

&----


*& Form set_pf_status

&----


  • text

----


  • -->RT_EXTAB text

*----


FORM set_pf_status."USING." rt_extab TYPE slis_t_extab.

SET PF-STATUS 'ZSTATUS'.

ENDFORM. "set_pf_status

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

0 Likes
3,497

>

> cALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

> EXPORTING

> * I_INTERFACE_CHECK = ' '

> * I_BYPASSING_BUFFER = ' '

> * I_BUFFER_ACTIVE = ' '

> i_callback_program = g_repid

> I_CALLBACK_PF_STATUS_SET = 'PF_STATUS<=====it should be same

> FORM pf_status."USING." rt_extab TYPE slis_t_extab. "form name should be same you used set_

> SET PF-STATUS 'ZSTATUS'.

> ENDFORM. "set_pf_status

> IF sy-subrc <> 0.

> * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

> * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

> ENDIF.

Read only

0 Likes
3,497

let me make it clear...

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'  "<====you should have dynamic form routine with same name

But you are doing this..

 this form name is different. change the name to pf_status
FORM set_pf_status."USING." rt_extab TYPE slis_t_extab. 
SET PF-STATUS 'ZSTATUS'.
ENDFORM. "set_pf_status

corrected code..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
i_structure_name = 'TY_MBEW'
i_grid_settings = lc_glay
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
I_DEFAULT = 'X' 
I_SAVE = ' ' 
it_events = gt_events
TABLES
t_outtab = itab_mbew_target
EXCEPTIONS 
PROGRAM_ERROR = 1 
OTHERS = 2 .
IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF.
FORM pf_status."USING." rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTATUS'.
ENDFORM. "set_pf_status