REUSE_ALV_GRID_DISPLAY / Suppressing the end sum
Dear developper community,
I'm looking for a way to exclude certain sums or "sum levels" from being displayed in an ALV-Grid generated by using the FM REUSE_ALV_GRID_DISPLAY.
We have the rare case of data of which we do need the subtotals on the first group level, but where the overall
total at the very end of the list makes no sense at all. That's why we would like the end-sum not to be shown to the user.
Thanks for any hint
Andreas
Dear Sanjay,
we already use this parameter to exclude entire colums from any summation (where it makes no sense anyway).
Here is a simplified example to illustrate what we are looking for:
grouping line description value
group 1 value 1 1.000
group 1 value 2 2.000
group 1 generated subtotal 3.000 <- we want this !
group 2 value 3 1.000
group 2 value 4 1.000
group 2 generated subtotal 2.000 <- we want this !
generated subtotal 5.000 <- not wanted!
regards
Andreas
Similar Messages
-
How to Hide rows in ALV without affecting total sum at the end of table?
Hi,
I need some help in hiding particular rows in an ALV Grid without affecting the total sum at the end of the table. I am trying to hide the rows that have negative quantities, but I still need those values so that the user can still compute for the total sums. Can anyone help? Thanks.
JosephHi,
Hopw this way you can hide the rows in the GRID.
DATA:
ld_column TYPE lvc_fname,
ld_hide TYPE abap_bool.
FIELD-SYMBOLS:
<ls_entry> TYPE any,
<ld_fld> TYPE any.
ld_column = 'COL_1'. " column which you want to suppress if everything is zero
ld_hide = abap_true. " = 'X'; default hide column
LOOP at <gt_outtab> ASSIGNING <ls_entry>.
ASSIGN COMPONENT (ld_column) OF STRUCTURE <ls_entry> TO <ld_fld>.
IF ( <ld_fld> > 0 ).
ld_hide = abap_false. " display column because at least single value > 0
EXIT. " leave LOOP
ENDIF.
ENDLOOP.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = ld_column.
IF ( syst-subrc = 0 ).
ls_fcat-no_out = ld_hide.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDIF.
hop you will get the total with for those columns too.
Regards,
Madhavi -
Issue in calculating sum on a column at the end of the report in Pivot view
Hi,
I have some columns like Hierarchy column A, Non Hierarchical columns B, C and a measure D.
In Pivot view under rows I have placed columns A,B and C in Columns and D in measures. If I try to calculate sum of values at the end of report by using option Sum At the End on columns we are getting an error that grouping by function should be in the select clause of the query.
If I duplicate the column C and put it in rows then I am able to see totals at the end but values are displayed in multiple rows and it won't meet our requirement.
Any suggestion or workarounds on this will be helpful.
Thanks,
VjHi,
let me explain it better..
Col A: GL Segment Hierarchy which will display Level1 to Level n Names
Col B: Level n Code.
Col C: Fiscal Period
Col D: Amount
Now col A and B are in Rows, col c in columns and col D in measures in a pivot view.
Issue is we are unable to have total of measure values at the end of report by using sum at the end. -
How to print SUM & COUNT at the end of the XML template
Hello,
I am generating a payment file in oracle Payments and at the end of the file, I would also like to add a trailer record with sum of the payments and number of payments. Can anyone have any suggestions on having a trailer record with SUM & COUNT.
Thanks,You can use,
COUNT and SUM of the column to get those values.
In extext, add a new record and add these function on columns. -
How do I export to text file and suppress the cr-lf at end of row?
Hello.
I have created a report that is mean to export to a text file. It will always be a 1 row report and it's always going to be uploaded to a vendor via their website. They don't want the cr-lf at the end of the row.
I can't figure out how to get crystal to not do that. When I export to a text file (not a tab delimited text file), it seems to throw in the cr-lf at the end of the row. I have to manually remove it before uploading it. This task of uploading the file will go to someone else in the near future and I would like to not have to rely on them to do it.
Am I missing it?Could you please elaborate what do you mean by 'cr-lf'. Just came across these SAP notes,however don't know whether they are applicable in your context.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313331333533303333%7D.do
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313333333333373332%7D.do
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333033383337%7D.do
Thanks -
THE END OF THE RECORD IS NOT TRIGGERING(urgent)
HI ALL I HAVE WRITTEN A REPORT AND I AM DISPLAYING THE OUTPUT OF EACH DISTRICT..
NOW THE REPORT IS SHOWING RIGHT WHEN IT IS CHANGING THE DISTRICT BUT IT IS NOT TRIGGERING AT THE END OF THE REPORT AS AFTER THAT THE DISTRICT IS NOT CHANGING..
I TRIED WITH AT END OF BUT IT IS SOME HOW SHOWING PROBLEM SO I USED A VARIBLE CONCEPT TO GET THE REPORT....
HERE IS THE REPORT can anyone please look at this and let me know how can i do that..
is there any method where i can used in the IF condition to get the last record...
==========================================================
*& Report ZDISTRICT_CUST_AUCSALES
&--THE PROGRAM USED TO DISPLAY THE TOTAL NUMBER OF CONSUMER IN A D.C.-
&----PROCESSED ON A PERTICULAR MONTH AND YEAR..--
REPORT ZDISTRICT_CUST_AUCSALES .
*TABLE DECLARATION*****************************************************
TABLES: /BIC/AUCSALES00,
/BIC/TCOKEY.
*DATA DECLARATION*****************************************************
DATA: BEGIN OF ITAB OCCURS 0,
/BIC/COKEY LIKE /BIC/TCOKEY-/BIC/COKEY,
TXTSH LIKE /BIC/TCOKEY-TXTSH,
END OF ITAB.
DATA: BEGIN OF ITAB2 OCCURS 0,
BILL_DATE LIKE /BIC/AUCSALES00-BILL_DATE,
/BIC/COKEY LIKE /BIC/AUCSALES00-/BIC/COKEY,
BPARTNER LIKE /BIC/AUCSALES00-BPARTNER,
END OF ITAB2.
DATA: COUNT TYPE I,
COKEY TYPE I,
COKEYNO(2) TYPE C,
COKEYCH(2),
BILDT TYPE I,
PROCOKEY TYPE I,
NOTPROCOKEY TYPE I,
TOTCOKEYDIV TYPE I,
TOTCOKEYDIV1 TYPE I,
TOTCOKEYDIV2 TYPE I,
TOTAL TYPE I.
DATA: C TYPE I VALUE 4.
SELECT OPTION FOR DATE SELECTION IN THE SELECTION SCREEN.************
SELECTION-SCREEN BEGIN OF BLOCK DATE WITH FRAME TITLE TEXT-001.
PARAMETERS: S_BILDT LIKE /BIC/AUCSALES00-BILL_DATE OBLIGATORY .
SELECTION-SCREEN END OF BLOCK DATE.
*INITIALIZATION******************************************************
FORMAT INTENSIFIED ON COLOR = C.
write:/ 'PROCESSING DATE:', 20 S_BILDT,
128 'TIME:', 135 SY-UZEIT.
WRITE:/ 'USER NAME :', 20 SY-UNAME,
142 ' '.
WRITE SY-ULINE.
WRITE: / 'D.C' , 12 SY-VLINE,
'NAME OF D.C' , 39 SY-VLINE,
'NUMBER OF CONSUMER' , 60 SY-VLINE,
'REMARKS' , 105 SY-VLINE.
WRITE:/ SY-ULINE.
FORMAT INTENSIFIED OFF.
*AT SELECTION-SCREEN**************************************************
SELECT BILL_DATE
UP TO 1 ROWS
INTO (/BIC/AUCSALES00-BILL_DATE)
FROM /BIC/AUCSALES00
WHERE BILL_DATE = S_BILDT.
ENDSELECT.
IF SY-SUBRC <> 0.
WRITE:/ ' NO DATA FOUND ON THIS DATE'.
EXIT.
ENDIF.
START OF SELECTION***************************************************
SELECT /BIC/COKEY TXTSH from /BIC/TCOKEY into table itab.
SORT ITAB.
IF NOT ITAB[] IS INITIAL.
SELECT BILL_DATE
/BIC/COKEY
BPARTNER
FROM /BIC/AUCSALES00
INTO CORRESPONDING FIELDS OF TABLE ITAB2
FOR ALL ENTRIES IN ITAB
WHERE /BIC/COKEY = ITAB-/BIC/COKEY
AND BILL_DATE = S_BILDT.
SORT ITAB BY /BIC/COKEY.
ENDIF.
*CHECK WHETHER THE DATA RETRIVE SUCESSFULLY OR NOT********************
IF SY-SUBRC NE 0.
WRITE:/ 'THIS DATE DOESNOT CONTAIN ANY DATA'.
ENDIF.
*DATA DISPLAY*********************************************************
*****GET THE FIRST VALUE AND DELETE THE ADJECENT AND DUPLICATE FROM ITAB2.
READ TABLE ITAB INDEX 1.
IF SY-SUBRC = 0.
COKEYNO = ITAB-/BIC/COKEY+4(2).
ENDIF.
READ TABLE ITAB2 WITH KEY /BIC/COKEY = itab-/BIC/COKEY.
IF SY-SUBRC = 0.
SORT ITAB2 BY /BIC/COKEY.
DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING /BIC/COKEY.
ENDIF.
LOOP AT ITAB.
READ TABLE ITAB2 WITH KEY /BIC/COKEY = itab-/BIC/COKEY.
*IF THE D.C ARE NOT SAME THEN DISPLAY THE SUM***************************
COKEYCH = ITAB-/BIC/COKEY+4(2).
IF ( COKEYCH <> COKEYNO ).
FORMAT COLOR = 4.
WRITE:/ ' TOTAL NUMBER OF D.C IN PERTICULAR RAO ','(', COKEYNO,')','=',TOTCOKEYDIV.
WRITE:/ ' TOTAL NUMBER OF CONSUMER PROCESSED IN RAO ','(', COKEYNO,')','=',TOTAL.
WRITE:/ ' TOTAL NUMBER OF D.C PROCESSED IN RAO ','(', COKEYNO,')','=',PROCOKEY.
WRITE:/ ' TOTAL NUMBER OF D.C NOT PROCESSED IN RAO ','(', COKEYNO,')','=',NOTPROCOKEY.
WRITE:/ '', 128 'PAGE NUMBER:', 139 SY-PAGNO.
SKIP 4.
*******INITIALLIZE ALL THE VARIABLE*************************************
FORMAT COLOR OFF .
TOTCOKEYDIV = 0.
TOTCOKEYDIV1 = 0.
TOTCOKEYDIV2 = 0.
TOTAL = 0.
PROCOKEY = 0.
NOTPROCOKEY = 0.
WRITE:/ SY-ULINE.
NEW-PAGE WITH-TITLE.
NEW-PAGE WITH-HEADING.
ENDIF.
**END OF THE TOTAL SUM OF ALL THE D.C.**********************************
*IF THE D.C ARE SAME THEN DISPLAY THE D.C.******************************
IF ITAB2-/BIC/COKEY = ITAB-/BIC/COKEY.
SELECT COUNT( DISTINCT BPARTNER )
INTO COUNT
FROM /BIC/AUCSALES00
WHERE /BIC/COKEY = ITAB2-/BIC/COKEY and
BILL_DATE = S_BILDT.
IF SY-SUBRC = 0.
PROCOKEY = PROCOKEY + 1.
ENDIF.
TOTCOKEYDIV1 = TOTCOKEYDIV1 + 1.
TOTAL = TOTAL + COUNT.
COKEY = ITAB2-/BIC/COKEY.
FORMAT INTENSIFIED ON COLOR = 2.
WRITE:/ ITAB2-/BIC/COKEY, SY-VLINE,
15 ITAB-TXTSH+1(19), 39 SY-VLINE,
40 COUNT, 60 SY-VLINE,
' ', 105 SY-VLINE.
WRITE :/ SY-ULINE.
FORMAT INTENSIFIED ON COLOR = 2.
ELSE.
FORMAT INTENSIFIED ON COLOR = 2.
COKEY = ITAB-/BIC/COKEY.
WRITE:/ ITAB-/BIC/COKEY, SY-VLINE,
15 ITAB-TXTSH+1(19), 39 SY-VLINE,
40 ' ', 60 SY-VLINE,
'Data Not extracted to BW', 105 SY-VLINE.
FORMAT INTENSIFIED ON COLOR = 2.
WRITE:/ SY-ULINE.
TOTCOKEYDIV2 = TOTCOKEYDIV2 + 1.
ENDIF.
TOTCOKEYDIV = TOTCOKEYDIV1 + TOTCOKEYDIV2.
NOTPROCOKEY = TOTCOKEYDIV - PROCOKEY.
COKEYNO = ITAB-/BIC/COKEY+4(2).
CLEAR: ITAB, ITAB2.
ENDLOOP.
===========================================================
please at this and let me know..
thanks in advance,,,HI ALL ,
I GOT THE ANSWER...
THANKS TO SDNNNN AND ALL THE FRIENDS LOOKING AT THIS...
THANKS ONCE AGAIN.... -
OBIEE Report Export from Dashboard to Excel doesn't suppress the columns as
OBIEE Report Export from Dashboard to Excel doesn't suppress the columns as expected even after the properties are set to Suppress in the report. In Dashboard it is suppressed Properly but in the excel export it is not suppressed and values for the columns are repeated.
Added the following to the instanceconfig :
<Download>
<Export xsi:type="excel">
<DataValue>UseFormattedValue</DataValue>
<RepeatRows>false</RepeatRows>
</Export>
</Download>
But then could not restart services.The following error occured :
Util Logger] Exception occurred:
Severity:1
Type:PKN3saw9ExceptionE
File:saxreader.cpp
Line:681
Message:Sax parser returned an exception.
Message: The prefix 'xsi' has not been mapped to any URI, Entity publicId: /oracle/ofm/instances/instance1/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml, Entity systemId: , Line number: 43, Column number: 26
Edited by: 887111 on Mar 27, 2013 11:23 PMProblem solved!!
<br><br>
See this part of the query:
<br><br>
if :P15_GESTOR_PROPIETARI='-3' then<br>
w:= w||' AND (("STASVWREPORT_TASQUES"."GES_GES_ID"=:GESTOR ';<br>
w:= w||'OR "STASVWREPORT_TASQUES"."GES_GES_ID_ESTA_ASSIGNADA"=:GESTOR)';<br>
w:= w||'OR ("STASVWREPORT_TASQUES"."AGR_***_***_ID"=<FONT color=red>:P15_CANVI_DE_CLUB</FONT> ';
w:= w||' AND "STASVWREPORT_TASQUES"."PUBLICA"=''S''))';<br>
end if;<br>
<br>
when instead of :P15_CANVI_DE_CLUB I put a value (say ''EE'') it works correctly, finally I created an application item (ASSOCIAT) and when when I change :P15_CANVI_DE_CLUB I set :ASSOCIAT to the same value and the query is based on this application item:
<br><br>
if :P15_GESTOR_PROPIETARI='-3' then<br>
w:= w||' AND (("STASVWREPORT_TASQUES"."GES_GES_ID"=:GESTOR ';<br>
w:= w||'OR "STASVWREPORT_TASQUES"."GES_GES_ID_ESTA_ASSIGNADA"=:GESTOR)';<br>
w:= w||'OR ("STASVWREPORT_TASQUES"."AGR_***_***_ID"=<FONT color=red>:ASSOCIAT </FONT>';<br>
w:= w||' AND "STASVWREPORT_TASQUES"."PUBLICA"=''S''))';<br>
end if;<br>
<br> -
How to calculate the total of a calculated column in a list view at the end of the view?
I have a view with the following columns ProductName, Quantity, Price, Total The total column is a calculated column which is the product of quantity and price. I want to place the sum of the total column by the end of the list view. I can do this with
the price and quantity but not with the total column. how do I do this?You can use SharePoint Designer and calculate the total in xslt view. Refer to the following post for more information
http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/04/24/how-to-total-calculated-columns-in-a-sharepoint-list.aspx
http://blog.metrostarsystems.com/2012/12/03/jennys-sharepoint-tip-sum-calculated-columns/
Cheers, -
in numbers, how would I make a line for each family (100+) a column for each fundraiser. and at mid year, and year end be able to print an alphabetical listing?
example: entertainment books Chip Shoppe Yankee Candle
Smith $350 $245 $100
Total at the end of the line, but I could live without. I am just trying to lose the paperwork, and have it in the ipad for when parents approach me at meetings.
Help!HI m,
Using Numbers '09 (the Mac version), I'd use a table with one header row and two header columns.
Family Total Ent.Books Chip S. Y. Candle
Smith, J $695 350 245 100
Jones, T $765 250 445 70
An ascending sort on column A will put the families in alphabetical order (and carry the rest of the row along with them).
The formula =SUM(2) in B2, and filled down from there, keeps the total for each family right beside the family name.
You could add a Footer row at the bottom to keep totals for each column. Formula for column B: =SUM(B)
I would leave the currency signs ($) off the amounts—they just clutter up the table.
This assumes that the features listed are all supported on Numbers for iOS, the version running on your iPad.
Regards,
Barry -
IPod Touch skips (jumps to the end of) the first track. Bug?
Hello,
I'm experiencing the following problem with my iPod Touch and was unable to find any information about similar cases in different forums:
I have several Audible.de audiobooks on my iPod that are by default listed under "audiobooks". Recently I noticed that sometimes my Touch would jump over the first track of a music album when I would start playing the first song, directly jumping to the end of the track and starting to play the second (while the status dot stays at the end of track 1 for a while). It looks as if I had fast forwarded to the very end of the first track - and it happens with the first track only.
I've removed all the music and books from my Touch and moved it back using iTunes, but this didn't help for long. If I completely turn off the Touch and turn it back on, the problem is solved for a moment. I kept asking myself why the problem would reoccur and it seems to me that it has to do with the audiobooks I'm listening to often. I tried the following:
1. Switched off and on. Listened to music without any title jumping problem.
2. Opened an audiobook and listened to it for a few seconds.
3. Went back to music (any album) - the Touch jumps over the first track.
This leads me to believe that listening to audiobooks (maybe just audible audiobooks) creates this problem.
I also found out that after starting to play the first track (which gets immediately jumped over or, more exactly, to its very end), I can "heal" the Touch (until I listen to an audiobook again) by pressing Pause, then the back arrow twice so that I jump to the beginning of the first track, then back to the album cover and track list. After that, I can listen to music as long as I want to without any skipping or jumping, as long as I don't play an audiobook.
To me, this sounds like a bug, but I can't tell if Audible or Apple is to blame. Besides, I don't see an easy way to contact Apple about a bug that might be related to their OS, which I find upsetting (they hide their contact adresses so well that you can't tell them about bugs in their own software, or you have to pay for expensive calls?).
Maybe someone knows what to do or has already heard about a similar problem. I try to circumvent a complete reset of my iPod, as I have lots of apps that are arranged into many different groups. I'd prefer not to sort all of them again, but if resetting the iPod seems to be the only possible solution, I would try that of course. Of course I'd appreciate if someone could tell me how to fix this or whom to contact about it.
Thanks (also for reading this long description),
Alex
Message was edited by: alexhagerHi MikeSpike,
Thanks for your comment! Have you tried everything to resolve it, like resetting the iPod as a new device after deleting the IPSW from your computer first? Does the error still occur?
In fact, I cannot reproduce the problem using podcasts (they work fine for me, as far as I can tell there's no effect between podcast and music on my device), but it may very well be that the error is the same or a similar one (this would be for Apple to investigate, I'll forward parts of your comment to the Apple Advisor taking care of my case, if you agree).
Yes, it is the first track. Although I had one rare occasion where only track 2 was skipped and another one where tracks it happened to tracks 1 and 2 (no shuffle, no remember position activated), the highly reproducible issue touches track # 1 only.
Thanks for precising that you're using a BT headset. Could you please tell me which one, in case that matters? Has your iPod sometimes reacted weirdly when you used your BT headset to remote control the iPod, for instance skipping more titles than you wanted when you pressed "forward"? This is kind of what happened to me on my iPad and since then I've noticed the error appear on the iPad too.
Regarding your other issues, I cannot confirm the podcast problem where a podcast starts at some random point. Podcast seem to work fine in my case, but maybe all of this is caused by one and the same error. Let's hope Apple will find it all and fix it in an update asap.
Also, I don't have the artwork problem where an album displays artwork from a different album. I have had a case where a few tracks of one specific album (and just that one) were not displaying the artwork at all, although everything was properly tagged using the software MP3Tag. If you haven't reset your iPod (as a new device, not from the backup), maybe this would at least resolve some of your problems?
While my problem is just annoying for people like me who simply want their new device to work without any errors (even if there's an easy temporary fix or workaround to these errors so that I could live with it), your errors sum up to a nuisance that makes it hard to enjoy using the device. Having wrong artwork displayed with albums (or none at all) and podcasts being played at random positions is certainly not what you'd expect from such an expensive device.
Have you thought of contacting Apple about it? Not only might they have a solution for your specific problems, but it might also be more convincing if more people would independently report the first-track-skipping-issue we're all experiencing! What they need to know is that the bug is global, not just a corner case, and that it seems to be somehow related to their iOS. They couldn't afford ignoring it if several people would complain about this, especially now that a new iOS beta is already out!
Maybe some other users who read this thread have made similar experiences without paying attention to it? To all other forum users: would you please try if you notice anything weird like first tracks being skipped, either music or podcast? Maybe related to audiobook listening, maybe related to BT headset use? I'd be happy to forward any observation to Apple (to the existing issue case number) in order to better convince Apple to investigate this - asap.
Thanks again, MikeSpike, of course I will keep you all updated if I hear back from Apple! -
How to add zero at the end of a character string
Hello Experts,
I've a requirement where I need to do sum/total of various numbers and display it with $ sign as shown below.
I'm using a variable CHAR20 to display total with $ sign. The problem is if there is a 0 at the end of the total then variable doesn't display it as highlighted above in red. Can anybody please make suggestion ( a code sample will be great help ) how resolve this issue?
Many thanks in advance.Hi,
please check this code:
REPORT ztestcurr.
DATA: xv_prval TYPE char20.
DATA: xv_val1 TYPE dmbtr VALUE '12.67'.
DATA: xv_val2 TYPE dmbtr VALUE '8.21'.
DATA: xv_val3 TYPE dmbtr VALUE '13.72'.
DATA: xv_sum TYPE dmbtr.
START-OF-SELECTION.
xv_sum = xv_val1 + xv_val2 + xv_val3.
PERFORM print_val USING xv_val1.
PERFORM print_val USING xv_val2.
PERFORM print_val USING xv_val3.
PERFORM print_val USING xv_sum.
*& Form PRINT_VAL
* Print value
* --> XF_VALUE Value to print
FORM print_val USING xf_value TYPE dmbtr.
WRITE xf_value TO xv_prval CURRENCY 'USD'.
CONCATENATE '$' xv_prval INTO xv_prval.
CONDENSE xv_prval NO-GAPS.
write /1 xv_prval using edit mask 'RR____________________'.
ENDFORM. " PRINT_VAL
Regards,
Klaus -
Hi friends,
I need to add one horizontal line for the detail section at the end of the page.
I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
Is there any feature to find end of the Page.
I want report format like this.
set id | set name | date Name
1 x dddd vijay
dddd sarathi
dddd reddy
(End of the page)
Thanks in advance...
vijay.Do you know how many detail records are showing up per page?
If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper. -
Total Text Display at the end of the ALV
Hi,
I want to display the text 'TOTAL' in my ALV at the end of my report.I am pasting my code, So please any one help me in this issue.
*& Report ZFIR0011_O2C_TAX_GL_SUMMARY
REPORT zfir0011_o2c_tax_gl_summary.
TYPE-POOLS slis.
TABLES: faglflexa.
Column positions to pass to field catalog
CONSTANTS : c_pos_1 TYPE sy-cucol VALUE '1', " position of the columns
c_pos_2 TYPE sy-cucol VALUE '2',
c_pos_3 TYPE sy-cucol VALUE '3',
c_pos_4 TYPE sy-cucol VALUE '4',
c_pos_5 TYPE sy-cucol VALUE '5'.
*Field names for Field Catalog
CONSTANTS : c_h TYPE c VALUE 'H',
c_s TYPE c VALUE 'S',
c_slash TYPE c VALUE '/',
c_colon TYPE c VALUE ':',
c_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
c_top_of_page_split TYPE slis_formname VALUE 'TOP_OF_PAGE_SPLIT',
c_txjcd TYPE slis_fieldname VALUE 'TXJCD', "Tax Jurisdiction
c_region TYPE slis_fieldname VALUE 'STATE', "State
c_currb TYPE slis_fieldname VALUE 'CURR_BAL', "Current Balance
c_perch TYPE slis_fieldname VALUE 'PER_CHNG', "Period Change
c_prbal TYPE slis_fieldname VALUE 'PRI_BALA', "Prior Balance
c_total TYPE slis_fieldname VALUE 'TOTAL'. "Total
CONSTANTS : c_table_name TYPE slis_tabname VALUE 'IT_FINAL', "For Field Catalog
c_spras TYPE spras VALUE 'E', "Language
c_buzei TYPE c VALUE '1',
c_zp TYPE bset-mwskz VALUE 'ZP',
c_zr TYPE bset-mwskz VALUE 'ZR'.
Types Declaration.
TYPES: BEGIN OF ty_faglflexa,
ryear TYPE gjahr,
bukrs TYPE bukrs,
belnr TYPE belnr_d, "Document Number
poper TYPE poper, "Posting Period
budat TYPE budat, "Posting Date
buzei TYPE buzei, "Document line item
racct TYPE racct, "G/L Account no.
END OF ty_faglflexa,
ty_t_faglflexa TYPE STANDARD TABLE OF ty_faglflexa.
TYPES: BEGIN OF ty_bset,
belnr TYPE belnr_d,
buzei TYPE buzei,
mwskz TYPE mwskz, "Tax code
hkont TYPE hkont,
shkzg TYPE shkzg, "Debit/Credit Indicator
txjcd TYPE txjcd, "Tax Jurisdiction
h2ste TYPE h2ste, "Tax Amount
h2bas TYPE h2bas_bses, "Tax Amount
END OF ty_bset,
ty_t_bset TYPE STANDARD TABLE OF ty_bset.
TYPES: BEGIN OF ty_skat,
spras TYPE spras,
ktopl TYPE ktopl,
saknr TYPE saknr,
text TYPE txt20_skat,
END OF ty_skat,
ty_t_skat TYPE STANDARD TABLE OF ty_skat.
TYPES: BEGIN OF ty_custom,
geo_state TYPE char2,
geo_county TYPE char3,
country TYPE char2,
description TYPE char40,
END OF ty_custom,
ty_t_custom TYPE STANDARD TABLE OF ty_custom.
TYPES : BEGIN OF ty_budat,
sign TYPE char_01,
option TYPE char2,
low TYPE budat,
high TYPE budat,
END OF ty_budat,
ty_t_budat TYPE STANDARD TABLE OF ty_budat.
TYPES: BEGIN OF ty_txjcd,
geo_state TYPE char2,
geo_county TYPE char3,
END OF ty_txjcd,
ty_t_txjcd TYPE STANDARD TABLE OF ty_txjcd.
TYPES: BEGIN OF ty_inter,
ryear TYPE gjahr,
bukrs TYPE bukrs,
txjcd TYPE txjcd, "Tax Jurisdiction
racct TYPE racct, "G/L Account no.
h2ste TYPE h2ste, "Tax Amount
poper TYPE poper, "Posting Period
belnr TYPE belnr_d, "Document Number
shkzg TYPE shkzg, "Debit/Credit Indicator
END OF ty_inter,
ty_t_inter TYPE STANDARD TABLE OF ty_inter.
TYPES: BEGIN OF ty_final,
txjcd TYPE bset-txjcd, "Tax Jurisdiction
state TYPE char40, "State
curr_bal TYPE bset-h2ste, "Current Balance
per_chng TYPE bset-h2ste, "Period Change
pri_bala TYPE bset-h2ste, "Prior Balance
END OF ty_final,
ty_t_final TYPE STANDARD TABLE OF ty_final.
Internal Tables Declaration.
DATA : it_faglflexa TYPE ty_t_faglflexa,
it_bset TYPE ty_t_bset,
it_skat TYPE ty_t_skat,
it_custom TYPE ty_t_custom,
it_txjcd TYPE ty_t_txjcd,
it_inter TYPE ty_t_inter. "Intermediate table for storing data
DATA : it_final TYPE ty_t_final. "#EC NEEDED
*Fieldcatalogue Internal Table Declaration
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv,
it_alv_top_of_page TYPE slis_t_listheader,
gs_line TYPE slis_listheader.
*Field-symbols and Work Area Declarations
FIELD-SYMBOLS : <fs_faglflexa> TYPE ty_faglflexa,
<fs_bset> TYPE ty_bset,
<fs_inter> TYPE ty_inter.
DATA : wa_faglflexa TYPE ty_faglflexa, "#EC NEEDED
wa_bset TYPE ty_bset,
wa_skat TYPE ty_skat,
wa_custom TYPE ty_custom,
wa_txjcd TYPE ty_txjcd,
wa_inter TYPE ty_inter,
wa_final TYPE ty_final. " #EC NEEDED
Variables Declaration.
DATA : v_current_year TYPE i,
v_poper TYPE poper,
v_saknr TYPE saknr, "#EC NEEDED
v_ktopl TYPE ktopl,
v_konts TYPE saknr,
v_bukrs TYPE bukrs,
v_buzei(2) TYPE n VALUE '0',
v_sum_val TYPE h2ste,
v_sum_val1 TYPE h2ste,
v_sum_val2 TYPE h2ste,
v_h2ste TYPE string,
v_desc TYPE char40,
v_title TYPE char40,
v_start_date TYPE char10. "Temp Added
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_bukrs TYPE faglflexa-rbukrs OBLIGATORY, " Company Code
p_gjahr TYPE faglflexa-gjahr OBLIGATORY. " Fiscal Year
SELECT-OPTIONS: s_budat FOR faglflexa-budat OBLIGATORY
NO-EXTENSION
NO INTERVALS.
PARAMETERS: p_racct TYPE faglflexa-racct OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN VALIDATIONS.
*Company Code Validation.
AT SELECTION-SCREEN ON p_bukrs.
SELECT SINGLE bukrs INTO v_bukrs
FROM t001
WHERE bukrs = p_bukrs.
IF sy-subrc NE 0.
MESSAGE text-002 TYPE 'E'.
ENDIF.
Fiscal Year Validation. It should not be more than Current.
AT SELECTION-SCREEN ON p_gjahr.
v_current_year = sy-datum+0(4).
IF p_gjahr > v_current_year.
MESSAGE text-003 TYPE 'E'.
ENDIF.
*G/L Account Validation.
AT SELECTION-SCREEN ON p_racct.
SELECT SINGLE saknr INTO v_saknr
FROM skb1
WHERE saknr EQ p_racct
AND bukrs EQ p_bukrs.
IF sy-subrc EQ 0.
SELECT SINGLE ktopl FROM t001
INTO v_ktopl
WHERE bukrs = p_bukrs.
SELECT SINGLE konts FROM t030k
INTO v_konts
WHERE ktopl = v_ktopl
AND konts = v_saknr.
IF sy-subrc NE 0.
MESSAGE text-004 TYPE 'E'.
ENDIF.
ELSE.
MESSAGE text-004 TYPE 'E'.
ENDIF.
START-OF-SELECTION.
PERFORM get_data USING p_bukrs
p_gjahr
s_budat[]
p_racct CHANGING it_final.
*Display report in ALV grid
IF it_final IS NOT INITIAL.
*Build Top of the page table.
PERFORM comment_build USING it_skat CHANGING it_alv_top_of_page.
*Build Field catalog table for ALV
PERFORM build_field_catalog CHANGING it_fieldcat.
*Display report
PERFORM display_alv USING it_final.
ELSE.
*No data found for the selection criteria/period.
MESSAGE text-018 TYPE 'I'.
ENDIF.
*& Form GET_DATA
text
-->P_P_BUKRS text
-->P_P_GJAHR text
-->P_P_BUDAT text
-->P_P_RACCT text
<--P_IT_FINAL text
FORM get_data USING fp_bukrs TYPE bukrs
fp_gjahr TYPE gjahr
fp_budat TYPE ty_t_budat
fp_racct TYPE racct
CHANGING fp_it_final TYPE ty_t_final.
DATA : v_date(2) TYPE c VALUE '01',
v_month(2) TYPE c VALUE '01',
v_start_date TYPE datum.
*concatenate p_gjahr v_month v_date into v_start_date. " separated by c_slash.
SELECT ryear
rbukrs
belnr "Document Number
poper "Posting Period
budat "Posting Date
buzei "Document line item
racct "G/L Account no.
INTO TABLE it_faglflexa
FROM faglflexa
WHERE rbukrs EQ p_bukrs
AND gjahr EQ p_gjahr
AND budat LE s_budat
AND racct EQ p_racct.
*selecting the Tax Jurisdiction, Tax amount from BSET
IF it_faglflexa IS NOT INITIAL.
SELECT belnr
buzei
mwskz
"hkont
shkzg "Debit/Credit Indicator
txjcd "Tax Jurisdicaiton
h2ste "Tax Amount
h2bas "Tax Amount1
INTO TABLE it_bset
FROM bset
FOR ALL ENTRIES IN it_faglflexa
WHERE belnr EQ it_faglflexa-belnr
AND gjahr EQ p_gjahr "it_faglflexa-ryear
AND buzei EQ c_buzei. "Line item
ENDIF.
IF sy-subrc EQ 0.
SORT it_bset BY txjcd ASCENDING.
ENDIF.
*Selecting the G/L Account Long Text from SKAT
IF it_faglflexa IS NOT INITIAL.
SELECT spras " Language key
ktopl " Chart of Accounts
saknr " G/L Account Number
txt20 " G/L Account Long Text
INTO TABLE it_skat
FROM skat
FOR ALL ENTRIES IN it_faglflexa
WHERE spras = c_spras
AND saknr = it_faglflexa-racct.
ENDIF.
*Selecting the Description from Custom table
LOOP AT it_bset ASSIGNING <fs_bset>.
wa_txjcd-geo_state = <fs_bset>-txjcd+0(2).
wa_txjcd-geo_county = <fs_bset>-txjcd+2(3).
APPEND wa_txjcd TO it_txjcd.
CLEAR wa_txjcd.
ENDLOOP.
IF it_txjcd IS NOT INITIAL.
SELECT geo_state
geo_county
country
description
INTO TABLE it_custom
FROM ztfi_tgl_summary
FOR ALL ENTRIES IN it_txjcd
WHERE geo_state = it_txjcd-geo_state
AND geo_county = it_txjcd-geo_county.
ENDIF.
LOOP AT it_faglflexa ASSIGNING <fs_faglflexa>.
MOVE-CORRESPONDING <fs_faglflexa> TO wa_inter. "#EC ENHOK
*Read Tax Jurisdiction and Tax Amount from BSET Table.
READ TABLE it_bset INTO wa_bset WITH KEY belnr = <fs_faglflexa>-belnr.
IF sy-subrc EQ 0.
wa_inter-shkzg = wa_bset-shkzg.
wa_inter-txjcd = wa_bset-txjcd.
ENDIF.
*If BSET-MWSKZ = ZP or ZR then pick H2BAS as Tax Amount.
IF wa_bset-mwskz = c_zp.
wa_inter-h2ste = wa_bset-h2bas.
ELSEIF wa_bset-mwskz = c_zr.
wa_inter-h2ste = wa_bset-h2bas.
ELSE.
wa_inter-h2ste = wa_bset-h2ste.
ENDIF.
*Check it is credit entry or debit entry ('H' or 'S').
IF wa_inter-shkzg EQ 'H'.
wa_inter-h2ste = wa_inter-h2ste * -1.
ENDIF.
APPEND wa_inter TO it_inter.
CLEAR: wa_inter, wa_bset.
ENDLOOP.
IF sy-subrc EQ 0.
SORT it_inter BY bukrs ryear txjcd ASCENDING.
DELETE it_inter WHERE txjcd EQ space.
ENDIF.
v_poper = s_budat-low+4(2).
LOOP AT it_inter INTO wa_inter.
*Read the Text maintained in the custom table based on the GEO_STATE = First two digits of TXJCD
*and GEO_COUNTY = Next three digits of TXJCD. If this is blank pick based on First two digits of TXJCD.
READ TABLE it_custom INTO wa_custom WITH KEY geo_state = wa_bset-txjcd+0(2)
geo_county = wa_bset-txjcd+2(3).
IF sy-subrc NE 0.
READ TABLE it_custom INTO wa_custom WITH KEY geo_state = wa_bset-txjcd+0(2).
ENDIF.
IF sy-subrc = 0.
wa_final-state = wa_custom-description.
ENDIF.
AT NEW txjcd.
CLEAR: v_sum_val, v_sum_val1, v_sum_val2.
ENDAT.
Period Change
IF wa_inter-poper EQ v_poper.
v_sum_val1 = v_sum_val1 + wa_inter-h2ste.
ENDIF.
Prior Balance
IF wa_inter-poper LT v_poper.
v_sum_val2 = v_sum_val2 + wa_inter-h2ste.
ENDIF.
AT END OF txjcd.
wa_final-txjcd = wa_inter-txjcd.
wa_final-per_chng = v_sum_val1. "Period change
wa_final-pri_bala = v_sum_val2. "Prior Balance
wa_final-curr_bal = v_sum_val1 + v_sum_val2. "Current Balance
APPEND wa_final TO it_final.
CLEAR wa_final.
ENDAT.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form COMMENT_BUILD
text
-->P_IT_SKAT text
<--P_IT_ALV_TOP_OF_PAGE text
FORM comment_build USING fp_it_skat TYPE ty_t_skat
CHANGING fp_it_alv_top_of_page TYPE slis_t_listheader.
DATA: v_budat_low TYPE c LENGTH 10,
v_budat_high TYPE c LENGTH 10,
v_butxt TYPE butxt.
CLEAR gs_line.
*Report Title
CONCATENATE text-005 p_bukrs INTO v_title SEPARATED BY space.
gs_line-typ = c_h.
gs_line-key = ' '.
gs_line-info = v_title.
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR gs_line.
*Account Number
gs_line-typ = c_s.
gs_line-key = text-006.
gs_line-info = p_racct.
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR gs_line.
*G/L Account Description
READ TABLE it_skat INTO wa_skat WITH KEY ktopl = v_ktopl.
IF sy-subrc EQ 0.
v_desc = wa_skat-text.
ENDIF.
gs_line-typ = c_s.
gs_line-key = text-007.
gs_line-info = v_desc.
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR gs_line.
*Fiscal Year from selection
IF NOT p_gjahr IS INITIAL.
gs_line-info = p_gjahr.
gs_line-typ = c_s.
gs_line-key = text-008. "Fiscal Year
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR gs_line.
ENDIF.
*Posting Date
CONCATENATE s_budat-low4(2) s_budat-low6(2) s_budat-low+0(4) INTO gs_line-info SEPARATED BY c_slash.
gs_line-typ = c_s.
gs_line-key = text-009. "Posting Date
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR gs_line.
*Company Code Description from selection
IF NOT p_bukrs IS INITIAL.
SELECT SINGLE butxt FROM t001
INTO v_butxt WHERE bukrs EQ p_bukrs.
gs_line-info = v_butxt.
gs_line-typ = c_s.
gs_line-key = text-010. "Company Code Description
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR gs_line.
ENDIF.
Printed Date
gs_line-typ = c_s.
gs_line-key = text-011. "Printed Date
CONCATENATE sy-datum+4(2)
sy-datum+6(2)
sy-datum(4) INTO gs_line-info SEPARATED BY c_slash. "todays date
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR: gs_line.
Printing Time
gs_line-typ = c_s.
gs_line-key = text-012. "Printing Time
gs_line-info = sy-uzeit.
CONCATENATE sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2) INTO gs_line-info SEPARATED BY c_colon. "current time
APPEND gs_line TO fp_it_alv_top_of_page.
CLEAR: gs_line.
ENDFORM. " COMMENT_BUILD
*& Form BUILD_FIELD_CATALOG
text
<--P_IT_FIELDCAT text
FORM build_field_catalog CHANGING fp_it_fieldcat TYPE slis_t_fieldcat_alv.
TAX JURISDICTION
wa_fieldcat-col_pos = c_pos_1.
wa_fieldcat-reptext_ddic = text-013. "TAX JURISDICTION
wa_fieldcat-fieldname = c_txjcd.
wa_fieldcat-tabname = c_table_name.
wa_fieldcat-outputlen = '15'.
APPEND wa_fieldcat TO fp_it_fieldcat.
CLEAR : wa_fieldcat.
STATE
wa_fieldcat-col_pos = c_pos_2.
wa_fieldcat-reptext_ddic = text-014. "STATE
wa_fieldcat-fieldname = c_region.
wa_fieldcat-tabname = c_table_name.
wa_fieldcat-outputlen = '40'.
APPEND wa_fieldcat TO fp_it_fieldcat.
CLEAR : wa_fieldcat.
CURRENT BALANCE
wa_fieldcat-col_pos = c_pos_3.
wa_fieldcat-reptext_ddic = text-015. "CURRENT BALANCE
wa_fieldcat-fieldname = c_currb.
wa_fieldcat-tabname = c_table_name.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-datatype = 'CURR'.
wa_fieldcat-outputlen = '17'.
APPEND wa_fieldcat TO fp_it_fieldcat.
CLEAR : wa_fieldcat.
PERIOD CHANGE
wa_fieldcat-col_pos = c_pos_4.
wa_fieldcat-reptext_ddic = text-016. "PERIOD CHANGE
wa_fieldcat-fieldname = c_perch.
wa_fieldcat-tabname = c_table_name.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-datatype = 'CURR'.
wa_fieldcat-outputlen = '17'.
APPEND wa_fieldcat TO fp_it_fieldcat.
CLEAR : wa_fieldcat.
PRIOR BALANCE
wa_fieldcat-col_pos = c_pos_5.
wa_fieldcat-reptext_ddic = text-017. "PRIOR BALANCE
wa_fieldcat-fieldname = c_prbal.
wa_fieldcat-tabname = c_table_name.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-datatype = 'CURR'.
wa_fieldcat-outputlen = '17'.
APPEND wa_fieldcat TO fp_it_fieldcat.
CLEAR : wa_fieldcat.
ENDFORM. " BUILD_FIELD_CATALOG
*& Form DISPLAY_ALV
text
-->P_IT_FINAL text
FORM display_alv USING fp_it_final TYPE ty_t_final.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_callback_top_of_page = c_top_of_page
i_callback_html_top_of_page = c_top_of_page_split
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = fp_it_final
EXCEPTIONS
PROGRAM_ERROR = 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.
ENDFORM. " DISPLAY_ALV
*& Form top_of_page
Top of the page for ALV
FORM top_of_page. "#EC CALLED
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_alv_top_of_page
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "top_of_page
*& Form top_of_page_split
text
FORM top_of_page_split USING r_top TYPE REF TO cl_dd_document."#EC *
TYPES: BEGIN OF ty_text,
text TYPE sdydo_text_element,
END OF ty_text.
TYPES: BEGIN OF ty_text1, "AAAAAAAA
text1 TYPE sdydo_text_element,
END OF ty_text1.
DATA: s_tab TYPE sdydo_text_table,
c_area TYPE REF TO cl_dd_area,
text TYPE sdydo_text_element,
c_area1 TYPE REF TO cl_dd_area, "AAAAAAA
text1 TYPE sdydo_text_element,
s_tab1 TYPE sdydo_text_table.
DATA: it_text TYPE TABLE OF ty_text,
wa_text TYPE ty_text.
DATA: it_text1 TYPE TABLE OF ty_text1,
wa_text1 TYPE ty_text1.
DATA: v_title TYPE string,
v_accts_desc TYPE string,
v_year TYPE string,
v_comp_code TYPE string,
v_desc TYPE char40,
v_budat TYPE char10,
v_budat1 TYPE char10,
v_butxt TYPE butxt,
v_time TYPE char10,
v_comma TYPE c VALUE ','.
CALL METHOD r_top->initialize_document.
CALL METHOD r_top->vertical_split
EXPORTING
split_area = r_top
split_width = '31%'
IMPORTING
right_area = c_area.
IF sy-subrc EQ 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*G/L Account Description
READ TABLE it_skat INTO wa_skat WITH KEY ktopl = v_ktopl.
IF sy-subrc EQ 0.
v_desc = wa_skat-text.
ENDIF.
*Company code Description
IF NOT p_bukrs IS INITIAL.
SELECT SINGLE butxt FROM t001
INTO v_butxt WHERE bukrs EQ p_bukrs.
ENDIF.
CONCATENATE text-005 p_bukrs INTO v_title SEPARATED BY space.
wa_text1-text1 = v_title.
APPEND wa_text1 TO it_text1.
s_tab1 = it_text1.
CALL METHOD c_area->add_text
EXPORTING
text_table = s_tab1
fix_lines = 'X'
sap_fontsize = cl_dd_document=>large
sap_emphasis = cl_dd_document=>strong. "AAAAAA
CONCATENATE text-006 p_racct v_comma text-007 v_desc INTO v_accts_desc SEPARATED BY space.
CONCATENATE s_budat-low4(2) s_budat-low6(2) s_budat-low+0(4) INTO v_budat SEPARATED BY c_slash.
CONCATENATE text-008 p_gjahr v_comma text-009 v_budat INTO v_year SEPARATED BY space.
CONCATENATE text-010 v_butxt INTO v_comp_code SEPARATED BY space.
wa_text-text = v_title.
APPEND wa_text TO it_text.
wa_text-text = v_accts_desc.
APPEND wa_text TO it_text.
wa_text-text = v_year.
APPEND wa_text TO it_text.
wa_text-text = v_comp_code.
APPEND wa_text TO it_text.
s_tab = it_text.
CALL METHOD c_area->add_text
EXPORTING
text_table = s_tab
fix_lines = 'X'
sap_fontsize = cl_dd_document=>medium
sap_emphasis = cl_dd_document=>medium.
CALL METHOD r_top->new_line.
CALL METHOD r_top->new_line.
CALL METHOD r_top->new_line.
CALL METHOD r_top->add_gap
EXPORTING
width = 0.
CONCATENATE sy-datum4(2) sy-datum6(2) sy-datum+0(4) INTO v_budat1 SEPARATED BY c_slash.
CALL METHOD r_top->add_text
EXPORTING
text = text-011
sap_emphasis = 'STRONG'.
CALL METHOD r_top->add_gap
EXPORTING
width = 1.
text = v_budat1.
CALL METHOD r_top->add_text
EXPORTING
text = text.
sap_style = 'KEY'.
CALL METHOD r_top->new_line.
CALL METHOD r_top->add_text
EXPORTING
text = text-012
sap_emphasis = 'STRONG'.
CALL METHOD r_top->add_gap
EXPORTING
width = 1.
CONCATENATE sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2) INTO v_time SEPARATED BY c_colon. "current time
text = v_time.
CALL METHOD r_top->add_text
EXPORTING
text = text.
sap_style = 'KEY'.
ENDFORM. "top_of_page_split
Thanks & Regards,
RamanaHi,
try to declare alv layout and in that
FORM t_layout USING i_layout TYPE slis_layout_alv.
i_layout-colwidth_optimize = 'X'.
i_layout-zebra = 'X'.
p_i_layout-totals_text = 'GRAND TOTAL ='.
p_i_layout-subtotals_text = 'Sub Total'.
p_i_layout-DEF_STATUS = ' '.
p_i_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " T_LAYOUT
hope this helps you.
Thanks & Regards,
Y.R.Prem Kumar -
Dynamic File Name - Suppress the Substitue varible
Hi All,
I am doing the scenarios like File name at the recevier end would be dynamic for that i take an extra field NAME mapped with UDF which return the file name dynamically. It is working fine and doing good. But the problem here is , this field is the first field in my target structure so i am getting an empty line in the target file.
So My structure as follows:
<b>MT_BNK01 1..1
NAME 1..1
RECORD 0..Unbound
--Record_data 0..Unbound</b>
So in the recever side i written as follows
Recordset Structure:: RECORD
<b>RECORD.fieldSeparator = 'nl'
RECORD.endSeparator = 'nl'</b>
But according to this weblog i can suppress the empty line but it is not working
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
means, NAME is also in the same level of RECORD in the Structure. So How can i pass the structure as ??
I tried to pass the RecordSet Structure: NAME,RECORD
and following parameters, it is not working
<b>NAME.fieldFixedLength =0
NAME.fieldLengthTooShortHandling = Cut</b>
Can you please suggest me what could be the reason. Tell me what information i need to pass the RecordSet Structure and attrubute information also.
One more thing like, My sender side it is not picking the empty lines. What could be the reason. I given fieldSeparator and endSeparator as 'nl'. So to catch the empty line what i need to do???
Thanks in Advance,
Best Regards,
VijayHi Vijaya,
This can be solved. Actually i had the same scenario where i was getting blank line for the header. Suppose Header was carrying the file name after i cut the value i would get a blank line in file.
So i added in content conversion parameter the following line
Header.endSeparator - '0'
then the first line was not blank.
Try this, i think your issue will be solved
Regards,
Ramesh P
Message was edited by:
Ramesh Parashivamurthy -
Please help urgent Calculation at the end of alv report
Hi ..
It is necessary to define clearly col1 first record is 10 col2 first record is 20 ..
col1 second record is 15 col2 second record is 25 .
COL3 first value is 10 / 20 .
col3 second value is 15 / 25 .
This datas come from internal table .
When I add at the end for all columns it get wrong calculation or lets say I want to do like total col1 10+ 15 total col2 is 20+ 25 . Total column3 is would like to be 25 / 45 .
How can I insert a line which is doing this operation in my alv .try this
first
DATA : SAT_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 = SAT_EVENTS[].
READ TABLE SAT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
APPEND LS_EVENT TO SAT_EVENTS.
ENDIF.
READ TABLE SAT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_LIST
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE 'END_OF_LIST' TO LS_EVENT-FORM.
APPEND LS_EVENT TO SAT_EVENTS.
ENDIF.
form for end of list
FORM END_OF_LIST.
DATA: P_HEADER TYPE SLIS_T_LISTHEADER,
PA_HEADER TYPE SLIS_LISTHEADER.
DATA: INFO(100).
info = <your calculated value for col3>
PA_HEADER-TYP = 'S'.
PA_HEADER-INFO = INFO.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = P_HEADER
I_LOGO =
I_END_OF_LIST_GRID = 'X'
ENDFORM. "END-OF-LIST
in REUSE_ALV_GRID_DISPLAY pass
IT_EVENTS = SAT_EVENTS[]
hope this will work
regards
Shiba dutta
Message was edited by:
SHIBA DUTTA
Maybe you are looking for
-
Hi All Searched this forum for - getting a Black and White DVD when doing as I always do. movie 2 x 51 min PAL iMovie 5.0.2 iDVD 5.0.1 QT 6.5.2 OS X.3.9 D2GHz Mac 3Gb RAM enough free space - I thought 10 - 20 Gb. iMovie set to PAL, iDVD set to PAL Re
-
QuickTime Player Document won't open
I tried opening it a few times and checked permissions, (I think they're set right) and QuickTime won't open my QuickTime Player Documents. The end part is .ml20. Any advice?
-
Session variable reference in report title.
Can someone suggest me a answer for my problem? I want to display the report title by with the logged in username. So, I've created a report and in the 'Edit View' of 'Title'view of that report, i just placed '@{NQ_SESSION.user}' in the Sub title sec
-
Direct Access Management Servers, what are the entry good for?
In the advanced Direct Access setup wizard you have the ability to enter your management servers. I haven't been able to find an explanation of why, what is it good for? If I understand everything correct DA gives full access to the subnet so why is
-
Files Won't Open on Intel-Based Macs
We are running 10.4.11 on our Mac Pros at work, and on the two Intel-based machines you can't open any files simply by clicking on them---it merely launches the program that the files should open in and then you have to open the files from within tha