Loading
ABAP : Implicitly Enhancement Point
Restricting To Update Vendor Number In MIGO for cross company purchase order
Requirement
We had a requirement that ………..
When doing the initial Goods Receipt of a purchased or subcontracted good, the vendor field on the batch master (MCH1-LIFNR) should be populated with the relevant vendor number.
If this batch at a later stage is once more part of a Goods Receipt – by a cross company purchase order, the vendor field should NOT be updated. The initial vendor number should be kept.
Suppose A: Vendor for company ABC and B and C are plant for ABC.
Suppose Plant B of ABC has order one material from A , in that case in MCH1 table , A will be updated as Vendor .
If the same material will be transferred from B to C , as per SAP standard , in MCH1 B will be updated as vendor which is not correct .
Due to that we have implemented the implicit enhancement to restrict the vendor field updation while running 2nd time MIGO.
For Example: Follow the below screen shots
0000100366 The vendor already exists in the system
The purchase order 4500074509 for the vendor 100366
Performing 1st time Migo (while doing Migo we are putting the Vend
or batch and system automatically selecti
ng the HLU batch)
2nd look at table MCH1
Here No changes in the vendor field
Performing 2nd time Migo (while doing Migo we are directly putting the HLU batch not the vendor batch)
3rd look at table MCH1
Solution:
For this requirement we tried to find Exit , BADI but we could not find the suitable one for our requirement , so we had to finally opt for Implicit Enhancement .
For this We have to debug the standard transaction MIGO in Update debugging mode to find out the standard program, which has the implicit enhancement point to implement the same.
In Update Debugging mode ,based on table MCH1(because vendor number is updated in this table for our requirement) we found out
Include Program LMBMMF00 , you can find the FORM UPDATE_MCH1 .
*---------------------------------------------------------------------*
* FORM UPDATE_MCH1 *
*---------------------------------------------------------------------*
* Die Attribute in MCH1 werden fortgeschrieben. *
*---------------------------------------------------------------------*
FORM update_mch1.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form UPDATE_MCH1, Start A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 Z_LMBMMF00. "
DATA: L_LIFNR TYPE ELIFN.
LOOP AT XMCH1.
SELECT SINGLE LIFNR FROM MCH1 INTO L_LIFNR
WHERE MATNR = XMCH1-MATNR
AND CHARG = XMCH1-CHARG.
IF SY-SUBRC = 0.
XMCH1-LIFNR = L_LIFNR.
MODIFY XMCH1.
ENDIF.
ENDLOOP.
ENDENHANCEMENT.
*$*$-End
Note:
After going to FORM UPDATE_MCH1 , how to find out and create implicit enhancement.
In that screen , go to menu and click show implicit enhancement.
Click on the sun sign symbol , all will be yellow color u find , according your requirement
Go to context menu , create implicit enhancement option will come create it and write your code and activate.
This entry was posted on Friday, July 15, 2011 at 11:52 PM. You can follow any responses to this entry through the RSS 2.0. You can leave a response.
- No comments yet.