Division wise Aging for Customers
Hi,
Can we take division wise ageing for customers and add the division field at the time of payment entry(F-28)?
Thanks in advance
Hi
Use T code S_ALR_87012167. It depends on your organizational structure also
Regards
Sanil
Similar Messages
-
Hi
This is my first implementation project,Can u please help me in this...
1) A company is having cement division, foods division,construction divsion etc.
Let us say a vendor supplies material to different divisions.
Is there a way to find out the Vendor balance division wise and for the company as whole.
2) Also one more thing to where to enter the security deposit of the Dealers in the Cement division which should be show seperately from the regular balance
Please offer the feedback to my mail id [email protected]
Thanks
RajuHi Raju,
1. How have to defined these divisions in SAP in FI, is it Business Areas or enything else..
If business Area, use t code FBL1N and go to dynamic selection where you will have lots of criteria like BA, Plant, Div etc., give the values and run the report.
2. Use SPL GL indicators to show the advance balances in different GL Account (i have sent one doc. to your mail ID regarding the SPL GL indicator related config.)
Hope it helps
Regards
A.Saravanan. -
Division wise Separate numbering range required for invoices
Hi Gurus,
The requirement is Division wise Separate numbering range required for invoices. For e.g like 11 Steel Fabrication, 12 Aluminum Fab, 13 Carpentry & Join, 14 GRP/GRC, 15 Stone & Marble
Already a table ZSD_NUM_RANGE with fields like Client, Plant, Number range in the case of internal number assignment
Presently number range is based on plants.
I understand that Division field SPART is to be included in this table by using the exit given below:
User Exit For Billing
USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ)
The internal number range used in the standard system is specified in the billing type table and can be changed in this user exit. This user exit is only called when the billing documents is created.
May I know how far this is feasible to shift plant wise no. range to division wise no. range.?
Also if we do division wise number range, How about shifting to new invoice numbers in the middle of the FISCAL year?
Kindly revert back to me at your earliest.
Regards,
AnbuDear Anbu
Ideally speaking, invoice number range should be per plant and the user exit what you had indicated holds good. May be you can try with the same user exit.
thanks
G. Lakshmipathi -
How to do aging for Net Debit for 0DEB_CRE_LC
Hi to all,
i am doing aging for receivables(0FI_AR_4) for Net debit > 0.
I have created CKF excaption aggregation at query level to get Net debit greater than zero, via ( 0DEB_CRE_LC > 0 ) * 0DEB_CRE_LC for every customer.
it gives correct result .
but when i used aging via used of 0NETDUEDATE, for 1-10 and 11-30 bucket and i have restricted bucket with this CKF.
for some customer i get correct result if both debit and credit come is 1-10 bucket and net debit of this > 0.
But if customer debit come in 1-10 bucket and credit in 11-30 bucket it gives incorrect result.
how to do aging for such conditions.
Please can any one provide me solutions.
I shall be thankfull to you for this.
Regards
Pavneet RanaThanks for reply ,
my query format is like that
query rows = region and restricted with region value
query column = aging bucket 1-10 , 11-20, and every bucket is restricted with CKF 0DEB_CRE_LC > 0 and 0NETDUEDATE and division value
and drill down by customer and region
format looks like that
division1 division1 division1 division2 division2 division 2
1 - 10 11 - 20 21-30 1 - 10 11 - 20 21 - 30
Region1
Region2
so report purpose is to calculate aging for NET DEBIT VALUE .
so if i drill down by customer for net debit value, net debit value according to bucket is correct if debit and credit of customer lies in same bucket
and if customer credit and debit comes under different bucket net debit value is incorrect for bucket wise.
and if dont use aging bucket net debit value according to customer and region wise is getting correct , but i need aging also for net debit value.
please can you provide me solutions to get netdebit according to bucket wise for every customer , when drill down.
I shall be thankfull to you for this.
Regards
Pavneet Rana
Edited by: pavneet rana on Feb 7, 2011 3:02 PM -
SALES AREA IS NOT DEFINED FOR CUSTOMERS
dear All,
1.I got this error while creating Sales Order,
"Ship to Party x is not defined for Sales Area".
2. while creating Customer Master I got the following error.
"Sales Area xxxx 10 20 is not defined for customers,"
Can any body send soln ASAP.
Thanks and Regards
RAMSHi,
i think u have done this
Define Sales Area
SPRO
Enterprise Structure
Definition
Sales and Distribution
Maintain Sales Office
Go to New entries and define the sales office
Go to Address Icon and maintain the details and save it.
Now Maintainain Common distribution channel and common division. common distribution channel and division helps in sharing maste data effectively. Assure you have 10 sales areas. it will b painful process to define a customer at all these areas. instead, it will be wise to create a common distribution channe and division. this can be used as a ref dchnl and divn fo other dchnl and divns. then the master data can be effectivel shared
Go to Spro: Sales and distribution: Master Data : Define common division and disrtibution channel.
Hope this will help you.
Reward ?Point if helpful.
Thanks,
Raja -
Batch wise stock for a Purchase order
Here, i am receiving the goods from the customer for jobwork, while receiving the material (cloth) itself i wont receive the design what i have to print on the material.(For eg customer will send me some 5000 mtrs, he wont mention the design for that. but we have to give a lot number for the whole 5000 mtrs, then after 1 week he will give design for 2000 mtrs. and also he will tell 2000 mtrs 4 colors i have to divide that 2000 mtrs into 4 different batches and i have to bring it in to stock. and also i have to see the report that customer issued 5000 mtrs and for 2000 mtrs he had given program remaining 3000 mtrs he has to give program(Design)).
what i did is i created new doc type in PO (customer Cloth Receipt)
I made number range for that doc type as what they are currently maintaining now (so that number will be lot number, it will be the identification for that customer to track the material what he have supplied)
i created the new output type so that i can give the printout as an acknowledgement to customer
i created the customer as vendor
i did inbound delivery for that material what i have received (5000 mtrs) from customer(Vendor)
when i receive the program(design) for 2000 mtrs 4 different batches
i did GR against the inbound delivery so that while doing GR i can create 4 different batches and i can bring that 2000 mtrs into stock.
Pls guide me some steps where i can make this process simple......Hi Jurgen,
Thanks for your reply. I am not looking for any analysis report or LIS report.
i am looking for simple ageing report for a date entered by the user. I got the logic and tables for the current date but if i need to refer the stock ageing of previous date like my stock ageing at 30-06-2010. I am not able to get any tables where i can have the batch stock for a given date or a month.
The report output format to be
stock <=30 days
stock>30 and <=90
stock>90 and <=180
stock>180 days
The criteria for calculation will be the date entered by the user in the input screen. If the user enters the date as 30-06-2010 then all the stock received in the month of june and still lying in my storage location will fall the category <=30 and display in the report.
Stocks received in the month of march, april and may will fall under the category "stock >30 and <=90".
If I can get the batch wise stock for a particular month , I can pick the posting date of the Goods receipt from the batch number and calcuate my ageing (i.e date entered in the input scren of the report 30-06-2010 - batch posting date).
I am also referring to the note which you have sent but in the mean while if you can help me to identify the tables where I can get the batch stock for a particular month.
Thanks
Fazal. -
Regarding GL account in FICO for Customers
Hi,
I have a requirement to generate a report where i have to get the opening balance of customers month wise.I can find reconcilation account for customers ,but i have to get the individual customers opening and closing balances.Fico consultants please provide me how to find the gl account for particular customers or opening balaneces.
With Thanks,
Dinamolyou'll find all rec-accounts in skb1 with field mitkz = D
2) for openeing balance use table knc1
A. -
QUERY FOR CUSTOMERS FULL DEBIT AND CREDIT WITH CLOSING BALANCE
Hi Friends,
I need query for CUSTOMERS FULL DEBIT AND CREDIT WITH CLOSING BALANCE for selection criteria from date and to date.
I know the Trial Balance Report will sort out this issue... but i need routeday wise report
1. Business Partner Master Data - i created one UDF field called U_Routeday (MONDAY, TUESDAY, WEDNESDAY,THURSDAY,FRIDAY)
2. The query should be like selection criteria
- Routeday [%0]
- Posting Date [%1]
- Posting Date [%2]
CardCode
Debit
Credit
Balance
D10503
25031.50
24711.50
2962.00
D10641
5466.00
7460.00
285.00
D10642
2866.00
142.00
give any helpful query ASAP... Thanks in advanceHi,
Try this query:
Declare
@fromdate as datetime
Declare
@Todate as datetime
Declare
@Code as nvarchar(25)
set
@fromdate = ( select min(Ta.[RefDate]) from OJDT ta where
Ta.[RefDate] >= [%0])
set
@Todate = ( select max(Tb.[RefDate]) from OJDT tb where Tb.[RefDate]
<= [%1])
set
@code = (select max(Tc.[ShortName]) from JDT1 tC where Tc.[ShortName]
= [%2])
SELECT
[Name] as AcctName, [Jan]= sum([1]), [Feb]= sum([2]), [Mar]=
sum([3]), [Apr]= sum([4]), [May]= sum([5]), [June]= sum([6]),
[July]= sum([7]), [Aug]= sum([8]), [Sept]= sum([9]), [Oct]=
sum([10]), [Nov]= sum([11]), [Dec]= sum([12]), total = sum
(isnull([1],0)+ isnull([2],0) + isnull([3],0) + isnull([4],0) +
isnull([5],0) + isnull([6],0) + isnull([7],0) + isnull([8],0) +
isnull([9],0)+ isnull([10],0) + isnull([11],0) + isnull([12],0))
from
(SELECT
T0.[ShortName] as Name, sum(T0.[Debit]-T0.[Credit]) as T,
month(T2.[RefDate]) as month FROM JDT1 T0 INNER JOIN OACT T1 ON
T0.Account = T1.AcctCode INNER JOIN OJDT T2 ON T0.TransId =
T2.TransId WHERE T2.[RefDate] between @fromdate and @todate and
T0.[ShortName] = @code GROUP BY T0.[ShortName],T2.[RefDate] ) S
Pivot
(sum(T)
For Month IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
group
by [Name],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]
Let me know your result.
Thanks & Regards,
Nagarajan -
Supplier Wise Aging Report As of Date
Hi,
We are on 12.1.3
I have wrote a query to find the Supplier Wise Aging Report .But it is not working for back date i.e if we applied Amount 1000 today, in report patameter if a pass the value from to yesterday date - report should display sum of all aging. If we gave till today.. the value should be 1000 less
My Query:
SELECT yy.vendor_name, yy.vendor_id vendor_num, yy.segment1,
yy.SUM remaining_advance_amount, yy.less30, yy.greater30,
yy.greater60, yy.greater90, yy.greater120
-- (SELECT COUNT (1)
-- FROM ap_invoices_all aia
-- WHERE aia.cancelled_date IS NULL
-- AND aia.vendor_id = yy.vendor_id
-- AND TRUNC (aia.invoice_date) BETWEEN :p_from_date AND :p_to_date
-- AND aia.amount_paid <> aia.invoice_amount) out_stnd_bill,
-- (SELECT SUM (NVL (apd.prepay_amount_remaining, 0))
-- FROM ap_invoices_all aib,
-- ap_invoice_distributions_all apd
-- WHERE aib.cancelled_date IS NULL
-- AND aib.vendor_id = yy.vendor_id
-- AND aib.invoice_id = apd.invoice_id
-- AND apd.reversal_flag = 'N'
-- AND TRUNC (aib.invoice_date) BETWEEN :p_from_date AND :p_to_date
-- AND aib.invoice_type_lookup_code = 'PREPAYMENT') on_ac_amount
FROM (SELECT xx.vendor_name, xx.vendor_id, xx.segment1,
SUM (NVL (xx.less_30, 0)) less30,
SUM (NVL (xx.greater_30, 0)) greater30,
SUM (NVL (xx.greater_60, 0)) greater60,
SUM (NVL (xx.greater_90, 0)) greater90,
SUM (NVL (xx.greater_120, 0)) greater120,
( SUM (NVL (xx.less_30, 0))
+ SUM (NVL (xx.greater_30, 0))
+ SUM (NVL (xx.greater_60, 0))
+ SUM (NVL (xx.greater_90, 0))
+ SUM (NVL (xx.greater_120, 0))
) SUM
FROM (SELECT c.vendor_name, c.vendor_id, c.segment1,
(CASE
WHEN ((SYSDATE) - TRUNC (b.invoice_date) <=
30
THEN NVL (( NVL (b.invoice_amount, 0)
- NVL (b.prepay_amount_applied,
0
0
ELSE 0
END
) less_30,
(CASE
WHEN ((SYSDATE) - TRUNC (b.invoice_date)
BETWEEN 31
AND 60
THEN NVL (( NVL (b.invoice_amount, 0)
- NVL (b.prepay_amount_applied,
0
0
ELSE 0
END
) greater_30,
(CASE
WHEN ((SYSDATE) - TRUNC (b.invoice_date)
BETWEEN 61
AND 90
THEN NVL (( NVL (b.invoice_amount, 0)
- NVL (b.prepay_amount_applied,
0
0
ELSE 0
END
) greater_60,
(CASE
WHEN ((SYSDATE) - TRUNC (b.invoice_date)
BETWEEN 91
AND 120
THEN NVL (( NVL (b.invoice_amount, 0)
- NVL (b.prepay_amount_applied,
0
0
ELSE 0
END
) greater_90,
(CASE
WHEN ((SYSDATE) - TRUNC (b.invoice_date) >
120
THEN NVL (( NVL (b.invoice_amount, 0)
- NVL (b.prepay_amount_applied,
0
0
ELSE 0
END
) greater_120
FROM ap_payment_schedules_all a,
ap_invoices_v b,
po_vendors c
WHERE a.invoice_id = b.invoice_id
AND b.vendor_id = c.vendor_id
AND b.invoice_type_lookup_code = 'PREPAYMENT'
-- AND a.amount_remaining <> 0
AND TRUNC (b.invoice_date) BETWEEN :p_from_date
AND :p_to_date
AND b.cancelled_date IS NULL
--AND c.segment1 = 837
ORDER BY c.vendor_name) xx
GROUP BY xx.vendor_name, xx.vendor_id, xx.segment1) yy
ORDER BY yy.vendor_name;Hi Octavio,
As per this note 1290116.1.
There is no replacement for this table
Thanks
Vishwa -
Batch wise stock for a given period or month
Hi,
My company wants to implement stock ageing report in MM.
We manage the stocks in Batches. For us the main criteria for stock ageing is batch creation date.
The report should run stock ageing based upon the date range given as an input screen
For ex : date range in input can be of today or as of 30.06.2010.
If the report is run as of today then I am able to get the batch stock from table MCHB . Quantity from field "CLABS" and the batch creation date from the field "ERSDA"
But if the report to be run as of 30-06-2010. Then I am not able to get the data from MCHBH as of 30.06.2010.
I have checked for one material in the table and as per stock it should be 351 as of 30-06-2010 but in the MCHBH table for the month 06. year 2010 it is showing as 136 pcs only.
As our LIS tables are not getting populated correctly I am not able to check those tables too.
Can any one guide me with the logic or the table where I can get the batch stocks for a particular month.
I need Material, Batch, Quantity month and year .
Please advice how can i get the data and from which table.
Thanks you for your support in advance.
Regards
FazalHi Jurgen,
Thanks for your reply. I am not looking for any analysis report or LIS report.
i am looking for simple ageing report for a date entered by the user. I got the logic and tables for the current date but if i need to refer the stock ageing of previous date like my stock ageing at 30-06-2010. I am not able to get any tables where i can have the batch stock for a given date or a month.
The report output format to be
stock <=30 days
stock>30 and <=90
stock>90 and <=180
stock>180 days
The criteria for calculation will be the date entered by the user in the input screen. If the user enters the date as 30-06-2010 then all the stock received in the month of june and still lying in my storage location will fall the category <=30 and display in the report.
Stocks received in the month of march, april and may will fall under the category "stock >30 and <=90".
If I can get the batch wise stock for a particular month , I can pick the posting date of the Goods receipt from the batch number and calcuate my ageing (i.e date entered in the input scren of the report 30-06-2010 - batch posting date).
I am also referring to the note which you have sent but in the mean while if you can help me to identify the tables where I can get the batch stock for a particular month.
Thanks
Fazal. -
Creation of Sales org views for customers related to vendor
Hello All,
Can any body tell me is there any functional module which can be used to created the sales org views for customers related to vendors.
Regards
SrinivasHi Ravi,
the number of sales area possible would be 6 sales area,
yes you can of course use the common master data functionality
After creating the organizational structure and relevant master records you want to use as the masters, that is, in the distribution channels and divisions you are going to use as a reference, you can group distribution channels and divisions separately for master data (which combines customer master and material master records), group condition records, or both master data and condition records.
Letu2019s say you have a product range that is not different for the four different distribution channels you have (the channels could be telesales, retail, industry, and wholesale.) Neither is there a difference in the customersu2019 details when they purchase through one or the other. Thus, you will not want to create a multiple of four views of customer master and material master records. Merely create the customer master records and material master records in one of the distribution channels, such as retail. Then assign the other distribution channels you created in the organizational structure setup to this one.
Donu2019t forget this means you can only create or change master data in the distribution channel that is being referenced. In the scenario above, this means you can only change data for the retail distribution channel. Even if you should access a customer or material master in change mode, press F4 (possible entries), and select telesales, industry, or wholesale, you will receive a message u201CSales area is not defined . . . u201D
The same is true for the sharing of conditions. If conditions are shared, you need only create a condition in the distribution channel or division you are using as the reference. Obviously, this only pertains to conditions that have the distribution channel and/or division in their key, such as a price based on sales area
Revert if helpful
Mohit Singh -
In Import Purchase process how to get the report for division wise purchase,
some material from USA some from France, and some other countries
we need to get country wise purchase reports. how it will be possible in sapUse report MC$4,here enter purchase organization,_vendor country_,vendor,plant & finally period.
-
dear expert all
parameter from date to to date , project code
one of my client requriment i have need project code wise aging report .
send me the query.Hi Zal....
Very Good Afternoon.........
The question was simple. Sinha was simply asking about the Project code wise aging report. If I'm not wrong then for every marketing document level, on header level as well as on row level the project code field is there with the help of which we can categorise the transactions. So if sinha is doing billing as per the project code then he can get the project code wise aging report.
Even you can get the project code wise trial balance sheet also............
Regards,
Rahul -
Accounts Receivable Report: Customer Wise Ageing Analysis report -FI module
Hi Gurus,
Can anyone help me in providing standard report(source code) or already done sample report(source code) for Accounts Receivable Report: Customer Wise Ageing AnalysisThis is in FI Module. Though it is FI Module we need to fetch details related to Sales Module, and the days should be <0 30 60 90 120 180 365 >365
It is urgent I need to deliver this report by this week end.
Please help me . Waiting for your reply.
Points Rewarded for help rendered and I would personally send a good gift if you can help me
Yours Truly,
Rajiv Christopher.
Edited by: Rajiv Christopher on Apr 2, 2008 11:33 AMHi,
i am attaching aging report.
see if this is useful to you.
REPORT ZFUS0102 MESSAGE-ID OA
LINE-SIZE 270.
Title: GR/IR AGING REPORT
Date: January 2001
TABLES: DISVARIANT, EKPO.
TYPE-POOLS: SLIS.
Tables
TABLES:
BSIS,
EKKO.
working table
DATA: BEGIN OF RTAB OCCURS 0,
HKONT LIKE BSIS-HKONT,
ZUONR LIKE BSIS-ZUONR,
BUDAT LIKE BSIS-BUDAT,
SHKZG LIKE BSIS-SHKZG,
DMBTR LIKE BSIS-DMBTR,
PRCTR LIKE BSIS-PRCTR,
END OF RTAB.
DATA: BEGIN OF WTAB OCCURS 0,
ZUONR(2) TYPE N,
PRCTR LIKE BSIS-PRCTR,
DAYS(4) TYPE P,
DMBTR LIKE BSIS-DMBTR,
END OF WTAB.
DATA: BEGIN OF PTAB OCCURS 0,
ZUONR(2),
PRCTR LIKE BSIS-PRCTR,
AMT30 LIKE BSIS-WRBTR,
AMT60 LIKE BSIS-WRBTR,
AMTPL LIKE BSIS-WRBTR,
TOTAL LIKE BSIS-WRBTR,
END OF PTAB.
PARAMETERS: COMPANY LIKE BSIS-BUKRS OBLIGATORY,
ACCT LIKE BSIS-HKONT OBLIGATORY,
DATE LIKE SY-DATUM OBLIGATORY.
SELECT-OPTIONS: S_EKORG FOR EKKO-EKORG.
PARAMETERS: P_VARI LIKE DISVARIANT-REPORT.
DATA: WS-AMT30 LIKE BSIS-WRBTR.
DATA: WS-AMT60 LIKE BSIS-WRBTR.
DATA: WS-AMTPL LIKE BSIS-WRBTR.
DATA: TITLE(21) VALUE 'GR/IR Aging Report'.
DATA: LIN TYPE I.
DATA: GX_VARIANT LIKE DISVARIANT,
G_VARIANT LIKE DISVARIANT.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
L_F TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GROUP TYPE SLIS_T_SP_GROUP_ALV WITH HEADER LINE,
COLOR TYPE SLIS_T_SPECIALCOL_ALV WITH HEADER LINE.
DATA: LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
LS_LINE TYPE SLIS_LISTHEADER,
T_EVENTS TYPE SLIS_T_EVENT.
CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
INITIALIZATION.
PERFORM EVENTTAB_AUFBAUEN USING T_EVENTS[].
PERFORM VARIANT_INIT.
Get default variant
GX_VARIANT = G_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = 'A'
CHANGING
CS_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 0.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
PERFORM VARIANT_INPUTHELP_F14.
START-OF-SELECTION.
LS_LINE-TYP = 'S'.
WRITE SY-DATUM TO LS_LINE-INFO DD/MM/YY.
WRITE SY-UZEIT TO LS_LINE-INFO+10.
WRITE SY-UNAME TO LS_LINE-INFO+20.
WRITE TITLE TO LS_LINE-INFO+30.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
PERFORM FIELDS.
IF NOT P_VARI IS INITIAL.
PERFORM PAI_OF_SELECTION_SCREEN.
ELSE.
CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
EXPORTING
I_DIALOG = ' '
I_USER_SPECIFIC = 'A'
I_DEFAULT = ' '
I_TABNAME_HEADER =
I_TABNAME_ITEM =
IT_DEFAULT_FIELDCAT = L_F[]
I_LAYOUT = LAYOUT
IMPORTING
E_EXIT =
ET_FIELDCAT = L_F[]
ET_SORT =
ET_FILTER =
CHANGING
CS_VARIANT = DISVARIANT
EXCEPTIONS
WRONG_INPUT = 1
FC_NOT_COMPLETE = 2
NOT_FOUND = 3
PROGRAM_ERROR = 4
OTHERS = 5.
ENDIF.
Decide which tables to access.
PERFORM MAIN_SELECT.
MOVE TITLE TO LAYOUT-WINDOW_TITLEBAR.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZFUS0102'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = L_F[]
IT_SPECIAL_GROUPS = GROUP[]
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
IT_EVENTS = T_EVENTS
TABLES
T_OUTTAB = PTAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM FIELDS *
FORM FIELDS.
L_F-FIELDNAME = 'ZUONR'.
L_F-OUTPUTLEN = 6.
L_F-SELTEXT_L = 'SERIES'.
L_F-REPTEXT_DDIC = 'SERIES'.
L_F-REF_TABNAME = 'PTAB'.
L_F-SP_GROUP = 'A'.
APPEND L_F. CLEAR L_F.
L_F-FIELDNAME = 'PRCTR'.
L_F-OUTPUTLEN = 10.
L_F-SELTEXT_L = 'PROFIT CTR.'.
L_F-REPTEXT_DDIC = 'PROFIT CTR.'.
L_F-REF_TABNAME = 'PTAB'.
L_F-SP_GROUP = 'A'.
APPEND L_F. CLEAR L_F.
L_F-FIELDNAME = 'AMT30'.
L_F-SELTEXT_L = '30 DAYS'.
L_F-REPTEXT_DDIC = '30 DAYS'.
L_F-REF_TABNAME = 'PTAB'.
L_F-SP_GROUP = 'A'.
L_F-REF_TABNAME = 'BSIS'.
L_F-REF_FIELDNAME = 'WRBTR'.
L_F-DO_SUM = 'X'.
APPEND L_F. CLEAR L_F.
L_F-FIELDNAME = 'AMT60'.
L_F-SELTEXT_L = '60 DAYS'.
L_F-REPTEXT_DDIC = '60 DAYS'.
L_F-REF_TABNAME = 'PTAB'.
L_F-SP_GROUP = 'A'.
L_F-REF_TABNAME = 'BSIS'.
L_F-REF_FIELDNAME = 'WRBTR'.
L_F-DO_SUM = 'X'.
APPEND L_F. CLEAR L_F.
L_F-FIELDNAME = 'AMTPL'.
L_F-SELTEXT_L = '60+ DAYS'.
L_F-REPTEXT_DDIC = '60+ DAYS'.
L_F-REF_TABNAME = 'PTAB'.
L_F-SP_GROUP = 'A'.
L_F-REF_TABNAME = 'BSIS'.
L_F-REF_FIELDNAME = 'WRBTR'.
L_F-DO_SUM = 'X'.
APPEND L_F. CLEAR L_F.
L_F-FIELDNAME = 'TOTAL'.
L_F-SELTEXT_L = 'TOTAL'.
L_F-REPTEXT_DDIC = 'TOTAL'.
L_F-REF_TABNAME = 'PTAB'.
L_F-SP_GROUP = 'A'.
L_F-REF_TABNAME = 'BSIS'.
L_F-REF_FIELDNAME = 'WRBTR'.
L_F-DO_SUM = 'X'.
APPEND L_F. CLEAR L_F.
ENDFORM.
FORM MAIN_SELECT *
FORM MAIN_SELECT.
SELECT HKONT ZUONR BUDAT SHKZG DMBTR PRCTR
INTO TABLE RTAB
FROM BSIS
WHERE BUKRS = COMPANY
AND HKONT = ACCT.
IF SY-SUBRC = 0.
SORT RTAB.
PERFORM PROCESS_RTAB.
PERFORM PROCESS_WTAB.
ENDIF.
ENDFORM. " MAIN SELECT
FORM VARIANT_INPUTHELP_F14 *
FORM VARIANT_INPUTHELP_F14.
DATA: G_EXIT(1) TYPE C.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = G_VARIANT
I_SAVE = 'A' " g_save
it_default_fieldcat =
IMPORTING
E_EXIT = G_EXIT
ES_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF G_EXIT = SPACE.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM.
FORM USER_COMMAND *
--> UCOMM *
--> SELFIELD *
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
SLIS_SELFIELD.
IF UCOMM EQ '&IC1'.
IF SELFIELD-TABINDEX <= 0.
MESSAGE S108.
EXIT.
ENDIF.
IF SELFIELD-SEL_TAB_FIELD CS 'LIFNR'.
SET PARAMETER ID 'LIF' FIELD SELFIELD-VALUE.
CALL TRANSACTION 'XK02'.
ELSE.
IF SELFIELD-SEL_TAB_FIELD CS 'VEND'.
SET PARAMETER ID 'LIF' FIELD SELFIELD-VALUE.
CALL TRANSACTION 'FBL1'.
ENDIF.
ENDIF.
CLEAR SY-UCOMM. CLEAR UCOMM.
ENDIF.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LT_TOP_OF_PAGE.
ENDFORM.
FORM EVENTTAB_AUFBAUEN *
--> P_T_EVENTS *
FORM EVENTTAB_AUFBAUEN USING P_T_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_T_EVENTS.
READ TABLE P_T_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO P_T_EVENTS.
ENDIF.
ENDFORM. " EVENTTAB_AUFBAUEN
FORM PAI_OF_SELECTION_SCREEN *
FORM PAI_OF_SELECTION_SCREEN.
IF NOT P_VARI IS INITIAL.
MOVE G_VARIANT TO GX_VARIANT.
MOVE P_VARI TO GX_VARIANT-VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
I_SAVE = 'A' " g_save
CHANGING
CS_VARIANT = GX_VARIANT.
G_VARIANT = GX_VARIANT.
ELSE.
PERFORM VARIANT_INIT.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
FORM VARIANT_INIT *
FORM VARIANT_INIT.
CLEAR G_VARIANT.
G_VARIANT-REPORT = 'ZFUS0102'.
ENDFORM. " VARIANT_INIT
*& Form PROCESS_RTAB
text
--> p1 text
<-- p2 text
FORM PROCESS_RTAB.
DATA TLNS TYPE I.
DESCRIBE TABLE S_EKORG LINES TLNS.
LOOP AT RTAB.
IF TLNS GT 0.
SELECT SINGLE EKORG FROM EKKO INTO EKKO-EKORG
WHERE EBELN = RTAB-ZUONR(10).
CHECK EKKO-EKORG IN S_EKORG.
ENDIF.
IF NOT RTAB-BUDAT > DATE.
MOVE RTAB-ZUONR(2) TO WTAB-ZUONR.
COMPUTE WTAB-DAYS = DATE - RTAB-BUDAT.
IF RTAB-SHKZG = 'H'.
WTAB-DMBTR = RTAB-DMBTR * -1.
ELSE.
WTAB-DMBTR = RTAB-DMBTR * 1.
ENDIF.
MOVE RTAB-PRCTR TO WTAB-PRCTR.
APPEND WTAB.
ENDIF.
ENDLOOP.
FREE RTAB.
ENDFORM. " PROCESS_RTAB
*& Form PROCESS_WTAB
text
--> p1 text
<-- p2 text
FORM PROCESS_WTAB.
SORT WTAB BY ZUONR PRCTR DAYS.
LOOP AT WTAB.
PTAB-ZUONR = WTAB-ZUONR.
PTAB-PRCTR = WTAB-PRCTR.
AT END OF DAYS.
SUM.
IF WTAB-DAYS > 60.
WS-AMTPL = WS-AMTPL + WTAB-DMBTR.
ELSE.
IF WTAB-DAYS > 30.
WS-AMT60 = WS-AMT60 + WTAB-DMBTR.
ELSE.
WS-AMT30 = WS-AMT30 + WTAB-DMBTR.
ENDIF.
ENDIF.
ENDAT.
AT END OF PRCTR.
PTAB-AMTPL = WS-AMTPL.
PTAB-AMT30 = WS-AMT30.
PTAB-AMT60 = WS-AMT60.
COMPUTE PTAB-TOTAL = PTAB-AMTPL + PTAB-AMT30 + PTAB-AMT60.
APPEND PTAB.
WS-AMTPL = 0.
WS-AMT30 = 0.
WS-AMT60 = 0.
ENDAT.
ENDLOOP.
SORT PTAB BY ZUONR PRCTR.
ENDFORM. " PROCESS_WTAB
regards,
Sindhu -
hi gurus,
my clients want to assess their profitability division wise. i am confused as to what should be the character and the value fields.. since i dont see any option in both the forms saying " division" is that i hav to create it..
i wud really appreciate ur response
regrards
sayeedHi,
Can you be little elaborative on whats meaning of Division... Is Sales Division is ur concern? Activate Sales division characteristic in the operating concern. There wont any direct assignment of Division to value field.
If its not sales division, then u can go and create a newcharactristic and set up the derivation for this characteristic.. KES1 and KEDR u can refer...
Regards
Sudhakar Reddy
Maybe you are looking for
-
How do you combine two pictures?
Not "ghost" them as transparancies, but cut out an image and put it over another?
-
What is the point of the Mail Activity pane (vs. Window Activity)?
I was happy to see this new little pane in the lower left corner, but I have yet to actually see it display anything. The old, separate Activity Window still shows everything in great detail, but I'd prefer the more compact version... if that's what
-
How to represent a -1 numeric value with text?
Hi All, Question: How do I get the value of negative one (-1) in a numeric column to display as "all"? Background: For our lottery players, they are able to opt in to various automated alerts. One column is an integer value representing one of five
-
Hi, How we set up the company code for training event management ? Currently one company code is activated for TEM , business want all company code need to be activated for TEM. Please suggest . Regards Yogesh
-
How can I control the width of an inputText and commandButton components
I need to set the width for both <af:inputText/> and <af: CommandButton/> , but I couldn’t find the width property in the “Property inspector” for them, Is there a way to do it ? Thanks.