<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Copy variants between programs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673643#M1099216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, I was wrong. The FM you have to use for saving the variant is RS_CREATE_VARIANT (same function group). (I know, because I did exactly the same in an earlier project.) However I cannot remember with which FM did I read the variants and cannot find it now... &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;All I remember that it was the same function group...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2008 13:37:42 GMT</pubDate>
    <dc:creator>JozsefSzikszai</dc:creator>
    <dc:date>2008-10-13T13:37:42Z</dc:date>
    <item>
      <title>Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673637#M1099210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the new program is transported into the productive system I have to restore the variants also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;- download from the old and upload the variants to the new program&lt;/P&gt;&lt;P&gt;- copy them using a standard program/FM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know a solution, feel free to share it with me.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 12:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673637#M1099210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T12:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673638#M1099211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use program RGRVARI1 or &lt;/P&gt;&lt;P&gt;RGRVARIX.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673638#M1099211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T13:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673639#M1099212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check function group SVAR. You can use the FM RS_VARIANT_COPY in this group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(hope you mean report variants...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:04:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673639#M1099212</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-10-13T13:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673640#M1099213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Use program RGRVARI1 or RGRVARIX."&lt;/P&gt;&lt;P&gt;Unfortunately these programs do not exist in our system, not in a 4.6c and not in an ECC6. You can send the source for me, if it will really work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eric: thank you for the FM, but it can copy variants only within 1 program and not between programs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:26:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673640#M1099213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T13:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673641#M1099214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a my utility program to copy a variant between two programs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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 &amp;amp;'(001).
  REPLACE '&amp;amp;' WITH P_REP1 INTO TEXT_1.

  TEXT_2 = 'saranno copiate nel report &amp;amp;'(002).
  REPLACE '&amp;amp;' 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 &amp;lt;&amp;gt; 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.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CHECK_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_REP  text
*----------------------------------------------------------------------*
FORM CHECK_REPORT USING    P_REP.
  SELECT SINGLE NAME FROM TRDIR INTO P_REP WHERE NAME = P_REP.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE E368(00) WITH P_REP 'inesistente o inattivo'(E01).
  ENDIF.
ENDFORM.                    " CHECK_REPORT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  F4_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_PARAM  text
*----------------------------------------------------------------------*
FORM F4_REPORT USING    P_PARAM.
  FIELD-SYMBOLS: &amp;lt;REPORT&amp;gt; TYPE ANY.


  ASSIGN (P_PARAM) TO &amp;lt;REPORT&amp;gt;.

  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.
    &amp;lt;REPORT&amp;gt; = DYNPFIELDS-FIELDVALUE.
  ENDIF.

  PERFORM PROGRAM_DIRECTORY                                 "#EC *
        USING &amp;lt;REPORT&amp;gt;
              'X'.
ENDFORM.                                                    " F4_REPORT

*---------------------------------------------------------------------*
*       FORM PROGRAM_DIRECTORY                                        *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  --&amp;gt;  PROGRAMM                                                      *
*  --&amp;gt;  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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:29:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673641#M1099214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T13:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673642#M1099215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This program should help RSTRANSP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673642#M1099215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T13:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673643#M1099216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, I was wrong. The FM you have to use for saving the variant is RS_CREATE_VARIANT (same function group). (I know, because I did exactly the same in an earlier project.) However I cannot remember with which FM did I read the variants and cannot find it now... &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;All I remember that it was the same function group...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673643#M1099216</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-10-13T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673644#M1099217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM:&lt;/P&gt;&lt;P&gt;RS_COPY_SELECTION_SETS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 13:44:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673644#M1099217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T13:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673645#M1099218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And once again, the day is saved, thanks to the PowerMax boy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 14:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673645#M1099218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Copy variants between programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673646#M1099219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot. It worked flawless.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sebastiá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 21:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-variants-between-programs/m-p/4673646#M1099219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-11T21:24:53Z</dc:date>
    </item>
  </channel>
</rss>

