ALV: Display Header, line item, information after page break .............
Hi .
I am facing problem in displaying a particular layout in ALV.
the layout is as follows:
1. Header part
2. Line item
3. There is field customer and after every change of customer do page break and display information like how many record read and how many record processed. below is brief detail about how to get read and processed record.
I have two internal table say table1 and table2.
Looping table1
increase the counter as counter_read = counter_read +1.
compare the record with table2.
if matches
increase the counter as counter_process = counter_process + 1.
4. At the end of report display a error log.
to get the error log we will follow the above logic and if record not matched then display as error record.
Please help ASAP to find the solution.
Thanks in advance
There is a knowledge base article C2014229 (1210986 - Subreports do not have a Page Header) , but instead of providing link I will just copy content here:
Symptom
Since subreports are objects in the Main Report, they do not contain Page Headers. How can you create a fake page header for subreports?
Resolution
To create a fake page header for subreports, use the following steps:
1. In the subreport, create a formula:
@FakePageHeader
//name of formula
WhileReadingRecords;
2. Go to the 'Insert' menu and click 'Group'. Select the @FakePageHeader formula.
3. Select the 'Repeat Group Header on Each New Page' option, and click 'OK'.
This inserts a new group at the lowest, or innermost, grouping level. You will need to move this group to the highest, or outermost, grouping level.
4. Go to 'Report' menu and click 'Group Expert'. Use the up arrow to move this newest group up to the top of the list.
5. Move all the headers that you would like repeated into this Header for the @FakePageHeader group.
Hope it will help.
Similar Messages
-
Rebuild dynamic header row in table after page break
Hi,
I have a table with dynamic columns. So in the initialize event of the table, I'm build up the header row (add columns with addInstance etc.). The same I'm doing with the table rows. It works fine, so I see correct header row and also several body rows with the right content.
My issue is now the page break. When I tick the checkbox "Include headerow in subsequent pages", it will show a heade row, but not my dynamic build one. So how can I make sure, that my dynamic creation of the header row will also take place on each page? Is there any event, where I can placed the code it, so the header row is being created on each page freshly?
I was thinking about to create another header row, for which one I ONLY tick the checkbox "Include headerow in subsequent pages", but this was working neither.
Do you have any ideas here?
Thank you & best regards,
ArneHi Nitin,
in this case, you must use more nested wrapper subforms and set the root subform layout from "flow" to "positioned". I cannot give advice on how the wrapper subforms are organized, since it depends on your logic, just try it out.
Cheers,
Tao -
How to display horizontal line in top-of-page by using object oriented ALV?
How to display horizontal line in top-of-page by using object oriented ALV.
I am created top-of-page in object oriented alv.
But not be successes in showing horizontal line in it.
Can any one pls give solution for this..
Thanks and regards..Hi
Try like this
data: gt_list_top_of_page type slis_t_listheader. " Top of page text.
Initialization.
perform comment_build using gt_list_top_of_page[].
form top_of_page.
* Note to self: the gif must be loaded into transaction OAOR with
* classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions.
* I Loaded NOVALOGO2 into system.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
* I_LOGO = 'NOVALOGO2'
* i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = gt_list_top_of_page.
endform. " TOP_OF_PAGE
form comment_build using e04_lt_top_of_page type slis_t_listheader.
data: ls_line type slis_listheader.
clear ls_line.
ls_line-typ = 'A'.
ls_line-info = 'Special'(001).
fgrant = xgrant.
concatenate ls_line-info fgrant
'Stock Option Report to the board'(002)
into ls_line-info separated by space.
condense ls_line-info.
append ls_line to e04_lt_top_of_page.
endform. " COMMENT_BUILD
Use following syntex for footer print in alv:
* For End of Page
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
* For End of Report
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
check this link
http://abapprogramming.blogspot.com/
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
Changing width of a custom container dynamically
Display Page numbers in ALV
Insert picture in selection screen.
Logo in OO ALV Grid
Reward all helpfull answers
Regards
Pavan -
Main Window display when line items are less in next page.
Hi all,
In the smartform,if the line items extend to second page, then to print complete main window in second page and if there are only few line items in second page, how to remove the empty spaces in the nmain window and to print other windows after the end of main window.?
Nageshdesign ur next page .....
goto next page reduce the size of the main window and place the other window that u need....
goto new window that is specified in nextpage , in condition tab check the checkbox(only at the end of main window).....
here u will get the other windows only in the lage page.... -
Display Variance line items for Orders
Hello Sapients,
I am trying to execute Transaction code KOB3 (Display Variance line items for Orders) ( /n > Accounting> Controlling > Product Cost Controlling > Cost Object Controlling > Product Cost by Order > Information System > Reports for Product Cost by Order > Line Items > KOB3 )
But for some reason I do not see any thing.
Your Advise is greatly appreciated.
Thanks and Regards
RaviThere is no problem with Authorization.
And i am checking for the correct cost elements and prorcess orders.
Not only KOB3 but also the related reports are not working (viz: GR55-> 7KV9)
thanks and Regards
Ravi -
FBL5N - in Rule set - It is a Display customer line items
Dear All,
We observed that FBL5N - Display customer line items in Standard SoD rule set under function AR07 addressing a risk of S022.
Unless there are t-codes of FD03 or FB02 this t-code does not allow to change the payment terms of the customer.
We are having a challenge from the client that FBL5N is a display t-code and why it is there in rule set.
Has anybody came across this scenario? If yes, what is the underlying risk for this FBL5N independently.
Is there any SAP Note for this t-code like ME23N from SAP.
Thanks and Best Regards,
Srihari.KHi Christian,
We checked the authorization objects as well enabled in GRC rule set as below:
F_BKPF_BUK - Docume t Authorization document for company codes - 01 or 02 - Enable.
Inspite of this access, FBL5N cannot be used to change the document for payment terms and assignments without FB02 t-code
assignment in the role.
Independently FBL5N cannot be used for any change or create activity except Display customer line items.
Please advise
Thanks and Best Regards,
Srihari.K -
How to display a line item in the billing calculation ?
Hi Experts,
My client requirement is to just display a line item in billing without affecting the total invoice amount. ( line item should just show up, no calculation should be included).
Regards,
Farooqi agree on the rate step fr the calculation you would like to see the line item check the variant control, it usually has the option to write a line item. depending on the variant.
bobby r. -
How to not to display any line items for val flds values are zero in KE30?
Dear All,
In KE30,in one of my reports, i do not want to display such line items for which all values are zero for all val flds, it should only display the line items for which there is any value, i have tried Zeros hide in KE35 in formatting menu>other format>hide zeros, but unofrtunately it didnt came out.
Regards
Rashid
Edited by: rashinuet on Feb 20, 2012 4:38 PMDear Abhishek,
I have tried that as well in ke35 and made this option activated on my val flds like sales revenue for hide zero values, but it didnt came out as well, then in i tried ke32 change report >Extras menu>form settings, this adopts all the settings in the report from the form you have assigned, but this is not working, i am failed to understand what has gone wrong.
Regards -
Invoice List-Header & line items
Dear Expert,
If I want to create an invoice list which both AR invoice header & line items, then how can I create it as the line items has the same header?
Could you advise this?
Thank you.
RaymondHi Raymond,
You can use the following query,
SELECT T0.CardCode, T0.CardName, T1.ItemCode, T1.Dscription, T1.Quantity FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
If you are using QPLD for this then you can sort and group header items so that not to repeat again n again with row items.
Regards,
/Siddiq -
Final total cannot appear when the last line item reached the page end
Hi All,
My report included 2 pages. Problem is the final total cannot appear when the last line item reached the page end. (page 2)
final total will appear on the middle of last page (page 3) when i comment (type = 'BOTTOM').
Below is the program.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = 'X'
form = 'ZBOTM_VOUCHER'
language = sy-langu.
sort itab by vblnr.
LOOP AT itab INTO wa_itab.
move wa_itab-vblnr to reguh-vblnr.
move wa_itab-lifnr to reguh-lifnr.
move wa_itab-rbetr to reguh-rbetr.
reguh-rbetr = reguh-rbetr * -1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'
element = 'DETAIL'.
t_rbetr = reguh-rbetr + t_rbetr.
AT LAST.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'LINE'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TOTAL'.
type = 'BOTTOM'
WINDOW = 'MAIN'.
ENDAT.
Thanks.Hi,
Where should I include the code for bottom?
How to open text editor?
Thanks.
Edited by: Alice8 on Feb 7, 2011 9:09 AM -
Print line items on next page if does not fir onto current page
Hello Experts,
I have a query related with Smartform.
For every Line item, I have 4 lines. Means, if there are 4 line itmes in Internal table then it means, on form 16 lines should be printed.
My Requirement - If any of the Line item does not fin onto a single page then shift the whole line item onto next page. Means, If Line item 1 and 2 are printing on 1st page completely, but line item 3 is not able to print completely on 1st page then shift all the 4 lines of line item 3 onto next page.
I tried - Put the main table of main area in a Folder and checked the PAGE PROTECTION of that folder. And in the Foder itself, use a command with checked GO TO NEW PAGE. But it is not printing. Form goes into shortdump.
Please help me to resolve this issue.
Regards
Kuldeep M.Hi,
U try to fix the no of lines per page. If the no of lines in ur table are more than the lines per page then u call the COMMAND 'Go to New Page' and give the Page name.
Eg:
data : lv_lines TYPE i,
lv_lines_per_page TYPE i value 12. (Try to design the Window height to fit 12 lines or ur wish)
lv_count TYPE i.
describe table itab lines lv_lines.
Now, u loop the itab table and put a condition in the LOOP:
LOOP AT itab.
lv_count = lv_count + 1.
IF lv_count GT lv_lines_per_page.
clear lv_count.
create command 'Go to New Page'. --->In COMMAND put condition lv_count GT 12
endif.
ENDLOOP.
Hope it helps!!
Rgds,
Pavan -
Vendor Display/Change Line Items
Vendor with Debit balance
Dear Friends:
In FBL1N - Display/Change Line Items, How to indentify vendors with debit balance and How to identify vendors who has to be paid and why are amounts showing with - sign?
Please explain.
Thanks&Regards
MSReddyHi,
You can identify the debit balance by checking the amount with positive value. Or you can also select "debit/credit" indicator in the screen layout. when the layout come out, you'll see "H" representing credit and "S" representing debit.
Regarding second question, normally the line item that still need to be paid is identified as "open item" (red color", and the amount that has been paid as "cleared item" (green color).
Even the amount already paid, it will still sign negative, but you can see the "clearing document" number as the payment or clearing document.
Note that, the assumption on the above is that the payment of outstanding vendor is using clearing procedure.
regards, -
Header, Line Item and Cache Techniques Using Hashed Tables
Hi,
How can I work with header, line item, and a cache techniques using hashed tables?
Thanks,
Shah.Hi,
Here is an example to clarify the ideas:
In general, every time you have a header-> lines structure you have a unique key for the lines that has at least header key plus one or more fields. I'll make use of this fact.
I'll try to put an example of how to work with header -> line items and a cache technique using hashed tables.
Just suppose that you need a list of all the material movements '101'-'901' for a certain range of dates in mkpf-budat. We'll extract these fields:
mkpf-budat
mkpf-mblnr,
mseg-lifnr,
lfa1-name1,
mkpf-xblnr,
mseg-zeile
mseg-charg,
mseg-matnr,
makt-maktx,
mseg-erfmg,
mseg-erfme.
I'll use two cache: one for maintaining lfa1 related data and the other to maintain makt related data. Also I'll only describe the data gathering part. The showing of the data is left to your own imagination.
The main ideas are:
1. As this is an example I won't use inner join. If properly desingned may be faster .
2. I'll use four hashed tables: ht_mkpf, ht_mseg, ht_lfa1 and ht_makt to get data into memory. Then I'll collect all the data I want to list into a fifth table ht_lst.
3. ht_mkpf should have (at least) mkpf's primary key fields : mjahr, mblnr.
4. ht_mseg should have (at least) mseg primary key fields: mjahr mblnr and zeile.
5. ht_lfa1 should have an unique key by lifnr.
6. ht_makt should have an unique key by matnr.
7. I prefer using with header line because makes the code easier to follow and understand. The waste of time isn't quite significant (in my experience at least).
Note: When I've needed to work from header to item lines then I added a counter in ht_header that maintains the count of item lines, and I added an id in the ht_lines so I can read straight by key a given item line. But this is very tricky to implement and to follow. (Nevertheless I've programmed it and it works well.)
The data will be read in this sequence:
select data from mkpf into table ht_mkpf
select data from mseg int table ht_mseg having in count all the data in ht_mkpf
loop at ht_mseg (lines)
filter unwanted records
read cache for lfa1 and makt
fill in ht_lst and collect data
endloop.
tables
tables: mkpf, mseg, lfa1, makt.
internal tables:
data: begin of wa_mkpf, "header
mblnr like mkpf-mblnr,
mjahr like mkpf-mjahr,
budat like mkpf-budat,
xblnr like mkpf-xblnr,
end of wa_mkpf.
data ht_mkpf like hashed table of wa_mkpf
with unique key mblnr mjahr
with header line.
data: begin of wa_mseg, " line items
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
zeile like mseg-zeile,
bwart like mseg-bwart,
charg like mseg-charg,
matnr like mseg-matnr,
lifnr like mseg-lifnr,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
end of wa_mseg,
data ht_mseg like hashed table of wa_mseg
with unique key mblnr mjahr zeile
with header line.
data: begin of wa_lfa1,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
end of wa_lfa1,
data ht_lfa1 like hashed table of wa_lfa1
with unique key lifnr
with header line.
data: begin of wa_makt,
matnr like makt-matnr,
maktx like makt-maktx,
end of wa_makt.
data: ht_makt like hashed table of wa_makt
with unique key matnr
with header line.
result table
data: begin of wa_lst, "
budat like mkpf-budat,
mblnr like mseg-mblnr,
lifnr like mseg-lifnr,
name1 like lfa1-name1,
xblnr like mkpf-xblnr,
zeile like mseg-zeile,
charg like mseg-charg,
matnr like mseg-matnr,
maktx like makt-maktx,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
mjahr like mseg-mjahr,
end of wa_mseg,
data: ht_lst like hashed table of wa_lst
with unique key mblnr mjahr zeile
with header line.
data: g_lines type i.
select-options: so_budat for mkpf-budat default sy-datum.
select-options: so_matnr for mseg-matnr.
form get_data.
select mblnr mjahr budat xblnr
into table ht_mkfp
from mkpf
where budat in so_budat.
describe table ht_mkpf lines g_lines.
if lines > 0.
select mblnr mjahr zeile bwart charg
matnr lifnr erfmg erfme
into table ht_mseg
from mseg
for all entries in ht_mkpf
where mblnr = ht_mkpf-mblnr
and mjahr = ht_mjahr.
endif.
loop at ht_mseg.
filter unwanted data
check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
check ht_mseg-matnr in so_matnr.
read header line.
read table ht_mkpf with table key mblnr = ht_mseg-mblnr
mjahr = ht_mseg-mjahr.
clear ht_lst.
note : this may be faster if you specify field by field.
move-corresponding ht_mkpf to ht_lst.
move-corresponding ht_mseg to ht_lst.
perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.
perform read_makt using ht_mseg-matnr changing ht_lst-maktx.
insert table ht_lst.
endloop.
implementation of cache for lfa1.
form read_lfa1 using p_lifnr changing p_name1.
read table ht_lfa1 with table key lifnr = p_lifnr
transporting name1.
if sy-subrc <> 0.
clear ht_lfa1.
ht_lfa1-lifnr = p_lifnr.
select single name1
into ht_lfa1-name1
from lfa1
where lifnr = p_lifnr.
if sy-subrc <> 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.
insert table ht_lfa1.
endif.
p_name1 = ht_lfa1-name1.
endform.
implementation of cache for makt
form read_makt using p_matnr changing p_maktx.
read table ht_makt with table key matnr = p_matnr
transporting maktx.
if sy-subrc <> 0.
ht_makt-matnr = p_matnr.
select single maktx into ht_matk-maktx
from makt
where spras = sy-langu
and matnr = p_matnr.
if sy-subrc <> 0. ht_makt-maktx = 'n/a in makt'. endif.
insert table ht_makt.
endif.
p_maktx = ht_makt-maktx.
endform.
Reward points if found helpfull...
Cheers,
Siva. -
Sales Order line item Price after Discount
Hi all
How to get the line item price after discount in Sales Order Query?
KedaleneHi Kedalene,
Please check below Query.
SELECT T0.[DocNum], T0.[DocDate], T0.[CardName], T1.[Dscription], T1.[Quantity], T1.[Price] as Price_After_Discount, T1.[PriceBefDi] As Price_Before_Discount,T1.[DiscPrcnt], T1.[LineTotal] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
Hope this help
Regards:::::
Atul Chakraborty -
Hi All,
i have created a smartform and i use page break for my requirement now my question is in second page it leave some space and after that dispaying the line item how to remove that space or how display the line item in first with out any space
Thanks
SurendraHi,
Create the second page
In that resize the main window size according to your requirement
At page break -create command window give the next page as second page
Let me know if any concerns...
Maybe you are looking for
-
Can anyone help? Im running 4.2.1 on a iphone 3gs... trying to update to 6.2.1. I did the update but now I cannot finish... it says it cannot at this time. I tried through itunes and through wifi but keep getting the same message... cannot at this
-
I want to know what means CLASSPATH?
I asked this before, but I didn't get a good answer but I think it should be easy for you to help me. OS: Windows XP Professional SDK: J2SE v1.3.1_03 ( installed into standard directory C:\jdk1.3.1_03 ) PATH: %SystemRoot%;%SystemRoot%\system32;%Syste
-
'File type being selected by keystroke' feature gone?
A minor thing, but still disappointing that it may be gone... In previous versions, when in the file requester, with the File Type field focused, I could type the first letter of the format I wanted (ex. J for Jpeg), and it would select it. That was
-
Where can I find "iMovie splash" video?
Following a catastrophic kernel panic and subsequent erase and install, I seem to have lost that little QuickTime video called "iMovie splash". Does anyone know where I can download it again? It lasts about 7 seconds and consists of a group of childr
-
How do I stop auto-correct?, how do I stop auto-correct?
how do I cancel auto-correct on an iPod Touch?