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.

Similar Messages

  • Copying ALV Variant

    Hi All,
    I have an ALV variant for Prog1. Now I want to copy and use the same variant for Prog2. (Prog2 is a copy of Prog1 with some small changes)
    How can I do this?
    Thanks & Regards,
    Saurabh

    Hi
    Try to copy the hits of the table LTDX and change the name of the program
    Max

  • Change ALV variant different between systems

    Hello,
    I have a program that creates an ALV grid.  In our QAS system, I have access to select, change, save & manage layouts.  The exact same program in PRD only allows change layout.  Is there an authorization object that controls how ALV grids can be controlled? 
    Thanks in advance.
    Maggie

    I have two things in the program:
    CALL METHOD grid1->set_table_for_first_display
             EXPORTING i_structure_name = 'ZVIOLATIONREPORT'
                        i_buffer_active = 'X'
                              is_layout = gs_layout
                             is_variant = gs_variant
                                 i_save = 'A'
                 IT_TOOLBAR_EXCLUDING = functions
             CHANGING  it_outtab        = i_vbak_outtab
                        it_fieldcatalog = it_fieldcatalog.     
    AND
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            it_fieldcat = i_fieldcat
            is_variant  = i_variant
            i_save      = 'U'
          TABLES
            t_outtab    = i_order.
    Neither is a variable so why would the program react differently between the two systems?
    Thanks.
    Maggie

  • Report painter variants/ layouts

    Dear sirs,
    a colleague of mine needs your experience. Our customer needs us to create some Report Painter reports with the possibility to change the layout. Is this/ something like this possible?
    An example would be to pick up the columns or to change number format: see numbers in units or tousands of units. Something like ALV variants/ layout?
    Any customizing option or workaround would help, thanks Otto

    My users are very lazy and want me to do the columns changes automatically. An example: the supervisors work with much money and the want to see the numbers in tousands only. The basic users need to see the whole numbers. This is the simplified problem. And I don´t want to copy each RP report 5-10 times. And yes, I am an ABAPer, and if it would not be so time demanding requirement I would program the ALV reports instead of these RP.
    New idea: could you extract the RP report code out of the generated report to reuse it in the standard ALV report?
    Thank you for your effort, Otto

  • 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

  • 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 variants between programs

    Hi!
    I've copied a Z program into an another Z program in the development system. Unfortunately there are a lot of variants to the old program in the productive system. Because these variants are only in the productive syste I could not copy them.
    After the new program is transported into the productive system I have to restore the variants also.
    I see a few ways to it, but I don't have experience in it yet, and I don't know, which one is possible to solve:
    - download from the old and upload the variants to the new program
    - copy them using a standard program/FM
    If you know a solution, feel free to share it with me.
    Thank you
    Tamá

    Hi
    This is a my utility program to copy a variant between two programs:
    REPORT ZUT_COPY_VARIANT .
    SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-T01.
    PARAMETERS: P_REP1 LIKE  RSVAR-REPORT OBLIGATORY,
                P_REP2 LIKE  RSVAR-REPORT OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK BL1.
    DATA  BEGIN OF DYNPFIELDS OCCURS 1.
            INCLUDE STRUCTURE DYNPREAD.
    DATA  END   OF DYNPFIELDS.
    DATA: TEXT_1(100),
          TEXT_2(100).
    DATA: ANSWER.
    AT SELECTION-SCREEN.
      IF P_REP1 = P_REP2.
        MESSAGE E208(00) WITH 'Programmi di orig. e destin. identici'(E02).
      ENDIF.
      MESSAGE W208(00) WITH 'Verificare omogeneità scherm. selez.'(W01).
    AT SELECTION-SCREEN ON P_REP1.
      PERFORM CHECK_REPORT USING P_REP1.
    AT SELECTION-SCREEN ON P_REP2.
      PERFORM CHECK_REPORT USING P_REP2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_REP1.
      PERFORM F4_REPORT USING 'P_REP1'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_REP2.
      PERFORM F4_REPORT USING 'P_REP2'.
    START-OF-SELECTION.
      TEXT_1 = 'Tutte le varianti del report &'(001).
      REPLACE '&' WITH P_REP1 INTO TEXT_1.
      TEXT_2 = 'saranno copiate nel report &'(002).
      REPLACE '&' WITH P_REP2 INTO TEXT_2.
      CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'
           EXPORTING
                DIAGNOSETEXT1 = TEXT_1
                DIAGNOSETEXT2 = TEXT_2
                TEXTLINE1     = 'Eseguire copia varianti?'(003)
                TITEL         = 'Copiare Varianti'(004)
           IMPORTING
                ANSWER        = ANSWER.
      CHECK ANSWER = 'J'.
      CALL FUNCTION 'RS_COPY_SELECTION_SETS'
        EXPORTING
          SOURCE_REPORT        = P_REP1
          TARGET_REPORT        = P_REP2
    *   DEVC                 =
    *   CHANGE_ENAME         = 'X'
       EXCEPTIONS
         VARIANT_LOCKED       = 1
         OTHERS               = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        MESSAGE S208(00) WITH 'Varianti copiate positivamente'(S01).
      ENDIF.
    *&      Form  CHECK_REPORT
    *       text
    *      -->P_REP  text
    FORM CHECK_REPORT USING    P_REP.
      SELECT SINGLE NAME FROM TRDIR INTO P_REP WHERE NAME = P_REP.
      IF SY-SUBRC <> 0.
        MESSAGE E368(00) WITH P_REP 'inesistente o inattivo'(E01).
      ENDIF.
    ENDFORM.                    " CHECK_REPORT
    *&      Form  F4_REPORT
    *       text
    *      -->P_PARAM  text
    FORM F4_REPORT USING    P_PARAM.
      FIELD-SYMBOLS: <REPORT> TYPE ANY.
      ASSIGN (P_PARAM) TO <REPORT>.
      REFRESH DYNPFIELDS.
      CLEAR DYNPFIELDS.
      DYNPFIELDS-FIELDNAME  = P_PARAM.
      APPEND DYNPFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME     = SY-CPROG
                DYNUMB     = SY-DYNNR
           TABLES
                DYNPFIELDS = DYNPFIELDS
           EXCEPTIONS
                OTHERS.
      IF SY-SUBRC = 0.
        READ TABLE DYNPFIELDS INDEX 1.
        <REPORT> = DYNPFIELDS-FIELDVALUE.
      ENDIF.
      PERFORM PROGRAM_DIRECTORY                                 "#EC *
            USING <REPORT>
                  'X'.
    ENDFORM.                                                    " F4_REPORT
    *       FORM PROGRAM_DIRECTORY                                        *
    *  -->  PROGRAMM                                                      *
    *  -->  F4_CALL                                                       *
    FORM PROGRAM_DIRECTORY USING PROGRAMM LIKE RS38M-PROGRAMM
                                 F4_CALL.
      DATA: L_PROGRAMM LIKE RS38M-PROGRAMM.
      L_PROGRAMM = PROGRAMM.
      IF L_PROGRAMM = SPACE.
        SUBMIT RSABADAB AND RETURN VIA SELECTION-SCREEN
                        WITH F4_CALL =    F4_CALL.
      ELSE.
        SUBMIT RSABADAB AND RETURN VIA SELECTION-SCREEN
                        WITH REPNAME CP   L_PROGRAMM
                        WITH F4_CALL =    F4_CALL.
      ENDIF.
      GET PARAMETER ID 'RID' FIELD PROGRAMM.                    "#EC *
    ENDFORM.
    Max

  • 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

  • Copy alv layout

    is it possible to copy alv layout from one program to another program

    no,
    you can copy the code that fills the field catalog and layout though...

  • Copying variants & Layouts from 4.7 to ECC 6.0

    Hi All,
    Upgrading Client system from 4.7 to ECC 6.0. The 4.7 server would have its own variants and layout for different objects.
    How do I copy those variants and layouts to my ECC 6.0 server?
    Thanks for your valuable inputs.
    Rajesh

    Hello prashant,
    SPDA_GET_STACK_INFO will check wether all PATCH prerequisites are met or not your ST related level is not up to the required level.
    Please check this requirement up the level of STand run it agin.
    Thank you,
    Shyam

  • Switching between ALV variants

    Hi Experts
    Is there any way to switch between the variants of an ALV without using the std dropdown available in alv header.
    I have a requirement to navigate to various views depending on the current ALV variant selected by the user in my application.
    Thanks and Regards
    Karthick

    Hi Experts
    Is there any way to switch between the variants of an ALV without using the std dropdown available in alv header.
    I have a requirement to navigate to various views depending on the current ALV variant selected by the user in my application.
    Thanks and Regards
    Karthick

  • Get contents of  ALV variant selected!

    Hi All,
    I have a requirement to download fields of an ALV report to excel. I use different variants in my program . So based on the variant selected I need to download only those fields. Can  you tell how to get the fields of  a particluar variant?
    Regards,
    Rakesh

    Hi,
    Wt r u asking i don't know? Deponds upon the variants the output data my be differ not fields.
    U can save the layout for that particular variants.
    option is
    I_SAVE             = 'X '
    Thanks,
    Shankar

  • Copy Query Variants from InfoCube to MultiProvider

    Hi,
    Is it possible to copy query variants from an infocube to a multiprovider?
    Basically, we used RSZC to copy the queries from the infocube to the multiprovider, but it doesn't look like the variants were copied over. Is there an ABAP program or some other workaround that can expedite/facilitate in recreating the variants on the multiprovider queries?
    Your help is much appreciated.
    Thanks,
    KK
    Edited by: Kristin Kalalau on Jan 29, 2009 10:48 PM

    It is possible to copy but the only requirement is your target cube structure should match with the source cube structure.
    Thanks...
    Shambhu
    Edited by: Shambhu Kumar Gupta on Jan 30, 2009 12:01 PM

  • Cannot copy and paste words between EBS and other applications

    hi,every one
    I can't copy and paste word between Oracle EBS and other applications(such as MSword,excel) on a windows client.
    the version of EBS is 11.59 and jinitiator, 1.1.8.16
    has anyone ever encountered such problem and know how to resolve it?
    thank you in advance
    Message was edited by:
    user466827

    Download the appltop.cer from the APPS server to the local Machine
    Cd C:\Program Files\Oracle\JInitiator 1.1.8.16\bin
    ftp <IP Address>
    bi
    cd /apps/oraprod/prodappl/admin
    get appltop.cer
    bye
    Register that to the local identitydb.obj
    Cd C:\Program Files\Oracle\JInitiator 1.1.8.16\bin
    javakey c <name_it> true (creates a new trusted applet called )
    ( <name_it> in identitydb.obj )
    javakey ic <name_it> appltop.cer (signs the new <name_it> trusted applet)
    ( with the new certificate appltop.cer )
    javakey -l (will display your new trusted applet that has been signed)
    (With the appropriate digital certificate file of the)
    (Instance you wish to connect to. )
    Clear The Browser Cache
    Clear Jcache
    Restart the Browser Session.
    Regards,
    Prasanna
    [email protected]

  • Alv grid layout display in 2 pages

    Hi All,
    I am presently working in ALV programming.
    The client requierment is "GL line items and summary sheet will be listed in separate pages."
    i am dispalying the output using ALV grid layout display.
    Can you please conform that how to write logic for summary sheet.that will display after the line items and also saparate page.
    Thanks,
    Sridhar

    Hi ,
          Use event END OF PAGE .
    Write a Form for end of page
    then do calcualtions.
    Reward if useful.

