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

Smartforms - Include text with variable parameter(s)

deiamolina
Contributor
0 Likes
7,205

Hi...

I've trying to include texts on Smartforms using the functionality to texts (text node - Include text).

this text will change for each item on the form and need to be  variable. I already made a search on the forum and I found some discussion with the same problem and the answer is always to use the variable as a smartform variable (&variable_name&). The point is that when I do that the function generates this code

It's using my variable as a text and that's why it's not working.


So, I do like to know if I'm missing something in here.


Thanks,

Andréa

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
4,367

Can you please debug what exactly is happening in

PERFORM %MOVE USING %TEXTKEY-NAME '&GV_NAME&

7 REPLIES 7
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
4,367

Hi

Please put a breakpoint at where you are filling v_name field. Secondly check the checkbox no error if no text exist. Is the text maintained for every line..? Please put a screen shot of text maintained along with text id in AT language

nabheet

Read only

0 Likes
4,367

Hi


The transaction in which you have maintained the text before going to text put a break-point in READ_TEXT to check what parameters are passed their. Are you passing correct language?

Nabheet

Read only

Former Member
0 Likes
4,367

Hi Andréa,

When entering these variable names in the Text Key you do not need the & prefix and suffix, only the variable name.

Regards,

Nick

Edit: Looking at this in more detail this might not be accurate, although my recollection is it was the case.  Maybe worth a try anyway.

Message was edited by: Nick Young

Read only

Former Member
0 Likes
4,367

This will almost works like READ_TEXT function module.

What is the value you are passing in V_NAME ?  Please try this:

Execute the FM READ_TEXT with same values which you are passing in smartform at run time and check whether you are getting correct values. If there is some input change require in this FM execution similar require in your smart form.

Cheers,

Prakash

Read only

deiamolina
Contributor
0 Likes
4,366

I tried to remove && and still not working. I tried it before but I double checked.. The code treats the variable as string. See image below.

I can create a code using Read_text and print it out. I've been doing it for a long time. But I'd like to understand how to use Include text on Smartforms.

Follow the screen. All variable are proper filled but as I wrote to Nick Young the code is treating it as string and this is my problem.

Results in SE37 - Read_text

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
4,368

Can you please debug what exactly is happening in

PERFORM %MOVE USING %TEXTKEY-NAME '&GV_NAME&

Read only

0 Likes
4,366

Not sure why it wasn't working before but I debugged the code and it's working now. Crazy codes!

I did the same logic for more 4 include texts and it's working properly!

Thanks for all answers.