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

BAPI_ACC_DOCUMENT_REV_POST update table FAGLFLEXA incorrect

Former Member
0 Likes
2,015

Dear All,

I used an ABAP program to reverse the financial documents, and found the table FAGLFLEXA was updated wrong after completed the running of the program. Below is the detailed information:

Function of the program: Call BAPI: BAPI_ACC_DOCUMENT_REV_POST to reverse the FI documents

Before run the program: there's a posting between company A and company B, and genarated 2 FI documents(Example: 10000001 for company A, and 20000001 for company B), and the cross-company code document was 20000001000109.

Running the program: run the program to reverse FI document 10000001, and reverse successfully(both for company A and B).

After reversed the FI documents, I found everything is OK except 1 error: When I check the table FAGLFLEXA, I found the new value of field DRCRK is incorrect, the data is like:

part 1:

-


RLDNR DOCLN RACCT HSL DRCRK

0L 000001 6600960100 896.88- S

0L 000002 6600960100 108.29 S

0L 000003 6600960100 67.27- S

0L 000004 6600960100 2.60 S

0L 000005 6600960100 4.71 S

0L 000006 6600960100 35.85- S

0L 000007 9999020000 884.40 H

-


part 2:

-


RLDNR DOCLN RACCT HSL DRCRK

0L 000001 6600960100 896.88 S

0L 000002 6600960100 108.29- H

0L 000003 6600960100 67.27 S

0L 000004 6600960100 2.60- H

0L 000005 6600960100 4.71- H

0L 000006 6600960100 35.85 S

0L 000007 9999020000 884.40- H

-


in part 2, we can found the value of field DRCRK in some line was change from S to H, actually, it should as same as in part 1.

Can anybody who can tell me why?

With many thanks!

Brian Liu

Edited by: Brian Liu on Jun 29, 2009 5:16 AM

Dear All,

I used an ABAP program to reverse the financial documents, and found the table FAGLFLEXA was updated wrong after completed the running of the program. Below is the detailed information:

Function of the program: Call BAPI: BAPI_ACC_DOCUMENT_REV_POST to reverse the FI documents

Before run the program: there's a posting between company A and company B, and genarated 2 FI documents(Example: 10000001 for company A, and 20000001 for company B), and the cross-company code document was 20000001000109.

Running the program: run the program to reverse FI document 10000001, and reverse successfully(both for company A and B).

After reversed the FI documents, I found everything is OK except 1 error: When I check the table FAGLFLEXA, I found the new value of field DRCRK is incorrect, the data is like:

part 1:

-


RLDNR DOCLN RACCT HSL DRCRK

0L 000001 6600960100 896.88- S

0L 000002 6600960100 108.29 S

0L 000003 6600960100 67.27- S

0L 000004 6600960100 2.60 S

0L 000005 6600960100 4.71 S

0L 000006 6600960100 35.85- S

0L 000007 9999020000 884.40 H

-


part 2:

-


RLDNR DOCLN RACCT HSL DRCRK

0L 000001 6600960100 896.88 S

0L 000002 6600960100 108.29- H

0L 000003 6600960100 67.27 S

0L 000004 6600960100 2.60- H

0L 000005 6600960100 4.71- H

0L 000006 6600960100 35.85 S

0L 000007 9999020000 884.40- H

-


in part 2, we can found the value of field DRCRK in some line was change from S to H, actually, it should as same as in part 1.

Can anybody who can tell me why?

With many thanks!

Brian Liu

Edited by: Brian Liu on Jun 29, 2009 5:16 AM

10 REPLIES 10
Read only

Former Member
0 Likes
1,403

Hi

It seems like part 1 is showing wrong DRCRK and part 2 is showing correct. The DRCRK will be H for negative values and S for positive values. Can you please recheck??

Regards

Sathar

Read only

0 Likes
1,403

Dear,

Anyway, the DRCRK should be the same in both part1 and part2, but now, it's changed. This is incorrect.

Read only

0 Likes
1,403

Hi

DCRCK will not be same for original document line item and reversal document line item. It is based on the value amount. If the amount is negative (Credit) DCRCK will be H and for positive(Debit) it will be S. So when u reverse a document the amount is getting reversed so your DCRCK will also get changed. Hope you are clear.

Regards

Sathar

Read only

Former Member
0 Likes
1,403

Hi

It seems like part 1 is showing wrong DRCRK and part 2 is showing correct. The DRCRK will be H for negative values and S for positive values. Can you please recheck??

Regards

Sathar

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,403

In the reversal entries we can see that the amounts area laso reverse . eg. 0L 000002 6600960100 108.29 S in part 1 becomes 0L 000002 6600960100 108.29- H , so i think the debited amount is being credited and posted with different DRCRK

indicator.,

Read only

0 Likes
1,403

Dear all,

In table BSEG, the debit/credit indicator was changed, and in the reversal docurment, the indicator also changed accodingly, this is right.

But, in table FAGLFLEXA, the indicator should not be changed.

When I reverse a same document via the standard T-code FBU8, the indicator in FAGLFLEXA was not changed, this is right.

So, we can see, after call the BAPI, the update in table FAGLFLEXA was wrong.

Now , I want to know the reason of the mistake? is it a bug of my program or a bug of the BAPI ?

Read only

0 Likes
1,403

help .............................................................

Read only

0 Likes
1,403

experts ?

Read only

0 Likes
1,403

Dear friends,

Could you please give me more advice?

Read only

Former Member
0 Likes
1,403

Somebody wrote a 'Commit Work.' insides a BTE process,this caused the error when update the G'L table FAGLFLEXA.

After removed the 'Commit work', the problem solved.