Text  on  pushbutton

Hi All,
         In my current report i am using ALV TREE by using cl_gui_alv_tree.
in which i have added a pushbutton & added functionality to them ,but i want a text on that push button.
Can anyone help me to get the text on the push button.
Thanks in advance.
Regards,
Tarak

In your method for handling toolbar button do this coding.
"somewhere in class define a method for hadling toolbar
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
                      IMPORTING e_object e_interactive,
"then in implemenation part
  METHOD handle_toolbar.
    DATA: ls_toolbar TYPE stb_button.
" append a separator to normal toolbar
    CLEAR ls_toolbar.
    MOVE 3 TO ls_toolbar-butn_type.
    APPEND ls_toolbar TO e_object->mt_toolbar.
" append an icon to
    CLEAR ls_toolbar.
    MOVE 'INS' TO ls_toolbar-function.        "here goes your funtion code
    MOVE icon_insert_multiple_lines TO ls_toolbar-icon.  "here name of the icon to dsiplay
    MOVE text-tl1 TO ls_toolbar-quickinfo.    "here add your text as quickinfo
    MOVE text-tl2 TO ls_toolbar-text.          "here goes your text on pushbutton
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
  ENDMETHOD.    

Similar Messages

  • How to add dynamic text in pushbutton created on output for ALV oop

    Hi  All,
    If you check BCALV_GRID_05 program, you will get one pushbutton ‘DETAILS’ on menu screen. Same king of pushbutton we have in our object but we need to change the text on pushbutton if the user press it we need to process the records ( we are getting number in one variable) and we need to display as '  DETAILS  no  Records with no error ' on pushbutton.
    Please let me know if any one of you have any solution for this issue.
    Points will be rewarded for helpful ans.
    Thanks
    Minal.

    Hi,
    If u see that program u can see
    METHOD handle_user_command.
    case e_ucomm.
    WHEN 'BOOKINGS'.
    U have to write ur code here to change the button name like the code u have in ur :
    METHOD handle_toolbar.
    MOVE 'Detail'(112) TO ls_toolbar-text.
    This is where u have to change ur text . In place of detail u put ur text and finally Modify the Internal Table and dont append it as in HANDLE_TOOLBAR. If u modify the text is modified, if u append , a new button is created.
    Add this code in WHEN 'BOOKINGS' part of ur code and check
    awrd points if helpful
    Bhupal
    Edited by: Bhupal on Jan 9, 2008 7:36 AM

  • Procedure to display texts of pushbuttons in any language.

    Hi gurus,
    I am having a requirement where i needs to display 'yes', 'No','Cancel' pushbuttons in my window.here iam not able to display the texts in pushbuttons ''yes', 'No','Cancel'  in different languages. even iam logging in german language the pushbuttons are displaying in english only instead of dislplaying in german. please tell me procedure , how to maintain texts in pushbuttons dynamically.
    Points will be rewarded.
    Thanks,
    Kishor.

    Hi kishore,
    1.Do you know how to translate the text elements.
    If not let me explain.
    while calling the function module to popup message ,instead declaring the texts decalre it has text elements .
    Example :CALL FUNCTION 'POPUP_TO_DECIDE'
      EXPORTING
       DEFAULTOPTION           = '1'
        textline1                  = text-t06
        text_option1            = text-t07
        text_option2            = text-t08
        titel                        = text-t09
       START_COLUMN            = 25
       START_ROW               = 6
       CANCEL_DISPLAY          = 'X'
    IMPORTING
       ANSWER                  = gv_answer.
    So now you  want to translate the text elements.
    After creation of text elements in english.
    Go to ABAP EDITOR of that Report.
    In the menu Bar ->GOTO ->Translation
    you will get the popup screen asking for target language to which you have to translate.(default it will be in english where in your case u need to translate german
    you declare there has "DE".
    ->enter
    (*There you can find the all the text elements in english*
    *and you can find it is asking to enter in german (to get the translations go to*
    *http://www.google.com/translate_t?langpair=en|de*)
    Instead of this for you i am giving the descriptions in german.you can use this
    (in german - yes -ja
                      No- Nein
                      cancel-Abbrechen)
    there u select from english to german.(translate it ,copy and paste in the translation of text elements in German). Activate it.
    No you logon to German language you check it .
    This will resolve your problem,if there is any issues reply to it
    Dont forget to reward points

  • Get TEXT OF Pushbutton on selection-screen

    HI ,
       How can i get the name of the pushbutton on the selection-screen.

    Dear Arun,
    First of all Thanks for giving me points for your 'Time Query'.
    It was my first inauguration in sdn.
    Regarding this 'Button Name'  Query,
    It seems to me that your problem is still not solved.
    All the answers provided do 'Something Else'
    and your 'Real Questions' remains unsolved.
    Its a very good question. I also tried much and
    presently conclude that for achieving this :
    1. Some Discipline in Naming Convention has to be followed.
    2. This discipline is between
        a) Name of button
        b) user command for this button
    3. I have written a sample code in which
        a) 3 buttons appear on screen.
        b) press any one button
        c) then press 'Execute' Button For displaying name
    4. The main logic is to
        a) search by using a 'Loop at Screen'
        b) In the loop, in the name field search the ucomm.
    5. I hope this will be satisfactory till time. If it get
    something more, i will let u know.
    6. Once again please give points if u feel satisfied.
    Thanks & Regards,
    Amit Mittal.
    REPORT abc.
    DATA : btnname(8) TYPE c.
    REQUIRED
    TABLES sscrfields.
    Create Button
    Note : Name Of Button 'U1_HELLO'
            Starts with 'U1' (assigned user command)
            This kind of discipline required
    SELECTION-SCREEN PUSHBUTTON /10(20) u1_hello USER-COMMAND u1.
    SELECTION-SCREEN PUSHBUTTON /10(20) u2_hello USER-COMMAND u2.
    SELECTION-SCREEN PUSHBUTTON /10(20) u3_hello USER-COMMAND u3.
    Init
    INITIALIZATION.
      MOVE 'BUTTON 1' TO u1_hello.
    MOVE 'BUTTON 2' TO u2_hello.
    MOVE 'BUTTON 3' TO u3_hello.
    AT SELECTION-SCREEN.
    *------- Loop at Screen
      LOOP AT SCREEN.
        IF screen-name CS sscrfields-ucomm.
    FOUND
          btnname = screen-name.
        ENDIF.
      ENDLOOP.
    END-OF-SELECTION.
      WRITE:  'BUTTON NAME IS ' , btnname.

  • Need help on text

    How come there are no words on the button.
    like the first button is red but it blank.
    2nd one is blue
    3rd is green but nothing shows.
    How do I fix this?
    import javax.swing.* ;
    import java.awt.* ;
    import java.awt.event.* ;
    public class PushButton
                 extends JComponent {
         *  The state of this PushButton.
       private boolean state ;
         *  The text associated with this PushButton.
       private String text ;
         *  Command string associated with this?
       private String actionCommand ;
         *  The ActionListeners associated with this PushButton
       protected ActionListener listeners  ;  
         *  Construct from text.
       public PushButton(String txt) {
          this.text = txt ;
          this.state = false ;
          this.addMouseListener(new MouseAdapter() {
             public void mousePressed(MouseEvent e) {
                if (state) state = false ;
                else state = true ;
                repaint() ;
                /////////////////////// generate ActionEvent
                if (listeners != null)
                   listeners.actionPerformed(
                      new ActionEvent(PushButton.this,
                                      e.getID() ,
                                      PushButton.this.getActionCommand())) ;
       /*** Set the action command. */
       public void setActionCommand(String ac) {
          this.actionCommand = ac ;
       /*** Get the action command. */
       public String getActionCommand() {
          return actionCommand ;
       /*** Add an action listener to this PushButton. */
       public void addActionListener(ActionListener l) {
          listeners = AWTEventMulticaster.add(listeners,l) ;
       /*** Remove an action listener from this PushButton. */
       public void removeActionListener(ActionListener l) {
          listeners = AWTEventMulticaster.remove(listeners,l) ;
       /*** Return the text on this PushButton. */
       public String getText() {
          return this.text ;
       /*** Set the text on this PushButton. */
       public void setText(String txt) {
          this.text = txt ;
         *  Inquire about the state of this PushButton.
       public boolean getSelected() {
          return this.state ;
         * What dimension does the text have?
       protected Dimension getTextBounds(Graphics g) {
          g.setFont(this.getFont()) ;
          FontMetrics fm = g.getFontMetrics(this.getFont()) ;
          int w = fm.stringWidth(this.text),
              h = fm.getHeight() ;  
          return new Dimension(w,h) ;
         *  Paint the PushButton, depending upon state.
       public void paintComponent(Graphics g) {
          if (!state) paintUp(g) ;
          else paintDown(g) ;
       public void paintUp(Graphics g) {
          Dimension d = this.getSize() ;
          int w = d.width - 1 ;
          int h = d.height - 1 ;
          g.setColor(Color.white) ;
          g.drawLine(0,0,w-1,0) ;
          g.drawLine(0,1,0,h-1) ;
          g.setColor(Color.darkGray) ;
          g.drawLine(1,h-1,w-1,h-1) ;
          g.drawLine(w-1,1,w-1,h-2) ;
          g.setColor(Color.black) ;
          g.drawLine(1,h,w,h) ;
          g.drawLine(w,1,w,h-1) ;
          g.setColor(this.getForeground()) ;
          g.dispose() ;
       public void paintDown(Graphics g) {
          Dimension d = this.getSize() ;
          int w = d.width - 1 ;
          int h = d.height - 1 ;
          g.setColor(Color.black) ;
          g.drawLine(0,0,0,h-1) ;
          g.drawLine(1,0,w-1,0) ;
          g.setColor(Color.darkGray) ;
          g.drawLine(1,1,1,h-2) ;
          g.drawLine(1,1,w-2,1) ;
          g.setColor(Color.lightGray) ;
          g.drawLine(2,h-1,2,h-1) ;  // just one square
          g.drawLine(w-1,1,w-1,1) ;
          g.setColor(Color.white) ;
          g.drawLine(0,h,w,h) ;
          g.drawLine(w,0,w,h-1) ;
                g.dispose() ;
         * Test stub, from command line.
       public static void main(String[] args) {
          PBtest pbt = new PBtest() ;
          pbt.setSize(300,375) ;
          pbt.setLocation(500,500) ;
          pbt.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) ;
          pbt.setVisible(true) ;
    }  // end of PushButton class

    part II of the code
      *    Set up three PushButtons to control color of a panel.
    class PBtest extends JFrame
                implements ActionListener {
       JPanel midpane ;
       PushButton pb1, pb2, pb3 ;
       public PBtest() {
          super.setTitle("PushButton Test (R/G/B)") ;
          midpane = new JPanel() ;
          JToolBar toolbar = new JToolBar() ;
          pb1 = new PushButton("Red") ;
          ///// REMOVE later
          pb1.setPreferredSize(new Dimension(30,30)) ;
          pb1.setActionCommand("red") ;
          pb1.addActionListener(this) ;
          pb1.setForeground(Color.blue) ;
              pb1.setText("red");
          pb2 = new PushButton("Green") ;
          pb2.addActionListener(this) ;
          pb2.setActionCommand("green") ;
          pb2.setForeground(Color.green) ;
              pb2.setText("green");
          pb3 = new PushButton("Blue") ;
          pb3.addActionListener(this) ;
          pb2.setActionCommand("blue") ;
          pb3.setBackground(Color.white) ;
              pb3.setText("blue");
          toolbar.add(pb1) ;
          toolbar.add(new JToolBar.Separator()) ;  
          toolbar.add(pb2) ;
          toolbar.add(new JToolBar.Separator()) ;  
          toolbar.add(pb3) ;
          this.getContentPane().setLayout(new BorderLayout()) ;
          this.getContentPane().add(toolbar, BorderLayout.NORTH) ;
          this.getContentPane().add(midpane, BorderLayout.CENTER) ;
          this.setVisible(true) ;
          this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) ;
       public void actionPerformed(ActionEvent a) { 
          int r = (pb1.getSelected() ? 255 : 0),
              g = (pb2.getSelected() ? 255 : 0),
              b = (pb3.getSelected() ? 255 : 0) ;
          midpane.setBackground(new Color(r,g,b)) ;
          midpane.repaint() ;
    }

  • Download using pushbutton

    Hi,
         I want to download the report  using the pushbutton on the selection screen and not with the execute button..
    can you please suggest me, how to achieve this?
    Thanks in advance,
    Regards,
    mnraju.

    Hello,
    Check this sample code
    SELECTION-SCREEN:
      BEGIN OF BLOCK B1 WITH FRAME TITLE text-000,
        PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
      END OF BLOCK B1.
    INITIALIZATION.
      but1 = 'DOWNLOAD'.
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN 'CLI1'.
    "call FM GUI_DOWNLOAD or the respective FM with which you want to download
       ENDCASE.
    Vikranth

  • ABAP Module pool programming

    Hi all  plz any one send me the doc  for  Module pool programmiing to learn on my own
    thanks & regards
    vamsin

    Hi,
    This is the material find the attachment.
    hi,
    Pool table
    A database table defined in the ABAP Dictionary whose database instance is assigned to more than one table defined in the ABAP Dictionary. Multiple pool tables are assigned to a table pool in the database. The key fields of a pool table have to be character-type fields. The table pool's primary key consists of two fields: TABNAME for the name of a pool table, and VARKEY for the interdependent contents of the key fields in the corresponding pool table. The non-key fields of the pool table are stored in compressed format in their own column, called VARDATA, of the table pool. The only way to access pool tables is by using Open SQL. Joins are not allowed.
    Table Pool
    Database table in the database that contains the data of several pool tables.
    Cluster Table
    Database table defined in the ABAP Dictionary, whose version on the database is not only assigned to one table defined in the ABAP Dictionary. Several cluster tables are assigned to a table cluster in the database. The intersection of the key fields of the cluster tables forms the primary key of the table cluster. The other columns of the cluster tables are stored in compressed form in a single column VARDATA of the table cluster. You can access cluster tables only via Open SQL, and only without using joins.
    Table Cluster
    Database table in the database that contains the data of several cluster tables.
    Note: Never mix up with a database table that has the necessary structure for storing data clusters in database tables and in the shared memory. Those are called INDX-type, with reference to the database table INDX supplied by SAP. Data clusters are groupings of data objects for transient and persistent storage in a selectable storage medium. A data cluster can be processed using the statements IMPORT, EXPORT, and DELETE FROM
    P.Naganjana  ReddyDAY-4 CONTENTS
    SCREEN PAINTER
         ��
    Introduction to Dialog Programming
         ��
    Transactions
    Screens (dynpros)
    ABAP/4 module pool
    Transferring Field Data
    Field Attributes
    Error Dialogs
    Data Consistency
    Dynpro
    Layout
         ��
    Exercise
    TABLE CONTROL
         ��
    Functional scope
         ��
    Programming
         ��
    Attributes
         ��
    EXERCISE
    TABSTRIP CONTROLS
         ��
    Defining the Tabstrip Control Area and Tab Titles
         ��
    Assigning a Subscreen Area to a Tab Title
         ��
    Paging in the SAPgui
         ��
    Programming the Flow Logic
         ��
    EXERCISE
    P.Naganjana  Reddy
    SCREEN WITH FIELDS
    Introduction to Dialog Programming
    Transactions
    A transaction is a program that conducts a dialog with the user. In a typical dialog, the
    system displays a screen on which the user can enter or request information. As a reaction on
    the the user input or request, the program executes the appropriate actions: it branches to the
    next screen, displays an output, or changes the database.
    Example
    A travel agent wants to book a flight. The agent enters the corresponding data on the
    screen. The system either confirms the desired request, that is, the agent can book the flight
    and the customer travels on the desired day on the reserved seat to the chosen destination,
    or the system displays the information that the flight is already booked up.
    To fulfil such requirements, a dialog program must offer:
    _a user-friendly user interface
    _format and consistency checks for the data entered by the user
    _easy correction of input errors
    _access to data by storing it in the database.
    ABAP/4 offers a variety of tools and language elements to meet the requirements stated
    above in the dialog programs.
    Structure of a Dialog Program
    A dialog program consists of the following basic components: 
    P.Naganjana  Reddy
    Screens (dynpros)
    Each dialog in an SAP system is controlled by dynpros. A dynpro (Dynamic PROgram) consists of a screen and its flow logic and controls exactly one dialog step. The flow logic determines which processing takes place before displaying the screen (PBO-Process Before Output) and after receiving the entries the user made on the screen (PAI-Process After Input).
    The screen layout fixed in the Screen Painter determines the positions of input/output
    fields, text fields, and graphical elements such as radio buttons and checkboxes. In addition, the Menu Painter allows to store menus, icons, pushbuttons, and function keys in one or more GUI statuses. Dynpros and GUI statuses refer to the ABAP/4 program that control the sequence of the dynpros and GUI statuses at runtime.
    ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules. The flow logic of a dynpro contains calls of modules from the corresponding module pool. Interactive modules called at the PBO event are used to prepare the screen template in accordance to the context, for example by setting field contents or by suppressing fields from the display that are not needed. Interactive modules called at the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
    All dynpros to be called from within one transaction refer to a common module pool. The dynpros of a module pool are numbered. By default, the system stores for each dynpro the dynpro to be displayed next. This dynpro sequence or chain can be linear as well as cyclic. From within a dynpro chain, you can even call another dynpro chain and, after processing it, return to the original chain.
    Transferring Field Data
    How do I display fields known in an ABAP/4 module on the screen? How do I transfer
    user entries on the screen to the module? In contrast to report programming, you cannot write field data to the screen using the WRITE statement. The system instead transfers data by comparing screen field names with ABAP/4 variable names. If both names are the same, it transfers screen field values to ABAP/4 program fields and vice versa. This happens immediately before and immediately after displaying the screen.
    Field Attributes
    For all screen fields of a dynpro, field attributes are defined in the Screen Painter. If a
    field name in the screen corresponds to the name of an ABAP/4 Dictionary field, the system automatically establishes a reference between these two fields. Thus, a large number of field attributes in the dynpro is automatically copied from the ABAP/4 Dictionary. The field attributes together with data element and domain of the assigned Dictionary field form the basis for the standard functions the dynpro executes in a dialog (automatic format check for screen fields, automatic value range check, online help, and so on).
    Error Dialogs
    Another task of the dynpro processor is to conduct error dialogs. Checking the input data is carried out either automatically using check tables of the ABAP/4 Dictionary or by the ABAP/4 program itself. The dynpro processor includes the error message into the received screen and returns the screen to the user. The message may be context-sensitive, that is, the system replaces placeholders in the message text with current field contents. In addition, only fields whose contents is related to the error and for which a correction may solve the error can accept input. 
    P.Naganjana  Reddy
    Data Consistency
    To keep data consistent within complex applications, ABAP/4 offers techniques for
    optimizing database updates that operate independent of the underlying database and correspond to the special requests of dialog programming. For more information on database updates, see Programming Database Updates.
    Dynpro
    Each screen contains fields used to display or request information. Fields can be text strings, input or output fields, radio buttons, checkboxes, or pushbuttons. The screen of Transaction TZ10 contains only texts and input/output fields.
    An SAP dynpro consists of several components:
    Flow logic: Calls of the ABAP/4 modules for a screen.
    Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen.
    Screen attributes: Number of the screen, number of the subsequent screen, and others.
    Field attributes: Definition of the attributes of the individual fields on a screen.
    SCREEN PAINTER
    You create and edit all components of a dynpro in the Screen Painter. To call the Screen
    Painter, create a dynpro in the Object Browser or double-click on an existing dynpro. The Object Browser then calls the Screen Painter. There, you can enter the flow logic of the new dynpro. By pressing the corresponding pushbutton you can maintain the Screen attributes, branch to the Full Screen-Editor or you choose the pushbutton Field list and change the attributes of fields.
    Screen Attributes
    From the user’s point of view, a transaction is a sequence of screens, displayed one after
    another. How do I determine this sequence? The transactions’s attributes determine the first screen to be displayed. The attributes of the individual dynpros determine which screen to display 
    P.Naganjana  Reddy
    after the current screen. You can also set the number of the subsequent screen dynamically from within the ABAP/4 program.
    Layout
    Choose Fullscreen to go to the screen editor. Here you can determine the layout of the
    screen. For Transaction TZ10, the desired fields can be copied from Table SPFLI of the
    ABAP/4 Dictionary.
    Field Attributes
    To display and modify the attributes of the individual fields (input/output fields, input
    required, possible entries button, invisible, and so on), use the Field list.The fields Company (SPFLI-CARRID) and Flight number (SPFLI-CONNID) are defined as input/output fields. All other fields are used only for outputting the flight data.
    Flow Logic
    The flow control code of a dynpro consists of a few statements that syntactically ressemble ABAP/4 statements. However, you cannot use flow contol keywords in ABAP/4 and vice versa. You enter the flow control code in the Screen Painter as one component of the dynpro.
    The flow control for the dynpro of Transaction TZ10 looks like this:
    PROCESS BEFORE OUTPUT.
    MODULE SET_STATUS_0100.
    PROCESS AFTER INPUT
    MODULE USER_COMMAND_0100.
    The PROCESS statement names the event type for the dynpro and the MODULE statement tells the system which ABAP/4 routine to call for this event. In this example, there is only one MODULE for each event PBO and PAI. However, an event can contain several statements with several keywords. (The flow control language contains only few statement types. The most important are MODULE, FIELD, CHAIN, LOOP, CALL SUBSCREEN.) To display information on the statement syntax in the flow logic, choose Utilities Help on... in the flow logic editor. In the subsequent dialog window, mark Flow logickeyword, enter the name of the desired keyword, and press ENTER.
    ABAP/4 Module Pool
    In the Object Browser, the module pool code belongs to one of the following categories:
    Global fields: data declarations that can be used by all modules in the module pool
    PBO modules: modules that are called before displaying the screen
    PAI modules: modules that are called in response to the user input
    Subroutines: subroutines that can be called from any position within the module pool.
    You use the ABAP/4 Dictionary to store frequently used data declarations centrally. Objects defined in the Dictionary are known throughout the system. Active Dictionary definitions can be accessed by any application. Data defined in the Dictionary can be included in a screen or used by an ABAP/4 program. You declare global data in the TOP module of the transaction, using the TABLES, STRUCTURE, LIKE statements and others. Transaction TZ10 accesses the Dictionary definition of Table SPFLI to provide the desired flight data display. If the TOP include contains the TABLES: SPFLI declaration, all modules in the module pool can access the table fields of 
    P.Naganjana  Reddy
    Table SPFLI. The PAI module USER_COMMAND_0100 checks which pushbutton the user activated (CASE OK_CODE). The Display pushbutton in Transaction TZ10 has the function code
    ‘SHOW’. (For more information on handling function codes, see Processing User Requests). The program then tries to select those records in the SPFLI database that correspond to the data the user entered. The WHERE condition determines matching records by comparing the fields SPFLI-CARRID and SPFLI-CONNID with the database key fields CARRID and CONNID. As soon as a matching record is found, the database transfers all accompanying SPFLI fields to the program table.
    When the screen is displayed again, the complete information appears in the output fields
    of the screen. The system automatically displays these fields, since the ABAP/4 field names SPFLI-CARRID and SPFLI-CONNID are the same as the screen field names.
    In the PBO module STATUS_0100 of Transaction TZ10, the screen 100 receives a GUI status (using SET PF-STATUS) and a GUI title (using SET TITLEBAR):
    SET PF-STATUS ‘TZ0100’.
    SET TITLEBAR ‘100’.
    A GUI status is a subset of the interface elements used for a certain screen. The status
    Comprise those elements that are currently needed by the transaction. The GUI status for a transaction may be composed of the following elements:
    The GUI title is the screen title displayed in the title bar of the window. In contrast to the
    GUI status that can be used for several screens, a GUI title belongs to one screen.To create and edit GUI status and GUI title, you use the Menu Painter. To start the Menu Painter, create a GUI status or GUI title in an object list in the Object Browser (or double-click on an existing status or title).
    Interaction between Dynpro and ABAP/4 Module Pool
    In its most simple form, a transaction is a collection of screens and ABAP/4 routines, controlled and executed by a dialog processor. The dialog processor processes screen after screen, thereby triggering the appropriate ABAP/4 processing for each screen. For each screen, the system executes the flow logic that contains the corresponding ABAP/4 processing. The control passes from screen flow logic to ABAP/4 code and back.
    The sequence of events for Transaction TZ10, for example, looks like this: 
    P.Naganjana  Reddy
         1.
    In the PBO event, the statement MODULE STATUS_0100 passes control to the corresponding ABAP/4 module.In the ABAP/4 module pool, the screen to be displayed receives a menu interface.
    2.
    After processing the module STATUS_0100, control returns to the flow logic.For the PBO event, no further processing is required. The system display the screen and receives entries from the user. The entries are:
    the values for the fields Company and Flight number.
    the four-character function code that tells which pushbutton the user activated.
         3.
    The user input triggers the PAI event. The first PAI statement passes control to the ABAP/4 module USER_COMMAND_0100.Module USER_COMMAND_0100 processes the requests of the user.
    4. After processing MODULE USER_COMMAND_0100, control returns to PAI. This terminates the dialog. 
    P.Naganjana  Reddy
    EXERCISE
    Goto to ABAP editor, and enter the program name ZKA_SCREEN.
    Declare the tables and call the screen.
    In order to create the object, double click on the screen no, you will automatically guided to the screen painter SE51. 
    P.Naganjana  Reddy
    Enter the short description and click on the FLOW LOGIC tab.
    Uncomment the flow logic, both PAI and PBO. 
    P.Naganjana  Reddy
    Now click on the LAYOUT button.
    Click on the DICTIONARY/PROGRAM FIELDS WINDOW F6 button. Type in the table name and click on GET FROM DIC button and select the fields required for the screen and click on the COPY button. 
    P.Naganjana  Reddy
    Now drag and place the INPUT/OUTPUT fields box on the screen.
    Now click on the TEXT FIELD button and place in the screen and stretch the box for the size required. Now double click on the box, U will get the attributes screen. Enter the name and Text for the field. 
    P.Naganjana  Reddy
    Now we need to place the bush buttons. So Click on the push button on the left side and place it on the screen. Double click on it, u will get the attributes screen. Enter the name, text and the icon required and mainly the FCTCODE. It is the one which links the screen painter with the code.
    Once everything is set up, SAVE, CHECK and ACTIVATE the screen. 
    P.Naganjana  Reddy
    Click on the BACK button. U will be guided to the FLOW LOGIC screen.
    Double click on PAI, Because for the screen painter with the fields, Process After the Input is done and so u will guided to the Editor screen. 
    P.Naganjana  Reddy
    Now we need to set the System-Uses commands which links the code to the Editor.
    So the conditions would be:
    IF SY-UCOMM = 'DISPLAY'.
    SELECT SINGLE * FROM ZKA_CENTER WHERE CENTERNO = ZKA_CENTER-CENTERNO.
    ELSEIF SY-UCOMM ='SAVE'.
    INSERT ZKA_CENTER.
    ELSEIF SY-UCOMM = 'REFRESH'.
    CLEAR ZKA_CENTER.
    ELSEIF SY-UCOMM = 'GOTO'.
    LEAVE TO SCREEN '0002'.
    ELSEIF SY-UCOMM = 'EXIT'.
    LEAVE PROGRAM.
    ENDIF.
    If u create many screens and need links between the screens then u can use ‘GOTO’ to guide to the other screen.
    SAVE, CHECK and ACTIVATE and click on TEST. 
    P.Naganjana  Reddy
    Now click on the DISPLAY button.
    Also verify with SAVE, REFRESH and EXIT buttons. Thus the screen painter. 
    P.Naganjana  Reddy
    TABLE CONTROL
    Basic form
    CONTROLS ctrl TYPE TABLEVIEW USING SCREEN scr.
    Effect
    Creates a table control ctrl of the type TABLEVIEW . The reference screen for the initialization is the screen scr . Area of use The table control (referred to here as TC ) facilitates the display and entry of one-line, tabular data in dialog transactions. The functional scope has been defined so that you can implement many typical set operations usually handled by an elementary STEP-LOOP with the standard methods of a TC . Functional scope
    Resizeable table grid for displaying and editing data.
    Column width and column position modifiable by user and by program.
    Storing and loading of user-specific column layout.
    Selection column for line selection with color selection display.
    Variable column headers as pushbuttons for column selection.
    Simple selection, multiple selection, Select/deselect all.
    Scrolling functions (horizontal and vertical) via scroll bar.
    Fixing of any number of key columns.
    Setting attributes for each cell at runtime.
    Programming The data exchange between the application and the SAPgui is achieved with a STEP-LOOP , i.e. an ABAP/4 module is called to transfer data for each page.
    Example
    Processing without an internal table
    PROCESS BEFORE OUTPUT.
    LOOP WITH CONTROL ctrl.
    MODULE ctrl_pbo.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL ctrl.
    MODULE ctrl_pai.
    ENDLOOP.
    In this case, the module ctrl_pbo OUTPUT is called once for each output line before the screen is displayed, in order to fill the output fields. After the user has entered data on the screen, the module ctrl_pai INPUT is executed to check the input and copy the new contents.
    Example
    Processing with an internal table 
    P.Naganjana  Reddy
    PROCESS BEFORE OUTPUT.
    LOOP AT itab WITH CONTROL ctrl CURSOR ctrl-CURRENT_LINE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT itab WITH CONTROL ctrl.
    MODULE ctrl_pai.
    ENDLOOP.
    Here, the system fills the output fields before displaying the screen by reading the internal table itab. When the user has entered data, the module ctrl_pai INPUT must be executed to check the input and to refresh the contents of the internal table. Vertical scrolling with the scroll bar is followed by the event PAI for the displayed page. Then, cntl-TOP_LINE is increased and PBO is processed for the next page. Program-driven scrolling and the most of the functionality described above is achieved by manipulating the control attributes.
    Attributes The CONTROLS statement creates a complex data object of the type CXTAB_CONTROL with the name of the control. You maintain the initial values in the Screen Painter and assign the screen with the initial values for a control using the addition USING SCREEN . Initialization is achieved automatically in the "1st access to the control" (setting or reading values). You can use the customizing button (in the top right corner) to save the current setting (column widths and column positions) and use it as the initial value for the next call. All the initial values can be overwritten by the program using the MOVE ... TO TC attributes statement.
    EXERCISE
    Enter the Editor with SE38.
    Declare the Tables and an internal table.
    Then use the CONTROLS statement to have the controls for the Table control. 
    P.Naganjana  Reddy
    CONTROLS: <var> TYPE TABLEVIEW USING SCREEN '<screenno>'.
    Now call the screen with the CALL SCREEN statement. Click on the screen to draw the table.
    Fill in the attributes screen with the short description and click on the LAYOUT button.
    Now click on the TABLE CONTROL button and draw the table to the size required. Double click on the table and enter the Attributes giving the Table-control name.
    And select the check boxes for the vertical & horizontal resizing and separators.
    Click on the DICTIONARY/PROGRAM FIELDS WINDOW F6 button. Type in the table name and click on GET FROM PROGRAM button and select the fields required for the screen and click on the COPY button. 
    P.Naganjana  Reddy
    Enter the header with the TEXT FIELDS button by double clicking on the TEXT FIELD and fill in the ATTRIBUTES button with the name and text. 
    P.Naganjana  Reddy
    SAVE, CHECK & ACTIVATE.
    Click the BACK button and go the FLOW LOGIC screen. 
    P.Naganjana  Reddy
    REPORT ZKA_TC .
    TABLES: ZKA_EMP.
    DATA: ITAB LIKE ZKA_EMP OCCURS 0 WITH HEADER LINE.
    CONTROLS: TC TYPE TABLEVIEW USING SCREEN '0001'.
    CALL SCREEN '0001'.
    *& Module STATUS_0001 OUTPUT
    text
    MODULE STATUS_0001 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    SELECT * FROM ZKA_EMP INTO TABLE ITAB.
    ENDMODULE. " STATUS_0001 OUTPUT
    *& Module USER_COMMAND_0001 INPUT 
    P.Naganjana  Reddy
    text
    MODULE USER_COMMAND_0001 INPUT.
    IF SY-UCOMM = 'EXIT'.
    LEAVE PROGRAM.
    ENDIF.
    ENDMODULE. " USER_COMMAND_0001 INPUT 
    P.Naganjana  Reddy
    TABSTRIP CONTROLS
    A tabstrip control is a screen object consisting of two or more pages. Each tab page consists of a tab title and a page area. If the area occupied by the tabstrip control is too narrow to display all of the tab titles, a scrollbar appears, allowing you to reach the titles that are not displayed. There is also a pushbutton that allows you to display a list of all tab titles.
    Tabstrip controls allow you to place a series of screens belonging to an application on a single screen, and to navigate between them easily. The recommended uses and ergonomic considerations for tabstrip controls are described in the Tabstrip Control section of the SAP Style Guide.
    From a technical point of view, a tab page is a subscreen with a pushbutton assigned to it, which is displayed as the tab title.
    The tabstrip control is the set of all the tab pages. Tabstrip controls are therefore subject to the same restrictions as subscreens. In particular, you cannot change the GUI status 
    P.Naganjana  Reddy
    when you switch between pages in the tabstrip control. However, they are fully integrated into the screen environment, so present no problems with batch input.
    To use a tabstrip control on a screen, you must be using a SAPgui with Release 4.0 or higher, and its operating system must be Motif, Windows 95, MacOS, or Windows NT with version 3.51 or higher.
    When you create a tabstrip control, you must:
    Define the tab area on a screen and the tab titles.
    Assign a subscreen area to each tab title.
    Program the screen flow logic.
    Program the ABAP processing logic.
    You must then decide whether you want to page through the tabstrip control at the SAPgui or on the application server. In the first case, each tab page has its own subscreen. In the second, there is a single subscreen area that is shared by all tab pages.
    Defining the Tabstrip Control Area and Tab Titles
    You define both the tabstrip area and the tab titles in the screen layout. The tabstrip area has a unique name and a position, length, and height. You can also specify whether the tabstrip area can be resized vertically or horizontally when the user resizes the window. If the area supports resizing, you can specify a minimum size for it.
    When you define a tabstrip area, it already has two tab titles. Tab titles are technically exactly the same as pushbuttons. To create additional tab titles, simple create pushbuttons in the row containing the tab titles. Tab titles have the same attributes as pushbuttons, that is, each has a name, a text, and a function code. You can also use icons and dynamic texts with tab titles.
    Assigning a Subscreen Area to a Tab Title
    You must assign a subscreen area to each tab title. There are two ways of doing this:
    Paging in the SAPgui
    You need to assign a separate subscreen area to each tab title, and define the function codes of the tab titles with type P (local GUI function). In the screen flow logic, you call all the subscreens in the PBO event. This means that all of the tab pages reside locally on the SAPgui.
    When the user chooses a tab title, paging takes place within the SAPgui. In this respect, the tabstrip control behaves like a single screen. In particular, the PAI event is not triggered when the user chooses a tab title, and no data is transported. While this improves the performance of your tabstrip control, it also has the negative effect that when the user does trigger the PAI event, all of the input checks for all of the subscreens are performed. This means that when the user is working on one tab page, the input checks may jump to an unfilled mandatory field on another page. 
    P.Naganjana  Reddy
    Local paging at the SAPgui is therefore most appropriate for screens that display data rather than for input screens.
    Paging on the Application Server
    One subscreen area is shared by all tab titles and called in the PBO event. You define the function codes of the individual tab titles without a special function type. When the user chooses a tab page, the PAI event is triggered, and you must include a module in your flow logic that activates the appropriate tab page and assigns the correct subscreen to the subscreen area.
    Since the PAI event is triggered each time the user chooses a tab title, this method is less economical for the application server, but the input checks that are performed only affect the current tab page.
    Procedure in Either Case
    You create the subscreen areas within the tabstrip area. You assign the subscreen areas to one or more tab titles in the Screen Painter by selecting one or more titles. You can also assign a subscreen area to a tab title in the tab title attributes by entering the name of the subscreen area in the Reference field attribute.
    The procedure for the alphanumeric Screen Painter is described under Creating Tabstrip Controls.
    If you are paging at the SAPgui, create a subscreen area for each tab title. If you are paging at the application server, select all tab titles and create a single subscreen area. The subscreen areas may not cover the top line of the tab area. However, within a tab area, more than one subscreen area can overlap.
    Programming the Flow Logic
    In the flow logic, all you have to do by hand is include the correct subscreens. The screen flow and data transport to the ABAP program is the same as for normal subscreens. There are two ways of programming the screen flow logic, depending on how you have decided to page through the tabstrip control.
    Paging in the SAPgui
    When you page in the SAPgui, you must include a subscreen for each subscreen area:
    PROCESS BEFORE OUTPUT. ... CALL SUBSCREEN: <area1> INCLUDING [<prog 1>] <dynp 1>, <area2> INCLUDING [<prog 2>] <dynp 2>, <area3> INCLUDING [<prog 3>] <dynp 3>, ... ... 
    P.Naganjana  Reddy
    PROCESS AFTER INPUT. ... CALL SUBSCREEN: <area1>, <area2>, <area3>, ... ...
    Paging on the Application Server
    When you page on the application server, you only have to include a subscreen for the one subscreen area:
    PROCESS BEFORE OUTPUT. ... CALL SUBSCREEN <area> INCLUDING [<prog>] <dynp>. ...
    PROCESS AFTER INPUT. ... CALL SUBSCREEN <area>. ...
    Handling in the ABAP Program
    Before you can use a tabstrip control in your ABAP program, you must create a control for each control in the declaration part of your program using the following statement:
    CONTROLS <ctrl> TYPE TABSTRIP.
    where <ctrl> is the name of the tabstrip area on a screen in the ABAP program. The control allows the ABAP program to work with the tabstrip control. The statement declares a structure with the name <ctrl> . The only component of this structure that you need in your program is called ACTIVETAB.
    Use in the PBO event
    Before the screen is displayed, you use the control to set the tab page that is currently active. To do this, assign the function code of the corresponding tab title to the component ACTIVETAB:
    <ctrl>-ACTIVETAB = <fcode>.
    When you page at the SAPgui, you only need to do this once before the screen is displayed. This initializes the tabstrip control. The default active tab page is the first page. After this, the page activated when the user chooses a tab title is set within SAPgui.
    When you page on the application server, you must assign the active page both before the screen is displayed for the first time, and each time the user pages. At the same time, you must set the required subscreen screen. 
    P.Naganjana  Reddy
    You can suppress a tab page dynamically by setting the ACTIVE field of table SCREEN to 0 for the corresponding tab title.
    Use in the PAI event
    In the PAI event, ACTIVETAB contains the function code of the last active tab title on the screen. When you page in the SAPgui, this allows you to find out the page that the user can currently see. When you page at the application server, the active tab page is controlled by the ABAP program anyway. The OK_CODE field behaves differently according to the paging method:
    Paging in the SAPgui
    When you page in the SAPgui, the PAI event is not triggered when the user chooses a tab title, and the OK_CODE field is not filled. The OK_CODE field is only filled by user actions in the GUI status or when the user chooses a pushbutton either outside the tabstrip control or on one of the subscreens.
    Paging on the application server
    If you are paging at the application server, the PAI event is triggered when the user chooses a tab title, and the OK_CODE field is filled with the corresponding function code. To page through the tabstrip control, you must assign the function code to the ACTIVETAB component of the control:
    <ctrl>-ACTIVETAB = <ok_code>.
    This statement overwrites the function code of the last active tab page with that of the new tab title. At the same time, you must ensure that the correct subscreen is inserted in the subscreen area. Otherwise, tabstrip controls are handled like normal subscrens in ABAP programs, that is, the ABAP program of a subscreen screen must contain the dialog modules called from the flow logic of the subscreen. 
    P.Naganjana  Reddy
    EXERCISE
    Goto SE38. Enter the tabstrip program name Eg: ZKA_TABSTRIP and click on the create button.
    First we need to declare the tables.
    Then use the controls for the tabstrip.
    Syntax: <ctrl-name> TYPE TASTRIP.
    Now call the screen. Using CALL SCREEN statement.
    Double click on the screen no to draw the screen for tabstrip control.
    Now uncomment the FLOW LOGIC and click on the LAYOUT. 
    P.Naganjana  Reddy
    The flow logic for the tabstrip would be as follows.
    PBO:
    The PBO is initiated so that the subscreen for the corresponding tab can be maintained.
    Syntax:
    CALL SUBSCREEEN <sub-screen name> INCLUDING SY-REPID <screen-var>.
    PAI:
    When the tab is clicked, the corresponding subscren should open
    Syntax:
    CALL SUBSCREEN <subscreen>. 
    P.Naganjana  Reddy
    DRAWING THE TABSTRIP CONTROL:
    Click on the TABSTRIP button and place it on the screen for the required size.
    Double click on the control and give the name for the tabstrip control in the ATTRIBUTES screen.
    Now double click on the tab and fill in the attributes screen for the name and the text.
    Also draw the subscreen in one of the tab and refer the same subscreen in the rest of the tabs. 
    P.Naganjana  Reddy
    Now in the sub-screens, we need to get the screen for the tabs.
    So call an other screen and draw with fields and pushbuttons to perform actions very similar like SCREEN WITH FIELDS (refer screen painter).
    Enter the short description and click on the FLOW LOGIC tab. 
    P.Naganjana  Reddy
    Uncomment the flow logic, both PAI and PBO.
    Now click on the LAYOUT button. 
    Naganjana Reddy.P
    Click on the DICTIONARY/PROGRAM FIELDS WINDOW F6 button. Type in the table name and click on GET FROM DIC button and select the fields required for the screen and click on the COPY button.
    Now drag and place the INPUT/OUTPUT fields box on the screen. 
    P.Naganjana  Reddy
    Now click on the TEXT FIELD button and place in the screen and stretch the box for the size required. Now double click on the box, U will get the attributes screen. Enter the name and Text for the field.
    Now we need to place the bush buttons. So Click on the push button on the left side and place it on the screen. Double click on it, u will get the attributes screen. Enter the name, text and the icon required and mainly the FCTCODE. It is the one which links the screen painter with the code. 
    P.Naganjana  Reddy
    Once everything is set up, SAVE, CHECK and ACTIVATE the screen. 
    P.Naganjana  Reddy
    Click on the BACK button. U will be guided to the FLOW LOGIC screen.
    Double click on PAI, Because for the screen painter with the fields, Process After the Input is done and so u will guided to the Editor screen. 
    P.Naganjana  Reddy
    Now we need to set the System-Uses commands which links the code to the Editor.
    So the conditions would be:
    IF SY-UCOMM = 'DISPLAY'.
    SELECT SINGLE * FROM ZKA_CENTER WHERE CENTERNO = ZKA_CENTER-CENTERNO.
    ELSEIF SY-UCOMM ='SAVE'.
    INSERT ZKA_CENTER.
    ELSEIF SY-UCOMM = 'REFRESH'.
    CLEAR ZKA_CENTER.
    ELSEIF SY-UCOMM = 'GOTO'.
    LEAVE TO SCREEN '0002'.
    ELSEIF SY-UCOMM = 'EXIT'.
    LEAVE PROGRAM.
    ENDIF.
    The same procedure for the company table as well will lead the screen in the below manner. 
    P.Naganjana  Reddy
    Summary:
    REPORT ZKA_TABSTRIP .
    TABLES: ZKA_EMP,ZKA_COM.
    CONTROLS: TS TYPE TABSTRIP..
    DATA: SCREENNO(4) TYPE N.
    CALL SCREEN '0003'.
    *& Module STATUS_0001 OUTPUT
    text
    MODULE STATUS_0001 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    IF SCREENNO IS INITIAL.
    TS-ACTIVETAB = 'EMP'.
    SCREENNO = '0002'.
    ENDIF.
    ENDMODULE. " STATUS_0001 OUTPUT
    *& Module USER_COMMAND_0001 INPUT
    text
    MODULE USER_COMMAND_0001 INPUT.
    IF SY-UCOMM = 'EMP'.
    TS-ACTIVETAB = 'EMP'.
    SCREENNO = '0002'.
    ELSEIF SY-UCOMM = 'COM'.
    TS-ACTIVETAB = 'COM'.
    SCREENNO = '0003'.
    ENDIF.
    ENDMODULE. " USER_COMMAND_0001 INPUT
    *& Module USER_COMMAND_0002 INPUT
    text
    MODULE USER_COMMAND_0002 INPUT.
    IF SY-UCOMM = 'DISPLAY'.
    SELECT SINGLE * FROM ZKA_EMP WHERE EMPNO = ZKA_EMP-EMPNO.
    ELSEIF SY-UCOMM = 'SAVE'.
    INSERT ZKA_EMP.
    ELSEIF SY-UCOMM = 'REFRESH'.
    CLEAR ZKA_EMP.
    ELSEIF SY-UCOMM = 'EXIT'.
    LEAVE PROGRAM.
    ENDIF. 
    P.Naganjana Reddy

  • Dynamic Documents & Exercise

    Hi guyzzzzzz,
    i want the document for the following........
    ·  Dynamic Documents Display
    ·  Structure of Program that Use Dynamic Documents
    ·  Classes for Dynamic Documents
    ·  Important Methods of DD Classes
    Demo/Exercise
    Its very urgent, plz help me in this
    Thanks in advance,
    Vishnu. R

    Hi,
    Dynamic documents in ABAP Objects are HTML documents that are generated during runtime using ABAP code.
    Dynamic documents enable developers to give totally a new look and feel to ABAP screens and report outputs (provided screens are used in the report output). Many features that are not possible in the traditional ABAP programming are available in dynamic documents. Why we are saying a new look and feel is it uses SAP HTML Viewer internally to bring HTML web page kind of look and feel to screens.
    Dynamic documents may contain Forms and Tables, which intern can contain elements like input fields, push buttons, dropdown lists, texts, icons and pictures in different sizes. Of course some of these features are also available in ALV reports with limited usage, but not like in dynamic documents.
    Features
    The below mentioned are some of the features of dynamic documents.
    Large font sizes and more colour options than traditional ABAP/4 (There are some limitations also)
    ICONS and pictures in different sizes
    Texts
    Links
    Pushbuttons
    Input fields
    Dropdown list boxes
    Tables with row span and with column span
    Tables with frames and without frames
    Tables with buttons, icons, pictures, input elements and texts in it
    Steps for using dynamic documents in ABAP program:
    For using dynamic documents, all that we need is a screen and a custom control in that.
    The following steps need to be done in the program in order to display a dynamic document in a screen.
    Create a screen and a custom control in that using Screen Painter (This step is not required if we already have a screen and custom control in the program)
    Define an object reference to the class CL_DD_DOCUMENT and instantiate it.
    For example:
    DATA: OBJ_DD  TYPE REF TO CL_DD_DOCUMENT.
    CREATE OBJECT OBJ_DD.
    Dynamic document is ready now for including elements in that. The below are few methods, which we can use for adding elements to the dynamic document. Method Description
    NEW_LINE To generate a line break
    UNDERLINE To draw a horizontal line across the full width of the document
    ADD_GAP To place a gap in a line
    ADD_TEXT To add a text
    ADD_PICTURE To add a picture
    ADD_ICON To add a SAP icon
    ADD_TABLE To add a table
    ADD_FORM To add a form area
           For example:
           DATA: OBJ_TABLE      TYPE REF TO CL_DD_TABLE_ELEMENT.
           CALL METHOD OBJ_DD->ADD_TABLE    
                  EXPORTING
                  NO_OF_COLUMNS        = 2
                  WIDTH                = u2018100%u2019
                  IMPORTING
                    TABLE              = OBJ_TABLE.
    Once all the elements are included, all these elements need to be merged into a single dynamic document. This can be done using method MERGE_DOCUMENT.
                            For example: CALL METHOD OBJ_DD->MERGE_DOCUMENT.
    Dynamic document is now ready for display/print/export.
    Method DISPLAY_DOCUMENT can be used to display document in the screen. Here it is possible to display dynamic document in an existing container or in the existing document also.
    Method PRINT_DOCUMENT can be used to print the dynamic document. Here system enables local printing.
    Method EXPORT_DOCUMENT can be used to export the document as a HTML file into PC.
    In case of the dynamic document need to be refreshed based on the user action, one should first call the method INITIALIZE_DOCUMENT to clear the dynamic document contents. This method does not clear the dynamic document object reference. So it is possible to include another set of elements in the same dynamic document.
    After displaying the document, any user action can be handled in the event RESOURCES_CHANGED of the class CL_GUI_RESOURCES. For example refreshing the document contents, displaying new contents on the same document etcu2026
    Event RESOURCES_CHANGED can be triggered explicitly using the method ON_RESOURCES_CHANGED of the class CL_GUI_RESOURCES.
    For showing a dynamic document in a report, a screen with custom control in it must be called from the program.
    Example programs:
    SAP provided a complete set of example programs (Package: SDYNAMICDOCUMENTS), which explain all the features mentioned in this weblog.
    Program Description
    DD_ADD_FORM_BUTTON Buttons on Forms
    DD_ADD_FORM_INPPUT Interactive Elements: Forms with buttons
    DD_ADD_LINK Interactive Elements: Links
    DD_ADD_PICTURE SAP icons and pictures stored in BDS(transaction OAOR)
    ADD_PICTURE To add a picture
    DD_ADD_TABLE Tables
    DD_ADD_TEXT Text input
    DD_SPLIT_DOCUMENT Distribution of areas on dynamic documents
    DD_STYLE_TABLE Style types & list colours
    Also refer to this links:
    /people/venkata.ramisetti/blog/2005/12/20/dynamic-documents-in-abap-objects
    http://www.sapdevelopment.co.uk/reporting/ddhome.htm
    www.saptips.com/WorkshopDescriptionsABAP.asp
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • How to find *screen badi*

    hi,
    i know how to find exits and badi for a particular transaction.
    i just wanted to know how we can find screen badi for a specific transaction.(ex: mb_migo_badi for migo transaction)
    can any one give suggestions in this issue.if possible send any documentation.
    note:plz dont send the same old program to find exits and badis.

    See point 8
    Procedure
           1.      Start the Object Navigator (SE80).
           2.      Open an enhancement spot. For more information, see Creating, Editing, and Deleting Enhancement Spots.
           3.      Select the Enh. Spot Element Definitions tab page.
           4.      Choose Create BAdI.
    A dialog box appears.
           5.      Enter a name and a short text for the BAdI.
    BAdIs are in the same namespace as global data types from the ABAP Dictionary, global classes, or interfaces. For BAdIs, we recommend using the prefix u201CBADI_u201D (or u201CZBADI_u201D, and so on, in the customer namespace).
    The new BAdI appears as a node in the tree display of the tab page.
           6.      On the right-hand side of the page, do the following:
                                a.      Enter the attribute for multiple use.
                                b.      Enter the instance creation mode.
                                c.      Enter the attribute for internal SAP BAdIs (only SAP internal use).
                                d.      Optional: Enter a Fallback Class.
                                e.      In the tree, expand the BAdI and choose the Interface node. Enter the name of an existing BAdI.
           7.      Optional: Choose the function Create Filter to create a filter.
    Here you can:
                                a.      Enter the filter name, filter type, and description.
                                b.      Optional: If you choose Constant Filter Value During Call, you may only specify a constant value at the respective filter when using GET BADI. This is provided for future performance improvements of the statement.
                                c.      Optional: Enter either a data element or a domain with fixed values, or a search help. Alternatively, enter a check or input help class, and a length (together with decimal places). In this way, the filter values specified at GET BADIcan be checked during the BAdI implementation.
           8.      Optional: Choose the function Create Screen Enhancement in order to create the BAdI as a screen enhancement.
    The BAdI must not be of a multiple use type.
                                a.      Enter Calling Program, Screen Number, Subscreen Area, and Description.
                                b.      Optional: Select Default Value to specify a screen of a program that is used if no active implementation is found at runtime.
           9.      Optional: Choose Create Function Code Enhancement to create the BAdI as a function code enhancement.
    The BAdI must not have any filters and must not be of the type for multiple use.
                                a.      Enter Program, Function Code, and Description.
                                b.      Optional: Select Default Value to specify an icon, a menu text, a pushbutton text, and a quick info, all of which are used when no active implementation is found at runtime.
       10.      Optional: Create an example implementation.
                                a.      Select the BAdI, and choose Create Example Class from the context menu.
                                b.      Enter the name of a BAdI implementation class and a description.

  • How to conduct training for Module Pool Programming

    Hi everybody
    I am going to conduct 5 days training for module pool programming.
    Can you please provide me some suggestion about how to start & what r the steps?
    Please provide suggestion for following
    1) From where should I start
    2) What should be the first step & subsequent steps
    3) how should I get documentation & sample programs
    thanks

    Hello,
    You can start the training by first explaining what is Module Pool programming, and why is it needed, how is it different from other forms of programming , like reports(SE38).
    Then go on to explain how to create a MPP , i.e this you can do by giving the demo online, like:-
    Goto SE80
    Create a new program, and so on.
    Talk about the various elements of MPP, such as the scree(which is also known as Dynpro), text elements, pushbuttons, tabstrips, etc, and how to use them in the program.
    For sample programs and documentation, you can refer to help.sap.com, and search the documnetation for Module Pool Programming.
    Thanks and regards,
    Prerna

  • ICON_CREATE on button on a screen

    Dear expers,
    I have a requirement to expand and collaspe a subscreen on click of a button. But i stuck in changing the icon of a button on every click. I have a example to change the icon of a button on selection screen but its not working on a screen with ICON_CREATE function.
    Kindly suggest,
    Praveen Lobo

    Hi,
    The example Report Program explains you how to use the code for changing the ICON for a text. But in the function module documentation of the ICON_CREATE, it is clearly mentioned that the same can be used to change the ICON of the Push Button also.
    Code Snippet:
         CALL FUNCTION 'ICON_CREATE'
           EXPORTING
                name                  = icon_name
                text                  = icon_text
                info                  = 'Status'
                add_stdinf            = 'X'
           IMPORTING
                result                = push_btn
           EXCEPTIONS
                icon_not_found        = 1
                outputfield_too_short = 2
                OTHERS                = 3.
    push_btn should be the name of the Push button on the Screen. And change the property of it to Output enabled. And then execute the code. it will change the Icon of the Push button dynamically.
    have a look at the following link:
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba9a635c111d1829f0000e829fbfe/content.htm
    "Pushbuttons have a label - the text that you specify statically in the attributes - and can also have icons. If you set the Output field attribute for a pushbutton, you can also set its text dynamically in the ABAP program. To do this, you must create a field in the ABAP program with the same name as the pushbutton. You must then assign the required text to the field before the screen is displayed. You can also assign icons to dynamic texts on pushbuttons by including the icon code in the text. The icon codes are all contained in the include program <ICON>. For example, the ICON_CANCEL () icon has the code @0W@." - This explains that you can change the icon of the Push button.
    Hope this helps.
    Thanks,
    Samantak.

  • Incorrect language translation, buttons in sourcing screen

    Hi,
    I am working with SRM 5.0. In sourcing cockpit, the buttons in the lower half of the screen (in work area) appear in german text. Logon language is "English".
    I have run report "BBP_GEN_DYN_TEXTS" and re-activated  function group "BBP_SOCO_UI_ITS". this has solved my transalation problem of other text on the same screen. Pls suggest.
    Regards,
    Prashant

    Hi,
    You can try the steps in the following OSS note.when we had the issue, SAP suggested to apply this OSS note only (this involves manual corrections)
    Note 632982 - Generation of the screens for the sourcing
    Other releated OSS note
    943854 - Texts appear in the incorrect language   
    877076 - Translation problems with generated screens  
    828762 - First five customer field values are not displayed   
    778253 - Entry of vendor ID in SOCO is case sensitive   
    724306 - German text 'Auction anlegen' ortographically incorrect   
    637745 - Incorrect text on pushbuttons   
    632691 - Untranslated texts in generated screens   
    618400 - Support Package 01 for SRM 3.0   
    600410 - Generation of the screens for the search results
    Cheers, Renga
    Award points for helpfull answers

  • Module Pool and Smart Form

    Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.
    my email Id is [email protected]

    Hi,
    A module pool is a collection of screens, flow logic, menu bars and ABAP code that you use to build an application. Typically the transaction code that calls the application will refer to the module pool and the initial screen number.
    -->What are the requirements a dialog program must fulfill ?
    • A dialog program must fulfill the following requirements
    . a user friendly user interface
    . format and consistency checks for the data entered by the user
    . easy correction of input errors
    . access to data by storing it in the database.
    What are the basic components of dialog program ?
    • Screens (Dynpros)
    Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic and controls exactly one dialog step.
    • ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.
    What is a dynpro ? What are its components ?
    • A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly
    one dialog step.
    - The different components of the dynpro are:
    Flow logic: Calls of the ABAP/4 modules for a screen
    Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen
    Screen attributes: Number of the screen, number of the subsequent screen, and others
    Field attributes: Definition of the attributes of the individual fields on a screen
    What is screen flow logic? What are the selections in it? Explain PAI and PBO?
    Ans - Screen flow logic contains the procedural part of a screen. The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    PROCESS ON HELP-REQUEST.
    PROCESS ON VALUE-REQUEST.
    Selections are performed in PAI.
    PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.
    PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI.
    processing, the system either calls the next screen or carries on processing at the point from which the screen was called.
    PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.
    step by step process of dialog programing:
    Firstly, you can go to Tcode SE80 and here create a package.
    On that package name right click and select program.
    Then choose program type modulepool program.
    Similarly, you can create screen and then select layout and drag and drop labels and pushbuttons as per your requirements.. Then double click on th push buttons.You will see property window and there we will find FCTCODE and there type the names e.g suppose you want to
    display then typy on the fctcode Display or any name as you wish.
    After that save and activate it. and then close the window.
    And then go back to the intial screen .
    And then click Flow logic button and then uncomment the statement
    module status_1000 PBO block and then doible click on status_1000
    save and activate and then go back and then PAI block uncomment the statement module status_1000 and the dobule click on status_1000.
    step by step process of creating smartforms:
    1.        What is Smartforms?
    Smartforms is a tool to create and maintain forms for mass printing in SAP Systems. Just like sapscripts, for Smart
    forms print program is used to create the output internal table which in turn is thrown to the smart form where the
    field values are displayed. The output medium for Smartforms support printer, fax, e-mail, or the Internet.
    Transaction Code: SMARTFORMS
    To print a form the program for the data retrieval and a Smartform that contains the entire form logic is required. As
    these two are separate one should adapt the Smartform if changes to the form logic are necessary. The application
    program passes the data via a function module interface to the Smartform. When activating the Smartform the system
    automatically generates the function module.
    The architecture of the smart form is given below:
    Creating Forms Using SAP Smart Forms
    When creating a form one must:
    1.      Retrieve the application data
    2.      Describe the form
    3.      Pass the application data to the form
    Example: Create Smartform for printing Purchase order.
    Retrieving the application data (Purchase Order information):
    Write an ABAP program (Print Program) to retrieve data or include a retrieval routine into the application. This
    code consists of statements that select data from databases according to certain selection criteria. Store the
    retrieved data in internal tables, structures or variables and transfer it to the form in one step.
    SAP has already provided with the Print Program (/SMB40/FM06P) for Purchase Order. Based on the business
    requirement, this Print Program can be copied and modified to get the required data and transfer to Smartform.
    Describing the Form:
    The user defines the form using a Smartform. Use the tools of the form builder as listed below:
    1.        Use the form painter to position the windows, graphics and addresses on a page.
    2.        Use the PC editor to write the texts.
    3.        Use the table painter to format the tables.
    The flow control is used to print the pages and elements.
    Form Logic (Introduction)
    In the form builder one can describe a Smartform by a set of nodes. To do this, one can build up a tree structure on
    the left side of the user interface.
    The node global settings and its three successors form attributes, form interface and global definitions always exists
    for any newly created forms.
    To describe the form logic, create the hierarchy under the node pages and windows.
    The following rules apply to control the flow of the form output.
    1.        The nodes in the tree structure are processed from top to bottom.
    2.        For each node there is a tab, this can be used to link the node to a condition. If the condition is true, the
    system processes the node. If not, it skips the node and all its successors.
    3.        One should define a next page for each page.
    The SAP form builder of the smart form consists of:
    1.        Form painter for creating the layout of the form
    2.        PC Editor for entering texts and fields into output areas
    3.        Navigation tree for maintaining the form logic
    4.        Table painter for creating templates and tables
    To define the text formats, one can use the Smart Styles.
    Style builder:
    On the left of the style builder screen consists of the predetermined nodes (header data, folder for paragraph
    formats, and folder for character formats).
    On the right one can see the maintenance screen with its tab pages. At the bottom the preview of the selected font
    can be viewed.
    Create Purchase Order Smartform
    Create a Smartform, copy the existing SAP provided purchase order Smartform to ZSFM_PURCHASEORDER for
    customizing as per business requirement.
    1. Form Settings under Global Settings node, set the parameters in Output Option:
    Page Format: Letter
    Character per Inch: 20
    Line per Inch: 6
    Style: ZSTM_SMB40_SF
    Output Format: Standard Output
    2.        Form Interface
    We can add parameters in the Import Parameters and tables in Tables tab of the form interface for the application
    data to be available for the Smartform to print.
    3. In Global definition we can define the all the global variables which can be used in Smartforms. Initialization
    can be used for initializing the variables and even for retrieving the data.
    Creating pages:
    Each form consists of one or more pages. The first page in the tree structure is the start page and the
    processing of the form starts with this page itself.
    1.        Open the context menu for existing page node and choose create®page
    2.        Enter a unique name (FIRST) for the node and a description (Page)
    3.        Determine the format (1, 2, 3...)and the mode of the page counter (Increase counter) on the general
    attributes tab
    4.        Determine the print attributes (Portrait Format) of the page on the output options
    5.        Determine a background graphic for the entire page on the background tab (Not used in PO).
    Creating windows:
    The size and position of the window can be graphically set in the form painter. There are main windows and
    secondary windows. The difference between these two is that the output in a main window can cover several
    pages.
    1.        Open the context menu for an existing page node and choose®window
    2.        Enter a name for the node (NAMEFORM) and a description (Title Window).
    3.        On the general attributes indicate type of window. NAMEFORM is secondary window.
    In similar fashion all the other windows are created and positioned as per the form design. Only one MAIN
    window is created, it is used for line items which can cover several pages.
    Positioning texts on the form
    The texts are displayed in the form using text nodes. The only exceptions are addresses.
    The predecessor node of the text node determines its use:
    Predecessor node        Used to
    Secondary window        Position text on one or more pages
    Main window        Display text in relation to other nodes in the main window, it may cover several pages
    Template         Displays texts for table cells of a static table
    Table        Display table contents
    There are three text types:
    1.        Text element : to enter new text in the PC editor
    2.        Text module : to include a text module
    3.        Include text : to include an existing SAPscript text
    Entering texts in PC editor: (TITLE)
    ·        To create a text node call the context menu for that node in the tree structure that should receive the
    text, then choose->text
    ·        Enter a unique name (TITLE) for the node and the node description (TITLE)
    ·        On the general attributes tab choose text element as text type
    ·        In the text node box choose whether the text should be started with a new paragraph or only in a new
    line
    ·        Enter the text in the PC editor. Text could be a program element like &Title& or ‘Purchase Order’. &Title&
    is a variable for which the value is assigned in Program line before the text.
    Including text modules: (TERMSCONDITION)
    Text module of the text node is used to refer to an existing text module in the system. The text modules can be
    used in two ways:
    ·        To create a text node, call the context menu for that node in the tree structure that shall contain the text
    and choose create->text under the window TERMSCONDITION.
    ·        Enter a unique name for the node (TERMSCONDITION) and a description (Terms and Condition)
    ·        On the general attributes tab select the text type text module
    ·        Enter the name of the text module in the text name field (&G_TERMS_TEXT&). &G_TERMS_TEXT& is
    used to determine the Text name dynamically in the program lines preceding the text module node.
    ·        Program Lines: GETTERMSCONDITION
    Concatenate 'ZTMM_PO_TERMS_' ZXEKKO-BUKRS
                                      INTO G_TERMS_TEXT.
    Including SAPscript texts: (HD_TXT_F01 – Order Header Text)
    The text type include text node to refer to a SAPscript text, which already exists in the system. To identify the
    text the text name, object, id and the language is needed.
    ·        To create the text node, call the context menu for that node in the tree structure that shall receive the
    text and choose create -> text under the main window.
    ·        Enter a unique name (HD_TXT_F01) for the node and the node description (Order Header Text).
    ·        On the general attributes tab choose include text as text type
    ·        Text Name - &ZEKKO-EBELN&, Text Object – EKKO, Text ID – F01, Language - &SY-LANGU&. Also check
    mark – No error if no text exists.
    Tip: Since the size of text is not known, its better to have the text in MAIN window, so that it can run to more
    than one page if required.
    Inserting addresses: (SENDER): 
    Address node is used to insert an address into the form. This guarantees that the address is formatted
    according to the postal rules of the sender country.
    ·        To create an address node , call the context menu for that node in the tree structure that one wants to
    contain the text and choose create->Address
    ·        Enter a name for the node (COMPANY_CODE_ADDRESS)  and a description (Company Code Address)
    ·        Determine the address type (Organization Address) on the general attributes tab
    ·        For organizational addresses - specify the address number, for any other - specify the person number
    and the address number. In this case we get the company code address into variable &ADDNR&, so we need
    program lines (SENDER) preceding the address text.
    ·        In the box additional addresses, attributes to specify how to display the address are maintained.
    Printing graphics: (LOGO):
    Tcode SE78 is used to import graphics into the SAP system. The transaction imports the graphics and stores it
    in the BDS (business transaction server) and then it can be displayed in the form.
    ·        To create the graphic node , call the context menu for that node in the tree structure and choose create-
    >graphic
    ·        Enter a name (LOGO) for the node and the description (Logo Graphic)
    ·        On the general attributes determine whether a colored or a black and white
    ·        On General Attributes use the fields object - GRPAHIC, id – BMAP and name - &G_LOGO& to identify the
    graphic. &G_LOGO& is variable and therefore we can print company code specific logo. Program line preceding
    the graphic is required.
    ·        Program line COMP_LOGO is used to assign the value to G_LOGO. Concatenate 'ZCOMPANY_LOGO_'
    ZXEKKO-BUKRS INTO G_LOGO. So, the name of graphic for example will be ZCOMPANY_LOGO_0202 for
    company code 0202.
    Displaying a static table (Window – INFO, Template - TEM_INFO) 
    Use node type template to display a table whose layout and size is determined before the runtime of the print
    program.
    To create a template, define a table layout to determine the cell structure for each line. The cells are used to
    display the cell structure for each line. The cells are used to display the contents of the successor nodes of the
    template node. 
    ·        Create Template under the INFO window node. Create > Template.
    The template layout is used to determine the following,
    1.        The number of lines and cells
    2.        The height of each cell
    3.        The width of each cell
    4.        The alignment of the table in the window
    5.        Whether and where to display separator lines or frames
    Use the table control on the template tab to define the layout of the lines. Each line of the template must have
    a definition.
    Use the pattern box to select the desired table pattern.
    Displaying contents in cells: (TLE_CONTACT)
    The template node defines the table layout. The successor nodes of the template         determine the data to be
    displayed in the table cells.
    In General Attributes choose Text type – Text Element. In editor, type ‘DTE         Contact’.
    In Output Options, define the output structure LINE – 5 and Column – 1.
    Similarly all other information for each cell can be filed using the text module and         address module.
    Displaying Dynamic Table (ITEM_TABLE)
    ·        Create TABLE under the MAIN window node. In DATA Tab, loop through the data internal table.
    L_XEKPO is the item table which has all the line item details.
    Define the line types based on the positioning of the text in main window. For         example: TABLE_HEADER1
    is used for positioning Header texts in the table.
    ·        Table is divided into three parts: Header, Main Area and Footer.
    ·        Header is used for printing the Header Title of the table and it at the start of the table on every page.
    ·         Main Area is used to print the line item details of the PO. Create a line (ITEM_DETAIL) of the line type
    TABLE_HEADER1. It will dynamically generate number cells based on the line type defined in the table layout.
    Name all the cells as per the usage. For each cell create the text node to display the information. For example:
    Cell VAL_MATERIAL, Text node MATNR is created which has text element - -matnr.
    ·        Footer is used for printing the information after Main Area data is printed. This can be used for Total
    printing or any other information which needs to be printed after all line items are printed. Create line
    TLE_CONTR_STP for Contractual Stipulation of the line type – LINE which has only one column. Create the
    text element to print the information.
    Special Requirement: Printing the Acknowledgement text if the order value is greater then USD 50,000.00 on
    the second copy only.
    ·        This requirement needs the modification in the print program and the Smartform.
    ·        Modification in Print Program to trigger the second copy if the order value is greater then 50K. Its
    advisable to copy the standard print program to custom Z program (Z_SMB40_FM06P), and changes should
    be made to Z program. Number of copies is passed from NAST to ls_composer_param-tdcopies in Smartforms.
    The value ls_composer_param-tdcopies is modified in the print program to 2 if the order value is greater then
    50K.
    ·        The printing of Acknowledgement Text only on second copy is achieved using the COPIES WINDOW in
    Smartforms. Define Window ACKN_COPY of the type COPIES WINDOW and Output to – Only Copies – Copies
    Differ. Also set the condition in the Condition Tab of the window – SFSY-JOBPAGES = 1, so that it only print
    on the first page of the copy.
    ·        If user selects to print 2 copies and the order value is more then 50k, program needs to print 2 sets
    meaning 4 copies. So number of copies is taken care of in Print program but again the printing of
    Acknowledgement Text should be only the Even number copy meaning Copy# 2 and 4. This achieved by using
    the program lines to determine the even copy.  SFSY-COPYCOUNT will tell us the current copy number being
    printed.
    regards,
    vineela.
    Edited by: Radha Vineela Aepuru on Mar 13, 2008 11:12 AM

  • UI dynamic

    Hi everyone,
    Is there a way to create UI elements dinamically in the PBO ?
    Thanks.
    Regards.

    Hi David,
        I found certain links which might be answering your question. I couldn't find any documents which supports creation of screen elements dynamically. But using the container control of the screen painter, it is possible to display dynamically created controls of the screen into the container area using the HTML. This is called Dynamic documents.
       Dynamic documents allow you to create an area on a screen containing various graphical elements. You create them in your program using ABAP statements ( so it is possible to make decisions on what to display dynamically ), from which the system generates the required HTML code. The finished HTML document is then displayed at runtime.
    Dynamic documents are displayed using SAP container control.
    A dynamic document can contain the following:
    •     Text
    •     Links
    •     Pushbuttons
    •     Input fields
    •     Dropdown list boxes
    •     Icons
    •     Pictures
    •     Tables
    For further information refer the following link:
    http://help.sap.com/saphelp_webas620/helpdata/en/f5/edd938d8dbe93de10000000a11405a/frameset.htm
    Hope i have done my best which might be of some use to you.
    regards,
    Naveenan.

  • Reg List..

    Hi All,
             Could you tell me about <b>List</b> in Dialog Programming and Diff of <b>List and Screen. </b>How List used in the screen. Please guide me in detail.
    Regards,
    Thanuskodi T.

    Hi
    A transaction is dialog program that change data objects in a consistant way.
    A dialog program must fulfil the following requirements
    -          A user friendly user interface.
    -          Format and consistancey checks for the data entered by the user.
    -          Easy correction of input errors.
    -          Access to data by storing it in the data bases.
    -          Screens (Dynpros)
    -          Each dialog in an SAP system is controlled by dynpros.A dynpros consists of a screen
    And its flow logic and controls exactly one dialog step.
    -          ABAP/4 module Pool.
         Each dynpro refers to exactly one ABAP/4 dialog program .Such a dialog program is also       called a module pool ,since it consists of interactive modules.
    PBO- Process Before Output-It determines the flow logic before displaying the screen.
    PAI-Process After Input-It determines the flowlogic after the display of the screen and after receiving inputs from the User.
              A dynpro (Dynamic Program) consists of a screen and its flow logic and controls exactly one dialog steps.
    -          The different components of the dynpro are :
    <u><b>Flow Logic:</b></u> calls of the ABAP/4 modules for a screen .
    <u><b>Screen layout:</b></u> Positions of the text, fields, pushbuttons and so on for a screen
    <u><b>Screen Attributes:</b></u> Number of the screen, number of the subsequent screen, and others
    <b>Fields attributes:</b> Definition of the attributes of the individual fields on a screen.
    *Each dynpro refers to exactly one ABAP/4 dialog program.Such a dialog program is also called a module pool ,since it consists on interactive modules
    *We cannot write field data to the screen using the WRITE statement.The system instead transfers data by comparing screen fields names with ABAP/4  variable names.If both names are the same,it transfers screen fields values to ABAP/4 programs fields and Vice Versa.This happens immediately after displaying the screen.
    *The flow control of a dynpro consists os a few statements that syntactically ressemble ABAP/4  statements .However ,we cannot use flow control keywords in ABAP/4 and vice-versa.
    The SET SCREEN and LEAVE SCREEN statements controls screen flow.
    <b>SUPPRESS DIALOG’</b>
    Suppressing of entire screens is possible with this command.  This command allows us to perform screen processing “in the background”.  Suppresing screens is useful when we are branching to list-mode from a transaction dialog step.
    If we don’t use Suppress-Dialog to next screen will be displayed but as empty, when the user presses ENTER, the standard list output is displayed.
    <b> producing a list within a transaction</b>
    By submitting a separate report.
    By using leave to list-processing.
    <u><b>use of the statement Leave to List-processing</b></u>
    Leave to List-processing statement is used to produce a list from a module pool.  Leave to list processing statement allows to switch from dialog-mode to list-mode within a dialog program.
    <u><b>More info on dialog program using LIST</b></u>
    <b>SUBMIT</b> rep. (Calls the report rep . Leaves the active program and starts the new report rep)
    <u><b> Additions</b></u>
    1. ... LINE-SIZE col   (Prints the report with the line width col)
    2. ... LINE-COUNT lin (Prints the report with lin lines (per page).)
    3. ... TO SAP-SPOOL
    4. ... VIA SELECTION-SCREEN (Displays the selection screen for the user. In this case, the selection screen is redisplayed after return from the report list display - the user's entries are retained)
    5. ... AND RETURN (Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal mode)
    6. ... EXPORTING LIST TO MEMORY (Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST")
    7. ... USER user VIA JOB job NUMBER n (Schedules the specified report in the job specified by the job name job and the job number n . The job runs under the user name user and you can omit the addition USER user . The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT . This addition can only be used with the addition ...AND RETURN)
    8. ... Various additions for parameter transfer to rep
    9. ... USING SELECTION-SETS OF PROGRAM prog(Uses variants of the program prog when executing the program rep)
    <u><b>LEAVE</b></u>
    1. LEAVE PROGRAM. (LEAVE PROGRAM always leaves the current program - there is never any processing after LEAVE PROGRAM)
    2. LEAVE TO TRANSACTION tcod. (Terminates the current processing and starts the (new) transaction tcod)
    3. LEAVE TO SCREEN scr. (Leaves the current screen and processes the screen scr)
    4. LEAVE SCREEN. (Leaves the current screen and processes the next screen.)
    5. LEAVE TO LIST-PROCESSING. (Switches from "dialog processing" (module pool, screens) of the current transaction to "list processing)
    6. LEAVE LIST-PROCESSING. (Returns from list processing and re-processes the return screen (LEAVE TO LIST-PROCESSING))
    7. LEAVE.( Leaves the " CALL mode ")
    Reward all helpfull answers
    Regards
    Pavan

Maybe you are looking for

  • Apps' content in Chinese despite correct region set

    Hi Guys! Let me start off by saying this is my first post and I've just set up an account with sole intention to seek advice. I really hardly ever register onto online boards where I have not contributed previously and start up threads that junk it u

  • How to out from infinite while loop in sub VI

    Dear Sir, how to out from infinite while loop in sub VI from main VI attached photo for solution but I can't understand it and i can't find the function in photo  please help Attachments: stop_subVI_frm_main.JPG ‏36 KB

  • Does the KT4V have a built-in thermistor?

    Hey guys, I'm just wondering whether or not the MSI KT4V have a built-in temperature sensor (thermistor) on-board the motherboard itself? And what is that black chip in the middle of the CPU socket? Perhaps a moderator can answer this? If you know th

  • Skips & Scratch Noises during playback ...

    I am all of a sudden getting skips & scratch noises during playback on certain albums during playback on Itunes and it transferred over to my ipod ... What could be causing this and how can I get rid of it.  ( No it is not the CD it was burned from c

  • Where is the App icon for HD 1080p Video? From the online photos it should be separate from the camera App.

    Where is the App icon for HD 1080p Video? From the online photos it should be separate from the camera App. It's supposed to have a blue background with 1080p in white, while inside there is a white camera with the letters HD in blue. I cannot find t