cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Field on Smart form - Now getting error

former_member431412
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

former_member431412
Participant
0 Kudos

Not a stupid question. I had reviewed the output parameters. In the list, there were several empty lines. Had I continued to scroll, I would have seen that V_GLTRP was also in the list.

Thanks a bunch, the program now activates...