Skip to Content
author's profile photo Former Member
Former Member

Menu in Selection Screen

Hi ,

How can i attach a menu in my selection scren .

i have set the pf status in the

at selection-screen output event

, tough the menu appears , but i am not able to use it as the sy-ucomm is not set equal to the value of the menu option when i click the menu option.

Regards

arun

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2004 at 01:58 PM

    A little confused here. As your question is "How can I attach a menu in my selection screen" and below , you mention, that you have attached the menu, but not able to get the function code.

    Nevertheless, let us know, whether the menu that you see in the selection screen is the same menu that you have set in the PF-STATUS. Also, where have you set the PF-STATUS, under which event ?

    Can you also post your code ? (or do you want us to post a code ? )

    AT SELECTION-SCREEN OUTPUT.
     SET PF-STATUS 'ABCD' 
    

    Double check, whether you have attached a function code to all the new functions(menu items) entered in the PF-STATUS. Also check whether the PF-STATUS is activated.

    If all the above steps are done properly(and if I have not overlooked any steps), I think the selection screen should work fine.

    In case you have found the answer, do share it with us.

    Regards,

    Subramanian V.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Arun,

      The main problem, as I see it is the use of the SY-UCOMM value in your program to catch the function-code. In all selection-screen processing, you are to use SSCRFIELDS structure defined in the ABAP dictionary. There is a field called UCOMM in this structure which you are supposed to use for selection-screen PAI.

      For more information, refer to the following link in the SAP Online documentation :

      http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/content.htm

      And here's another post on SDN where I have explained about the usage of SSCRFIELDS.

      clear-selection-screen

      Remember you would have to declare the SSCRFIELDS structure in your program with a tables statement.

      For example...

      ====================================

      
      tables sscrfields.
      
      data: ..........
            ..........
      
      parameters: ........
                  ........
      
      AT SELECTION-SCREEN OUTPUT.
        set pf-status 'TEST'
      
      
      AT SELECTION-SCREEN.
        case sscrfields-ucomm.
          when 'DIS'.
            perform display.
          when 'EXT'.
            perform exit_program.
        endcase.
      
      START-OF-SELECTION.
       
      

      ====================================

      Hope I have struck the right note.

      Regards,

      Anand Mandalika.

      p.s. if this solves your problem, don't forget to reward the points 😊.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.