Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

need logic for VBREVE table data fetching

Former Member
0 Likes
2,183

Hi all,

i am fetching the Data from VBREVE table. I have a sales Document which is Invoiced and then reversed and again Invoiced.

So, in the VBREVE table i have 3 line items.

example:

VBELN POSNR BDJPOPER WRBTR RVAMT

0010000063 000010 2008009 192,00- 0,00

0010000063 000010 2008009 192,00 0,00

0010000063 000010 2008009 192,00- 192,00-

i have similar kind of sales orders. i am taking VBELN , POSNR , BDJPOPER , WRBTR , RVAMT into one table. and in that table i don't want to take the lines which are invoiced and again reversed

0010000063 000010 2008009 192,00- 0,00

0010000063 000010 2008009 192,00 0,00.

i want to take only the line 0010000063 000010 2008009 192,00- 192,00-

How to do that.

Thanks

Kamala.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,564

There must be a field in this table which has the indicator for reversal and the document number for which the reversal is being done.

Check the fields like Originating Document, Follow on Doc, Reversal Indicator in ur table.

Hi all,

i am fetching the Data from VBREVE table. I have a sales Document which is Invoiced and then reversed and again Invoiced.

So, in the VBREVE table i have 3 line items.

example:

VBELN POSNR BDJPOPER WRBTR RVAMT

0010000063 000010 2008009 192,00- 0,00

0010000063 000010 2008009 192,00 0,00

0010000063 000010 2008009 192,00- 192,00-

i have similar kind of sales orders. i am taking VBELN , POSNR , BDJPOPER , WRBTR , RVAMT into one table. and in that table i don't want to take the lines which are invoiced and again reversed

0010000063 000010 2008009 192,00- 0,00

0010000063 000010 2008009 192,00 0,00.

i want to take only the line 0010000063 000010 2008009 192,00- 192,00-

How to do that.

Thanks

Kamala.

8 REPLIES 8
Read only

Former Member
0 Likes
1,564

hi,

you can use ERDAT and ERZET feild of VBREVE table to get you desire infromation.

put on SELECT statement and get only latest date and time info.

Read only

0 Likes
1,564

Sorry, i guess, ur solution(i.e. just relyig on the DATE and TIME) will work in all scenarios!!

thanq

Edited by: SAP ABAPer on Jul 6, 2009 2:48 AM

Read only

0 Likes
1,564

any one help me out

Read only

Former Member
0 Likes
1,565

There must be a field in this table which has the indicator for reversal and the document number for which the reversal is being done.

Check the fields like Originating Document, Follow on Doc, Reversal Indicator in ur table.

Read only

0 Likes
1,564

Hi ,

There are no such a fields available in VBREVE table. Anyhelp will really appriciated.

Read only

0 Likes
1,564

check these fields in ur table.....

VBELN_N (follow-on Doc)

VBELV(Originating Doc)

Edited by: vijetasap on Jul 6, 2009 8:57 AM

Read only

0 Likes
1,564

Hi both the fields are blank in the table. is there any other way to filter them

Read only

Former Member
0 Likes
1,564

Hi KR,

if you want particular items from the table VBREVE (Revenue Recognition: Revenue Recognition Lines)

Pass all the keyfields in where condition..

try to provide maximum field values from below list in where condition... if you are not be able to get it directly then try to get it from some other tables and then paas it here...

VBELN ==> Sales Document

POSNR ==> Sales Document Item

SAKRV ==> G/L Account Number

BDJPOPER ==> Posting year and posting period (YYYYMMM format)

POPUPO ==> Period sub-item

VBELN_N ==> Subsequent sales and distribution document

POSNR_N ==> Subsequent item of an SD document

also have a look on other tables related to this...

VBREF

VBREVAC

VBREVC

VBREVE

VBREVK

VBREVR

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya