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

Dynamic table : need support

Former Member
0 Likes
889

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 .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
858

Hi,

Check this link.

It may help u.

6 REPLIES 6
Read only

Former Member
0 Likes
858

Hi!

Please check out the following link.

Regards

Tamá

Read only

Former Member
0 Likes
858

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]

Read only

Former Member
0 Likes
859

Hi,

Check this link.

It may help u.

Read only

Former Member
0 Likes
858

Thanks guys

Read only

former_member224404
Active Participant
0 Likes
858

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

Read only

0 Likes
858

Hi,

I already did it and it`s working. Thanks a lot for your help.