ALV Display Variant copying between programs

There is a report program say PROGRAM1 whose ALV display variants we want to copy to the ALV display variants of another program say PROGRAM2.
Both these program share the same ALV output structure design. My questions are
1) Can the display variants of an ALV be copied into another program.?
2) Can this be managed programatically?

Hi,
  Try using LVC_VARIANT_SELECT and LVC_VARIANT_SAVE fms.
  First call LVC_VARIANT_SELECT to read variant from the first program and then call LVC_VARIANT_SAVE to save it for the second program.
  Take a look at report BCALV_GRID_11 for reference
Sri
Message was edited by: Srikanth Pinnamaneni

Similar Messages

  • Copying ALV Display Variants between different programs

    Is there a way to copy the ALV Display Variants from one program to another?  I am NOT referring to selection screen variants.
    An SAP standard program was copied to a Z program.  Some changes were made to the logic.  The original SAP program has many (100+) ALV Display Variants.  I do not want to manually re-create them.  Is there a way to copy these from one program to another (without using a custom program to manipulate the tables)?
    Thanks.
    Norm

    Hi norman,
    even i was thinking the same while you passing the alv parameter is_variant, give the the program which is having 100 variants.
    is_variant-REPORT = 'STANDARDPRG'.
    this will import all varaints from it, but when you save any new one it will  save in the same standard program.
    regards
    vijay

  • Copy User Specific ALV Display Variants

    Does anyone know if it is possible to copy one user's ALV display variant (that has been saved as a user-specific variant) for a particular program (in this case VA05) to another user?

    Hi Eric,
    I'm a bit busy now and I cannot give you a complete solution, but sure can give you some c(l)ue. Just see if you have some success. If you do not, then i wuill get back to you later.
    Refer to the follwoing SAP Tables and see if you have some luck.
    ==========================================================
    LTDX  --> Generic storage of display variants
    LTDXD --> Default display variants
    LTDXS --> SAP Default Display Variants
    LTDXT --> Display variant texts
    ==========================================================
    The idea is to try and manipulate the table entries for various users.
    Regards,
    Anand Mandalika.

  • Need to supress a ALV display for a standard program  while submiting

    Hi ,
    I am trying to suppress an ALV display from a standard program which I am submitting though my Z program .
    Please kindly help me on the same.
    Thanks and Regards,
    Sankha

    Hmmmm... I suggest copying the code of RM08RELEASE to your program, if cannot then copy the program to a Z program without copying the includes.
    Now in the copied code comment
      PERFORM alv_list USING    release_auto
                       CHANGING tab_arbkp
                                tab_arseg
                                tab_released_arbkp.
    and u can use the 3 tables :
                                tab_arbkp
                                tab_arseg
                                tab_released_arbkp
    in your code.

  • Copying ALV variants/layouts between programs

    Hi guys,
    Does anyone know how to copy ALV layouts between programs in the same client?  I have created a copy of a report which uses the ALV functionality via the REUSE_* function modules.  The original report has over 40 layouts, so I don't want to have to re-create them manually in the new program.  These programs are in the same client on the  same system, so the Import Layout and Transport Layout options aren't going to be of any use (as far as I can see...)
    Any ideas greatly appreciated.
    Cheers,
    Andrew

    I took this approach and it worked for me:
    1) Change your program so that everytime an ALV function is called it is using the original program name in the variant declaration, ensure you keep the original code commented out, you will need to put it back later. Examples:
    FORM variant_init USING varname TYPE slis_vari.
    CLEAR g_variant.
    g_variant-report = g_repid.
    g_variant-report = 'ORIGINAL_PROGRAM_NAME'.
    FORM f4_for_variant.
    g_variant-report = sy-repid.
    g_variant-report = ‘ORIGINAL_PROGRAM_NAME’.
    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    FORM check_variant.
    IF NOT p_vari IS INITIAL.
    g_variant-report = sy-repid.
    g_variant-report = ‘ORIGINAL_PROGRAM_NAME’.
    g_variant-variant = p_vari.
    CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
    2) Display function lt_variant_save via SE37, set a breakpoint at the first executable line:
    perform variant_save tables it_fieldcat
    4) Run your program with the layout variant you wish to copy.
    5) Hit Save Variant. You are now in debug mode.
    6) Enter variable CS_VARIANT-REPORT in the variables 1 panel.
    7) Double-click on CS_VARIANT-REPORT.
    8) Hit the Change Field Content button
    9) Change the value to the name of your new program, then hit Enter.
    10) Hit Execute (F8). You have now saved the variant under your new program name.
    11) Exit and rerun your program as necessary for as many variants as you want to copy
    12) Change your program back to using sy-repid (or whatever else it was referencing) wherever you changed it in step 1.
    13) The variants have now been copied and you can run your program with the new variants.

  • Problem in saving ALV display variant with filter

    Hello,
    I'm displaying an ALV grid with function 'REUSE_ALV_GRID_DISPLAY'. When I load a diplay variant and apply a filter, I could save new layout. But when I run the report without a display variant, then apply a filter to the result, I couldn't save filter option when saving display variant. In the "save" tab of save layout dialog, filter checkbox is not displayed. This happens in 4.6C version. Is it a bug or am i missing a point.
    Thanks,
    Mustafa.

    Slm Burak,
    'IT_FILTER' parameter is empty. Users apply a filter but couldn't save filtered list variant. When they run the report with saved display variant, list is displayed without filters.

  • Select OO ALV Display Variants in a Sel Screen.

    Hi, Abapers.
    I'm wondering whether is possible to make a selection (in a sel-screen) over a field of the display variants which are further managed in an OO ALV.
    If it's possible, from where shoud I read them?
    Best regards.

    what do you means with "managed"?
    what do you think to do with the selected field?

  • ALV display Variant

    hi,
    I wrote a code for allowing the user to choose a display variant in the selection screen. The user chooses the required variant in the selection screen and views the ALV grid accordingly. This code is working fine in the development server but as it was transported to the quality server, somehow it has stopped working.
    Any new variants that are created are displayed in the selection screeN F4 help, but somehow the variants are not working.
    Could anyone suggest where i am going wrong?
    Thanks,
    Aviroop

    try to comment it and see./
    it will work..
    you are telling that alv Fm set the default variant.
    if you don't want then comment it, then what ever you choose in selection screen will come in the output otherwise defaut variant overrides the selected one.
    Regards
    vijay

  • OOPs :  SAVE and ALV Display Variant

    Can you please send me the code for 'Save and Display Variant' in ALV OOPs.

    DATA :  l_layout TYPE disvariant.
      l_layout-report = sy-repid.
    l_layouth-zebra = 'X'.   
    CALL METHOD gr_alvgrid->set_table_for_first_display
           EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
         i_structure_name              =  'ZQM01'    
    <b>     is_variant                    =  l_layout
         i_save                        = 'A'</b>
       I_DEFAULT                     = 'X'
        is_layout                     =  gs_layout
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
          CHANGING
             it_outtab                     = gt_list[]
             it_fieldcatalog               = gt_fieldcat
       IT_SORT                       =
       IT_FILTER                     =
           EXCEPTIONS
             invalid_parameter_combination = 1
             program_error                 = 2
             too_many_lines                = 3
             OTHERS                        = 4
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.

  • Display Variants in ALV

    Hi,
    I copied an existing Z report program to a new program to conform to the naming standards and deleted the old program. (I could do renaming as well but did it this way)
    When copying the program, all object including the selection variants were copied but the ALV display variants were not copied to the target program.  Any thoughts on this please?
    I tried using a simple program to copy the LTDX (Generic storage of display variants) and LTDXT (Display Variant Texts) entries of the old program to the new program. I checked that all entries in LTDX of the old program now exist for the new program too. When I execute the program, only the global ALV display variants are available for selection i.e all display variants that start with u2018/u2019. The user specific variants are not available although all entries in LTDX and LTDXT for the user display are in the respective tables
    Thanks for respondinding.

    Thanks Satyasuresh. I used a similar program that copies variant entries from tables ltdx and ltdxt for a source program to new entries in the same table for the target program.
    parameters report like ltdx-report obligatory.
    parameters report2 like ltdx-report obligatory.
    select * into table lt_ltdx from ltdx
                    where report = report.
      select * into table lt_ltdxt from ltdxt
                    where report = report.
      loop at lt_ltdx.
        lt_ltdx-report = report2.
        modify ltdx from lt_ltdx..
      endloop.
      loop at lt_ltdxt.
        lt_ltdxt-report = report2.
        modify ltdxt from lt_ltdxt..
      endloop.

  • How to transport display variants in alv

    Hi,
    Can any one please help me in transporting alv display variants?Actually I have transported the variants ,but only selection variants are getting transported.I want to transport ALV display variants accross the clients.
    Please reply soon.It is very urgent.

    Hi,
    Please use the following :
    First execute the report .
    Then Menubar Settings> Layout> layout management>select your variant> menubar layout--> transport
    This will work only when your variant management is activve in your ALV report.

  • Page-break in alv background job for alv output variant not coming correctl

    Hi,
    I have created an ALV grid report. When i run the report in background i get the output with correct page-break on FIELD1. Now when i run the report in background with an "ALV output variant" (its the ALV variant that controls the fields display in the output; this is not the program variant), i do not get the page-break on FIELD1.  I have already build the sort criteria and using:
    gs_sort-group = '* '.     "New-Page
    Please let me know what could be reason for not getting the page-break in background when i am using the alv output variant and how do i correct this problem.
    Regards,
    Rakesh

    Hello Everyone,
    I have solved the problem. While running the program in background, we get the page-breaks when we use the below part of code in the sort catalogue with the condition that the program variant should not use any ALV layout variant.
    gs_sort-group = '* '.     "New-Page
    If you are using the ALV layout variant in the program variant then we can check the ROWPOS, COLPOS, and NO_OUT for that ALV layout variant and pass them along in the fieldcatalog table. You should be careful with not to pass the layout variant in the DISVARIANT. You can notice that i have cleared it and simply passing the program name into that.
    *C-- Process separately for jobs running in Background. Actually
    *C-- sortcat-group solves the problem only in Foreground. In background
    *C-- when ALV layout variant is not selected then it works otherwise it
    *C-- fails. So for background jobs we are reading the fieldcat and then
    *C-- passing the same in the display FM.
      IF sy-batch = 'X'.
        CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
          EXPORTING
           i_dialog                  = ' '
           i_user_specific           = ' '
           i_default                 = ' '
    *   I_TABNAME_HEADER          =
    *   I_TABNAME_ITEM            =
            it_default_fieldcat       = gt_fieldcat
            i_layout                  = gs_layout
    *   I_BYPASSING_BUFFER        =
    *   I_BUFFER_ACTIVE           =
         IMPORTING
    *   E_EXIT                    =
           et_fieldcat               = lt_fieldcat
    *     et_sort                   = gt_sort[]
    *   ET_FILTER                 =
    *     es_layout                 = gs_layout
         CHANGING
           cs_variant                = gs_disvariant
         EXCEPTIONS
           wrong_input               = 1
           fc_not_complete           = 2
           not_found                 = 3
           program_error             = 4
           OTHERS                    = 5
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CLEAR gs_fieldcat.
        LOOP AT gt_fieldcat INTO gs_fieldcat.
    *C-- Transfer all position changes to gt_fieldcat from lt_fieldcat
          CLEAR ls_fieldcat.
          READ TABLE lt_fieldcat
                INTO ls_fieldcat
                WITH KEY fieldname = gs_fieldcat-fieldname.
          IF sy-subrc = 0.
            gs_fieldcat-row_pos = ls_fieldcat-row_pos.
            gs_fieldcat-col_pos = ls_fieldcat-col_pos.
            gs_fieldcat-no_out = ls_fieldcat-no_out.
            MODIFY gt_fieldcat FROM gs_fieldcat INDEX sy-tabix.
            CLEAR gs_fieldcat.
          ENDIF.
        ENDLOOP.
    *C-- Clear the disvariant for the background job as it contains the ALV
    *C-- layout varinat
        CLEAR gs_disvariant.
        gs_disvariant-report = 'ZGPPMP0001'.
    Then pass gt_fieldcat to 'REUSE_ALV_GRID_DISPLAY'.
    The reason i'm doing it this way is that when we pass the layout variant name, the contents in gt_fieldcat were getting modified.
    One more thing i'd like to point out is that that, i tried to delete the fields with no_out = 'x'. Now when i ran the program in background with all the fields in sort catalog (suppose there are 2 fields field1 and field2) also in fieldcatalog it ran fine. In the next run in background i removed one of the fields in sort catalog from the fieldcatalog (delete the fields with no_out = 'x') and i got dump. Basically i had hidden field1 and so the code which was deleting fields with no_out = 'x' deleted this field from gt_fieldcat. So basically we should not delete fields with no_out = 'x'.
    I was getting ABAP runtime errors    MESSAGE_TYPE_X in the following part of the standard code.
    000310     LOOP AT CT_SORT INTO LS_SORT.
    000320
    000330       READ TABLE IT_FIELDCAT ASSIGNING <LS_FIELDCAT>
    000340            WITH KEY FIELDNAME = LS_SORT-FIELDNAME BINARY SEARCH.
    000350       IF SY-SUBRC NE 0.
         >         MESSAGE X000(0K).
    000370       ENDIF.
    000380
    000390       LS_SORT-SELTEXT = <LS_FIELDCAT>-SELTEXT.
    i have just mentioned this part because when i checked the forum many people were getting such errors "MESSAGE_TYPE_X". This could also be one of the reasons.

  • Copying variants between programs

    Dear All,
    Please guide me in copying variants of one program into another program where selection screen of both the programs are same.
    Regards,
    N.Jain

    Hi,
    Copy Program Variants from one to another
    This code copies variants from one program to another provided that the programs have identical selection screens.
    Copy Variants from one Program to another.
    REPORT Z_COPY_VARIANTS_PROG_TO_PROG .
    =====================================================
    Data Declarations Section
    =====================================================
    TABLES : VARID , VARIS , VARIT  .
    DATA : BEGIN OF MYVARID OCCURS 0 .
            INCLUDE STRUCTURE VARID .
    DATA : END OF MYVARID .
    DATA : BEGIN OF MYVARIS OCCURS 0 .
            INCLUDE STRUCTURE VARIS .
    DATA : END OF MYVARIS .
    DATA : BEGIN OF MYVARIT OCCURS 0 .
            INCLUDE STRUCTURE VARIT .
    DATA : END OF MYVARIT .
    DATA : BEGIN OF MYVARI  OCCURS 0 .
            INCLUDE STRUCTURE VARI  .
    DATA : END OF MYVARI .
    DATA : MANS(1) TYPE C .
    DATA :   PROGRAMM LIKE RS38M-PROGRAMM  .
    DATA : BEGIN OF MDYNPFIELDS OCCURS 1 .
            INCLUDE STRUCTURE DYNPREAD .
    DATA : END OF MDYNPFIELDS .
    CONSTANTS BUTTONSELECTED(1) TYPE C VALUE 'X' .
    ======================================================
    Macro for Inputing Filenames
    ======================================================
    DEFINE GET_FILENAME .
      CALL FUNCTION 'WS_FILENAME_GET'
          EXPORTING
            DEF_FILENAME     = ' '
               DEF_PATH         = &1
               MASK             = ',.,..'
               MODE             = '0'
            TITLE            = ' '
          IMPORTING
               FILENAME         = &2
            RC               =
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    END-OF-DEFINITION .
    ======================================================
    Macro for Downloading to ASCII Files
    ======================================================
    DEFINE DOWNLOAD_TO_ASCII .
      CALL FUNCTION 'WS_DOWNLOAD'
          EXPORTING
            BIN_FILESIZE            = ' '
            CODEPAGE                = ' '
               FILENAME                = &1
               FILETYPE                = 'DAT'
            MODE                    = ' '
            WK1_N_FORMAT            = ' '
            WK1_N_SIZE              = ' '
            WK1_T_FORMAT            = ' '
            WK1_T_SIZE              = ' '
            COL_SELECT              = ' '
            COL_SELECTMASK          = ' '
            NO_AUTH_CHECK           = ' '
       IMPORTING
            FILELENGTH              =
           TABLES
                DATA_TAB                = &2
            FIELDNAMES              =
           EXCEPTIONS
                FILE_OPEN_ERROR         = 1
                FILE_WRITE_ERROR        = 2
                INVALID_FILESIZE        = 3
                INVALID_TABLE_WIDTH     = 4
                INVALID_TYPE            = 5
                NO_BATCH                = 6
                UNKNOWN_ERROR           = 7
                GUI_REFUSE_FILETRANSFER = 8
                OTHERS                  = 9.
    END-OF-DEFINITION .
    ======================================================
    Macro for uploading Data from ASCII files
    ======================================================
    DEFINE UPLOAD_FROM_ASCII .
      CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
            CODEPAGE                = ' '
               FILENAME                = &1
               FILETYPE                = 'DAT'
            HEADLEN                 = ' '
            LINE_EXIT               = ' '
            TRUNCLEN                = ' '
            USER_FORM               = ' '
            USER_PROG               = ' '
       IMPORTING
            FILELENGTH              =
           TABLES
                DATA_TAB                = &2
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                FILE_OPEN_ERROR         = 2
                FILE_READ_ERROR         = 3
                INVALID_TABLE_WIDTH     = 4
                INVALID_TYPE            = 5
                NO_BATCH                = 6
                UNKNOWN_ERROR           = 7
                GUI_REFUSE_FILETRANSFER = 8
                CUSTOMER_ERROR          = 9
                OTHERS                  = 10.
    END-OF-DEFINITION .
    ======================================================
    Selection Screen Default
    ======================================================
    PARAMETERS : P_FROM_P LIKE RS38M-PROGRAMM OBLIGATORY .
    PARAMETERS : P_TO_P LIKE RS38M-PROGRAMM OBLIGATORY .
    PARAMETERS : P_SAME_S RADIOBUTTON GROUP GRP1 DEFAULT 'X' .
    PARAMETERS : P_DOWNLD RADIOBUTTON GROUP GRP1   .
    PARAMETERS : P_UPLOAD RADIOBUTTON GROUP GRP1   .
    PARAMETERS : P_FILE_D  LIKE   RLGRAP-FILENAME DEFAULT 'c:\varid.txt' .
    PARAMETERS : P_FILE_S  LIKE   RLGRAP-FILENAME DEFAULT 'c:\varis.txt' .
    PARAMETERS : P_FILE_T  LIKE   RLGRAP-FILENAME DEFAULT 'c:\varit.txt' .
    PARAMETERS : P_FILE    LIKE   RLGRAP-FILENAME DEFAULT 'c:\vari.txt' .
    =====================================================
    At Selection Screen Events
    =====================================================
    AT SELECTION-SCREEN .
      PROGRAMM = P_FROM_P .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE_D .
      GET_FILENAME 'c:\varid.txt' P_FILE_D .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE_S .
      GET_FILENAME 'c:\varis.txt' P_FILE_S .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE_T .
      GET_FILENAME 'c:\varit.txt' P_FILE_T .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE .
      GET_FILENAME 'c:\vari.txt' P_FILE .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FROM_P .
      CLEAR  MDYNPFIELDS . REFRESH MDYNPFIELDS .
      MDYNPFIELDS-FIELDNAME = 'P_FROM_P' .
      APPEND  MDYNPFIELDS .
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME               = SY-CPROG
                DYNUMB               = SY-DYNNR
           TABLES
                DYNPFIELDS           = MDYNPFIELDS
           EXCEPTIONS
                INVALID_ABAPWORKAREA = 1
                INVALID_DYNPROFIELD  = 2
                INVALID_DYNPRONAME   = 3
                INVALID_DYNPRONUMMER = 4
                INVALID_REQUEST      = 5
                NO_FIELDDESCRIPTION  = 6
                INVALID_PARAMETER    = 7
                UNDEFIND_ERROR       = 8
                DOUBLE_CONVERSION    = 9
                STEPL_NOT_FOUND      = 10
                OTHERS               = 11.
      READ TABLE MDYNPFIELDS INDEX 1 .
      PROGRAMM = MDYNPFIELDS-FIELDVALUE .
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
           EXPORTING
                OBJECT_TYPE          = 'PROG'
                OBJECT_NAME          = PROGRAMM
           IMPORTING
                OBJECT_NAME_SELECTED = PROGRAMM
           EXCEPTIONS
                CANCEL               = 1
                WRONG_TYPE           = 2
                OTHERS               = 3.
      P_FROM_P = PROGRAMM .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TO_P .
      CLEAR  MDYNPFIELDS . REFRESH MDYNPFIELDS .
      MDYNPFIELDS-FIELDNAME = 'P_TO_P' .
      APPEND  MDYNPFIELDS .
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME               = SY-CPROG
                DYNUMB               = SY-DYNNR
           TABLES
                DYNPFIELDS           = MDYNPFIELDS
           EXCEPTIONS
                INVALID_ABAPWORKAREA = 1
                INVALID_DYNPROFIELD  = 2
                INVALID_DYNPRONAME   = 3
                INVALID_DYNPRONUMMER = 4
                INVALID_REQUEST      = 5
                NO_FIELDDESCRIPTION  = 6
                INVALID_PARAMETER    = 7
                UNDEFIND_ERROR       = 8
                DOUBLE_CONVERSION    = 9
                STEPL_NOT_FOUND      = 10
                OTHERS               = 11.
      READ TABLE MDYNPFIELDS INDEX 1 .
      PROGRAMM = MDYNPFIELDS-FIELDVALUE .
      CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
           EXPORTING
                OBJECT_TYPE          = 'PROG'
                OBJECT_NAME          = PROGRAMM
           IMPORTING
                OBJECT_NAME_SELECTED = PROGRAMM
           EXCEPTIONS
                CANCEL               = 1
                WRONG_TYPE           = 2
                OTHERS               = 3.
      P_TO_P = PROGRAMM .
    ======================================================
    Start of Selection
    ======================================================
    START-OF-SELECTION .
      CASE BUTTONSELECTED.
        WHEN P_SAME_S .
          PERFORM COPY_FROM_PROG_TO_PROG .
        WHEN P_DOWNLD .
          PERFORM VDOWNLOAD .
        WHEN P_UPLOAD .
          PERFORM VUPLOAD .
      ENDCASE .
    *&      Form  COPY_FROM_PROG_TO_PROG
          text
    -->  p1        text
    <--  p2        text
    FORM COPY_FROM_PROG_TO_PROG.
      CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
           EXPORTING
            DEFAULTOPTION  = 'Y'
               TEXTLINE1      = 'Are you sure you want to copy Variants ? '
            TEXTLINE2      = ' '
                TITEL          = 'Confirmation '
            START_COLUMN   = 25
            START_ROW      = 6
            CANCEL_DISPLAY = 'X'
          IMPORTING
               ANSWER         = MANS
           EXCEPTIONS
                OTHERS         = 1.
      IF MANS = 'J' .
        REFRESH MYVARID . CLEAR MYVARID .
        SELECT * FROM VARID  INTO TABLE MYVARID
                            WHERE REPORT = P_FROM_P.
        LOOP AT MYVARID .
          MYVARID-REPORT = P_TO_P .
          MODIFY MYVARID .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARID WHERE REPORT = P_TO_P .
          INSERT VARID FROM TABLE MYVARID .
        ENDIF .
        REFRESH MYVARIS . CLEAR MYVARIS .
        SELECT * FROM VARIS  INTO TABLE MYVARIS
                            WHERE REPORT = P_FROM_P.
        LOOP AT MYVARIS .
          MYVARIS-REPORT = P_TO_P .
          MODIFY MYVARIS .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARIS WHERE REPORT = P_TO_P .
          INSERT VARIS FROM TABLE MYVARIS .
        ENDIF .
        REFRESH MYVARIT . CLEAR MYVARIT .
        SELECT * FROM VARIT  INTO TABLE MYVARIT
                            WHERE REPORT = P_FROM_P.
        LOOP AT MYVARIT .
          MYVARIT-REPORT = P_TO_P .
          MODIFY MYVARIT .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARIT WHERE REPORT = P_TO_P .
          INSERT VARIT FROM TABLE MYVARIT .
        ENDIF .
        REFRESH MYVARI . CLEAR MYVARI .
        SELECT * FROM VARI   INTO TABLE MYVARI
                            WHERE REPORT = P_FROM_P.
        LOOP AT MYVARI  .
          MYVARI-REPORT = P_TO_P .
          MODIFY MYVARI  .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARI WHERE REPORT = P_TO_P .
          INSERT VARI FROM TABLE MYVARI .
        ENDIF .
      ENDIF .
    ENDFORM.                               " COPY_FROM_PROG_TO_PROG
    *&      Form  VDOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM VDOWNLOAD.
      REFRESH MYVARID . CLEAR MYVARID .
      SELECT * FROM VARID  INTO TABLE MYVARID
                          WHERE REPORT = P_FROM_P.
      DOWNLOAD_TO_ASCII  P_FILE_D  MYVARID .
      REFRESH MYVARIS . CLEAR MYVARIS .
      SELECT * FROM VARIS  INTO TABLE MYVARIS
                          WHERE REPORT = P_FROM_P.
      DOWNLOAD_TO_ASCII P_FILE_S  MYVARIS .
      REFRESH MYVARIT . CLEAR MYVARIT .
      SELECT * FROM VARIT  INTO TABLE MYVARIT
                          WHERE REPORT = P_FROM_P.
      DOWNLOAD_TO_ASCII P_FILE_T  MYVARIT .
      REFRESH MYVARI . CLEAR MYVARI .
      SELECT * FROM VARI   INTO TABLE MYVARI
                          WHERE REPORT = P_FROM_P.
      DOWNLOAD_TO_ASCII P_FILE  MYVARI .
    ENDFORM.                               " VDOWNLOAD
    *&      Form  VUPLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM VUPLOAD.
      CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
           EXPORTING
            DEFAULTOPTION  = 'Y'
               TEXTLINE1      =
               'Are you sure you want to upload Variants ? '
            TEXTLINE2      = ' '
                TITEL          = 'Confirmation '
            START_COLUMN   = 25
            START_ROW      = 6
            CANCEL_DISPLAY = 'X'
          IMPORTING
               ANSWER         = MANS
           EXCEPTIONS
                OTHERS         = 1.
      IF MANS = 'J' .
        REFRESH MYVARID . CLEAR MYVARID .
        UPLOAD_FROM_ASCII P_FILE_D MYVARID .
        LOOP AT MYVARID .
          MYVARID-REPORT = P_TO_P .
          MODIFY MYVARID .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARID WHERE REPORT = P_TO_P .
          INSERT VARID FROM TABLE MYVARID .
        ENDIF .
        REFRESH MYVARIS . CLEAR MYVARIS .
        UPLOAD_FROM_ASCII P_FILE_S MYVARIS  .
        LOOP AT MYVARIS .
          MYVARIS-REPORT = P_TO_P .
          MODIFY MYVARIS .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARIS WHERE REPORT = P_TO_P .
          INSERT VARIS FROM TABLE MYVARIS .
        ENDIF .
        REFRESH MYVARIT . CLEAR MYVARIT .
        UPLOAD_FROM_ASCII P_FILE_T MYVARIT  .
        LOOP AT MYVARIT .
          MYVARIT-REPORT = P_TO_P .
          MODIFY MYVARIT .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARIT WHERE REPORT = P_TO_P .
          INSERT VARIT FROM TABLE MYVARIT .
        ENDIF .
        REFRESH MYVARI . CLEAR MYVARI .
        UPLOAD_FROM_ASCII P_FILE  MYVARI   .
        LOOP AT MYVARI  .
          MYVARI-REPORT = P_TO_P .
          MODIFY MYVARI  .
        ENDLOOP .
        IF SY-SUBRC = 0 .
          DELETE FROM VARI WHERE REPORT = P_TO_P .
          INSERT VARI FROM TABLE MYVARI .
        ENDIF .
      ENDIF .
    ENDFORM.                               " VUPLOAD
    Reward if Helpfull,
    Naresh

  • DIfference between Reusable FM for ALV display and ALV display using class

    Hi,
    Is there any difference between alv display using Resuable FM and ALV display using classes except the later one uses OO concept.??
    One mere thing i want to clarify is that is there any difference exist between REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY? If so, then let me know.
    It could be easier to understand me if yuo give scenario where these FM comes into picture
    Regards,
    Parag

    Hi,
    (1) REUSE_ALV_LIST_DISPLAY
    Display an ALV list as per parameters defined in the function call
    (2) REUSE_ALV_GRID_DISPLAY
    Display an ALV grid as per parameters defined in the function call
    (3) REUSE_ALV_COMMENTARY_WRITE
    List header information is output according to its type. The output information is put in an internal table. Output attributes are assigned to each line via the TYP field.This module outputs formatted simple header information at TOP-OF-PAGE.
    (4) REUSE_ALV_HIERSEQ_LIST_DISPLAY
    This module outputs two internal tables as a formated hierarchical-sequential list.
    (5) REUSE_ALV_VARIANT_F4
    Display variant selection dialog box.
    (6) REUSE_ALV_VARIANT_EXISTENCE
    Checks whether a display variant exists.
    Other Useful Link :
    Customize ALV grid layout at run time
    Download ALV grid Control Tutorial
    Understand ALV report ( Just Copy and paste )
    Dynamic selection on ALV at run time
    Dynamic selection on ALV at run time
    Regards
    Kiran

  • MMBE - Copy text in ALV display

    Hi all,
    We are migrating to ECC 6.0 from 4.7.  In ECC, transaction MMBE calls a new ALV display (we are aware that the old program can be called via MMBE_OLD). 
    We have many users who are used to selecting and copying multiple text fields (such as a list of batches) from the old MMBE using ctrl + Y then ctrl + C.  In the new display we can select a single field, by simply clicking.  However, we cannot find a way to select multiple text fields from the new display.  Does anyone have any suggestions?
    Thanks & regards,
    Mark

    I feel a little silly answering my own question, but we found the solution:
    In the Print Preview, Ctrl + Y & drag can be used to select.

