Skip to Content
0
Former Member
Jan 08, 2008 at 06:45 PM

Could you check this code ??

13 Views

Hi Guyz,

Here is my piece of code.

FORM get_infotype_data TABLES pi_it0001_tbl TYPE t_it0001_tbl

pi_emp_info_tbl TYPE t_emp_info_tbl

pi_event_dates_tbl TYPE t_event_dates_tbl

po_emp_tab_tbl TYPE t_emp_tab_tbl.

DATA: l_it0001_tbl TYPE t_it0001_tbl,

l_it0001_str TYPE t_it0001_str,

l_emp_info_tbl TYPE t_emp_info_tbl,

l_emp_info_str TYPE t_emp_info_str,

l_event_dates_str TYPE t_event_dates_str,

l_emp_tab_tbl TYPE t_emp_tab_tbl,

l_emp_tab_str TYPE t_emp_tab_str.

SORT: pi_it0001_tbl BY pernr,

pi_emp_info_tbl BY pernr,

pi_event_dates_tbl BY pernr.

LOOP AT pi_it0001_tbl INTO l_it0001_str.

READ TABLE pi_emp_info_tbl

WITH KEY pernr = l_it0001_str-pernr BINARY SEARCH.

IF sy-subrc = 0 .

  • clear l_emp_info_str.

MOVE: l_emp_info_str-perid TO l_emp_tab_str-perid,

l_emp_info_str-gbdat TO l_emp_tab_str-gbdat.

CASE l_emp_info_str-gesch.

WHEN '1'.

MOVE 'M' TO l_emp_tab_str-gesch.

WHEN '2'.

MOVE 'F' TO l_emp_tab_str-gesch.

ENDCASE.

ENDIF.

READ TABLE pi_event_dates_tbl WITH KEY pernr = l_it0001_str-pernr

BINARY SEARCH.

IF sy-subrc = 0.

MOVE: l_event_dates_str-betrg TO l_emp_tab_str-betrg.

ENDIF.

MOVE l_emp_tab_str TO po_emp_tab_tbl.

ENDLOOP.

ENDFORM. " get_infotype_data

I am not getting any data in to the table po_emp_tab_tbl.

After rwading the table, Getting sy-subrc = 0.

Please help me.