cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform field cannot be changed problem

Former Member
0 Kudos

Dear All;

I'm having an issue about a smartform that im using for purchasing order.

I'm trying to make some changes with a piece of code to some certain texts in the smartform and it works for some of the text while it doesnt for some others.

The one which works is "WA_EKPO-TXZ01" defined in Global Definition/Global Data, and other which doesnt work is "WA_LFA1-NAME1" defined in Form Interface/Import. When I try my code on "WA_LFA1-NAME1", i get this error : "The field "WA_LFA1-NAME1" cannot be changed. ."

My piece of code for the texts is like this (below is for WA_EKPO-TXZ01) :


perform f_used_char  USING WA_EKPO-TXZ01
                           CHANGING WA_EKPO-TXZ01.

I have tried using a local variable instead of working with "WA_LFA1-NAME1" like this:

lv_name1 = wa_lfa1-name1.

perform f_used_char  USING lv_name1

                           CHANGING lv_name1.

And with that of course I use my text field like this:

To : &LVNAME1& 

However, my LV_NAME1 never gets to the TEXT field. I have checked the SE63 for translation and saw that my TEXT field still gets its value from  "WA_LFA1-NAME1" not from LV_NAME1. I dont want to change it from SE63 manually because god knows how many languages that smartform uses. So is there anyway that smartform can get this LV_NAME1 for that text in every languages dynamically?

I hope I was clear, please respond back if you have further questions. (I tried to be as much clear as I can)

Thank you

Talha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First Please Tell whether you are using Driver Prog Or coding Within Smart-forms.

If you are declaring WA_LFA1-NAME1 in Form Interface it means it is used in Driver_programme.

And in Global-Interface field is declared which is used with in smartforms.

So try

perform f_used_char  USING WA_LFA1-NAME1

                           CHANGING WA_LFA1-NAME1.

in Driver Prog.

or Code

lv_name1 = wa_lfa1-name1.

perform f_used_char  USING lv_name1

                           CHANGING lv_name1.

in driver-Programme.

if you are not using any driver-prog to call form

then just declare WA_LFA1-NAME1 in Global instead of  form interface.


Former Member
0 Kudos

Hello Hasan,

The smartform is using a driver program and will try that code in that program as you have suggested. Will feedback you about the result and reward you if that works.

Thank you

Talha

Former Member
0 Kudos

Ladies and Gentlemen, This is the correct answer!

Thanks again Hasan, my smartform rocks now!

Answers (0)