01-08-2008 6:45 PM
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.
01-08-2008 6:49 PM
Privya,
I see no INSERT, APPEND, or MODIFY into internal Table po_emp_tab_tbl in your code.
01-08-2008 6:52 PM
1. structure for both l_emp_tab_str and po_emp_tab_tbl are different.
2. move one by one field to dest. structure.
3. check whether data is populating in the l_emp_tab_str .
4. as well as in int. table pi_it0001_tbl.
5. u defined the stru. for po_emp_tab_tbl as a work area.
wheterh it should be work area or table?
if its table, define table type
01-08-2008 6:59 PM
Hi Priya,
You are not appending the values of the Work Area to the Internal tables, after moving the values from one work area to the other Work Area.Use APPEND <Internal table> statement after moving the values from one WA to the other WA.
Ramana