Maybe you are looking for

  • Limit to the value of Goods receipt in a Scheduling agreement

    Hi All, Please let me know if there is any way to limit the goods receipt posting against a Scheduling Agreement to equal to or less than the total agreement value. Or else if the GR's has already been posted for some value, the system shuld check an

  • Meaning only field does not work when querying

    Hi I am working with Designer 6i R4.11 In my generated forms I have columns/fields based on "domains/lovs". The domain property "dynamic list" is set to yes and I have all my values in a cg_ref_codes table. Now when I am doing a query in my form and

  • Service command in Preview.app - Send PDF as attachment doesn't work

    I have used the following workflow for month on all my three macs. I open up a PDF file in Preview and select "eMail PDF as attachment" from the Edit menu at the top of the screen. This will attach the current viewed PDF file to a new mail message. I

  • Connecting a new Viera TV to the network

    Hi, I am planning on buying a Panasonic Viera TX-L37ET5B. I have an iMac, a MacBook, a Time Capsule, an AirPort Extreme and an Airport Express. I am connecting the Viera with Ethernet to a BT (UK) router and was wondering the best use of all this app

  • Do you recommend using a screen protector for iPhone 5?

    Does iPhone 5's screen scratch easily with normal use? I'm really careful with my Apple products, but I don't want to have scratches on my screen.