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

Similar Messages

  • 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 different servers

    Hello All ,
    There are 2 servers MSAP and 1SAP ,1SAP is the new implementation that we are doing .MSAP is their previous system .
    I have to copy a program from MSAP to 1SAP ,but there are many variants in that .Is there any method i can copy variants between 2 different servers?? coz there are lot of variants in the existing system .
    Regards ,
    Hemanth .

    Hi,
    Refer FM's:-
    RS_VARIANT_CONTENTS or
    RS_VARIANT_ADD or
    RS_VARIANT_CHANGE.
    Also you can refer thread:-
    Re: Copying Variants
    Hope this helps you.
    Regards,
    Tarun

  • Copy Variants between Web Templates

    Experts,
    Our users access all BI Reports via the SAP Portal.  The reports are published using Web Templates (developed using the Web Application Designer).  We are on BW 7.0 EHP 1.
    My question relates to Variants created on the web templates.  Is there a way to copy variants from one web template to another, if the templates are based off of the same query?  I can see that the web template variants are in SE11 table RSRPARAMETRIZA.  But I am not able to see a way to copy them from one template to another.  Any thoughts?  Thanks!
    Jose

    Experts,
    Our users access all BI Reports via the SAP Portal.  The reports are published using Web Templates (developed using the Web Application Designer).  We are on BW 7.0 EHP 1.
    My question relates to Variants created on the web templates.  Is there a way to copy variants from one web template to another, if the templates are based off of the same query?  I can see that the web template variants are in SE11 table RSRPARAMETRIZA.  But I am not able to see a way to copy them from one template to another.  Any thoughts?  Thanks!
    Jose

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

  • 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

  • Copy Control between Sales Orders and Deliveries

    Hi Gurus,
    please can you tell me why copy control between Sales Order and Delivery doesn't work?
    At header level, into copy control, we can set 2 requirement routines, one as general requirement for copying (TVCPL-AUBED) and the other one as requirement for grouping orders into deliveries (TVCPL-AUZUS).
    At header level we can also set a routine for data transfer to define how data are passed from Sales Order header to Delivery header (TVCPL-GRUAK).
    Then we can set routines at item level, one as requirement (TVCPL-AUBED) and one as data transfer (TVCPL-GRUAP).
    When delivery is created with VL10A transaction, at header level only the first  general requirement routine is used (FV50B***). Grouping requirement is not used (we also set a break point and the program is not passing into this routine).
    Then it is used the requirement routine at item level (FV50B***).
    Please can you tel me how we camake working the routine for grouping requirement at header level?
    Thank you very much.
    Kind Regards
    Andrea

    Hi, we used standard routine even if to be sure we run also the generation report you mentioned.
    Please any other suggestions?
    Thank you very much.
    Kind Regards
    Andrea

  • Copying Variants

    We have 2 SAP boxes one for development the other for production.
    There is a program say <b>PROGRAM1 on the production server</b> whose variants we want to copy to become the variants of another program say <b>PROGRAM2 on the development server</b>.
    Both these program share the same selection screen design. My questions are
    1) Can only the variants of one program be imported into another program. More specifically is there any transaction to do this?
    2) Can this be managed programatically?

    If program names are same on both boxes this can be achieved easily with report RSTRANSP. With this report you can create transport on source system and ask your basis to import this into the target system .
    For variant of program 1 on system A to varaint of program 2 on System B is not possible . You can write ABAP to download , change the program names in file and then upload .
    Cheers.

  • How ca we copy standard print program of SMARTFORM?

    guyz...
    how can we copy standard print program of RLB_INVOICE of invoice SMARTFORM to a Z program in ECC 6.0???
    regards
    Zid.

    Hi,
    enter the program name in the SE38 editor
    click on copy button
    then it will ask you for the new name
    when ever you click on the copy transfer buton
    then it will raise a pop and saying that what ever you want from the program like
    1) INCLUDES
    2)SCREENS
    3)USER INTERFACES
    4)VARIANTS
    5) DOCUMANTATION
    ETC..
    hat ever you clcik on that check box
    Thanks.

  • Copy configuration between company codes tool

    Hi,
    I would like to know if we can copy configuration between company codes?  If yes, how do we do that?  I know there are some third party tools available, but couldnt recollect now.  Any guesses? 
    Thanks,
    Abdul

    Since it are more than 200 customers, a manual operation isn't very efficient.
    As I understand, no standard SAP programs exist to copy multiple customers from 1 company code to another. A new CATT will have to be created.
    Does anyone have this kind of program, otherwise I will create it from scratch.
    Thanks in advance.
    Best regards,
    Danny

  • Copy data between cubes

    I need to copy data between two cubes (through a business rule). Can I do it using Partition/Replication? If so, does anyone have an example on how it is done? I'm currently using @XREF, but that does not transfer data for blocks that don't already exist in target database.
    I'm very new to this so a detailed description will help.
    Thanks for your help.

    Yes, partitions are great. I like to use replicated partitions because I can control the data, and deal with integrity issues etc. Your usage may vary.
    Basically, you go to your "Source" database, go to the partitions menu, and "Create New Partition". You then walk through each of the tabs in the partition menu
    Type Tab: Choose the type. Let's say a "replicated" partition.
    Connection Tab: Choose what databases will be connected with the partition
    Areas Tab: I like to check the "Use Text Editor" to just type out the formulas. Also check the "Show Cell Count" to have some confidence your formulas are working as planned. Here you define what data moves from source to target. For example I might setup the following
    Source:
    ("Actuals Data"),
    @LEVMBRS("Province",0),
    @GENMBRS("Company",2)
    Target:
    ("Actuals Data"),
    @LEVMBRS("Province",0),
    @GENMBRS("Company",2)
    If the names don't match, you can adjust that in the advanced properties or mapping properties. (If you have multiple slices of data - use the advanced mapping).
    Now validate and save

  • HOW TO COPY STANDARDTEXT BETWEEN CLIENTS

    Hi All,
    HOW TO COPY STANDARDTEXT BETWEEN CLIENTS. I WANT TO COPY BETWEEN 200 TO 110 CLIENTS.
    Thanks & Regards,
    suman.

    Hi Suman,
    Check below points.
    2. goto se09 and create a new
    customizing rqeuest.
    3. after that
    in the object list,
    go in edit mode
    and a new window will come
    where u can add the objects(in table control)
    4. there u put
    program id = R3TR
    object type = TEXT
    object name = TEXT,YHRS_FNF_LTR,YHR1,E
    where
    YHRS_FNF_LTR = name of standard text
    YHR1 = TEXT ID
    E = english language
    How To Transport STANDARD TEXTS??
    Transporting standard text
    Thanks
    Ramakrishna

  • I am switching computers. Is there a way to copy the mozilla program file from my old computer and "install" it on my new computer? Or do I need to redo the complette install?

    I have a new computer. Can I copy the mozilla program folder from my old computer to the new or do I need to do anew install from the website? I do know that I can transfer bookmarks and such but what about the entire program?
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)

    Download CS5 products

  • How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    How do I copy purchases between 2 itunes libraries on the same computer with different log ins and separate apple user ids?

    Load the library which doesn't contain the songs and drag them into the open iTunes application window. If you need to move them between different computer user accounts, put them into /Users/Shared/.
    (74502)

  • Conflict between program Mac mail and program Microsoft Outlook e-mail???

    Denmark, Kolding, 30th of September 2010
    A conflict between program Mac mail and program Microsoft Outlook e-mail?
    For several months tried to discuss and resolve with several Apple specialists/support, but without much luck.
    Therefore I have discussed these issues with 2 different and independent Mac users to find out in testing other Mac users will have the same problems as outlined in the below mentioned situations.
    I will therefore outline the coverage issues, as mentioned, including occurs on my iMac 21.5 " with serial number: <Edited by Host> and 2 friends with their Macbooks of new dates as follows:
    1. Sending from my Mac plain mail as "plain text "(during formatting):
    Plain text mail as "Plain Text "(during formatting) Verdana font size 10, sent and received on Windows PC with the correct letter size - but with the font changed to Century Gothic!!!
    2. Sending from my Mac plain mail "formatted text" (during formatting):
    Eg. with my signature/signature-colored types and Verdana as font and size 10, possibly with underlining and italics in the text dispatched - the mail received as text with New Times Roman size 12 and signing /signature color Verdana now in size 13.5!!!!
    3. Sending plain mail "as normal text "(during formatting)
    In the mail text underlined and made bold - the program asks whether to convert to RTF format (to keep underlining, bold, etc.) and Verdana as font and size 10, YES - this mail is received on the Windows PC as text with New Times Roman with the desired underlining and bold text and size 12!!!!
    4. Plain text mail as "formatted Text"
    Eg. with signature / signature-colored types and Verdana as font and size 10, possibly with underlining and italics in the text sent - received as text with New Times Roman and signing / signature as colored Verdana now in size 13.5!!!
    5. Sending mail with file attached:
    After producing a normal text document modified to PDF and directly from the Adobe Reader sent this PDF file in e-mail formatted as normal text with font Verdana 10 point, with signature. This is received on the Windows PC with a PDF file OK, but the font of the mail text is changed to Century Gothic and missing signature. Signature is available as an attachment on the Windows Outlook e-mail program as a ATT00113.text file. This can be opened and there is the missing signature!
    6. Sending e-mail with photos directly from iPhoto
    iPhoto opens and click on the desired photos eg. 5 pcs. (Exactly as mentioned in the demo video!) and click on the e-mail icon at iPhoto and the program opens and e-mail that is opened with the attached photos and rich text is being used in the mail. Signature disappears and must be clicked on the mail by the sender.
    The mail is received with the attached pictures OK - text changed to Times Roman with the desired bold - though no signature and 5 pcs. Att0028.html files attached. These can be opened and contains the file number each picture!
    The above problems can be partly avoided by the following:
    1. Only send mails as plain text
    Without any underlining, attachments, etc.. When the Windows PC Outlook receiver opens the mail where only the text fond is changed!!
    2. Sending mail with attached file
    Start opening the mail program and use formatted plain text first and then attach (with the staple) file, and the Window receiver will get the file, but text and signature changed to Times New Roman size 13!!
    3. Sending mail with photos from iPhoto
    Start by opening mail program text in Verdana 10 and click the Photo Browser and find (look for - takes its time!) the pictures you want to send and pull/drag them into the mail and send, - images, text and signature are in the mail on Windows PC - but with the font changed to Century Gothic!!!
    If sent as formatted text with various underlining, italics, etc. together with the photos will be received OK - but the writing is now New Times Roman size 12 signatures Verdana now in size 13!!!
    I must say – I am disappointed with the Mac mail program – it actually means that sending a perfect mail with underlining, colours, a.s.o. also photos directly from iPhoto – will received at a Windows computer in a totally mess.
    Looking forward to some good news from either Mac supporter or some clever Mac users who can help me to adjust my Mac to avoid these problems IF POSSIBLE!!!!.
    Apple/Mac is too good a product to make these problems!!
    Best regards
    Peter Larsen
    <Edited by Host>

    Welcome to Apple Discussions!
    The PC sets the font on its side, the Mac does on its side for plain text. There is no "font size" in plain text coding. Rich Text gives you a bit more control, but only if both e-mail clients support it. HTML gives you a bit more control, but only if both e-mail clients support it. Use the asterisk, parenthesis, underscore, or any keyboard symbol that is part of the original ASCII. Otherwise, the chance is nobody else will be able to read it who does not have your e-mail client in the same version.
    Sadly there are no e-mail standards except MIME for attachment, and even that isn't universally supported. E-mail is not the ideal medium for anything except plain text that is ASCII. To learn more about ASCII, see:
    http://en.wikipedia.org/wiki/ASCII
    If you want to post a website that is universally understood, see the hints here:
    http://www.anybrowser.org/

Maybe you are looking for

  • Can't log out from iCloud

    Hi. I have a problem. Several times a day, my iPad try to log it self into iCloud on a mail I don't use anymore. And the problem is, that I can't remove it, cuz I don't have the password anymore. I've tried to recover it, but it won't send any mail t

  • HT202667 Hi, I created my Apple ID using my iPhone but noticed I made a grammatical error in the email address.

    Hi, I created my Apple ID using my iPhone but noticed I made a grammatical error in the email address. Using my PC, I managed to edit my email address however this change is not reflected on my iPhone. What do I need to do to see the change there? Th

  • Value Help in WD Table

    Hi to all! I have a problem with value help in a Web dynpro Table. In my WD I have a Table with a field that had a free Value help, if I press F4 the Value help is opening If I select an item the value of the Help, the popup is closing but the select

  • Does GPS on iphone work witout a cell tower...

    I am currently in india and iphone is unable to locate me on Google maps. Is this okay? I thought iPhones uses any one or a combination of GPS/Cell Towers/WiFi hotspots to locate itself.

  • Centeral Management Console is Missing

    I just installed business objects 3.0. When I navigate to the Business Objects folder I have plenty of objects to choose from but not Central Management Console. Any ideas?