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

hr outbound interface.....run time error in code!!!!

Former Member
0 Likes
818

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.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
754

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

5 REPLIES 5
Read only

Former Member
0 Likes
754

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

Read only

Former Member
0 Likes
754

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.

Read only

amit_khare
Active Contributor
0 Likes
755

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

Read only

Former Member
0 Likes
754

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???

Read only

0 Likes
754

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