Module pool  tips

hai to al.
    iam creating transaction screens .
    in that i want to create , change  and display the screen .
    for that iam creating  a screen .
     what are the function modules to save the data .
    can any body suggest the module pool tips for creating screen.

Read this it will help u.
Screen Flow Logic
Screen flow logic contains the procedural part of a screen. You create it in the flow logic editor in the Screen Painter, which is very similar to the ABAP Editor. The language used to program screen flow logic has a similar syntax to ABAP, but is not part of ABAP itself. It is sometimes referred to as screen language.
Unlike ABAP programs, screen flow logic contains no explicit data declarations. You define screen fields by placing elements on the screen mask.
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.
As in ABAP, the event block is introduced by the corresponding keyword statement, and it concludes either when the next block is introduced, or at the end of the program. The first two statements are created automatically by the Screen Painter when you create a new screen. The corresponding events are triggered by the runtime environment:
· 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.
As is normal with events, you must only program event blocks for the events to which you want the flow logic to react. However, the screen flow logic must contain at least the two statements PROCESS BEFORE OUTPUT and PROCESS AFTER INPUT in the correct order.
Example of Flow Logic Example
The following example shows some use of screen flow logic:
Sample Code
*Processing Before Screen Output
PROCESS BEFORE OUTPUT.
  MODULE INIT_FIELDS.
Self-programmed F1 Help
PROCESS ON HELP-REQUEST.
  FIELD GSSG-BUKRG MODULE V-BUKRG.
Processing after user input
PROCESS AFTER INPUT.
Lock customer master record
CHAIN.
  FIELD GSSG-KTNRG
     MODULE ENQUEUE_CUSTOMER_MASTER.
Read customer master record
  MODULE READ_CUSTOMER_MASTER.
Read business area
  MODULE READ_GSSG.
ENDCHAIN.
Process function code
FIELD OK-CODE MODULE OKCODE ON INPUT.
regards,
sunil kairam.

