04-23-2012 2:16 PM
Hi,
I have to remove certain fields for some conditions from Incompletion log of Sales order which is populated by SAP.
The fields are mentioned in the In completion procedure, but for certain conditions I should remove them
from incompletion log even though they are blank. Is there any BADI/ user exit which can allow me
to remove the fields from incompletion log even they are blank.
Tammy
04-23-2012 3:06 PM
You should not simply remove the fields from XVBUV table. What you need to do is:
For Header incompletion, implement code in USEREXIT_CHECK_VBAK in MV45AFZB
PERFORM xvbuv_loeschen_vor_pruefen(sapfv45f) USING posnr_low
etenr_low
'VBAK '.
CALL FUNCTION 'RV_CHECK_DOCUMENT_INPUT'
EXPORTING
fehgr = tvak-fehgr
vbxx_wa = vbak
tbnam = 'VBAK'
dialog = 'X'
dia_visible = charx
TABLES
vbuv_dia = dvbuv
vbuv_tab = xvbuv
vbuv_last = hvbuv.
If your incompletion fields are at line item level, implement the similar logic in USEREXIT_CHECK_VBAP. Implement the code wrt to VBAP to update XVBUV.
Regards,
Naimesh Patel
04-23-2012 3:06 PM
You should not simply remove the fields from XVBUV table. What you need to do is:
For Header incompletion, implement code in USEREXIT_CHECK_VBAK in MV45AFZB
PERFORM xvbuv_loeschen_vor_pruefen(sapfv45f) USING posnr_low
etenr_low
'VBAK '.
CALL FUNCTION 'RV_CHECK_DOCUMENT_INPUT'
EXPORTING
fehgr = tvak-fehgr
vbxx_wa = vbak
tbnam = 'VBAK'
dialog = 'X'
dia_visible = charx
TABLES
vbuv_dia = dvbuv
vbuv_tab = xvbuv
vbuv_last = hvbuv.
If your incompletion fields are at line item level, implement the similar logic in USEREXIT_CHECK_VBAP. Implement the code wrt to VBAP to update XVBUV.
Regards,
Naimesh Patel
04-24-2012 7:03 PM
Hi,
I have written code to delete the record from XVBUV internal table for a field in one of exit routine(subroutine) in program MV45AFZB.
It has properly updated the incompletion log and has removed record from the log, after saving vbuv table was properly updated.
I am not getting what is purpose of calling subroutine xvbuv_loeschen_vor_pruefen(sapfv45f)
and function module 'RV_CHECK_DOCUMENT_INPUT' after deleting the record from XVBUV internal table.
Could you clear my doubt.
Tammy
04-24-2012 7:41 PM
Hi Tammy,
I dont think you will have to call 'RV_CHECK_DOCUMENT_INPUT' for this requirement. As you did, updating the XVBUV table by deleting the entries will be fine for you. But as Patel have mentioned, this funtion module, I believe is to keep a check on the errors if any for the incompletion log. In the same way the sub routine that he has mentioed will be doing the deletion part from the internal tables.
Sam.
04-24-2012 11:48 PM
RV_CHECK_DOCUMENT_INPUT makes sure that document determines proper incompletions based on content of your Fields. If you update the values for any of the incompletion related field, you should call the FM to make sure your XVBUV reflects what you have in your fields.
Regards,
Naimesh Patel