How to customize the incompletion log ?
Simple customizations possible in incompletion log are given below.
For full fledged SAP SD Training or for other SAP Training please visit Magna Training.
- I wanted to make the submitted date and time (Additional data B-> MAHDT(date) and BSTZD(time)) mandatory only for Quotations (ZQT) and sales orgs (USXX/CAYY). This cannot be achieved through incompletion log configuration. The core piece of code is highlighted. The rest of it is validations.
- The basic structure for customizing incompletion log is XVBUV
- The code is as follows in the user exit USEREXIT_CHECK_VBAK
- IF ( vbak-mahdt IS INITIAL
OR vbak-bstzd IS INITIAL ).
IF ( vbak-vkorg = 'USXX'
OR vbak-vkorg = 'CAYY' )
AND vbak-auart = 'ZQT'
AND sy-tcode = 'VA21'.
IF vbak-mahdt IS INITIAL.
read table xvbuv with key fdnam = 'MAHDT'.
if sy-subrc <> 0.
XVBUV-MANDT = SY-MANDT.
XVBUV-VBELN = VBAK-VBELN.
XVBUV-POSNR = '000000'.
XVBUV-ETENR = '0000'.
XVBUV-TBNAM = 'VBAK'.
XVBUV-FDNAM = 'MAHDT'.
if vbak-auart = 'ZQT'.
XVBUV-FEHGR = '90'.
endif.
XVBUV-STATG = '01'.
XVBUV-FCODE = 'KZKU'.
XVBUV-SORTF = '9999'.
XVBUV-LFDNR = '0000'.
APPEND XVBUV.
FORCE_UPDATE = 'X'.
endif.
else.
read table xvbuv with key fdnam = 'MAHDT'.
if sy-subrc = 0.
delete xvbuv where fdnam = 'MAHDT'.
endif.
endif.
clear xvbuv.
IF vbak-bstzd IS INITIAL.
read table xvbuv with key fdnam = 'BSTZD'.
if sy-subrc <> 0.
XVBUV-MANDT = SY-MANDT.
XVBUV-VBELN = VBAK-VBELN.
XVBUV-POSNR = '000000'.
XVBUV-ETENR = '0000'.
XVBUV-TBNAM = 'VBAK'.
XVBUV-FDNAM = 'BSTZD'.
if vbak-auart = 'ZQT'.
XVBUV-FEHGR = '90'.
endif.
XVBUV-STATG = '01'.
XVBUV-FCODE = 'KZKU'.
XVBUV-SORTF = '9999'.
XVBUV-LFDNR = '0000'.
APPEND XVBUV.
FORCE_UPDATE = 'X'.
endif.
else.
read table xvbuv with key fdnam = 'BSTZD'.
if sy-subrc = 0.
delete xvbuv where fdnam = 'BSTZD'.
endif.
endif.
clear xvbuv.
ELSE.
ENDIF.
ENDIF
1 comment:
Hi,
Thank you for your post. It is nice to visit your site.
SAP SD Training in Hyderabad
Post a Comment