Application Development and Automation 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: 
Read only

String conversion

Former Member
0 Likes
679

Hi All,

I have maintained one Z-table for storing the cooments provided by the user in the workflow.

I am storing the comments in the field COMMENTS of the Z-table which is of Char type.

In BOR( ZFIPP2 ), under Zmethod:

DATA: IM_TITLE TYPE SYST-TITLE,

CH_TEXT TYPE T8J_MODIF-CODE OCCURS 0,

CH_TEXT1 TYPE CATSXT_LONGTEXT_ITAB.

IM_TITLE = 'Please Enter the Comments'.

CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'

EXPORTING

im_title = IM_TITLE

IM_DISPLAY_MODE = ' '

IM_START_COLUMN = 10

IM_START_ROW = 10

changing

ch_text = CH_TEXT1.

if sy-subrc <> 0.

else.

SWC_SET_TABLE CONTAINER 'CH_TEXT' CH_TEXT1.

endif.

CALL FUNCTION 'ZFIPP_COMMENTSRRC'

CHANGING

comments = CH_TEXT1

IF SY-SUBRC <> 0.

CH_TEXT1 is of type CATSXT_LONGTEXT_ITAB and commments is of type char, so there is the type mismatch.

Is there any string conversion rule?

Kindly suggest.

Regards,

Sangeeta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
560

Hi,

Do this as a try, but I'm not sure.

Declare another variable like

CH_TEXT2 TYPE CATSXT_LONGTEXT_ITAB.

then

before 'SWC_SET_TABLE CONTAINER 'CH_TEXT' CH_TEXT1'

assign

CH_TEXT2 = CH_TEXT.

Regards,

Manoj Kumar P

3 REPLIES 3
Read only

Former Member
0 Likes
561

Hi,

Do this as a try, but I'm not sure.

Declare another variable like

CH_TEXT2 TYPE CATSXT_LONGTEXT_ITAB.

then

before 'SWC_SET_TABLE CONTAINER 'CH_TEXT' CH_TEXT1'

assign

CH_TEXT2 = CH_TEXT.

Regards,

Manoj Kumar P

Read only

Former Member
0 Likes
560

In FM declare the Comments as "TXLINE".

And inside the FM before storing the Comments data into ur Ztable.

data: char2(72).

move Comments to char2.

then update ur custom table with "Char2 ".

Read only

0 Likes
560

Hi,

Problem not solved, still i am facing the type mismatch runtime error.

Regards,

Sangeeta