* VBAP-zzfield = xxxx-zzfield2.
*{ INSERT D01K900270 1
*Customer table that contains the order type list. if the order type which
*you are creating includes in this talbe, production will be blocked untill
*you relase it manually.
TABLES: ZABGRU.
*Just only for order creatation,this User Exit would be launched.
CASE VBAK-VKORG.
WHEN '6000'.
CASE VBAK-AUART.
WHEN 'ZCS'.
IF VBAP-PSTYV = ''.
VBAP-PSTYV = 'ZTAN'. "ItCa
ENDIF.
"VBAP-WERKS = '1200'. "Plant
IF VBAP-LGORT = ''.
"VBAP-LGORT = 'TE02'. "Location
ENDIF.
WHEN 'ZSTO'.
" VBAP-PSTYV = 'ZSTO'.
VBAP-WERKS = '1200'.
VBAP-VSTEL = '1200'.
VBAP-LGORT = 'HK01'.
WHEN 'ZFRE'.
VBAP-WERKS = '6000'. "Plant
VBAP-LGORT = 'TE05'. "Location
* WHEN 'ZCS3'.
* VBAP-PSTYV = 'ZTAS'. "ItCa
* VBAP-WERKS = '6000'. "Plant
WHEN 'ZFDS'.
VBAP-WERKS = '1200'. "Plant
VBAP-LGORT = 'HK01'. "Only for testing
ENDCASE.
IF SY-TCODE = 'VA01'.
VBAP-ABGRU = '00'.
ENDIF.
WHEN '1200' OR '1000' OR '900' OR '910'.
IF SY-TCODE = 'VA01'.
SELECT SINGLE * FROM ZABGRU WHERE AUART = VBAK-AUART.
IF SY-SUBRC = 0.
VBAP-ABGRU = '00'.
ENDIF.
ENDIF.
ENDCASE.