Calling Subscreen of other program

Hi Experts
  From my module pool program, I am calling a subscreen belonging to a different program(Function Group). Can you please let me know how I can capture the changes done to the subscreen fields in the PAI of my main screen? I tried declaring global data in my main module program with the same names as subscreen fields, but it is not solving my purpose.
Thanks
Neo

Hi Neo
Please take a look on below Code
For Example
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABSTRIP 'TAB_STRIP'
  MODULE TAB_STRIP_ACTIVE_TAB_SET.
  CALL SUBSCREEN <Sub Screen Area>
    INCLUDING <Program> <Screen No>.
* MODULE STATUS_0100.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABSTRIP 'TAB_STRIP'
  CALL SUBSCREEN <Sub Screen Area>
  MODULE TAB_STRIP_ACTIVE_TAB_GET.
* MODULE USER_COMMAND_0100.
MODULE INPUT100.
this code is in Flow Logic,
u need to write ur code also in Flow logic
in PBO Flow Logic
CALL SUBSCREEN <Sub Screen Area>
    INCLUDING <Program> <Screen No>.
in  PAI flow logic
CALL SUBSCREEN <Sub Screen Area>
Thanks
Surendra

Similar Messages

  • How to store Connection object and call it from other programs.

    Hi,
    I am trying to connect to the database, store the connection object and use this connection object from other standalone java programs.
    Can any one tell me how to do this? I've tried in the following way:
    In the following program I am connecting to the database and saving the connection object in a variable.
    public class GetKT2Connection {
       public static void main(String[] args) {
          String url = "jdbc:odbc:SQLDsn;
          String dbUser = "sa";
          String dbPwd = "sa";
          Connection kt2conn = Connection connection = java.sql.DriverManager.getConnection(url, dbUser, dbPwd);
          if(kt2conn == null) {
             System.out.println("Database Connection Failure!");
          else {
             System.out.println("Connected to Database...");
         GetKTConnectionObj.storeKT2ConnectionObj(kt2conn);
    } Here is the program to save connection object in a variable.
    public class GetKTConnectionObj {
       static Connection kt2Connection = null;
       public static void storeKT2ConnectionObj(Connection conn) {
       kt2Connection = conn;
       public static Connection getKT2ConnectionObj() {
       try {
          return kt2Connection;
       catch(Exception e){
          System.out.println(e);
      return null;
    }Now from the following code I am trying to get the connection object that is stored. But this is throwing NullPointerException.
    public class Metrics_Migration {
      public static void main(String args[]) {
         try {
        java.sql.Connection connection_1 =   GetKTConnectionObj.getKT6ConnectionObj();
         catch(Exception e){
    }

    kt2Connection is null. You need to store it first, to make it not null. Otherwise it will stay null forever. And why on earth are you trying to do this THIS way?
    If you are running the two applications separately, it wont work either.

  • To call subscreen in another screen

    hi
    How to call a subscreen if i check certain checkbox.please help

    Hi,
    In screen painter(SE51) choose the subscreen tool button and draw a subscreen area on the screen,this subscreen area will be used to hold the subscreen at run time.To make a subscreen select the attribute screen type as subscreen and specify the size of the subscreen according to the size of the subscreen area in which it will be placed.
    We use ABAP statement to embed and start the flow logic of the subscreen area in the PBO of a screen. A subscreen can contain another subscreen.
    CALL SUBSCREEN subscreen_area INCLUDING program screen_number.
    A similar call should also exist in PAI of screen.It will also call the PAI modules of the subscreen and will transfer data from subscreen to ABAP program.
    CALL SUBSCREEN subscreen_area.
    open T.code : ABAPDOCU
    path:BC ABAP Prg ->ABAP User dialog ->Screen ->Complex screen element - >Subscreen.
    You will get sample prg, Run it.You can get lot of sample prg in T.Code ABAPDOCU.
    Regards,
    Raj.

  • How to find the value of a variable in other program

    How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
    Regards
    Vin

    Hi Vinayak,
         you will be having your first program values in internal table or some variables,
        when you are calling the second program you wii use like this,
        SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
                           WITH s_emp(second program select-options)   IN t_emp(first program variables)
                           WITH p_chk   EQ t_chk
                           WITH p_r1    EQ t_r1
                           WITH p_month EQ t_month
                           WITH s_cust1 IN t_cust1
                           WITH p_r2    EQ t_r2
                           WITH s_cust2 IN t_cust2
                           WITH s_week  IN t_week
                           AND RETURN.
    you have pas like this to get your first program details.

  • Programming to call other programs

    I am in need of direction as I am unable to find any help on my current problem. I am developing a program that will create a database of triples from an xml document. My use of existing programs such as 4suite's '4rdf' which is called by the command prompt has left me with the issue of how do you program in java, to call other programs and/or the command line. I need to pass in arguments and execute the program from within one java program. Is this possible? Help is urgently required. Please help. Cheers Dave.

    Allways happy to assist my follow programmers, this is a class I developed (with help from online documents of course) to contain all my executing needs. Note that you need to place these two classes in a package yourself, they are part of quite a complex one where I use them.
    public class Semaphore {
      protected boolean blocked;
      public Semaphore() { blocked = false; }
      public synchronized void waitUntilSignalled() {
           if(blocked == false){
             try {
                    blocked = true;
                    wait();
                } catch(  InterruptedException e ) { }
      public synchronized void setSignalled() {
        if (blocked == true){
              blocked = false;
              notifyAll();
         public static class ExecStreamThread extends Thread
             InputStream is;
             OutputStream os;
             Semaphore sem;
             public ExecStreamThread(InputStream is, OutputStream redirect)
                 this.is = is;
                 this.os = redirect;
                 sem = null;
             public ExecStreamThread(InputStream is, OutputStream redirect, Semaphore theSem)
                 this.is = is;
                 this.os = redirect;
                 sem = theSem;
             public void run()
                  try
                       PrintWriter pw = pw = new PrintWriter(os);
                       InputStreamReader isr = new InputStreamReader(is);
                       BufferedReader br = new BufferedReader(isr);
                       String line=null;
                       while ( (line = br.readLine()) != null)
                                pw.println(line);
                           pw.flush();
                  } catch (IOException ioe){
                      // don't have to do anything, the parent thread will have found out the process errored
                  // run is complete, signal the semaphore
                  if(sem != null){
                       sem.setSignalled();
         public static final int OSTYPE_WINDOWS = 1;
         public static final int OSTYPE_WINNT = 2;
         public static final int OSTYPE_WINCE = 3;
         public static final int OSTYPE_LINUX = 4;
         public static final int OSTYPE_MAC = 5;
         public static final int OSTYPE_SOLARIS = 6;
         public static final int OSTYPE_NETWARE = 7;
         public static final int OSTYPE_OS2 = 8;
         public static final int OSTYPE_UNKNOWN = 9;
         private static int type = OSTYPE_UNKNOWN;
         private ExecUtil()
              @return an integer identifying the OS (one of the OSTYPE constants)
         public static int getOs()
              if(type == OSTYPE_UNKNOWN){
                   String osname = System.getProperty("os.name").toLowerCase();
                   if(osname.indexOf("windows") != -1){
                        if(osname.indexOf("nt") != -1 || osname.indexOf("2000") != -1 || osname.indexOf("xp") != -1){
                             type = OSTYPE_WINNT;
                        } else if(osname.indexOf("ce") != -1){
                             type = OSTYPE_WINCE;
                        } else {
                             type = OSTYPE_WINDOWS;
                   } else if(osname.indexOf("linux") != -1 || osname.indexOf("bsd") != -1){
                        type = OSTYPE_LINUX;     
                   } else if(osname.indexOf("mac os") != -1 || osname.indexOf("macos") != -1){
                        type = OSTYPE_MAC;
                   } else if(osname.indexOf("solaris") != -1){
                        type = OSTYPE_SOLARIS;     // could also be old freebsd version
                   } else if(osname.indexOf("netware") != -1){
                        type = OSTYPE_NETWARE;
                   } else if(osname.indexOf("os/2") != -1){
                        type = OSTYPE_OS2;
                   } else {
                        type = OSTYPE_UNKNOWN;     
              return type;
              @return the prefix to execute a shell command. For example "command /c " to execute a shell command on windows9X machines.
         public static String getShellString()
                 String appendStr = "";
                 int ostype = getOs();
                 if(ostype == OSTYPE_WINDOWS){
                      appendStr = "command /c ";
                 } else if(ostype == OSTYPE_WINNT || ostype == OSTYPE_WINCE){
                      appendStr = "cmd /c ";     
                 } else if(ostype == OSTYPE_LINUX || ostype == OSTYPE_MAC){
                      appendStr = "/bin/sh -c ";     
                 } // add other shell executers
                 return appendStr;
         /** execute a command and ignore any output it generates (output is sent to System.out and System.err).
              It is valid to pass a command containing multiple parameters
              @param command the command to execute
              @return the exit code the process generated
         public static int exec(String command)
              throws IOException
              return exec(command, false, System.out, System.err);
         /** execute a (shell) command and ignore any output it generates (output is sent to System.out and System.err).
              It is valid to pass a command containing multiple parameters.
              NOTE: only windows (command), winnt (cmd) and linux (sh) shell executions are supported.
              @param command the command to execute
              @param shellCommand should the command be handled as an internal shell command?
              @return the exit code the process generated
         public static int exec(String command, boolean shellCommand)
              throws IOException
              return exec(command, shellCommand, System.out, System.err);
         /** execute a (shell) command and catch the output it generates.
              It is valid to pass a command containing multiple parameters.
              NOTE: only windows (command), winnt (cmd) and linux (sh) shell executions are supported.
              @param command the command to execute
              @param shellCommand should the command be handled as an internal shell command?
              @param output the output stream to send the output of the process to (output is handled as textual data)
              @return the exit code the process generated
         public static int exec(String command, boolean shellCommand, OutputStream output)
              throws IOException
              return exec(command, shellCommand, output, System.err);
         /** execute a command and catch the output it generates.
              It is valid to pass a command containing multiple parameters.
              @param command the command to execute
              @param output the output stream to send the output of the process to (output is handled as textual data)
              @return the exit code the process generated
         public static int exec(String command, OutputStream output)
              throws IOException
              return exec(command, false, output, System.err);
         /** execute a command and catch the output (stdout) and errors (stderr) it generates.
              It is valid to pass a command containing multiple parameters.
              @param command the command to execute
              @param output the output stream to send the output of the process to (output is handled as textual data)
              @param error the output stream to send the error output of the process to (output is handled as textual data)
              @return the exit code the process generated
         public static int exec(String command, OutputStream output, OutputStream error)
              throws IOException
              return exec(command, false, output, error);
         /** execute a command and catch the output (stdout) and errors (stderr) it generates.
              It is valid to pass a command containing multiple parameters.
              NOTE: only windows (command), winnt (cmd) and linux (sh) shell executions are supported.
              @param command the command to execute
              @param shellCommand should the command be handled as an internal shell command?
              @param output the output stream to send the output of the process to (output is handled as textual data)
              @param error the output stream to send the error output of the process to (output is handled as textual data)
              @return the exit code the process generated
         public static int exec(String command, boolean shellCommand, OutputStream output, OutputStream error)
              throws IOException
             if(shellCommand == true){
                  String appendStr = getShellString();
                  command = appendStr + command;
             String[] realcommand;
             if(command.indexOf(" ") != -1){
                  realcommand = command.split(" ");
             } else {
                  realcommand = new String[1];
                  realcommand[0] = command;     
             try{
                  Process ls_proc = Runtime.getRuntime().exec(realcommand);
                   ExecStreamThread execOutput;
                   ExecStreamThread execError;
                   execOutput = new ExecStreamThread(ls_proc.getInputStream(), output);
                   execOutput.start();
                   execError = new ExecStreamThread(ls_proc.getErrorStream(), error);
                   execError.start();
                 int exitvalue = ls_proc.waitFor();     
                   if(output != null) { output.flush(); }
                   if(error != null) { error.flush(); }
                   return exitvalue;
              } catch(Exception e){
                   throw new IOException(e.getMessage());
         public static void main(String[] args)
              try{
                   int code = ExecUtil.exec("javac test.java", System.out, System.err);
                   System.out.println("Exit code was : " + code);
                   code = ExecUtil.exec("java test", System.out, System.err);
                   System.out.println("Exit code was : " + code);
              } catch(IOException e){
                   System.out.println("failed due to exception: " + e);
              try{
                   int code = ExecUtil.exec("dir/w", true, System.out, System.err);
                   System.out.println("Exit code was : " + code);
              } catch(IOException e){
                   System.out.println("failed due to exception: " + e);
    }

  • How can we call creen of one program from some other dynpro Program

    Hi,
    Is it possible to call a screen of one program from some other program as pop up or full scree.
    please give you input if it is possible.
    Thanks in advance.
    Thanks and Regards,
    Praveen.

    Hi,
    But is there is any function module through we can call screen of some other program. PLease let me know if you are aware of that.
    Thanks

  • Call other programs from Java

    There is this command line program I want to wrap with a Java class in order to make it available so that it can be transparently called.
    How can I call or execute external programs/commands from JAVA...
    is not native code that I want to run...
    Thank you

    Runtime.getRuntime().exec("your command line")... you could read more about it in the API documentation.

  • Calling subscreen on click of radio button

    Hi,
    I am creating a module pool program , in which on click of a radio butto to 'YES' a subscreen should appear ( on the main screen) with few fields so that the user can input values of it.
    But I am having proble in calling the subscreen in PAI event.Actually I think it should be something like this
    Module user_command.
      case sy-ucomm.
       when rb_yes = 'X'
        { CALL SUBSCRREN CODE
    ENDIF.
    Can this be done? I f yes how? I only know how to call subscreen in PBO, but the syntax for calling subscrren is different in PAI i think.

    Hi,
    Try doing this.
    This is your flow logic in the main screen  to call the Subscreen's PBO
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0110.
    CALL SUBSCREEN TAB1_REF1 INCLUDING 'ZTRIAL' '0111'.
    In the PAI of the main screen,
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0110.
    CALL SUBSCREEN TAB1_REF1.
    Assign a function code to your radio button.
    Layout -> Attributes -> Function Code
    In the TOP include,
    DATA: v_dynnr type sy-dynnr.
    In module USER_COMMAND_0110.
    if p_rad = 'X'.
       v_dynnr = '0111'.
    else.
      v_dynnr =  ' '
    endif.
    You can check this for your reference
    [http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dbabfe35c111d1829f0000e829fbfe/content.htm]

  • Call subscreen

    Hi
    CALL SUBSCREEN is used only in  the flow logic but not in the actual program. I want to know the reason why it is not used in the  actual program. please help me.
    POINTS WILL BE GIVEN.
    thanks,
    S.Gangi Reddy.

    hi,
    Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.
    Subscreens are screens which can be embeded into another screen. These can be used and created with both selection screen as well as screen painter.
      They differ from normal screens in the way that that they don't have OK_CODE field of ther own and there PBO and PAI transfer data to the ABAP program in which these screens were created and the cannot have module calls which change status or leave screen and module call AT EXIT-COMMAND AND E type function codes.
    Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.
    In screen painter(SE51) choose the subscreen tool button and draw a subscreen area on the screen,this subscreen area will be used to hold the subscreen at run time.To make a subscreen select the attribute screen type as subscreen and specify the size of the subscreen according to the size of the subscreen area in which it will be placed.
    We use ABAP statement to embed and start the flow logic of the subscreen area in the PBO of a screen. A subscreen can contain another subscreen.
    Hope this answers you, Do reward.
    Edited by: Runal Singh on Feb 8, 2008 5:36 PM

  • Facing problem with call subscreen area in standard infotype

    Dear SAP Guru's,
    I have enhanced standard infotype 0185 from PM01, in assign enhancement tab it create multiple screens ,
    my program name ZP018500, screen number 0200 generated,
    on  0200 screen i need to display two subscreens tfor that
    i have created subscreen area  on srcreen 0200 which is already a subscreen.
    and i am calling two subscreen 0201 and 0202 on that  subscreen area.
    while creating entries for 0185 infotype  my screen keep going in continious loop for call subscreen statement on 0200 screen number.
    roll in fail, session terminated error coming because of this.
    is it correct to create subscreen area on subscreen and calling subscreen on that.
    Guide me to solve the issue.
    Thanks and Regards,
    Syed

    Dear Gopal,
    Thanks for the reply,
    But i can't make 0200 screen as normal screen because it is automatically generated by system while enhancing the standard infotype,
    Please let me know any other solution.
    Regards,
    Syed Taj

  • How to call subscreen and provide selection screen in subscreen

    Hi experts,
    please anybody suggest me how to call subscreen in module pool screen and provide selection screen in that sub screen.
    please tell me how to design this subscreen in module pool screen.
    adevanced
    thank you
    regards
    vijay krishna

    Hi,
    If you need to have select-options in module pool then follow these steps:-
    To implement select-options in module pool, first design two input/output fields (textboxes) for the low and high value of the field and name it as <field_name>-low and <field_name>-high.
    Create a button next the high value textbox and keep its sutaible function code.
    Now, to call the pop-up on this button click, we have to call the same pop-up as in standard      select-options. For this we have to use the function module COMPLEX_SELECTIONS_DIALOG.
    For this FM we have to pass the table name, field name and the range for the field whose range needs to fill when using the popup screen.
    To pass the table name and field name details into the FM, we have to declare as:
    DATA : tab TYPE rstabfield.
    This structure comprises of table name and field name.
    Pass these details in program as:-
    u2003
    *-- clear table and field details
      CLEAR tab.
    *-- append for range depending on the button clicked
    *   either for sales order or line item
      CASE sy-ucomm.
        WHEN 'VBELN'.
          tab-tablename = 'VBAP'.
          tab-fieldname = 'VBELN'.
    *--To call the popup screen for the field use code:-
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
        EXPORTING
          title             = text-002  u201Ctitle text
          text              = ' '
          signed            = 'X'
          search_help       = v_shelp u201Csearch help if required
          tab_and_field     = tab u201Ctable and field name details
        TABLES
          range             = r_vbeln u201Crange for the associated field
        EXCEPTIONS
          no_range_tab      = 1
          cancelled         = 2
          internal_error    = 3
          invalid_fieldname = 4
          OTHERS            = 5.
    Hope this helps you.
    Regards,
    Tarun

  • Subscreen in dialog programming

    hi
    in my dialog programming i am calling a subscreen .
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
    SELECT-OPTIONS: s_lgort FOR mard-lgort NO INTERVALS.
    SELECTION-SCREEN END OF SCREEN 2000.
    in PBO
    CALL SUBSCREEN SUBSCREEN_2000  INCLUDING SY-REPID '2000'.
    now my requirement is i want to control the display of the subscreen.
    because my screen look like this, after st location lot of spaces then the input box appears.
    plant          _______
    sales org    _______
    division       _______
    st location               _________         ->(multple selection)
    now i want to display the subscreen equal space to plant sales org etc.
    plant          _______
    sales org    _______
    division       _______
    st location  _______      ->(multple selection)
    How to control the display of the subscreen.
    Thanks,
    Madhu

    Hi madhu,
    i think no need to control the display in your subscreen.if you placed the fields in the screen directly from database please check the field length of the label st location, noramally this will take the size of corresponding  table field.if you dont want the full size reduce the size of the label in screen painter.
    reward if helpful
    shibu

  • Can we call sceen of one program into another?

    Hi ABAPers,
      I wish to know whether, is it possible to call the screen of one program through another program? I know, calling a subroutine of a program from another is possible but i want to know whether calling screen of one program from another is possible or not?
      Also if its possible then how?
    Regards,
    Sonu.

    Hi,
    We can call the subscreens ...
    CALL SUBSCREEN <area> INCLUDING [<prog>] <dynnr>.
    The screen of a subscreen that you call is placed in the subscreen area <area> on the main screen.
    If you do not specify a program <prog>, the system uses a screen from the current ABAP program. If you do specify a program <prog>, the system uses a screen from the program <prog> for the subscreen. This program is treated in the same way as an external subroutine call. In other words, it is loaded into the program group of the calling program, or, if it is a function group, as its own program group in the same internal session as the calling ABAP program.
    Regards
    Sudheer

  • Error in call subscreen..   CALL SUBSCREEN ref1.

    Hi Guru's
    i am trying to use tabstrip. initially i have created the program using tabstrip control wizard. but now the same code i am writing using tabstrip control.
    But while clicking 2nd tab i am getting errot as " Invalid field format (screen error)"
    my code is
    REPORT  ytest2.
    DATA: g_tabst_act TYPE sy-ucomm.
    CONTROLS: tabstrip_control TYPE TABSTRIP.
    DATA: BEGIN OF tabst,
          prog    TYPE sy-repid VALUE 'YTEST2' ,
          screen  TYPE sy-dynnr,
          press_t TYPE sy-ucomm VALUE 'TAB2',
          END OF tabst.
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ST'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
        WHEN OTHERS.
          tabst-press_t = sy-ucomm.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  ACTIVATE_TABSTRIP  OUTPUT
          text
    MODULE activate_tabstrip OUTPUT.
      g_tabst_act = tabst-press_t.
      tabstrip_control-activetab = g_tabst_act.
      CASE g_tabst_act.
        WHEN  'TAB1'.
          tabst-prog   = sy-repid.
          tabst-screen = '1001'.
        WHEN  'TAB2'.
          tabst-prog   = sy-repid.
          tabst-screen = '1002'.
      ENDCASE.
    ENDMODULE.                 " ACTIVATE_TABSTRIP  OUTPUT
    screen flow logic is
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE activate_tabstrip.
      CALL SUBSCREEN ref1 INCLUDING tabst-prog tabst-screen.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
      CALL SUBSCREEN ref1.
    Element list is..
    +           TABSTRIP_CONTROL     Tab     1     1     78     78     23
    -           TAB1     Push     1     1     4     4     1
    -           TAB2     Push     1     2     4     4     1
    -           REF1     Subsc     3     2     73     73     20
                                                                                    OK     0     0     20     20     1      OK
    Can you please help me why i am geting this error.

    Hi,
    Check have you done this .....
    "As this is done for you by the wizard, but if you are creating tab control manually you must do this....
    *&SPWIZARD: OUTPUT MODULE FOR TS 'DEAL_TABS'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: SETS ACTIVE TAB
    MODULE DEAL_TABS_ACTIVE_TAB_SET OUTPUT.
      DEAL_TABS-ACTIVETAB = G_DEAL_TABS-PRESSED_TAB.
      CASE G_DEAL_TABS-PRESSED_TAB.
        WHEN C_DEAL_TABS-TAB1.
          G_DEAL_TABS-SUBSCREEN = '0101'.
        WHEN C_DEAL_TABS-TAB2.
          G_DEAL_TABS-SUBSCREEN = '0102'.
        WHEN C_DEAL_TABS-TAB3.
          G_DEAL_TABS-SUBSCREEN = '0103'.
        WHEN C_DEAL_TABS-TAB4.
          G_DEAL_TABS-SUBSCREEN = '0104'.
        WHEN OTHERS.
    *&SPWIZARD:      DO NOTHING
      ENDCASE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TS 'DEAL_TABS'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GETS ACTIVE TAB
    MODULE DEAL_TABS_ACTIVE_TAB_GET INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN C_DEAL_TABS-TAB1.
          G_DEAL_TABS-PRESSED_TAB = C_DEAL_TABS-TAB1.
        WHEN C_DEAL_TABS-TAB2.
          G_DEAL_TABS-PRESSED_TAB = C_DEAL_TABS-TAB2.
        WHEN C_DEAL_TABS-TAB3.
          G_DEAL_TABS-PRESSED_TAB = C_DEAL_TABS-TAB3.
        WHEN C_DEAL_TABS-TAB4.
          G_DEAL_TABS-PRESSED_TAB = C_DEAL_TABS-TAB4.
        WHEN OTHERS.
    *&SPWIZARD:      DO NOTHING
      ENDCASE.
    ENDMODULE.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Call subscreen from main screen

    Dear all,
    I have a subscreen and from that subscreen i am calling another normal screen using 'call screen' statement. After doing some manipulation in the normal screen i want to go back to the subscreen on clicking 'BACK' button. i tried 'leave to screen' and 'call screen' in PAI of normal screen but it is not working. how to come back to the subscreen again?
    Thanks in advance,
    Aswin.

    Dear Friend,
    You include a subscreen screen using the CALL SUBSCREEN statement in the flow logic of the main screen.
    To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:
    This statement assigns the subscreen screen with number <dynp> to the subscreen area called <area>. With <prog> you must specify the ABAP program in which the subscreen screen is defined. If it does not find a corresponding subscreen screen, a runtime error occurs. The PBO flow logic of the subscreen screen is also included at the same point. This can call PBO modules of the ABAP program in which the subscreen screen is defined. At the end of the subscreen PBO, the global fields from the program are passed to any identically-named screen fields in the subscreen screen. The PBO flow logic of the subscreen screen can itself include further subscreens.
    The name <area> of the subscreen area must be entered directly without inverted commas. You can specify the names <prog> and <dynp> either as literals or variables. If you use variables, you must declare and fill identically-named variables in the ABAP program. The screen number <dynp> must be 4 characters long. If you do not assign a subscreen screen to an area, it remains empty.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.
    find the Below Example Code.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: number1(4) TYPE n VALUE '0110',
          number2(4) TYPE n VALUE '0130',
          field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.
    CALL SCREEN 100.
    MODULE status_100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE fill_0110 OUTPUT.
      field = 'Eingabe 1'(001).
    ENDMODULE.
    MODULE fill_0120 OUTPUT.
      field = field1.
    ENDMODULE.
    MODULE fill_0130 OUTPUT.
      field = 'Eingabe 2'(002).
    ENDMODULE.
    MODULE fill_0140 OUTPUT.
      field = field2.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE save_ok INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
    ENDMODULE.
    MODULE user_command_0110 INPUT.
      IF save_ok = 'OK1'.
        number1 = '0120'.
        field1 = field.
        CLEAR field.
      ENDIF.
    ENDMODULE.
    MODULE user_command_0130 INPUT.
      IF save_ok = 'OK2'.
        number2 = '0140'.
        field2 = field.
        CLEAR field.
      ENDIF.
    ENDMODULE.
    MODULE user_command_100 INPUT.
      CASE save_ok.
        WHEN 'SUB1'.
          number1 = '0110'.
        WHEN 'SUB2'.
          number1 = '0120'.
          CLEAR field1.
        WHEN 'SUB3'.
          number2 = '0130'.
        WHEN 'SUB4'.
          number2 = '0140'.
          CLEAR field2.
      ENDCASE.
    ENDMODULE.
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE status_100.
      CALL SUBSCREEN: area1 INCLUDING sy-repid number1,
                      area2 INCLUDING sy-repid number2.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE save_ok.
      CALL SUBSCREEN: area1,
                      area2.
      MODULE user_command_100.
    The screen flow logic of subscreen screens 110 and 130 is:
    PROCESS BEFORE OUTPUT.
      MODULE fill_0110|0130.
    PROCESS AFTER INPUT.
      MODULE user_command_0110|0130.
    The screen flow logic of subscreen screens 120 and 140 is:
    PROCESS BEFORE OUTPUT.
      MODULE fill_0120|0150.
    PROCESS AFTER INPUT.
    When you run the program, a screen appears on which subscreens 110 and 130 are displayed. The pushbuttons on the main screen allow you to choose between two subscreen screens for each screen area. The pushbuttons on the subscreens allow you to transfer the data from subscreens 110 and 130 to subscreens 120 and 140.
    Since the same field name FIELD is used on all subscreens, the identically-named ABAP field is transferred more than once in each PBO and PAI event of the main screen. For this reason, the values have to be stored in the auxiliary fields FIELD1 and FIELD2 in the ABAP program.
    The pushbuttons on the subscreen screens have different function codes, and they are handled normally in an ABAP field. If the function codes had had the same names, it would again have been necessary to use auxiliary fields.

Maybe you are looking for

  • How can I execute a command after kernel-upgrade/mkinitcpio

    Because of the archlinux specific kernelnaming-policy there's a problem when using grub2. The created menu looks nasty because grub-mkconfig can't find the proper kernel-version. (Bugreport: https://bugs.archlinux.org/task/25453) Even if this is fixe

  • My drop down options menu is transparent. Why is this happening & how do I fix it?

    Ever since I've upgraded to Firefox 19 from 18 none of my drop down menus work, they're all completely transparent as you can see in the following screen shot: http://i.imgur.com/PvKyZ6K.png It's this way in every field in which drop down options app

  • Lost the ability to play multiple sounds!

    Since switching to archlinux, the only problem that I am unable solve is the inablity to play multiple sounds.. i had this problem when i first installed archlinux. back then i tried installing pulseaudio and found that cumbersome. eventually went ba

  • Daily Show double download

    I have a multi-pass for the Daily Show on the iTunes Music Store. Recently it downloaded the same episode twice in a row. Will this count as two seperate episodes of my multi-pass?? If so, how can i get refunded? ibook g4 (7/2004)   Mac OS X (10.4.8)

  • Export database from BerkeleyDB to Oracle Database

    Hi, Within the framework of some projetc, for creating reports, I need to export data from BerkeleyDB to Oracle database. How can I do it ?