cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out the Accounting document status for sales order

Former Member
0 Kudos

Hi

We have created the sales document by referring the billing document of contract no.Aftre that we have raised invoice for sales document. Now system is generated both invoice , accounting document and the value is appearing against the invoice document. However the status against the accounting document is showing as not cleared. I want to know where we could see this status in Table,

Normally we can see the status in FPLT for contracts since its having the billing plan no. Suppose if the billing plan is not available like S.O , How to check the status in table?

I have refered so many tables but not helping. Since i want to get the uncleared value of accouting document.

Please help me.

Regards

Thenna

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Thank you. Can you explain briefly. We are getting the status of billing (account document) thro FPLT table if we have any billing no. Its suitable for contract document. However in the case of Sales order I dont know where we could get this.

Regards

Thenna

jpfriends079
Active Contributor
0 Kudos

See, the accounting doc will be in not cleared status, till it has subsequent clearing accounting doc to it, like payment account doc (DZ) or cancellation account doc (S1).

Thanks & Regards

JP

alex_zheng
Contributor
0 Kudos

Hi Thenna

The accounting document status in the document flow is determined dynamically when you display the document flow,

it's not saved in a specific table.

Here is the relevant logic:

LV05CF01 -> form BUCHHALTUNGSBELEG

...

IF vbrk-vbeln <> vbfa_tab-vbeln.

PERFORM vbrk_ermitteln USING vbfa_tab-vbeln.

...

REFRESH xbkpf.

CALL FUNCTION 'FI_DOCUMENT_READ'

...

LOOP AT xbseg WHERE bukrs EQ xbkpf-bukrs

AND belnr EQ xbkpf-belnr

AND gjahr EQ xbkpf-gjahr

AND ( koart EQ 'D' OR koart EQ 'K' ).

ENDLOOP.

IF NOT sy-subrc IS INITIAL.

  • SET STATUS TO 'No items are cleared'

l_xdoc_num-status = 'A'. <<<

ELSE.

LOOP AT xbseg WHERE augbl IS initial

AND umskz NE 'A'

AND vorgn NE 'AZUM'

AND ( koart EQ 'D' OR koart EQ 'K' ).

ENDLOOP.

IF NOT sy-subrc IS INITIAL.

  • Set status to 'All items are cleared'

l_xdoc_num-status = 'C'. <<<

ENDIF.

ENDIF.

Regards,

Alex