Reusable subscreen

I would like to create a function module that based on the imported parameters, populates a table and displays it in an ALV grid.  This in and of itself is no problem.  The problem is, I would like the ALV grid to not be displayed in a popup, but in a subscreen.  I'm thinking this might not be possible, but though I'd throw this question out and see if anyone comes up with a solution.
A simple example scenario is this.
Function Module zxyz gets inventory information and popuplates an ALV grid (instance of cl_gui_alv_grid).
Program A has a subscreen that calls the function module with certain selection criteria and the alv grid is displayed in the subscreen
Program B also has a subscreen, different selection criteria is passed the function module and those results are displayed via ALV grid in the subscreen.
I realize I can do this by implementing the ALV in each of my programs, and just return the dataset in the function module.
Also, one final note, I was able to display a screen from a function module (technically I guess it's from the function group), that had static data, but have not been able to update dynamic data to display in the subscreen.

Hi, Could you be more clear pls..

Similar Messages

  • Reusable subcontrollers

    Hi Friends,
         for item partners display in Sales Order transactions . SAP uses reusable subscreen (1000) from program ( SAPLV069 ).
         this screen we can call from our programs also,
         in bsp's we can call subcontrollers ( some what like subscreens ), actually do we have any such type of bsp's like partners subscreen  that we can use in our programs.
         whether SAP delivers any bsp's which will be reusable  that we can include in our programs ?
    Thanks and Regards,
    Shiva.

    If I u derstand correctly, you are having problems trying to relate the Tasks created from the original custom list? If you need to get the ID of your Tasks, you do not need to create a variable. All Tasks entries can be referenced by the ID column. It
    is automatically updated when a new Task is created. To get the related custom list ID, you can use the WorkflowItem ID column which is yet again another column that can be only updated by the system and is equivalent to the ID of the original custom list.
    I can get these 2 columns using List workflows but not on reusable workflow. So am pretty stuck at this point as well. If possible try to create a list workflow instea. Unfortunately I can't cos my custom list blocks out SPD and my only way of having a workflow
    run on my custom list is to deploy reusable workflows. If I find a workaround I'll let you know. Not an answer you are looking for but hope it helps.

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 1
         OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • Regarding SY-UCOMM from a subscreen.

    Hi All,
    I am calling a screen from a subscreen by using a push button.
    Issue : suppose SY_UCOMM when push button is pressed is TEST.
    When I press it , it takes to called sceen and in this screen SY_UCOMM changes.
    But , when I return control to my subscreen, I get SY_UCOMM as TEST.
    Please let me know the cause for the same.
    Thanks in advance.

    hi,
    first clear the Sy-ucomm or ok_code in PBO..
    and check again..
    and also check for enter do you assigned and function code or not in se41...
    if you donot any function key or code for enter the old sy-ucomm will be still there.
    soclear the Sy-ucomm or ok_code in PBO..
    i think from sub screen you can not call the another screen..
    but you can call the transaction..
    Regards,
    Prabhudas

  • How to add custom fields in BADI  Subscreen.

    Hi Friends,
    I have to include some custom fields in MFBF tcode.(In make-to-order tab page).
    To do that I have used RM_HR_INTEGRATION  BADI definition  and created implementation for this. In the provided subscreen I tried to add custom fields but it asks access key . I donu2019t know , how to proceed further. Your help is needed.
    Or kindly provide me solution to achieve my requirement.
    Thanks in Advance,
    senthil.

    Hi Venky,
    We can see the documentation in
    se18 -> badi -> LE_SHP_TAB_CUST_HEAD -> display -> documentation button above the definition name
    in the first pop-up of documentation..go to the end which says 'Further notes'
    Further notes
    Documentation on BAdI Interface LE_SHP_TAB_CUST_HEAD
    click on this and we have a detailed description of each method defined in the badi
    Hope it helps
    Regards
    Byju

  • Want check box checked as default for a newly added subscreen in ME21N

    Hi Guys,
                 I have added a subscreen in ME21N with one field with check box.
    When I enter ME21N I should get that checkbox CHECKED automatically.
    How to do this.
    And one more thing is when manually putting checkmark,when I press enter that check mark is getting deselected.How to overcome this???
    I have used screen exit
                                      SAPLXM06 
                                      screen: 0101   for this subscreen.
    Thanks in Advance.
    Prasad.

    Hi,
    the deselection problem could be caused of an incorrect name of that screen field name. You should check in screen painter if that check box field name is the same name as your data object (e.g. gv_checkbox) .
    Unfortunately it is not possible to define default values within Screen Painter. You have to do this in PBO.
    Regards
    Mark-André

  • Edit a field in ALV tree in a subscreen of a module pool

    Hi
    I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool.  I used the edit = 'X' field in the fieldcatalog still it  is showing the field as display and not edit.
    Please help me to get the field as editable and save it to the database table.
    Please not this is ALV TREE
    Regards,
    Mozila

    Hi Mayank,
    Thanks for the reply
    I am using oops method.
    I tried making the field which is to be made editable  as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said  edit in layout object.
    I also went through the demo programs but these programs are not having editable fields.
    My code is as follows:
    IF tree4 IS INITIAL.
    * create container for alv-tree
      l_tree_container_name = 'TREE4'.
      CREATE OBJECT l_custom_container
        EXPORTING
          container_name              = l_tree_container_name
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
    * create tree control
      CREATE OBJECT tree4
        EXPORTING
          i_parent                    = l_custom_container
          i_node_selection_mode       = cl_gui_column_tree=>node_sel_mode_multiple
          i_item_selection            = 'X'
          i_no_html_header            = 'X'
          i_no_toolbar                = 'X'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7.
    * create hierarchy
      CALL METHOD tree4->set_table_for_first_display
        EXPORTING
          is_layout       = s_layo
        CHANGING
          it_sort         = it_sort
          it_outtab       = it_final
          it_fieldcatalog = it_fieldcat.
    ELSE.
      CALL METHOD tree4->refresh_table_display
        EXPORTING
          it_sort           = it_sort
        EXCEPTIONS
          program_error     = 1
          failed            = 2
          cntl_system_error = 3
          others            = 4
      IF sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endif.

  • Double click on the node,ALV tree, subscreen

    Hi,
    I have a small requirement in ALV Tree
    left side i get a tree and when i double click on one of it , i'm trying to display the subscreen. even though i am setting the paramaters to the screen but i'm unable to get those values in the subscreen.
    example
    Name        Description                                                subscreen 0101
    xyz           xyz desc (double click on this)                  name    = XYZ
    ABC         abs desc                                                      descrip = xyz desc
    This is what the requirement is:
    Please help me out with the solution.
    Bhavana

    Hi Bhavana,
    Register your double click event in the ALV Tree program. Then call the respective subscreen using sy-ucomm value.
    IF NOT r_ucomm IS INITIAL.
        CASE r_ucomm.
          WHEN '&F03'.
            SET SCREEN 100.
            LEAVE SCREEN.
    endif.
    Refer the below code for setting the registering the event.
      CALL METHOD tree->get_registered_events
        IMPORTING
          events = l_events_s.
      l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
      APPEND l_event TO l_events_s.
      CALL METHOD tree->set_registered_events
        EXPORTING
          events                    = l_events_s
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      CREATE OBJECT l_events_receiver.
      SET HANDLER l_events_receiver->handle_item_click FOR tree.
    CLASS lcl_events_receiver DEFINITION.                       "#EC *
      PUBLIC SECTION.
        METHODS:
        handle_item_click FOR EVENT item_double_click OF cl_gui_alv_tree
            IMPORTING node_key fieldname.
    ENDCLASS.                    "lcl_handle_events DEFINITION
    CLASS lcl_events_receiver IMPLEMENTATION.
      METHOD handle_item_click.
        PERFORM employee_data USING node_key fieldname.
        CALL SCREEN 300.
      ENDMETHOD.                    "HANDLE_ITEM_DOUBLE_CLICK
    ENDCLASS.                    "lcl_events_receiver IMPLEMENTATION
    Thanks.
    Ganesh R K
    Edited by: Ganesh.rk83 on Jun 23, 2011 11:21 AM

  • PAI is NOT trigger for ALV in subscreen

    Hi, All
    Currently, I am using ALV object to output ALV report in one SUBSCREEN.
    When I double-click, the PAI is not trigger. But just go into double-click event directly.
    However, If I use AVL function or object to output in NORMAL screen, PAI is trigger after double click.
    SY-UCOMM is like %_GC 920 3

    Hello Ocean
    The ALV grid is a special control in terms that all the events are already pre-registered at the control (method SET_REGISTERED_EVENTS). This means that as soon as you define an event handler method and SET HANDLER for the corresponding event your application can deal with this event.
    You can register all events of the ALV grid as application events (i.e. after any event handling PAI of the screen is triggered) at the CONSTRUCTOR method:
    I_APPL_EVENTS = 'X'
    However, I prefer to use method CL_GUI_CFW=>SET_NEW_OK_CODE because it offers more flexibility to me:
    Only those event where I need to trigger PAI after event handling are affected
    By setting a new ok-code I can trigger a specific logic at PAI
    Regards 
      Uwe

  • Issue while opening websites from module pool subscreen.

    I have three subscreens which do open while user clicks a radio button on the main screen . Now in two of the subscreens,there are two text fields which contain url of two websites . When i am setting a GUI status when sy-pfkey/sy-ucomm = 'PICK' , they are getting set but inside the PAI of subscreens when I am writing :-
    When sy-ucomm = 'PICK'.
    call fn 'call_browser'.
    The websites don't open  because the PICK fn code is not getting triggered.
    In two of the subscreens ,the website addresses / urls will be fixed whereas in the third subscreen,the website address comes from  field "tline" .
    So I can't handle the scenario through buttons and assigning function codes to them.
    Pls advise.

    Dear Subankar,
    For that  screen filed select option like drill down with key.
    Regards,
    Madhu.

  • Can i add more than one subscreen to me21n / me22n ?

    i was implement one subscreen in the past with BAdI
    ME_GUI_PO_CUST .
    now the customer ask for one more , is it possible ?
    in  "IF_EX_ME_GUI_PO_CUST~SUBSCRIBE"
    you have code  :
    *class definition
      ls_subscriber-name = subscreen1.
    the dynpro number to use
      ls_subscriber-dynpro = '0001'.
    the program where the dynpro can be found
      ls_subscriber-program = 'SAPLYMEPOBADIEX'  ." 'SAPLMEPOBADIEX'   "
    each subscreen needs his own DDIC-Structure
      ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.   " MEPO_BADI_STRUCT
    a label can be defined
      ls_subscriber-label = text-001.
    the position within the tabstrib can be defined
      ls_subscriber-position = 9.
    is it possible to make another subscreen  ?

    Hi,
    I think that you can only create one subscreen. This BADI is similar to the user exit MM06E005.
    Vani

  • How to use existing WSP file of reusable workflow and create sanbox solution?

    Hello,
    I have to migrate the SharePoint Designer 2013 workflows from Development environment to Production environment. So, I am following the process which is mentioned in this blog:
    http://sharepointyankee.com/2010/12/11/options-for-deploying-reusable-workflows-in-sharepoint-2010/
    And it is working also, but problem is that; this visual studio solution is getting deployed as a Farm Solution and I wanted to deploy it as a sandbox solution. 
    Is there any way to achieve this?
    I have also tried one more way which is:
    Create SharePoint Custom Workflow Project as a sandbox solution in Visual studio.
    Get WSP file from development site (as mentioned in above referenced blog)
    Open WSP file and copy the content to Visual Studio Created project
    But this solution is also not working; "Feature is not getting deployed as sandbox solution" error is occurring.
    Can anyone please help me on the same?
    Thanks,
    Asim

    Hi,
    When you export SPD workflow, it will be a sandbox solution only, you are not required to configure further.
    Just import the workflow into Visual Studio, and make the changes that are required. you are good here.
    you can set the scope attribute in your WSP feature element.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • How to package a page template as a reusable component??

    Hello, i need to package a page template as a reusable component, this template has images and lot of parameters.
    Any suggest?

    carlson.steve wrote:
    So I have done as you suggested and created a new and separate application to hold not only my jsf template files but also my trinidad-config and trinidad-skins xml files, packaged it into an ADF library Jar and then added that jar to the libraries of my forward facing public app but still can't get the public app to see either the jsf template or trinidad skinning files... what am I doing wrong here?Hi,
    I suggest that you verify that both pagetemplate-metadata.xml and oracle.adf.common.services.ResourceService.sva service resources file are packaged in the META-INF directory of your Template Project ADF Library JAR.
    Cheers,
    Nick

  • Hiding a Complete Subscreen in a main Screen

    HI All,
             I have a req in which there is 5 subscreens present in one main screen. My issue is i want to hide a complete Subscreen based on 1checkbox present in that mainscreen itself.
    After checking that checkbox user will be pressing ENTER. After that i need to hide some of the subscreens.
    Thanks in advance,
    Shyam

    HI,
    You can check for the subscreen_area that you use to put the subscreen and in the PBO of the main screen you can avoid calling this subscreen or you can hide the subscreen area by making SCREEN-ACTIVE=0 for the subscreen area.
    For the check box you can set some fcode and in the PAI you can set some global flag which you need to check in PBO and then deactive the subscreen area.
    PAI module.
    if ok_code is <your check box>.
    if check_box = 'X'.
    global_flag = 'X'.
    else.
    clear global_flag.
    endif.
    PBO Module.
    if global_flag = 'X'.
    loop at screen.
    if screen-name = 'SUBSCREEN_AREA'.
    screen-active= 0.
    modify screen.
    endloop.
    endif.
    Regards,
    Sesh

  • Add button to BP subscreen Identification Numbers

    Hi gurus,
    in transaction BP there is a tab called Identification. On this tab a subscreen area Identification Numbers exists which contains a screen (SAPLBUD0 - 1520). We want some added logic on the screen by means of a new button. I think it is not possible to add a button because the screen is hard-coded, so what I thought should happen is that a copy of the screen is made including the new button.
    And now my problem occurs, how do I replace the former screen(SAPLBUD0 - 1520) with the new screen on that particular screen area?
    kind regards,
    Wim van Erp

    I've found it. trx. BUS3 contains the specific screen.
    regards.

Maybe you are looking for