IT WORK/SAP FI and ABAP

[ABAP] Add space(s) at the end of string 문자열 끝에 공백 추가하기

Bathildis 2023. 2. 13. 15:15
반응형
DATA: LV_STR   TYPE STRING,
      LV_SPACE TYPE SYCHAR02.

CLEAR: LV_STR, LV_SPACE.
LV_STR = 'ABC'.

WRITE: / LV_STR.

CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP(
  EXPORTING
    UCCP = '00A0'
  RECEIVING
    CHAR = LV_SPACE
).

CONCATENATE LV_STR LV_SPACE INTO LV_STR.

WRITE: / LV_STR.

 

 

출력 (Output)

ABC
ABC 
반응형