Skip to Content
0
Former Member
Apr 09, 2008 at 07:45 AM

Casting error...

15 Views

Hi All,

Thers a method that has only one parameter:

it_guids importing type BBP_T_SUS_GUIDS

Till now it_guids was having only one record but now we need to process multiple record so

we need to LOOP at it_guids for processing all records in this internal table .

for that i defined a workarea in this method:

data: wa_guids like line of it_guids .

within this method , another method is called:

IF it_guids IS NOT INITIAL.

loop at it_guids into wa_guids .

lo_app ?= application.

CREATE OBJECT : lo_services,

lo_dnload_text.

CALL METHOD lo_dnload_text->build_text_stream

EXPORTING

it_doc_guid = it_guids

IMPORTING

er_sus_u_services = lo_services

et_messages = lt_messages.

endloop.

when i try to replace the exporting parameter it_guids in the method

lo_dnload_text->build_text_stream , i get a syntax error wa_guids is not type compitable with formal

parameter it_doc_guid .

it_doc_guid is also of type BBP_T_SUS_GUIDS .

My question is since wa_guids and it_guids are of the same line type then why am i getting this syntax error .

How can i solve this error.

Regards,

Vikky.