on 07-07-2015 9:00 AM
Dear Experts,
We have used user exit ZXMBCU02 to avoid delivery note duplication while doing transaction MIGO.
In which user is not allowed to make duplicate entries for delivery note number i.e. if "xyz" delivery note number is used once, then it should not be allowed again in any financial year.
Now we want to allow the user to make duplicate delivery note entry if the delivery note no. is used in previous financial year. i.e. if delivery note no "abc" is used in FY 2014 it should be allowed to enter in FY 2015.
Kindly guide as what changes needs to be done in ZXMBCU02 or is there any other user exit for this requirement.
Regards,
Arpit R
Hi ,
What is the current code you are using to check if that delivery not no has been used or not.
Just Put the GJAHR MJAHR check also in your where clause in the select statement.
We will be able to help you more if we can see what code are you using to restrict the user from using the same delivery Note no in ZXMBCU02.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Skip the MJAHR check and Just keep the GJAHR check. like below.
if i_mseg-bwart <> '161'.
yy = i_*mkpf-budat(4).
select single mkpf~xblnr MSEG~GJAHR mseg~bwart into (xblnr1,GJAHR,bwart1 )
from mkpf inner join mseg on mkpf~mblnr = mseg~mblnr and mkpf~mjahr = mseg~mjahr
where mseg~gjahr = i_mseg-gjahr
*and mkpf~mjahr = yy
and mseg~lifnr = i_mseg-lifnr
and mkpf~xblnr = i_mkpf-xblnr
and mseg~bwart = '103'.
if sy-subrc = 0.
mesage here.
endif.
Hi Gaurav,
It is working only for same purchase order & not working in case of different purchase orders. i.e. if the delivery note is used in the same PO before its not allowing it to use the same again in same PO.
But we want to give the error for all the delivery notes in same financial year.
Here is the code :
if sy-tcode = 'MIGO'.
select single mkpf~xblnr MSEG~GJAHR mseg~bwart into (xblnr1,GJAHR,bwart1 )
from mkpf inner join mseg on mkpf~mblnr = mseg~mblnr and mkpf~mjahr = mseg~mjahr
where mseg~gjahr = i_mseg-gjahr
and mseg~lifnr = i_mseg-lifnr
and mkpf~xblnr = i_mkpf-xblnr
and mseg~bwart = '103'.
if sy-subrc = 0.
MESSAGE 'Deliver No is already exist' type 'E' .
ENDIF.
endif.
*endif.
*endif.
**
*if e_sgtxt is INITIAL.
***
* e_sgtxt = i_mseg-sgtxt.
* endif.
*ref_goitem = pt_goitem.
*endif.
Please guide me.
Regards,
Arpit R
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.