2010 Nov 11 6:25 AM
Dear All
i have sales order number from that i am able to get the billing document number from VBFA table.
i am passing input to the BSEG table billing documnet number and customer number and to get the Advance payment
and also the Actual payment so is it suffiicient to read the BSEG Table.
and make clear how can i get the Outstanding amount related to that salesorder. i mean hear i want to get it from table with out doing manual calculation.
and also guide me BSEG is Cluster table if i use selct statement na it is database cost so any function modules available for read it
please guide me.
thanks ........................
Dear All
i have sales order number from that i am able to get the billing document number from VBFA table.
i am passing input to the BSEG table billing documnet number and customer number and to get the Advance payment
and also the Actual payment so is it suffiicient to read the BSEG Table.
and make clear how can i get the Outstanding amount related to that salesorder. i mean hear i want to get it from table with out doing manual calculation.
and also guide me BSEG is Cluster table if i use selct statement na it is database cost so any function modules available for read it
please guide me.
thanks ........................
2010 Nov 11 8:34 AM
Hi,
Try with function AC_DOCUMENT_RECODS
CALL FUNCTION 'AC_DOCUMENT_RECORD'
EXPORTING
i_awtyp = 'MKPF'
i_awref = awref
i_aworg = aworg
i_awsys = awsys
i_awtyp_incl = 'BKPF'
i_valutyp = '0'
x_dialog = ' '
TABLES
t_documents = docs_fi
EXCEPTIONS
no_reference = 1
no_document = 2
OTHERS = 3.
where
DATA: docs_fi LIKE acc_doc OCCURS 10 WITH HEADER LINE.
and
DATA: awref LIKE acchd-awref,
aworg LIKE acchd-aworg,
awsys LIKE acchd-awsys.
I hope this helps you
Regards
Eduardo
PD: I think that I havent read properly your post.
Surely you must work with tables BSID and BSAD, better that with BSEG. Remember that one is open items. Surely the document from the first funcion was cleared. So, you must rebuild the flow of documents.
Edited by: E_Hinojosa on Nov 11, 2010 9:37 AM
2010 Nov 11 8:38 AM
Hi,
BSEG is a cluster table and you should aviod using the table for performance issues.
Instead of BSEG, Use tables BSID-Open items, BSAD-Cleared items.
Thanks,
Shiva
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |