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

Fetching data based on Dynamic internal

Former Member
0 Likes
517

Hi All,

I have a requiement of creating an internal table dynamically. once this is dynamic table is loaded with values, i need to fetch the data from EKKO based on this dynamic internal table

I'm getting " the specified type has no structure and therefore no component called 'EBELN'" error when I'm trying with below code

SELECT EBELN BSART FROM EKKO INTO TABLE LT_EKKO

FOR ALL ENTRIES IN <all_table>

WHERE EBELN = <all_table>-EBELN.

please help me in to fetch the data based on this dynamic internal table

Thanks

Lucky

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
477

Our friend Suhas once asked the same question. You can go through it

2 REPLIES 2
Read only

Former Member
0 Likes
477

Hello ,

Why you cant use LOOP based argumans. Check this ,


FIELD-SYMBOLS : <EBELN>.
DATA: LF_FIELD(30).

LOOP AT <DYN_TAB> INTO <DYN_WA>.

    CLEAR LF_FIELD.
    MOVE '<dyn_wa>-ebeln' TO LF_FIELD.
    ASSIGN (LF_FIELD) TO <EBELN>.

SELECT SINGLE EBELN BSART FROM EKKO INTO TABLE LT_EKKO
WHERE EBELN = <EBELN>.

....

I think it would be a little more slowly. But it will work.

I'll hope its help you,

Best Regards,

İrfan MATAK

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
478

Our friend Suhas once asked the same question. You can go through it