Reputation: 575
I'm trying to use the 'RV_INVOICE_DOCUMENT_READ' function to get some price data from a bill. Checking the function in the SE37 works fine, it retrieves the data I need. However, when I try to use the function in a smartform, the function returns nothing. This is the code I have:
DATA: LV_VBRK LIKE VBRK.
LV_VBRK-VBELN = VL_VBELN.
DATA:
gs_komv TYPE komv,
gt_komv like komv occurs 0 with header line,
gs_vbpa TYPE vbpavb,
gt_vbpa like vbpavb occurs 0 with header line,
gs_vbrk TYPE vbrkvb,
gt_vbrk like vbrkvb occurs 0 with header line,
gs_vbrp TYPE vbrpvb,
gt_vbrp like vbrpvb occurs 0 with header line.
CALL FUNCTION 'RV_INVOICE_DOCUMENT_READ'
EXPORTING
KONV_READ = 'X'
VBRK_I = LV_VBRK
TABLES
xkomv = gt_komv
xvbpa = gt_vbpa
xvbrk = gt_vbrk
xvbrp = gt_vbrp.
When I check gt_komv, it contains zero records, but when in the SE37 it returns 28 records. What am I doing wrong?
Upvotes: 0
Views: 858