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

Access ABAP Variant parameter that is long string value

sap_cohort
Active Contributor
0 Likes
2,894

Hi, I have an ABAP variant with a long string parameter. It looks like all of the FMs I am using only pull up a partial value of the string parameter for display/use. Is there a way I can access the full value of the ABAP Variant Parameter for validation/edit?
Thanks!..
Have tried the SVAR Group FMs and they only seem to get partial parameter value.
Thanks!..

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
2,465

For more than 255 characters, I think you have to read programatically the program variant as usual (RS_VARIANT_CONTENTS_255 or BAPI_XBP_VARIANT_CONTENTS_255 with BAPI_XMI_LOG* function modules), which uploads the selection screen fields into memory at the same time, and read the memory via the "dirty assign":

CALL FUNCTION 'RS_VARIANT_CONTENTS_255' ...
ASSIGN ('(UJD_TEST_PACKAGE_LINK)PROMPT') TO <string>.

The solution above is to read. To create a variant with a field with more than 255 characters, it's to be done differently, it will depend on the exact context.

Hi, I have an ABAP variant with a long string parameter. It looks like all of the FMs I am using only pull up a partial value of the string parameter for display/use. Is there a way I can access the full value of the ABAP Variant Parameter for validation/edit?
Thanks!..
Have tried the SVAR Group FMs and they only seem to get partial parameter value.
Thanks!..

7 REPLIES 7
Read only

Jelena_Perfiljeva
Active Contributor
2,465

Sorry, I'm having trouble understanding the question... How exactly is the parameter defined? How are the FM parameters defined and how are you calling them?

It might be better to provide a specific example.

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,465

Does "long" mean up to 255 characters? (you cannot enter manually more than 255 characters)

Read only

sap_cohort
Active Contributor
0 Likes
2,465

Hi All, I have a BPC Program UJD_TEST_PACKAGE_LINK that has a parameter with a string type so it can be much longer than 255. I am looking to get the long string value in the variant and modify the contents. Let me know if I can add anything addition to help with a solution for this.
Thanks for any help with this.

Read only

0 Likes
2,465

I don't really sure what you are doing but if you want to get package link, you can try class CL_UJD_PACKAGE_LINK

Read only

sap_cohort
Active Contributor
0 Likes
2,465

Hi Thanks for the reply.
I have an ABAP Variant for program UJD_TEST_PACKAGE_LINK and it is has a long string for the "Link Answer Prompt (XML)" parameter. Greater thank 255. I would like to get the value of this variant parameter and change some values.
But, it seems like all of the FM I use do not bring in the full value of this parameter that is stored.

So how to read the program variant and get the full value of the "string" parameter "Link Answer Prompt(XML)"? Thanks and let me know if I need anything else to help find a solution.
Thanks!

Read only

0 Likes
2,465

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

Read only

Sandra_Rossi
Active Contributor
2,466

For more than 255 characters, I think you have to read programatically the program variant as usual (RS_VARIANT_CONTENTS_255 or BAPI_XBP_VARIANT_CONTENTS_255 with BAPI_XMI_LOG* function modules), which uploads the selection screen fields into memory at the same time, and read the memory via the "dirty assign":

CALL FUNCTION 'RS_VARIANT_CONTENTS_255' ...
ASSIGN ('(UJD_TEST_PACKAGE_LINK)PROMPT') TO <string>.

The solution above is to read. To create a variant with a field with more than 255 characters, it's to be done differently, it will depend on the exact context.