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

why is it that some function module require an endselect

Former Member
0 Likes
662

why is it that some function module require an endselect and some can work without the endselect...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
611

if u does't use table and into key words.the endselect function will coming

into the picture.

5 REPLIES 5
Read only

Former Member
0 Likes
611

Hi!

All FM-s require an ENDMODULE command.

ENDSELECT is only needed, when there is within the FM a SELECT command present, without an INTO keyword. This requires ENDSELECT.

Regards

Tamá

Read only

Former Member
0 Likes
611

Hi,

The difference is in fetching the data.

Select

....

Endselect. is an obsolete one. Here inbetween select and endselect you can do some calculations or manupulations.

Where as select is the new thing which will dirctly store the fetched data in to internal table or fields.

It is nothing to do with the function modules.

Reward if helpful.

Read only

Former Member
0 Likes
611

HI,

Endselect is required if you are using... one of this.

1) u r using UP TO 1 ROWS options with ur select

2) ur selecting a field list from a table into a work area...

it got nothing to do with the function module...

Thanks

Mahesh

Read only

Neslinn
Participant
0 Likes
611

hi,

If the result of the selection is meant to be a table, the data is usually (for further information, see INTO -Klausel ) read line by line within a processing loop introduced by SELECT and concluded by ENDSELECT . For each line read, the processing passes through the loop once. If the result of the selection is meant to be a single record, the closing ENDSELECT is omitted.

The FROM source clause the source (database table or view ) from which the data is to be selected. It also determines

the type of client handling,

the behavior for buffered tables and

the maximum number of lines to be read.

After ENDSELECT , SY-DBCNT contains the total number of lines read.

The return code value is set as follows:

SY-SUBRC = 0 At least one line was read.

SY_SUBRC = 4 No lines were read.

SY-SUBRC = 8 The search key was not fully qualified.

(nur bei SELECT SINGLE ). The returned single record is any line of the solution set.

Select..enselect is obsolete..Dont use tht..

Reward if this helps...

Regards,

Neslin.

Read only

Former Member
0 Likes
612

if u does't use table and into key words.the endselect function will coming

into the picture.