Skip to Content
0
Feb 26, 2021 at 07:48 AM

Update UUID text in accounting document while posting Invoice from VIM Open Text Solution

184 Views

Hello All,

We are using VIM (Vendor Invoice Management) solution to process and post the document electronically.

But it is not updating the accounting document text with the YUUD field from /OPT/VIM_1HEAD table.

I have used the logic as below in the BAPI - /OPT/VIM_52_BAPI_DOCLINES_PO to update the text in accounting document but still it is not updating.

 lv_yuud,
 lv_awkey.

CONCATENATE lv_belnr lv_gjahr INTO lv_awkey.

SELECT bukrs belnr gjahr
 FROM bkpf
 UP TO 1 ROWS
 INTO (lv_bukrs_b, lv_belnr_b, lv_gjahr_b)
 WHERE awkey EQ lv_awkey.
 endselect.

IF sy-subrc = 0.
 CLEAR lv_tdname1.
 CONCATENATE lv_bukrs_b lv_belnr_b lv_gjahr_b
 INTO lv_tdname1.

SELECT SINGLE yuud
 FROM rbkp
 INTO lv_yuud
 WHERE belnr EQ lv_belnr
 AND gjahr EQ lv_gjahr.

IF sy-subrc = 0.
 CLEAR lty_tline.
 lty_tline-tdline = lv_yuud.
 APPEND lty_tline TO lt_tline.

CALL FUNCTION 'CREATE_TEXT'
 EXPORTING
 fid = lc_yuud
 flanguage = lc_flang   "S
 fname = lv_tdname1     "YUUD
 fobject = lc_tdobject  "BELEG
 save_direct = lc_save  "X
 tables
 flines = lt_tline
 exceptions
 no_init = 1
 no_save = 2
 others = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
 ENDIF.

Please suggest any solution as i am new to Open Text VIM solution.

Thanks,

Kumar

Attachments

accounting-text.jpg (204.6 kB)