Module pool save icon

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

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

Similar Messages

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

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

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

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

  • Save a variant in a custom module-pool.

    Hi all,
    i hope there is someone that can help me.
    My problem is: i've to save a variant in a module-pool custom SAPMZ...ecc.
    Is there a function module or a routine or some specific ABAP istruction to save a variant?
    I ask this because in my custom module-pool i've insert input field in main dynpro.
    Thanks a lot,
    regards,
    Alex.

    Please use below code it works for me:
    What I did was copy the function group SVAR.  When it asked what function module to copy just select
    'RS_VARIANT_SAVE_FROM_SELSCREEN' and renamed it to 'ZS_VARIANT_SAVE_FROM_SELSCR'.
    DATA: lv_screen LIKE sy-dynnr.
      CLEAR: t_rkey, t_screen.
      REFRESH: t_rkey,  t_screen.
      t_rkey-report = sy-repid.
      APPEND t_rkey.
      t_screen-program   = sy-repid.
      t_screen-dynnr     = '0101'.
      t_screen-type      = 4.
      APPEND t_screen.
      lv_screen = '0101'.
      EXPORT lv_screen TO MEMORY ID 'MZ_COMISSION_REPORT_F02_SCREEN'.
      CALL FUNCTION 'ZS_VARIANT_SAVE_FROM_SELSCR'
        EXPORTING
          curr_report          = sy-repid
          vari_report          = sy-repid
        IMPORTING
          variant              = w_variant
        TABLES
           p_screens           = t_screen
         p_sscr               = t_selctab
         p_vari               = t_vari
        EXCEPTIONS
          illegal_variant_name = 1
          not_authorized       = 2
          no_report            = 3
          report_not_existent  = 4
          report_not_supplied  = 5
          OTHERS               = 6.
      t_rkey-variant = w_variant.
      MODIFY t_rkey INDEX 1.
      CALL FUNCTION 'RS_RWSET_SAVE_VARIANT'
        EXPORTING
          rkey    = t_rkey
        TABLES
          selctab = t_selctab.
    Then in program LZSVARF07 function save_as_variant find where it's transfering the screen.
      READ TABLE variscreens WITH KEY dynnr = sy-dynnr.
      IF sy-subrc NE 0.
        IMPORT lv_screen FROM MEMORY ID 'MZ_COMISSION_REPORT_F02_SCREEN'.
        IF lv_screen IS INITIAL.
          variscreens-dynnr = sy-dynnr.
        ENDIF.
      ENDIF.
      PERFORM fill_varidyn TABLES p_dynsfields
                           USING  $rkey space. "Kein import von DYNSFIELDS
    Good luck!
    Edited by: Alex Nguyen on May 2, 2009 1:36 AM
    Edited by: Alex Nguyen on May 5, 2009 5:26 PM

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

  • Trigger a workflow from module pool screen at save button

    Hi,
    I am new to workflow.Please help me.My requirement is trigger a custom workflow from module pool screen at save button.
    Scenario is: Create a Z screen for material creation and after pressing save button workflow should trigger to approver and approver emailid should be fetch from Z table and have to provide a link in work flow for Z t-code which displays a report of material pending for approval..
    Please suggest me process how i can acheive this..
    Thanks

    Hi,
    If you're using standard bapi's to save the material, you can then use either the standard events which are already triggered or you coul add a change document for material changes or creation.
    Then this event can be the trigger of your custom workflow.
    Kind regards, Rob Dielemans

  • 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

  • Showing/Hiding icons in Module Pool

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

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

  • 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

  • 'Save As Variant' for Module Pool Program - FM to be called?

    I have a dialog program, i want to activate the 'Save As variant' when i click on save on the selection screen of the transaction i created for the dialog program. What funtionality should be called or written for the PF-STATUS to implement the functionality.

    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

  • How can one save variants for module pool screens.

    hai all,
         i have done a module pool screen for taking information from user..later i leave to list processor and give a report to the user.
      i am testing the program with many input parameters.i don't want to enter the values each time i execute the program.can i not save a variant like i save for normal abap editor programs?
    any other solution ?

    Hii..
    Variants can be created in Selection Screen only...
    For ur Scenario:
    To leave to the list use the Statements
    <b>LEAVE TO LIST-PROCESSING And return .</b>
    then the Data will be automatically retained.
    <b>Reward if Helpful</b>

  • How to generate a mail on click of save button on Module pool program.

    Hi geeks,
    I am developing a Module pool having table control..The table control is supposedly having  10 columns. The user enters values in first 5 colmns and when he saves , a mail should be  generated to his hierarchy indicatiing it .How could this be achieved?? . The mail should just have  details like the i/p entered in screen . If possible explain through  a code snippet..
    Thanks in advance
    Regards,
    Navin

    when you press save button, get the sy-ucomm and write the below code. Capture the entries from
    table control and send the mail.
      DATA : it_objpack   TYPE STANDARD TABLE OF sopcklsti1 ,
             it_objtxt    TYPE STANDARD TABLE OF solisti1 ,
             it_objbin    TYPE STANDARD TABLE OF solisti1 ,
             it_reclist   TYPE STANDARD TABLE OF somlreci1 ,
             wa_doc_chng  TYPE sodocchgi1,
             wa_objhead   TYPE soli_tab,
             l_attachment TYPE i,
             l_testo      TYPE i.
      DATA:   wa_objpack TYPE sopcklsti1,
              wa_objtxt TYPE solisti1 ,
              wa_objbin TYPE  solisti1 ,
              wa_reclist TYPE  somlreci1 .
      CLEAR:  wa_reclist,
              wa_objhead,
              wa_objtxt,  it_objtxt[],
              wa_objbin,  it_objbin[],
              wa_objpack, it_objpack[].
      CLEAR wa_objbin.
      REFRESH it_objbin.
      it_objbin[] = gt_mess_att[].
      DESCRIBE TABLE it_objbin LINES l_attachment.
      LOOP AT it_message INTO wa_message.
        wa_objtxt = wa_message. APPEND wa_objtxt TO it_objtxt.
      ENDLOOP.
      DESCRIBE TABLE it_objtxt LINES l_testo.
      wa_doc_chng-obj_name = 'Test'.
      wa_doc_chng-expiry_dat = sy-datum + 10.
      CONCATENATE 'Send '
                    INTO wa_doc_chng-obj_descr .
      wa_doc_chng-sensitivty = 'P'.
      wa_doc_chng-obj_prio = '1'.
      wa_doc_chng-doc_size = l_testo * 255.
      CLEAR wa_objpack-transf_bin.
      wa_objpack-head_start = 1.
      wa_objpack-head_num   = 0.
      wa_objpack-body_start = 1.
      wa_objpack-body_num   = l_testo.
      wa_objpack-doc_type   = 'RAW'.
      APPEND wa_objpack TO it_objpack.
      CLEAR wa_reclist.
      wa_reclist-copy = 'X'.
      IF wa_email IS NOT INITIAL.
        wa_reclist-receiver = wa_email-value1.
        wa_reclist-express  = 'X'.
        wa_reclist-rec_type = 'U'.
        wa_reclist-notif_del = 'X'.
        wa_reclist-notif_ndel = 'X'.
        APPEND wa_reclist TO it_reclist.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = wa_doc_chng
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = it_objpack
            object_header              = wa_objhead
            contents_bin               = it_objbin
            contents_txt               = it_objtxt
            receivers                  = it_reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
        IF sy-subrc <> 0.
          WRITE 'mail fail'.
        ENDIF.
      ENDIF.

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

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

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

  • How to create a gui pf status and guititle in module pool programming?

    hi frnds,
    how to create a gui pf status and gui title in module pool programming?
    my problem is i created a screen and wen execute the screen by a tcode.am nt able to activate SAVE BACK EXIT CANCEL COMMANDS?.how to do this can any one explain in detail procedure?
    plz gve step by step process.

    Hi,
    For Title:In PBO...just write
    SET TITLEBAR 'ZTITLE'.
    double click on 'ZTITLE'....give whatever title u want...save it...activate...and check...reward points if useful...
    PF means FUNCTION CODE
    ex; set pf-status 'zrstatus'.
    double click on the zrstatus expand the application server ,
    at the time of execution the default menu(ie system,help),application toolbar buttons like enter,help etc and function keys(by default there will be no function keys)as are there on the normal
    will appear on the screen.
    Details:
    PF-STATUS is used to set the GUI Status of a screen, ie you can control the options on your menu bar, application toolbar, the function keys assigned to various options etc.
    Implementing the status for a screen can be done in 2 ways:
    1) Create the GUI status using the object list of the program or by using the transaction SE41. Then, assign it to the screen using SET PF-STATUS statement.
    2) Create the GUI status by means of forward navigation, ie, use the SET PF-STATUS 'XXX' statement where 'XXX' is the name of the GUI status and double click on it to create it.
    Status names can have a maximum of 20 characters.
    After assigning a GUI status to a screen, this is inherited to all subsequent screens. In order to have a different status for each of the subsequent screens, you have to set a separate status for each screen.
    In transaction SE41,
    1) Give the program name and the status name and click on the Create button.
    2) Go to 'Function keys' and expand.
    3) On top of the save icon type SAVE, on top of the back icon type BACK, on top the the exit icon type EXIT etc ie on top of all the icons that you want to use, type the respective names that you want to give.
    Whatever you have typed now becomes the function codes of these icons and can be used in your program.
    For example you have a screen 100.
    In the 'Element list' tab of the screen, give "ok_code" as the name where "OK" is the type of screen element. Activate screen.
    The flow logic for the screen looks like this:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    Create the modules STATUS_0100 and USER_COMMAND_0100 in the main program by simply double clicking on them.
    The code for these modules can be something like this:
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'Example'. "Example is the name of the GUI status
    ENDMODULE.
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'SAVE'.
    "call a subroutine to save the data or give statements to save data.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.
    Regards,
    Shiva Kumar (Reward If helpful)

  • How to attach files in module pool

    Hi all,
    i want to attach files ,
    if i click one push button in module pool screen , then it will popup browser window for attach file from my pc and i press save that files to be save for that item.  while creating a record,
    while displaying the record, i want to open that corresponding files the same.
    it is possible ? or
    we have any function modules for that.
    The same scenario is available in T-code iw31  In menu bar Order --> display
    give any order number then press enter
    it will take to u one screen then find one icon(services for object) front of the title of that screen.

    Hi,
    U can use the transactions CV01N and CV03n for attaching the documents and displaying the documents respectively. Just code it lke that when u click a push button use FM F4_FILENAME for picking the file path and BAPI_DOCUMENT_CREATE2 to attach the document.
    For displaying call the transaction CV03N.
    Think this will solve ur problem.
    Reward points if usefull.

Maybe you are looking for