How to call a text editor from a module pool program

Hi All,
I want to call the text editor from my modulepool program. Enter my text in it and save it.This text needs to be saved in a Z-program with 2 fields as primary keys. The next time while I call this same record from this z table, I need to fetch the existing text and display it.
The user now can put in additional text and can again save it. This process thus goes on..
If anyone has worked in this type of scenario, then please help me in doing this.
Useful answers will surely be rewarded.
Thanks,
Susanth.

Hi Sushanth,
We save the text not as fields in a ztable directly but as a text.Please check the format below since it is based on a working code....
first you need to create a text in s010 transaction...
there should be some key based on which you plan to save the text..imagine it is Purchase order then..PO+item numner is always unique.eg:0090010(900PO/item10).so in the code you can append these two and they will be unique..so you can always retrieve them,overwrite,save them anytime you need
**************data declarations
TYPES: BEGIN OF TY_EDITOR,
EDIT(254) TYPE C,
END OF TY_EDITOR.
data: int_line type table of tline with header line.
data: gw_thead like thead.
data: int_table type standard table of ty_editor.
****************fill header..from SO10 t-code..when you save you need the unique key..youfill it here and pass it in save_text function module
GW_THEAD-TDNAME = loc_nam. " unique key for the text -> our unique key to identify the text
GW_THEAD-TDID = 'ST'. " Text ID from SO10
GW_THEAD-TDSPRAS = SY-LANGU. "current language
GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created in SO10
*To Read from Container and get data to int_table
CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = int_table
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 data from int_table and save to int_line-tdline appending it.
*save the text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = GW_THEAD
TABLES
LINES = InT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC 0.
ENDIF.
*To pass to Container
CALL METHOD EDITOR ->SET_TEXT
hope that the above sample with helps you solve the problem
Please check and revert,
Reward if helpful
Regards
Byju

