Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Former Member replied

Hi Scott,

Sorry if this is a stupid question, but have you added V_GSTRP to the 'Output Parameters' list on the initialisation?

Regards,

Nick

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question