Similar Messages

  • Module pool in report

    hai abapers,
    i am having a requirement of a report which i have to call it thru transaction. this report screen no. 1000 should be assigned to the transaction, after that i need to call another module pool screen basing on the values in the screen 1000.
    give me tips how to implement this.

    i am having two screens 0100 and 1000. as u know 100 is the scr painter screen, its been visible in the screen folder at the left side (disp obj list), i want to have the same for 1000 as selection-screen selected in the atrributes. when i am trying to create the screen 1000 a message is triggered saying '1000' already exists. i need to get the screen 1000 in the obj list display
    Message was edited by: Ateeq K

  • Smart Form and Module Pool

    Can anybody provide me good step by step procedurehow create smart form and module pool programming.
    My email Id is [email protected]

    hi,
    SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
    According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name    Type assignment   Reference type
    ITAB1               TYPE                  Table Structure
    Global definitions
    Variable name    Type assignment   Reference type
    ITAB2               TYPE                  Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g.  HD_GEN for printing header details,
            IT_GEN  for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by :  SAP Hints and Tips on Configuration and ABAP/4 Programming
                        http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
            INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
       MOVE-CORRESPONDING MKPF TO INT_MKPF.
       APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        FM_NAME                  = FM_NAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 3.
    if sy-subrc <> 0.
       WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        GS_MKPF                    = INT_MKPF
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 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.
    What is SAP Smart Forms?
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms. 
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can 
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time. 
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one. 
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form. 
    PROGRAM YMPSKEL MESSAGE-ID YL.
    DESCRIPTION
    written by !
    TABLES:
    DATA: OK_CODE(4), " ok code - screen 1
    OK_CODE2(4).
    DATA C LIKE SY-INDEX. " Index for screen loop
    *& Module USER_COMMAND_0100 INPUT
    process after input for screen 0100 *
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'SAVE'.
    WHEN 'DISP'.
    WHEN 'LIST'.
    C = 0. "reset loop control
    WHEN OTHERS.
    ENDCASE.
    CLEAR OK_CODE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    process before output for screen 0100 *
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'AMEND'. " set gui status
    SET TITLEBAR '100'. " set title
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Form SAVE data
    Save screen details
    FORM SAVE.
    CLEAR OK_CODE.
    ENDFORM.
    *& Form DISPLAY
    FORM DISPLAY.
    ENDFORM.
    *& Module EXIT_COMMAND INPUT
    exit commands are processed before validation *
    defined by E against function in menu painter(function list)
    MODULE EXIT_COMMAND INPUT.
    CASE OK_CODE.
    WHEN 'EXIT'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'CANC'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'BACK'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
    ENDCASE.
    ENDMODULE. " EXIT_COMMAND INPUT
    *& Form list
    text *
    FORM LIST.
    CLEAR OK_CODE. SET SCREEN 200. LEAVE SCREEN.
    ENDFORM. " LIST
    *& Module EXIT_COMMAND_200 INPUT
    exit command processing for screen 200 *
    defined by E against function in menu painter(function list)
    MODULE EXIT_COMMAND_200 INPUT.
    CASE OK_CODE2.
    WHEN 'EXIT'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'CANC'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'BACK'. CLEAR OK_CODE2. SET SCREEN 100. LEAVE SCREEN.
    ENDCASE.
    ENDMODULE. " EXIT_COMMAND_200 INPUT
    *& Module STATUS_0200 OUTPUT
    process before output for screen 200 *
    MODULE STATUS_0200 OUTPUT.
    SET PF-STATUS 'POPUP'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_0200 OUTPUT
    Module pool programs are created in abap development work bench (TCODE: SE80).
    Here we can do all the works whatever you can do in abap.
    Module pool programs are also called dialog programs.
    The module Pool are reports prepared for different screens and to manage the sequence of events of these screens, in the transaction SE80 you can see all the dynpros that you have for this kind of report, add new ones, add all types of element to the report.
    Process Before Output is the part of the dynpro code that is processed before the user can do anything with the data in the screen
    Process After Input is the part of the dynpro code that is processed after the interaction with the user.
    module pool programs are excuted using Tcodes
    regards,
    sreelakshmi

  • 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

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           exceptions
                client_reference             = 1
                foreign_lock                 = 2
                invalid_action               = 3
                no_clientindependent_auth    = 4
                no_database_function         = 5
                no_editor_function           = 6
                no_show_auth                 = 7
                no_tvdir_entry               = 8
                no_upd_auth                  = 9
                only_show_allowed            = 10
                system_failure               = 11
                unknown_field_in_dba_sellist = 12
                view_not_found               = 13
                others                       = 14.
    Regards,
    RIch Heilman

  • Error while transporting modification in module pool of a specific infotype

    HI experts,
    While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
    Any suggestion .
    Tanhks a lot .

    Hi ,
    Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
    And it would be great if you can just put in your remarks about the best  solution you had in solving that problem.
    It might be useful to other users when they encoutner such problem.
    BR,
    Vijay.

  • Getting error while calling a subscreen in  module pool program

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

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

  • 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".

  • Can we use Initilization event in module pool program?

    Hi All,
    Can we use Initialization event in module pool program? If not why?
    Thanks In Advance!!!!!!!!!

    The runtime environment creates the INITIALIZATION event and calls the corresponding event block (if it has been defined in the ABAP program).
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    SEE THE ABOVE LINK...THINK IT WILL SOLVE ALL YOUR DOUBTS
    REGARDS
    RACHEL

  • Module Pool - Table Control - Data not getting displayed in Control

    Hi,
    I have a table contol in my module pool program. In my processing I am filling an internal table & then in my PBO I am linking the internal table to table control. The issue is that even though the internal table is getting filled correctly (found through debugging), the data is not getting populated in table control. Nothing is populated on screen. I am writing part of code below
    Declaration:
    Types: begin of ty_control,
            SELECTED TYPE C,
            TEXT TYPE DPR_CAUSE_T-TEXT,
          end of ty_control.
    CONTROLS :  TBL_CONT TYPE TABLEVIEW USING SCREEN '9001'.
    DATA:       lt_table_cont type TABLE OF ty_control with header line.
    Fields in TBL_CONT:
       TBL_CONT-SELECTED
      TBL_CONT-TEXT
    PBO Flow Logic:
      MODULE STATUS_9001.
    MODULE fill_data.
      LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
      ENDLOOP.
    PAI Flow Logic:
    Loop at lt_table_cont.
       MODULE UPDATE_DATA.
    endloop.
    MODULE USER_COMMAND_9001.
    PLZ let me know what might be the problem. I have been trying to figure out but cant.
    Thanks.

    Hi Sonali,
               When ever you need to do anything with the table control, i mean if u want to display data in table control or you want to validate the data entered in table control Should be done within Loop and Endloop.(PBO or PAI's which ever is appropriate)
    Here the data is not bieng displayed in ur table control because you have not used the MODULE fill_data  between
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    ENDLOOP.
    so do it like this
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    MODULE fill_data 
    ENDLOOP.
    this will solve your problem.
    Regards,
    Syed

  • Text elements in module pool

    Hi,
    How can we print Descriptions and other text as text lable in module pool????
    Thx,
    Shashi.

    Hi,
    IF you want text for box heading in moodule pool...
    than just double click on that box and write for lable in text part of attribute window.
    <REMOVED BY MODERATOR>
    Gaurav J.
    Edited by: Alvaro Tejada Galindo on Aug 15, 2008 3:46 PM

  • 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.

  • Remove field in Alv grid module pool

    Hi Experts,
    I have a requirement where in I need to remove a field on the display screen for a particular record.
    In detail..
    I have a created a module pool program where in the final out put was shown using CL_gui_alv_grid on the new screen.The normal display will start with a check box(editable),kunnr,ktokd etc..The requirement is for a particular record the check box should either disappear or disable.Please help me out in achieving this.Thanks in advance.
    Initially I got very good response from Neha and Satya and felt very confident enough in the fix but I dont know where I am doing wrong the issue is not yet fixed.Satya or Neha can you tell me where am I doing wrong seeing the below code.
    types:BEGIN OF lty_final,
          chbox       TYPE char1,
          org_nam     TYPE name1_gp,
          vkorg       TYPE vkorg,
          parvw       TYPE parvw,
          ktokd       TYPE ktokd,
          kunnr       TYPE kunnr,
          pr_cnt      TYPE char3,
          fir_nam     TYPE name1_gp,
          las_nam     TYPE name1_gp,
          parau       TYPE parau,
          telf1       TYPE telf1,
          STYLE       TYPE lvc_t_styl,        " New field added in the structure
         END OF lty_final.
    data:lt_final type table of lty_final,
           ls_final type lty_final.
    DATA : ls_stylerow TYPE lvc_s_styl ,
           lt_styletab TYPE lvc_t_styl .
    loop at lt_final into ls_final.          """Final internal table
        if ls_final-pr_cnt = lc_yes.
          ls_stylerow-FIELDNAME = 'CHBOX'.
          ls_stylerow-STYLE     = cl_gui_alv_grid=>mc_style_disabled .
          APPEND ls_stylerow TO lt_styletab.
          CLEAR ls_stylerow.
          ls_final-STYLE = LT_STYLETAB.
          MODIFY lt_final INDEX sy-tabix FROM ls_final TRANSPORTING style.
        endif.
      endloop.
    gs_layout-zebra        = 'X'.
      gs_layout-edit         = ' '.
      gs_layout-no_rowmark   = 'X'.
      gs_layout-stylefname   = 'LT_STYLETAB'.
      CALL METHOD grid_display->set_table_for_first_display
        EXPORTING
          i_save                        = 'X'
          i_default                     = 'X'
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = lt_final
          it_fieldcatalog               = gt_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    With Regards,
    Srini...

    Use the following codes in loop it will work.
    Loop at lt_final into ls_final. """Final internal table
    if ls_final-pr_cnt = lc_yes.
    ls_stylerow-FIELDNAME = 'CHBOX'.
    ls_stylerow-STYLE = cl_gui_alv_grid=>mc_style_disabled .
    INSERT ls_stylerow  INTO TABLE lt_final-STYLE.                         " use insert
    *APPEND ls_stylerow TO lt_styletab.
    *CLEAR ls_stylerow.
    *ls_final-STYLE = LT_STYLETAB.
    *MODIFY lt_final INDEX sy-tabix FROM ls_final TRANSPORTING style.
    endif.
    endloop.
    Regards,
    Gurpreet

  • Regarding selection-screen in module pool

    hi
    experts,
    i am having doubt in module pool programing...
      i want create selection screen(pop screen with field)  in modulepool., before the display screeen deatils
    ex :   if i want display the   record   details  for  that particular
    record number.......
    while  i am click on display..
      pop-up-selection screen will come  with record number field..
    i f enter the record no, display s the  details...
    Ananand

    Please see Rich's answer here:
    [Dialog programming - How to place a select-option field in a dialog screen;
    Rob

Maybe you are looking for

  • How to set PR Quantity = GR qty in PO

    Hi,     I have a PR of 100 Qty. I converted the PR in PO . Now I made a GR of 80 qty. Remaining 20 Qty I dont expect any more from vendor.  The question is: If there is any way to set the Open quantity as 0 in PR Quantity/dates Tab(without manually c

  • JAVA_HOME does not point to the JDK Error.

    Hello Friends,                      I unable build my local DC due problem with JAVA_HOME Parameter. I am using j2sdk1.4.2_08. Is this a problem. (JDK Version). I have checked the file C:\usr\sap\J2E\JC00\work\dev_server0 I got the following error wh

  • Extracting data from multiple tables using DB connect

    Hi,    I am having different tables which are  having the same structure in oracle database but  there names are different.Now i have only one datasource at BI side.This datasource shld extract data from the  tables dynamically.How can i do it using

  • Photoshop elements 12 download issues

    trying to down load new software for  photoshop elements 12, after i enter the 24 digit redemtion code, i click onto the redeem bar and get nothing, can you help?

  • SWIG - byte array as IN parameter

    Hello J-Programmers! It is about native calls. I have a remaining problem for weeks. SWIG is used to generate JNI code so as to build a Java interface of a home-made native library. The goal is to "pass a byte[ ] from Java to C as an input parameter"