Similar Messages

  • How to call table control in subscreen in module pool program

    Hi all,
    I have req,need call table control in subscreen,but have done but when scroll bar value getting changed ,
    please guide how to do it.if its possable send the code.
    regards
    santosh

    Hi,
    The navigation happens like this.
    Consider you have a main screen and 2 subscreens.
    When you click or do some event in the Subscreen 2 (lets say this is the one that has the table control), this will first trigger PAI of the Main Screen. In the flow logic of the Main screen, you would have written call subscreen <subscreen area1> and call subscreen <subscreen area2>.
    Now the subscreens get triggered based on the order in which you have written in the flow logic.
    So, here the modules before the first call subscreen statement in the Main Screen PAI is all executed. Now, it goes to the subscreen on which you have triggered an event and executes the modules in the subscreen.
    This is how the execution goes when you have subscreens.
    So there is no problem with the navigation. You only have to worry about the screen where you have the table control. Just debug and find where data is getting changed or duplicated.

  • How to access screen field value in a module pool programming?

    Hi Experts,
       I have create a module pool program SAPMYDLG. It contains two screens 100 and 200.
       The first screen contains Employee_ID field. This field is not a dictionary field.
       In the second screen 200, I want to access the value of Employee_ID field from first screen.
       For this I created a global variable v_empid in TOP include.
       Then in the PAI of the screen 100 I have assigned the screen field value to global variable.
       v_empid = Employee_ID.
       But this gives an error saying " Field  Employee_ID not defined".
       What am I doing wrong? How can I access the screen field value?
    Thanks
    Gopal

    Hi,
    Employee_ID field also must u define in the top include when u define that 100 screen and 200 screen will access.
    regards,
    muralii

  • How to deactivate the screen fields dynamically in Module Pool Program?

    Hi guys,
         How to <b>activate & deactivate the screen fields</b> of a <b>module pool program</b>
    <b>dynamically</b> through program. Like Change mode and display mode in a single
    screen.

    Hi,
    Make use of a Variable,say gv_flag, for both Activate and Deactivate functionalities. As many times you hit the same button, change this variable value. For example, let us say first time you hit this button, assign value 'X' to this variable. Second time you hit this button, assign value ' ' to this variable. In PBO based the variable value  you have to Activate and Deactivate.
    PBO.
      if gv_flag = 'X'.  " Activate
        loop at screen.
          if screen-fname = 'ITAB1-MATNR'.
             screen-input = '1'.
             modify screen.
          endif.
        endloop.
      elseif gv_flag = ' '.   " Deactivate
          if screen-fname = 'ITAB1-MATNR'.
             screen-input = '0'.
             modify screen.
          endif.
        endloop.
      endif.
    PAI.
      case sy-ucomm.
         when 'ACDC'.   " Activate/Deactivate
             if gv_flag = 'X'.
               gv_flag = ' '.
             else.
               gv_flag = 'X'.
             endif.
      endcase.
    thanks,
    sksingh

  • [SOLVED] How to open default text editor from bash script?

    as header states i would like my script to open the desktops default text editor. I use xfce.
    I currently have it set to open medit, however i want to be able to use script on other desktops
    Last edited by orphius (2013-07-12 07:24:34)

    Trilby wrote:
    EDITOR will often not be the default desktop environment editor - it is usually limited to being a systemwide (and usually console-ready) editor.
    xdg-open, or a related tool, can give you the desktop's text editor.
    Truth. VISUAL is typically used for the graphical text editor.
    So, to use VISUAL if it exists, but otherwise default to medit, do:
    editor="${VISUAL:-medit}"
    $editor foo.txt
    Last edited by jakobcreutzfeldt (2013-07-11 07:09:02)

  • How to call A Seesion Bean from a standalone java program

    i want to call a session bean vis a standalone java program on the same machine. i am having some problem with CORBA. i really do not understand what is going on.
    help me please.
    Thank you

    You are shooting in the dark......explain the problem

  • 'how to code for table control wizard in module pool program

    Hi Gurus,
    Please provide me a sample code of table control wizard...
    Thanks in advance!!!!
    Regards,
    Kranthi

    Hi Kranti,
    check this code... it should be helpful
    *& Module pool       Z_TABLE_CONTROL_WIZARD_DEMO                       *
    PROGRAM  z_table_control_wizard_demo             .
    DATA: BEGIN OF lt_vbak OCCURS 0,
           flag  TYPE c,
           vbeln TYPE vbeln_va,
           netwr TYPE netwr,
           kunnr TYPE kunnr,
          END OF lt_vbak.
    DATA: sfkunnr TYPE kunnr.
    *&spwizard: declaration of tablecontrol 'TCONTROL' itself
    CONTROLS: tcontrol TYPE TABLEVIEW USING SCREEN 9000.
    *&spwizard: lines of tablecontrol 'TCONTROL'
    DATA:     g_tcontrol_lines  LIKE sy-loopc.
    DATA:     ok_code LIKE sy-ucomm.
    *&spwizard: output module for tc 'TCONTROL'. do not change this line!
    *&spwizard: update lines for equivalent scrollbar
    MODULE tcontrol_change_tc_attr OUTPUT.
      DESCRIBE TABLE lt_vbak LINES tcontrol-lines.
    ENDMODULE.                    "TCONTROL_change_tc_attr OUTPUT
    *&spwizard: output module for tc 'TCONTROL'. do not change this line!
    *&spwizard: get lines of tablecontrol
    MODULE tcontrol_get_lines OUTPUT.
      g_tcontrol_lines = sy-loopc.
    ENDMODULE.                    "TCONTROL_get_lines OUTPUT
    *&spwizard: input module for tc 'TCONTROL'. do not change this line!
    *&spwizard: modify table
    MODULE tcontrol_modify INPUT.
      MODIFY lt_vbak
        INDEX tcontrol-current_line.
    ENDMODULE.                    "TCONTROL_modify INPUT
    *&spwizard: input modul for tc 'TCONTROL'. do not change this line!
    *&spwizard: mark table
    MODULE tcontrol_mark INPUT.
      DATA: g_tcontrol_wa2 LIKE LINE OF lt_vbak.
      IF tcontrol-line_sel_mode = 1.
        LOOP AT lt_vbak INTO g_tcontrol_wa2
          WHERE flag = 'X'.
          g_tcontrol_wa2-flag = ''.
          MODIFY lt_vbak
            FROM g_tcontrol_wa2
            TRANSPORTING flag.
        ENDLOOP.
      ENDIF.
      MODIFY lt_vbak
        INDEX tcontrol-current_line
        TRANSPORTING flag.
    ENDMODULE.                    "TCONTROL_mark INPUT
    *&spwizard: input module for tc 'TCONTROL'. do not change this line!
    *&spwizard: process user command
    MODULE tcontrol_user_command INPUT.
      ok_code = sy-ucomm.
      PERFORM user_ok_tc USING    'TCONTROL'
                                  'LT_VBAK'
                                  'FLAG'
                         CHANGING ok_code.
      sy-ucomm = ok_code.
    ENDMODULE.                    "TCONTROL_user_command INPUT
    *   INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM user_ok_tc USING    p_tc_name TYPE dynfnam
                             p_table_name
                             p_mark_name
                    CHANGING p_ok      LIKE sy-ucomm.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA: l_ok              TYPE sy-ucomm,
            l_offset          TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
      SEARCH p_ok FOR p_tc_name.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      l_offset = STRLEN( p_tc_name ) + 1.
      l_ok = p_ok+l_offset.
    *&SPWIZARD: execute general and TC specific operations                 *
      CASE l_ok.
        WHEN 'INSR'.                      "insert row
          PERFORM fcode_insert_row USING    p_tc_name
                                            p_table_name.
          CLEAR p_ok.
        WHEN 'DELE'.                      "delete row
          PERFORM fcode_delete_row USING    p_tc_name
                                            p_table_name
                                            p_mark_name.
          CLEAR p_ok.
        WHEN 'P--' OR                     "top of list
             'P-'  OR                     "previous page
             'P+'  OR                     "next page
             'P++'.                       "bottom of list
          PERFORM compute_scrolling_in_tc USING p_tc_name
                                                l_ok.
          CLEAR p_ok.
    *     WHEN 'L--'.                       "total left
    *       PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    *     WHEN 'L-'.                        "column left
    *       PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    *     WHEN 'R+'.                        "column right
    *       PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    *     WHEN 'R++'.                       "total right
    *       PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
        WHEN 'MARK'.                      "mark all filled lines
          PERFORM fcode_tc_mark_lines USING p_tc_name
                                            p_table_name
                                            p_mark_name   .
          CLEAR p_ok.
        WHEN 'DMRK'.                      "demark all filled lines
          PERFORM fcode_tc_demark_lines USING p_tc_name
                                              p_table_name
                                              p_mark_name .
          CLEAR p_ok.
    *     WHEN 'SASCEND'   OR
    *          'SDESCEND'.                  "sort column
    *       PERFORM FCODE_SORT_TC USING P_TC_NAME
    *                                   l_ok.
      ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name             .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_lines_name       LIKE feld-name.
      DATA l_selline          LIKE sy-stepl.
      DATA l_lastline         TYPE i.
      DATA l_line             TYPE i.
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>                 TYPE cxtab_control.
      FIELD-SYMBOLS <table>              TYPE STANDARD TABLE.
      FIELD-SYMBOLS <lines>              TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' p_tc_name '_LINES' INTO l_lines_name.
      ASSIGN (l_lines_name) TO <lines>.
    *&SPWIZARD: get current line                                           *
      GET CURSOR LINE l_selline.
      IF sy-subrc <> 0.                   " append line to table
        l_selline = <tc>-lines + 1.
    *&SPWIZARD: set top line                                               *
        IF l_selline > <lines>.
          <tc>-top_line = l_selline - <lines> + 1 .
        ELSE.
          <tc>-top_line = 1.
        ENDIF.
      ELSE.                               " insert line into table
        l_selline = <tc>-top_line + l_selline - 1.
        l_lastline = <tc>-top_line + <lines> - 1.
      ENDIF.
    *&SPWIZARD: set new cursor line                                        *
      l_line = l_selline - <tc>-top_line + 1.
    *&SPWIZARD: insert initial line                                        *
      INSERT INITIAL LINE INTO <table> INDEX l_selline.
      <tc>-lines = <tc>-lines + 1.
    *&SPWIZARD: set cursor                                                 *
      SET CURSOR LINE l_line.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        IF <mark_field> = 'X'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
    *       text
    *      -->P_TC_NAME  name of tablecontrol
    *      -->P_OK       ok code
    FORM compute_scrolling_in_tc USING    p_tc_name
                                          p_ok.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_tc_new_top_line     TYPE i.
      DATA l_tc_name             LIKE feld-name.
      DATA l_tc_lines_name       LIKE feld-name.
      DATA l_tc_field_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <lines>      TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' p_tc_name '_LINES' INTO l_tc_lines_name.
      ASSIGN (l_tc_lines_name) TO <lines>.
    *&SPWIZARD: is no line filled?                                         *
      IF <tc>-lines = 0.
    *&SPWIZARD: yes, ...                                                   *
        l_tc_new_top_line = 1.
      ELSE.
    *&SPWIZARD: no, ...                                                    *
        CALL FUNCTION 'SCROLLING_IN_TABLE'
             EXPORTING
                  entry_act             = <tc>-top_line
                  entry_from            = 1
                  entry_to              = <tc>-lines
                  last_page_full        = 'X'
                  loops                 = <lines>
                  ok_code               = p_ok
                  overlapping           = 'X'
             IMPORTING
                  entry_new             = l_tc_new_top_line
             EXCEPTIONS
    *              NO_ENTRY_OR_PAGE_ACT  = 01
    *              NO_ENTRY_TO           = 02
    *              NO_OK_CODE_OR_PAGE_GO = 03
                  OTHERS                = 0.
      ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
      GET CURSOR FIELD l_tc_field_name
                 AREA  l_tc_name.
      IF syst-subrc = 0.
        IF l_tc_name = p_tc_name.
    *&SPWIZARD: et actual column                                           *
          SET CURSOR FIELD l_tc_field_name LINE 1.
        ENDIF.
      ENDIF.
    *&SPWIZARD: set the new top line                                       *
      <tc>-top_line = l_tc_new_top_line.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
    *       marks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM fcode_tc_mark_lines USING p_tc_name
                                   p_table_name
                                   p_mark_name.
    *&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        <mark_field> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
    *       demarks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM fcode_tc_demark_lines USING p_tc_name
                                     p_table_name
                                     p_mark_name .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        <mark_field> = space.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Module  STATUS_9000  OUTPUT
    *       text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS 'S9000'.
      SET TITLEBAR 'T9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'DISP'.
          SELECT vbeln netwr kunnr INTO CORRESPONDING FIELDS OF TABLE lt_vbak
          FROM vbak
          WHERE kunnr = sfkunnr.
    *    LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN <nnnn>].
    *    By default, the dialog processor returns to the PBO processing of
    *    the screen from which the list processor was called. The optional
    *    addition AND RETURN TO SCREEN allows you to specify a different
    *    screen in the current screen sequence at whose PBO event you want
    *    to resume processing.
        when 'LIST'.
        LEAVE TO LIST-PROCESSING.
        WRITE:/ 'Time  :', SY-UZEIT.
        LOOP AT LT_VBAK.
        WRITE:/ LT_VBAK-VBELN,
                LT_VBAK-NETWR,
                LT_VBAK-KUNNR.
        ENDLOOP.
        WHEN 'SUBM'.
    *& You can call executable programs from other ABAP programs using the
    *& following statement:
    *& SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
          SUBMIT z_submit_report VIA SELECTION-SCREEN AND RETURN.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
                                                     TABLE CONTROL WIZARD SE51 CODE
    PROCESS BEFORE OUTPUT.
    *&spwizard: pbo flow logic for tablecontrol 'TCONTROL'
      module TCONTROL_change_tc_attr.
    *&spwizard: module TCONTROL_change_col_attr.
      loop at   LT_VBAK
           with control TCONTROL
           cursor TCONTROL-current_line.
        module TCONTROL_get_lines.
    *&spwizard:   module TCONTROL_change_field_attr
      endloop.
    MODULE STATUS_9000.
    PROCESS AFTER INPUT.
    *&spwizard: pai flow logic for tablecontrol 'TCONTROL'
      loop at LT_VBAK.
        chain.
          field LT_VBAK-VBELN.
          field LT_VBAK-NETWR.
          field LT_VBAK-KUNNR.
          module TCONTROL_modify on chain-request.
        endchain.
        field LT_VBAK-FLAG
          module TCONTROL_mark on request.
      endloop.
      module TCONTROL_user_command.
    *&spwizard: module TCONTROL_change_tc_attr.
    *&spwizard: module TCONTROL_change_col_attr.
    MODULE USER_COMMAND_9000.
    regards
    padma

  • How to write select options with extension in module pool program

    hi,
    M having  the following fields through screen painter.
    1. sales offfice
    2.sales district
    3.customer no
    for those three fields no extension is not provided and no search help is there.
    i want write  seletion options to get extension in that module pool
    screen.
    plese send coding for me , please let me know how to get that
    select options with the above all three fields.
    Thanks & Regards
    Raji

    Check it
    In top include
    DATA: number(4) TYPE n VALUE '9005',
    PROCESS BEFORE OUTPUT.
      MODULE status_9001.
      CALL SUBSCREEN AREA1 INCLUDING SY-REPID number.
    PROCESS AFTER INPUT.
      MODULE user_command_9001.
      CALL SUBSCREEN AREA1.
    *&      Module  status_9001  OUTPUT
          text
    MODULE status_9001 OUTPUT.
      SELECTION-SCREEN BEGIN OF SCREEN 9005 AS SUBSCREEN.
      PARAMETER pa_bukrs TYPE t001-bukrs.
      select-options matnr for wa_matnr.
      SELECTION-SCREEN END OF SCREEN 9005.
    ENDMODULE.                 " status_9001  OUTPUT

  • How to call outlook email editor from PCUI ?

    Hi all,
    Can anybody tell me how do I can invoke the outlook email editor with To, CC, BCC, body, format, signature, etc filled up from PCUI ?
    Thanks and regards
    Arijit Ghose

    i have not worked with PCUI, but i assume its a HTML page.
    if so you can use the following code.
    <script>
    function popupMessage() {
    // SET MESSAGE VALUES
      var to = "[email protected]";
    var cc = "[email protected]";
    var bcc = "[email protected]";
    var subject = "A Preformatted Email Message";
    var body =       "Chandler,nntI'm sorry, I can't make it tonight. " +
          "I have to rearrange my sock drawer. " +
         "nnSincerely,nnMonica" 
    // BUILD MAIL MESSAGE COMPONENTS
      var doc = "mailto:" +
    to +
          "?cc=" +
    cc +  
        "&bcc=" +
    bcc +
          "&subject=" +
    escape(subject) +
           "&body=" +
    escape(body);
      // POP UP EMAIL MESSAGE WINDOW
    window.location = doc;}
    </script>
    <FORM>
    <INPUT TYPE=BUTTON NAME=Test Value="Mail Window Test" onClick="popupMessage()">
    </FORM>
    if not if its from SAPGUI do let me know, i will present another solution.
    Regards
    Raja

  • How to add ALV button using OO in module pool program using ALV grid

    Hello Gurus!!!
                  Want some tips related how to add button using ALV Grid(OO).
    I want to display the button for search, sort ....
                 Please suggest the step -by-step procedure for implementation of these button.
                 I am designing the code for transaction FB03. Header data has been displayed but want to display the line items.
                 Kindly suggest your answers.
    Thanks,
    Sachin

    Hi,
    CLASS SELSCR_APPLICATION DEFINITION DEFERRED.
    CLASS SELSCR_APPLICATION 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.        "SELSCR_APPLICATION DEFINITION
    CLASS SELSCR_APPLICATION IMPLEMENTATION.
      METHOD HANDLE_TOOLBAR.
        DATA: LS_TOOLBAR  TYPE STB_BUTTON.
    append SAVE icon
        CLEAR LS_TOOLBAR.
        MOVE 'SAVE' TO LS_TOOLBAR-FUNCTION.
        MOVE ICON_SYSTEM_SAVE TO LS_TOOLBAR-ICON.
        MOVE 'Save' TO LS_TOOLBAR-QUICKINFO.
        MOVE ' '  TO LS_TOOLBAR-DISABLED.
        APPEND LS_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
        CLEAR LS_TOOLBAR.
      ENDMETHOD.                    "handle_toolbar
      METHOD HANDLE_USER_COMMAND.
        CASE E_UCOMM.
          WHEN 'SAVE'.
              PERFORM UPDATE_FIELDS.
        ENDCASE.
      ENDMETHOD.
    ENDCLASS.                 "SELSCR_APPLICATION IMPLEMENTATION
    these lines should be after calling method SET_TABLE_FOR_FIRST_DISPLAY
    SET HANDLER G_APPLICATION1->HANDLE_TOOLBAR FOR GRID1.
            CALL METHOD grid1->set_toolbar_interactive.
    rgds,
    bharat.

  • *How can we use the internal table in module pool programming? Clarify plz*

    If we creating a screen using the table having four fields(for e.g.). The screen has the functions of display, modify, delete, save, exit etc for the fields. The front-end of the screen having I/O fields of the table using internal table. How can we declare the internal table in the screen?

    HI,
    Create one WA for your Internal table and then map it to your fields.
    For Example,
    Data : begin of wa,
              name(10),
              age type i,
               end of wa.
    data : it like table of wa with header line.
    Then in screen create input fields with the name, age and ***.
    Then the user entered values are stored in name age and ***.
    then you can manipulate with that values using wa.
    Thanks.

  • How to track changes to fields in a Module Pool Program

    Hi Experts,
    I have one requirement to track the changes to some fields used in the Program, The fields for tracking the changes will be maintained in a table T1, this will be changed dynamically. 
    There are many screens in the program and many fields in each screen.
    1. How to do the coding for tracking the changes, the code should track all the changes to the fields maintained in the table T1.
    Thanks in Advance.
    Baburaj

    Hi Baburaj,
    The table logging concept will helpful for this requirement.(Tcode: scu3 --> give  table name --> u can find changes for all fields).
    Make use of concept change documents (auditing purpose used) --> CDHDR,CDPOS tables.
    If you want to track changes to your own program, You need write some API to store the data.
    Regards
    Bhupal Reddy

  • How to make the field as mandatory in module pool program.

    Hi Experts,
    Could you please advice me in making a screen field as mandatory input field in module pool programming.
    Thanks in advance.

    Or you could add a check in a PAI module to check if there is some value, if not give error message.
    module check_value.
      if lv_value is initial.
        message e001(00) with 'Enter a value'.
      endif.
    endmodule
    In the PAI screen flow logic...
    Process after input.
    field lv_value module check_value.
    Regards,
    Rich Heilman

  • Module Pool Programming - Calling SAP Standard Text Screen

    Hi Gurus
    I am working on Module Pool Programming...In the one of the screen there is a column named "Description"  where I need to keep a Button to call a SAP standard text editing screen and what ever information I enter in the field should be downloadable
    is this option possible?If so...Plz send me the Sample code
    Thanks
    Ganesh

    Hi Gani,
    I can help you till getting the text editor in your module pool program.
    TOP
    PROGRAM  ZREDDY_TEXT.
    constants: line_length type i value 132.
       data:
    reference to wrapper class of control
       g_editor type ref to cl_gui_textedit,
    reference to custom container: necessary to bind TextEdit Control
       g_editor_container type ref to cl_gui_custom_container,
       g_repid like sy-repid,                        " getting program name
       g_ok_code like sy-ucomm,                " return code from screen
       g_mytable(132) type c occurs 0,        " getting the text of table
       g_mycontainer(30) type c,                " string for the containers
       v_result(256) type c,                        " getting the text of table control
       gw_thead like thead,                        " for header information
       it_line type table of tline with header line. " internal table of type tline
    PBO
    MODULE STATUS_0900 OUTPUT.
      SET PF-STATUS 'ZTEXT'.
    SET TITLEBAR 'xxx'.
    if g_editor is initial.
    create control container
       create object g_editor_container
       exporting
       container_name = 'CUSTOM_CONTROL' " Make sure when you create custom container in layout give name as Custom container
       exceptions
       cntl_error = 1
       cntl_system_error = 2
       create_error = 3
       lifetime_error = 4
       lifetime_dynpro_dynpro_link = 5.
       g_mycontainer = 'CUSTOM_CONTROL'.
    create calls constructor, which initializes, creates and links
    TextEdit Control
      create object g_editor
       exporting
       parent = g_editor_container
       wordwrap_mode =
    cl_gui_textedit=>wordwrap_off
       cl_gui_textedit=>wordwrap_at_fixed_position
    cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER
       wordwrap_position                      = line_length
       wordwrap_to_linebreak_mode     = cl_gui_textedit=>true.
       refresh g_mytable.  " to initialize table upon OK_CODE 'BACK' at PAI
       endif.
    ENDMODULE.                 " STATUS_0900  OUTPUT
    Cheers!!
    Balu
    Edited by: Balu CH on Oct 22, 2008 8:55 PM

  • Calling a report from module pool program

    Hi all,
            I had a requirement where I need to call a report from the module pool program where in when we click REPORT button, it should display the report output in the another screen.
    Can we do by calling screen after pushing REPORT button. If so, where we should write that code ( In pbo or pai). Please give me an idea.
    Thanking you,
    Regards,
    Murali Krishna T

    Use submit syntax.
    Press F1 on submit, Donot use return statement with it.
    If so, where we should write that code ( In pbo or pai).
    Please understand about these two events before doing the requirement.

Maybe you are looking for