‎2006 Nov 13 11:29 AM
Hellow I doing this select and I have a dump of runtime error
SELECT objid begda endda
FROM hrp1001
INTO TABLE b_itab
FOR ALL ENTRIES IN z_course_table
WHERE objid = z_course_table-objid
AND otype = z_course_table-otype
AND plvar = '01'
AND relat = '020'
AND rsign = 'B'
AND begda <= sy-datum
AND endda => sy-datum.
This is my declare of b_itab
TYPES: BEGIN OF 2_itab,
objid TYPE hrobjid,
sobid TYPE sobid,
begda TYPE begdatum,
endda TYPE enddatum,
priox TYPE priox,
END OF 2_itab.
DATA: b_itab TYPE TABLE OF 2_itab,
wa_b_itab LIKE LINE OF b_itab.
And z_course table is declare in tables in function module
This is the messege
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In a SELECT access, the read file could not be placed in the target
field provided.
Either the conversion is not supported for the type of the target field,
the target field is too small to include the value, or the data does not
have the format required for the target field.
‎2006 Nov 13 11:33 AM
hi,
change like this.
SELECT objid begda endda
FROM hrp1001
INTO <b>corresponding fields of</b> TABLE b_itab
FOR ALL ENTRIES IN z_course_table
WHERE objid = z_course_table-objid
AND otype = z_course_table-otype
AND plvar = '01'
AND relat = '020'
AND rsign = 'B'
<b>AND begda LE sy-datum
AND endda GE sy-datum.</b>
rgds
anver
‎2006 Nov 13 11:31 AM
check may be this is problem
SELECT objid begda endda
FROM hrp1001
INTO <b>corresponding fields of </b> TABLE b_itab
FOR ALL ENTRIES IN z_course_table
WHERE objid = z_course_table-objid
AND otype = z_course_table-otype
AND plvar = '01'
AND relat = '020'
AND rsign = 'B'
<b>AND begda =< sy-datum
AND endda >= sy-datum</b>.
kishan negi
null
‎2006 Nov 13 11:33 AM
hi,
change like this.
SELECT objid begda endda
FROM hrp1001
INTO <b>corresponding fields of</b> TABLE b_itab
FOR ALL ENTRIES IN z_course_table
WHERE objid = z_course_table-objid
AND otype = z_course_table-otype
AND plvar = '01'
AND relat = '020'
AND rsign = 'B'
<b>AND begda LE sy-datum
AND endda GE sy-datum.</b>
rgds
anver
‎2006 Nov 13 11:33 AM
change the TYPES declaration to:
This is my declare of b_itab
TYPES: BEGIN OF 2_itab,
objid TYPE hrobjid,
begda TYPE begdatum,
endda TYPE enddatum,
<b>sobid TYPE sobid,</b>
priox TYPE priox,
END OF 2_itab.
this should solve your problem.
Note: Award points for helpful answers.
‎2006 Nov 13 11:37 AM
check this one..
<b>SELECT * FROM hrp1001
INTO corresponding fields of TABLE b_itab
FOR ALL ENTRIES IN z_course_table
WHERE objid = z_course_table-objid
AND otype = z_course_table-otype
AND plvar = '01'
AND relat = '020'
AND rsign = 'B'
AND begda <= sy-datum
AND endda => sy-datum.</b>
‎2006 Nov 13 11:37 AM
Check the field type for z_course_table-objid
Is it the same as HRP1001-objid?
Also, since your declaration has sobid for b_itab, use that too in the select of add 'INTO CORRESPONDING FIELDS' .
‎2006 Nov 13 11:39 AM
Hi sh_tal,
i think your select-statement must be expendet form
SELECT objid begda endda
to this
SELECT objid<b> sobid</b> begda endda
Hope it helps.
Regards, Dieter
‎2006 Nov 13 11:40 AM
Hi
In select statement you are not selecting the data in the order you declared in the declaration and also you r not selecting all the data, if you dont want to select all the data give into correspoding fields of table b_itab :
SELECT objid begda endda
FROM hrp1001
INTO <b>coresponding fields of table</b> b_itab
or change the order of declaration of table like this:
TYPES: BEGIN OF 2_itab,
objid TYPE hrobjid,
<b>begda TYPE begdatum,
endda TYPE enddatum,</b>
sobid TYPE sobid,
priox TYPE priox,
END OF 2_itab.
Regards
Haritha