Application Development 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: 

PF status

Former Member
0 Kudos
211

hi all,

I have created a pf status in se41 for my ALV prog. where should i use this in my program..

your help will be greatly appreciated.

15 REPLIES 15

Former Member
0 Kudos
182

Hi,

you have to use in the PBO of screen in that progrom...

like below

set pf-status 'WYSV_STATUS'.

Thanks!

0 Kudos
182

hi all,

this not the module pool. this is simple alv report.

Former Member
0 Kudos
182

Hi,

The PF status is created for custom-screen in the prog.

Use the PF status with commant SET PF-STATUS, just before you beging to write in the list.

Usually, this is the first command in the End of selection event

Thanks,

RJ

dev_parbutteea
Active Contributor
0 Kudos
182

Hi,

Use this as follows:

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_PF_STATUS_SET = 'F_STATUS' "<-- routine name

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IT_FIELDCAT = GT_FIELDCAT[]

IT_EVENTS = EVENT[]

TABLES

T_OUTTAB = IT_FINAL[]

FORM F_STATUS USING P_extab TYPE slis_t_extab.

SET PF-STATUS 'STANDARD'.

ENDFORM.

Former Member
0 Kudos
182

Hi,

write the below code in your se38 pgm

set pf-status 'ZSTATUS' and double click on status name then it leades to another screen saying that application tool bar, menu bar and function code. and do what ever thenfinally acitvate

Finally you need to pass the Pf-status into the ALV_LIST_DISPALY or ALV_GRID_DISPLAY functtion module. then it will be visible to your program when the program dispays the output

Thanks

Ramakrishna Pathi

Former Member
0 Kudos
182

Hi Sunitha

look tis link,it had explained you with example and screen shots about ALV.

[https://wiki.sdn.sap.com/wiki/display/ABAP/OBJECTORIENTEDALV+Guide]

Regards

Hareesh Menon

I355602
Product and Topic Expert
Product and Topic Expert
0 Kudos
182

Hi,

Refer this program:-


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
     i_callback_program                = v_rep_id       " report id
     i_callback_pf_status_set          = 'PF'           " for PF-STATUS
     it_fieldcat                       = it_field       " field catalog
    TABLES
      t_outtab                          = it_final      " internal table
   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
*&---------------------------------------------------------------------*
*       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
*       ON WHICH THE ALV GRID IS DISPLAYED
*----------------------------------------------------------------------*
*       -->RT_EXTAB
*----------------------------------------------------------------------*
FORM pf USING rt_extab TYPE slis_t_extab.
  SET PF-STATUS 'ZTG_STAT'.
ENDFORM.                    "pf

For reference you can check wiki code by me:-

Learn to display data in ALV Grid

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/learn%252bto%252bdisplay%252bdata%252bin...

Hope this helps you.

Regards,

Tarun

Former Member
0 Kudos
182

Hi Sunitha,

For Creating the pf-status for the function module:

REUSE_ALV_GRID_DISPLAY



FORM pf_status USING rt_extab TYPE slis_t_extab.
 
  SET PF-STATUS 'FIRST'.
 
ENDFORM.                    "PF_STATUS
 

 
FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
 
  DATA: okcode TYPE sy-ucomm.
 
  okcode = ucomm.
  CASE okcode.
 
    WHEN 'REF'.
    CALL FUNCTION 'POPUP_TO_INFORM'
      EXPORTING
        titel         = 'MANSI'
        txt1          = 'CREATED BY'
        txt2          = SY-UNAME
*       TXT3          = ' '
*       TXT4          = ' '
 
              .
 
endcase.
 

And then in the function module,Reuse_alv_grid_display pass these

subroutines in their parameters:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-repid

i_callback_pf_status_set = 'PF_STATUS'

i_callback_user_command = 'COMM'

Hope it helps

Regrds

Mansi

0 Kudos
182

In FM REUSE_ALV_GRID_DISPLAY

Set the parameter

i_callback_pf_status_set = 'PF_STATUS_SET'

Then

*FORM pf_status_set USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'ZSTANDARD' OF PROGRAM <your program name>.

ENDFORM.* "pf_status_set

Thanks.

0 Kudos
182

HI All,

Thank you for helping me out in this issue..

Now, I have created on icon.My requirement is that if i select / press that icon, internal table must be popup as an output. how is it possible? please help me in this regard.

thanking you

0 Kudos
182

Hi

Now you set the parameter i_callback_user_command = 'USER_COMMAND' of

FM REUSE_ALV_GRID_DISPLAY.

Now create a subroutine like the following one:

FORM user_command USING I_r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE I_r_ucomm.

WHEN 'ITAB'. " assuming it is the Fcode you've assigned on your button

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

ENDPOS_COL = 68

ENDPOS_ROW = 66

STARTPOS_COL = 1

STARTPOS_ROW = 1

TITLETEXT = 'Testing'

  • IMPORTING

  • CHOISE =

TABLES

VALUETAB = <your itab name>

EXCEPTIONS

BREAK_OFF = 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.

ENDFORM.

Hope it solve your problem.

Regards.

Sarbajit

Edited by: Sarbajit Majumdar on Mar 17, 2009 10:56 AM

Edited by: Sarbajit Majumdar on Mar 17, 2009 10:57 AM

0 Kudos
182

Hi sunitha

use this statement

CALL SCREEN <SCREEN_NUMBER> STARTING AT 10 10.

Regards

Hareesh Menon

Former Member
0 Kudos
182

Try this code,

FORM pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'Z_STATUS'.

ENDFORM.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = v_repid

i_callback_pf_status_set = 'PF_STATUS'

it_fieldcat = it_field

TABLES

t_outtab = i_final

EXCEPTIONS

program_error = 1

OTHERS = 2.

Regards,

Joan

sarbajitm
Contributor
0 Kudos
182

This message was moderated.

Former Member
0 Kudos
182

thank you all