Reversal of +/- sign in report painter
Hi everyone,
I have created an EC-PCA report using Report Painter. There are the usual coloumns Actual Data, Plan Data,
Absolute Deviation and Deviation as a percentage of plan data. In the upper part of the report rows the revenue elements are
displayed, while the cost elements are displayed below them. Since the users didn't like the revenue accounts being displayed
with a negative sign (standard), I activated the reversal of the sign for the revenue part of the rows. But this reversal
does not have any effect on the values in the coloumns showing the relative deviation, i.e. they have the wrong sign.
Is there a possibility to reverse the values in the cells defined by the rows with revenue accounts and the coloumn
of relative deviation, but leaving the values in the rows with costing accounts unaffected?
Thanx,
Fred
Yes, but that would also reverse the sign folr the rows containing the cost elements, which should be unchanged.
Meanwhile I have found the solution. The formula for the coloumn "Variance in %" - formerly: (( X002 - X003 ) / X003 ) * 100 - must be changed as follows: (( X002 - X003 ) / ABS (X003) ) * 100.
Regards,
Fred
Similar Messages
-
Reverse +/- sign in report painter
Hi all,
When I make report painter, I can only define reverse +/- sign for whole row or column. I can't define +/- for each cell in one column. It is really a problem. How can I do?
Thanks a lotcan anyone help me, please?
-
How to Supress -ve sign in report painter output
Dear All,
I have developed a balance sheet using the report painter. The client wants to suppress the negative sign in the output. Is there any option to do this?
Regards,
Karthikhi,
The no-zero addition suppresses leading zeros when used with type c or type n variables. In the case of a zero value, the output is all blanks.
The no-sign addition, when used with variables of type i, p, or f, suppresses the output of the sign character. In other words, negative numbers will not have a sign and will appear as if they were positive.
report xyz.
data: c1(10) type c value '000123',
n1(10) type n value 123,
n2(10) type n value 0,
i1 type i value '123-',
i2 type i value 123.
write: / c1, 20 'type c',
/ c1 no-zero, 20 'type c using no-zero',
/ n1, 20 'type n',
/ n1 no-zero, 20 'type n using no-zero',
/ n2, 20 'type n: zero value',
/ n2 no-zero, 20 'type n: zero value using no-zero',
/ i1, 20 'type i',
/ i2 no-sign, 20 'type i using no-sign'.
output.........
000123 type c
123 type c using no-zero
0000000123 type n
123 type n using no-zero
0000000000 type n: zero value
type n: zero value using no-zero
123- type i
123 type i using no-sign
reward if helpfull -
Supress the -ve sign in report painter report - VERY URGENT
Hi
In a report painter report, can anybody please let me know how to display a negative value, for example, "-1234.56" as "(1234.56)".
IT IS VERY URGENTCheck If value is less than 0,
then replace '-' with space ( to remove the '-' from the right end) and then Concatenate '-' and value into a variable.
Regards
Raj -
Report painter - Reverse signs
Hi,
I want to change a report using the report painter. There is one specific line that I want to reverse signs, i.e. if the value is actually 2,500, I want it to be 2,500-.
I'm trying to select this specific line by clicking on it and then F9 (Select/deselect). Then, I click on F7 (Reverse signs) and I get the message «Signs are reversed for the selected area».
But the result is not good. It changes ALL the signs of every possible line, and not only the signs that I selected using F9.
Thanks,
JulienHi,
Using f7 u can reverse balance of all not for individual.
Means If a row bal is cr(-), then it will become Dr(+) and
if it is Dr(+) it will become Cr (-).
In short sigen of any cell depends on row characteristic balance.
If u r not able to clarify your doubt please sendus detail query like wether u r using GR31 tcode or else.
Regards,
Pari -
Hi All,
While creating a row in report painter,i have selected character and created a row gross sales.Now if i would like to assign a formula how do i do it.
Regards
SarasI dont think thats possible. You have to create another row as formula. A formula row have to get a base line. And the baseline should be based on another Characteristic row. But you can choose to hide the Characteristics line if u dont want to show the details just the totals.
But there are other ways to do it like setting the charateristics setting to N- No explode to get a total, you dont have to create a row formula, you can also change the row format to reverse sign +/- -
Report Painter Report Form Query
Dear All,
I have developed report painter change form with fsi6 .TCode and "form" type is financial statement Key figures.
My query is that i need difference or two rows with minimum values but no negative values to be displayed. example should be
row1 figure -1
row2 figure 2
row3 difference of row1 & row2 figure 0
Kindly suggest with proper solutions.
Thanks in advance
UsmanHi Usman,
Salaam!!
You can at best supress the zero values or reverse the signs.. But you cant display -ve values as zero in report painter
Regards
Ajay M -
Report Painter - Download Capabilities
Greetings - Does anyone have any experience in downloading reports in bulk from Report Painter? The scenario is that we want to create a new CO report, Plan vs. Actual by cost center in a different format then SAP standard. We then want to be able to run the report for all cost centers and then have each one downloaded at the same time individually so we can then send them out to each Manager of the individual cost center.
If anyone has any insights to this, that would be great.
Thanks,
Jimhttp://www.sap-img.com/sap-fi.htm
<b>Report Painter</b>
Report Painter, How to reverse +/- signs
Library for Report Painter/Writer
Rept Painter, changing the tables assigned to libraries
Report Painter, Relationship with Rept Grps & Repts
Regards,
Rajesh Banka
Reward points if helpful. -
Hi All,
I have an issue on report painter report (KE30 Report). Following are the details. Any help on this will be highly appreciated.
I am looking at KE30 P&L report, this report has been built using Key Figure Scheme, formulas for the report have been defined at transaction KER1.
We have formula defined for calculating Variace as Budget - Actual. In the output of the report values of Variaces rows are showing incorrectly.
The problem is.....for example say for Raw Material, budget and actual figures are........
Raw Material Budget = 1000 USD
Raw Material Actual = 500 USD
As per the above formula report should show Raw Material Variance as 500 USD, instead it is displaying -500 USD (minus value).
The above problem persists only for Variances Rows (around 10 rows), report is showing minus value when it should show plus value and viceversa.
Report is good in Quality system, have problem in production system only.
Request your help in resolving the above.
Thanks in advance.
Regards
AnilHi Mr Jagannadha Sastry,
Many Thanks for your reply.
I have verified both my Quality and Production systems in both the places radio button for sign reversal is set at NOT DEFINED. Since I have already mentioned my Quality System in working fine. If this is the issue there should be a mismatch in the config setting, hence i don't think this is causing the problem.
Once again thanks for your kind gesture in giving prompt reply.
Request you to pass on if you have some other clues/ideas.
Thanks
Anil -
Line Items missing in report painter report..
Hi guri's,
Iam uisng customized P&L report painter report using with library 1VK....in this report some line items are not shwoing..... how to solve it...
regars
JKAfter you've create a P&L report using the report painter, you would also have to create line item reports for example 'Receiver- Profit Center Line Items' and then assign these line items reports under 'Report/Report Interface' in the P&L report.
How to do this:
1. After creating the line item report(s), use transaction code GR52 which is for change report group. Enter the P&L report group and click enter.
2. Under 'Report/Report Interface', click on 'configure' under assigned report to library.
3. In the pop-up screen, click on the green plus sign "Insert Row"
4. Another screen will pop-up. Enter the report group for the line items report and enter.
5. Save
6. Regenerate your report group. After regeneration, execute.
7. Drill-down in the displayed P&L report to the line items.
Don't hestitate to ask for further clarifications.
Elias -
Customer Ageing - Report Painter
Hi,
Can any tell whether we can achieve the customized reports for the customer ageing (Txn: S_ALR_870121276) through report painter. If so can i get any help for the steps to be followed /material regarding this.
Regards,
Nagendra Prasad.JThis is one aging report.. have a look at it and see if its useful.
This displays cusomer and vendor aging report.
Award points if useful.
REPORT zgar_ic_custvend_aging NO STANDARD PAGE HEADING
LINE-SIZE 192
MESSAGE-ID zz
LINE-COUNT 65.
Data declaration *
TABLES: bsik, "Secondary Index for Vendors
t880, "Global Company Data
t001s, "Accounting Clerks
t001. "Company Codes
Internal table declaration. *
*Store data from vendor tables (BSIK, BSAK).
DATA: BEGIN OF g_t_venddata OCCURS 0,
bukrs LIKE bsak-bukrs, "Company code
lifnr LIKE bsak-lifnr, "Vendor number
gjahr LIKE bsak-gjahr, "Fiscal year
zuonr LIKE bsak-zuonr, "Assignment number
shkzg LIKE bsak-shkzg, "Debit/credit indicator
dmbtr LIKE bsak-dmbtr, "Amount in local currency
dmbe2 LIKE bsak-dmbe2, "Amount in global currency
belnr LIKE bsak-belnr, "Document number
augdt LIKE bsak-augdt, "Clearing date
augbl LIKE bsak-augbl, "Doc. no. of clearing document
budat LIKE bsak-budat, "Posting date
hkont LIKE bsak-hkont, "GL account
waers LIKE bsak-waers, "Currency key
xblnr LIKE bsak-xblnr, "Document number
acctp TYPE c, "Account type. D or K
name1 LIKE kna1-name1, "Comp nmae
END OF g_t_venddata.
*Store data from customer tables (BSID, BSAD).
DATA: BEGIN OF g_t_custdata OCCURS 0,
kunnr LIKE bsad-kunnr, "Customer Number
bukrs LIKE bsad-bukrs, "Company Code
gjahr LIKE bsad-gjahr, "Fiscal year
augdt LIKE bsad-augdt, "clearing date
zuonr LIKE bsad-zuonr, "Assignment number
belnr LIKE bsad-belnr, "acct doc no
name1 LIKE lfa1-name1, "name from cust master
budat LIKE bsad-budat, "posting date
bldat LIKE bsad-bldat, "document date
xblnr LIKE bsad-xblnr, "document number
shkzg LIKE bsad-shkzg, "debit/credit indicator
dmbtr LIKE bsad-dmbtr, "local currency
dmbe2 LIKE bsad-dmbe2, "Group currency
waers LIKE bsad-waers, "Currency key
hkont LIKE bsad-hkont, "GL account
acctp TYPE c, "Account type D/K
END OF g_t_custdata.
*Store data according to age category.
DATA: BEGIN OF g_t_maintab OCCURS 0,
bukrs LIKE bsad-bukrs, "Company Code
tpart(10) TYPE c, "Trading partner
acctp TYPE c, "Account type D/K
gjahr LIKE bsad-gjahr, "Fiscal year
augdt LIKE bsad-augdt, "clearing date
zuonr LIKE bsad-zuonr, "Assignment number
belnr LIKE bsad-belnr, "acct doc no
name1 LIKE lfa1-name1, "name from cust master
budat LIKE bsad-budat, "posting date
bldat LIKE bsad-bldat, "document date
xblnr LIKE bsad-xblnr, "document number
shkzg LIKE bsad-shkzg, "debit/credit indicator
dmbtr LIKE bsad-dmbtr, "local currency
hkont LIKE bsad-hkont, "GL account
bktxt LIKE bkpf-bktxt, "Document header text
butxt LIKE t001-butxt, "company name
waers LIKE bsad-waers, "Currency key
balamt TYPE dmbtr, "balance amount
amount1 TYPE dmbtr, "Amount for category 1
amount2 TYPE dmbtr, "Amount for category 2
amount3 TYPE dmbtr, "Amount for category 3
amount4 TYPE dmbtr, "Amount for category 4
END OF g_t_maintab.
*Store all the vendor numbers
DATA: BEGIN OF g_t_vend OCCURS 5000,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
END OF g_t_vend.
*Store all the customer numbers
DATA: BEGIN OF g_t_cust OCCURS 5000,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1,
END OF g_t_cust.
*Range to store trading partner numbers.
RANGES : r_tpart FOR lfa1-lifnr.
Variables to maintain open items count
DATA: g_open_items TYPE i,
g_open_items1 TYPE i,
g_open_items2 TYPE i,
g_open_items3 TYPE i,
g_open_items4 TYPE i.
*Header texts (For report header)
DATA: g_headertext1(50),
g_headertext2(16).
Selection screen declaration. *
SELECT-OPTIONS p_ccode FOR bsik-bukrs OBLIGATORY. "Company code
SELECT-OPTIONS p_tpartv FOR t880-rcomp. "Trading partner
SELECT-OPTIONS p_clerk FOR t001s-busab. "Accounting clerk
SELECT-OPTIONS p_pdate FOR sy-datum. "Posting date
PARAMETERS p_adate LIKE sy-datum DEFAULT sy-datum. "Age as of date
*GL Account codes
SELECT-OPTIONS p_glacc FOR bsik-hkont DEFAULT '48200000' TO '48299999'
OBLIGATORY.
*Data Column range (Age range)
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK age_range WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-002.
SELECTION-SCREEN POSITION 33.
PARAMETERS p_range1(4) TYPE c DEFAULT '30' OBLIGATORY.
SELECTION-SCREEN POSITION 43.
PARAMETERS p_range2(4) TYPE c DEFAULT '60' OBLIGATORY.
SELECTION-SCREEN POSITION 53.
PARAMETERS p_range3(4) TYPE c DEFAULT '90' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK age_range.
*Reporting Currency
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK crr_sel WITH FRAME TITLE text-003.
PARAMETERS: p_local RADIOBUTTON GROUP cgrp DEFAULT 'X',
p_grpcrr RADIOBUTTON GROUP cgrp.
SELECTION-SCREEN END OF BLOCK crr_sel.
*Type of report
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK rep_sel WITH FRAME TITLE text-004.
PARAMETERS: p_detrep RADIOBUTTON GROUP rgrp DEFAULT 'X',
p_sumrep RADIOBUTTON GROUP rgrp.
SELECTION-SCREEN END OF BLOCK rep_sel.
Top-Of-Page *
TOP-OF-PAGE.
IF p_detrep = 'X'.
Write report header for detailed report.
PERFORM f8000_write_comp_header
USING g_t_maintab-bukrs
g_t_maintab-waers
g_t_maintab-butxt
text-t02
g_headertext1.
ELSE.
Write report header for summary report.
PERFORM f8000_write_comp_header
USING '0000'
g_t_maintab-waers
text-t05
g_headertext1
g_headertext2.
ENDIF.
*Eject
Line selection event *
AT LINE-SELECTION.
IF p_detrep = 'X'.
SET PARAMETER ID 'BLN' FIELD g_t_maintab-belnr.
SET PARAMETER ID 'BUK' FIELD g_t_maintab-bukrs.
SET PARAMETER ID 'GJR' FIELD g_t_maintab-gjahr.
IF NOT g_t_maintab-belnr IS INITIAL.
Call transaction FB03 to display line item details.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ELSE.
MESSAGE e999 WITH text-e01.
ENDIF.
Clear belnr.
MOVE space TO g_t_maintab-belnr.
ENDIF.
*Eject
Main processing of program starts here *
START-OF-SELECTION.
Pad zeroes to the trading partner range to make it 10 chars
PERFORM f0100_prepare_tradingpartners.
Fetch data from customer and vendor tables.
PERFORM f1000_fetch_data.
Prepare data. Assign sign to amount, separate line items into 4 age
categories
PERFORM f2000_prepare_data.
End of selection.
END-OF-SELECTION.
Write reports
IF NOT g_t_maintab[] IS INITIAL.
IF p_detrep = 'X'.
PERFORM f4000_write_detailed_rep.
ELSE.
PERFORM f5000_write_summary_rep.
ENDIF.
ELSE.
MESSAGE i999 WITH text-e02 text-e03.
ENDIF.
*Eject
*& Form f0100_prepare_tradingpartners
Subroutine for preparing trading partner numbers. Pad extra
zeros to make trading partner field size 10.
FORM f0100_prepare_tradingpartners.
LOOP AT p_tpartv.
MOVE-CORRESPONDING p_tpartv TO r_tpart.
IF NOT r_tpart-low IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = r_tpart-low
IMPORTING
output = r_tpart-low.
ENDIF.
IF NOT r_tpart-high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = r_tpart-high
IMPORTING
output = r_tpart-high.
ENDIF.
APPEND r_tpart.
ENDLOOP.
ENDFORM. " f0100_prepare_tradingpartners
*Eject
*& Form f1000_fetch_data
This subroutine is used to fetch data from customer (BSID and
BSAD) and vendor (BSIK and BSAK) tables.
FORM f1000_fetch_data.
*Get vendor data.
PERFORM f1100_fetch_vend_data.
*Get customer data.
PERFORM f1200_fetch_cust_data.
ENDFORM. " f1000_fetch_data
*Eject
*& Form f1100_fetch_vend_data
This subroutine is used to get data from BSIK and BSAK
tables. First all vendors are selected then all line items are
retrieved from BSIK and BSAK tables.
FORM f1100_fetch_vend_data.
PERFORM f9000_progress_indicator USING text-m01.
*Select all vendors.
SELECT h~lifnr
h~name1
INTO TABLE g_t_vend
FROM lfa1 AS h
JOIN lfb1 AS c
ON h~lifnr = c~lifnr
WHERE h~lifnr IN r_tpart
AND c~bukrs IN p_ccode
AND c~busab IN p_clerk.
IF NOT g_t_vend[] IS INITIAL.
PERFORM f9000_progress_indicator USING text-m01.
Select open line items.
SELECT bukrs "company
lifnr "vendor number
augdt "clearing date
augbl "docno for clearing doc
zuonr "allocation number
gjahr "fiscal year
belnr "acct doc no
buzei "line item within doc
budat "posting date
waers "Currency key
xblnr "document number
shkzg "debit, credit indicator
dmbtr "local currency
hkont "gl acct
dmbe2 "group currency
FROM bsik
INTO CORRESPONDING FIELDS OF TABLE g_t_venddata
FOR ALL ENTRIES IN g_t_vend
WHERE bukrs IN p_ccode "company code
AND lifnr = g_t_vend-lifnr "trading partner
AND budat IN p_pdate "Posting date
AND budat <= p_adate
AND hkont IN p_glacc "gl acct
PERFORM f9000_progress_indicator USING text-m04.
Select cleared line items.
SELECT bukrs "company
lifnr "vendor number
augdt "clearing date
augbl "docno for clearing doc
zuonr "allocation number
gjahr "fiscal year
belnr "acct doc no
buzei "line item within doc
budat "posting date
waers "Currency key
xblnr "document number
shkzg "debit, credit indicator
dmbtr "local currency
hkont "gl acct
dmbe2 "group currency
FROM bsak
APPENDING CORRESPONDING FIELDS OF TABLE g_t_venddata
FOR ALL ENTRIES IN g_t_vend
WHERE bukrs IN p_ccode "Company code
AND lifnr = g_t_vend-lifnr "Selected vendors
AND augdt > p_adate
AND budat IN p_pdate "Posting date
AND budat <= p_adate
AND hkont IN p_glacc "GL acct
ENDIF.
IF NOT g_t_venddata[] IS INITIAL.
*Set Account type flag for vendors -- 'K'.
SORT g_t_venddata BY bukrs lifnr.
SORT g_t_vend BY lifnr.
g_t_venddata-acctp = text-k01.
MODIFY g_t_venddata TRANSPORTING acctp WHERE acctp = ' '.
Add vendor names.
LOOP AT g_t_venddata WHERE name1 = ' '.
READ TABLE g_t_vend
WITH KEY lifnr = g_t_venddata-lifnr BINARY SEARCH.
IF sy-subrc = 0.
g_t_venddata-name1 = g_t_vend-name1.
MODIFY g_t_venddata TRANSPORTING name1 WHERE lifnr =
g_t_venddata-lifnr.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " f1100_fetch_vend_data
*Eject
*& Form f1200_fetch_cust_data
This function module is used to get data from BSID and BSAD
tables. First all customers are selected then all line items
are retrieved from BSIK and BSAK tables.
FORM f1200_fetch_cust_data.
PERFORM f9000_progress_indicator USING text-m06.
*Select all customers.
SELECT h~kunnr
h~name1
INTO TABLE g_t_cust
FROM kna1 AS h
JOIN knb1 AS c
ON h~kunnr = c~kunnr
WHERE h~kunnr IN r_tpart
AND c~bukrs IN p_ccode
AND c~busab IN p_clerk.
IF NOT g_t_cust[] IS INITIAL.
PERFORM f9000_progress_indicator USING text-m06.
*Fetch customer open items.
SELECT bukrs "company
kunnr "customer number
augdt "clearing date
augbl "docno for clearing doc
zuonr "allocation number
gjahr "fiscal year
belnr "acct doc no
buzei "line item within doc
budat "posting date
waers "Currency key
xblnr "document number
shkzg "debit, credit indicator
dmbtr "local currency
hkont "gl acct
dmbe2 "group currency
FROM bsid
INTO CORRESPONDING FIELDS OF TABLE g_t_custdata
FOR ALL ENTRIES IN g_t_cust
WHERE bukrs IN p_ccode "company code
AND kunnr = g_t_cust-kunnr "Selected customer
AND budat IN p_pdate "Posting date
AND budat <= p_adate
AND hkont IN p_glacc "GL acct
PERFORM f9000_progress_indicator USING text-m07.
Select Customer cleared line items.
SELECT bukrs "company
kunnr "customer number
augdt "clearing date
augbl "docno for clearing doc
zuonr "allocation number
gjahr "fiscal year
belnr "acct doc no
buzei "line item within doc
budat "posting date
waers "Currency key
xblnr "document number
shkzg "debit, credit indicator
dmbtr "local currency
hkont "gl acct
dmbe2 "group currency
FROM bsad
APPENDING CORRESPONDING FIELDS OF TABLE g_t_custdata
FOR ALL ENTRIES IN g_t_cust
WHERE bukrs IN p_ccode "company code
AND kunnr = g_t_cust-kunnr "Selected customer
AND augdt > p_adate
AND budat IN p_pdate "Posting date
AND budat <= p_adate
AND hkont IN p_glacc "GL acct
ENDIF.
IF NOT g_t_custdata[] IS INITIAL.
*Set account type for customers -- 'D'.
SORT g_t_custdata BY bukrs kunnr.
SORT g_t_cust BY kunnr.
g_t_custdata-acctp = text-d01.
MODIFY g_t_custdata TRANSPORTING acctp WHERE acctp = ' '.
Add customer names.
LOOP AT g_t_custdata WHERE name1 = ' '.
READ TABLE g_t_cust
WITH KEY kunnr = g_t_custdata-kunnr BINARY SEARCH.
IF sy-subrc = 0.
g_t_custdata-name1 = g_t_cust-name1.
MODIFY g_t_custdata TRANSPORTING name1 WHERE kunnr =
g_t_custdata-kunnr.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " f1200_fetch_cust_data
*Eject
*& Form f2000_Prepare_data
This function module is used to format data according to report
1. Fetch local or global amount value according to user
parametrs.
2. Sign is assigned to each amount
3. Line items are categorized according to the aging category
4. Populate document header text.
5. Populate company names.
FORM f2000_prepare_data.
DATA : l_amount TYPE dmbtr,
l_age_of_item TYPE p,
l_as_of_age TYPE d,
l_posting_date TYPE d,
l_time TYPE t,
l_count TYPE sy-tabix.
DATA: BEGIN OF l_t_doc_txt OCCURS 0,
bukrs TYPE bkpf-bukrs,
belnr TYPE bkpf-belnr,
bktxt LIKE bkpf-bktxt,
END OF l_t_doc_txt.
DATA: BEGIN OF l_t_curr_txt OCCURS 0,
bukrs LIKE t001-bukrs,
waers LIKE t001-waers,
butxt LIKE t001-butxt,
END OF l_t_curr_txt.
PERFORM f9000_progress_indicator USING text-m03.
l_as_of_age = p_adate.
MOVE text-t01 TO l_time.
*Prepare G_T_MAINTAB, 1. Populate vendor data.
LOOP AT g_t_venddata.
CLEAR: g_t_maintab, l_amount, l_age_of_item, l_posting_date.
MOVE-CORRESPONDING g_t_venddata TO g_t_maintab.
g_t_maintab-tpart = g_t_venddata-lifnr.
Check for currency selected by the user.
IF p_local = 'X'.
l_amount = g_t_venddata-dmbtr.
ELSE.
l_amount = g_t_venddata-dmbe2.
ENDIF.
Check for type of transaction. Debit or Credit.
IF g_t_venddata-shkzg = 'H'.
l_amount = l_amount * -1.
ENDIF.
MOVE g_t_venddata-budat TO l_posting_date.
Assign amount value to appropriate aging category.
Calculate age of line item
CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
EXPORTING
date1 = l_posting_date
time1 = l_time
date2 = l_as_of_age
time2 = l_time
IMPORTING
datediff = l_age_of_item
EXCEPTIONS
invalid_datetime = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF l_age_of_item <= p_range1. "Range1
g_t_maintab-amount1 = l_amount.
ELSE.
IF l_age_of_item > p_range1 AND l_age_of_item <= p_range2."Range2
g_t_maintab-amount2 = l_amount.
ELSE.
IF l_age_of_item > p_range2
AND l_age_of_item <= p_range3. "Range3
g_t_maintab-amount3 = l_amount.
ELSE. "Range4
g_t_maintab-amount4 = l_amount.
ENDIF.
ENDIF.
ENDIF.
Assign balance amounts.
g_t_maintab-balamt = l_amount.
Add record to main internal table
APPEND g_t_maintab.
ENDLOOP.
*Prepare G_T_MAINTAB, 2. Populate customer data.
LOOP AT g_t_custdata.
CLEAR: g_t_maintab, l_amount, l_age_of_item, l_posting_date.
MOVE-CORRESPONDING g_t_custdata TO g_t_maintab.
g_t_maintab-tpart = g_t_custdata-kunnr.
Check for currency selected by the user.
IF p_local = 'X'.
l_amount = g_t_custdata-dmbtr.
ELSE.
l_amount = g_t_custdata-dmbe2.
ENDIF.
Check for type of transaction. Debit or Credit.
IF g_t_custdata-shkzg = 'H'.
l_amount = l_amount * -1.
ENDIF.
MOVE g_t_custdata-budat TO l_posting_date.
Assign amount value to appropriate aging category.
Calculate age of line item
CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
EXPORTING
date1 = l_posting_date
time1 = l_time
date2 = l_as_of_age
time2 = l_time
IMPORTING
datediff = l_age_of_item
EXCEPTIONS
invalid_datetime = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF l_age_of_item <= p_range1. "Range1
g_t_maintab-amount1 = l_amount.
ELSE.
IF l_age_of_item > p_range1 AND l_age_of_item <= p_range2."Range2
g_t_maintab-amount2 = l_amount.
ELSE.
IF l_age_of_item > p_range2
AND l_age_of_item <= p_range3. "Range3
g_t_maintab-amount3 = l_amount.
ELSE. "Range4
g_t_maintab-amount4 = l_amount.
ENDIF.
ENDIF.
ENDIF.
Assign balance amounts.
g_t_maintab-balamt = l_amount.
APPEND g_t_maintab.
ENDLOOP.
IF NOT g_t_maintab[] IS INITIAL.
SORT g_t_maintab BY bukrs belnr.
SELECT bukrs belnr bktxt FROM bkpf
INTO CORRESPONDING FIELDS OF TABLE l_t_doc_txt
FOR ALL ENTRIES IN g_t_maintab
WHERE bukrs = g_t_maintab-bukrs AND
belnr = g_t_maintab-belnr AND
gjahr = g_t_maintab-gjahr.
SELECT bukrs butxt waers FROM t001
INTO CORRESPONDING FIELDS OF TABLE l_t_curr_txt
WHERE bukrs IN p_ccode.
SORT l_t_doc_txt BY bukrs belnr.
SORT l_t_curr_txt BY bukrs.
Add Document header texts
LOOP AT g_t_maintab.
l_count = sy-tabix.
READ TABLE l_t_doc_txt
WITH KEY bukrs = g_t_maintab-bukrs belnr = g_t_maintab-belnr
BINARY SEARCH.
IF sy-subrc = 0.
g_t_maintab-bktxt = l_t_doc_txt-bktxt.
MODIFY g_t_maintab INDEX l_count TRANSPORTING bktxt.
ENDIF.
CLEAR l_t_doc_txt-bktxt.
ENDLOOP.
PERFORM f9000_progress_indicator USING text-m03.
Update company name and currency field.
LOOP AT g_t_maintab WHERE butxt = ' ' OR waers = ' '.
READ TABLE l_t_curr_txt
WITH KEY bukrs = g_t_maintab-bukrs BINARY SEARCH.
IF sy-subrc = 0.
g_t_maintab-butxt = l_t_curr_txt-butxt.
g_t_maintab-waers = l_t_curr_txt-waers.
MODIFY g_t_maintab TRANSPORTING butxt waers
WHERE bukrs = g_t_maintab-bukrs.
ENDIF.
CLEAR: l_t_curr_txt-butxt, l_t_curr_txt-waers.
ENDLOOP.
ENDIF. "IF NOT g_t_maintab[] IS INITIAL
ENDFORM. " f2000_Prepare_data
*Eject
*& Form f4000_write_detailed_rep
This subroutine is used to write detailed report.
FORM f4000_write_detailed_rep.
DATA l_t_maintab LIKE g_t_maintab.
Variables for summary amount of each account type of a trading pair
DATA: l_tpart_acc1 TYPE dmbtr,
l_tpart_acc2 TYPE dmbtr,
l_tpart_acc3 TYPE dmbtr,
l_tpart_acc4 TYPE dmbtr,
l_tpart_acc_bal TYPE dmbtr.
Variables for summary amount of each trading pair
DATA: l_tpart1 TYPE dmbtr,
l_tpart2 TYPE dmbtr,
l_tpart3 TYPE dmbtr,
l_tpart4 TYPE dmbtr,
l_tpart_bal TYPE dmbtr.
SET TITLEBAR 'DETAILED_REPORT'.
Prepare header texts for report header.
CONCATENATE p_adate4(2) '/' p_adate6(2) '/' p_adate+0(4) INTO
g_headertext1.
CONCATENATE text-h20 g_headertext1
INTO g_headertext1 SEPARATED BY space.
SORT g_t_maintab BY bukrs tpart acctp.
*Start detailed report.
FORMAT INTENSIFIED OFF.
LOOP AT g_t_maintab.
l_t_maintab = g_t_maintab.
*At new company code write page header
AT NEW bukrs.
g_t_maintab = l_t_maintab.
NEW-PAGE.
ENDAT.
*Write line item records.
WRITE:/2 l_t_maintab-tpart, "Trading partner
14 l_t_maintab-acctp, "Account type
17 l_t_maintab-belnr, "Document number
35 l_t_maintab-budat, "posting date
47 l_t_maintab-xblnr, "Reference doc. number
65 l_t_maintab-bktxt, "Doc header text.
92 l_t_maintab-balamt, "balance amount
114 l_t_maintab-amount1, "Amount cat 1
136 l_t_maintab-amount2, "Amount cat 2
158 l_t_maintab-amount3, "Amount cat 3
180 l_t_maintab-amount4. "Amount cat 4
g_t_maintab-bukrs = l_t_maintab-bukrs.
g_t_maintab-gjahr = l_t_maintab-gjahr.
g_t_maintab-belnr = l_t_maintab-belnr.
Hide values so that these can be used on line selection event.
HIDE: g_t_maintab-bukrs, g_t_maintab-gjahr, g_t_maintab-belnr.
Calculate amounts for account summary.
l_tpart_acc1 = l_tpart_acc1 + l_t_maintab-amount1.
l_tpart_acc2 = l_tpart_acc2 + l_t_maintab-amount2.
l_tpart_acc3 = l_tpart_acc3 + l_t_maintab-amount3.
l_tpart_acc4 = l_tpart_acc4 + l_t_maintab-amount4.
l_tpart_acc_bal = l_tpart_acc_bal + l_t_maintab-balamt.
Calculate amounts for trading partner summary.
l_tpart1 = l_tpart1 + l_t_maintab-amount1.
l_tpart2 = l_tpart2 + l_t_maintab-amount2.
l_tpart3 = l_tpart3 + l_t_maintab-amount3.
l_tpart4 = l_tpart4 + l_t_maintab-amount4.
l_tpart_bal = l_tpart_bal + l_t_maintab-balamt.
*At end of one account type write summary for account type.
AT END OF acctp.
g_t_maintab = l_t_maintab.
PERFORM f8100_write_acctype_summary
USING l_tpart_acc1 l_tpart_acc2 l_tpart_acc3 l_tpart_acc4
l_tpart_acc_bal l_t_maintab-acctp l_t_maintab-tpart
l_t_maintab-name1.
CLEAR: l_tpart_acc1, l_tpart_acc2, l_tpart_acc3, l_tpart_acc4,
l_tpart_acc_bal.
ENDAT.
At end of trading pair, write trading partner summary.
AT END OF tpart.
g_t_maintab = l_t_maintab.
PERFORM f8200_write_tradingpair_summar
USING l_tpart1 l_tpart2 l_tpart3 l_tpart4 l_tpart_bal
l_t_maintab-tpart l_t_maintab-name1.
CLEAR: l_tpart1, l_tpart2, l_tpart3, l_tpart4, l_tpart_bal.
ENDAT.
ENDLOOP.
ENDFORM. " f4000_write_detailed_rep
*Eject
*& Form f5000_write_summary_rep
Subroutine to write summary report.
FORM f5000_write_summary_rep.
*Counters for trading partner
DATA: l_count_tpart TYPE i, "Counter for trading pairs.
l_count_tpart1 TYPE i, "Trading partner in age cat 1
l_count_tpart2 TYPE i, "Trading partner in age cat 2
l_count_tpart3 TYPE i, "Trading partner in age cat 3
l_count_tpart4 TYPE i. "Trading partner in age cat 4
Flag for trading partner count.
DATA: l_flag_tpart1 TYPE c, "Flag for Trading partner in age cat 1
l_flag_tpart2 TYPE c, "Flag for Trading partner in age cat 2
l_flag_tpart3 TYPE c, "Flag for Trading partner in age cat 3
l_flag_tpart4 TYPE c. "Flag for Trading partner in age cat 4
Variables to store sum of all line items for a company code.
DATA: l_comp_amt_bal TYPE dmbtr,
l_comp_amt1 TYPE dmbtr,
l_comp_amt2 TYPE dmbtr,
l_comp_amt3 TYPE dmbtr,
l_comp_amt4 TYPE dmbtr.
Internal table to store sum of amounts for all the companies selected.
DATA: BEGIN OF l_t_compall_amt OCCURS 0,
waers LIKE bsad-waers, "Currency key
balamt TYPE dmbtr, "Total balance amount
amount1 TYPE dmbtr, "Amount for category 1
amount2 TYPE dmbtr, "Amount for category 2
amount3 TYPE dmbtr, "Amount for category 3
amount4 TYPE dmbtr, "Amount for category 4
END OF l_t_compall_amt.
DATA: l_tpart_amt_bal TYPE dmbtr,
l_tpart_amt1 TYPE dmbtr,
l_tpart_amt2 TYPE dmbtr,
l_tpart_amt3 TYPE dmbtr,
l_tpart_amt4 TYPE dmbtr.
DATA l_currtxt(11).
DATA l_t_maintab LIKE g_t_maintab.
Prepare header texts for report header.
CONCATENATE p_adate4(2) '/' p_adate6(2) '/' p_adate+0(4) INTO
g_headertext2.
CONCATENATE text-t04 p_glacc-low text-h06 p_glacc-high
INTO g_headertext1 SEPARATED BY space.
CONCATENATE text-t03 g_headertext2 INTO g_headertext2 SEPARATED BY
space.
SET TITLEBAR 'SUMMARY_REPORT'.
SORT g_t_maintab BY bukrs tpart acctp.
DESCRIBE TABLE g_t_maintab LINES l_count_tpart. "***
FORMAT INTENSIFIED OFF.
CLEAR: l_flag_tpart1, l_flag_tpart2, l_flag_tpart3, l_flag_tpart4.
CLEAR: l_tpart_amt_bal,
l_tpart_amt1,
l_tpart_amt2,
l_tpart_amt3,
l_tpart_amt4.
CLEAR: l_comp_amt_bal,
l_comp_amt1,
l_comp_amt2,
l_comp_amt3,
l_comp_amt4.
Write summary report.
LOOP AT g_t_maintab.
l_t_maintab = g_t_maintab.
Maintain open items count
g_open_items = g_open_items + 1.
IF l_t_maintab-amount1 <> 0.
g_open_items1 = g_open_items1 + 1.
ELSEIF l_t_maintab-amount2 <> 0.
g_open_items2 = g_open_items2 + 1.
ELSEIF l_t_maintab-amount3 <> 0.
g_open_items3 = g_open_items3 + 1.
ELSEIF l_t_maintab-amount4 <> 0.
g_open_items4 = g_open_items4 + 1.
ENDIF.
*Calculate amounts for trading partners and maintain trading partner
*count.
l_tpart_amt_bal = l_tpart_amt_bal + l_t_maintab-balamt.
IF g_t_maintab-amount1 <> 0.
l_tpart_amt1 = l_tpart_amt1 + l_t_maintab-amount1.
Increase count according to flag.
IF l_flag_tpart1 IS INITIAL.
l_count_tpart1 = l_count_tpart1 + 1.
l_flag_tpart1 = 'X'.
ENDIF.
ELSEIF g_t_maintab-amount2 <> 0.
l_tpart_amt2 = l_tpart_amt2 + l_t_maintab-amount2.
Increase count according to flag.
IF l_flag_tpart2 IS INITIAL.
l_count_tpart2 = l_count_tpart2 + 1.
l_flag_tpart2 = 'X'.
ENDIF.
ELSEIF g_t_maintab-amount3 <> 0.
l_tpart_amt3 = l_tpart_amt3 + l_t_maintab-amount3.
Increase count according to flag.
IF l_flag_tpart3 IS INITIAL.
l_count_tpart3 = l_count_tpart3 + 1.
l_flag_tpart3 = 'X'.
ENDIF.
ELSEIF g_t_maintab-amount4 <> 0.
l_tpart_amt4 = l_tpart_amt4 + l_t_maintab-amount4.
Increase count according to flag.
IF l_flag_tpart4 IS INITIAL.
l_count_tpart4 = l_count_tpart4 + 1.
l_flag_tpart4 = 'X'.
ENDIF.
ENDIF. "g_t_maintab-amount1 <> 0
Calculate total of amount for all companies
Separate totals into different rows for different local currency.
IF p_local = 'X'.
READ TABLE l_t_compall_amt WITH KEY waers = l_t_maintab-waers.
ELSE.
READ TABLE l_t_compall_amt INDEX 1.
ENDIF.
IF sy-subrc = 0.
l_t_compall_amt-balamt = l_t_compall_amt-balamt +
l_t_maintab-balamt.
l_t_compall_amt-amount1 = l_t_compall_amt-amount1 +
l_t_maintab-amount1.
l_t_compall_amt-amount2 = l_t_compall_amt-amount2 +
l_t_maintab-amount2.
l_t_compall_amt-amount3 = l_t_compall_amt-amount3 +
l_t_maintab-amount3.
l_t_compall_amt-amount4 = l_t_compall_amt-amount4 +
l_t_maintab-amount4.
MODIFY l_t_compall_amt FROM l_t_compall_amt INDEX sy-tabix.
ELSE.
MOVE-CORRESPONDING l_t_maintab TO l_t_compall_amt.
IF NOT p_local = 'X'.
MOVE 'GRP' TO l_t_maintab-waers.
ENDIF.
APPEND l_t_compall_amt.
ENDIF.
Calculate total amount for current company.
l_comp_amt_bal = l_comp_amt_bal + l_t_maintab-balamt.
l_comp_amt1 = l_comp_amt1 + l_t_maintab-amount1.
l_comp_amt2 = l_comp_amt2 + l_t_maintab-amount2.
l_comp_amt3 = l_comp_amt3 + l_t_maintab-amount3.
l_comp_amt4 = l_comp_amt4 + l_t_maintab-amount4.
IF p_local = 'X'.
CONCATENATE text-h04 l_t_maintab-waers
INTO l_currtxt SEPARATED BY space.
ELSE.
MOVE text-h05 TO l_currtxt.
ENDIF.
Write subtotal for each trading partner.
AT END OF tpart.
l_count_tpart = l_count_tpart + 1.
Write the summary lines
WRITE:/2 l_t_maintab-bukrs,
10 l_t_maintab-tpart,
42 l_tpart_amt_bal,
64 l_currtxt,
87 l_tpart_amt1,
109 l_tpart_amt2,
131 l_tpart_amt3,
153 l_tpart_amt4.
CLEAR: l_tpart_amt_bal,
l_tpart_amt1,
l_tpart_amt2,
l_tpart_amt3,
l_tpart_amt4.
CLEAR: l_flag_tpart1, l_flag_tpart2, l_flag_tpart3, l_flag_tpart4.
ENDAT.
Write subtotal for each company code.
AT END OF bukrs.
PERFORM f8300_write_comp_summ USING l_comp_amt_bal
l_comp_amt1
l_comp_amt2
l_comp_amt3
l_comp_amt4
l_t_maintab-bukrs
l_t_maintab-butxt
l_t_maintab-waers.
CLEAR: l_comp_amt_bal,
l_comp_amt1,
l_comp_amt2,
l_comp_amt3,
l_comp_amt4.
ENDAT.
ENDLOOP.
-
Report Painter using user exit U002 to create a formel variable for FI-SL
Hi,
I would like to use Report painter creating a formel variable with U002(VAR1,VAR2) for FI-SL and did following:
1. go to TCode: GS11
2. Formel: selecting U002 from Formel-Exit list and giving var1 and var2
'#U002(VAR1, VAR2)'
3. Save
4. Erro message: U002 is not definiert.
Why???
U002 is already implementiert in
Class ZCL_IM_FI_FORMULA_EXIT
method IF_EX_G_SET_FORMULA_EXIT~EVALUATE
CASE flt_val.
WHEN 'U002'
Could anyone help me? Thanks!
Klara Zhaodollyb wrote:
if enter 05.2008
the volume should look like below as a vairable range.
sales volume
01.2008 - 05.2008
you want 01.2008 - 05.2008 as description , thats what your requirement right?
When 'ZTEXT2'.
DATA: ZYEAR(4) TYPE C,
ZTEMP1(6) TYPE C,
ZLOW(14) TYPE C.
if i_step = 2.
CLEAR L_S_RANGE.
Loop at i_t_var_range into intern_range where VNAM = 'user entered variable for calmonth'.
*lets say user entered 05.2008
ZTEMP1 = INTERN_RANGE-LOW.
* now ZTEMP1 has 05.2008
ZYEAR = ZTEMP1+0(4)
* zyear = 2008
*A SLIGHT MODIFICATION TO CONCATENATION
CONCATENATE '01' ' .' ZYEAR '-' ZTEMP1 INTO ZLOW.
*SO 01. 2008 -05.2008 WILL BEN IN ZLOW
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
L_S_RANGE-LOW = ZLOW.
APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP
ENDIF.
use the text variable as description then u will get the required result i.e &ztext2&
HERE I DIDN'T written any L_S_RAnGE-HIGH.
Regards,
Ranganath
Edited by: Ranganath on Nov 9, 2011 9:41 AM -
Report painter,cross company code transactions
Hi Masters,
1, Please send material of REPORT PAINTER ?
2, Please Send material of CROSS COMPANY CODE TRANSACTIONS
3. Please send material of FUNCTIONAL SPECTS
my mail id [email protected]
Thank you friendsHi,
Hi,
Cross-Company-Code Configurations
Step1: T Code: OBYA
We have to maintain Receiver Company Code as Customer in Sender Company Code and Sender Company Code as Vendor in Receiver Company Code. Then problem will be solved.
Step2: T Code: OB60
There you can find 4 line items, Copy all the 4 Line Items using Copy As button and customize to your company code.
Cross-Company-Code Transactions
1. To Change Cross Company Code Document: T Code: FBU2 - Change
2. To Display Cross Company Code Document: T Code: FBU3 - Display
3. To Reverse Cross Company Code Document: T Code: FBU8 - Reverse
regards,
Santosh kumar -
Report Painter: Rearranging of Characteristics
Hello Everyone,
Could anyone help me out in rearranging characteristic in Report Painter.
As per clients requirement the report should split values of Cost Center into Activity Type and then Cost Components. However, I am getting report in Reverse way itu2019s splitting the Values from Activity Type into Cost Components then Cost Center. I Would like to know functionality of Report Painter for rearranging Characteristics.
EG: Cost Center----- Activity Type--
Cost Component.
Thanks,
SnehaHi
Can you please explain the cleary. -
Report Painter and Exchange Rates
We have not turned on multiple local currencies but we have several company codes that have different currencies. Does anyone know of a feature in Report Painter that allows reporting of different currencies in one report by using some kind of currency exchange rate connection?
I'd like to be able to create a simple Report Painter report but have it report in the company's primary currency.
You help is greatly appreciated,
DanHello Dan,
On the initial screen of report painter where the user enters the parameters valaes , there is a icon for currency with a $Y sign. Click on icon and select the option translate to target currency. With this it may be possible view the report with postings in multiple currency translated into one reporting currency.
If the icon is not visible then from menu select
Environment - Options and click on check box Expert Mode.
Hope this meets your requirements.
Regards
Jayesh
Maybe you are looking for
-
My game center has been craked and take my game what should i do ?
pliz help me i play the game for 1 year
-
Preview is displaying TIFF images that I download with a black background and white lettering. Is there a way to change this to the normal view of black on white?
-
Revision: 14017 Revision: 14017 Author: [email protected] Date: 2010-02-05 16:16:37 -0800 (Fri, 05 Feb 2010) Log Message: Fix for icons being off-center in the wireframe CheckBox and RadioButton. The icon was not being vertically centered. QE n
-
Time Capsule not working with HP LaserJet 1022nw
Hello there, We had an Airport Extreme 802.11n base station that our HP LaserJet 1022nw was wirelessly connecting to, and it was working fine for the last 18 months. Then, we switched to a 1 TB Time Capsule, and had the Time Capsule import all of the
-
Hello Freinds, If there is a field from custamize table for exa.(Zmara-werks )then can we use standard authority check object? or should we create custamize authority object. Please guide me........... Thanks, Amar