3 Replies Latest reply: Jun 21, 2010 12:46 PM by Sumodh P RSS

error: type of ... cannot be converted to the type of ...

Rekha Panicker
Currently Being Moderated

hi i have a query..

in the program ...

 

data : lt_secresid     TYPE  /sapapo/om_resid_tab,

      lt_sec_res      TYPE /sapapo/pt_secres_tab.

 

 

CALL FUNCTION '/SAPAPO/RRP_PT_RES_GET_SECRES'

  EXPORTING

    iv_simid   = '000'

    it_resid   = 'GxAp7t6MCllX00002X5EvG'

  IMPORTING

    et_sec_res = lt_sec_res.

 

lt_secresid = lt_sec_res

 

i get an error ..the type of lt_secresid cannot be converted to the type of lt_sec_res.

how 2 overcome this error ??

 

Moderator message: please use more descriptive subject lines from now on (subject adjusted).

 

Edited by: Thomas Zloch on Jun 21, 2010 1:30 PM

  • Re: general
    Sumodh P
    Currently Being Moderated

    Hi,

     

    See in the code itself you can cleary understand that the type of both are different. To over come this use the move-corresponding statment.

     

    itab1 = itab2 .( your stmt).

     

    The above statement needs to replace with

    move-corresponding itab2 to itab1.

     

    With Regards,

    Sumodh.P.

    • Re: general
      Rekha Panicker
      Currently Being Moderated

      REPORT  Z_1480178.

       

      data : lt_secresid     TYPE  /sapapo/om_resid_tab,

            lt_sec_res      TYPE /sapapo/pt_secres_tab.

       

       

      CALL FUNCTION '/SAPAPO/RRP_PT_RES_GET_SECRES'

        EXPORTING

          iv_simid   = '000'

          it_resid   = 'GxAp7t6MCllX00002X5EvG'

        IMPORTING

          et_sec_res = lt_sec_res.

       

      move-corresponding lt_sec_res to lt_secresid.

       

      changed the code as follows...

      but still get the error lt_sec_res is not a structure or internal table with header line

Actions