RS_COPY_SELECTION_SETS : Function Module to Copy the ABAP Report Variants

While copying an ABAP report  we can copy the variants of report also. But what if we want to copy the variants of one report to another already existing report? In this case use the function module RS_COPY_SELECTION_SETS to copy the ABAP report variants.

Go to Function Builder (SE37). Enter the name of the function module as RS_COPY_SELECTION_SETS and press execute (F8).

abap-copy-selection-screen-variants-1

Now we shall copy the variants of program ZZDEMO to program ZZDEMO1. Just enter ZZDEMO as SOURCE_REPORT and ZZDEMO1 as TARGET_REPORT in the import parameters and execute (F8).

abap-copy-selection-screen-variants-2

Once the FM RS_COPY_SELECTION_SETS is successfully executed, variants will be copied to the target program (ZZDEMO1) from the source program (ZZDEMO). Now go to the selection screen of the target program i.e. ZZDEMO1 and check the new variants that is created.

abap-copy-selection-screen-variants-3