Skip to Content
0
Feb 15, 2019 at 11:19 AM

how to delete character from data in sap?

40 Views

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

FORM read_customer.

SELECT a~kunnr a~spart a~kdgrp a~lifsd a~faksd a~klabc a~zterm
a~kvgr1 a~kvgr2 a~kvgr3 a~kvgr4 a~kvgr5

INTO TABLE TMP1 FROM KNVV AS A
WHERE kunnr IN s_kunnr
AND spart IN s_spart.

LOOP AT tmp1.
SELECT * FROM kna1 WHERE kunnr EQ TMP1-KUNNR
AND ktokd EQ 'ZSLD'.

if sy-subrc = 0.
tmp1-name1 = kna1-name1.
tmp1-aufsd = kna1-aufsd.
tmp1-stcd1 = kna1-stcd1.
tmp1-katr1 = kna1-katr1.
tmp1-katr2 = kna1-katr2.
tmp1-katr3 = kna1-katr3.
tmp1-katr4 = kna1-katr4.
tmp1-katr5 = kna1-katr5.
tmp1-katr6 = kna1-katr6.
tmp1-katr7 = kna1-katr7.
tmp1-katr8 = kna1-katr8.
tmp1-katr9 = kna1-katr9.
tmp1-katr10 = kna1-katr10.
ENDIF.
ENDSELECT.
MODIFY tmp1.
ENDLOOP.

DELETE ADJACENT DUPLICATES FROM tmp1 COMPARING kunnr.

CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
string_in = ld_string_in
IMPORTING
string_out = ld_string_out
htype = ld_htype
. " NUMERIC_CHECK

IF SY-SUBRC EQ 0.
"All OK
ENDIF.

thanks,