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: 

User commands in subscreen with selection screen

Former Member
0 Kudos

I have created a subscreen in an application through a user exit. Within that subscreen, I have defined a selection-screen within a subscreen area. The subscreen also has an ALV grid under the subarea. The select-options are defined as no intervals (i.e. single field multiple values).

When I enter in the multiple selection screen to either delete other options or add new options and press enter (or the clock with tick icon), I get a message saying 'Requested function %0100100000213534 is not available here'. How can I use the select-option functionality within a subscreen when enter is pressed to avoid this message? I have not set a pf-status for my subscreen as I do not want additional icons yet I want to use the values in the select-option to find information in order to populate my ALV grid when I press enter. This should occur after I have entered values in the select-option screen. Should I be defining an additional pushbutton in the selection-screen or should I be defining a PBO and PAI for my subscreen area (subscreen 1001) that the selection screen appears in, in the larger subscreen.

Apologies if this does not make sense

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The problem is, the actions in your custom subscreen will be handled but the main calling screens PAI, you do not have a PBO/PAI for your subscreen. Do you have access to the PBO/PAI of the main screen?

Regards,

Rich Heilman

0 Kudos

No I don't as this is a SAP standard screen (transaction IW51 - Creating a Notification). I am trying to put commands in the PBO of my subscreen but that does not solve the problem of my subscreen area within my subscreen.

The only way I can see around it is not to define a selection screen, use screenfields and somehow program in the bringing up of a screen similiar to how you deal with range through a pushbutton. I know there is an FM to dot his but cannot get the parameters to work.

0 Kudos

Are you thinking of using....




  CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
   EXPORTING
    TITLE                   = 'Material Number'
*   TEXT                    =
*   SIGNED                  = 'X'
*   LOWER_CASE              = ' '
*   NO_INTERVAL_CHECK       = ' '
*   JUST_DISPLAY            = ' '
*   JUST_INCL               = ' '
*   EXCLUDED_OPTIONS        =
*   DESCRIPTION             =
    HELP_FIELD              = 'MARA-MATNR'
*   SEARCH_HELP             =
*   TAB_AND_FIELD           =
   TABLES
      RANGE                   = RANGE_MATNR
   EXCEPTIONS
     NO_RANGE_TAB            = 1
     CANCELLED               = 2
     INTERNAL_ERROR          = 3
     INVALID_FIELDNAME       = 4
     OTHERS                  = 5
            .

Regards,

Rich Heilman

0 Kudos

Yes, I was thinking along this line originally but could not get the FM to work. The only thing to work out after that is how to change the icon on the pushbuttons in the same way that it happens for a select-option.

Many thanks

Larissa

0 Kudos

How would I define RANGE_MATNR if I went down this route?

0 Kudos

Unfortunately, I cannot use this as I have the same problem as with a selection screen in that the main screen of the application does not contain the function code and the main screen happens to be a SAP standard screen.

Does anyone else have an idea of how to get your subscreen functionality with function codes to work without the main screen objecting to the function code?

0 Kudos

You can define a pushbutton in your subscreen to emulate the "multiple selection" button and assign it with a user command. I am assuming that since this is a screen exit, you should have access to the PAI, PBO modules of your subscreen. So in the PAI of your subscreen(not the main screen PAI), you can write code for handling this pushbutton. The function module specified by Rich should help you.

Srinivas