Upload
pbijoybiju
View
216
Download
0
Embed Size (px)
Citation preview
7/29/2019 ap ar bw
1/8
Generated by Jive on 2012-12-26+01:00
1
Issue with AP/AR Ageing report
Arun Purohit 222 posts since Jun 13, 2007
Issue with AP/AR Ageing report Sep 27, 2011 4:16 PM
Dear BW Experts,
Problem: If any AP or AR document (eg. ABC with amount 1000, New Due date
6months ago) is cleared partially, new document is created to clear it partially.
New document (eg. XYZ with 300 amount and net due date 1 month ago) will have
different Doc date, Base date & Net Due date as compared to original Vendor/
Customer document.
Hence net due date is different for both docs, both will appear in different buckets:
91-180 & 1-30 respectively. Which should not be the case ideally. This scenario is
taken care in ECC report: S_ALR_87012078. This report shows partially cleared
balance in the bucket of original Vendor/Customer document....
Please refer following link:
http://forums.sdn.sap.com/thread.jspa?threadID=1620900
it talks about OSS note: 522235
OSS note mentioned above talks of Virtual Char for Net due date. But this will hamper the
performance of query heavily and on top of that I will have web-i BO query and then Xcelcius
dashboard. Final dashboard will be impacted badly.
To avoid that I wrote start routine b/w DSO to cube with following logic:
this logic worked for current key date but not working for back dates.
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
7/29/2019 ap ar bw
2/8
2
Any Inputs on it will be appreciated.
...
Following is the logic:
****************************** Declaration**********************************
DATA: it_fiap TYPE TABLE OF /bi0/afiap_o0300,
wa_fiap TYPE /bi0/afiap_o0300.
*******************************************************************************
FIELD-SYMBOLS: TYPE /bi0/afiap_o0300.
ASSIGN wa_fiap TO .
IF NOT SOURCE_PACKAGE IS INITIAL.
**
temp_pkg[] = SOURCE_PACKAGE[].
**
DELETE temp_pkg WHERE inv_doc_no EQ space.
DELETE temp_pkg WHERE /bic/zx_rebzt NE 'Z'.
**
SELECT * FROM /bi0/afiap_o0300
INTO TABLE it_fiap
FOR ALL ENTRIES IN temp_pkg
WHERE comp_code = temp_pkg-comp_code
AND creditor = temp_pkg-creditor
AND ac_doc_no = temp_pkg-inv_doc_no
AND item_num = temp_pkg-inv_item
AND fiscyear = temp_pkg-inv_year.
7/29/2019 ap ar bw
3/8
**
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
3
**
LOOP AT SOURCE_PACKAGE ASSIGNING
WHERE inv_doc_no NE space
AND /bic/zx_rebzt EQ 'Z'.
**
READ TABLE it_fiap ASSIGNING
WITH KEY comp_code = -comp_code
creditor = -creditor
ac_doc_no = -inv_doc_no
item_num = -inv_item
fiscyear = -inv_year.
**
IF sy-subrc = 0.
-netduedate = -netduedate.
ENDIF.
**
ENDLOOP.
**
ENDIF.
*************************************************************************************
*****
Edited by: Arun Purohit on Sep 27, 2011 7:46 PM
7/29/2019 ap ar bw
4/8
Gaurav Aggarwal 624 posts since Nov 20, 2008
Re: Issue with AP/AR Ageing report Sep 27, 2011 8:20 PM
you would probably like to sort the data based on invoice number and then pick the Net Due
Date for the first accounting document. This way you can load data for back dates also.
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
4
I hope it helps.
Regards,
Gaurav
Arun Purohit 222 posts since Jun 13, 2007
Re: Issue with AP/AR Ageing report Sep 28, 2011 10:04 AM
Thanks Gaurav for replying to my query,
I have loaded complete data in DSO and tested it forcurrent
key due date (selection parameter in output of BEx query), it was working fine.
but when I test query with key due date selection for past date (back date), then amounts in
buckets donot match with std. ECC reports, though net balances are matching in that case
also.....
my question is: anyways my logic is working all data set in DSO, how it will help by sorting it
on document number?
because as per my logic- for every doc number (with non-blank 0inv_doc number -which is
BSIK-REBZG) it will refer DSO and update net due date..... right? so it should even work for
any document of any due date....
Please suggest.
Gaurav Aggarwal 624 posts since Nov 20, 2008
7/29/2019 ap ar bw
5/8
Re: Issue with AP/AR Ageing report Sep 28, 2011 8:07 PM
In your scenario, you are right soring is not required and data should be in same bucket
only.
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
5
Here is my understanding;
Let us say we have an doucment
Doc.....Amt.....Posting Dateu2026..Due Date.....Clearing Dateu2026..Clearing Doc
A........1000....Jan2011u2026u2026u2026..Feb2011
now a partial Payment is recieved (or made)
Doc.....Amt.....Posting Dateu2026..Due Date.....Clearing Dateu2026..Clearing Doc
A........1000....Jan2011u2026u2026u2026.Feb2011......Aug2011u2026u2026u2026u2026B
B.........700.....Aug2011u2026u2026u2026Feb2011......Aug2011u2026u2026u2026u2026B
(due date of this doc wouild have been Aug2011 but using your code, you are changing it
to Feb2011).
I dont see any reason that data should be in two different buckets while running for back
dates. I guess you need to pick an example and calculate the buckets manually as it will tell
you if there is some problem with the routine or the logic built in the query.
But here is another doubt, sometimes one doc can clear several other documents, how will
you handle that scenario (is it something to do with the field where you are restriction on
Z?)?
Regards,
Gaurav
Arun Purohit 222 posts since Jun 13, 2007
7/29/2019 ap ar bw
6/8
Re: Issue with AP/AR Ageing report Sep 29, 2011 6:35 AM
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
6
In our case: one doc will clear only one doc in case of partial payment.
If we are executing query for back date:
even in that case if net due date of doc (created for partial clearing) is different from parent
doc, then it needs to be changed to net due date of parent doc....in your example it should
be Feb 2011 (though it was initially Aug2011)... to bring two docs in same bucket to make
the picture more clear, as in:
if bucket for A is 1-30 days (net due feb2011)
bucket for B is 91-180 (net due date Aug 2011)
then bucket amounts will be:
1-30 days -
1000
91-180 -
-700
which gives unclear picture of receivables/payables.....
Ideally it should be:
1-30days -
300.
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
7
Here I have used "Z" (BSIK-REBZT) field to identify type of follow on document (it should be:
7/29/2019 ap ar bw
7/8
"Payment for).
'V'- Residual items for
'U'- Clear down payment
'A'- Clear down payment
'G'- Credit memo for
'Z' - Payment for
'R' - Supplement for
'P' - Prepayment for
Gaurav Aggarwal 624 posts since Nov 20, 2008
Re: Issue with AP/AR Ageing report Sep 30, 2011 7:10 AM
I understood that.
But why you are getting wrong values in the query for back date, you need to pick one
particular example and simulate the resutts manually as per the calculation in query. That
way you can identify the root cause.
Regards,
Gaurav
Edward Prenton 3 posts since Feb 13, 2012
Aged Creditors Analysis Report Feb 13, 2012 4:56 PM
Hi Guys,
I have recently created a debtors analysis using the report 0FIAR_C03_Q0005.
Issue with AP/AR Ageing report
Generated by Jive on 2012-12-26+01:00
8
I am just wondering if anyone knows if there is a similar report for Aged Creditors Analysis in
Business Content within BW??
7/29/2019 ap ar bw
8/8
If so I can get this activated. Please can you guys help because I can't find this out
anywhere.
Regards
Ed
Edited by: Eprenton on Feb 13, 2012 4:56 PM
Edward Prenton 3 posts since Feb 13, 2012
Re: Aged Creditors Analysis Report Feb 13, 2012 5:05 PM
Hi Guys,
I believe I have found this preset report. The code for which in case you were wondering is
0FIAP_C03_Q0005. This will answer all my problems
Regards
Ed