Skip to Content
avatar image
Former Member

Regarding PF-STATUS in Dialog Programming

Hi All,

I have some issues with PF-STATUS functionality in my Dialog screen.

I have initially one PF-STATUS.

That i have used in screen 100 & 200.

In both Screens i Will have one Button on application tool bar.

so now i have created one PF-STATUS called 300 with one Button initially i named it as PRINT and it's icon text as Print SPI. this should come in 100 screen. Now in screen 200 same PF-STATUS i have used NOw that button also getting displayed in 200 screen APplication tool bar.

Now i want to change the icon text in 200 screen as DELETE instead of Print SPI which was displayed in previous screen how can i do it.

In this case i am not able to use diffrent PF-STATUS's i have to use same PF-STATUS.

If any body knows the solution please post it!

Thanks in advance.

Thanks & Regards,

Prasad.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • May 19, 2006 at 04:25 PM

    Put all buttons in one status and exclude the ones that you don't want to show using the EXCLUDE extension of the SET PF-STATUS statement.

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Srinivas Adavi

      Hi,

      When i am trying to create new button on application tool bar. As soon as i enter text and hit eneter it is displaying following message.

      When i give new Button as <b>DELE</b> and hit Enter i am getting a message as

      <b>Function code DELE has not been assigned to a function key.</b>

      Thanks,

      Prasad.

  • avatar image
    Former Member
    May 19, 2006 at 05:03 PM

    1. Go to the PF-STATUS through SE41.

    2. Create a item in applicatio toolbar by assigning a function code to it.

    3. Now Double click on it and give a field name to the dynamic function text say ('L_FIELD').

    4. Now declare a variable in your programe with same name of type SMP_DYNTXT.

    5. in the PBO of the current screen Assign value to SMP_DYNTXT-TEXT depending on what text you want to display.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      But in this case ICON on Button is not getting displayed only text is displayed.

      Though i have used ICON_ID field of SMP_DYNTXT.

      My code is as below:

      DATA: L_PRINT TYPE SMP_DYNTXT.

      L_PRINT-ICON_ID = 'ICON_PRINT'.

      L_PRINT-ICON_TEXT = 'TEXT'.

      L_PRINT-TEXT = 'TEXT'.

      Can anybody give me solution for the same.

      Also Can anybody tell me why i am not able to add 2nd button to Application tool bar of PF-STATUS.

      Thanks,

      Prasad.

  • avatar image
    Former Member
    May 20, 2006 at 03:49 AM

    hii

    well i am sending u a example of a program wherer u can use the same pf-status by excluding .

    START-OF-SELECTION.

    SET PF-STATUS 'TEST' EXCLUDING 'EXP'.

    PERFORM get_vbak_data.

    PERFORM get_vbap_data.

    END-OF-SELECTION.

    PERFORM display_report.

    TOP-OF-PAGE.

    WRITE:/1 'Run Date:', 11 sy-datum.

    ULINE AT /1(37).

    WRITE:/1 '|',2(10) 'Document #', 12 '|', 13(5) 'Ln #',

    18 '|',19(18) 'Material #', 37 '|'.

    ULINE AT /1(37).

    TOP-OF-PAGE DURING LINE-SELECTION.

    IF sy-ucomm = 'SUMM'.

    WRITE:/1 'Summary Report'.

    WRITE:/1 'Run Date:', 11 sy-datum.

    ULINE AT /1(18).

    WRITE:/1 '|', 2(10) 'Document #', 12'|', 13(05) 'Ln #', 18'|'.

    ULINE AT /1(18).

    ENDIF.

    AT USER-COMMAND.

    DATA: BEGIN OF t_code OCCURS 0,

    tcode LIKE sy-ucomm,

    END OF t_code.

    t_code-tcode = 'SUMM'.

    APPEND t_code.

    t_code-tcode = 'DTL'.

    APPEND t_code.

    IF sy-ucomm = 'SUMM'.

    SET PF-STATUS 'TEST' EXCLUDING t_code.

    LOOP AT t_vbap.

    WRITE:/1 '|',2(10) t_vbap-vbeln,

    12 '|', 13(5) t_vbap-posnr,

    18 '|'.

    ULINE AT /1(18).

    ENDLOOP.

    ENDIF.

    IF sy-ucomm = 'DTL'.

    WRITE:/1 'HAPPY NEW YEAR'.

    ENDIF.

    &----


    *& Form get_vbak_data

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM get_vbak_data .

    SELECT vbeln vkorg INTO TABLE t_vbak FROM vbak

    WHERE vkorg IN s_vkorg.

    IF sy-subrc <> 0.

    MESSAGE i398(00) WITH 'No Data Exists in VBAK'(002).

    LEAVE LIST-PROCESSING.

    ENDIF.

    ENDFORM. " get_vbak_data

    &----


    *& Form get_vbap_data

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM get_vbap_data .

    SELECT vbeln posnr matnr INTO TABLE t_vbap FROM vbap

    FOR ALL ENTRIES IN t_vbak

    WHERE vbeln = t_vbak-vbeln.

    IF sy-subrc <> 0.

    MESSAGE i398(00) WITH 'No Data Exists in VBAP'(003).

    LEAVE LIST-PROCESSING.

    ENDIF.

    ENDFORM. " get_vbap_data

    &----


    *& Form display_report

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM display_report .

    LOOP AT t_vbap.

    WRITE:/1 '|',2(10) t_vbap-vbeln ,

    12 '|', 13(5) t_vbap-posnr,

    18 '|',19(18) t_vbap-matnr, 37 '|'.

    HIDE: t_vbap.

    ULINE AT /1(37).

    ENDLOOP.

    ENDFORM. " display_report

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 20, 2006 at 05:55 AM

    Dear Prasad,

    While defining your button, press enter and give text type as dynamic text. Declare a field in your top-include type c.

    then as per your condition, give the text in that field.

    am sending you a sample code.

    DATA : var_txt(10) TYPE c.

    when sy-dynnr = 100.

    var_txt = 'text1'.

    when sy-dynnr = 200.

    var_txt = 'text2'.

    it'll automatically change the text.

    this will solve your issue.

    With Regards

    Pradipta K Mishra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 20, 2006 at 05:59 AM

    You don't have to create two buttons. Also, mention this in your PBO and no need to give any excluding addition or anything else.

    I've forgotten to mention this in the last reply.

    With Regards

    Pradipta k Mishra

    Add comment
    10|10000 characters needed characters exceeded