Customer open item analysis by balance of overdue items
Hi All,
Is there any provision for knowing the customer open items by balance of overdue items in the customer line item display in the t-code FBL5N. The standard process is through the S_ALR_87012178
Regards,
Arvind
Dear friend
You may not get as ggod as report but u check ,there are some lay out. one lay out name is dunning data.
you can get there day of arrers.
hope it will help you
Jain
Similar Messages
-
Need Drill down in Customer Open Item Analysis by Balance of Overdue Items
In SAP there is one standard report by the name of
'Customer Open Item Analysis by Balance of Overdue Items'
Can I change the report according to my need.. I want to add drill down and customer name to this report. I am using summarisation 6 as my criteria.
Thanks
Sajid HakeemDave!
Thanks for the help man
Just one last thing
can you help us to add drill down facility in the prescribed report. what code we should write to make it drill down to a line item report.
Regards
Sajid Hakeem -
S_ALR_87012178/Customer Open Item Analysis by Balance of Overdue Items/
I would like to modify the 'Dynamic selections' (Shift + F4) list on the selection screen. Where are the selections coming from? How to change the list? I should add one selection more to 'Documents'-selections.
I have debugged these programs quite a lot, but it seems to be very difficult to find the correct place. There are lots of source code to be debugged. I just thought that 'Dynamic Selections' is a standard way to handle extra selections and someone could know, a little bit more specific, from where to look for.
-
Report S_ALR_87012178 - customer open item analysis by balance of overdue
Hi,
In report S_ALR_87012178 (program RFDOPR10), when we choose in the selection field screen :
OI sorted list sorting (1,2) = 1
Summarization level (0-6) = 6
OI list summarization (0-2) = 1
The value that we have under the «Sort field» column is the search term of the customer master data.
Do you know if it's possible to have the customer name instead of the search term without any modification to the SAP standard program?
Thanks,
JulienHi Julien,
In the Search help ID enter Q - Reference Type and enter the customer name or number. If not Q try other options.
Thank You. -
A/R report u0096 Customer open items based on due date
Hi all,
Can anyone tell me if there is a standard report on AR side that gives me invoices due between certain dates, meaning I should be able to select due dates between 11/15/2006 and 11/30/2006 in the selection and the report should get me the customers with invoices that are due between the above dates for a company code.
Thanks in advance
KumarHi Kumar,
there is no standard report which give you selection citeria to select range of due date. Since due date is calculated based on function module where it calculate Bline date+ terms of payment days.
other std reports are:
S_ALR_87012175 Open Items - Customer Due Date Forecast
S_ALR_87012178 Customer Open Item Analysis by Balance of Overdue Items
S_ALR_87012168 Due Date Analysis for Open Items
Hope this helps.
Please assign points as way to say thanks -
Vendor Open Item Analysis by Overdue Items
Hi Freinds,
The users desire to generate the Vendor Open Item Analysis by Overdue Items. When the report is generated using the Program RFKOPR10, the report gives the list of Vendors with the details of overdues as per the buckets selected. However, along with the Vendor Codes, the list gives the short name of the Vendor, which is picked form the 'Search Feild' in the Vendor Master and is the short name, whereas the users desire to have the full name exhibited in the report.
How can we have the full name in the report instead of the short name? Can any one help us in this matter?
Thanks for the assistance.
RegardsHello Pankaj,
Thanks for the prompt response. Our problem is that we require an AP Aging Analysis giving the overdue amounts by days - such as 30/60/90/120/>120. We are able to get the report but the name is not appearing in full. How can we have the full name displayed in the Report?
Regards -
Z report logic- Customer open item analysis
Dear Experts
Our client is using S_ALR_87012178 report for customer open items due analysis.
Now,here they also need sales group wise & division wise split up. Sales group from SO, not CMR, since a single/same customer may have different sales groups for different SOs.
I tried.. but no other report..satisfying this..
So, decided to go ahead with a new Z Development , wherein I plan to call in the program to our customized prgram/report & then to code it, so that sales group & divison are reflected to the corresponding customers.
Now, the challenge is, most (infact all) of the std credit management reports are customer master based, but this requirement (sales group & division) is transaction 9from SO) based.
Now, how do we write the logic/join the tables for me to write FSpec, so as to develop a Z Report.
Anticipating your guidance/suggestions/help.
Good day...
Rgds
Sumanth.Gururajhi,
this is to inform you that,
take the program with RFDOPR10 copy the same program under the name of Z report.
add these fields in selection screen and keep them mandatory on the selection screen & take logic from these tables and fields
1. Sales Group - VBAK-VKGRP
2. Division - VBAK-SPART
take the program with RFDOPR10 copy the same program under the name of Z report.
i think so you cannot capture the total functionality of RFDOPR10 which is the extract of plenty of tables.
finally if it is exectued then entire effort goes invain.
so my suggestion is catch hold of ABAPER and follow the above.
note : if sales group wise and division analysis is coming in the same report then it is very to populate the data from the Z report.
first confirm that.
if it is coming then go ahead with Z reprot itself
balajia -
Customer open balance analysis question
Question: How do you easily track open balance of an invoice without using residuals?
Scenario:
Create invoice using transaction FB70
Apply a partial payment to the invoice or apply a credit memo to reduce the invoice balance. We do not want to use residual items as this closes the original item and reopens an item with a new reference number.
How can we easily and quickly tell the remaining open balance on the Invoice?
Example:
Invoice 1800000000 is created for $150
Credit Memo 1600000000 is created for $50 and applied to above invoice as a partial clearing.
When the Customer Line Items are displayed, the Original Invoice, 1800000000, still shows the full amount of $150 and a partial payment of document of <$50> also shows but with no link to the original invoice. Short of using the Text Fields, is there any way to display the remaining open balance of an invoice?
Calculating the open balance is easy when the customer only has a few open items; however, this is a nightmare when the customer has more than a screen full of open records.
Any suggestions would be greatly appreciated.
Greg BrownWhen you post the partial payment, the system marks the document number of the original open item in the line item for the partial payment. The original open item and the partial payment remain open.
The system stores the document number, fiscal year and number of the invoice item in the partial payment. <b>You can find this information in the 'Payment for' field.</b> Thus you can refer to the original open item from the partial payment. When you post the remaining amount for the invoice, both the partial payment and the invoice are cleared.
This is per documentation for <a href="http://help.sap.com/erp2005_ehp_02/helpdata/en/01/a9bb94455711d182b40000e829fbfe/content.htm">partial payments</a> , you may want to test it out. Hope a similar feature is available for credit memos. -
UP loading Customer open item and balance
Dear All,
We are going live in few days. My client had given me a file for all the open items and a file for the balances. We lready have the customer masters in SAP. I have to upload the open items as well balances to SAP using LSMW.
I know for uploading in LSMW i have to call tr code FB01 but what about Balance Upload? Which transaction Code I have to call in LSMW for balance upload.
But how to do.
Please provide me steps for doing that.
Thanks in Advance
Pratiksha
My email id is [email protected]
If possible please send me any documentation on thisHi Pratiksha & Smile,
At the time of Uploading Cut Over Data, in addition to all the required Gl accounts we would also create Cutover Data Upload clearing Gl Account.
When you are trying to Upload the Debit items in the Trial balance you would credit this Gl account and Debit this GL account when you are trying to upload Credit items in the Trial balance.
Please note the point that the Assets GL Accounts have to be converted to normal GL accounts so that data can be entered, as you may not be able to upload the balances as they would be configured as Recon account and balances cannot be posted directly.
Similarly the Customer and Vendor balances also have to posted separetly as these Gl accounts are also Recon accounts.
Inventory balancces would be uploaded from MM module.
Once all the balances in the trial balance are uploaded, this clearing GL would have a nill balance. Then this Gl account has to be blocked for further posting.
Once the Assets are Uploded individually using AS91,go to T Code OAMK and reset the Asset Gl accounts to Recon accounts.
Regards
Phani -
Hi All,
I have to make a report in FI, which should show the below given Customer open Invoice details for a given customer in selection screen.
Invoice No | Invoice date | Invoice Amount | Payment | Balance | Currency |
1. I have selected all open item details (BELNR, BUDAT, WRBTR, WAERS ) from BSID for the given customer.
2. Selected the cleared items from BSAD for the above accounting documents..and updated the BSAD-WRBTR in payment column.
When there is no payment made against a Invoice its coming up, but when there is partial/ full payment made as this is no more open item this invoice number not coming up in the report.. Hope I have explianed my problem clearly..
Please suggest me how should I finish this report. Thanks in advances..its very urgent..
Regards
Jaker.Hi,
See the attached report for the Customer AR's (Open Items) and write accrodingly.
report zf_rept_debtor_ageing
no standard page heading
message-id fb
line-count 65
line-size 230.
Purpose : This ABAP program will fetch the Account Receivables for
a Customer for the given period and display the due days.
tables: t001, " Company Codes
t005, " Countries
skb1, " GL Master
kna1. " Customer Master
Internal Tables
Internal table for BSID (Open Items) data
data: begin of it_bsid occurs 0,
kunnr like bsid-kunnr, " Customer Number
gjahr like bsid-gjahr, " Fiscal Year
belnr like bsid-belnr, " Acc.Document
buzei like bsid-buzei, " Item
budat like bsid-budat, " Posting Date
shkzg like bsid-shkzg, " Dr/Cr Indicator
dmbtr like bsid-dmbtr, " Amount(Local Curr)
wrbtr like bsid-wrbtr, " Amount(Doc Curr)
dmbe2 like bsid-dmbe2, " Amount(USD)
waers like bsid-waers, " Currency
zterm like bsid-zterm, " Payment Terms
vbeln like bsid-vbeln, " Billing Doc
zfbdt like bsid-zfbdt, " Baseline Date
zbd1t like bsid-zbd1t, " No of days
hkont like bsid-hkont, " GL Account
name1 like kna1-name1, " Customer Name
land1 like kna1-land1, " Country
end of it_bsid.
Internal table for BSAD (Closed Items) data
data: begin of it_bsad occurs 0,
kunnr like bsad-kunnr, " Customer Number
gjahr like bsad-gjahr, " Fiscal Year
belnr like bsad-belnr, " Acc.Document
buzei like bsad-buzei, " Item
budat like bsad-budat, " Posting Date
shkzg like bsad-shkzg, " Dr/Cr Indicator
dmbtr like bsad-dmbtr, " Amount(Local Curr)
wrbtr like bsid-wrbtr, " Amount(Doc Curr)
dmbe2 like bsad-dmbe2, " Amount(USD)
waers like bsad-waers, " Currency
zterm like bsid-zterm, " Payment Terms
vbeln like bsid-vbeln, " Billing Doc
zfbdt like bsid-zfbdt, " Baseline Date
zbd1t like bsid-zbd1t, " No of days
hkont like bsid-hkont, " GL Account
name1 like kna1-name1, " Customer Name
land1 like kna1-land1, " Country
end of it_bsad.
Internal table for Report Output
data: begin of it_report occurs 0,
kunnr like bsid-kunnr, " Customer Number
belnr like bsid-belnr, " Acc.Document
name1 like kna1-name1, " Customer Name
land1 like kna1-land1, " Country
shkzg like bsid-shkzg, " Dr/Cr Indicator
budat like bsid-budat, " Posting Date
dmbtr like bsid-dmbtr, " Amount(Local Curr)
wrbtr like bsid-wrbtr, " Amount(Doc Curr)
dmbe2 like bsid-dmbe2, " Amount(USD)
waers like bsid-waers, " Currency
due_amnt like bsid-dmbtr, " Amount(Over Due)
d_amnt1 like bsid-dmbtr, " Amount(0-30 Future Due)
d_amnt2 like bsid-dmbtr, " Amount(31-60 Future Due)
d_amnt3 like bsid-dmbtr, " Amount(61-90 Future Due)
d_amnt4 like bsid-dmbtr, " Amount(91-120 Future Due)
d_amnt5 like bsid-dmbtr, " Amount(more than 120)
due_date like bsid-budat, " Due date
zterm like bsid-zterm, " Payment Terms
vbeln like bsid-vbeln, " Billing Doc
end of it_report.
Declaration of Data and Variables
data: v_days type i, " Difference days
v_waers like t001-waers, " Co.Code Currency
v_sum1 like bsid-dmbtr, " Totals 1
v_sum2 like bsid-dmbtr, " Totals 2
v_sum3 like bsid-dmbtr, " Totals 3
v_sum4 like bsid-dmbtr, " Totals 4
v_sum5 like bsid-dmbtr, " Totals 5
v_sum6 like bsid-dmbtr, " Totals 6
v_sum7 like bsid-dmbtr, " Totals 7
v_sum8 like bsid-dmbe2. " Totals 8
Constants
constants: c_doc_waers(3) value 'USD',
c_mitkz type c value 'D'.
Selection Screen
selection-screen : begin of block b1 with frame title text-001.
parameters: p_bukrs like t001-bukrs obligatory. " Company Code
select-options:s_kunnr for kna1-kunnr, " Customer Number
s_land1 for t005-land1, " Country
s_hkont for skb1-saknr. " G/L Account
parameters: p_date like sy-datum obligatory. " Report Date
selection-screen: end of block b1.
selection-screen : begin of block b2 with frame title text-002.
selection-screen begin of line.
selection-screen comment 2(30) text-003 for field p_rb1.
parameters: p_rb1 radiobutton group rb.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 2(30) text-004 for field p_rb2.
parameters: p_rb2 radiobutton group rb.
selection-screen end of line.
selection-screen: end of block b2.
selection-screen : begin of block b4 with frame.
selection-screen begin of line.
selection-screen comment 2(29) text-038 for field p_chk1.
parameters: p_chk1 as checkbox.
selection-screen end of line.
selection-screen: end of block b4.
selection-screen : begin of block b3 with frame title text-030.
selection-screen begin of line.
selection-screen comment 2(30) text-031 for field p_rb3.
parameters: p_rb3 radiobutton group rb1.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 2(30) text-032 for field p_rb4.
parameters: p_rb4 radiobutton group rb1.
selection-screen end of line.
selection-screen: end of block b3.
*********Initialization**********************************************
initialization.
At Selection Screen
at selection-screen.
Checking for the input values of selection screen.
perform screen_check.
Top-Of-Page
top-of-page.
if p_rb3 = 'X'.
if p_chk1 = 'X'.
Write the Column Headings for detailed report(in Doc Currency)
perform col_heading2.
else.
Write the Column Headings for detailed report
perform col_heading.
endif.
else.
Write the Column Headings for summary report
perform col_heading1.
endif.
Start-Of-Selection
start-of-selection.
Get the Customer Open Items from BSID
perform get_open_data.
Get the Customer Closed Items from BSAD
perform get_close_data.
Get the data from BSID,BSAD and KNA1 into one int.table
perform process_data.
End-Of-Selection
end-of-selection.
if it_report[] is initial.
write : 'No Documents found'(005).
else.
if p_rb3 = 'X'.
Write the Detailed Report
perform write_report.
else.
Write the Summary Report
perform write_report1.
endif.
endif.
At Line-Selection
at line-selection.
When double clicked on BELNR leave to transaction FB03
perform line_sel.
*& Form SCREEN_CHECK
Checking for the input values of selection screen
form screen_check.
Validation of Company Code
clear t001.
if not p_bukrs is initial.
select bukrs from t001 up to 1 rows
into t001-bukrs
where bukrs = p_bukrs.
endselect.
if sy-subrc ne 0.
message e000 with 'Invalid Company Code'(006).
endif.
endif.
Validation of Customer Number
clear kna1.
if not s_kunnr is initial.
select kunnr from kna1 up to 1 rows
into kna1-kunnr
where kunnr in s_kunnr.
endselect.
if sy-subrc ne 0.
message e000 with 'Invalid Customer Number'(007).
endif.
endif.
Validation of Country
clear t005.
if not s_land1 is initial.
select land1 from t005 up to 1 rows
into t005-land1
where land1 in s_land1.
endselect.
if sy-subrc ne 0.
message e000 with 'Invalid Country'(036).
endif.
endif.
Validation of GL Account
clear skb1.
if not s_hkont is initial.
select saknr from skb1 up to 1 rows
into skb1-saknr
where saknr in s_hkont and
mitkz = c_mitkz.
endselect.
if sy-subrc ne 0.
message e000 with 'Invalid GL Reconciliation Account'(037).
endif.
endif.
endform. " SCREEN_CHECK
*& Form COL_HEADING
Write the Column Headings for detailed report
form col_heading.
skip .
write: /88 'DEBTOR AGEING REPORT AS AT:'(019) centered,
116 p_date centered, 198 sy-pagno.
skip .
write: /2 'CoCode:'(016),13(4) p_bukrs color 3.
if not s_kunnr is initial.
if not s_kunnr-high is initial.
write: 20 'Customer:'(041),33 s_kunnr-low color 3,
'-', s_kunnr-high color 3.
else.
write: 20 'Customer:'(041),33 s_kunnr-low color 3.
endif.
endif.
if not s_land1 is initial.
if not s_land1-high is initial.
write: /2 'Country:'(042),13(4) s_land1-low color 3,
'-', s_land1-high color 3.
else.
write: /2 'Country:'(042),13(4) s_land1-low color 3.
endif.
if not s_hkont is initial.
if not s_hkont-high is initial.
write: 20 'GL Account:'(043),33 s_hkont-low color 3,
'-', s_hkont-high color 3.
else.
write: 20 'GL Account:'(043),33 s_hkont-low color 3.
endif.
endif.
else.
if not s_hkont is initial.
if not s_hkont-high is initial.
write: /2 'GL Account:'(043),14 s_hkont-low color 3,
'-', s_hkont-high color 3.
else.
write: /2 'GL Account:'(043),14 s_hkont-low color 3.
endif.
endif.
endif.
write: 183 'Run Date:'(029), sy-datum.
format color col_heading.
write at /1(203) sy-uline .
write: / sy-vline, 2(10) 'Customer'(008) centered,
12 sy-vline, 13(30) 'Customer Name'(009),
43 sy-vline, 44(3) 'Cty'(014) centered,
47 sy-vline, 48(15) 'Amount'(013) right-justified,
63 sy-vline, 64(4) 'Curr'(011) centered,
68 sy-vline, 69(15) 'Overdue'(012) centered,
84 sy-vline, 85(15) '0 - 30 Days'(010) centered,
100 sy-vline,101(15) '31 - 60 Days'(028) centered,
116 sy-vline,117(15) '61 - 90 Days'(021) centered,
132 sy-vline,133(15) '91 - 120 Days'(022) centered,
148 sy-vline,149(15) 'Above 120 Days'(023) centered,
164 sy-vline,165(10) 'Due Date'(024) centered,
175 sy-vline,176(5) 'PayT'(025) centered,
181 sy-vline,182(10) 'Bill.Doc.'(026) centered,
192 sy-vline,193(10) 'Doc.No.'(027) centered,
203 sy-vline.
write at /1(203) sy-uline.
format color off.
endform. " COL_HEADING
*& Form COL_HEADING1
Write the Column Headings for summary report
form col_heading1.
skip .
write: /54 'DEBTOR AGEING REPORT (SUMMARY) AS AT:'(033) centered,
92 p_date centered, 158 sy-pagno.
skip .
write: /2 'CoCode:'(016), 13(4) p_bukrs color 3.
if not s_kunnr is initial.
if not s_kunnr-high is initial.
write: 20 'Customer:'(041),33 s_kunnr-low color 3,
'-', s_kunnr-high color 3.
else.
write: 20 'Customer:'(041),33 s_kunnr-low color 3.
endif.
endif.
if not s_land1 is initial.
if not s_land1-high is initial.
write: /2 'Country:'(042),13(4) s_land1-low color 3,
'-', s_land1-high color 3.
else.
write: /2 'Country:'(042),13(4) s_land1-low color 3.
endif.
if not s_hkont is initial.
if not s_hkont-high is initial.
write: 20 'GL Account:'(043),33 s_hkont-low color 3,
'-', s_hkont-high color 3.
else.
write: 20 'GL Account:'(043),33 s_hkont-low color 3.
endif.
endif.
else.
if not s_hkont is initial.
if not s_hkont-high is initial.
write: /2 'GL Account:'(043),14 s_hkont-low color 3,
'-', s_hkont-high color 3.
else.
write: /2 'GL Account:'(043),14 s_hkont-low color 3.
endif.
endif.
endif.
write: 144 'Run Date:'(029), sy-datum.
format color col_heading.
write at /1(164) sy-uline .
write: / sy-vline, 2(10) 'Customer'(008) centered,
12 sy-vline, 13(30) 'Customer Name'(009),
43 sy-vline, 44(3) 'Cty'(014) centered,
47 sy-vline, 48(15) 'Amount'(013) right-justified,
63 sy-vline, 64(4) 'Curr'(011) centered,
68 sy-vline, 69(15) 'Overdue'(012) centered,
84 sy-vline, 85(15) '0 - 30 Days'(010) centered,
100 sy-vline,101(15) '31 - 60 Days'(028) centered,
116 sy-vline,117(15) '61 - 90 Days'(021) centered,
132 sy-vline,133(15) '91 - 120 Days'(022) centered,
148 sy-vline,149(15) 'Above 120 Days'(023) centered,
164 sy-vline.
write at /1(164) sy-uline.
format color off.
endform. " COL_HEADING1
*& Form COL_HEADING2
Write the Column Headings for summary report(in Doc Curr)
form col_heading2.
skip .
write: /99 'DEBTOR AGEING REPORT AS AT:'(019) centered,
127 p_date centered, 220 sy-pagno.
skip .
write: /2 'CoCode:'(016),13(4) p_bukrs color 3.
if not s_kunnr is initial.
if not s_kunnr-high is initial.
write: 20 'Customer:'(041),33 s_kunnr-low color 3,
'-', s_kunnr-high color 3.
else.
write: 20 'Customer:'(041),33 s_kunnr-low color 3.
endif.
endif.
if not s_land1 is initial.
if not s_land1-high is initial.
write: /2 'Country:'(042),13(4) s_land1-low color 3,
'-', s_land1-high color 3.
else.
write: /2 'Country:'(042),13(4) s_land1-low color 3.
endif.
if not s_hkont is initial.
if not s_hkont-high is initial.
write: 20 'GL Account:'(043),33 s_hkont-low color 3,
'-', s_hkont-high color 3.
else.
write: 20 'GL Account:'(043),33 s_hkont-low color 3.
endif.
endif.
else.
if not s_hkont is initial.
if not s_hkont-high is initial.
write: /2 'GL Account:'(043),14 s_hkont-low color 3,
'-', s_hkont-high color 3.
else.
write: /2 'GL Account:'(043),14 s_hkont-low color 3.
endif.
endif.
endif.
write: 204 'Run Date:'(029), sy-datum.
format color col_heading.
write at /1(225) sy-uline .
write: / sy-vline, 2(10) 'Customer'(008) centered,
12 sy-vline, 13(30) 'Customer Name'(009),
43 sy-vline, 44(3) 'Cty'(014) centered,
47 sy-vline, 48(15) 'Amount'(013) right-justified,
63 sy-vline, 64(4) 'Curr'(011) centered,
68 sy-vline, 69(15) 'Overdue'(012) centered,
84 sy-vline, 85(15) '0 - 30 Days'(010) centered,
100 sy-vline,101(15) '31 - 60 Days'(028) centered,
116 sy-vline,117(15) '61 - 90 Days'(021) centered,
132 sy-vline,133(15) '91 - 120 Days'(022) centered,
148 sy-vline,149(15) 'Above 120 Days'(023) centered,
164 sy-vline,165(10) 'Due Date'(024) centered,
175 sy-vline,176(5) 'PayT'(025) centered,
181 sy-vline,182(10) 'Bill.Doc.'(026) centered,
192 sy-vline,193(10) 'Doc.No.'(027) centered,
203 sy-vline,204(16) 'Amount(Doc.Curr)'(039),
220 sy-vline,221(4) 'Curr'(040),
225 sy-vline.
write at /1(225) sy-uline.
format color off.
endform. " COL_HEADING2
*& Form GET_OPEN_DATA
Get the Customer Open Items from BSID
form get_open_data.
select a~kunnr " Customer Number
a~gjahr " Fiscal Year
a~belnr " Acc.Document
a~buzei " Item
a~budat " Posting Date
a~shkzg " Dr/Cr Indicator
a~dmbtr " Amount(Local Curr)
a~wrbtr " Amount(Doc Curr)
a~dmbe2 " Amount(USD)
a~waers " Currency
a~zterm " Payment Terms
a~vbeln " Billing Doc
a~zfbdt " Baseline Date
a~zbd1t " No of days
a~hkont " GL account
b~name1 " Customer Name
b~land1 " Country
into table it_bsid
from bsid as a join kna1 as b
on akunnr = bkunnr
where a~bukrs = p_bukrs and
a~kunnr in s_kunnr and
a~hkont in s_hkont and
b~land1 in s_land1 and
a~budat le p_date.
sort it_bsid by kunnr gjahr belnr buzei budat.
endform. " GET_OPEN_DATA
*& Form GET_CLOSE_DATA
Get the Customer closed Items from BSID
form get_close_data.
select a~kunnr " Customer Number
a~gjahr " Fiscal Year
a~belnr " Acc.Document
a~buzei " Item
a~budat " Posting Date
a~shkzg " Dr/Cr Indicator
a~dmbtr " Amount(Local Curr)
a~wrbtr " Amount(Doc Curr)
a~dmbe2 " Amount(USD)
a~waers " Currency
a~zterm " Payment Terms
a~vbeln " Billing Doc
a~zfbdt " Baseline Date
a~zbd1t " No of days
a~hkont " GL account
b~name1 " Customer Name
b~land1 " Country
into table it_bsad
from bsad as a join kna1 as b
on akunnr = bkunnr
where a~bukrs = p_bukrs and
a~kunnr in s_kunnr and
a~hkont in s_hkont and
b~land1 in s_land1 and
a~augdt > p_date and
a~budat le p_date.
sort it_bsad by kunnr gjahr belnr buzei budat.
endform. " GET_CLOSE_DATA
*& Form PROCESS_DATA
Get the data from BSID,BSAD and KNA1 into one int.table
form process_data.
*Move the data from BSID to final output int table
loop at it_bsid.
move-corresponding it_bsid to it_report.
it_report-due_date = it_bsid-zfbdt + it_bsid-zbd1t.
append it_report.
clear it_report.
endloop.
*Move the data from BSAD to final output int table
loop at it_bsad.
move-corresponding it_bsad to it_report.
it_report-due_date = it_bsad-zfbdt + it_bsad-zbd1t.
append it_report.
clear it_report.
endloop.
sort it_report by kunnr belnr.
loop at it_report.
if it_report-shkzg = 'H'. " Credit
it_report-dmbtr = it_report-dmbtr * -1.
it_report-dmbe2 = it_report-dmbe2 * -1.
endif.
v_days = it_report-due_date - p_date.
For Company Code Currency
if p_rb1 = 'X'.
if v_days le 0.
it_report-due_amnt = it_report-dmbtr.
elseif v_days between 1 and 30.
it_report-d_amnt1 = it_report-dmbtr.
elseif v_days between 31 and 60.
it_report-d_amnt2 = it_report-dmbtr.
elseif v_days between 61 and 90.
it_report-d_amnt3 = it_report-dmbtr.
elseif v_days between 91 and 120.
it_report-d_amnt4 = it_report-dmbtr.
elseif v_days > 120.
it_report-d_amnt5 = it_report-dmbtr.
endif.
For Group Currency
else.
if v_days le 0.
it_report-due_amnt = it_report-dmbe2.
elseif v_days between 1 and 30.
it_report-d_amnt1 = it_report-dmbe2.
elseif v_days between 31 and 60.
it_report-d_amnt2 = it_report-dmbe2.
elseif v_days between 61 and 90.
it_report-d_amnt3 = it_report-dmbe2.
elseif v_days between 91 and 120.
it_report-d_amnt4 = it_report-dmbe2.
elseif v_days > 120.
it_report-d_amnt5 = it_report-dmbe2.
endif.
endif.
modify it_report index sy-tabix.
endloop.
endform. " PROCESS_DATA
*& Form WRITE_REPORT
Write the Detailed Report Output
form write_report.
clear: v_sum1,v_sum2,v_sum3,v_sum4,v_waers,
v_sum5,v_sum6,v_sum7,v_sum8.
loop at it_report.
at new kunnr.
read table it_report index sy-tabix.
write: / sy-vline, 2(10) it_report-kunnr,
12 sy-vline, 13(30) it_report-name1,
43 sy-vline, 44(3) it_report-land1,
47 sy-vline.
endat.
if p_rb1 = 'X'.
select single waers from t001
into v_waers where bukrs = p_bukrs.
write: 1 sy-vline, 12 sy-vline,
43 sy-vline,
47 sy-vline,
48(15) it_report-dmbtr currency it_report-waers,
63 sy-vline, 64(4) v_waers,
68 sy-vline.
else.
write: 1 sy-vline, 12 sy-vline,
43 sy-vline,
47 sy-vline,
48(15) it_report-dmbe2 currency it_report-waers,
63 sy-vline,64(4) c_doc_waers,
68 sy-vline.
endif.
write: 69(15) it_report-due_amnt currency it_report-waers,
84 sy-vline,
85(15) it_report-d_amnt1 currency it_report-waers,
100 sy-vline,
101(15) it_report-d_amnt2 currency it_report-waers,
116 sy-vline,
117(15) it_report-d_amnt3 currency it_report-waers,
132 sy-vline,
133(15) it_report-d_amnt4 currency it_report-waers,
148 sy-vline,
149(15) it_report-d_amnt5 currency it_report-waers,
164 sy-vline,165(10) it_report-due_date,
175 sy-vline,176(5) it_report-zterm,
181 sy-vline,182(10) it_report-vbeln,
192 sy-vline,193(10) it_report-belnr,
203 sy-vline.
if p_chk1 = 'X'.
write: 204(16) it_report-wrbtr currency it_report-waers,
220 sy-vline, 221(4) it_report-waers,
225 sy-vline.
endif.
new-line.
Totals for end of each Customer
at end of kunnr.
if p_chk1 = 'X'.
write at /1(225) sy-uline.
else.
write at /1(203) sy-uline.
endif.
sum.
format color 4.
if p_rb1 = 'X'.
write: /1 sy-vline, 2 'Total:'(015),
12 sy-vline,
13(10) it_report-kunnr,
43 sy-vline,47 sy-vline,
48(15) it_report-dmbtr currency it_report-waers,
63 sy-vline, 64(3) v_waers,
68 sy-vline,
69(15) it_report-due_amnt currency it_report-waers,
84 sy-vline,
85(15) it_report-d_amnt1 currency it_report-waers,
100 sy-vline,
101(15) it_report-d_amnt2 currency it_report-waers,
116 sy-vline,
117(15) it_report-d_amnt3 currency it_report-waers,
132 sy-vline,
133(15) it_report-d_amnt4 currency it_report-waers,
148 sy-vline,
149(15) it_report-d_amnt5 currency it_report-waers,
164 sy-vline, 175 sy-vline,
181 sy-vline, 192 sy-vline,
203 sy-vline.
if p_chk1 = 'X'.
write: 220 sy-vline, 225 sy-vline.
endif.
else.
write: /1 sy-vline, 2 'Total:'(015),
12 sy-vline,
13(10) it_report-kunnr,
43 sy-vline,
47 sy-vline,
48(15) it_report-dmbe2 currency it_report-waers,
63 sy-vline, 64(3) c_doc_waers,
68 sy-vline,
69(15) it_report-due_amnt currency it_report-waers,
84 sy-vline,
85(15) it_report-d_amnt1 currency it_report-waers,
100 sy-vline,
101(15) it_report-d_amnt2 currency it_report-waers,
116 sy-vline,
117(15) it_report-d_amnt3 currency it_report-waers,
132 sy-vline,
133(15) it_report-d_amnt4 currency it_report-waers,
148 sy-vline,
149(15) it_report-d_amnt5 currency it_report-waers,
164 sy-vline, 175 sy-vline,
181 sy-vline, 192 sy-vline,
203 sy-vline.
if p_chk1 = 'X'.
write: 220 sy-vline, 225 sy-vline.
endif.
endif.
format color off.
if p_chk1 = 'X'.
write at /1(225) sy-uline.
else.
write at /1(203) sy-uline.
endif.
endat.
v_sum1 = v_sum1 + it_report-dmbtr.
v_sum2 = v_sum2 + it_report-due_amnt.
v_sum3 = v_sum3 + it_report-d_amnt1.
v_sum4 = v_sum4 + it_report-d_amnt2.
v_sum5 = v_sum5 + it_report-d_amnt3.
v_sum6 = v_sum6 + it_report-d_amnt4.
v_sum7 = v_sum7 + it_report-d_amnt5.
v_sum8 = v_sum8 + it_report-dmbe2.
Hiding the Acc doc no for interactic screen.
hide it_report-belnr.
hide it_report-budat.
clear:it_report-belnr, it_report-budat.
endloop.
Grand Totals for all customers
format color 3.
write: /1 sy-vline, 2 'Gr.Total'(034),
12 sy-vline,13 'As At:'(035),p_date,
43 sy-vline,
47 sy-vline.
For Company Code Currency
if p_rb1 = 'X'.
write: 48(15) v_sum1 currency it_report-waers,
63 sy-vline, 64(4) v_waers,
68 sy-vline.
For Group Currency (USD)
else.
write: 48(15) v_sum8 currency it_report-waers,
63 sy-vline, 64(3) c_doc_waers,
68 sy-vline.
endif.
write: 69(15) v_sum2 currency it_report-waers,
84 sy-vline,
85(15) v_sum3 currency it_report-waers,
100 sy-vline,
101(15) v_sum4 currency it_report-waers,
116 sy-vline,
117(15) v_sum5 currency it_report-waers,
132 sy-vline,
133(15) v_sum6 currency it_report-waers,
148 sy-vline,
149(15) v_sum7 currency it_report-waers,
164 sy-vline, 175 sy-vline,
181 sy-vline, 192 sy-vline,
203 sy-vline.
if p_chk1 = 'X'.
write: 220 sy-vline, 225 sy-vline.
endif.
format color off.
if p_chk1 = 'X'.
write at /1(225) sy-uline.
else.
write at /1(203) sy-uline.
endif.
endform. " WRITE_REPORT
*& Form WRITE_REPORT1
Write the Summary Report Output
form write_report1.
clear: v_sum1,v_sum2,v_sum3,v_sum4,v_waers,
v_sum5,v_sum6,v_sum7,v_sum8.
loop at it_report.
at new kunnr.
read table it_report index sy-tabix.
write: / sy-vline, 2(10) it_report-kunnr,
12 sy-vline, 13(30) it_report-name1,
43 sy-vline, 44(3) it_report-land1,
47 sy-vline.
endat.
at end of kunnr.
sum.
if p_rb1 = 'X'.
select single waers from t001
into v_waers where bukrs = p_bukrs.
write: 1 sy-vline, 12 sy-vline,
43 sy-vline, 47 sy-vline,
48(15) it_report-dmbtr currency it_report-waers,
63 sy-vline, 64(4) v_waers,
68 sy-vline,
69(15) it_report-due_amnt currency it_report-waers,
84 sy-vline,
85(15) it_report-d_amnt1 currency it_report-waers,
100 sy-vline,
101(15) it_report-d_amnt2 currency it_report-waers,
116 sy-vline,
117(15) it_report-d_amnt3 currency it_report-waers,
132 sy-vline,
133(15) it_report-d_amnt4 currency it_report-waers,
148 sy-vline,
149(15) it_report-d_amnt5 currency it_report-waers,
164 sy-vline.
else.
write: 1 sy-vline, 12 sy-vline,
43 sy-vline, 47 sy-vline,
48(15) it_report-dmbe2 currency it_report-waers,
63 sy-vline, 64(4) c_doc_waers,
68 sy-vline,
69(15) it_report-due_amnt currency it_report-waers,
84 sy-vline,
85(15) it_report-d_amnt1 currency it_report-waers,
100 sy-vline,
101(15) it_report-d_amnt2 currency it_report-waers,
116 sy-vline,
117(15) it_report-d_amnt3 currency it_report-waers,
132 sy-vline,
133(15) it_report-d_amnt4 currency it_report-waers,
148 sy-vline,
149(15) it_report-d_amnt5 currency it_report-waers,
164 sy-vline.
endif.
write at /1(164) sy-uline.
endat.
Totals
v_sum1 = v_sum1 + it_report-dmbtr.
v_sum2 = v_sum2 + it_report-due_amnt.
v_sum3 = v_sum3 + it_report-d_amnt1.
v_sum4 = v_sum4 + it_report-d_amnt2.
v_sum5 = v_sum5 + it_report-d_amnt3.
v_sum6 = v_sum6 + it_report-d_amnt4.
v_sum7 = v_sum7 + it_report-d_amnt5.
v_sum8 = v_sum8 + it_report-dmbe2.
Hiding the Acc doc no for interactic screen.
hide it_report-belnr.
hide it_report-budat.
clear: it_report-belnr,
it_report-budat.
endloop.
Calculation of Grand Totals
format color 3.
write: /1 sy-vline, 2 'Gr.Total'(034),
12 sy-vline,13 'As At:'(035),p_date,
43 sy-vline,
47 sy-vline.
For Company Code Currency
if p_rb1 = 'X'.
write: 48(15) v_sum1 currency it_report-waers,
63 sy-vline, 64(4) v_waers,
68 sy-vline.
For Group Currency (USD)
else.
write: 48(15) v_sum8 currency it_report-waers,
63 sy-vline, 64(3) c_doc_waers,
68 sy-vline.
endif.
write: 69(15) v_sum2 currency it_report-waers,
84 sy-vline,
85(15) v_sum3 currency it_report-waers,
100 sy-vline,
101(15) v_sum4 currency it_report-waers,
116 sy-vline,
117(15) v_sum5 currency it_report-waers,
132 sy-vline,
133(15) v_sum6 currency it_report-waers,
148 sy-vline,
149(15) v_sum7 currency it_report-waers,
164 sy-vline.
format color off.
write at /1(164) sy-uline.
endform. " WRITE_REPORT1
*& Form LINE_SEL
When double clicked on BELNR leave to transaction FB03
form line_sel.
data: lv_field(20),
lv_value(10),
lv_date(10),
lv_gjahr like bsad-gjahr.
get cursor field lv_field value lv_value.
if lv_field = 'IT_REPORT-BELNR'.
if not lv_value is initial.
read current line field value it_report-budat into lv_date.
lv_gjahr = lv_date+6(4).
set parameter id 'BUK' field p_bukrs.
set parameter id 'GJR' field lv_gjahr.
set parameter id 'BLN' field lv_value.
call transaction 'FB03' and skip first screen.
endif.
endif.
endform. " LINE_SEL
Regards,
Anji -
How to clear vendor open items with customer open items in APP?
Hi Experts,
Our vendor is our customer - in this scenario how to clear vedor open items against customer open items. I have defined vedor is customer means I have given customer number in vendor master record, selected chek box 'clear with customer'. Still problem is not solved, hence I am requesting you to help me in this regard.
Thank you very much,
Regards,
Ganesh.Hi
In FBCJ after payment you have clear manually vendor balance in F-44.
If you want SPL GL in FBCJ then write a Substitution .
1. step 001 - Special G/L Substitution
2. Prerequisite - Transaction code = 'FBCJ'
3. Substitution posting key -- Exit (need help from abap) exit name
G/L Exit (need help from abap) exit name
Special G/L Ind Exit (need help from abap) exit name
you can't do this without ABAP help
Best Of Luck
Tanmoy -
S_ALR_87012247 - Customer Balances and Line Items in Local Currency
Hi All,
This report S_ALR_87012247 - Customer Balances and Line Items in Local Currency is not displaying line items for customers in ECC6. Is there any configuration required to get the line items? Please help
Thanks
SrideviIf you see this report S_ALR_87009950, you will get
Opening Balance at the start of fiscal year
Debits and Credit during the reporting period
and the Cumulative Balance.
Please note the above report will not give you line item details.
S_ALR_87012247 report is specifically for poland, in the description it is mentioned that the line items will be displayed, unfortunately, for other countries, there are no line items visible. Therefore, you may explore the possibility of copying this report and changing the code in order to bring the line items along with the totals. -
Customer open item line wise details
Hi ,
I have customer open item for 240 days. Now he has made payment today for part amount only. I have cleared this amount against the outstanding amount. Now in FBL5N open item is only for balance amount. BUt when I CHECK REPORT- S_ALR_87012178 days for the open item is between 31 to 60.
How this dates are calculated.I have posted document today so it should either come from 1 to 30 day range or in 240 to 300 day range as balance is outstanding from that date.
Help me to resolve the issue.Hai
The duedate is calculated according to the baselinedate which u will maintain in terms of payment(OBB8).In terms of payment u will maintain baseline date as document date or posting date or none.mostly u would be selcted the duedate as document date thats why i believe ur line item is showing in between 31-60 days.
Regards
Raghavendra.M
SAP-Practice -
How to pick from SAP the customer open line items ?
Per the client, they need the balance amount currency for each invoice . for eg : there is an invoice for $1000 and an incoming payment of $200 .
Client needs in a single line under two columns
Balance amount in currency - $800 (which is a problem)
Collected amount in currency - $200 .
In short, they would need outstanding balances at Invoice level/rather than at customer level.develop the Z report using ABAP.
CHANDRA -
Function module for customer open item aging report
Hi all,
Please let me know the FM for customer open item aging or which FM is used in tcode S_ALR_87012178 to get the age wise open item of customer.
Thanks in advance
Regards
Puneet<b><u>Part4</u></b><br />
<br />
<pre class="jive-pre"><code class="jive-code jive-java"><font color="red">"&----</font>
<font color="red">"*& Form process_data</font>
<font color="red">"&----</font>
FORM PROCESS_DATA .
DATA : L_TOTAL_TMP(15). <font color="red">" LIKE BSID-DMBTR. </font>
CLEAR : L_TOTAL,LPD_TOTALS.
<font color="red">"* As per Customer accumulate the amount.</font>
<font color="red">"* For overdue items.</font>
CLEAR : L_TOTAL_TMP.
LOOP AT L_OPENDUE_LT.
CONDENSE L_OPENDUE_LT-DMBTR NO-GAPS.
L_TOTAL_TMP = L_TOTAL_TMP + L_OPENDUE_LT-DMBTR.
AT END OF KUNNR.
LPD_TOTALS-KUNNR = L_OPENDUE_LT-KUNNR.
LPD_TOTALS-LPD_TOTAL = L_TOTAL_TMP.
APPEND LPD_TOTALS.
CLEAR : L_TOTAL_TMP.
ENDAT.
ENDLOOP.
CLEAR : L_TOTAL,LOA_TOTALS.
<font color="red">"* As per Customer accumulate the amount.</font>
<font color="red">"* For Open Items.</font>
CLEAR : L_TOTAL_TMP.
LOOP AT L_OPENDUE_LE.
CONDENSE L_OPENDUE_LE-DMBTR NO-GAPS.
L_TOTAL_TMP = L_TOTAL_TMP + L_OPENDUE_LE-DMBTR.
AT END OF KUNNR.
LOA_TOTALS-KUNNR = L_OPENDUE_LE-KUNNR.
LOA_TOTALS-LOA_TOTAL = L_TOTAL_TMP.
APPEND LOA_TOTALS.
CLEAR : L_TOTAL_TMP.
ENDAT.
ENDLOOP.
<font color="red">"* Get ageing data based slabs, and duedate.</font>
PERFORM AGEING_DATA.
LOOP AT L_BSID.
<font color="red">"* Move the data to final internal table.</font>
MOVE L_BSID-KUNNR TO FINAL_DATA-KUNNR.
MOVE L_LANDX TO FINAL_DATA-LANDX.
MOVE L_PSTLZ TO FINAL_DATA-PSTLZ.
MOVE L_NAME TO FINAL_DATA-NAME1.
MOVE L_PHONE TO FINAL_DATA-PHONE.
MOVE L_SORTL TO FINAL_DATA-SORTL.
MOVE L_BSID-ZTERM TO FINAL_DATA-ZTERM.
MOVE L_BUSAB TO FINAL_DATA-BUSAB.
READ TABLE LPD_TOTALS WITH KEY KUNNR = L_BSID-KUNNR.
IF SY-SUBRC EQ 0.
MOVE LPD_TOTALS-LPD_TOTAL TO FINAL_DATA-LPD_TOTAL.
ENDIF.
READ TABLE LOA_TOTALS WITH KEY KUNNR = L_BSID-KUNNR.
IF SY-SUBRC EQ 0.
MOVE LOA_TOTALS-LOA_TOTAL TO FINAL_DATA-LOA_TOTAL.
ENDIF.
READ TABLE AGE_DATA WITH KEY KUNNR = L_BSID-KUNNR.
IF SY-SUBRC EQ 0.
MOVE AGE_DATA-CURAMT TO FINAL_DATA-CURAMT.
MOVE AGE_DATA-AMT1 TO FINAL_DATA-AMT1.
MOVE AGE_DATA-AMT2 TO FINAL_DATA-AMT2.
MOVE AGE_DATA-AMT3 TO FINAL_DATA-AMT3.
MOVE AGE_DATA-AMT4 TO FINAL_DATA-AMT4.
MOVE AGE_DATA-AMT5 TO FINAL_DATA-AMT5.
MOVE AGE_DATA-AMT6 TO FINAL_DATA-AMT6.
ENDIF.
ENDIF.
APPEND FINAL_DATA.
CLEAR: FINAL_DATA.
ENDLOOP.
ENDFORM. <font color="red">" process_data</font>
</code></pre>
Maybe you are looking for
-
Issue in WS based on FM with data declared as TABLES
Dear all, I created enterprise WS with endpoint as function module. The FM has a date declared as TABLES. I see the table data under Output section of External and Internal view in SE80. Also the data is being exposed (check box set). However if I co
-
I'm using a netbook to sync my iphone and ipad. To upgrade to ios 5 it says i need 9 gb of space on my hard drive and i only have 7. I have another drive on my netbook that has 30 gb free. How do i get itunes to backup my ipad to that drive?
-
Want to enhance wifi strength - router in one room, wifi capable computer in another
I need to enhance the wifi signal in my home in order to utilize a wifi ready computer on another floor. The wifi indicates 2 out of 5 bars on the wifi indicator, but frequently loses the signal completely. I have several coaxial ports around the hou
-
Switching Sun Ray to one of two exicting servers
I have the same problem as (bugjuice )-I need to switch session on Sun Ray terminal between two servers depending wich card been insrted...I searched all sun blogs,read this posts but still can understand how to cinfigure AMGH and scritp,official man
-
The following is the message I am getting when I start Itunes. I have remove and reinstall itunes to no avail please help daughter got new ipod and wants to play with it. "The registry settings used by itunes fot importing and burning cds and DVD are