ABAP顾问
分类:
2008-05-30 10:06:32
FUNCTION z_sh_exit_debia.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" REFERENCE(SHLP) TYPE SHLP_DESCR_T
*" REFERENCE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----------------------------------------------------------------------
DATA: wa LIKE LINE OF shlp-fielddescr ,
len type i ,
tmpkunnr LIKE kna1-kunnr .
IF callcontrol-step = 'DISP'.
READ TABLE shlp-fielddescr INTO wa WITH KEY fieldname = 'KUNNR'.
IF sy-subrc = 0 .
len = wa-offset / 2 . "UNICODE系统
LOOP AT record_tab.
tmpkunnr = record_tab-string+len(wa-leng) .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = tmpkunnr
IMPORTING
output = tmpkunnr.
AUTHORITY-CHECK OBJECT 'Z_VA01_VAG'
ID 'KUNNR' FIELD tmpkunnr
ID 'ACTVT' DUMMY.
IF sy-subrc <> 0.
DELETE record_tab.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDFUNCTION.