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,214

Hi,

Is it possible to display 4 buttons in the application tool bar of a report program, with out displaying any list.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,180

Hi Sai,

It is not possible to display buttons without any list. there should be atleast one output statement available, like WRITE, SKIP or ULINE.

Hope this helps you.

Regards,

Chandra Sekhar

11 REPLIES 11
Read only

Former Member
0 Likes
1,180

Yes,it is possible.You give proper function code to those buttons and make use of them as per your requirement.

Reward points if useful

Read only

Former Member
0 Likes
1,181

Hi Sai,

It is not possible to display buttons without any list. there should be atleast one output statement available, like WRITE, SKIP or ULINE.

Hope this helps you.

Regards,

Chandra Sekhar

Read only

0 Likes
1,180

Hi Sekhar,

Now I can get the output.

Thanks.

Sai.

Read only

Former Member
0 Likes
1,180

Hai,

Does ur Question mean tht u have a selection-screen on tht u want the buttons? Plzz be specific...

Regards,

Swpan.

Read only

0 Likes
1,180

Hi,

I have to just display 4 buttons, I dont have any selection screen or list.

Thanks.

Sai.

Read only

Former Member
0 Likes
1,180

Hai,

Does ur Question mean tht u have a selection-screen on tht u want the buttons? Plzz be specific...

Regards,

Swapna.

Read only

Former Member
0 Likes
1,180

Hi,

This is possible atleast write some list processing statement.

Read only

Former Member
0 Likes
1,180

this will show buttons at the selection screen application tool bar.... but without using pf-status.



TABLES : sscrfields.

PARAMETERS: p_check1 TYPE c,
            p_check2 TYPE c,
            p_check3 TYPE c,
            p_check4 TYPE c.



SELECTION-SCREEN FUNCTION KEY 1.

SELECTION-SCREEN FUNCTION KEY 2.

SELECTION-SCREEN FUNCTION KEY 3.

SELECTION-SCREEN FUNCTION KEY 4.

SELECTION-SCREEN FUNCTION KEY 5.


*********************************************************************
* INITIALIZATION                                                    *
*********************************************************************
INITIALIZATION.

  sscrfields-functxt_01 = '@4B@'.

  sscrfields-functxt_02 = '@4D@'.

  sscrfields-functxt_03 = '@3Q@ Button 3'.
  sscrfields-functxt_04 = '@A0@ Button 4'.
  sscrfields-functxt_05 = '@F1@ Button 5'.


AT SELECTION-SCREEN.
  DATA : g_ucomm TYPE syucomm.
  g_ucomm = sy-ucomm.
  CASE g_ucomm .
    WHEN 'FC01'.
      p_check1 = 'X'.
      p_check2 = 'X'.
      p_check3 = 'X'.
      p_check4 = 'X'.
    WHEN 'FC02'.
      CLEAR : p_check1, p_check2, p_check3, p_check4.
    WHEN 'FC03'. MESSAGE i000 WITH 'Button 3'.
    WHEN 'FC04'. MESSAGE i000 WITH 'Button 4'.
    WHEN 'FC05'. MESSAGE i000 WITH 'Button 5'.
    WHEN OTHERS.
  ENDCASE.

types : begin of x_marc,
        matnr type matnr,
        WERKS type WERKS_D,
        PSTAT type PSTAT_D,
        end of x_marc.

data : i_marc type STANDARD TABLE OF x_marc.

select matrnr werks pstat
       UP TO 10 rows
       into table i_marc
       from marc
       where werks = '1060'.

select matrnr werks pstat
       UP TO 10 rows
       APPENDING table i_marc
       from marc
       where werks = '1090'.

Reward point if helpful

Read only

Former Member
0 Likes
1,180

Hi,

Assign proper function code to the buttons in PF-status and use as per your need.

See if this piece of code ould help you.

MODULE status_9001 OUTPUT.

  REFRESH g_t_fcode_exclude.

* setting PF-STATUS based on role of user.
* for representaive PF-STATUS will have 'submit' and 'show selections' button.
  IF g_flag_role = 'R'.
    SET PF-STATUS 'ZNOT2'.
  ELSEIF g_flag_role = 'S'.
*  for supervisor PF-STATUS will have 'submit' button only and for demand planner its only display access.
    APPEND 'SHOW' TO g_t_fcode_exclude.
    SET PF-STATUS 'ZNOT2' EXCLUDING g_t_fcode_exclude.
  ELSE.
    APPEND 'SUBM' TO g_t_fcode_exclude.
    APPEND 'SHOW' TO g_t_fcode_exclude.
    SET PF-STATUS 'ZNOT2' EXCLUDING g_t_fcode_exclude.

  ENDIF.
  SET TITLEBAR 'ZTNOT2'.

ENDMODULE.

hope this helps you.

plz reward if useful.

thanks,

dhanashri.

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,180

Hi Mohan,

If u r talking about button in the tool bar after displaying the output?

If yes then it is not possible to achieve this. Because what ever PF status u r setting for the screen will come into picture once output screen is called and this will happen only if u have some thing to display.

May be u can trigger output screen by using statements like NEW-LINE, SKIP etc sothat there wont be any thing in output and ur PF status will be triggered.

Other statements to trigger output screen ULINE, WRITE etc.

Thanks,

Vinod.

Read only

bpawanchand
Active Contributor
0 Likes
1,180

Well , I cannot exactly interpret your question.Yes , you can set 4 buttons on application tool bar with out displaying any thing on the list.execute the program in debug mode and check sy-subrc value if it is zero then PF-STATUS is set to the list but it doesn't display any list because in order display list we need to use WRITE SKIP or ULINE any one of the output statements

e:g1

START-OF-SELECTION.

SET PF-STATUS 'B4'.

e:g2

START-OF-SELECTION.

SET PF-STATUS 'B4'.

skip.

B4 is a PF-STATUS in which 4 push buttons are defined on the application tool bar.

Reward points if useful.

Regards

Pavan