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

really urgent: reagrding adding fields select statement in smart forms

Former Member
0 Likes
620

hi,

i am working on a smart form which was made by someone else and now i have to make changes in it and now i have to add 1 field in that select statement but it is giving error even if i am storing the variable in it and declaring it in global declarations.

plzz help me how to overcome dis problem?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
606

Hi Ric,

As u have added one more field in the select statement,

U must modify the internal table as well.

Now when u pass this internal table to smartform just chk the type reference of this internal table from smartform : Global Settings - Form Interface - Tables tab.

In most of the cases its a Z-structure.

Just add the new field in this structure as that of ur internal table in program. ( At same position..)

For eg:

In my program I am passing following table to smartform...

TABLES

I_ZEKPO = IT_FINAL_DATA

I_ZADRC = IT_VENDOR_ADDRESS

now in smartform form interface i have declared them as:

I_ZEKPO LIKE ZEKPO

I_ZADRC LIKE ZADRC

here ZEKPO and ZADRC are the structures which I have created via SE11...

So whenever I modify in the program internal table structure I need to modify respective Z-strucure as well...

Just chk if the same thin has been already implemented by previous guy...and do the changes..

Edited by: Dhananjay Patil on Mar 11, 2008 12:03 PM

hi,

i am working on a smart form which was made by someone else and now i have to make changes in it and now i have to add 1 field in that select statement but it is giving error even if i am storing the variable in it and declaring it in global declarations.

plzz help me how to overcome dis problem?

4 REPLIES 4
Read only

dhruv_shah3
Active Contributor
0 Likes
606

Hi,

Had you passed the variable to the Input parameter in the initialization section.

Also declare this variable in the Types where the internal table is declared.

HTH

Regards,

Dhruv Shah

Read only

0 Likes
606

hi dhruv,

i have checked the smartform as u have said and dere is no declaration of anything in intialization parameter & variable in the Types and it is working fine ,let me show u d select statement:-

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.

but when i fill one more field i.e. sortl in it and stores it in it as vsortl and defining it in global data as vsortl like kna1-sotrl.

plzz help me out as i am new to the smart forms.

Read only

Former Member
0 Likes
607

Hi Ric,

As u have added one more field in the select statement,

U must modify the internal table as well.

Now when u pass this internal table to smartform just chk the type reference of this internal table from smartform : Global Settings - Form Interface - Tables tab.

In most of the cases its a Z-structure.

Just add the new field in this structure as that of ur internal table in program. ( At same position..)

For eg:

In my program I am passing following table to smartform...

TABLES

I_ZEKPO = IT_FINAL_DATA

I_ZADRC = IT_VENDOR_ADDRESS

now in smartform form interface i have declared them as:

I_ZEKPO LIKE ZEKPO

I_ZADRC LIKE ZADRC

here ZEKPO and ZADRC are the structures which I have created via SE11...

So whenever I modify in the program internal table structure I need to modify respective Z-strucure as well...

Just chk if the same thin has been already implemented by previous guy...and do the changes..

Edited by: Dhananjay Patil on Mar 11, 2008 12:03 PM

Read only

Former Member
0 Likes
606

hi ric ,

the data declaration in the smart form is like parameters or tables ? if parameters u can add in the global section. if it is tables(means it is reffering to a zstructure ) u need to add one more field to the structure with the definaed type. then it is possibe .

and one more thing u need to change the window size in which u r passing it. other wise it is a problem .

regards,

venkat.