cancel
Showing results for 
Search instead for 
Did you mean: 

bezei select query in smartform

Former Member
0 Kudos

Hi all ,

i need to pick bezei from v_tonc and the logic given is like this

"Access table LIKP with VBELN and get INCO1 then

access table v_TINC with LIKP-INCO1 and get BEZEI"

and wrote the query

if wa_likp-inco1 is not initial.

select single bezei from v_tinc into wa_v_tinc

where inco1 = wa_likp-inco1.

its throughing error as Global Definitions : Field " BEZEI" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .

I defined it but still....................

please answer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

In the initialization tab --> In the output parameters include the wa_v_tinc.

Regards,

Sravanthi

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Mention 'wa_v_tinc' in Output Parameters of u r code.

Former Member
0 Kudos

Hi,

i guess the select single query is wrong:

it suppose to be either of the below 2:

1st Method:

data : wa_v_tinc TYPE v_tinc.

*select single * from v_tinc into wa_v_tinc*

where inco1 = wa_likp-inco1.

OR

2nd Method:

data : gv_bezei TYPE v_tinc-bezei.

select single bezei from v_tinc into gv_bezei

where inco1 = wa_likp-inco1.

U should either get all the columns of V_TINC into a Work Area/Structure (wa_v_tinc) like 1st method or get the single column value (BEZEI) into gv_bezei (global variable) from V_TINC like 2nd method...

but its not possible to get a single column into a structure like:

data : wa_v_tinc TYPE v_tinc.

select *single * from v_tinc into wa_v_tinc*

where inco1 = wa_likp-inco1

Hope it helps!!

Rgds,

Pavan

Former Member
0 Kudos

Hi

Declare the global variable. Use it in the input and output parameters properly and check it out.

Regards

Ramesh Sundaram