on 02-13-2009 1:24 PM
Hi folks,
i want to print multiple line items in main window of script for eg 50 line items then my main window should continue in second page also. how to maintain this.
can u provide me sample code for this..
Thx in advance,
Neelima.N
answered..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
In SE 71 the page that u want to continue , for that page give the next page as the same page .
eg: if Page1 is ur page then for that page in the window option give the Next Page as Page1. It will adjust automatically to the data .
This will help u.
Please let me know if I am wrong
Thanks and Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
To get the data into the next page . Declare the next page as same as first page in the form.
you can get the continous data in the next page.
Regards,
Rajani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If u have only one main page than do..
Goto>Pages>set next page of your MAIN page to FIRST .
or if u printing the line items From Second Page than give next page of Main Page as SECOND AND Next Page of Second Page as SECOND.
ie
pages->MAIN->(next page)-> SECOND ->SECOND(next page).
In LINE Editor use:
/:ENDPROTECT
/E <text_element>
&LINE_ITEMS
/:PROTECT
thanks
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
SE71 -> SHORT DESCRIPTION.
WINDOWS tab -> double click on MAIN .Click Editor icon .
give all the fields .
for ex ,
FOR SFLIGHT with two fields.
&fs_flight-carrid&,,&fs_flight-connid&
In the driver program u have to pass the fields for carrid and connid.
&& is compulsory for the fields in scripts. ,, is for space.U no need to handle for the number of records bcoz main page will trigger the next page if it has some records.In pages window for First page give the next page in which the main window is included.
Thanks,
Nithya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
It's quite simple: if you have only 1 page layout (called FIRST for example), then you have to set itself as the next page also
I hope you understand it...
So in SE71, give your SAPScript's name, choose the page radiobutton and click modify.
Here you'll see the field called page: FIRST.
Fill the next page field also with FIRST.
The SAPScript will handle automatically the pages.
Regards
Tamá
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have an internal table with 50 lines, is it correct?
Let's say, there's a MATNR field in your internal table.
First do, what I wrote in my previous comment.
The create an element in yout main window, like this:
/E LINE_ITEMS
/ &GS_MAIN-MATNR&
In your printer program you have to code the following:
LOOP AT gt_main INTO gs_main.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'
ELEMENT = 'LINE_ITEMS'.
ENDLOOP.
This code will loop all 50 of your table entries.
In the MAIN window will fit 30 entries.
When the LOOP is reaching the 30th entry, SAP will automatically create a new page (because of the NEXT PAGE statement you set in the page settings in the SAPScript) and will continue the printing.
Regards
Tamá
Hi
In the main window right click and create ->flow logic->loop
in the loop check mark internal table and loop the internal table that you have
Then in the loop ->create command under field name create a variable (ex serail) eq 6.
then loop->create->program lines->declare the serail in input and output
and write code like this in it .
if serial = 6.
serial = 1.
next_page = next_page + 1.
endif. " if serial = 6.
This should do a page break .
Thanks
Viquar Iqbal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use:
a counter in the main program:
loop at itab..
add 1 to counter.
if counter = 50.
counter = 0.
endif.
write_form --FM
endloop.
Text editor of script:
/:If &Counter& > 50
/:new-page
/:endif
Also set the Next page properties in the Page window to the first page.
Hope this resolves the issue
regards,
Gurpreet
Hi,
Script have an automatic feature the nex page will be generate automatically if the next page attribute is set.Once the Line items do not fit into the main window a new page is triggered.
Goto>Pages>set next page to first .
And also in the text Editer use:
/:EndProtect
/e <textelement>
line-items to display
/:protect
This will definitly resolve the issue..
Regards,
Gurpreet
HI,
Print the Internal table data into main window. If the data exceed the more that what page can handle then the remaining date will contuinely printed in next page.
The property of the Main Window is if data excceds the page then new page will be created for the remainind data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i printed the internal table data in the main window and created one driver program also.in se71 the form is showing.but when iam executing the driver program the form is not showing.and also driver program is not showing any error .y it is so..
i kept write form in loop.maintained element for main window.
please help me out.
Thanks in advance,
Neelima.N
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.