代码如下
代码语言:javascript复制*---------------------------------------------------------------------*
* FORM USEREXIT_MOVE_FIELD_TO_LIKP *
*---------------------------------------------------------------------*
* This userexit can be used to move some fields into the *
* delivery header workaerea LIKP. *
* This form is called, when a header is created *
* This form is called at the end of form LIKP_FUELLEN. *
* *
*---------------------------------------------------------------------*
FORM USEREXIT_MOVE_FIELD_TO_LIKP.
*{ INSERT ECDK904748 1
DATA : LV_USERID TYPE ZBC001-USEID.
IF T180-TRTYP = 'H'.
GET PARAMETER ID 'USEID' FIELD LV_USERID.
IF LV_USERID IS NOT INITIAL AND LIKP-USEID IS INITIAL.
LIKP-USEID = LV_USERID.
ENDIF.
ENDIF.
*} INSERT
* LIKP-zzfield = xxxx-zzfield2.
ENDFORM.
本意就是在创建交货单抬头信息的时候则会自动赋值(事务代码:VL01N),这种情况还可以用到这样一种情况下面。
比如我们做了交货单的抬头增强,抬头中几个字段是不可编辑的,每次默认存入某些值,也在增强中写好了处理逻辑,但是会有这样一种情况,要是不去点击“附加信息”页签,这部分逻辑不会自动处理,也就不会自动存入某些值,那么,在这种情况下,上面这个方法就派上用场了。