Skip to Content

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

need help

Hi all,

When I am executing the below code I am gettgin the error like

"W_TOTAL_RECORDS" must be a character-type data object (data type C, N,

D, T or STRING). field string).

How to resolve .

DATA :LW_SUCCESS_RECORDS LIKE SY-TFILL,

LW_ERROR_RECORDS LIKE SY-TFILL,

LW_TOTAL_REC(100),

LW_SUCCESS_TEXT(100),

LW_ERROR_TEXT(100).

LW_SUCCESS_RECORDS = W_COUNT.

LW_ERROR_RECORDS = W_TOTAL_RECORDS - LW_SUCCESS_RECORDS.

CONCATENATE 'The Total Number of records:' W_TOTAL_RECORDS INTO

LW_TOTAL_REC.

CONCATENATE 'The Number of Success records:' LW_SUCCESS_RECORDS INTO

LW_SUCCESS_TEXT.

CONCATENATE 'The Number of Error records:' LW_ERROR_RECORDS INTO

LW_ERROR_TEXT.

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT_LO'

EXPORTING

TITEL = 'Update statistics '

TEXTLINE1 = LW_TOTAL_REC

TEXTLINE2 = LW_SUCCESS_TEXT

TEXTLINE3 = LW_ERROR_TEXT

START_COLUMN = 15

START_ROW = 6.

regards,

Aj

Tags:
Former Member
Former Member replied
"you may get same error for other fields also.
"so try to define 3 character fields like
DATA : w_records TYPE char5,
       s_records TYPE char5,
       e_records TYPE char5.


lw_success_records = w_count.
lw_error_records = w_total_records - lw_success_records.

"assign values to correpsonding fields
w_records = w_total_records.
s_records = lw_success_records.
e_records = lw_error_records.
"Then cahnge your statements like this.

CONCATENATE 'The Total Number of records:' w_records INTO
lw_total_rec SEPARATED BY space.

CONCATENATE 'The Number of Success records:' s_records INTO
lw_success_text SEPARATED BY space.

CONCATENATE 'The Number of Error records:' e_records INTO
lw_error_text SEPARATED BY space.

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