Skip to Content
0
Former Member
Jun 04, 2008 at 02:32 PM

Userexit for Delivery

65 Views

Hi Gurus,

I have one requirement as below,

1) For Inter-company sales process, if the transfer price is missing in the sales order, a warning message should be displayed.

Warning message should be displayed at the time of delivery creation also.

for above Sales order functionality i have writeen the code as below. it is working fine for the sales order.

IF SY-TCODE EQ u2018VA01u2019.

IF VBAK-VBTYP EQ u2018Cu2019.

SELECT SINGLE BUKRS

FROM T001K

INTO W_BUKRS1

WHERE BWKEY EQ VBAP-WERKS.

IF SY-SUBRC EQ 0.

SELECT SINGLE BUKRS

FROM TVKO

INTO W_BUKRS1

WHERE VKORG EQ VBAK-VBKORG

IF W_BUKRS1 NE W_BUKRS2

SELECT SINGLE KBETR

FROM KOMV

INTO W_KBETR

WHERE KSCHL EQ ZTP9 OR

KSCHL EQ ZTP8.

IF IS W_KBETR INITIAL..

MESSAGE W000(XX) u201C Warning message triggerdu201D.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

at delivery level komv is not populating, how to solve this problem, at delivery level.