‎2007 Aug 08 2:40 PM
why is it that some function module require an endselect and some can work without the endselect...
‎2007 Aug 08 3:33 PM
if u does't use table and into key words.the endselect function will coming
into the picture.
‎2007 Aug 08 2:45 PM
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á
‎2007 Aug 08 2:55 PM
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.
‎2007 Aug 08 2:57 PM
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
‎2007 Aug 08 3:29 PM
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.
‎2007 Aug 08 3:33 PM
if u does't use table and into key words.the endselect function will coming
into the picture.