‎2007 Apr 30 11:04 AM
can anyone help ....
this is the part of code showing run time error....can anyoune help me find what the problem is??
START-OF-SELECTION.
<b>SELECT pernr</b> "<b>the error is at this line</b>
werks
persg
persk
INTO TABLE it_pa0001
FROM pa0001
WHERE pernr EQ p_pernr
AND begda < sy-datum
AND endda > sy-datum.
*get data from PA0002
IF it_pa0001 IS NOT INITIAL.
SELECT pernr
nachn
vorna
gesch
gbdat
famst
perid
INTO TABLE it_pa0002
FROM pa0002
FOR ALL ENTRIES IN it_pa0001
WHERE pernr = it_pa0001-pernr
AND begda < sy-datum
AND endda > sy-datum.
ENDIF.
IF it_pa0001 IS NOT INITIAL.
SELECT pernr
stras
ort01
pstlz
locat
state
telnr
INTO TABLE it_pa0006
FROM pa0006
FOR ALL ENTRIES IN it_pa0001
WHERE pernr = it_pa0001-pernr
AND begda < sy-datum
AND endda > sy-datum
AND anssa = '1'.
ENDIF.
IF it_pa0001 IS NOT INITIAL.
SELECT pernr
begda
event
INTO TABLE it_pa0378
FROM pa0378
FOR ALL ENTRIES IN it_pa0001
WHERE pernr = it_pa0001-pernr
AND begda < sy-datum
AND endda > sy-datum.
ENDIF.
end-of-selection.
IF p_pchk EQ 'X' and p_pres eq 'X'.
LOOP AT it_pa0002 INTO w_pa0002.
CLEAR w_final_par.
move values from IT_PA0002
w_final_par-pernr = w_pa0002-pernr.
w_final_par-perid = w_pa0002-perid.
w_final_par-nachn = w_pa0002-nachn.
w_final_par-vorna = w_pa0002-vorna.
w_final_par-gesch = w_pa0002-gesch.
w_final_par-gbdat = w_pa0002-gbdat.
read address values from IT_PA0006
READ TABLE it_pa0006 INTO w_pa0006 WITH KEY pernr = w_pa0002-pernr.
IF sy-subrc = 0.
move fields from IT_PA0006
w_final_par-stras = w_pa0006-stras.
w_final_par-ort01 = w_pa0006-ort01.
w_final_par-pstlz = w_pa0006-pstlz.
w_final_par-state = w_pa0006-state.
w_final_par-locat = w_pa0006-locat.
ENDIF.
APPEND w_final_par TO it_final_par.
read address values from IT_PA0378
READ TABLE it_pa0378 INTO w_pa0378 WITH KEY pernr = w_pa0002-pernr.
IF sy-subrc = 0.
move fields from IT_PA0378
w_final_par-event = w_pa0378-event.
w_final_par-famst = w_pa0378-famst.
w_final_par-begda = w_pa0378-begda.
ENDIF.
APPEND w_final_par TO it_final_par.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = pass_file_path
TABLES
data_tab = it_final_par
EXCEPTIONS
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
ULINE.
WRITE:/5 text-008,28 p_pfile.
ENDIF.
ENDIF.
‎2007 Apr 30 11:14 AM
Use -
SELECT pernr werks persg persk
INTO TABLE it_pa0001
FROM pa0001
WHERE pernr EQ p_pernr
AND begda <= sy-datum
AND endda >= sy-datum.
Assuming table IT_PA0001 has only these 4 fields and in the following order only.
Regards,
Amit
‎2007 Apr 30 11:10 AM
Hi,
Check if the sequence of the fields in it_pa0001 and the field list you have written your select statement are the same..
or u can use
SELECT pernr "the error is at this line
werks
persg
persk
INTO corresponding fields of TABLE it_pa0001
FROM pa0001
WHERE pernr EQ p_pernr
AND begda < sy-datum
AND endda > sy-datum
santhosh
‎2007 Apr 30 11:12 AM
try this way...
SELECT pernr "the error is at this line
werks
persg
persk
INTO <b>corresponding fields of</b> TABLE it_pa0001
FROM pa0001
WHERE pernr EQ p_pernr
AND begda < sy-datum
AND endda > sy-datum.
‎2007 Apr 30 11:14 AM
Use -
SELECT pernr werks persg persk
INTO TABLE it_pa0001
FROM pa0001
WHERE pernr EQ p_pernr
AND begda <= sy-datum
AND endda >= sy-datum.
Assuming table IT_PA0001 has only these 4 fields and in the following order only.
Regards,
Amit
‎2007 Apr 30 11:48 AM
thankx Santhosh , Ramesh and thankx Amit....
all that worked to overcome the runtime error but now the error showing up is
<b>ERROR calling data provide</b>
message no. FES011
(Blank output screen)
Is there any problem with the data retreival code or something else???
‎2007 Apr 30 2:03 PM
This error is due to wrong values in GUI_DOWNLOAD FM.
Check the path you are passing, it should be physical path and also for local drive only.
Regards,
Amit