02-03-2015 9:29 AM
Hi,
I want to check if an invoice is already in the system before I can create it with an own dynpro (with reduced fields). The criteria should be vendor, comp_code, ref_doc_no_long. I still need to add the total sum.
Currently I am using the following code (but this will only identify the parked invoices):
select b~belnr into (lv_inv_no) from bkpf as b
inner join vbsegk as v
on v~belnr = b~belnr
and v~bukrs = b~bukrs
where
v~lifnr = lv_vendor_no
and b~bukrs = ls_documentheader-comp_code
and b~xblnr eq ls_documentheader-ref_doc_no_long
and b~blart in ('KD', 'NE')
.
endselect.
Can someone make a suggestion which tables I need to check for the posted documents and the logistic (parked) invoices?
Is it correct to check also the XREVERSAL field and select only those that are empty (and not 1 or 2)?
Regards,
Vanessa
02-03-2015 9:57 AM
Hi Vanessa,
Please Tell me more .
You need to create invoice reference to..?
Thanks.
02-05-2015 7:32 AM
Hi Praveen,
I have an own dynpro to enter data for invoices. That means on the left side I have the invoice (displayed as PDF) and on the right side my fields for the data input.
Now I would like to avoid that this invoice is already processed within the system. Therefore I need to check if the invoices is already entered (based upon the fields company code, vendor, ... ).
I need to check:
- If there is already a parked invoice for this (with or without order)
- if there is already a posted invoice for this (with or without order)
Hope that clearifies things.
Regards, Vanessa
02-05-2015 7:40 AM
Hi Vanessa,
You can pick the data from RBKP/RSEG tables with the fields mentioned above. If you are able to get the data (SY-SUBRC = 0) then there is an Invoice exist with given criteria otherwise No.
Regards,
Vijay
02-06-2015 5:01 AM
02-09-2015 11:23 AM
Hi,
when I get it right this table is for the logistic invoices. How can I identify if the record is deleted/reversed?
Regards, Vanessa