GUI Status in Module pool

Hi,
I am calling next screen in PAI using the following code.
CALL SCREEN 500 starting at 5 5
                        ending at 20 20.
In new screen 500 the default button ( 'X' Button on top-right corner) for 'CLOSE WINDOW' is not working.
How can I make it active.
Thanks in advance.
Jaison.

Hi,
SET PF-STATUS 'ZABC'.
Double click on ZABC, goto the Menu bar and On the Cancel button, write CANCEL. Double click the ICON and type the Function Text as CANCEL.
Activate the Pf-status.
In the PAI write
AT USER-COMMAND.
CASE OKCODE.
WHEN 'CANCEL'.
leave to screen 0.
ENDCASE.
Best regards,
Prashant

Similar Messages

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

  • Search Help For a Field in Module Pool Programming

    Hi,
    I have a field called status in Module Pool for which i need to write a search help.
    This is the piece of code i have written.
    TYPES: BEGIN OF ty_status,
             stat type i,
             status type string,
        END OF ty_status.
      DATA: lt_emp_status TYPE STANDARD TABLE OF ty_status,
            lw_emp_status TYPE ty_status.
      REFRESH lt_emp_status.
      lw_emp_status-stat = '1'.
      lw_emp_status-status = 'Draft'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      lw_emp_status-stat = '2'.
      lw_emp_status-status = 'Employee Review'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      REFRESH lt_emp_status.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'STATUS'
          value_org       = 'S'
        TABLES
          value_tab       = lt_emp_status
          return_tab      = t_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
        READ TABLE t_return INDEX 1.
        MOVE t_return-fieldval TO LV_EMP_status.
      ENDIF.
    But i am getting the following error.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_ASSIGN_CAST_ILLEGAL_CAST', was
      not caught in
    procedure "F4IF_INT_TABLE_VALUE_REQUEST" "(FUNCTION)", nor was it propagated by
      a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The error occurred at a statement of the form
       ASSIGN f TO <fs> CASTING.
       ASSIGN f TO <fs> CASTING TYPE t.
    or
       ASSIGN f TO <fs> CASTING LIKE f1.
    or
       at table statements with the addition
       ASSIGNING <fs> CASTING.
    The following error causes are possible:
    1. The type of field f or the target type determined by <fs>, t or f1
    contains data references, object references, strings or internal tables
    as components.
    Could some one help me how to resolve this issue.
    Thanks in advance.

    Hi,
    Please see this sample code below:
    *To fetch the classification data on the sel screen
    DATA: BEGIN OF IT_KLAH OCCURS 0,
          CLINT TYPE CLINT,
          CLASS TYPE KLASSE_D,
          END OF IT_KLAH.
      SELECT CLINT CLASS FROM KLAH UP TO 500 ROWS
      INTO TABLE IT_KLAH.
      IF SY-SUBRC <> 0 .
        MESSAGE TEXT-006 TYPE 'E'.
      ELSE.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    DDIC_STRUCTURE = ' '
        RETFIELD = 'CLASS'
    PVALKEY = ' '
        DYNPPROG = SY-REPID
        DYNPNR = SY-DYNNR
        DYNPROFIELD = 'p_s_clascn_low'      "i had to put the f4 help on the selection screen's select option low value,
                                                                     "here basically you have to give the internal table name inside quotes in which
                                                                     "you want to retrieve your data
        VALUE_ORG = 'S'
        DISPLAY = ' '
        TABLES
        VALUE_TAB = IT_KLAH.
      ENDIF.
    Hope it helps,
    Regards,
    Mansi

  • Regarding module pool programming,reports and gui status

    hi,
       I have created a mpp program in which i called a report using the SUBMIT statement.In the Report i have used Gui status for BACK.When i execute the MPP and press BACK it should call a another screen of the MPP,but it leaves to the program i.e., it comes out.
    example,
    case sy-ucomm.
    When 'BACK'.
    CALL SCREEN 0002.
    endcase.
    This is what i have used in my report program.
    Please help me,
    Thanks in advance,
    Aruna

    Hi.
    Change the name BACK because it is standard FCode.
    Try Changing the Fcode.
    Awrd Points if useful
    Bhupal

  • How to set PF status title in module pool.If we are executing it in VA01

    Hi all!
    I a executing my screen in module pool.I set the title for my screen.While i a executing i am getting title in the screen like pf status title only. But if i am executing that screen through VA01.I am not getting title and at the same time it is capturing the VA01 title.But i want the title as the se51 pf status screen title.Plz give me the solution

    Hi,
    I think you should assign your program at the
    'Output types' using tcode: NACE.
    thanks|
    Mahesh

  • Download-upload module pool, dynpros, pf status, everything

    hi all
    I did a code and wanted to share it with you.
    can save and restore module pool, function groups and reports.
    including dynpros, pf status, etc.
    but i don`t know how to upload the code, are about 1000 lines of code.
    If anyone is interested write me.
    Regards!.

    >
    BreakPoint wrote:
    >  This is a forum for answering specific questions and helping with specific problems...nobody has time to read your 1000 lines of code....
    Well, it's a forum, but I don't think the purpose is just for asking and answering questions. Discussions are always welcome.
    However, having said that, there is a 2,500 character posting limit to threads, so unless each line is extremely short, the code will not format and will likely be rejected.
    The OP can either try to post in the forum I suggested, or add it to a WIKI page.
    But make sure the same sort of code has not already been posted.
    Rob

  • Module pools mixed in MP001600 GUI

    Hello everybody,
    I am facing a strange issue related to module pool. I have defined ZP001600  module pool for IT0016, which is shown for all the employees. However, if the employee belongs to Belgium, then an additional module pool is shown in the IT0016 GUI, which is specific and standard for Belgium (MP010900) and this one is appear mixed with the custom one ZP001600. I have tried to seek for a table where a sequence or order for this module pool are defined but I just found two different tables where are customize both modulule pool for this tables:
    T582V - Assignment of Infotypes to Views
    IT view ind. Infotype Name of view for infotypes Dialog module                  Program Name                             Screen number
    12           0016     V109                                                      MP010900                                 0100
    T582C Include Screens for Infotypes
    Module Pool                              Standard screen Program Name                             Standard screen
    MP001600                                 2000            ZP001600                                 0200
    Could you please assist me?
    Thanks in advance

    April,
    Thanks for your reply.  HR_PK_EXCEL_TO_INTERNAL_TABLE does not show up in our system when doing a search on function modules.  It is good to know that TEXT_CONVERT_XLS_TO_SAP has been released for customer use in newer systems than we are currently using.
    I think that I'll use this function module, TEXT_CONVERT_XLS_TO_SAP, and call it a day. 
    Although, I am still interested in other solutions if anybody out there has one.
    Bruce
    Message was edited by: Bruce Tjosvold

  • SLIN - GUI Status cannot be checked statically for my_module:pool??

    Hi Experts,
    Am executing the SLIN for my_module_pool_prog. So, I got 1 message,
    Pls. let me know that,
    1  - Wht is the meaning of the following statement
    2 -  How to fix it?
    GUI Status cannot be checked statically.
      SET PF-STATUS wa_con_pf1.            
    (You can hide the message using "#EC *)
    My code in PBO is,
    If xxxxx = Y.
    SET PF-STATUS wa_con_pf1.
    endif.
    Am guessing, its coz of, writuing the SET PF-STATUS wa_con_pf1 statement in  IF condition!!!!!!
    thanq
    thanq
    Edited by: Srinivas on Apr 4, 2008 4:55 PM

    Yes, the message is self explanatory GUI Status cannot be checked statically.
    As it is in if condition, compiler don't know what will be the value for PF-status at run time. And PF-status needs to be determined statically(at compile time).
    Following will hide the message:
    If xxxxx = Y.
    SET PF-STATUS wa_con_pf1. "#EC *
    endif.
    Not sure about the  effect of "#EC.  I guess , it says skip this statement while Extended Check.
    G@urav.

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

  • How to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?

    hi frnds.
    My problem is in module pool screen how to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?And how to do GUI STATUS and GUI TITLE? IN SE80.
      ITS URGENT.POINTS WILL BE REWADED.THANKS  IN ADVANCE.

    Hi,
    Go through this thread.
    [expand and collapse|expand and collapse]
    Cheers,
    Simha.

  • Upload / download gui-status/dynpro when function group

    Hi All,
    I'm coding a program where I can download and upload reports and module pools but I tried to do the same with function groups and I found It is different to upload dynpro and gui staus when the objet to generate is a function group.
    Could anyone help me a little in order to complete and finish this issue?
    Below is shown the routines I coding in order to achive that:
    For gui-status uploading I use:
    CALL FUNCTION 'RS_CUA_INTERNAL_WRITE'
        EXPORTING
          program   = prog
          language  = sy-langu
          tr_key    = tr_key
          adm       = adm4
        TABLES
          sta       = sta4
          fun       = fun4
          men       = men4
          mtx       = mtx4
          act       = act4
          but       = but4
          pfk       = pfk4
          set       = set4
          doc       = doc4
          tit       = tit4
          biv       = biv46c
        EXCEPTIONS
          not_found = 1
          OTHERS    = 2.
    For screen uploading I use:
    GENERATE DYNPRO gs_d020s gt_d021s gt_d022s gt_d023s  ID dynp_id
                          MESSAGE mess  LINE line   WORD    word.
        IF sy-subrc = 0.
          EXPORT DYNPRO gs_d020s gt_d021s gt_d022s gt_d023s  ID dynp_id.
        ENDIF.
    But both options don't work when uploading function groups
    Regards...
    Edited by: Rob Burbank on Jun 1, 2011 11:58 AM
    Edited by: Kenneth Castañeda on Jun 2, 2011 7:31 PM
    Edited by: Kenneth Castañeda on Jun 2, 2011 7:34 PM

    Hi Kenneth,
    sorry, it is really not obvious that [there is a link behind zsaplink|http://code.google.com/p/saplink/].
    From the link:
    "SAPlink is an open source project that aims to make it easier to share ABAP developments between programmers. It provides the ability to easily distribute and package custom objects."
    This software allows you to up- and download all kinds of SAP objects. It is distributed under the GNU General Public License.
    I think this is exactly what you are looking for - or I did not understand your question.
    Regards,
    Clemens

  • How to DOWNLOAD  a whole module pool program????

    Hi..
    can anybody tell me how to download a <b>whole module pool program</b> into my desktop with .sap extension???
    Actually i want to download a whole module pool program from a server so that i can upload the same program into another sap server instead of writing the whole code.
    Thanx in advance......

    the program is exits..
    i don't y it is not for ur.....
    i am sending d code for the same....
    create a program and check...
    *& Report  REPTRAN                                                     *
    *& This report allows to display and save complete programs and        *
    *& function modules.                                                   *
    *& This report was originally written by Frank Wolf, Xaption GmbH.     *
    *& Its original name was ZREPTRAN (see www.abaps.de).                  *
    REPORT  reptran LINE-SIZE 170      .
    TABLES: d010inc, trdir, eudb, title, d020t, trkey, tfdir, tmdir, tadir,
            seoclass,  seoclassdf, seoclassex, seoclasstx, seometarel,
            seocompo,  seocompodf, seocompoex, seocompotx, seoimplrel,
            seomapatt, seomapcls,  seoredef,   seofriends, seotypepls,
            seosubco,  seosubcodf, seosubcoex, seosubcotx.
    TYPES: abapline(255).
    TYPES: BEGIN OF ty_tit,
            code TYPE rsoldleng-title,
            text TYPE title-text_line,
           END OF ty_tit.
    TYPES: BEGIN OF ty_reptxt,
            id TYPE textpool-id,
            key TYPE textpool-key,
            entry TYPE textpool-entry,
            length(4) TYPE n,
           END OF ty_reptxt.
    TYPES: BEGIN OF ty_d020t,
            prog TYPE d020t-prog,
            dynr TYPE d020t-dynr,
            dtxt TYPE d020t-dtxt,
           END OF ty_d020t.
    TYPES: BEGIN OF dynp_rel_type,         "Dynpro-Releases
            rel(1),
            dot(1),
            version(2),
           END OF dynp_rel_type.
    TYPES: BEGIN OF ty_seocompodf_t.
            INCLUDE STRUCTURE seocmpkey.
    TYPES:  version TYPE seocompodf-version,
            alias TYPE seocompodf-alias,
            redefin TYPE seocompodf-redefin,
            exposure TYPE seocompodf-exposure,
            state TYPE seocompodf-state,
            editorder(4) TYPE n,
            locked TYPE seocompodf-locked,
            dispid(4) TYPE n.
            INCLUDE STRUCTURE seochange.
            INCLUDE STRUCTURE seomtdapx.
            INCLUDE STRUCTURE seoevtapx.
            INCLUDE STRUCTURE seotypapx.
    TYPES:  typtype TYPE seocompodf-typtype,
            type TYPE seocompodf-type,
            tableof TYPE seocompodf-tableof,
            srcrow1(4) TYPE n,
            srccolumn1(2) TYPE n,
            srcrow2(4) TYPE n,
            srccolumn2(2) TYPE n.
            INCLUDE STRUCTURE seocmpref.
    TYPES: END OF ty_seocompodf_t.
    TYPES: BEGIN OF ty_seosubcodf_t.
            INCLUDE STRUCTURE seoscokey.
    TYPES:  version TYPE seosubcodf-version,
            editorder(4) TYPE n,
            dispid(4) TYPE n.
            INCLUDE STRUCTURE seochange.
    TYPES:  pardecltyp TYPE seosubcodf-pardecltyp,
            parpasstyp TYPE seosubcodf-parpasstyp,
            typtype TYPE seosubcodf-typtype,
            type TYPE seosubcodf-type,
            tableof TYPE seosubcodf-tableof,
            srcrow1(4) TYPE n,
            srccolumn1(2) TYPE n,
            srcrow2(4) TYPE n,
            srccolumn2(2) TYPE n,
            parvalue TYPE seosubcodf-parvalue,
            paroptionl TYPE seosubcodf-paroptionl.
            INCLUDE STRUCTURE seoexcapx.
    TYPES: END OF ty_seosubcodf_t.
    Release bis 3.1
    *INCLUDE mseuxcom.
    DATA: eu_key TYPE rseu1_key.
        Titel
    DATA: tit    TYPE STANDARD TABLE OF ty_tit     WITH HEADER LINE.
    Release from 4.6
    DATA: fun4   TYPE STANDARD TABLE OF rsmpe_funt WITH HEADER LINE.
    DATA: ctx4   TYPE STANDARD TABLE OF rsmpe_ctx  WITH HEADER LINE.
    DATA: mtx4   TYPE STANDARD TABLE OF rsmpe_mnlt WITH HEADER LINE.
    DATA: men4   TYPE STANDARD TABLE OF rsmpe_men  WITH HEADER LINE.
    DATA: act4   TYPE STANDARD TABLE OF rsmpe_act  WITH HEADER LINE.
    DATA: doc4   TYPE STANDARD TABLE OF rsmpe_atrt WITH HEADER LINE.
    DATA: sta4   TYPE STANDARD TABLE OF rsmpe_stat WITH HEADER LINE.
    DATA: set4   TYPE STANDARD TABLE OF rsmpe_staf WITH HEADER LINE.
    DATA: pfk4   TYPE STANDARD TABLE OF rsmpe_pfk  WITH HEADER LINE.
    DATA: but4   TYPE STANDARD TABLE OF rsmpe_but  WITH HEADER LINE.
    DATA: tit4   TYPE STANDARD TABLE OF rsmpe_titt WITH HEADER LINE.
    DATA: stx4   TYPE STANDARD TABLE OF rsmptexts  WITH HEADER LINE.
    DATA: adm4   TYPE rsmpe_adm.
    Release from 4.6c
    DATA: biv46c TYPE STANDARD TABLE OF rsmpe_buts WITH HEADER LINE.
    DATA: reports    TYPE STANDARD TABLE OF trdir-name WITH HEADER LINE,
          reportname TYPE string.
    DATA: i_repsrc TYPE STANDARD TABLE OF abapline   WITH HEADER LINE.
    DATA: i_reptx  TYPE STANDARD TABLE OF textpool   WITH HEADER LINE.
    DATA: i_reptxt TYPE STANDARD TABLE OF ty_reptxt  WITH HEADER LINE.
    DATA: i_adm4 TYPE STANDARD TABLE OF rsmpe_adm    WITH HEADER LINE.
    DATA: i_tmd TYPE STANDARD TABLE OF tmdir.
    DATA: i_tfd TYPE STANDARD TABLE OF tfdir.
    DATA: i_cls TYPE STANDARD TABLE OF seoclass.
    DATA: i_cdf TYPE STANDARD TABLE OF seoclassdf.
    DATA: i_clx TYPE STANDARD TABLE OF seoclassex.
    DATA: i_clt TYPE STANDARD TABLE OF seoclasstx.
    DATA: i_cmr TYPE STANDARD TABLE OF seometarel.
    DATA: i_cmp TYPE STANDARD TABLE OF seocompo.
    DATA: i_cmd TYPE STANDARD TABLE OF seocompodf WITH HEADER LINE.
    DATA: i_cmd_t TYPE STANDARD TABLE OF ty_seocompodf_t WITH HEADER LINE.
    DATA: i_cmx TYPE STANDARD TABLE OF seocompoex.
    DATA: i_cmt TYPE STANDARD TABLE OF seocompotx.
    DATA: i_irl TYPE STANDARD TABLE OF seoimplrel.
    DATA: i_mat TYPE STANDARD TABLE OF seomapatt.
    DATA: i_mac TYPE STANDARD TABLE OF seomapcls.
    DATA: i_red TYPE STANDARD TABLE OF seoredef.
    DATA: i_frd TYPE STANDARD TABLE OF seofriends.
    DATA: i_tpl TYPE STANDARD TABLE OF seotypepls.
    DATA: i_sco TYPE STANDARD TABLE OF seosubco.
    DATA: i_scd TYPE STANDARD TABLE OF seosubcodf WITH HEADER LINE.
    DATA: i_scd_t TYPE STANDARD TABLE OF ty_seosubcodf_t WITH HEADER LINE.
    DATA: i_scx TYPE STANDARD TABLE OF seosubcoex.
    DATA: i_sct TYPE STANDARD TABLE OF seosubcotx.
    DATA: i_inc TYPE STANDARD TABLE OF d010inc-include WITH HEADER LINE.
    DATA: i_d020t TYPE STANDARD TABLE OF ty_d020t WITH HEADER LINE.
    DATA: hdr TYPE d020s,
          fld TYPE STANDARD TABLE OF d021s WITH HEADER LINE,
          src TYPE STANDARD TABLE OF d022s WITH HEADER LINE,
          mat TYPE STANDARD TABLE OF d023s WITH HEADER LINE.
    CONSTANTS:
               stars(64)          VALUE
                                                                "#EC NOTEXT
               comment1(64)       VALUE
    '*   THIS FILE IS GENERATED BY THE SCREEN PAINTER.              *',
                                                                "#EC NOTEXT
               comment2(64)       VALUE
    '*   NEVER CHANGE IT MANUALLY, PLEASE !                         *',
                                                                "#EC NOTEXT
               dynpro_text(8)     VALUE '%_DYNPRO',             "#EC NOTEXT
               header_text(8)     VALUE '%_HEADER',             "#EC NOTEXT
               params_text(8)     VALUE '%_PARAMS',             "#EC NOTEXT
               descript_text(13)  VALUE '%_DESCRIPTION',        "#EC NOTEXT
               fields_text(8)     VALUE '%_FIELDS',             "#EC NOTEXT
               kreuz(1)           VALUE 'x',                    "#EC NOTEXT
               flowlogic_text(11) VALUE '%_FLOWLOGIC'.          "#EC NOTEXT
    DATA: header_char TYPE scr_chhead.
    DATA: fields_char TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
    DATA: dynp_char TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
    DATA: prog_len     TYPE p.
    DATA: BEGIN OF dynp,
            prog TYPE d020s-prog,
            dnum TYPE d020s-dnum,
          END OF dynp.
    DATA:
        scrp_rel  TYPE dynp_rel_type VALUE '4.02'.  "Rel. Scrp. 4.02
          scrp_rel  TYPE dynp_rel_type VALUE '4.60'.  "Rel. Scrp. 4.6A
    DATA  dynp_rel  TYPE dynp_rel_type.    "akt. Rel. Dynpro
    DATA: dynpro_rel(4).
    DATA  status.
    DATA  prog_len_akt TYPE p.
    DATA  release.
    DATA  rows  LIKE sy-curow.
    DATA  lines LIKE sy-cucol.
    DATA: filename TYPE string.
    DATA: subrc LIKE sy-subrc.
    DATA: os(10).
    DATA: delux VALUE '/'.
    DATA: delwn VALUE '\'.
    DATA: delim.
    DATA: dirux(250) VALUE '-l>dir.tmp'.
    DATA: dirwn(250) VALUE '/Q /Cdir>dir.tmp'.
    DATA: command(250).
    DATA: shellux(250) VALUE 'bash'.
    DATA: shellwn(250) VALUE 'cmd.exe'.
    DATA: shell(250).
    DATA: file      TYPE rlgrap-filename.
    DATA: answer.
    DATA: incname   TYPE d010inc-include.
    DATA: repname   TYPE d010inc-include.
    DATA: rest1     TYPE d010inc-include.
    DATA: rest2     TYPE d010inc-include.
    DATA: kz_renam.
    DATA: classname TYPE seoclsname.
    DATA: classtype(2).
    DATA: offset  TYPE i.
    DATA: savepath(250).
    SELECT-OPTIONS:   report   FOR trdir-name.
    SELECTION-SCREEN: SKIP.
    SELECT-OPTIONS:   cnam     FOR trdir-cnam MATCHCODE OBJECT user_addr,
                      unam     FOR trdir-unam MATCHCODE OBJECT user_addr,
                      devclass FOR tadir-devclass,
                      subc     FOR trdir-subc,
                      rstat    FOR trdir-rstat,
                      cdat     FOR trdir-cdat,
                      udat   FOR trdir-udat.
    SELECTION-SCREEN: SKIP.
    PARAMETERS:       path(250).
    SELECTION-SCREEN: SKIP.
    PARAMETERS:       display  RADIOBUTTON GROUP func,
                      save     RADIOBUTTON GROUP func,
                      savedspl RADIOBUTTON GROUP func.
    SELECTION-SCREEN: SKIP.
    PARAMETERS:       codeonly AS CHECKBOX.
    SELECTION-SCREEN: SKIP.
    *PARAMETERS:       suffix(80) LOWER CASE.
    DATA:             suffix(80) TYPE c.
    LOAD-OF-PROGRAM.
      AUTHORITY-CHECK OBJECT 'S_DEVELOP'
          ID 'DEVCLASS' DUMMY
          ID 'OBJTYPE'  FIELD 'PROG'
          ID 'OBJNAME'  FIELD 'REPTRAN'
          ID 'PGROUP'   DUMMY
          ID 'ACTVT'    FIELD '03'.
      IF sy-subrc <> 0.
        MESSAGE e059(EU) WITH 'REPTRAN'.
      ENDIF.
    INITIALIZATION.
      GET PARAMETER ID 'REPTRAN_PATH' FIELD path.
      IF path IS INITIAL.
        path = 'C:\ABAPS\'.
      ENDIF.
      save = 'X'.
      codeonly = 'X'.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
              ENVIRONMENT    = ' '
              FILENAME       = ' '
                query          = 'OS'
              WINID          = ' '
           IMPORTING
                return         = os
           EXCEPTIONS
                inv_query      = 1
                no_batch       = 2
                frontend_error = 3
                OTHERS         = 4.
      IF sy-subrc = 0 AND
         ( os CS 'OS2' OR os CS 'DOS' OR os CS 'NT' ).
        delim = delwn.
        command = dirwn.
        shell = shellwn.
      ELSE.
        delim = delux.
        command = dirux.
        shell = shellux.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR path.
      GET CURSOR FIELD path VALUE path.
      filename = path.
      PERFORM fileselector.
    AT SELECTION-SCREEN.
      IF report[] IS INITIAL.
        IF NOT reports[] IS INITIAL.
          report = 'IEQ'.
          report-low = reports.
          APPEND report.
          MESSAGE i208(00)
             WITH 'Report/BSP application was also identified'(009).
        ELSE.
          MESSAGE e208(00)
             WITH 'Enter report or BSP application or enter path'(011).
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
      offset = strlen( path ) - 1.
      IF path+offset(1) <> '\'.
        CONCATENATE path '\' INTO path.
      ENDIF.
      SET PARAMETER ID 'REPTRAN_PATH' FIELD path.
      FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
      eu_key-sprsl = sy-langu.
      IF NOT save     IS INITIAL OR
         NOT display  IS INITIAL OR
         NOT savedspl IS INITIAL.
      DOWNLOAD PROGRAMS
        SELECT name  FROM trdir
               INTO  TABLE reports
               WHERE name IN report
               AND   cnam IN cnam
               AND   unam IN unam
               AND   subc IN subc
               AND   rstat IN rstat
               AND   cdat IN cdat
               AND   udat IN udat.
        IF sy-subrc <> 0.
          LOOP AT report.
            CONCATENATE report(3) 'SAPL' report+3 INTO report.
            MODIFY report.
          ENDLOOP.
          SELECT name  FROM trdir
                 INTO  TABLE reports
                 WHERE name IN report
                 AND   cnam IN cnam
                 AND   unam IN unam
                 AND   subc IN subc
                 AND   rstat IN rstat
                 AND   cdat IN cdat
                 AND   udat IN udat.
        ENDIF.
        IF sy-subrc <> 0.
          MESSAGE i208(00)
             WITH 'The program/function name entered does not exist!'(082).
        ENDIF.
        LOOP AT reports.
    Check if report is in development class
          classtype = reports+30.
          IF reports(5) NE 'CL_O2'.
            IF classtype = 'CP'.
              tadir-obj_name = reports.
              SHIFT tadir-obj_name RIGHT DELETING TRAILING space.
              SHIFT tadir-obj_name RIGHT BY 2 PLACES.
              SHIFT tadir-obj_name RIGHT DELETING TRAILING '='.
              SHIFT tadir-obj_name LEFT DELETING LEADING space.
              SELECT SINGLE * FROM  tadir
                     WHERE  pgmid     = 'R3TR'
                     AND    object    = 'CLAS'
                     AND    obj_name  = tadir-obj_name
                     AND    devclass  IN devclass.
            ENDIF.
            IF classtype <> 'CP' OR sy-subrc <> 0.
              SELECT SINGLE * FROM  tadir
                     WHERE  pgmid     = 'R3TR'
                     AND    object    = 'PROG'
                     AND    obj_name  = reports
                     AND    devclass  IN devclass.
              IF sy-subrc <> 0.
                SELECT SINGLE * FROM  tadir
                       WHERE  pgmid     = 'R3TR'
                       AND    object    = 'FUGR'
                       AND    obj_name  = reports
                       AND    devclass  IN devclass.
              ENDIF.
              IF sy-subrc <> 0 AND
                 ( reports(4) = 'SAPL' OR reports(4) = 'sapl' ).
                reportname = reports+4.
                SELECT SINGLE * FROM  tadir
                       WHERE  pgmid     = 'R3TR'
                       AND    object    = 'FUGR'
                       AND    obj_name  = reportname
                       AND    devclass  IN devclass.
              ENDIF.
            ENDIF.
            IF sy-subrc <> 0.
              CONTINUE.
            ENDIF.
          ENDIF.
          reportname = reports.
          PERFORM makepath USING    reportname
                                    path
                           CHANGING savepath.
          PERFORM writeinfo  USING reportname
                                   savepath.
          REFRESH: i_repsrc, i_reptx, i_reptxt, i_inc,
                   sta4, ctx4, fun4, mtx4, doc4, tit4, men4, act4, but4,
                   pfk4, set4, stx4, biv46c,
                   i_d020t, i_adm4,
                   i_tmd, i_tfd, i_cls, i_cdf, i_clx, i_clt, i_cmr, i_cmp,
                   i_cmd, i_cmx, i_cmt, i_irl, i_mat, i_mac, i_red, i_frd,
                   i_tpl, i_sco, i_scd, i_scx, i_sct, i_cmd_t, i_scd_t.
          CLEAR: adm4.
          eu_key-name  = reports.
          READ REPORT reports INTO i_repsrc.
          IF codeonly <> 'X'.
            READ TEXTPOOL reports INTO i_reptx.
          ENDIF.
          LOOP AT i_reptx.
            MOVE-CORRESPONDING i_reptx TO i_reptxt.
            APPEND i_reptxt.
          ENDLOOP.
          IF NOT display  IS INITIAL OR
             NOT savedspl IS INITIAL.
            PERFORM show_rep.
          ENDIF.
          IF classtype = 'CP' OR classtype = 'IP'.
            classname = reports(30).
            TRANSLATE classname USING '= '.
            SELECT * FROM tmdir INTO TABLE i_tmd
                   WHERE classname = classname.
            SELECT * FROM seoclass   INTO TABLE i_cls
                   WHERE clsname = classname.
            SELECT * FROM seoclassdf INTO TABLE i_cdf
                   WHERE clsname = classname.
            SELECT * FROM seoclassex INTO TABLE i_clx
                   WHERE clsname = classname.
            SELECT * FROM seoclasstx INTO TABLE i_clt
                   WHERE clsname = classname.
            SELECT * FROM seometarel INTO TABLE i_cmr
                   WHERE clsname = classname.
            SELECT * FROM seocompo   INTO TABLE i_cmp
                   WHERE clsname = classname.
            SELECT * FROM seocompodf INTO TABLE i_cmd
                   WHERE clsname = classname.
            LOOP AT i_cmd.
              MOVE-CORRESPONDING i_cmd TO i_cmd_t.
              APPEND i_cmd_t.
            ENDLOOP.
            SELECT * FROM seocompoex INTO TABLE i_cmx
                   WHERE clsname = classname.
            SELECT * FROM seocompotx INTO TABLE i_cmt
                   WHERE clsname = classname.
            SELECT * FROM seoimplrel INTO TABLE i_irl
                   WHERE clsname = classname.
            SELECT * FROM seomapatt  INTO TABLE i_mat
                   WHERE clsname = classname.
            SELECT * FROM seomapcls  INTO TABLE i_mac
                   WHERE clsname = classname.
            SELECT * FROM seoredef   INTO TABLE i_red
                   WHERE clsname = classname.
            SELECT * FROM seofriends INTO TABLE i_frd
                   WHERE clsname = classname.
            SELECT * FROM seotypepls INTO TABLE i_tpl
                   WHERE clsname = classname.
            SELECT * FROM seosubco   INTO TABLE i_sco
                   WHERE clsname = classname.
            SELECT * FROM seosubcodf INTO TABLE i_scd
                   WHERE clsname = classname.
            LOOP AT i_scd.
              MOVE-CORRESPONDING i_scd TO i_scd_t.
              APPEND i_scd_t.
            ENDLOOP.
            SELECT * FROM seosubcoex INTO TABLE i_scx
                   WHERE clsname = classname.
            SELECT * FROM seosubcotx INTO TABLE i_sct
                   WHERE clsname = classname.
          ELSE.
            CLEAR classtype.
          ENDIF.
          IF codeonly <> 'X'.
            SELECT * FROM tfdir INTO TABLE i_tfd
                   WHERE pname = reports.
            CALL FUNCTION 'RS_CUA_INTERNAL_FETCH'
                 EXPORTING
                      program         = reports
                    LANGUAGE        =
                    STATE           = 'A'
                 IMPORTING
                      adm             = adm4
                    LANGU           =
                    AUTHOR          =
                    DATE            =
                    TIME            =
                    CAUTHOR         =
                    CDATE           =
                    CTIME           =
                    GDATE           =
                    GTIME           =
                 TABLES
                      sta             = sta4
                      fun             = fun4
                      men             = men4
                      mtx             = mtx4
                      act             = act4
                      but             = but4
                      pfk             = pfk4
                      set             = set4
                      doc             = doc4
                      tit             = tit4
                      biv             = biv46c
                 EXCEPTIONS
                      not_found       = 1
                      unknown_version = 2
                      OTHERS          = 3.
            SELECT ddnr text_line FROM title INTO TABLE tit
                   WHERE ddlanguage = eu_key-sprsl AND
                         progname   = eu_key-name.
            SELECT * FROM rsmptexts INTO TABLE stx4
                   WHERE progname   = eu_key-name AND
                         sprsl = eu_key-sprsl.
            SELECT prog dynr dtxt FROM d020t INTO TABLE i_d020t
                   WHERE prog = reports AND
                         NOT dtxt LIKE 'SEL_SCREEN%'.
          ENDIF.
          IF NOT classtype IS INITIAL.
            reports = classname.
          ENDIF.
          TRANSLATE reports TO LOWER CASE.
          TRANSLATE reports USING '/.'.
          IF NOT save     IS INITIAL OR
             NOT savedspl IS INITIAL.
            CONCATENATE savepath reports suffix '.txt' INTO filename.
            PERFORM download TABLES i_repsrc USING filename
                             'Source'(003).
            IF NOT i_reptxt[] IS INITIAL.
              CONCATENATE savepath reports suffix '_txt.txt' INTO filename.
              PERFORM download TABLES i_reptxt USING filename
                               'Text elements'(004).
            ENDIF.
          ENDIF.
          SELECT include FROM d010inc INTO TABLE i_inc
                 WHERE master = eu_key-name.
          DELETE i_inc WHERE table_line(1) = '<'.
          DELETE i_inc WHERE table_line(1) = '>'.
          DELETE i_inc WHERE table_line = 'DB__SSEL'.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_inc[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_inc.txt' INTO filename.
            PERFORM download TABLES i_inc USING filename
                             'Include List'(033).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_tmd[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_tmd.txt' INTO filename.
            PERFORM download TABLES i_tmd USING filename
                             'Methods List'(048).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_cls[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_cls.txt' INTO filename.
            PERFORM download TABLES i_cls USING filename
                             'Class Entry'(050).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_cdf[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_cdf.txt' INTO filename.
            PERFORM download TABLES i_cdf USING filename
                             'Class Definition'(051).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_clx[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_clx.txt' INTO filename.
            PERFORM download TABLES i_clx USING filename
                             'Class Remote Info'(052).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_clt[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_clt.txt' INTO filename.
            PERFORM download TABLES i_clt USING filename
                             'Class Description'(053).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_cmr[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_cmr.txt' INTO filename.
            PERFORM download TABLES i_cmr USING filename
                             'Class Meta Relations'(054).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_cmp[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_cmp.txt' INTO filename.
            PERFORM download TABLES i_cmp USING filename
                             'Class Components'(055).
          ENDIF.
          IF ( NOT save      IS INITIAL OR
               NOT savedspl  IS INITIAL ) AND
               NOT i_cmd_t[] IS INITIAL.
            CONCATENATE savepath reports suffix '_cmd.txt' INTO filename.
            PERFORM download TABLES i_cmd_t USING filename
                             'Class Components Definitions'(056).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_cmx[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_cmx.txt' INTO filename.
            PERFORM download TABLES i_cmx USING filename
                             'Class Components Remote Infos'(057).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_cmt[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_cmt.txt' INTO filename.
            PERFORM download TABLES i_cmt USING filename
                             'Class Components Descriptions'(058).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_irl[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_irl.txt' INTO filename.
            PERFORM download TABLES i_irl USING filename
                             'Class Components Relation Types'(059).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_mat[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_mat.txt' INTO filename.
            PERFORM download TABLES i_mat USING filename
                             'Class Mapping Attributes'(060).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_mac[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_mac.txt' INTO filename.
            PERFORM download TABLES i_mac USING filename
                             'Class Mapping Classes'(061).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_red[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_red.txt' INTO filename.
            PERFORM download TABLES i_red USING filename
                             'Class Redefinitions'(062).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_frd[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_frd.txt' INTO filename.
            PERFORM download TABLES i_frd USING filename
                             'Class Friends'(063).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_tpl[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_tpl.txt' INTO filename.
            PERFORM download TABLES i_tpl USING filename
                             'Class Type-Pools'(064).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_sco[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_sco.txt' INTO filename.
            PERFORM download TABLES i_sco USING filename
                             'Class Sub Components'(065).
          ENDIF.
          IF ( NOT save      IS INITIAL OR
               NOT savedspl  IS INITIAL ) AND
               NOT i_scd_t[] IS INITIAL.
            CONCATENATE savepath reports suffix '_scd.txt' INTO filename.
            PERFORM download TABLES i_scd_t USING filename
                             'Class Sub Components Definitions'(066).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_scx[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_scx.txt' INTO filename.
            PERFORM download TABLES i_scx USING filename
                             'Class Sub Components Remote Infos'(067).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_sct[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_sct.txt' INTO filename.
            PERFORM download TABLES i_sct USING filename
                             'Class Sub Components Descriptions'(068).
          ENDIF.
          IF ( NOT save     IS INITIAL OR
               NOT savedspl IS INITIAL ) AND
               NOT i_tfd[]  IS INITIAL.
            CONCATENATE savepath reports suffix '_tfd.txt' INTO filename.
            PERFORM download TABLES i_tfd USING filename
                             'Function List'(049).
          ENDIF.
          IF NOT i_inc[] IS INITIAL.
            LOOP AT i_inc.
              REFRESH: i_reptx, i_reptxt.
              READ REPORT i_inc INTO i_repsrc.
              IF codeonly <> 'X'.
                READ TEXTPOOL i_inc INTO i_reptx.
              ENDIF.
              LOOP AT i_reptx.
                MOVE-CORRESPONDING i_reptx TO i_reptxt.
                APPEND i_reptxt.
              ENDLOOP.
              IF NOT display IS INITIAL OR
                NOT savedspl IS INITIAL.
                PERFORM show_inc.
              ENDIF.
              TRANSLATE i_inc TO LOWER CASE.
              TRANSLATE i_inc USING '/.'.
              IF NOT save     IS INITIAL OR
                 NOT savedspl IS INITIAL.
                CONCATENATE savepath i_inc suffix '.txt' INTO filename.
                PERFORM download TABLES i_repsrc USING filename
                                 'Include Source'(032).
                IF NOT i_reptxt[] IS INITIAL.
                  CONCATENATE savepath i_inc suffix '_txt.txt'
                              INTO filename.
                  PERFORM download TABLES i_reptxt USING filename
                                   'Text elements'(004).
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDIF.
          IF NOT i_d020t[] IS INITIAL.
            LOOP AT i_d020t.
              IMPORT DYNPRO hdr fld src mat ID i_d020t.
              CALL FUNCTION 'RS_SCRP_UPGRADE_DYNPRO'
                   TABLES
                        f = fld
                        m = mat
                   CHANGING
                        h = hdr.
              IF src[] IS INITIAL.
                DELETE i_d020t.
                CONTINUE.
              ENDIF.
              CLEAR src.
              READ TABLE src INDEX 1.
              IF src-line CS 'Do not change'.
                DELETE i_d020t.
                CONTINUE.
              ENDIF.
              CALL FUNCTION 'RS_SCRP_GET_SCREEN_INFOS'
                   EXPORTING
                        dynnr                 = hdr-dnum
                        progname              = hdr-prog
                        with_fieldlist        = 'X'
                   IMPORTING
                        lines                 = lines
                        columns               = rows
                   TABLES
                        fieldlist             = fld
                   EXCEPTIONS
                        dynpro_does_not_exist = 01
                        no_field_list         = 02.
              hdr-bzmx = lines.
              hdr-bzbr = rows.
              IF NOT display  IS INITIAL OR
                 NOT savedspl IS INITIAL.
                PERFORM show_dyn.
              ENDIF.
              IF NOT save     IS INITIAL OR
                 NOT savedspl IS INITIAL.
                PERFORM dynpro_download.
              ENDIF.
            ENDLOOP.
            IF ( NOT save     IS INITIAL OR
                 NOT savedspl IS INITIAL ) AND
               NOT i_d020t[] IS INITIAL.
              CONCATENATE savepath reports suffix '_dyn.txt' INTO filename.
              PERFORM download TABLES i_d020t USING filename
                               'Dynpro List'(040).
            ENDIF.
          ENDIF.
          IF NOT save     IS INITIAL OR
             NOT savedspl IS INITIAL.
            IF NOT sta4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_sta.txt' INTO filename.
              PERFORM download TABLES sta4 USING filename
                               'GUI Status'(013).
            ENDIF.
            IF NOT ctx4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_ctx.txt' INTO filename.
              PERFORM download TABLES ctx4 USING filename
                               'Object Codes'(045).
            ENDIF.
            IF NOT fun4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_fun.txt' INTO filename.
              PERFORM download TABLES fun4 USING filename
                               'Function Texts'(014).
            ENDIF.
            IF NOT men4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_men.txt' INTO filename.
              PERFORM download TABLES men4 USING filename
                               'Menus'(015).
            ENDIF.
            IF NOT tit4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_sti.txt' INTO filename.
              PERFORM download TABLES tit4 USING filename
                               'Title Codes'(042).
            ENDIF.
            IF NOT mtx4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_mtx.txt' INTO filename.
              PERFORM download TABLES mtx4 USING filename
                               'Menu Texts'(016).
            ENDIF.
            IF NOT act4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_act.txt' INTO filename.
              PERFORM download TABLES act4 USING filename
                               'Menu Bars'(047).
            ENDIF.
            IF NOT but4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_but.txt' INTO filename.
              PERFORM download TABLES but4 USING filename
                               'Push Buttons'(018).
            ENDIF.
            IF NOT pfk4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_pfk.txt' INTO filename.
              PERFORM download TABLES pfk4 USING filename
                               'PF Keys'(019).
            ENDIF.
            IF NOT adm4 IS INITIAL.
              APPEND adm4 TO i_adm4.
              CONCATENATE savepath reports suffix '_adm.txt' INTO filename.
              PERFORM download TABLES i_adm4 USING filename
                               'Management Information'(043).
            ENDIF.
            IF NOT set4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_set.txt' INTO filename.
              PERFORM download TABLES set4 USING filename
                               'Function Sets'(020).
            ENDIF.
            IF NOT stx4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_stx.txt' INTO filename.
              PERFORM download TABLES stx4 USING filename
                               'Status Texts'(023).
            ENDIF.
            IF NOT doc4[] IS INITIAL.
              CONCATENATE savepath reports suffix '_doc.txt' INTO filename.
              PERFORM download TABLES doc4 USING filename
                               'Status Short Texts'(024).
            ENDIF.
            IF NOT biv46c[] IS INITIAL.
              CONCATENATE savepath reports suffix '_biv.txt' INTO filename.
              PERFORM download TABLES biv46c USING filename
                               'Invariant Functions'(048).
            ENDIF.
            IF NOT tit[] IS INITIAL.
              CONCATENATE savepath reports suffix '_tit.txt' INTO filename.
              PERFORM download TABLES tit USING filename
                               'Title Bars'(030).
            ENDIF.
          ENDIF.
          ULINE.
        ENDLOOP.
      ENDIF.
      REFRESH reports.
    *&      Form  DOWNLOAD
    FORM download TABLES   tabelle
                  USING    value(filename)
                           component.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
              BIN_FILESIZE            = ' '
                filename                = filename
                filetype                = 'ASC'
         IMPORTING
              FILELENGTH              =
           TABLES
                data_tab                = tabelle
           EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                OTHERS                  = 5.
    IF reports IS INITIAL.
       WRITE: / appls.
    ELSE.
       WRITE: / reports.
    ENDIF.
      WRITE: /(20) component.
      IF sy-subrc = 0.
        WRITE: 'successfully downloaded'(001).
        PERFORM getfilename USING    filename
                            CHANGING filename.
        WRITE: '->', filename.
      ELSE.
        WRITE: 'not downloaded,  RC ='(002), sy-subrc.
      ENDIF.
    ENDFORM.                                                    " DOWNLOAD
    *&      Form  FILESELECTOR
    FORM fileselector.
      DATA: repname(250).
      DATA: fdpos(2) TYPE p.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
              DEF_FILENAME     = ' '
                def_path         = path
                mask             = ',.txt,.txt.'
                mode             = 'O'
              TITLE            = ' '
           IMPORTING
                filename         = file
              RC               =
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
      subrc = sy-subrc.
      path = file.
      CLEAR: sy-fdpos, sy-subrc.
      fdpos = 1.
      WHILE sy-subrc = 0.
        fdpos = fdpos + sy-fdpos + 1.
        SEARCH path FOR delim STARTING AT fdpos.
      ENDWHILE.
      fdpos = fdpos - 1.
      path = path(fdpos).
      repname = file.
      CLEAR sy-subrc.
      WHILE sy-subrc = 0.
        SHIFT repname LEFT.
        SHIFT repname LEFT UP TO delim.
      ENDWHILE.
      SHIFT repname RIGHT UP TO '.'.
      SHIFT repname RIGHT.
      SHIFT repname LEFT DELETING LEADING space.
      TRANSLATE repname TO UPPER CASE.
      reports = repname.
      APPEND reports.
    ENDFORM.                               " FILESELECTOR
    *&      Form  LS
    FORM ls.
      TYPES: c80(80).
      DATA: dirtab TYPE STANDARD TABLE OF c80 WITH HEADER LINE.
      DATA: datei TYPE string.
      DATA: i LIKE sy-tabix.
      DATA: endtime LIKE sy-uzeit.
      CALL FUNCTION 'WS_EXECUTE'
           EXPORTING
              DOCUMENT       = ' '
                cd             = path
                commandline    = command
              INFORM         = ' '
                program        = shell
              STAT           = ' '
              WINID          = ' '
              OSMAC_SCRIPT   = ' '
              OSMAC_CREATOR  = ' '
              WIN16_EXT      = ' '
              EXEC_RC        = ' '
         IMPORTING
              RBUFF          =
           EXCEPTIONS
                frontend_error = 1
                no_batch       = 2
                prog_not_found = 3
                illegal_option = 4
                OTHERS         = 5.
      IF sy-subrc NE 0.
        MESSAGE e001(pc).
      Error when executing the WS program
      ENDIF.
      CONCATENATE path 'dir.tmp'  INTO datei.
      GET TIME.
      endtime = sy-uzeit + 3.
      WHILE sy-uzeit < endtime.
        GET TIME.
      ENDWHILE.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                filename                = datei
                filetype                = 'ASC'
         IMPORTING
              FILELENGTH              =
           TABLES
                data_tab                = dirtab
           EXCEPTIONS
                file_read_error         = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                OTHERS                  = 5.
      IF sy-subrc NE 0.
        MESSAGE e001(pc).
      Error when executing the WS program
      ENDIF.
      REFRESH reports.
      i = 1.
      DO.
        SEARCH dirtab FOR '.txt' STARTING AT i.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        READ TABLE dirtab INDEX sy-tabix.
        i = sy-tabix + 1.
        CHECK dirtab NS 'txt_.txt'.
        SHIFT dirtab LEFT UP TO space.
        SHIFT dirtab LEFT DELETING LEADING space.
        SHIFT dirtab LEFT UP TO space.
        SHIFT dirtab LEFT DELETING LEADING space.
        SHIFT dirtab LEFT UP TO space.
        SHIFT dirtab RIGHT UP TO '.'.
        SHIFT dirtab RIGHT.
        SHIFT dirtab LEFT DELETING LEADING space.
        IF NOT dirtab IS INITIAL.
          TRANSLATE dirtab TO LOWER CASE.
          APPEND dirtab TO reports.
        ENDIF.
      ENDDO.
      SORT reports.
      DELETE ADJACENT DUPLICATES FROM reports.
    ENDFORM.                                                    " LS
    *&      Form  SHOW_DYN
    FORM show_dyn.
    Printing Dynpro data
    Header for Dynpro
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Dynpro header', AT sy-linsz ''.
      FORMAT COLOR COL_NORMAL.
      WRITE: / 'Program:',    30 hdr-prog, AT sy-linsz '',
             / 'Dynpro:',      30 hdr-dnum, AT sy-linsz '',
             / 'Follow-up dynpro:', 30 hdr-fnum, AT sy-linsz ''.
      ULINE.
    Print field list
      FORMAT COLOR COL_TOTAL.
      WRITE:  / 'Field list'  COLOR COL_TOTAL, AT sy-linsz ''.
      FORMAT COLOR COL_HEADING.
      WRITE:  / 'Field',
             25 'Line',
             30 'Column',
             37 'TYPE',
             42 'LOOPTyp',
             50 'DDIC',
             55 'FormByte', AT sy-linsz ''.
      CALL FUNCTION 'RS_SCRP_FIELDS_RAW_TO_CHAR'
           TABLES
                fields_int  = fld
                fields_char = fields_char
           EXCEPTIONS
                OTHERS      = 1.
      FORMAT COLOR COL_NORMAL.
      LOOP AT fields_char.
        WRITE: /(24) fields_char-feldname,
                  25 fields_char-line,
                  30 fields_char-coln,
                  37 fields_char-feldformat,
                  42 fields_char-looptype,
                  50 fields_char-inttyp,
                  55 fields_char-fmb1,
                  58 fields_char-fmb2.
      ENDLOOP.
      ULINE.
    Display logic
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Logic', AT sy-linsz ''.
      FORMAT COLOR COL_NORMAL.
      LOOP AT src.
        WRITE: / src-line.
      ENDLOOP.
      ULINE.
      SKIP.
    Display matchcode data
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Matchcode data', AT sy-linsz ''.
      FORMAT COLOR COL_NORMAL.
      LOOP AT mat.
        WRITE: /(80) mat.
      ENDLOOP.
      IF sy-subrc NE 0.
        WRITE / ' no matchcode files available ' COLOR COL_NEGATIVE.
      ENDIF.
      NEW-PAGE.
    ENDFORM.                                                    " SHOW_DYN
    *&      Form  SHOW_REP
    FORM show_rep.
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Program:', reports, AT sy-linsz ''.
      FORMAT COLOR COL_BACKGROUND.
      LOOP AT i_repsrc.
        WRITE: / i_repsrc.
      ENDLOOP.
      ULINE.
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Text elements for program:', reports, AT sy-linsz ''.
      FORMAT COLOR COL_HEADING.
      WRITE:  / 'Type',
              5 'Key',
             20 'Length',
             30 'Text', AT sy-linsz ''.
      FORMAT COLOR COL_NORMAL.
      LOOP AT i_reptxt.
        WRITE: / i_reptxt-id,
               5 i_reptxt-key,
           20(4) i_reptxt-length,
          30(80) i_reptxt-entry.
      ENDLOOP.
      NEW-PAGE.
    ENDFORM.                                                    " SHOW_REP
    *&      Form  SHOW_INC
    FORM show_inc.
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Include:', i_inc, AT sy-linsz ''.
      FORMAT COLOR COL_BACKGROUND.
      LOOP AT i_repsrc.
        WRITE: / i_repsrc.
      ENDLOOP.
      ULINE.
      FORMAT COLOR COL_TOTAL.
      WRITE: / 'Text elements for include:', i_inc, AT sy-linsz ''.
      FORMAT COLOR COL_HEADING.
      WRITE:  / 'Type',
              5 'Key',
             20 'Length',
             30 'Text', AT sy-linsz ''.
      FORMAT COLOR COL_NORMAL.
      LOOP AT i_reptxt.
        WRITE: / i_reptxt-id,
               5 i_reptxt-key,
           20(4) i_reptxt-length,
          30(80) i_reptxt-entry.
      ENDLOOP.
      NEW-PAGE.
    ENDFORM.                                                    " SHOW_INC
    *&      Form  DYNPRO_DOWNLOAD
    &

  • Module pool to maintiane table ztavble

    hi
    can anyone send me complete code to refer for maintaining a ztable
    following validation are required like
    1) sortiing
    deletein and addition save etc all as in table maintianece i need to code by module pool becasue in table maintainece sorting coding is not possible...
    also validation are
    1) whne user enters ship to info name 1 should automatically be populated from kna1 on pressing enter how to acheive this by module pool
    2) email verification format should be correct? how to acheive this by module pool
    3) sorting on basis of all fields
    regards
    Nishant

    Hi Nishanth,,,
    I also developed the same kind of Program for maintaining the Ztable...
    Jus create a new GUI Staus...with the required functions....
    Refer the below code:
       REPORT                     : Z0BRAP_TAX_EXCEPTION .
    TITLE                      : Tax Exceptions Table
    AUTHOR                     : Swaminathan PJ
    DATE                       : 04/12/2006
    DDN NUMBER                 : SAP-BR-TB0020
    TRANSPORT REQUEST NUMBER   : D12K912309
    REFERENCE                  :
    DESCRIPTION
    Program Z0BRAP_TAX_EXCEPTION is an Report program to update the table
    ZTBRAP_TAX_EXCPT,here user can Create/Change/Display the table entrie
    s and can perform the following functions (Filter,Sort,Summation and
    Subtotal).
    AMENDMENTS
    CHANGES REF         DATE         PERSON         Tran.Req. Number
    DESCRIPTION:
                   Include for Global Declarations                       *
       INCLUDE: znbrap_tax_exception_top.                                           " Include for Global Declarative elements
         Include
    All the subroutines are include
       INCLUDE znbrap_tax_exception.                                                " Include for all Subroutines
         START OF SELECTION
       START-OF-SELECTION.
      Main Subroutine
         PERFORM  procMain.
                         End of Selection                                *
       END-OF-SELECTION.
    INCLUDE                    : ZNBRAP_TAX_EXCEPTION_TOP
    TITLE                      : Data Declarations
    AUTHOR                     :
    DATE                       : 04.12.2006
    TRANSPORT REQUEST NUMBER   : D12K912309
    DESCRIPTION
    Global Data Declarations for Z0BRAP_TAX_EXCEPTION
    AMENDMENTS
    CHANGES REF         DATE         PERSON         Tran.Req. Number
    DESCRIPTION:
    ALV Declarations
    TYPE-POOLS: slis.
    Types contains the structure of the table
    *TYPES :   BEGIN OF gy_tax_exception.
               INCLUDE STRUCTURE ztbrap_tax_excpt.
                 mandt           TYPE   mandt,
                 zmonat          TYPE   monat,
                 zbukrs          TYPE   bukrs,
                 zlifnr          TYPE   lifnr,
                 zexctype        TYPE   zebrap_exctype,
                 zstcd1          TYPE   stcd1,
                 zaugdt_other    TYPE   budat,
                 zbelnr          TYPE   belnr,
                 zdmbtr          TYPE   dmbtr,
                 zwhtinssca      TYPE   dmbtr,
                 zuserch         TYPE   syuname,
                 zdate_change    TYPE   datum,
                 ztime_change    TYPE   uzeit,
    *TYPES:          END OF gy_tax_exception.
    Tables for the structure defined above
    *TYPES : gy_tax_exception_tab  TYPE STANDARD TABLE OF gy_tax_exception.
    Internal Table
    DATA: gt_tax_excpt_tab        TYPE   STANDARD TABLE OF ztbrap_tax_excpt WITH HEADER LINE, "Global internal table for Tax exceptions data
          gt_fieldcat                   TYPE   slis_fieldcat_alv OCCURS 0 WITH HEADER LINE.         "Global internal table for fieldcat
    *&  Include           ZNBRAP_TAX_EXCEPTION                             *
    *&      Form  procMain
          text
    -->  p1        text
    <--  p2        text
    FORM procMain .
    Set PF-Status
      perform procInitialize.
    Select Tax Exceptions Data
      perform procGetTaxExceptionsData.
    Display ALV Report with Tax Exceptions Data
      perform procDisplayTaxExceptionsData.
    ENDFORM.                    " procMain
          FORM initialize                                               *
    form procInitialize.
      CONSTANTS :
      lc_pfstatus               TYPE    abnkr VALUE 'ZTAX_EXCEPTION'. "Pf Status
    Set status
      set pf-status lc_pfstatus.
    endform.                    "procInitialize
          FORM retrieve_data                                            *
          Retrieve data from SAP                                        *
    form procGetTaxExceptionsData.
      REFRESH: gt_tax_excpt_tab.
      select * from ztbrap_tax_excpt
        appending corresponding fields of table gt_tax_excpt_tab.
    endform.                    "procGetTaxExceptionsData
    Called by REUSE_ALV_GRID_DISPLAY when user interacts.               *
    In this case, there are a number of buttons / menu options for      *
    user to select for non-standard functions:                          *
    o Single Display                                                    *
    o Single Change                                                     *
    o Single create                                                     *
    o Single Delete                                                     *
          --> lv_ucomm                                                  *
          --> LW_SELFIELD                                               *
    form user_command using lv_ucomm like sy-ucomm
                      lw_selfield type slis_selfield.
    Work area
      DATA: lw_update_tax_excpt TYPE    ztbrap_tax_excpt. " work area for tax exceptions data
      DATA: lw_tax_exception    TYPE    ztbrap_tax_excpt. " work area for tax exceptions data
    Variables
      DATA: lv_key              TYPE    abkrs ,                 "key fields
            lv_non_key          TYPE    abkrs,                  "Non Key Fields
            lv_insert           TYPE    ablnv,                  "Insert
            lv_change           TYPE    ablnv,                  "Change
            lv_entry            TYPE    ablnv,                  "Popup title
            lv_display          TYPE    ablnv,                  "Display
            lv_delete           TYPE    ablnv,                  "Delete
            lv_mode             TYPE    ablnv .                 "Menu options
    Constants
      CONSTANTS:
           lc_new               TYPE    alind VALUE 'ZNEW',     "Fcode for new
           lc_update            TYPE    alind VALUE 'ZBR',      "Fcode for change
           lc_view              TYPE    alind VALUE 'ZDISP',    "Fcode for display
           lc_delete            TYPE    alind VALUE 'ZDEL ',    "Fcode for delete
           lc_show_field        TYPE    abkrs VALUE '00',       "Show field
           lc_hide_field        TYPE    abkrs VALUE '02'.       "Hide field
    Clear Local Work Area
      CLEAR :
           lw_update_tax_excpt.
    Clear Local Variables
      CLEAR :
           lv_key,
           lv_non_key,
           lv_mode,
           lv_insert,
           lv_delete,
           lv_change,
           lv_display.
    Retrieve data for selected line & store it in a temp structure.
      READ TABLE gt_tax_excpt_tab index lw_selfield-tabindex .
      if sy-subrc is not initial and lv_ucomm <> lc_new  and lv_ucomm(6) <> 'DELETE'.
        message w123(m&).   " Position the cursor on a valid line
        exit.
      endif.
    Moving the contents to workarea
    MOVE gt_tax_excpt_tab-zmonat         TO lw_update_tax_excpt-zmonat.
    MOVE gt_tax_excpt_tab-zbukrs         TO lw_update_tax_excpt-zbukrs.
    MOVE gt_tax_excpt_tab-zlifnr         to lw_update_tax_excpt-zlifnr.
    MOVE gt_tax_excpt_tab-zexctype       to lw_update_tax_excpt-zexctype.
    MOVE gt_tax_excpt_tab-zstcd1         to lw_update_tax_excpt-zstcd1.
    MOVE gt_tax_excpt_tab-zaugdt_other   to lw_update_tax_excpt-zaugdt_other.
    MOVE gt_tax_excpt_tab-zbelnr         to lw_update_tax_excpt-zbelnr.
    MOVE gt_tax_excpt_tab-zdmbtr         to lw_update_tax_excpt-zdmbtr.
    MOVE gt_tax_excpt_tab-zwhtinssca     to lw_update_tax_excpt-zwhtinssca.
    MOVE gt_tax_excpt_tab-zuserch        to lw_update_tax_excpt-zuserch.
    MOVE gt_tax_excpt_tab-zdate_change   to lw_update_tax_excpt-zdate_change.
    MOVE gt_tax_excpt_tab-ztime_change   to lw_update_tax_excpt-ztime_change.
    Move the text for Add,Change,Display
      Move text-019 To lv_insert.
      Move text-020 To lv_change.
      Move text-021 To lv_display.
      Move text-023 To lv_delete.
    Now see which button / menu option user has selected
      case lv_ucomm.
        when lc_view.               "Display a single entry
          lv_mode    = lv_display.
          lv_key     = lc_hide_field.     "hide key fields
          lv_non_key = lc_hide_field.     "hide non key fields
          perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
        when lc_update .          "Update a single entry (show non-key fields)
          lv_mode    = lv_change.
          lv_key     = lc_hide_field.    "hide key fields
          lv_non_key = lc_show_field.    "show non-key fields
          perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
        when lc_new. "Add a single new entry (show all fields)
          lv_mode    = lv_insert.
          lv_key     = lc_show_field.
          lv_non_key = lc_show_field.
          clear lw_update_tax_excpt.  "Empty structure to give new entry.
          perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
        WHEN lc_delete.               " Delete current entry
          lv_mode   = lv_delete.
          lv_key    = lc_hide_field.
          lv_non_key = lc_hide_field.
         perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
      endcase.
    endform.                    "user_command
          FORM procFindKeyFields                                        *
    -->  lw_tax_excpt                                                  *
    -->  lw_update_tax_excpt                                           *
    -->  lv_ret                                                        *
    form procFindKeyFields  using  lw_update_tax_excpt structure  ztbrap_tax_excpt
                                   lv_mode
                                   lv_insert
                                   lv_delete
                                   lv_change
                                   lv_display
                                   lv_key
                                   lv_non_key
                                   lw_selfield type slis_selfield.
    Work area
      DATA:lw_key_table         TYPE    dfies occurs 0 with header line,      "Work area for for key fields
           lw_tax_excpt         TYPE    sval  occurs 0 with header line.      "Work area for tax exceptions data
    Variables
      DATA: lv_ret              TYPE    char1,                                "Return parameter
            lv_title            TYPE    text60,                               "Popup title
            lv_excpt_type       TYPE    ZEBRAP_EXCTYPE,                       "Exception type
            lv_entry            TYPE    ablnv,                                "Popup text
            lv_vendor           TYPE    lifnr,                                "Vendor
            lv_vendor_no        TYPE    lifnr,                                "Vendor
            lv_co_code          TYPE    bukrs,                                "Company code
            lv_comp_code        TYPE    bukrs,                                "Company code
            lv_answer           TYPE    aavis.                                "Return parameter
    Constants
      CONSTANTS:
            lc_ref_tab          TYPE    ablnv VALUE 'T001',                   "Reference table
            lc_ref_fld          TYPE    ablnv VALUE 'WAERS',                  "Reference field
            lc_hide_fld         TYPE    abkrs VALUE '04',                     "Hide field
            lc_client           TYPE    amert VALUE 'MANDT',                  "Client
            lc_user             TYPE    amert VALUE 'ZUSERCH',                "User
            lc_date             TYPE    amert VALUE 'ZDATE_CHANGE',           "Date
            lc_time             TYPE    amert VALUE 'ZTIME_CHANGE',           "Time
            lc_taxno            TYPE    amert VALUE 'ZSTCD1',                 "Tax Number
            lc_vendor           TYPE    amert VALUE 'ZLIFNR',                 "Vendor
            lc_exception_typ    TYPE    amert VALUE 'ZEXCTYPE',               "Exception type
            lc_clearing_dt      TYPE    amert VALUE 'ZAUGDT_OTHER',           "Clearing date
            lc_period           TYPE    amert VALUE 'ZMONAT',                 "Period
            lc_co_code          TYPE    amert VALUE 'ZBUKRS',                 "Company code
            lc_gross_amt        TYPE    amert VALUE 'ZDMBTR',                 "Gross amount
            lc_excpt_amt        TYPE    amert VALUE 'ZWHTINSSCA',             "Exception amount
            lc_period_def       TYPE    abkrs VALUE '00',                     "Default value for period
            lc_amount_def       TYPE    amert VALUE '0.00',                   "Default value for amount
            lc_date_def         TYPE    amert VALUE '00000000',               "Default value for date
            lc_exctype_mf       TYPE    abkrs VALUE 'MF',                     "Exception type value
            lc_exctype_gr       TYPE    abkrs VALUE 'GR',                     "Exception type value
            lc_field_obl        TYPE    aavis VALUE 'X',                      "Obligatory
            lc_cancel           TYPE    aavis VALUE 'X',                      "Obligatory
            lc_return           TYPE    aavis VALUE 'A',                      "Return parameter
            lc_mandatory        TYPE    aavis VALUE '?',                      "Mandatory
            lc_space            TYPE    abkrs VALUE ' ',                      "Space
            lc_notsupported     TYPE    agitt VALUE 1,                        "Exception for FM
            lc_others           TYPE    agitt VALUE 2,                        "Exception for FM
            lc_error            TYPE    agitt VALUE 1,                        "Exception for FM
            lc_confirm          TYPE    agitt VALUE 1,                        "Exception for FM
            lc_text             TYPE    agitt VALUE 1,                        "Exception for FM
            lc_start_column     TYPE    abkrs VALUE '50',                     "Start column
            lc_start_row        TYPE    aavis VALUE '7',                      "Start column
            lc_tabname          TYPE    amert VALUE 'ZTBRAP_TAX_EXCPT',       "Table name,
            lc_column           TYPE    SY-CUCOL VALUE 25,                    "Start column
            lc_row              TYPE    SY-CUROW VALUE 6.                     "Start row
    Clear Local Work Area
      CLEAR :
           lw_tax_excpt,
           lw_key_table .
    Clear Local Variables
      CLEAR :
            lv_ret,
            lv_title,
            lv_excpt_type,
            lv_vendor,
            lv_vendor_no,
            lv_co_code,
            lv_comp_code,
            lv_answer.
    Field symbol
      field-symbols:            <lf_tax_excpt>,                                         "Tax exceptions values
                                <lf_tax_excpt_value>.
    Move the text for entry
      Move text-022 To lv_entry.
      REFRESH lw_tax_excpt.
      lw_tax_excpt-field_obl = lc_field_obl.
      lw_tax_excpt-tabname =   lc_tabname.
    Determine which are key fields in the table. This is necessary to
    control which fields are available for display
      call function 'GET_KEY_FIELDS_OF_TABLE'
        EXPORTING
          tabname       = lw_tax_excpt-tabname
          mandt_needed  = lc_field_obl
        TABLES
          key_fieldtab  = lw_key_table
        EXCEPTIONS
          not_supported = lc_notsupported
          others        = lc_others.
      if sy-subrc is not initial.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        exit.
      endif.
      loop at gt_fieldcat.
        case gt_fieldcat-fieldname.
    Supress fields you don't want to show
          when lc_client or  lc_user or lc_date or lc_time.
          when OTHERS.
            READ TABLE lw_key_table with key fieldname = gt_fieldcat-fieldname.
            if sy-subrc is initial.
              lw_tax_excpt-field_attr = lv_key.
              lw_tax_excpt-field_obl = lc_field_obl.
            else.
              lw_tax_excpt-field_attr = lv_non_key.
              lw_tax_excpt-field_obl = lc_space.
            endif.
            lw_tax_excpt-fieldname = gt_fieldcat-fieldname.
            assign component lw_tax_excpt-fieldname of
                            structure lw_update_tax_excpt to <lf_tax_excpt>.
            lw_tax_excpt-value =    <lf_tax_excpt>.
            lw_tax_excpt-fieldtext = gt_fieldcat-seltext_l.
    Remove the condition obligatory
            IF lw_tax_excpt-fieldname = lc_taxno.
              lw_tax_excpt-field_obl = lc_space.
            ENDIF.
            append lw_tax_excpt.
        endcase.
      endloop  .
    Appending the reference table and field for amount field
      if lv_mode = lv_insert.
        lw_tax_excpt-tabname    = lc_ref_tab.
        lw_tax_excpt-fieldname  = lc_ref_fld.
        lw_tax_excpt-field_attr = lc_hide_fld.
        append lw_tax_excpt.
      endif.
    IF lv_mode  NE lv_delete.
    Show selected entry
      CONCATENATE lv_mode lv_entry INTO lv_title SEPARATED BY space.
      do.
        call function 'POPUP_GET_VALUES'
          EXPORTING
            popup_title     = lv_title
            start_column    = lc_start_column
            start_row       = lc_start_row
          IMPORTING
            returncode      = lv_ret
          TABLES
            fields          = lw_tax_excpt
          EXCEPTIONS
            error_in_fields = lc_error
            others          = lc_others.
    Exit if Error, Display or Delete
        if sy-subrc is not initial or lv_ret = lc_return
                                   or lv_mode = lv_display
                                   or lv_mode = lv_delete..
          exit.
        endif.
    Validate fields involved in ADDING NEW ENTRY
        IF lv_mode  = lv_insert .         "ADD new Entry
    Validate the field Period
          READ TABLE lw_tax_excpt with key fieldname = lc_period.
          IF lw_tax_excpt-value EQ lc_period_def.
            PERFORM procWarnuser USING  text-001 text-003 .
            CONTINUE.
          ENDIF.
    Validate the field Company code
          READ TABLE lw_tax_excpt with key fieldname = lc_co_code.
          lv_co_code = lw_tax_excpt-value.
          select single bukrs from t001 into lv_comp_code
          where bukrs = lv_co_code.
          IF sy-subrc is not initial.
            PERFORM procWarnuser USING  text-001 text-028 .
            CONTINUE.
          ENDIF.
    Validate the field Vendor
          READ TABLE lw_tax_excpt with key fieldname = lc_vendor.
          lv_vendor = lw_tax_excpt-value.
          select single lifnr from lfa1 into lv_vendor_no
          where lifnr = lv_vendor.
          IF sy-subrc is not initial.
            PERFORM procWarnuser USING  text-001 text-024 .
            CONTINUE.
          ENDIF.
    Store the value of exception type in a variable
          READ TABLE lw_tax_excpt with key fieldname = lc_exception_typ.
          lv_excpt_type = lw_tax_excpt-value.
    Validate the field Tax number1 other entities
          READ TABLE lw_tax_excpt with key fieldname = lc_taxno.
          IF lv_excpt_type EQ lc_exctype_mf or  lv_excpt_type EQ lc_exctype_gr.
            IF lw_tax_excpt-value EQ space.
              PERFORM procWarnuser USING  text-001 text-002 .
              CONTINUE.
            ENDIF.
          ENDIF.
    Validate the field Clearing date
          READ TABLE lw_tax_excpt with key fieldname = lc_clearing_dt.
          IF lw_tax_excpt-value EQ lc_date_def.
            PERFORM procWarnuser USING  text-001 text-004.
            CONTINUE.
          ENDIF.
    Validate the field Gross amount
          READ TABLE lw_tax_excpt with key fieldname = lc_gross_amt.
          condense lw_tax_excpt-value no-gaps.
          IF lw_tax_excpt-value EQ lc_amount_def OR
             lw_tax_excpt-value EQ space.
            PERFORM procWarnuser USING  text-001 text-005.
            CONTINUE.
          ENDIF.
    Validate the field Exception amount
          READ TABLE lw_tax_excpt with key fieldname = lc_excpt_amt.
          condense lw_tax_excpt-value no-gaps.
          IF lw_tax_excpt-value EQ lc_amount_def OR
             lw_tax_excpt-value EQ space.
            PERFORM procWarnuser USING  text-001 text-006.
            CONTINUE.
          ENDIF.
          delete lw_tax_excpt index 10.
        ENDIF.
      all checks successful !!!!
        exit.
      enddo.
    endif.
    IF lv_mode  EQ  lv_delete.
    CONCATENATE lv_mode lv_entry INTO lv_title SEPARATED BY space.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
           TITLEBAR                    = lv_title
           text_question               = text-025
           TEXT_BUTTON_1               = text-026
           TEXT_BUTTON_2               = text-027
           DISPLAY_CANCEL_BUTTON       = lc_space
           START_COLUMN                = lc_column
           START_ROW                   = lc_row
         IMPORTING
           ANSWER                      = lv_answer
         EXCEPTIONS
           TEXT_NOT_FOUND              = lc_text
           OTHERS                      = lc_others
        IF sy-subrc is not initial.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ENDIF.
    Need to pop-out of the sub if "cancel" was selected
      if lv_ret = lc_return or lv_mode = lv_display.
        exit.
      endif.
    copy contents of pop-up back into structure
      loop at lw_tax_excpt.
        check lw_tax_excpt-value <> lc_mandatory.
        assign component lw_tax_excpt-fieldname
                         of structure lw_update_tax_excpt to <lf_tax_excpt_value>.
        <lf_tax_excpt_value> = lw_tax_excpt-value.
      endloop.
    update the database accordingly.
      case lv_mode.
        when lv_insert.           "Insert
    Give other required field values
          lw_update_tax_excpt-mandt        = sy-mandt.   "Client
          lw_update_tax_excpt-zuserch      = sy-uname.   "User
          lw_update_tax_excpt-zdate_change = sy-datum.   "Date
          lw_update_tax_excpt-ztime_change = sy-uzeit.   "Time
          INSERT into ztbrap_tax_excpt values lw_update_tax_excpt.
          message s036(zmbrap).
        WHEN lv_change.            "Change
    Give other required field values
          lw_update_tax_excpt-mandt        = sy-mandt.   "Client
          lw_update_tax_excpt-zuserch      = sy-uname.   "User
          lw_update_tax_excpt-zdate_change = sy-datum.   "Date
          lw_update_tax_excpt-ztime_change = sy-uzeit.   "Time
          MODIFY ztbrap_tax_excpt FROM lw_update_tax_excpt.  "Update record
          message s037(zmbrap).
        WHEN lv_delete.             "Delete
          IF lv_answer = lc_confirm.
          DELETE FROM ztbrap_tax_excpt WHERE
                  zmonat       =   lw_update_tax_excpt-zmonat       AND
                  zbukrs       =   lw_update_tax_excpt-zbukrs       AND
                  zlifnr       =   lw_update_tax_excpt-zlifnr       AND
                  zexctype     =   lw_update_tax_excpt-zexctype     AND
                  zstcd1       =   lw_update_tax_excpt-zstcd1       AND
                  zaugdt_other =   lw_update_tax_excpt-zaugdt_other AND
                  zdmbtr       =   lw_update_tax_excpt-zdmbtr       AND
                  zwhtinssca   =   lw_update_tax_excpt-zwhtinssca.
          message s038(zmbrap).
          ENDIF.
      endcase.
    Now do refresh ...
      if sy-subrc is not initial.
        rollback work.
        message e033(zmbrap).
      else.
        perform procGetTaxExceptionsData.
        commit work.
        perform procGetTaxExceptionsData.
        lw_selfield-refresh    = lc_field_obl.
        lw_selfield-col_stable = lc_field_obl.
        lw_selfield-row_stable = lc_field_obl.
      endif.
    endform.                    "procFindKeyFields
          FORM procDisplayTaxExceptionsData                             *
    Produce ALV report                                                  *
    form procDisplayTaxExceptionsData.
    Variables
      DATA: lv_layout         TYPE       slis_layout_alv,                                 "Layout
            lv_dispvariant    TYPE       disvariant,                                      "For display
            lv_events         TYPE       slis_t_event,                                    "Events
            lv_grid_settings  TYPE       lvc_s_glay,                                      "Grid settings
            lv_event          TYPE       slis_alv_event.                                  "Events
    Constants
      CONSTANTS:
            lc_user_command   TYPE       slis_formname VALUE 'USER_COMMAND',              "User command
            lc_pf_status      TYPE       slis_formname VALUE 'PF_STATUS_SET_SHOW_LIST',   "Pf status
            lc_top_of_page    TYPE       slis_formname VALUE 'TOP_OF_PAGE',               "Top of page
            lc_tab_name       TYPE       tabname       VALUE  'ZTBRAP_TAX_EXCPT',         "Table name
            lc_stripes        TYPE       aavis         VALUE 'X',                         "Stripes
            lc_save           TYPE       aavis         VALUE 'A',                         "Save
            lc_repid          TYPE       sy-repid      VALUE sy-repid,                    "Program name
            lc_inconsistent   TYPE       agitt         VALUE 1,                           "Exception for FM
            lc_program        TYPE       agitt         VALUE 2,                           "Exception for FM
            lc_others         TYPE       agitt         VALUE 3.                           "Exception for FM
    Clear Local Variables
      CLEAR:
            lv_layout,
            lv_dispvariant,
            lv_events,
            lv_grid_settings,
            lv_event.
    *Set up ALV structures
      lv_dispvariant-report   = lc_repid.
    gv_repid = sy-repid.
      lv_dispvariant-username = sy-uname.
    *Set alternate stripes for ALV report
      lv_layout-zebra = lc_stripes .
      lv_grid_settings-coll_top_p = lc_stripes .
    *Set up exit structure for top of coverpage
      lv_event-name = slis_ev_top_of_coverpage.
      lv_event-form = slis_ev_top_of_coverpage.
      append  lv_event to lv_events.
    *Set up exit for top of page
      lv_event-name = slis_ev_top_of_page.
      lv_event-form = slis_ev_top_of_page.
      append  lv_event to lv_events.
    *Build field catalog for List Viewer
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = lc_repid
          i_inclname             = lc_repid
          i_structure_name       = lc_tab_name
        CHANGING
          ct_fieldcat            = gt_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = lc_inconsistent
          program_error          = lc_program
          others                 = lc_others.
    field controls
      PERFORM procBuildFieldcat.
    Call ABAP/4 List Viewer
      check not gt_fieldcat[] is initial.
      call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = lc_repid
          i_callback_user_command  = lc_user_command
          i_callback_pf_status_set = lc_pf_status
          i_callback_top_of_page   = lc_top_of_page
          is_variant               = lv_dispvariant
          i_grid_settings          = lv_grid_settings
          is_layout                = lv_layout
          it_fieldcat              = gt_fieldcat[]
          it_events                = lv_events
          i_save                   = lc_save  " A = All => Standard & User
        TABLES
          t_outtab                 = gt_tax_excpt_tab.
    endform.                    "procDisplayTaxExceptionsData
    **&      Form  PF_STATUS_SET_SHOW_LIST
          Set modified standard status for list
    form pf_status_set_show_list
                     using lw_excpt_tab TYPE slis_t_extab.
    Workarea
      DATA : lw_tax_tab       TYPE       slis_extab.                                      "Type group Slis
    Constants
      DATA : lc_pfstat        TYPE       amert    VALUE 'ZTAX_EXCEPTION',                 "Pf status
             lc_prog          TYPE       sy-repid VALUE sy-repid,                         "Program name
             lc_fcode         TYPE       gui_code VALUE 'SELI'.                           "Function code
    Clear Workarea
      CLEAR :lw_tax_tab.
      lw_tax_tab-fcode = lc_fcode.
      append lw_tax_tab to lw_excpt_tab.
      set pf-status lc_pfstat of program lc_prog excluding lw_excpt_tab.
    endform.                               "PF_STATUS_SET_SHOW_LIST
    **&      Form  procBuildFieldcat
          text
    -->  p1        text
    <--  p2        text
    form procBuildFieldcat .
    Constants
      CONSTANTS :
            lc_co_code          TYPE    amert VALUE 'ZBUKRS',                             "Company code
            lc_vendor           TYPE    amert VALUE 'ZLIFNR',                             "Vendor
            lc_docu_no          TYPE    amert VALUE 'ZBELNR',                             "Document Number
            lc_user             TYPE    amert VALUE 'ZUSERCH',                            "User
            lc_date             TYPE    amert VALUE 'ZDATE_CHANGE',                       "Date
            lc_time             TYPE    amert VALUE 'ZTIME_CHANGE',                       "Time
            lc_taxno            TYPE    amert VALUE 'ZSTCD1',                             "Tax Number
            lc_exception_typ    TYPE    amert VALUE 'ZEXCTYPE',                           "Exception type
            lc_clearing_dt      TYPE    amert VALUE 'ZAUGDT_OTHER',                       "Clearing date
            lc_period           TYPE    amert VALUE 'ZMONAT',                             "Period
            lc_gross_amt        TYPE    amert VALUE 'ZDMBTR',                             "Gross amount
            lc_excpt_amt        TYPE    amert VALUE 'ZWHTINSSCA'.                         "Exception amount
    Set the Fieldtext for the Dictionary fields
      LOOP AT gt_fieldcat.
        gt_fieldcat-key = space.
        CASE gt_fieldcat-fieldname.
          WHEN lc_period.
            gt_fieldcat-seltext_l = text-007.
            MODIFY gt_fieldcat.
          WHEN lc_co_code.
            gt_fieldcat-seltext_l = text-008.
            MODIFY gt_fieldcat.
          WHEN lc_vendor.
            gt_fieldcat-seltext_l = text-009.
            MODIFY gt_fieldcat.
          WHEN lc_exception_typ.
            gt_fieldcat-seltext_l = text-010.
            MODIFY gt_fieldcat.
          WHEN lc_taxno.
            gt_fieldcat-seltext_l = text-011.
            MODIFY gt_fieldcat.
          WHEN lc_clearing_dt.
            gt_fieldcat-seltext_l = text-012.
            MODIFY gt_fieldcat.
          WHEN lc_docu_no.
            gt_fieldcat-seltext_l = text-013.
            MODIFY gt_fieldcat.
          WHEN lc_gross_amt.
            gt_fieldcat-seltext_l = text-014.
            gt_fieldcat-outputlen = 12.
            MODIFY gt_fieldcat.
          WHEN lc_excpt_amt.
            gt_fieldcat-seltext_l = text-015.
            MODIFY gt_fieldcat.
          WHEN lc_user.
            gt_fieldcat-seltext_l = text-016.
            MODIFY gt_fieldcat.
          WHEN lc_date.
            gt_fieldcat-seltext_l = text-017.
            MODIFY gt_fieldcat.
          WHEN lc_time.
            gt_fieldcat-seltext_l = text-018.
            MODIFY gt_fieldcat.
        ENDCASE.
      ENDLOOP.
    endform.                    " procBuildFieldcat
    *&      Form  procWarnuser
          Warn User - Give error message
         -->P_TEXT      text
         -->P_TEXT      text
         -->P_lw_tax_excpt_VALUE  text
    FORM procWarnuser  USING    uv_title TYPE itex132
                                uv_text1 TYPE itex132.
    Constants
      CONSTANTS :
            lc_start_column       TYPE    SY-CUCOL VALUE 25,                             "Start column
            lc_start_row          TYPE    SY-CUROW VALUE 15.                             "Start row

  • How to download GUI status and then upload to another system?

    Hi,
    I have a requirement to copy a module pool program to another system (different system, it cannot be transported to that system)
    We have options to download/upload programs/screens in SE38 and SE51. But, I couldn't see any such option in SE41.
    Is there any other way to download GUI status from SE41 and then use that file to upload in other system?
    Thanks in advance.
    Regards,
    Arun Mohan

    Hello Arun,
    If the object's transport order has been released, you can ask your basis person to download and import that request files(Co file + Data file) from the current system to the new system.
    This is the easiest possible way to achieve your requirement.
    Regards,
    Karthik D

  • At Selection Screen in Module Pool

    Hi,
       I am doing an Module pool which has 2 screens.
    First screen has a table control.
    When user double clicks any record in the table control I have to process further with value of the clicked record.
    Can anyone let me know how the At Line Selection works in Module pool.
    Thanks & Regards,
    Sandeep

    hi
    u have to make field of table control <b>respond to double click</b> in attributes of that field.
    make one button 'PICK' and assign recommended key 'F2' in GUI Status (Its Compulsary to give 'F2')
    now in User_command of PAI
    case sy-ucomm.
    when 'PICK'.
    endcase.
    Message was edited by:
            Dhwani shah

Maybe you are looking for

  • Questions on printing in htmldb

    I try to create an invoice page to print. Some questions I ask to myself: - Is it possible to print to an A4 (papersize)? (I mean, does the application have notions of pagesize or is everything controlled by the browser? this is important when you ne

  • Inadvertantly added music files to the wrong library

    I created a 2nd library in itunes and then inadvertantly added music files to it instead of to the original library. My original intent was to move files from the 1st library to the 2nd but I forgot we had added music that hadn't been scanned into it

  • Adobe Acrobat File vs PDF File

    I have 15 computers that are all exactly the same, same hardware and Windows image. These are an upgrade from older systems. When trying to save a Word document as a PDF, an error message comes up saying there is no program associated with that file,

  • How to pass parameter /1BCDWB/DOCPARAMS from webdynpro?

    Hi Experts, We create a wdp view and indert an adobe form into it. And this form has an interface based on XML schema. Now we want to translate this form into multi-language, and in wdp side, we will display diffenent language version of form for dif

  • Better compression at lower bit rates

    I've not had much luck getting good h.264 compression from AME at lower bit rates. Are there some secrets that someone has shared? I used to be quite adept back in the day, so it's frustrating having to upload giant files to Vimeo. Any good guidance?