cancel
Showing results for 
Search instead for 
Did you mean: 

Update UUID text in accounting document while posting from VIM

0 Kudos

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
fname = lv_tdname1
fobject = lc_tdobject
save_direct = lc_save
tables
flines = lt_tline
exceptions
no_init = 1
no_save = 2
others = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

If anyone has done this on VIM please help me out.

Thanks

Kumar

Accepted Solutions (0)

Answers (0)