‎2007 Dec 08 6:19 AM
How can we pass the value to the data object given type as XSTRING?
‎2007 Dec 09 10:23 AM
You can pass the values normally - as the rest of the data types.
The data just needs to be in the right format - XSTRING.
If they are not You can use for conversion FM's f.e.:
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT =
* MIMETYPE = ' '
* ENCODING =
* IMPORTING
* BUFFER =
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'HR_KR_STRING_TO_XSTRING'
EXPORTING
* CODEPAGE_TO = '8500'
UNICODE_STRING =
* OUT_LEN =
* IMPORTING
* XSTRING_STREAM =
* EXCEPTIONS
* INVALID_CODEPAGE = 1
* INVALID_STRING = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2007 Dec 09 10:23 AM
You can pass the values normally - as the rest of the data types.
The data just needs to be in the right format - XSTRING.
If they are not You can use for conversion FM's f.e.:
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT =
* MIMETYPE = ' '
* ENCODING =
* IMPORTING
* BUFFER =
* EXCEPTIONS
* FAILED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'HR_KR_STRING_TO_XSTRING'
EXPORTING
* CODEPAGE_TO = '8500'
UNICODE_STRING =
* OUT_LEN =
* IMPORTING
* XSTRING_STREAM =
* EXCEPTIONS
* INVALID_CODEPAGE = 1
* INVALID_STRING = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.