Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RS_DISPLAY_VARIANT background execution

Former Member
0 Likes
802

Hi Experts,

I am posting this question once again though it is not resolved till now. I have a issue, i want to execute rs_display_varaint standard program in background. This program is called through SUBMIT statement in my program.

SUBMIT rs_display_variant WITH SELECTION-TABLE i_params

EXPORTING LIST TO MEMORY

AND RETURN.

Through thisprogram ALV grid is called using methods and classes so its not possible to execute it in background, If any body know how to execute it in background please let me know about it.

thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
722

I dont think RS_DISPLAY_VARIANT will work in background.

But instead you can try calling the FM: RS_VARIANT_CONTENTS to get the variant and then write your code to display it.

5 REPLIES 5
Read only

Former Member
0 Likes
723

I dont think RS_DISPLAY_VARIANT will work in background.

But instead you can try calling the FM: RS_VARIANT_CONTENTS to get the variant and then write your code to display it.

Read only

0 Likes
722

Hi Aparna,

Can you give some sample codes how to use this FM:RS_VARIANT_CONTENTS and how to display the variants ?

Thanks

Read only

0 Likes
722

Hi Aparna,

i had used rs_variants_values program in submit staement its executing in background but its not functioning as rs_display_variants so job variants info are not passing to ABAP memory .

Read only

0 Likes
722

Use something like:



  CALL FUNCTION 'RS_VARIANT_CONTENTS'
       EXPORTING
            REPORT               = XVARID-REPORT     " Report name
            VARIANT              = XVARID-VARIANT     " Variant Name
       TABLES
            L_PARAMS             = XPARAM
            L_PARAMS_NONV        = XPNONV
            L_SELOP              = XSELOP
            L_SELOP_NONV         = XSNONV
            VALUTAB              = VALUTAB           " This will have the contents of the variant
       EXCEPTIONS
            VARIANT_NON_EXISTENT = 01
            VARIANT_OBSOLETE     = 02.

You can then use the valuetab for display or export it to memory

Read only

Former Member
0 Likes
722

Maybe this could help you out...

[Save a variant from a Dynpro screen|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6618] [original link is broken] [original link is broken] [original link is broken];

Greetings,

Blag.