cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically assaign stdtext in smartform

Former Member
0 Kudos

hi,

in tvko table vkorg cotains sales organisation value and txnam_adr contains the name of std text.

i want,

if wa_tvko-vkorg = '2014' then the std text z_2014_stdtext will print.

but if wa_tvko-vkorg = '2004' then the std text should be wa_tvko-txnam_adr.

how i will do it?

plz help me.

its urgent.

thanks

Accepted Solutions (1)

Accepted Solutions (1)

samanta_limbrada
Explorer
0 Kudos

Hi,

Try to not code in smartform. It will cause a lot of problem when we have to debug.

Code everyting in the driver program, then pass only the necessary parameter to the smartform.

So, in this case, create a parameter named, for example, STD_TEXT_NAME.

Put some code in the program:

if wa_tvko-vkorg = '2014'.

std_text_name = 'z_2014_stdtext'.

else if wa_tvko-vkorg = '2004'.

std_text_name = wa_tvko-txnam_adr.

endif.

Then, in the smartform, in the standard text parameter, type:

&STD_TEXT_NAME&

Hope it'll help.

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks Samanta.

i did all the calculation in the driver program and pass just the name.

now its working perfectly .

thanks a lot.

Former Member
0 Kudos

Hi,

1.Create the alternative Node.In the condition tab of true write condition.

In that create Text element.

2.In false create a text element ,In condition tab of FALSe , write the Conditions.

Regards,

Shiva Kumar(Reward if helpful).