Changing Field on Smart form - Now getting error
We have a smart form that is showing a date from the wrong variable. I when to global definitions and added a new variable V_GSTRP TYPE AFKO-GSTRP. I changed the variable name in the smart form from &V_ERDAT& to &V_GSTRP&. I then added the following line to initialization routine.
SELECT SINGLE gstrp INTO V_GSTRP FROM afko WHERE aufnr = wa_aufk-aufnr.
When I activate the program, I get the following error
Global Definitions The field "V_GSTRP" is unknown, but there is a field with the similar name "V_GLTRP". .
The field V_GLTRP is declared as Type AFKO-GLTRTP
There is also a line of code in the initialization routine
SELECT SINGLE gltrp INTO v_gltrp FROM afko WHERE aufnr = wa_aufk-aufnr.
When I comment out the line SELECT SINGLE gstrp INTO V_GSTRP FROM afko WHERE aufnr = wa_aufk-aufnr, The form will activate.
Any help will be appreciated.
Sorry if this is a stupid question, but have you added V_GSTRP to the 'Output Parameters' list on the initialisation?