Application Development 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: 

"I_RETURN" cannot be converted to a character-type field?

Former Member
0 Kudos

Hi

if not i_schedule_lines[] is initial.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = i_salesdocument

  • ORDER_HEADER_IN =

order_header_inx = i_order_header_inx

  • SIMULATION =

  • BEHAVE_WHEN_ERROR = ' '

  • INT_NUMBER_ASSIGNMENT = ' '

  • LOGIC_SWITCH =

TABLES

return = i_return

  • ORDER_ITEM_IN =

  • ORDER_ITEM_INX =

  • PARTNERS =

  • PARTNERCHANGES =

  • PARTNERADDRESSES =

  • ORDER_CFGS_REF =

  • ORDER_CFGS_INST =

  • ORDER_CFGS_PART_OF =

  • ORDER_CFGS_VALUE =

  • ORDER_CFGS_BLOB =

  • ORDER_CFGS_VK =

  • ORDER_CFGS_REFINST =

schedule_lines = i_schedule_lines

schedule_linesx = i_schedule_linesx

  • ORDER_TEXT =

  • ORDER_KEYS =

  • CONDITIONS_IN =

  • CONDITIONS_INX =

  • extensionin = it_extensionin

.

  • Commit work

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

  • IMPORTING

  • RETURN =

.

write: 20 i_salesdocument, ' changed'.

loop at i_return where TYPE = 'E'.

write: / i_return.

endloop.

endif.

endif. "of document

It's showing the error "I_RETURN" cannot be converted to a character-type field.

How to get rid of this error?

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

data: i_return type BAPIRET2

if you declare it differently then it will throgh that error.

JozsefSzikszai
Active Contributor
0 Kudos

hi,

i_return is a structure and in unicode environment you have to write out each field of the structure separately:

WRITE : i_return-type, i_return-id, i_return-number...

hope this helps

ec

Former Member
0 Kudos

Pravin

You can not get rid of this error as Return table contains the Numeric data (Like Message Number) which you can not simply write using the Table Workarea.

Better, write all the columns individually.. like

write i_return-msgno..

i_return-message..

Thanks

Amol Lohade