Skip to Content
0

distinguish invoice details in table EKBE when the documents are posted with Mov Type 103 and 105

Jan 14, 2017 at 02:21 PM

277

avatar image

hello all,

With selection screen (PO Number),

i have developed a report to display (Goods Receipt data for a PO) like PO no, PO item ,Mat doc No, Qty , amount etc...like below,

this data i obtained from table EKBE by passing EBELN where field VGABE = '2'.

now my question is when an end user selects invoice details i tried to display invoice data

corresponding to that particular Mat Doc No,

for this i passed Ref Mat Doc No to EKBE -LFBNR

*code snippet

 loop at it_ekbe into wa_ekbe WHERE lfbnr eq wa_mat1-lfbnr and lfpos eq wa_mat1-lfpos      and vgabe eq '2'. 

 APPEND wa_ekbe to it_mat_inv.

 endloop.

my problem is,

in EKBE table the invoice data (i.e VGABE = 2) is stored with Ref Mat Doc No =

5000002680

the invoice details are stored with ref doc no for Movement type = 103,

so i could not distinguish whether the invoice belongs to first record(in first screen shot m1) or second or third record,

as all invoices are stored with same ref doc no (that is with mat doc no of movement type -103)..

is there any way i could distinguish these items ...

do i need to refer any other tables ..

thanks in advance..

m1.jpg (91.6 kB)
m2.jpg (106.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Jürgen L
Jan 14, 2017 at 03:42 PM
0

from the pure logic of a process flow does your vendor send you a bill for the material which he delivered to you.

Your vendor does not know whether you post his delivery with a one step receipt to 2 step receipt. So it is basically up to your internal process and you could just look over the shoulder of your accounting folks how they post the invoice and which reference they use.

As you see from the data itself is the reference of both 105 movements against the material document from the 103 movement, and the invoice is as well referenced to the 103 movement, so you just do not have any link from the invoice to the 105 movement.

What do you need to distinguish here? both invoices reference the complete receipt quantity, the first seems to be the invoice for the goods, the second probably freight costs (see field BEWTP)

It is not known for us from the screenshots how much was received with 103 and why there are two 105 movements.

Also it is not known whether you have GR based Invoice verification

Share
10 |10000 characters needed characters left characters exceeded
VINAY REDDY Jan 15, 2017 at 02:16 PM
0

hi jurgen,

thanks for your reply,

as shown in (m1.jpg) image, initially there was a blocked stock(mov type =103) with qty 40,

then it was took into Store by move type = 105(GR from blocked stock) out of qty = 40,

39 were taken with mat doc no =5000003371 and the rest one qty with mat doc no = 500005041.

Now my question is when the end user selects invoice details link in image (m1.jpg), i tried to display invoice corresponding to that Mat doc No,

however all the three are stored with same ref document in table EKBE..(i.e ref doc no = 5000002680), they did not stored with

mat doc no =5000003371 and mat doc no = 500005041, as shown in below screen shot..

please can you clarify on this.


m2.jpg (106.7 kB)
Share
10 |10000 characters needed characters left characters exceeded
Jürgen L
Jan 16, 2017 at 05:38 AM
0

first of all I see nowhere 40.

I only see 39 with movement 105 and another 105 with 1 and 39 for the invoice and another 39 for the subsequent debit ((BEWTP = N)

Your user made probably a mistake in the entry, he posted a subsequent debit for 39 instead of an invoice for 1

Share
10 |10000 characters needed characters left characters exceeded
VINAY REDDY Jan 16, 2017 at 06:36 AM
0

hi jurgen,

considering the user has not made any mistake

that means the subsequent debit BEWTP = N and invoice BETWP = Q, both posted for record 2(i.e mat doc no :

5000003371) in image m1.jpg,

that means we need to check table EKBE based on field MENGE also ,

regards,

vinay.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

how would you do that? as you can see the subsequent debit was posted with 39 quantity, how would you get from 39 to 1? also you did not yet answer whether you use GR based Invoice verification

0
VINAY REDDY Jan 17, 2017 at 09:41 AM
0

hi jurgen,

yes we do use GR based invoice verification

Share
10 |10000 characters needed characters left characters exceeded