*&---------------------------------------------------------------------*
*& Module F4_WASH INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_WASH INPUT.
data it_ZTWTYP like ZTWTYP occurs 0 with header line .
data: disp.
data wa_wash type string.
refresh it_ZTWTYP.
select * into table it_ZTWTYP
from ZTWTYP.
loop at it_ZTWTYP.
helptab = it_ZTWTYP-ZZWTYP.
append helptab.
helptab = it_ZTWTYP-DESCRIPTION.
append helptab.
endloop.
refresh ihelp_fields.
ihelp_fields-tabname = 'ZTWTYP'.
ihelp_fields-fieldname = 'ZZWTYP'.
ihelp_fields-selectflag = ''.
append ihelp_fields.
ihelp_fields-tabname = 'ZTWTYP'.
ihelp_fields-fieldname = 'DESCRIPTION'.
ihelp_fields-selectflag = 'X'.
append ihelp_fields.
describe table helptab lines sy-tfill.
check sy-tfill > 0.
* F4 - Hilfe Anzeigen
call function 'HELP_VALUES_GET_WITH_TABLE'
exporting
display = disp
fieldname = 'DESCRIPTION'
tabname = 'ZTWTYP'
importing
select_value = wa_wash
tables
fields = ihelp_fields
valuetab = helptab.
wash = CHEMICAL GARMEN #####
I don't know why happen this result ?
DATA: new TYPE string .
condense wa_wash.
CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
EXPORTING
intext = wa_wash
IMPORTING
outtext = new
EXCEPTIONS
invalid_codepage = 1
codepage_mismatch = 2
internal_error = 3
cannot_convert = 4
fields_not_type_c = 5.
new = CHEMICAL GARMEN .....
wa_wash = new.
replace all occurrences of '.' in wa_wash with ' ' IN CHARACTER MODE .
condense wa_wash.
WA_ZSD_GARMENT_PRT2-ZWASH_MTD = wa_wash.
ENDMODULE. " F4_WASH INPUT