In the first generation enhancement .The head of program is at beginning of user exits.
We demonstrate it by sales order
1. How to enhance in th va01
When we create sales order, we need check PO number.

2. How to find enhancement spot
In the spro we can find it

we find the to explain document.

When we click porgramme or go to the vmod , we may modify code in the form.


4 Example
The enhancement is in the vl02n.
DATA:LT_ZTMM129 LIKE TABLE OF ZTMM129,
LW_ZTMM129 LIKE LINE OF LT_ZTMM129.
DATA:LSTRING TYPE CHAR50.
data:lt_XLIPS like TABLE OF XLIPS,
LW_XLIPS LIKE LINE OF lt_XLIPS .
* DATA:R_UCOMM TYPE SY-UCOMM.
*
*
* R_UCOMM = SY-UCOMM.
*
* CHECK R_UCOMM = 'WABU_T'.
if LIKP-LFART = 'NLCC' .
SELECT * FROM ZTMM129 INTO CORRESPONDING FIELDS OF TABLE LT_ZTMM129.
LOOP AT XLIPS INTO LIPS.
MOVE-CORRESPONDING XLIPS TO LW_XLIPS.
check LW_XLIPS-BWART = '643' .
CHECK LT_ZTMM129 IS NOT INITIAL.
READ TABLE LT_ZTMM129 INTO LW_ZTMM129 WITH KEY WERKS = LW_XLIPS-WERKS
LGORT = LW_XLIPS-LGORT TRANSPORTING NO FIELDS.
CHECK SY-SUBRC = 0 .
CONCATENATE LW_XLIPS-WERKS LW_XLIPS-LGORT '不允许做643移动类型出库!'INTO LSTRING.
MESSAGE LSTRING TYPE 'E'.
CLEAR: LW_XLIPS.
ENDLOOP.
endif.
4 Summary
1.The advantage is that it is easy for changing code. The weakness is that when you update the SAP and the code is lost.
2.MV50AFZ1 spro . We can serach it in the sap community. And you confirm if it is right.
3. you can find it by se80 or vmod or spro(usage).
4. we can use standard data directly.
5. we use ‘/H’ and read standard button 's name.
6 we can use bapi. and don’t clear standard work area.

1182

被折叠的 条评论
为什么被折叠?



