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

Dump....

Former Member
0 Likes
1,417

hi,

when i am trying to do this...

read table i_infstr index 1.

select * from (i_infstr-gentab)

into table <v_value>

where vbeln = s_vbeln.

it's going for a dump as The types of the operands "dbtab" and "itab" are not mutually convertible.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,387

Make sure that the TYPE associated with <v_value> is the same as the TYPE of the value of i_infstr-gentab.

Regards,

Rich Heilman

15 REPLIES 15
Read only

Former Member
0 Likes
1,387

This is a Unicode error. What is the def of the internal table?

Read only

alex_m
Active Contributor
0 Likes
1,387

Select must be for database table not internal table.

select * from<b> (database table like VBAP)</b>

into table <v_value>

where vbeln = s_vbeln.

Reward Points.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,388

Make sure that the TYPE associated with <v_value> is the same as the TYPE of the value of i_infstr-gentab.

Regards,

Rich Heilman

Read only

0 Likes
1,387

hi rich,

the field i_infstr-gentab is char30, at runtime this field gets a table name.

so i am trying to select from the table which the field i_infstr-gentab holds at runtime, into <v_value>.

chandrasekhar,

im still getting that dump even after changing it to field-symbols: <v_value> type standard table.

Read only

0 Likes
1,387

Can you post the rest of your code?

Regards,

RIch Heilman

Read only

0 Likes
1,387

hi,

select aind_str1~archindex

aind_str1~itype

aind_str1~otyp

aind_str1~object

aind_str2~active

aind_str2~gentab

from aind_str1 inner join aind_str2

on aind_str1~archindex = aind_str2~archindex

into table i_infstr

where object = 'SD_VBRK'

and aind_str1~archindex = v_infstr "Z_SD_VBRK

and aind_str1~itype = 'I'

and aind_str1~otyp = 'O'

and aind_str2~active = 'X'.

if not i_infstr[] is initial.

read table i_infstr with key archindex = v_infstr.

endif.

select * from dd03l into table it_dd03l

where tabname = i_infstr-gentab.

if sy-subrc <> 0.

message i001 with 'Cannot Create the Table'.

leave program.

endif.

loop at it_dd03l.

clear ls_fieldcat.

ls_fieldcat-row_pos = 0.

ls_fieldcat-col_pos = it_dd03l-position.

ls_fieldcat-fieldname = it_dd03l-fieldname.

ls_fieldcat-tabname = '1'.

ls_fieldcat-datatype = it_dd03l-datatype.

ls_fieldcat-reptext = 'Type'.

ls_fieldcat-outputlen = it_dd03l-leng.

ls_fieldcat-coltext = 'Type'.

ls_fieldcat-key = it_dd03l-keyflag.

ls_fieldcat-emphasize = 'C010'.

append ls_fieldcat to gt_fieldcatalog.

endloop.

call method cl_alv_table_create=>create_dynamic_table

exporting it_fieldcatalog = gt_fieldcatalog

importing ep_table = d_ref1 .

assign d_ref1->* to <v_value>.

********************************

read table i_infstr index 1.

select * from (i_infstr-gentab)

into table <v_value>

where vbeln = s_vbeln.

Read only

0 Likes
1,387

Please try this..........

select * from (v_table)
            into corresponding fields of table <v_value>
                          where vbeln IN s_vbeln.

if S_VBELN is a select-option, make sure that you use the IN operator instead of the =.

Regards,

Rich Heilman

Message was edited by:

Rich Heilman

Read only

0 Likes
1,387

HI RICH,

v_table?? how do i declare this??

im sorry its p_vbeln a parameter.

Read only

0 Likes
1,387

Sorry.... that was for my testing...... try this.

select * from (i_infstr-gentab)
       into corresponding fields of  table <v_value>
                                        where vbeln = s_vbeln.

Regards,

Rich Heilman

Read only

0 Likes
1,387

hi,

the select was successful but later when i try to do this

clear: v_object_cnt, v_duprec, v_read_cnt, v_reload_cnt.

read table i_infstr index 1.

create data dref2 type (i_infstr-gentab).

assign dref2->* to <wa>.

*

loop at <v_value> into <wa>.

assign component 'VBELN' of structure <wa> to <vbeln>.

assign component 'ARCHIVEKEY' of structure <wa> to <archivekey>.

assign component 'ARCHIVEOFS' of structure <wa> to <archiveofs>.

i_archkey-vbeln = <vbeln>.

i_archkey-arch_key = <archivekey>.

i_archkey-arch_offset = <archiveofs>.

append i_archkey.

clear i_archkey.

its giving another dump as UC_OBJECTS_NOT_CONVERTIBLE

Read only

0 Likes
1,387

Which statement is it dumping at?

Regards,

Rich Heilman

Read only

0 Likes
1,387

at the stmt.

loop at <v_value> into <wa>.

Read only

0 Likes
1,387

Can you please try...........

<b>

create data dref2 like line of <v_value>
assign dref2->* to <wa>.

</b>

loop at <v_value> into <wa>.

assign component 'VBELN' of structure <wa> to <vbeln>.
assign component 'ARCHIVEKEY' of structure <wa> to <archivekey>.
assign component 'ARCHIVEOFS' of structure <wa> to <archiveofs>.

......

Regards,

RIch Heilman

Read only

0 Likes
1,387

hi rich,

thaaaaaannnnnnnxxxxxxxxx a lottttttt...

please can u look into my another thread and help me resolve this....

Read only

Former Member
0 Likes
1,387
how did udeclare <v_value>?? declare like this and check out...

field-symbols : <v_value> type standard table.

and also in where condition  ,  where vbeln in s_vbeln.