cancel
Showing results for 
Search instead for 
Did you mean: 

Withholding tax not displayed in VIM

sfloret
Explorer
0 Kudos
2,550

I have a problem that occurs intermittently and with this I can not find out the reason when trying to do the simulation.

When documents are being processed via OCR in background to be made available in the VIM, the vendor's withholding tax accounting (table LFBW) are not loaded into the /OPT/VIM_WHTAX table.

Other documents processed for this same vendor are not a problem. Sometimes within a sequence of documents from the same vendor, one of them does not load the

information.

After the data is in the VIM, if you clear the vendor code field in VIM_WP and inform again, the withholding tax is loaded correctly.

If I incompletely record the information for the VIM and then access the VIM_WP to complete, the information is also loaded correctly.

I believe the problem is only occurring in background processing (ICC -> VIM), but I'm not sure which program or function I should check / debug to be able to figure out the problem.

Thank you.

View Entire Topic
sfloret
Explorer
0 Kudos

Depending on the version of VIm, the solution found was to put a routine in the first VIM rule, common to all documents, that evaluated the table /opt/vim_whtax and included the tax codes if it was empty.

Below excerpt that was included:

SELECT SINGLE docid
FROM /opt/vim_whtax
INTO ls_docid
WHERE docid = indexer->index_header-docid.

IF sy-subrc IS NOT INITIAL.
CALL FUNCTION '/OPT/VIM_RETRIEVE_WHT'
* EXPORTING
* IV_NO_UPDATE =
TABLES
index_lines = lt_lines[]
ewh_tab = lt_ewh[]
cwh_tab = lt_cwh[]
CHANGING
index_data = indexer->index_header.
ENDIF.