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

Import structure query

Former Member
0 Likes
643

hi gurus,

In a se37 function builder i have a structure in the import paramter

ie i am getting list of client in the import

how i can write the query to get the details of the list of client

it says the error as

"it" must be a flat structure. You cannot use internal

tables, strings, references, or structures as components. -

senthil.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
595

if it is structure the u can u use for all entries clause to fetch all the details as per ur import values lik -

select * from dbtab into corresponding fields of itab for all entries in itab1

where field1 = itab1-field1 "optional

amit

5 REPLIES 5
Read only

Former Member
0 Likes
596

if it is structure the u can u use for all entries clause to fetch all the details as per ur import values lik -

select * from dbtab into corresponding fields of itab for all entries in itab1

where field1 = itab1-field1 "optional

amit

Read only

Former Member
0 Likes
595

snthil,

In function module

select required columns form x table in to table itab

for all entries in structure

where client eq structure-client.

Now you will get required client details in your internal table.

Pls. mark if useful

Read only

0 Likes
595

thnax for u r reply

i have a FM in import as clientno like zclientno(structure to get list of client )

i want to have the output from the input as ( there will be many input clien no )

based on the cleint no i want to take the output inot an IT table from kna1 table

senthil

Read only

0 Likes
595

u have to write the select condition as per mentioned in my last post

second option can be tht u can have a loop at the internal table having clients and inside loop u can fetch the client details one by one like -

loop at itab.

select single * from KNA1 into corresponding fields of itab1 where Mandt = itab-mandt.

endloop.

second option will degrade ur performance so use the first one only.

amit

Read only

0 Likes
595

Hi Senthil ,

Sorry but i am still not clear with your requirement , coule you pleae rephrase it .

Regards

Arun