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

Reg Select Statement

Former Member
0 Likes
576

Hi,

I have created a table with structure of vbak, but I only need four fields, vbak .

I am using intocorresponding fields of in select statement , It is giving performance issue, could u guide me to write the select statement with out into corresponding fields of.

regards,

vinesh.

5 REPLIES 5
Read only

Former Member
0 Likes
560

Hi,

In that case please create internal table with only 4 fields & then simply write :

Select vbeln

posnr

matnr

qty

into table itab

from ..........

Best regards,

Prashant

Read only

Former Member
0 Likes
560

hello,

Create the table using only the required fields from table vbak.

Regards,

Neelambari.

Read only

Former Member
0 Likes
560

HI if your useing only 4 fields then try to create a structure of that 4 fields

like thsi

TYPES : BEGIN OF ST_OBJID_SH,

OTYPE TYPE HRP1000-OTYPE,

OBJID TYPE HRP1000-OBJID,

END OF ST_OBJID_SH.

DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.

DATA : WA_OBJID_SH TYPE ST_OBJID_SH.

Read only

Former Member
0 Likes
560

Hi,

Do like this


Types: Begin of ty_data,
            field1 type vbak-field1,
            field2 type vbak-field2,
            field3 type vbak-field3,
            field4 type vbak-field4,
           End of ty_data.

 Data: itab type table of ty_data,
         wa type ty_data.


Select field1 field2 field3 field4 from VBAK into table itab where...

Regards,

Satosh

Read only

Former Member
0 Likes
560

Hi,

you have to declare a type of that four field in same sequence as it is given in table. Declare itab of that type.Then u can select fields into itab and use only move in place of move-corresponding . it will not hamper the performance.

thanx....

sunil