Skip to Content
Author's profile photo Former Member

User exit for Delivery Challan (Duplicate Entry) in MIGO Transaction.

User exit for Delivery Challan (Duplicate Entry) in MIGO Transaction.

By Sagar dev

PURPOSE:

In case we enter the duplicate delivery Challan No from the same vendor in the same physical/financial year, should get error/warning message. In MIGO delivery note not accepted repeated Delivery Challan numbers.

Step by step Solution: 

Go to transaction “CMOD”.

Click On Create Button.

/wp-content/uploads/2013/08/01_266879.png

Define Short Text and Package.

/wp-content/uploads/2013/08/02_266880.png

Enter Name of an SAP enhancement – MBCF0002.

/wp-content/uploads/2013/08/03_266881.png

Click on Components –

/wp-content/uploads/2013/08/04_266888.png

Double Click On – EXIT_SAPMM07M_001.

/wp-content/uploads/2013/08/05_266889.png


Double Click On include zxmbcu02.


We have to implement the code and it will looks like this.

/wp-content/uploads/2013/08/06_266890.png

**&———————————————————————*

**&  Include           ZXMBCU02

**&———————————————————————*

data: yy(4) type c,

xblnr1 type mkpf-xblnr,

bwart1 type mseg-bwart ,

text1 type string ,

ref_goitem type goitem ,

bwart2 type goitem-bwart,

* GOHEAD-LFSNR(15),

ebeln type mseg-ebeln.

“pt_goitem TYPE goitem.

if sy-tcode = ‘MIGO’.

yy = i_mkpf-budat(4).

select single mkpf~xblnr mseg~bwart into (xblnr1 ,bwart1 ) from mkpf inner join mseg on mkpf~mblnr = mseg~mblnr and mkpf~mjahr = mseg~mjahr

where mkpf~mjahr = yy

and mseg~lifnr = i_mseg-lifnr

and mkpf~xblnr = i_mkpf-xblnr

and mseg~bwart = ‘101’.

if sy-subrc = 0.

if i_mseg-bwart = ‘101’ .

MESSAGE ‘Deliver No is already exist’ type ‘E’ .

endif.

endif.

if e_sgtxt is INITIAL.

  e_sgtxt = i_mseg-sgtxt.

endif.

*ref_goitem = pt_goitem.

endif.

Activate the code and exit.





Assigned tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Good one with less explanation 🙂