Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

adding field in a smart form select statement

Former Member
0 Likes
1,541

hi,

i am modifying a report in which i have to add sortl from kna1 in the select statement .

when i try to modify the statement it gives error as i ahev defined the value in the global variable .

plzz help me out as help will be definately rewarded.

14 REPLIES 14
Read only

Former Member
0 Likes
1,448

hi

it will help us to resolve problem if u give that error detail here

Read only

kiran_k8
Active Contributor
0 Likes
1,448

Ric.

I guess the modification is done at the SE38 level and not at the smartform level.If so,

1.Check whether the internal table struture that you had defined has this field or not.If not then add this field in the internal table

2.Add the field in the select statement which is used to fetch the data from the corresponding table.

3.Check the structure for this internal table that you had defined in SE11 and add the new field in that strucutre too.

If any queries revert it.

K.Kiran.

Read only

Former Member
0 Likes
1,448

hi kiran,

i have checked the the program in which internal table is taken as kna1 and in smart form the select statement is given from where they are retriving the fiedl from kna1 table like dis :-

loop at ivbrk.

select name1 name2 name3 name4 stras pstlz ort01 land1 from

kna1 into (vname11, vname12, vname13, vname14, vstrask, vpstlzk,

vort01k, vland1) where kunnr = ivbrk-kunrg.

endselect.

endloop.

and dese values are also stored in the variables which are present in global definations.

basically it is a field which provide a short form of filling the customer name which is used in creating invoice (vf01) .

plzz help me out as it is really urgent to me.

Read only

kiran_k8
Active Contributor
0 Likes
1,448

Ric,

loop at ivbrk.

select name1 name2 name3 name4 stras pstlz ort01 land1 from

kna1 into (vname11, vname12, vname13, vname14, vstrask, vpstlzk,

vort01k, vland1) where kunnr = ivbrk-kunrg.

endselect.

endloop.

Seems you are modifying the select statement in the smartform which is selecting some data based on the internal table data that is there in the driver program.

If I am not wrong you want to select SORTL too in the above given select statement.

In the Global Definitions declare a variable like vsort type kna1-sortl and then in the select statement add this sortl field.

loop at ivbrk.

select name1 name2 name3 name4 stras pstlz ort01 sortl land1 from kna1 into (vname11, vname12, vname13, vname14, vstrask, vpstlzk,vort01k, vsortl, vland1)

where kunnr = ivbrk-kunrg.

endselect.

endloop.

Do check the select statement how you are writing.

K.Kiran.

Read only

Former Member
0 Likes
1,448

hi kiran,

i have deinfed the field as vsortl in the global definations and and declared in the statement as it is in the select statement ,bu tit is giving same error.

i had done like dis:-

VSORTL LIKE KNA1-SORTL

in the global definations and den in the select statement:-

select name1 name2 name3 name4 stras pstlz ort01 sortl land1 from

kna1 into (vname11, vname12, vname13, vname14, vstrask, vpstlzk, vort01k, vsortl, vland1) where kunnr = ivbrk-kunrg.

endselect.

and it is giving error:-

@8O@ %CODE2 The list "(VNAME11, VNAME12, VNAME13, VNAME14, VSTRASK, VPSTLZK, VORT01K, VSORTL, VLAND1)" after "INTO" is not of the the form (

plzz help me out it is really urgent.

Read only

kiran_k8
Active Contributor
0 Likes
1,448

Ric,

Is this the error message that you are getting.

The list "(VSORTL" after "INTO" is not of the form (f1, ...,fn), or

contains an undefined field. excludes specification of a field list.

Then if I am not wrong the you are missing a comma in that INTO ( ...... )

K.Kiran.

Read only

Former Member
0 Likes
1,448

hi kiran,

i have tried to fetch another field it is giving the same error but when i remove any purticular field is giving no error. i had checked whther structure is defined or not but dere is no such.

but in form interface dere is defined:-

IKNA1 LIKE KNA1.

tell me what should i do?

Read only

kiran_k8
Active Contributor
0 Likes
1,448

Ric,

go to global definitions of the smartform

click on tab tables

check what is the parameter name and associated type in that screen.Under the associated type you will be seeing some zstructure there.

now go to se11 and open this zstructure

add the field sortl in this zstructure in se11.

K.Kiran.

Read only

Former Member
0 Likes
1,448

hi kiran,

i have searched what u said but the declaration is done in form interface :-

ikna1 like kna1.

and rest of the fields are displaying the data and moreover i have declared sortl field in global defination and but problem arises when i want to select it in the select statement.

more over i tried to fetch another field from kna1 just to test, it gives problem in select statement same.

plzzzzz help me out its d matter of my job.

Read only

Former Member
0 Likes
1,448

What are you selecting from KNA1. only SORTL or any thing else..?

in your global declarations did you included sortl or not into the structure.

use the work area after the select and print where ever you need it.

But what error you are getting?

Read only

0 Likes
1,448

hi yash,

i am using this select statement:-

select name1 name2 name3 name4 stras pstlz ort01 land1 from

kna1 into (vname11, vname12, vname13, vname14, vstrask, vpstlzk, vort01k, vland1) where kunnr = ivbrk-kunrg.

endselect.

all these variables are defined in the global declarations and printed in the smart forms but when i add one more field (sortl) in the select statement it is giving error:-

@8O@ %CODE2 The list "(VNAME11, VNAME12, VNAME13, VNAME14, VSTRASK, VPSTLZK, VORT01K, VLAND1, VSORTL)" after "INTO" is not of the the form (

i dont know why it is giving ,plzz help me out as help will be definately rewarded.

Read only

Former Member
0 Likes
1,448

Hi

first you add that sortl field into the structure(where the remaining fields are existed) then put that field in the select statement and in smartform under the window(where the other fields are passed) pass that as

&it_tab-sortl&.

Read only

0 Likes
1,448

hi,

but where should i find that structure?

Read only

VishwanathV
Participant
0 Likes
1,448

This message was moderated.