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

problem with select...endselect using for all entries and work area

Former Member
0 Likes
586

Hi guys,

Is it possible to have this kind of code? how does it behave? will it read the table gt_pos_posted one by one? we're having problem with this since it takes a lot of time. we got a time_out error. Thanks!

SELECT * FROM bseg INTO wa_bseg FOR ALL ENTRIES IN gt_pos_posted

WHERE bukrs = gt_pos_posted-bukrs

AND belnr = gt_pos_posted-belnr

AND gjahr = gt_pos_posted-gjahr

AND buzei = gt_pos_posted-buzei.

IF wa_bseg-shkzg = 'H'.

wa_bseg-menge = wa_bseg-menge * ( -1 ).

ENDIF.

ENDSELECT.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
488

yes, it will read entries one by one, and then you have select.. end select too.

better use select ....into table <...> to do an array fetch into the internal table

Hi guys,

Is it possible to have this kind of code? how does it behave? will it read the table gt_pos_posted one by one? we're having problem with this since it takes a lot of time. we got a time_out error. Thanks!

SELECT * FROM bseg INTO wa_bseg FOR ALL ENTRIES IN gt_pos_posted

WHERE bukrs = gt_pos_posted-bukrs

AND belnr = gt_pos_posted-belnr

AND gjahr = gt_pos_posted-gjahr

AND buzei = gt_pos_posted-buzei.

IF wa_bseg-shkzg = 'H'.

wa_bseg-menge = wa_bseg-menge * ( -1 ).

ENDIF.

ENDSELECT.

2 REPLIES 2
Read only

Former Member
0 Likes
489

yes, it will read entries one by one, and then you have select.. end select too.

better use select ....into table <...> to do an array fetch into the internal table

Read only

0 Likes
488

Thanks a lot for that quick response!

would you know if there is any sap notes to get rid of this error since this a sap standard program for transaction FBL3N?

Thanks again!