Application Development 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: 

Grabbing Text Symbols/Selection Texts from program to Function Module

0 Kudos
296

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

BaerbelWinkler
Active Contributor
173

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

Nikhil_Rao_ABAP
Participant
0 Kudos
173

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

BaerbelWinkler
Active Contributor
174

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

0 Kudos
173

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.

0 Kudos
173

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

Sandra_Rossi
Active Contributor
173

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