Skip to Content
author's profile photo
Former Member

GUI Status

Hi All,

How to specify GUI status in a report program based on some condition.

OR

Change the GUI status of a report during run time.

Any suggestions?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Oct 01, 2005 at 08:05 AM

    Hi,

    Use this stmt.

    SET PF-STATUS <stat> [EXCLUDING <f>|<itab>]

    [OF PROGRAM <prog>]

    [IMMEDIATELY].

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/frameset.htm

    Svetlin

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 01, 2005 at 08:06 AM

    If you are trying to set a gui status in selection screen you can specify SET PF-STATUS <NNN> in the event "AT SELECTION-SCREEN OUTPUT".

    If you are trying to set a gui status in list screen you can specify SET PF-STATUS <NNN> in the event "TOP OF PAGE". <NNN> can be a variable to which you can pass value at run time based on your IF ELSEIF conditions .

    ( The GUI status should be created in the program prior to use i.e. those GUI status should exit.)

    You can use

    IF COND1.

    PFSTAT = '001'.

    ELSE.

    PFSTAT = '002'.

    ENDIF.

    SET PF-STATUS PFSTAT.

    Dont forget to reward if answers helped.

    Cheers

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sanjay,

      Thanks for your reply.

      My code is as follows

      IF Equip NE ''.

      SET PF-STATUS 'MAIN' of Program 'RCS11001'.

      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

      EXPORTING

      input = Equip

      IMPORTING

      output = Equip.

      SELECT stlnr INTO eqst-stlnr FROM eqst WHERE equnr IN Equip.

      SELECT SINGLE idnrk INTO stpo-idnrk FROM stpo

      WHERE stlnr EQ eqst-stlnr.

      CALL FUNCTION 'RFC_DISPLAY_BILL_OF_MATERIAL'

      EXPORTING

      bom_action = '1'

      bom_application = ' '

      material = stpo-idnrk

      plant = '2001'

      bom_alternative = ' '

      change_number = ' '

      valid_from = ' '

      revision_level = ' '

      bom_type = ' '

      skip_first_screen = 'x'

      IMPORTING

      function_code = l_test

      TABLES

      sap_field_data = sap_field_data

      dms_class_data = dms_class_data.

      ENDSELECT.

      IF l_test EQ 'BACK' "Back

      OR l_test EQ 'ENDE' "Exit

      OR l_test EQ 'ABBR'. "Cancel

      submit ZPM_RIMARA20 via selection-screen.

      ENDIF.

      When I run the program system displays the output but when I click back icon it takes me to a blank screen, which I want to avoid.

      How can I do this.

      Thanks

  • author's profile photo
    Former Member
    Oct 01, 2005 at 08:29 AM

    Instead of trying GUI STATUS why dont your try

    submit ZPM_RIMARA20 via selection-screen <b>and return</b>.

    I hope this will fix the issue of "BACK" button.

    If at you want to set the GUI status you will have to do it in the program ZPM_RIMARA20 and write code for handling "BACK" button in this program only. Just by setting GUI status will not help.

    Also check what is coded for "BACK" in program ZPM_RIMARA20 .

    Cheers

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sanjay.

      Thanks a lot for your reply.

      Problem fixed.

      I found that function code returned is F03 for back icon.

      So I have changed my code to

      IF fn_code EQ 'F03' "Back

      OR fn_code EQ 'F15'

      OR fn_code EQ 'F12'.

      SUBMIT zpm_rimara20 VIA SELECTION-SCREEN.

      ENDIF.

  • author's profile photo
    Former Member
    Oct 01, 2005 at 09:15 AM

    Hi Pratibha,

    Can you close this thread if problem solved .

    Dont forget to reward if answers helped.

    Cheers

    Add comment
    10|10000 characters needed characters exceeded