Skip to Content
author's profile photo Former Member
Former Member

how can i modify dynamic table ?

i sow here exmple of working with dynamic table

but i didnt find any example of modify .

most of the example is like :

select * into table <dyn_table>

from (p_table).

but i need to do like (example):

SELECT SINGLE BUDAT USNAM FROM MKPF

INTO (<dyn_table>-BUDAT , <dyn_table>-USNAM )

WHERE MBLNR = IT_YMM_ST_TNUOT_MLY-MBLNR

AND MJAHR = IT_YMM_ST_TNUOT_MLY-MJAHR

AND BUDAT IN SL_BUDAT .

i get message that i cant do it .

how can i do it ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2006 at 10:21 AM

    u cant do like that,

    u have to do it by using assign component.

    declare

    tables: mkpf.

    field-symbols: <fs> type any, <fs1> type any.

    select single budat usnam from mkpf where mjahr = ....

    and budat in sl_budat.

    assign component budat of structure <dyn_table> to <fs>.

    <fs> = mkpf-budat.

    assign component usnam of structure <dyn_table> to <fs1>.

    <fs1> = mkpf-usnam.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2006 at 10:19 AM

    Hi,

    You cannot do this because the fields of the dynamic table varies.You are trying to specify fields along with a dynamic table which is not possible.

    Regards

    Sunil.M

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.