Showing/Hiding icons in Module Pool

Hi,
I have the requirement to dynamically show/hide an icon (based on conditions) on the module pool screen. Please let me know as to how this can be done.
Regards,
Divya.

Hi,
You can do it in the PBO event,
IF xxxxxx   " Write your condition
LOOP AT SCREEN.
IF SCREEN-NAME = 'xxxx'.  " Screen field name
SCREEN-ACTIVE = 0.
SCREEN -INVISIBLE = 1.
Modify SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

Similar Messages

  • Icon display in Module pool screen not visible to some users

    Hi,
    I have added an icon in one of the module pool screen with dynamic quick info.  The page is rendered fine and the info is also displayed well for most users except some.  I can't figure out why the icon is not being displayed for some users.
    Do someone has any solution for this?
    Thanks,
    Sumith

    As I recall, the icons are actually stored in a file on each PC so some users may have a corrupted or out-of-date file with the icons.  You can look for posting on "how to add an icon" to see a discussion on this topic.
    I found some useful info at:
    Create and Add Icons to table ICON?
    Message was edited by: Charles Folwell

  • Module pool save icon

    Hi all,
    i have a module pool program where it's used for creating,modifing a business object. i have a save icon in application tool bar to save the code .
    but the problem here is in the modification part where  i have a table control and the data which is modified is being saved correctly but i have another icon(not in app tool bar) where it's used to delete a particular row in the table control. and when iam saving it, the row is not being deleted from the database table .can anyone help me in this issue.
    PAI
    MODULE USER_COMMAND_0110 INPUT.
      case ok_code.
           when 'DELCON'.
          perform delete_condition_row.
          refresh control 'TAB_COND' from screen '1004'.
      endcase.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    FORM delete_join_row .
       DATA L_SELLINE          LIKE SY-STEPL.
       GET CURSOR LINE L_SELLINE.
       DELETE g_TAB_join_itab INDEX L_SELLINE.
    ENDFORM.                    " delete_join_row
    MODULE USER_COMMAND_1000 INPUT.
    case ok_code.
      when 'save'.
          data zgnx_cond_tab type table of zgnx_condition.
          data zgnx_cond_wa type zgnx_condition.
          refresh: zgnx_cond_tab.
          clear: zgnx_cond_wa.
          loop at g_TAB_COND_itab
          into g_TAB_COND_wa.
            move-corresponding g_TAB_COND_wa to zgnx_cond_wa.
            zgnx_cond_wa-obj_name = SCR1000-OBJ_NAME.
            append zgnx_cond_wa to zgnx_cond_tab.
          endloop.
         MODIFY zgnx_condition from table zgnx_cond_tab.
    ENDMODULE.
    This is the code that i have used.

    You have not coded to delete from the db table, only from the internal table.
    FORM delete_join_row .
    DATA L_SELLINE LIKE SY-STEPL.
    GET CURSOR LINE L_SELLINE.
    <b>DELETE g_TAB_join_itab INDEX L_SELLINE.</b>
    ENDFORM. "
    Regards,
    RIch Heilman

  • Hiding navigation area from transaction screen--module pool

    Using module pool, i am displaying a transaction screen at the click of a button.
    This transaction screen also has a small navigation screen appearing on the left.I want to hide this navigation area.
    How do I do it.

    Hi,
    Usually this is done by using the DOCKING container. You can call the method of SET_VISIBLE of the class CL_GUI_DOCKING_CONTAINER.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • 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
         &#56256;&#56510;&#61472;
    Introduction to Dialog Programming
         &#56256;&#56510;&#61472;
    Transactions
    &#61472;Screens (dynpros)
    ABAP/4 module pool
    Transferring Field Data
    Field Attributes
    Error Dialogs
    Data Consistency
    Dynpro
    Layout
         &#56256;&#56510;&#61472;
    Exercise
    TABLE CONTROL
         &#56256;&#56510;&#61472;
    Functional scope
         &#56256;&#56510;&#61472;
    Programming
         &#56256;&#56510;&#61472;
    Attributes
         &#56256;&#56510;&#61472;
    EXERCISE
    TABSTRIP CONTROLS
         &#56256;&#56510;&#61472;
    Defining the Tabstrip Control Area and Tab Titles
         &#56256;&#56510;&#61472;
    Assigning a Subscreen Area to a Tab Title
         &#56256;&#56510;&#61472;
    Paging in the SAPgui
         &#56256;&#56510;&#61472;
    Programming the Flow Logic
         &#56256;&#56510;&#61472;
    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:
    _&#61472;a user-friendly user interface
    _&#61472;format and consistency checks for the data entered by the user
    _&#61472;easy correction of input errors
    _&#61472;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
    &#61472;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:
    &#61472;Flow logic: Calls of the ABAP/4 modules for a screen.
    &#61472;Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen.
    &#61472;Screen attributes: Number of the screen, number of the subsequent screen, and others.
    &#61472;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:
    &#61472;Global fields: data declarations that can be used by all modules in the module pool
    &#61472;PBO modules: modules that are called before displaying the screen
    &#61472;PAI modules: modules that are called in response to the user input
    &#61472;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

  • Module pool using ABAP Objects

    Hi All ,
         I have a requirement for creating a transaction/module pool prog using OO ABAP  .
        Can you please send some sample documents to guide completely about the creation and execution of the transaction .
    Rewards are assured !!
    Regards,
    Ranjita

    Hi
    see this code for ALV report in which we used the Modules which is similar to Module pool
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    Example:
    REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L I N T E R N A L T A B L E S
    *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
    Field for traffic light
    TYPES: traffic_light TYPE c.
    Field for line color
    types: line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    G L O B A L D A T A
    DATA: ok_code LIKE sy-ucomm,
    Work area for internal table
    g_wa_sflight TYPE st_sflight,
    ALV control: Layout structure
    gs_layout TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container,
    o_event_receiver TYPE REF TO lcl_event_receiver.
    DATA:
    Work area for screen 200
    g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
    DATA:
    Internal table
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu TYPE i VALUE 2,
    c_separator TYPE i VALUE 3,
    c_radio_button TYPE i VALUE 4,
    c_checkbox TYPE i VALUE 5,
    c_menu_entry TYPE i VALUE 6.
    DATA:
    ls_toolbar TYPE stb_button.
    Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
    Append a new button that to the toolbar. Use E_OBJECT of
    event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
    This class has one attribute MT_TOOLBAR which is of table type
    TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
    Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
    PERFORM change_flight.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    DATA:
    For parameter IS_VARIANT that is sued to set up options for storing
    the grid layout as a variant in method set_table_for_first_display
    l_layout TYPE disvariant,
    Utillity field
    l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
    EXPORTING
    it_index_rows = gi_index_rows.
    CALL METHOD cl_gui_cfw=>flush.
    REFRESH gi_index_rows.
    ENDIF.
    Read data and create objects
    IF go_custom_container IS INITIAL.
    Read data from datbase table
    PERFORM get_data.
    Create objects for container and ALV grid
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_custom_container.
    Create object for event_receiver class
    and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    Layout (Variant) for ALV grid
    l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
    Set grid title
    gs_layout-grid_title = 'Flights'.
    Selection mode - Single row without buttons
    (This is the default mode
    gs_layout-sel_mode = 'B'.
    Name of the exception field (Traffic light field) and the color
    field + set the exception and color field of the table
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    Value of traffic light field
    g_wa_sflight-traffic_light = '1'.
    Value of color field:
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
    is_variant = l_layout
    i_save = 'A'
    is_layout = gs_layout
    CHANGING it_outtab = gi_sflight.
    *-- End of grid setup -
    Raise event toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
    Set focus to the grid. This is not necessary in this
    example as there is only one control on the screen
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0200 INPUT
    MODULE user_command_0200 INPUT.
    CASE ok_code.
    WHEN 'EXIT200'.
    LEAVE TO SCREEN 100.
    WHEN'SAVE'.
    PERFORM save_changes.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    *& Form get_data
    FORM get_data.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    ENDFORM. " load_data_into_grid
    *& Form change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
    FORM change_flight.
    DATA:l_lines TYPE i.
    REFRESH gi_index_rows.
    CLEAR g_selected_row.
    Read index of selected rows
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table gi_index_rows will be empty
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
    textline1 = 'You must choose a line'.
    EXIT.
    ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
    LOOP AT gi_index_rows INTO g_selected_row.
    IF sy-tabix = 1.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
    CLEAR g_screen200.
    MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
    LEAVE TO SCREEN '200'.
    ENDFORM. " change_flight
    *& Form save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
    FORM save_changes.
    DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
    MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
    MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    clear g_wa_sflight-line_color.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    clear g_wa_sflight-line_color.
    ENDIF.
    MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    LEAVE TO SCREEN '100'.
    ENDFORM. " save_changes
    chk this blog
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    Reward points if useful
    Regards
    Anji

  • Regarding Module Pool Screen Painter

    Dear All,
    Hi all. When i am using 4.7 i am able to see all the icons like check box .radio buttons,push buttons ,table control and all . There i can drag  and drop on the screen easily . I can see this all icons on the left side in the screen painter.  In ecc  i tried to create a module pool program. In that screen painter i am not able to see these icons in that screen .
    When i am clicking on layout on initial screen it is showing ''''EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' '''' . That is also in text format with some lines and all.  I was totally struck here . Please help me in  this .
    Regards,
    Madhu.

    How can you solve the problem ? Please explain it.

  • Hi i need material for module pool and alv's.

    hi
      i need material for module pool and ALV's(not object oriented) if any one have pls do send that to my
    ID [email protected]
    thanx in advance.

    Hi
    Check the below link:
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    You can also check the transaction ABAPDOCU which gives you lot of sample programs.
    Also you can see the below examples...
    Go to se38 and give demodynpro and press F4.
    YOu will get a list of demo module pool programs.
    One more T-Code is ABAPDOCU.
    YOu can find more examples there.
    See the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    ALV
    ABAP List Viewer
    The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
    This helps us to implement all the features mentioned very effectively.
    Using ALV, We can have three types of reports:
    1. Simple Report
    2. Block Report
    3. Hierarchical Sequential Report
    There are some function modules which will enable to produce the above reports without much effort.
    All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
    1. SIMPLE REPORT.
    The important function modules are
    a. Reuse_alv_list_display
    b. Reuse_alv_fieldcatalog_merge
    c. Reuse_alv_events_get
    d. Reuse_alv_commentary_write
    e. Reuse_alv_grid_display
    A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
    Parameters :
    I. Import :
    Et_Events : The event table is returned with all possible CALLBACK events
    for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
    II. Export :
    I_List_type :
    0 = simple list REUSE_ALV_LIST_DISPLAY
    1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
    2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
    3 = hierarchical-sequential block list
    REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
    Parameters :
    I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
    This internal table has three fields :
    Typ : ‘H’ – header, ‘S’ – selection , ‘A’ - action
    Key : only when typ is ‘S’.
    Info : the text to be printed
    E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
    Parameters : same as reuse_alv_list_display
    This is an example for simple list.
    2. BLOCK REPORT
    This is used to have multiple lists continuously.
    The important functions used in this report are:
    A. REUSE_ALV_BLOCK_LIST_INIT
    B. REUSE_ALV_BLOCK_LIST_APPEND
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    A. REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I. I_CALLBACK_PROGRAM
    II. I_CALLBACK_PF_STATUS_SET
    III. I_CALLBACK_USER_COMMAND
    This function module is used to set the default gui status etc.
    B. REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
    Export :
    I. is_layout : layout settings for block
    II. it_fieldcat : field catalog
    III. i_tabname : internal table name with output data
    IV. it_events : internal table with all possible events
    Tables :
    i. t_outtab : internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    This function module is used for hierarchical sequential blocks.
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters : All the parameters are optional.
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
    3. Hierarchical reports :
    Hierarchical sequential list output.
    The function module is
    A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Parameters:
    I. Export:
    i. I_CALLBACK_PROGRAM
    ii. I_CALLBACK_PF_STATUS_SET
    iii. I_CALLBACK_USER_COMMAND
    iv. IS_LAYOUT
    v. IT_FIELDCAT
    vi. IT_EVENTS
    vii. i_tabname_header : Name of the internal table in the program containing the
    output data of the highest hierarchy level.
    viii. i_tabname_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    ix. is_keyinfo : This structure contains the header and item table field
    names which link the two tables (shared key).
    II. Tables
    i. t_outtab_header : Header table with data to be output
    ii. t_outtab_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
    Important Attributes :
    A. col_pos : position of the column
    B. fieldname : internal fieldname
    C. tabname : internal table name
    D. ref_fieldname : fieldname (dictionary)
    E. ref_tabname : table (dictionary)
    F. key(1) : column with key-color
    G. icon(1) : icon
    H. symbol(1) : symbol
    I. checkbox(1) : checkbox
    J. just(1) : (R)ight (L)eft (C)ent.
    K. do_sum(1) : sum up
    L. no_out(1) : (O)blig.(X)no out
    M. outputlen : output length
    N. seltext_l : long key word
    O. seltext_m : middle key word
    P. seltext_s : short key word
    Q. reptext_ddic : heading (ddic)
    R. ddictxt(1) : (S)hort (M)iddle (L)ong
    S. datatype : datatype
    T. hotspot(1) : hotspot
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Reward points if useful
    Regards
    Anji

  • Module pool - table control - update ztable

    hello , i doing a module pool that will have few screens , now i have one screen with a table control that fetch the data from a ztable when screen is call the table control is showing the data and is in grey and no editable i add a pf-status for change that mode i can delete the row from the table control but i don't figure out how update to the ztable when i press save , i wan't too another button for add a new row ( and remain the already in grey ) for add new entrie in the table and update the ztable
    pd: sorry for my bad english
    this is my code:
    TOP:
    PROGRAM  z_pp_lote_etiquetas MESSAGE-ID zz.
    TABLES:zc2p_lote_etique,
           zc2p_lider_modul.
    DATA: ok_code LIKE sy-ucomm.
    DATA save_ok LIKE sy-ucomm.
    * internal table
    DATA: it_zc2p_lote_etique LIKE STANDARD TABLE OF zc2p_lote_etique.
    DATA: it_zc2p_lider_modul TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    DATA: it_zc2p_lider_modul_del TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    **************Workarea
    DATA: wa_c2p_lote_etique TYPE zc2p_lote_etique.
    DATA: wa_c2p_lider_modul TYPE zc2p_lider_modul.
    DATA: wa_c2p_lider_modul_del TYPE zc2p_lider_modul.
    DATA: sel.
    DATA: MARK.
    DATA: init.
    DATA:  col TYPE scxtab_column.
    DATA: lines TYPE i.
    * Variable Declaration
    DATA : flg, "Flag to set the change mode
    ln TYPE i. "No. of records
    * Table Control Declartion.
    CONTROLS: zc2p_lider_crtl TYPE TABLEVIEW USING SCREEN '101'.
    **PROCESS BEFORE OUTPUT INCLUDE **
    *&  Include           Z_PP_LOTE_ETIQUETAS_O01
    *& Module set_status OUTPUT
    * Setting the GUI status
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_MENU'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    ENDMODULE. " set_status OUTPUT screen 100
    *  MODULE status_0101 OUTPUT
    * Setting the GUI status
    MODULE status_0101 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_ME_101'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    * Data retreving
      if init is INITIAL.
      select * from zc2p_lider_modul into CORRESPONDING FIELDS OF TABLE it_zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES ln.
        zc2p_lider_crtl-lines = ln + 10.
        init = 'X'.
    endif.
    ENDMODULE.                    "status_0101 OUTPUT
    module change_sdyn_conn output.
    * you can change the content of current table control line via
    * sdyn_conn
      READ TABLE it_zc2p_lider_modul INTO zc2p_lider_modul INDEX zc2p_lider_crtl-current_line.
    endmodule.                             " FILL_TABLE_CONTROL  OUTPUT
    MODULE set_screen_fields OUTPUT.
    LOOP AT SCREEN.
    IF flg IS INITIAL.
    screen-input = 0.
    ELSE.
    screen-input = 1.
    ENDIF.
    *ENDIF.
    * Modifying the screen after making changes
    MODIFY SCREEN.
    ENDLOOP.
    ENDMODULE. " set_screen_fields OUTPUT
    PROCESS AFTER INPUT INCLUDE.
    *  MODULE USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'LIDM'.
          CALL SCREEN 101.
        WHEN 'CANC'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0100 INPUT
    *  MODULE USER_COMMAND_0101 INPUT
    MODULE user_command_0101 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'SORT'.
          DATA: fldname(100),help(100).
          READ TABLE zc2p_lider_crtl-cols INTO col WITH KEY selected = 'X'.
          SPLIT col-screen-name AT '-' INTO help fldname.
          SORT it_zc2p_lider_modul BY (fldname).
        WHEN 'CHANGE'.
    * Setting the flag to make the table control in editable mode[excluding
    * primary key].
          flg = 'Y'.
        WHEN 'BACK'.
          CALL SCREEN 100.
          LEAVE SCREEN.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          MODIFY  zc2p_lider_modul FROM it_zc2p_lider_modul.
          COMMIT WORK.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0101 INPUT
    *  MODULE read_table_control INPUT
    MODULE read_table_control INPUT.
    * Check input values
      IF mark = 'X' AND save_ok = 'DELETE'.
        DELETE TABLE it_zc2p_lider_modul FROM zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES zc2p_lider_crtl-lines.
      ENDIF.
    ENDMODULE.                             " READ_TABLE_CONTROL  INPUT
    Screen Flow Logic 100
    PROCESS BEFORE OUTPUT.
    MODULE status_0100.
    PROCESS AFTER INPUT.
    MODULE user_command_0100.
    Screen Flow Logic 101.
    PROCESS BEFORE OUTPUT.
      MODULE status_0101.
      LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    zc2p_lider_crtl.
    * Dynamic screen modifications
        MODULE set_screen_fields.
        MODULE change_sdyn_conn.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0101.
      LOOP AT it_zc2p_lider_modul.
        MODULE read_table_control.
      ENDLOOP.
    i hope somebody can help for what i missing here  thanks

    >
    Sanjeev Kumar wrote:
    > Hello Edgar,
    >
    > Problem seems to be there in the flow logic of 101
    >
    >
    > PROCESS BEFORE OUTPUT.
    >   MODULE status_0101.
    >   LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    > zc2p_lider_crtl. " no need to have 'INTO zc2p_lider_modul' above
    > * Dynamic screen modifications
    >     MODULE set_screen_fields.
    >     MODULE change_sdyn_conn.
    >   ENDLOOP.
    > *
    > PROCESS AFTER INPUT.
    >   MODULE user_command_0101. "this should be shifted after the following LOOP...ENDLOOP.

    >   LOOP AT it_zc2p_lider_modul. "need to have 'WITH CONTROL zc2p_lider_crtl' here
    >     MODULE read_table_control.
    >   ENDLOOP.
    >
    >
    >
    > With MODULE user_command_0101 call before the LOOP calls the MODIFY statement (under case save_ok 'SAVE') first and Z-table is updated with the old values as the changes are transferred from screen into the internal table it_zc2p_lider_modul in the LOOP...ENDLOOP later.
    >
    > Try these changes and I hope it will work.
    >
    > Thanks
    > Sanjeev
    i do the firts advice but the second one i get syntax error :
    my code :
    PROCESS AFTER INPUT.
      LOOP  at it_zc2p_lider_modul WITH CONTROL zc2p_lider_crtl.
        MODULE read_table_control.
      ENDLOOP.
       MODULE user_command_0101.
    error :
    In the event PROCESS AFTER INPUT, no additions are allowed with "LOOP     
    AT".

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

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

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

  • How to make a fld mandatory in module pool program?

    I need help on following 2 things
    I have module pool program created, in that many screen subscreens created.
    1.I want to make a field mandatory
    second one  is, I have a general tab and  data tab.
    General tab screen - 2101
    Data tab = 2102
    In general tab, I have edited the values (change mode), when change the values and try to save it,
    It is holding old value.but If i exucute the transaction once again, it is showing the changed value(new value)
    For ex: there is a date field  value is 03/08/2009
    If I change this to 03/09/2009 and press on Save button from the standard menu, still it is showing the  value 03/08/2009. but I execute this transaction once again it is showing the value as 03/09/2009
    I will be thankful if someone helps me here

    Hi Chitra,
    Go to the properties of the filed select program tab and say input required.
    then you will get the problem solved.
    For second one actually its saving but not displaying the saved value at the same time ,
    for this you write the select statement after saving , so that once save is execute m, select statement also will execute  and it will display the newly saved value.
    so after saving imdeatly u write the select statement.
    like case sy-ucomm.
    when 'SAVE'.
    insert ztable.
    select filed from z table.
    endcase.
    let me know if ur problem solved.
    Regards
    Rajendra

  • F4 help for a field in module pool

    Hello Experts,
    I need to provide f4 help on field sales office(VKBUR) in my module pool program.
    I have searched forums about it. but all forum contains either doc. no or customers etc.
    these field are directly available on table, so very easy to find.
    But for sales office, how can i provide f4 help. there is no straight entries in tables like for this company code this sales office.
    so its getting difficult for me to provide help.
    so if anybody know the solution plz help, and if anyone know table where all sales offices are stored, i will be thankful.
    Thanks,
    Amar

    Hi amar_war,
    use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
    H_TVBUR has no more parameters, it will display a list of al sales offices with description text
    H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
    H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
    If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
    Try standard search help for standard field first.
    You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
    Regards,
    Clemens

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts,
    I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
    I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
    Please provide solution.
    Thanks in advance.
    Regards
    Deepak

    This is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
    *& Module pool       ZMP_LTEXT                                         *
    PROGRAM  ZMP_LTEXT                               .
    TABLES: STXL.
    *&      Module  STATUS_9000  OUTPUT
    MODULE STATUS_9000 OUTPUT.
    CONSTANTS:line_length type i value 132.
    DATA:g_editor type ref to cl_gui_textedit,
         g_editor_container type ref to cl_gui_custom_container,
         CONT1 type scrfname value 'CONT1',
         g_repid like sy-repid,
         g_ok_code like sy-ucomm,
         g_mytable(132) type c occurs 0,
         g_mycontainer(30) type c ,
         v_result(256) type c,
         g_head like thead,
         it_line type table of tline with header line,
         wa_stxl type stxl.
    DATA : BEGIN OF IT_THEAD1,
           ICON TYPE ICON-ID.
           INCLUDE STRUCTURE STXL.
    DATA : END OF IT_THEAD1.
    DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
           WA_THEAD LIKE LINE OF IT_THEAD.
    IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
    select SINGLE * from STXL into wa_stxl
                     where tdname = '00006000156500000002'.
    SELECT SINGLE * from STXL into wa_stxl
                      where tdname = WA_THEAD-TDNAME
                      AND TDID = WA_THEAD-TDID
                      AND TDOBJECT = WA_THEAD-TDOBJECT
                      AND TDSPRAS = WA_THEAD-TDSPRAS.
    IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD EXIST' TYPE 'E'.
    ENDIF.
    MOVE-CORRESPONDING WA_STXL TO G_HEAD.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR '001'.
      if g_editor is initial.
         CREATE OBJECT G_EDITOR_CONTAINER
           EXPORTING
            PARENT                      =
             CONTAINER_NAME              = CONT1
            STYLE                       =
            LIFETIME                    = lifetime_default
            REPID                       =
            DYNNR                       =
            NO_AUTODEF_PROGID_DYNNR     =
           EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
             others                      = 6.
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT G_EDITOR
           EXPORTING
            MAX_NUMBER_CHARS       =
            STYLE                  = 0
       WORDWRAP_MODE          = cl_gui_textedit=>wordwrap_at_fixed_position
    for to fix number of characters in row to 132 characers
             WORDWRAP_POSITION      = line_length
             WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
    for the word to break to next line if it don’t fit in line
            FILEDROP_MODE          = DROPFILE_EVENT_OFF
             PARENT                 = G_EDITOR_CONTAINER
            LIFETIME               =
            NAME                   =
           EXCEPTIONS
            ERROR_CNTL_CREATE      = 1
            ERROR_CNTL_INIT        = 2
            ERROR_CNTL_LINK        = 3
            ERROR_DP_CREATE        = 4
            GUI_TYPE_NOT_SUPPORTED = 5
             others                 = 6  .
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
      REFRESH g_mytable.
         MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
               WA_THEAD-TDID TO STXL-TDID,
               WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
               WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
        CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = wa_stxl-tdid
          LANGUAGE                      = wa_stxl-tdspras
          NAME                          = wa_stxl-tdname
          OBJECT                        = wa_stxl-tdobject
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          LINES                         = it_line
      EXCEPTIONS
        ID                            = 1
        LANGUAGE                      = 2
        NAME                          = 3
        NOT_FOUND                     = 4
        OBJECT                        = 5
        REFERENCE_CHECK               = 6
        WRONG_ACCESS_TO_ARCHIVE       = 7
        OTHERS                        = 8
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT IT_LINE INTO V_RESULT.
       APPEND V_RESULT TO G_MYTABLE.
    ENDLOOP.
    CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
       EXPORTING
         TABLE           = G_MYTABLE
       EXCEPTIONS
         ERROR_DP        = 1
         ERROR_DP_CREATE = 2
         others          = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       endif.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
      WHEN 'SAVE'.
         CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
          EXPORTING
            ONLY_WHEN_MODIFIED     = FALSE
            IMPORTING
              TABLE                  = G_MYTABLE
            IS_MODIFIED            =
          EXCEPTIONS
            ERROR_DP               = 1
            ERROR_CNTL_CALL_METHOD = 2
            ERROR_DP_CREATE        = 3
            POTENTIAL_DATA_LOSS    = 4
            others                 = 5
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    LOOP AT G_MYTABLE INTO V_RESULT.
       APPEND V_RESULT TO IT_LINE.
    ENDLOOP.
    CLEAR V_RESULT.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = G_HEAD
            INSERT                = ' '
            SAVEMODE_DIRECT       = 'X'
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            LINES                 = IT_LINE
        EXCEPTIONS
          ID                    = 1
          LANGUAGE              = 2
          NAME                  = 3
          OBJECT                = 4
          OTHERS                = 5
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN '0'.
    *CALL SCREEN '0'.
    WHEN OTHERS.
    ENDCASE.
    *G_OK_CODE = SY-UCOMM.
    *CLEAR SY-UCOMM.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

  • How to retain leading zeros in module pool screen

    Hi experts,
    I have a ztable field of type NUMC4 being displayed on a module pool screen, the value in the field is '0001', but on the screen it displays value as '1' (without leading zeros), When I save the record, Even in the databse it stores as '1'.
    But I have checked in debugging the field always contains '0001' in the program execution and I have also used 'CONVERSION_EXIT_ALPHA_INPUT' in the PBO but no use.
    Pls suggest.
    Thanks,
    Deepak

    Check the screen attributes for the field. There is an option to show leading zeroes.
    edit.
    And how did you see it was stored a 1 and not 0001? Using SE16N? Mind you: with SE16N conversion-exits are executed automatically thus showing 0001 as 1.
    To make sure: double click on the record in SE16N and look if it's still 1 and not 0001.

  • How to display logo in module pool screen

    Hi,
    I need to display a logo in the screen of module pool programming. I have already imported the logo image using transaction OAER.
    Please suggest how to display the image in the screen..
    Thanks and Regards,
    Sayan Ghosh

    You can show the image using the calss
    CL_DD_DOCUMENT
    For reference how to use the class
    check the example program
    DD_ADD_PICTURE

Maybe you are looking for