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

Grabbing Text Symbols/Selection Texts from program to Function Module

0 Likes
1,931

Hello,

I have this program which takes in a program name and a variant and then outputs the variant values into the job log using a function module. Right now when the data prints to the job log it prints the variable name and I was hoping to print the Text Symbols I designated for it in the program. Is there another parameter I can pass in the function to achieve this? or is there a system command I have not seen?

1 ACCEPTED SOLUTION
Read only

BaerbelWinkler
SAP Champion
SAP Champion
1,808

Hi Owen,

I have a program which gets the variant content via this function module:

    CALL FUNCTION 'RS_VARIANT_CONTENTS'
      EXPORTING
        report               = t_varid-report
        variant              = t_varid-variant
      TABLES
        l_params             = t_params
        l_params_nonv        = t_params_nonv
        l_selop              = t_selop
        l_selop_nonv         = t_selop_nonv
        valutab              = t_valutab
        OBJECTS              = t_objects
      EXCEPTIONS
        variant_non_existent = 01
        variant_obsolete     = 02.

Table OBJECTS contains the field TEXT which might have the content you are looking for:

Example output:

Hope this helps!

Cheers

Bärbel

5 REPLIES 5
Read only

Nikhil_Rao_ABAP
Participant
0 Likes
1,808

Hi Owen,

Can you try using the function module: RS_COVERPAGE_SELECTIONS, than the one you could be using right now. This function module should be able to bring up the explicit selection texts for the parameters and select-options as opposed to the variable names.

Kind Regards,

Nikhil

Read only

BaerbelWinkler
SAP Champion
SAP Champion
1,809

Hi Owen,

I have a program which gets the variant content via this function module:

    CALL FUNCTION 'RS_VARIANT_CONTENTS'
      EXPORTING
        report               = t_varid-report
        variant              = t_varid-variant
      TABLES
        l_params             = t_params
        l_params_nonv        = t_params_nonv
        l_selop              = t_selop
        l_selop_nonv         = t_selop_nonv
        valutab              = t_valutab
        OBJECTS              = t_objects
      EXCEPTIONS
        variant_non_existent = 01
        variant_obsolete     = 02.

Table OBJECTS contains the field TEXT which might have the content you are looking for:

Example output:

Hope this helps!

Cheers

Bärbel

Read only

0 Likes
1,808

This helped a lot, the only follow up I have is this does not grab my text symbols. and that was what I was hoping to grab the most.

Read only

0 Likes
1,808

ganzatron

Hi Owen,

you might need to combine the output from the function module with READ TEXTPOOL for the program as Sandra indicated in her comment above.

Cheers

Bärbel

Read only

Sandra_Rossi
Active Contributor
1,808

These 2 questions were asked a lot in the forum. Search "RS_VARIANT_CONTENTS" (values of a program variant) and "READ TEXTPOOL" (text symbols and more).