cancel
Showing results for 
Search instead for 
Did you mean: 

Data declarations in Smartforms

former_member210563
Participant
0 Kudos

Hi,

I have code the following in order to get an address:

DATA: wa_adrc_ship type adrc.

Select single name1 name2 name3 post_code1 city1 street str_suppl1 str_suppl2 house_num1

into corresponding fields of wa_adrc_ship

from adrc

where ADDRNUMBER = ls_invoice-ADDR_No

and nation = 'R'.

All the fields name1 name2 etc. has to be printed in the text node following this code. These fields have been declared as output fields on top, but I keep getting this error:

"Field WA_ADRC_SHIP-NAME1 is unknown. It is neither in one of the specified table nor defined by DATA statement.

I also tried to define them in Global definitions, but that resulted in the error that the field is already declared ????

Accepted Solutions (1)

Accepted Solutions (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

No need of declaring in progrma lines.Give Input parameter in program line as adrc and ls_invoice-ADDR_No and output parameter as wa_adrc_ship.

You should use Field list Icon(ctrlshiftf4) to drag and drop the field to be the output fields in text elements under global definition wa_adrc_ship.

In global definitions->Global data

wa_adrc_ship type <Structure in dictionary>

That is that structure should be declared in SE11.

Answers (1)

Answers (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Did you declared wa_adrc_ship in global definiitons->Global data?

Moreover, use the fieldlist to drag and drop the text eleemnt.

former_member210563
Participant
0 Kudos

As I wrote, I declared the wa_adrc_ship in global data, but then it was already declared even though that I commented the DATA statement in the code.

If I use the button insert field in the text node, it is empty.