How to save Custom control records module pool program ?

Hi guru ,
1. How to save Custom control records module pool program ?
I wrote multiple lines of record in custom control
Who to save that records ?
thanking you.
Regards,
Subash.

Hi Subasha,
Please check the format below since it is based on a working code
**************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.
You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
****************fill header..from SO10( t-code )
GW_THEAD-TDNAME = loc_nam. " unique key for the text
GW_THEAD-TDID = 'ST'. " Text ID
GW_THEAD-TDSPRAS = SY-LANGU.
GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
*Read 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.
The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
Please check and revert,
Reward if helpful
Regards
Byju

Similar Messages

  • How to save Custom control records ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    REPORT  ZCUSTOMC.
    CLASS event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS: handle_f1 FOR EVENT f1 OF cl_gui_textedit
                 IMPORTING sender,
                 handle_f4 FOR EVENT f4 OF cl_gui_textedit
                 IMPORTING sender.
    ENDCLASS.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm.
    DATA: init,
          container TYPE REF TO cl_gui_custom_container,
          editor    TYPE REF TO cl_gui_textedit.
    DATA: event_tab TYPE cntl_simple_events,
          event     TYPE cntl_simple_event.
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    DATA handle TYPE REF TO event_handler.
    START-OF-SELECTION.
      line = 'First line in TextEditControl'.
      APPEND line TO text_tab.
      line = '----
      APPEND line TO text_tab.
      line = '...'.
      APPEND line TO text_tab.
      CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      IF init is initial.
        init = 'X'.
        CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',
                       editor    EXPORTING parent = container,
                       handle.
        event-eventid = cl_gui_textedit=>event_f1.
        event-appl_event = ' '.                     "system event
        APPEND event TO event_tab.
        event-eventid = cl_gui_textedit=>event_f4.
        event-appl_event = 'X'.                     "application event
        APPEND event TO event_tab.
        CALL METHOD: editor->set_registered_events
                     EXPORTING events = event_tab.
        SET HANDLER handle->handle_f1
                    handle->handle_f4 FOR editor.
      ENDIF.
      CALL METHOD editor->set_text_as_stream EXPORTING text = text_tab.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'INSERT'.
          CALL METHOD editor->get_text_as_stream IMPORTING text = text_tab.
        WHEN 'F1'.
          MESSAGE i888(sabapdocu) WITH text-001.
        WHEN OTHERS.
          MESSAGE i888(sabapdocu) WITH text-002.
          CALL METHOD cl_gui_cfw=>dispatch.      "for application events
          MESSAGE i888(sabapdocu) WITH text-003.
      ENDCASE.
      SET SCREEN 100.
    ENDMODULE.
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_f1.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-004.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>set_new_ok_code   "raise PAI for
             EXPORTING new_code = 'F1'.           "system events
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
      METHOD handle_f4.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-005.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
    ENDCLASS.
    aniruddh

  • How to save Custom control records through module pool program ?

    Hi guru ,
    1. How to save Custom control records through module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi,
    can refer following code -
    IN PAI , CODE is as follows-
    *&      Form  editor_output
    FORM editor_output .
    NARRATION1 is name of custom controller
      IF v_editor IS INITIAL.
      Create obejct for custom container
        CREATE OBJECT v_custom_container
          EXPORTING
            container_name              = 'NARRATION1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT v_editor
          EXPORTING
            wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position
            wordwrap_position          = line_length
            wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                     = v_custom_container
          EXCEPTIONS
            error_cntl_create          = 1
            error_cntl_init            = 2
            error_cntl_link            = 3
            error_dp_create            = 4
            gui_type_not_supported     = 5
            OTHERS                     = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " editor_output
    getting textdata in internal table as follows
    *&      Form  create_text
    FORM create_text .
      REFRESH : it_texttable,
                it_text.
      IF v_doc_number IS NOT INITIAL.
        IF v_editor IS NOT INITIAL.
          CALL METHOD v_editor->get_text_as_r3table
            IMPORTING
              table                  = it_texttable
            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.
    Now, our final text data is in internal table it_texttable.
    pls, Reward if found helpful.

  • How to save a varaints in module pool programming

    Hi All,
    How to save a varaints in module pool programming.
    Thanks in Advance.
    GS.

    Hi,
    Forgot my previous reply.
    Just now I checked.
    Create transaction[say.,zzz_test1] using SE93 [choose the option Program and screen] for your module pool program.
    Then use SHDS transaction to create a variant[say zzz_v1] for the transaction you created above.
    Then use SE93 [choose the option Transaction with Variant] to create another transaction zzz_test2 by mentioning the module pool program name and zzz_test1 transaction which you created and zzz_v1 variant which you created.
    Then if you run the transaction ZZZ_test2,then you can see the variant values.
    I created just now all these and it works.
    Hope this is clear.
    If not,get back.

  • How to use table control in module pool programming

    Hi
    I want to use a table control to fetch some data from mara table.
    Please guide me with the procedure and the steps which I can follow to complete my program correctly.
    thanks
    Lalit Gupta

    As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
    Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
    Regards,
    Raymond

  • How to insert tabstrip control in module pool screen painter

    Hi all!
    plz tell e how to use tabstrip control in module pool screen painter.Also plz give me an example program using tabstrip control.

    To insert tabstrip just open layout of screen and press on the tabstrip button there .
    Use this souce code further to activate it .
    CONTROLS tabstrip TYPE TABSTRIP.
    DATA: okcode TYPE sy-ucomm,
    dynnr TYPE sy-dynnr,
    flag type flag,
    active like tabstrip-activetab .
    call SCREEN 100.
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    data: lv_okcode type syucomm.
    lv_okcode = okcode.
    clear okcode.
    case lv_okcode.
    WHEN 'TAB1'.
    dynnr = '0110'.
    WHEN 'TAB2'.
    dynnr = '0120'.
    WHEN 'TAB3'.
    dynnr = '0130'.
    WHEN 'TAB4'.
    dynnr = '0140'.
    WHEN 'TAB5'.
    "check authorization, if authorization fails
    flag = 'X'. "set the global flag
    active = 'TAB1'. "store active tab in global variable
    dynnr = '0110'. "set the screen number
    WHEN 'BACK' or 'EXIT'.
    leave program.
    ENDCASE.
    IF lv_okcode(3) = 'TAB'.
    tabstrip-activetab = lv_okcode.
    ENDIF.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'MAIN'.
    SET TITLEBAR 'xxx'.
    IF tabstrip-activetab IS INITIAL OR
    dynnr IS INITIAL.
    tabstrip-activetab = 'TAB1'.
    dynnr = '0110'.
    ENDIF.
    "set the activetab explicilty here
    if flag eq 'X'. "from authorization failure
    tabstrip-activetab = active. "'TAB1'
    clear flag.
    endif.
    ENDMODULE. " STATUS_0100 OUTPUT

  • How to download  and upload a module pool program ?

    hi i am a sudent.can anyone suggest me how to download and upload a module pool program?
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on May 29, 2011 12:45 PM

    Hi,
    You cannot just download and upload module pool programs .
    There are 2 different ways.
    1. Copy all the includes and and create the same in the target system. You can download and upload the the Screen.
      But GUI status you have to manually create.
    2. If you have completely saved the module-pool program in one Workbench request(including Z tables u have used) in the original system ,just  release the workbench request and copy the data file and co file and upload to the target system ( use CG3Y & CG3Z).
    If the workbench is a Local Request save it in a Transport of copies and then move.
    Regards
    Aromal R

  • How to populate list box in module pool program

    How to populate list box in module pool program.
    Please give me reply as soon as posible
    regards,
    Venu.

    hi,
    go thrugh the folling code .
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
    *& Processing Blocks called by the Runtime Environment                 *
    Event Block START-OF-SELECTION
    START-OF-SELECTION.
      CALL SCREEN 100.
    Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    the following code should be included in flow logic of screen
    process on value-request.
      field scarr-carrname  module create_dropdown_box.
    in module pool select list box.
    hope it is useful.
    regards,
    sreelakshmi.

  • How to provide select-option in module pool programming

    Hi all,
    How to provide select-option in module pool programming.
    If any body knows let me immediately.
    Thanks
    sudheer

    Hi Sudheer,
    Unfortunately there is no standard way of having a select-option in a module pool program.
    What you can try is having two fields and creating a range in your program and populating the range at runtime with respective value and trying to simulate some functionality of the select-option.
    Hope it helps.
    Thanks, Debasish

  • How to put scrol bar in table viw control in module pool programming

    how to put scrool bar in table-view control in module pool programming

    Hi Rani,
       You need not insert Scrollbar in the table control, it appears automcatically once the amount of data vertical or horizontal limit of table control.
    Regards,
    Sathish
    Note : Reward useful Answers

  • How to create Long Text in Module Pool Program

    Hi all,
    I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
    Thanks & Regards
    Nirmal

    Hai ,
    here you have to use custom control, for this
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    1)  Create custom control in your screen
    2)   CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',   "--> (this is custom control name in screen)
                       editor    EXPORTING parent = container.
    3)  CALL METHOD editor->get_text_as_stream  "This method reads data from custom control , inserts into itab 'text_tab' 
             IMPORTING       
              text = text_tab.                                       "
          READ TABLE text_tab  INTO line INDEX 1. read the text into wa 'line'
    if you want more clarity , see  'ABAPDOCU' >ABAP USER DIALOGS>    COMPLEXSCREEN ELEMENTS-->  DEMO CUSTOM_CONTROL

  • How to Use F4 help in Module Pool Programming??????

    Hi Friends,
    This is Jagadeesh, I have an issue Module Pool Programming. Any of you can go through on this and can give an required answer.
    Issue is as follows,
    I have an Input/Output field for that i need to give f4 help, based on that field the related data should sit in to my table control. The thing is there is no relation between the input/output field and the table control fields.
    Is this possible? If so how can i do this.

    Hi Jagadeesh,
    For F4 Values on Screen:
    PROCESS ON VALUE_REQUEST
    using module call starting with FIELD i.e FIELD field MODULE module
    There are number of function modules that can be used for the purpose, but these
    can fullfill the task easily or combination of them.
    DYNP_VALUE_READ
    F4IF_FIELD_VALUE_REQUEST
    F4IF_INT_TABLE_VALUE_REQUEST
    POPUP_WITH_TABLE_DISPLAY
    DYNP_VALUE_READ
    This function module is used to read values in the screen fields. Use of this
    FM causes forced transfer of data from screen fields to ABAP fields.
    There are 3 exporting parameters
    DYNAME = program name = SY-CPROG
    DYNUMB = Screen number = SY-DYNNR
    TRANSLATE_TO_UPPER = 'X'
    and one importing TABLE parameter
    DYNPFIELDS = Table of TYPE DYNPREAD
    The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
    to this FM and the values read from the screen will be stored in this table.This
    table consists of two fields:
    FIELDNAME : Used to pass the name of screen field for which the value is to
    be read.
    FIELDVALUE : Used to read the value of the field in the screen.
    e.g.
    DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
    SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
    SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
    APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = SY-CPROG
    DYNUMB = SY-DYNNR
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = SCREEN_VALUES.
    READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
    F4IF_FIELD_VALUE_REQUEST
    This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
    parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = table/structure
    FIELDNAME = 'field name'
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNR
    DYNPROFIELD = 'screen field'
    IMPORTING
    RETURN_TAB = table of type DYNPREAD
    F4IF_INT_TABLE_VALUE_REQUEST
    This FM is used to dsiplay values stored in an internal table as input
    help.This FM is used to program our own custom help if no such input help
    exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
    is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
    If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = field from int table whose value will be returned
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'screen field'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = internal table whose values will be shown.
    RETURN_TAB = internal table of type DDSHRETVAL
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    others = 3.
    POPUP_WITH_TABLE_DISPLAY
    This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
    parameter.The VALUETAB is used to pass the internal table.
    A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
    EXPORTING
    ENDPOS_COL =
    ENDPOS_ROW =
    STARTPOS_COL =
    STARTPOS_ROW =
    TITLETEXT = 'title text'
    IMPORTING
    CHOISE =
    TABLES
    VALUETAB =
    EXCEPTIONS
    BREAK_OFF = 1
    OTHERS = 2.
    e.g.
    DATA: w_choice TYPE SY-TABIX.
    DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
    values TYPE I,
    END OF i_values.
    PARAMETRS : id TYPE I.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
    i_values-values = '0001'.
    APPEND i_values.
    i_values-values = '0002'.
    APPEND i_values.
    i_values-values = '0003'.
    APPEND i_values.
    i_values-values = '0004'.
    APPEND i_values.
    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
    EXPORTING
    ENDPOS_COL = 40
    ENDPOS_ROW = 12
    STARTPOS_COL = 20
    STARTPOS_ROW = 5
    TITLETEXT = 'Select an ID'
    IMPORTING
    CHOISE = w_choice
    TABLES
    VALUETAB = i_values
    EXCEPTIONS
    BREAK_OFF = 1
    OTHERS = 2.
    CHECK w_choice > 0.
    READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained
    ...in the structure i_values.
    Other FM that may be used to provide input help is HELP_START .
    regards,
    Dj
    reward for all useful answers.

  • How can i add total in Module Pool Programming

    Hai abapers,
    My problem is I have 15 fields in a tablecontrol.The 15th field is total field...
    When ever user enter a values in remaing fields,the 15 the field must be updated...
    how can i achieve in module pool programming..................
    i have one more problem.That is when user pressing any key.my content in table control r clearing..i need to restrict clearing values..how can i achieve it ...
    Waiting for y r favourable replies
    Regards
    Maruthi

    maruthi,
    1. when user pressing any key.my content in table control r clearing..i need to
        restrict clearing values..how can i achieve it ...
    Ans. When ever you press button it will go first to PAI event and will go back to
            PBO.So in PBO event you might have wriiten some coding that will get
            process and  updated in Table control.That time your updated data will get
           removed.
             For this take all your function codes of your buttons on screen and write
            condition
              if sy-ucom ne 'ADD'  or
                 sy-ucom ne 'Delete'.
    ********Here you keep your  PBO code
             endif.
    Now it will work fine.
    2.When ever user enter a values in remaing fields,the 15 the field must be updated
    Ans)After you entered the data in 14 fields some event has to get trigger then
           only  you can achieve your goal.
    In PBO write 
             If SY-UCOM is eq 'ADD'.            
                 collect all fields records and add here 
                 move total value to 15th record .
              Endif.
    when you press ADD button  you will achieve .
    Pls. reward if useful

  • Table Control in Module Pool Programming

    In my Module Pool program I have created a Table Control on my screen. In my Table one column is the Checkbox. When I make changes in any of the Checkbox and scroll the Table or scroll with mouse,the data is lost.I am updating the database table and for that I have created a 'SAVE' button.But to make the changes I have to Scroll the Table on the screen and the changed data is lost.
    Please guide me or if possible then tell me the Flow Logic of Module Pool with Table Control??
    Thanks for the Help....

    PROCESS BEFORE OUTPUT.
    MODULE INITIALIZE.
    *&spwizard: pbo flow logic for tablecontrol 'TBLALLOC_CYC'
      module TBLALLOC_CYC_change_tc_attr.
    *&spwizard: module TBLALLOC_CYC_change_col_attr.
      loop at   GT_NEW_ALLOC
           into GT_NEW_ALLOC_WA
           with control TBLALLOC_CYC
           cursor TBLALLOC_CYC-current_line.
        module TBLALLOC_CYC_get_lines.
    *&spwizard:   module TBLALLOC_CYC_change_field_attr
      endloop.
    MODULE STATUS_9003.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_9003.
    *MODULE USER_COMMAND_9003.
    *&spwizard: pai flow logic for tablecontrol 'TBLALLOC_CYC'
      loop at GT_NEW_ALLOC.
        chain.
          field GT_NEW_ALLOC_WA-/BIC/ZALLOCCYC.
          field GT_NEW_ALLOC_WA-/BIC/UFACT_FLG.
          field GT_NEW_ALLOC_WA-CHANGEDBY.
          field GT_NEW_ALLOC_WA-CH_ON.
          field GT_NEW_ALLOC_WA-/BIC/ECHAT.
          module TBLALLOC_CYC_modify on chain-request.
        endchain.
      endloop.
    module TBLALLOC_CYC_user_command.
    *&spwizard: module TBLALLOC_CYC_change_tc_attr.
    *&spwizard: module TBLALLOC_CYC_change_col_attr.
    module TBLALLOC_CYC_user_command.
    MODULE USER_COMMAND_9003.
    MODULE INITIALIZE OUTPUT.
    At the time of initialization of the screen data is to be displayed
    by calling Function Module ZUFACTS_FETCH_ALLOC_CYC.
    CALL FUNCTION 'ZUFACTS_FETCH_ALLOC_CYC'
      TABLES
        T_ALLOC       = GT_NEW_ALLOC
    Pass the value displayed in Internal Table GT_OLD_ALLOC.
    GT_OLD_ALLOC[] = GT_NEW_ALLOC[].
    MOVE GT_OLD_ALLOC TO GT_OLD_ALLOC.
    *****Initialize the ok_code.
    CLEAR OK_CODE .
    ENDMODULE.                 " INITIALIZE  OUTPUT
    MODULE USER_COMMAND_9003 INPUT.
    CASE : OK_CODE.
      WHEN 'SAVE'.
        CALL FUNCTION 'ZUFACTS_UPDATE_ALLOC_CYC'
          TABLES
            T_OLD_ALLOC                 = GT_OLD_ALLOC
            T_NEW_ALLOC                 = GT_NEW_ALLOC
          EXCEPTIONS
            NO_FIELD_UPDATED            = 1
            UNSUCCESSFUL_UPDATION       = 2
            OTHERS                      = 3
        IF SY-SUBRC = 1.
          MESSAGE I005 .
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF SY-SUBRC = 2.
          MESSAGE E006.
        ENDIF.
      WHEN 'CANCEL' OR 'BACK' OR '%EX' OR 'RW'.
        LEAVE TO SCREEN 0.
      ENDCASE.
      CLEAR OK_CODE.
    ENDMODULE.                 " USER_COMMAND_9003  INPUT

  • Is it possible to save a variant in Module Pool program

    Hi,
    We have got a requirement to save a Variant for the user selections in Module Pool Program. Is it possible to save a variant in a Module Pool Program?
    Please let me know how to do that if it is possible.
    Thanks in Advance.

    hi Dagny,
      You can't have variants for module pool. It is possible only for selection screen.
    You have following alternatives :-
    1. Create a report with same selection screen as you have now in module pool.
    And then make a call screen to your intial module pool.
    In this way you can all the advantage of variants as well as module pool.
    OR
    2. Create a transaction variant using transaction SHDO.
    Hope it is helpful.
    and do search the form , it is already answered before.
    regards
    venkat

Maybe you are looking for