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

How to retrieve data without using Select statement

Former Member
0 Likes
2,709

hi guys,

does anyone know if there's a standard bapi to retrieve the data from a given table?

I can't use Select statement and it will cause an error since I'm using a variable for the tablename.

Points for helpful ideas.

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,789

Use the function RFC_READ_TABLE to read any table.

Regards

Ravi

6 REPLIES 6
Read only

Former Member
0 Likes
1,790

Use the function RFC_READ_TABLE to read any table.

Regards

Ravi

Read only

0 Likes
1,789

Thanks Ravikumar, that helps.

Can I convert this (DATA table on RFC_READ_TABLE) into a separate fields? I am using CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE that creates a dynamic table based on a number of fieldnames of p_table. And I already have an internal table for p_table = PA0001. The problem is to get the data that I got from RFC_READ_TABLE and trasfer into ref_table.

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE

EXPORTING

IT_FIELDCATALOG = lt_fcat

IMPORTING

EP_TABLE = ref_table.

Read only

0 Likes
1,789
Read only

Former Member
0 Likes
1,789

Hi,

which table do you want to read data from,

you have FM's through which you can read data,

E.g. READ_KNA1,READ_VBUK etc...

check out in SE37.

Regards,

Raghavendra

Read only

Former Member
0 Likes
1,789

assume <b>t_text</b> as the variable

read_vbak where ... (give condition)

In this, whole record for the current condition will retrieve. then u can use it.

Read only

Former Member
0 Likes
1,789

Thanks guys!