Maybe you are looking for

  • Cannot login with Network account.

    Hi, I am an experimented Mac user, but quite new with Snow Leopard Server. I've just purchased the brand new MacMini Server. I have configured my server with the name server.local and installed OpenDirectory as Master. I wanted to try the network log

  • Urgent: regarding vendor report(tables)

    Hi, I am making a report in which i have to display the status of a vendor payment is done or not. I know that there are 2 tables which are going to be used i.e. BSIK n BSAK (for open items n cleared items) . i want to know is there any necessity of

  • Issue in closing an Internal Order

    Hi SAP Gurus, I need assistance for closing a very old IO in SAP. The IO was setup with a certain profit center and cost center. The cost center is now closed. I tried to change the cost center to another active cost center.Now when i used t-co KO88

  • Codify Template 02 Div insertion Issue

    I'm experiencing a similar problem  as the AP Div? post, but the fix provided didn't help at all.  I'm using the Codify  dreamweaver template #02 located here.   I'm attempting to use the emptry region underneath the navigation bar. I  can't seem to

  • RE: installing Elements Camera Raw 6.3 Updates

    I have Element 9 and want to work with raw files.  Tried to install Elememts Carera Raw 6.3 Updates and encountered the following error message. Installation failed. Error Code: U44M2P7  Can somebody help me to sort out the problem?  Many thanks.