‎2009 Dec 15 11:24 AM
Hi experts,
I`m creating a method to check absence/overtime records.
In fact, In my import param, i have the pernr, the INFTYP, , begda and endda and wanna select the employee record in this dynamic table. I still have errors. CAn you check please ?
*****************
DATA : return_enq TYPE bapireturn1,
return_deq TYPE bapireturn1.
DATA: w_tabname TYPE w_tabname,
w_dref TYPE REF TO data,
p_table(5) TYPE c.
CONCATENATE `P` im_req-infty INTO p_table.
FIELD-SYMBOLS: <t_itab> TYPE ANY TABLE .
w_tabname = p_table.
CREATE DATA w_dref TYPE TABLE OF (w_tabname).
ASSIGN w_dref->* TO <t_itab>.
SELECT * FROM (w_tabname) INTO TABLE <t_itab> WHERE begda = im_req-begda AND endda EQ im_req-endda AND pernr = im_req-pernr .
‎2009 Dec 15 1:12 PM
‎2009 Dec 15 12:59 PM
‎2009 Dec 15 1:04 PM
Hi,
check the below link for creating dynamic internal tbale.
[http://wiki.sdn.sap.com/wiki/display/Snippets/DynamicInternalTable]
[http://wiki.sdn.sap.com/wiki/display/Snippets/Creatingadynamicinternaltablebasedon+data]
‎2009 Dec 15 1:12 PM
‎2009 Dec 15 2:26 PM
‎2009 Dec 15 2:26 PM
Hi kraiem,
I copied your code snippet and executed and found one problem. You are concatenating 'P' to infotype to resove the table name. But I think you need to concatenate 'PA' to infotype to achieve this. I changed it to my program and the select query was successful.
Hope it helps.
Thanks,
Mainak
‎2009 Dec 15 2:30 PM
Hi,
I already did it and it`s working. Thanks a lot for your help.