2013 Dec 19 11:24 AM
Hello All ,
I need to implement a check while creating MIGO.
While doing MIGO at header level there is a Excise Invoice tab , this TAB appears if we check Item OK check box and also the Material is Excisable.
Now my company's MM consultant want a check to implemented such that whenever user enters a value for Excise Invoice the system should check whether Chapter ID has been maintained for that Material or not.
I had check all MIGO related BADIs like MB_DOCUMENT_BADI , MB_CHECK_LINE_BADI but no use , reason being Excise Updation is carried out separately using FM J_1IEXGM_UPDATE_EXCISE.
So I tried to Implicitly Enhance the FM but it shows DUMP reason being its an UPDATE TASK FM.
Also tried to Implicitly Enhance the Tab Screen Excise Invoice's PAI ( SAPLJ1IEXGM , LJ1IEXGMPAI. ) but can't find any point to write my code.
2013 Dec 19 12:43 PM
Hi,
Include : LJ1IEXGMPAI
You can implement the implicit enhancement here and validate the code !
observe the validations in the form and do same to idnetify the chapter ID for excise invoice.
Example.
CALL FUNCTION 'ENQUEUE_EJ_1IEX'
EXPORTING
mode_j_1iexchdr = 'E'
mode_j_1iexcdtl = 'E'
mandt = sy-mandt
trntyp = gs_exhead-trntyp
docyr = gs_exhead-docyr
docno = gs_exhead-docno.
2013 Dec 19 12:03 PM
Have you checked BADI "MB_MIGO_BADI"? Please go through its documentation and see if it helps.
Regards
2013 Dec 19 12:13 PM
Very Thanks netweaver developer for your prompt reply ,
Sorry for not mentioning that ,
Yeah I had tried that BADI as well.
Problem is that Excise Updation is carried out separately using FM J_1IEXGM_UPDATE_EXCISE , where it updates all the Excise registers and it has nothing to do with MIGO updation , that's the reason we are not able to get Excise details in these MIGO related BADI's.
Got 2-3 points where Data from Excise Invoice tab is transferred to this FM , but was not able to find a point where I can place my code. ( Implicit Enhancement spot )
2013 Dec 19 12:23 PM
Hi Sijin
Can you please provide us what is the screen number on which this field is there and program name. I would have searched in PAI for some implicit enhacnement
Nabheet
2013 Dec 19 12:30 PM
Hi Nabheet,
just checking, please find the details below.
Rg, Kiran
2013 Dec 19 12:36 PM
2013 Dec 19 12:32 PM
Hi,
Please check the following 2 EXIT FM they are with CIN 2.0
J_1I7_MIGO_SAVE
J_1I7_MIGO_DEFAULT
Exception handling is not there, bu try it should work.
Regards
2013 Dec 19 12:39 PM
2013 Dec 19 1:17 PM
Hello Yakub ,
At first sight I thought FM J_1I7_MIGO_SAVE would do.
But there is an issue .
In table CT_PART1 we can get Excise Register updation data ( Material Code , Movement type etc )
But Plant is not there.
And in CT_EXCDTL table I am getting the Excise Invoice entered.
So only the Plant is the main concern here , and its the main thing.
Actually what I need to check is that whether Chapter ID has been maintained for the material or not .
Chapter ID is maintained using MATNR - WERKS combination using J1ID tcode.
Your answer was almost close
2013 Dec 19 1:19 PM
2013 Dec 19 1:38 PM
2013 Dec 19 2:24 PM
Hello Yakub ,
In FM J_1I7_MIGO_DEFAULT ,
there is an internal table CT_EXITEM where I am getting all data except the Excise Number which I am providing as input.
But while debugging I found that while doing MIGO for Excisable goods only this FM triggers which was my concern ( my code should not interrupt MIGO for non excisable goods ) and for the same only I was checking the condition Excise Invoice IS NOT INITIAL .
Test case is giving me positive results will discuss the same with Function Guy tomm and reply.
Very thanks for this suggestion Yakub
2013 Dec 20 5:08 AM
2013 Dec 20 5:44 AM
Hi Sijin
Can you please put a break point in J_1IEXGM_BADI_STATUSANDHEADER function module and check whether you have all values available here..? If yes you can implement your logic here i believe.
Jus an addtional info the function module is getting called via BADI MB_MIGO_BADI implementation CIN_PLUG_IN_TO_MIGO
Nabheet
2013 Dec 19 12:43 PM
Hi,
Include : LJ1IEXGMPAI
You can implement the implicit enhancement here and validate the code !
observe the validations in the form and do same to idnetify the chapter ID for excise invoice.
Example.
CALL FUNCTION 'ENQUEUE_EJ_1IEX'
EXPORTING
mode_j_1iexchdr = 'E'
mode_j_1iexcdtl = 'E'
mandt = sy-mandt
trntyp = gs_exhead-trntyp
docyr = gs_exhead-docyr
docno = gs_exhead-docno.
2013 Dec 19 1:00 PM
Yeah kiran ,
From this point I can get Excise Num from structure GS_EXHEAD , but I can't access MIGO line item details here .
For this I need to use EXPORT IMPORT MEM id technique.
EXPORT it to MEM ID .
and later write my code in any of the MIGO Badi .
I was looking for a point where I can get both Excise num and Material Doc line items at the same point.
Anyways will try to workout and reply you.
2013 Dec 19 1:07 PM
I believe you will have to use import export only and then proceed since i donot find any gloabl data here.
Nabheet
2013 Dec 19 1:45 PM
Yeah nabheet ,
Things are making me conclude the same ,
But still I believe that there may be a point somewhat like that Yakub suggested and J_1IEXGM_UPDATE_EXCISE where we can evaluate Excise Register Entries before they are posted into registers like RGPart 1.
Enhancement in this FM are giving dumps while execution.
2013 Dec 20 6:41 AM
AT LAST .
I am sticking with the IMPORT EXPORT technique.
Am EXPORTING Excise number from INCLUDE LJ1IEXGMPAI .
And Later IMPORTING it to MB_CHECK_LINE_BADI's method CHECK_LINE.
And placed my code there.
Very thanks for all of yours contributions and time.
Your support really helped me to think from different angles .
2013 Dec 20 6:50 AM
Good to know that, I also stop the checking right place for validation
Rg, Kiran
2013 Dec 20 7:26 AM