08-05-2011 5:38 PM
Hi All,
I have used the USEREXIT_CHECK_VBAK to check for incompletion log in sales order.
I am able to successfully manipulate the incompletion log using XVBUV[] table.
When I click the 'Incompletion log' button from Edit or press 'save' in VA01 the code gets executed successfully.
But when the 'Edit next data' button is clicked the code does not navigate to the USEREXIT_CHECK_VBAK nor USEREXIT_CHECK_VBAP. Even after the fill the correct entry in the partner tab in sales order, unless I press the save or go back and press the 'incompletion log' button, the entry populated by me in the table XVBUV[] does not get removed.
Where do I need to do the coding so that, the entry from XVBUV can be cleared, when the user enters the correct details in the Partners tab.
I have added a field to RV45A_UV structure and maintained the same in the OVA2 transaction to appear as incompletion log entry.
Please help me to solve this issue.
08-06-2011 4:59 AM
08-08-2011 8:12 AM
If entry is found and it is invalid entry
IF lv_invalid_partner = lc_x "'X'
AND lv_valid_partner IS INITIAL.
Appending the entries to incompletion table
lwa_vbuv-mandt = sy-mandt.
lwa_vbuv-parvw = lc_en. "'EN'.
lwa_vbuv-tbnam = lc_tbnam2. "'RV45A_UV'.
lwa_vbuv-fdnam = lc_fdnam2. "'ZZEUPARTNER'.
lwa_vbuv-fehgr = lc_fehgr. "'Z3'.
lwa_vbuv-statg = lc_statg. "'01'.
lwa_vbuv-fcode = lc_fcode1. "'KPAR_SUB'.
lwa_vbuv-sortf = lc_sortf. "'9999'.
lwa_vbuv-lfdnr = lc_lfdnr. "'0'.
Appending the work area entry to XVBUV
APPEND lwa_vbuv TO xvbuv.
I have configured the entry corresponding to RV45A_UV in the transaction OVA2.
06-30-2014 11:01 AM
Hi Joeseph,
you can use the solution from this post:
The incomplete check can be done by Function module RV_CHECK_DOCUMENT_INPUT in USER_EXIT_CHECK_VBAP/VBAK/....
It's important to reset the XVBUV table before calling the FM like in J's solution:
Quote: <<
perform xvbuv_loeschen_vor_pruefen(sapfv45f) using rv45a_uv-posnr
etenr_low
'RV45A_UV'.
call function 'RV_CHECK_DOCUMENT_INPUT'
exporting
fehgr = tvap-fehgr
vbxx_wa = rv45a_uv
tbnam = 'RV45A_UV'
dialog = us_dialog
tables
vbuv_tab = xvbuv.
>>