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

diffferent select queries?

Former Member
0 Likes
997

Hi All,

I am working on 4.6c for a support project.

I have worked on ecc 6.0. there are so many differences between these two versions.

I have some doubts in 4.6c,

select vbakvbeln vbakvkorg vbakvbtyp vbakauart

vbakknumv vbakkunnr vbak~vtweg

vbpa~kunnr

appending table it_vbak from vbak

inner join vbpa

on vbpavbeln eq vbakvbeln..

what is the difference between this wuery and

general select fields into internal table?

select matnr vkorg dwerk

from mvke client specified

into table it_mvke.

what is the significance of client specified?

could u please let me know?

thanks in advance.

Regards

Abhilash.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
963

hi,

select * from makt CLIENT SPECIFIED into table it_makt where <Conditions>.

this client specified is used for accesing records of a table from other client to existing client. as u give mandt as a first field of a tbale then table becomes client specific so which others users of other clients can't access that table. to access that kind of tables we use CLIENT SPECIFIED st in select query.

with regards,

Anup

Hi All,

I am working on 4.6c for a support project.

I have worked on ecc 6.0. there are so many differences between these two versions.

I have some doubts in 4.6c,

select vbakvbeln vbakvkorg vbakvbtyp vbakauart

vbakknumv vbakkunnr vbak~vtweg

vbpa~kunnr

appending table it_vbak from vbak

inner join vbpa

on vbpavbeln eq vbakvbeln..

what is the difference between this wuery and

general select fields into internal table?

select matnr vkorg dwerk

from mvke client specified

into table it_mvke.

what is the significance of client specified?

could u please let me know?

thanks in advance.

Regards

Abhilash.

7 REPLIES 7
Read only

Former Member
0 Likes
963

hi ,

can u make it clear the point in first code u used the inner join .in second u just wrote selction .acctually what u want .

Read only

0 Likes
963

Hi,

Could u plz let me know the importance of appending in the first query?

Regards

Abhilash.

Read only

0 Likes
963

select ... Into Table

SELECT * FROM TABLE1 INTO TABLE itab1
         WHERE fld1 = u2019AAu2019.

Select ... Appending Table

SELECT * FROM TABLE1 APPENDING TABLE itab1
    WHERE fld1 = u2019AAu2019.

Two statements are similar if itab1 has no entry.

But if itab1 has at least one row before select clause:

  • Select ... Into Table

The entries of internal table will be cleared before adding new records.

    • Select ... Appending Table*

System donu2019t touch old records and append new records to internal table. Means When you use APPENDING; the new lines are added to the existing internal table <itab>.

thanks and regards

Anup.

Read only

former_member195383
Active Contributor
0 Likes
963

Hi..

U can note in the former select query there are two tables from which data is fectched.....

wat it does is first it will go to vbpa ...select kunnr from thr..then for that perticular vbeln it will go to vbak..select the reqd. fileds..so here at a time...data is fetched from two tables...

But in the second select query data is selected from single table only...

Hope it helps..

Reward points if helpful...

Read only

Former Member
0 Likes
963

Hi,

You can use any select query. for example innerjoin select query

at time u can select data from two database tables into one

internal table.in normal select query first you have to select data

from one data base table into internal table.ofter that if u want select

data from another data base table u have to write select query inside

the loop. or u have to write - for all entries in internal table.so u can use any select query.

Regards,

Ramya

Read only

Former Member
0 Likes
964

hi,

select * from makt CLIENT SPECIFIED into table it_makt where <Conditions>.

this client specified is used for accesing records of a table from other client to existing client. as u give mandt as a first field of a tbale then table becomes client specific so which others users of other clients can't access that table. to access that kind of tables we use CLIENT SPECIFIED st in select query.

with regards,

Anup

Read only

Former Member
0 Likes
963

closing thread.

abhilash.