Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Convert SY-SUBRC to a String (character type).

Hello

Im just starting with ABAP and I've come to a silly problem. I want to use the SY-SUBRC into a log line and I don't know how to use it in a CONCATENATE sentece.

Im trying this:

IF SY-SUBRC <> 0.

CONCATENATE 'Error(' SY-SUBRC ')creating HTTP CLIENT for URL' LW_URI INTO LW_AuxStr.

me->log->logerror_string( LW_AuxStr ).

RAISE EXCEPTION TYPE ZCX_HTTP_ERROR.

ENDIF.

But it wont work because of this error: SY-SUBRC must be a character-type data object....

How can I convert an Integer type into a String type?

Thanks!

Tags:
replied

You could declare a character or string variable and just do

var = sy-subrc.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question