Code: Alles auswählen.
FUNCTION ZTEST_KUNDE.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(KUNNR) TYPE KNA1-KUNNR
*" REFERENCE(GLOBALS) LIKE CUOV_00 STRUCTURE CUOV_00
*" EXPORTING
*" REFERENCE(NAME1) TYPE KNA1-NAME1
*" TABLES
*" MATCH STRUCTURE CUOV_01
*" QUERY STRUCTURE CUOV_01
*" EXCEPTIONS
*" FAIL
*" INTERNAL_ERROR
*"----------------------------------------------------------------------
data: fkundenname like cuov_01-atwrt.
data: fkunnr like cuov_01-atwrt.
refresh match.
*..get value of input characteristic KUNDENNR
call function 'CUOV_GET_FUNCTION_ARGUMENT'
exporting
argument = 'KUNDENNR'
importing
sym_val = fkunnr
tables
query = query
exceptions
a rg_not_found = 01.
if sy-subrc <> 0.
raise internal_error.
endif.
*..get NAME1 from KNA1
SELECT single name1 from kna1 into fkundenname
where kunnr eq fkunnr.
*..add result to the table of output characteristics KUNDENNAME
call function 'CUOV_SET_FUNCTION_ARGUMENT'
exporting
argument = 'KUNDENNAME'
vtype = 'CHAR'
sym_val = fkundenname
tables
match = match
exceptions
existing_value_replaced = 01.
ENDFUNCTION.
Code: Alles auswählen.
FUNCTION ZTEST_KUNDE.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(GLOBALS) LIKE CUOV_00 STRUCTURE CUOV_00
*" TABLES
*" MATCH STRUCTURE CUOV_01
*" QUERY STRUCTURE CUOV_01
*" EXCEPTIONS
*" FAIL
*" INTERNAL_ERROR
*"----------------------------------------------------------------------
*{ INSERT DEVK900097 1
data: fkundenname like cuov_01-atwrt.
data: fkunnr like cuov_01-atwrt.
data: fkunnr_char10(10).
data: fkundenname_char35(35).
refresh match.
*..get value of input characteristic KUNDENNR
call function 'CUOV_GET_FUNCTION_ARGUMENT'
exporting
argument = 'KUNDENNR'
importing
sym_val = fkunnr
tables
query = query
exceptions
arg_not_found = 01.
if sy-subrc <> 0.
raise internal_error.
endif.
move fkunnr to fkunnr_char10.
*..call select function
call function 'ZTEST_KUNDE_FUNC'
exporting kunnr = fkunnr_char10
importing name1 = fkundenname_char35
exceptions
existing_value_replaced = 01.
move fkundenname_char35 to fkundenname.
*..add result to the table of output characteristics KUNDENNAME
call function 'CUOV_SET_FUNCTION_ARGUMENT'
exporting
argument = 'KUNDENNAME'
vtype = 'CHAR'
sym_val = fkundenname
tables
match = match
exceptions
existing_value_replaced = 01.
*} INSERT
ENDFUNCTION.
Code: Alles auswählen.
FUNCTION ZTEST_KUNDE_FUNC.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(KUNNR) TYPE KNA1-KUNNR
*" EXPORTING
*" REFERENCE(NAME1) TYPE KNA1-NAME1
*"----------------------------------------------------------------------
*..get NAME1 from KNA1
SELECT single name1 from kna1 into name1
where kunnr eq kunnr.