How to Print diffrent pernr on Diffrent Pagers
Hi All
i have data in following format in my itab.
Pernr Month 1 2 3 4 5 6 7 Totalp Totala
55 Nov a p a a p p p 4p 3a
55 DEC p p a a p p p 5p 2a
56 Nov a p a a p p p 4p 3a
56 DEC p p a a p p p 5p 2a
problem is ... all the data printed in the same sequance on same page. i want that as soon as next pernr came the next page may be called with all the page format.
kindly help me out
Regards
ammad
Hi AMMAD,
You want to print multiple smartform for separate Pernr, for this u have to change your driver program itself,
Do one thing, Take all the pernr in a single internal table, loop on thins internal table and fetch data from all the DB tables accordingly for that current pernr and call ur smartform, along with that all the smartform calls for all the pernr in the loop should be splaced in one spool Request.
For example-->>>
Do following.
SORT T_PERNR BY PERNR.
describe table T_PERNR lines lv_lines. "Parameter used to eneter all the smartform output in single spool request
LOOP AT T_PERNR INTO WA_PERNR .
tabix_m = SY-TABIX. "Parameter used to eneter all the smartform output in single spool request
CLEAR T_FINAL. " clear the final Internal table which u r passing to CALL Smartform in start of every loop, as each time data to smartform will be sent for only one pernr and smartform will print data for only one pernr.
PERFORM populating_data. "fetch data from DATABASE tables in local Internal tables for each pernr.
*Sort all the internal tables, do the Part of developing ur smartform same as earlier.
PERFORM Call_Smartform. "before the loop on T_PERNR call the samrtform for each final internal table filled and get that cleared in start of loop at T_PERNR.
endloop.
Edited by: AKASH RANA on Aug 19, 2009 10:54 AM
Similar Messages
-
How to print diffrent color and diffrent size of text in JTextArea ?
Hello All,
i want to make JFrame which have JTextArea and i append text in
JTextArea in diffrent size and diffrent color and also with diffrent
fonts.
any body give me any example or help me ?
i m thanksfull.
Arif.You can't have multiple text attributes in a JTextArea.
JTextArea manages a "text/plain" content type document that can't hold information about attributes ( color, font, size, etc.) for different portions of text.
You need a component that can manage styled documents. The most basic component that can do this is JEditorPane. It can manage the following content types :
"text/rtf" ==> via StyledDocument
"text/html" ==> via HTMLDocument
I've written for you an example of how a "Hello World" string could be colorized in a JEditorPane with "Hello" in red and "World" in blue.
import javax.swing.JEditorPane;
import javax.swing.text.StyleConstants;
import javax.swing.text.StyledEditorKit;
import javax.swing.text.StyledDocument;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.SimpleAttributeSet;
import java.awt.Color;
public class ColorizeTextTest{
public static void main(String args[]){
//build gui
JFrame frame = new JFrame();
JEditorPane editorPane = new JEditorPane();
frame.getContentPane().add(editorPane);
frame.pack();
frame.setVisible(true);
//create StyledEditorKit
StyledEditorKit editorKit = new StyledEditorKit();
//set this editorKit as the editor manager [JTextComponent] <-> [EditorKit] <-> [Document]
editorPane.setEditorKit(editorKit);
StyledDocument doc = (StyledDocument) editorPane.getDocument();
//insert string "Hello World"
//this text is going to be added to the StyledDocument with positions 0 to 10
editorPane.setText("Hello World");
//create and attribute set
MutableAttributeSet atr = new SimpleAttributeSet();
//set foreground color attribute to RED
StyleConstants.setForeground(atr,Color.RED);
//apply attribute to the word "Hello"
int offset = 0; //we want to start applying this attribute at position 0
int length = 5; //"Hello" string has a length of 5
boolean replace = false; //should we override any other attribute not specified in "atr" : anwser "NO"
doc.setCharacterAttributes(offset,length,atr,replace);
//set foreground color attribute to BLUE
StyleConstants.setForeground(atr,Color.BLUE);
//apply attribute to the word "World"
offset = 5; //we include the whitespace
length = 6;
doc.setCharacterAttributes(offset,length,atr,replace);
} -
How to print 2 pernr records on two pages
hi all
the senario is i have designed form in smartforms in which i have header in header window. i have declare table in main window. in wihich i have header main area nad footer.
i have records like that in itab
eno month 1 2 3 4 5 6 7 totalp totala "Hard Coded in Table header"
54 NOV P a p a p a p 4 3
54 DEC a a a a a a a 0 7
the same record for eno 55 is also in itab.
the problem is that all the records of 54 and 55 are printer in one main area and one header on that page .
i want that the record of eno55 is print on the saparate format on next page .
help me out plz
Regards
ammadItacas
Welcome to the HP Community Forum.
There are various Utilities available to divide a photo for printing -- as far as I am aware, you have to split the photo / image before you print it.
For example, the following might be of use, or at least give you some ideas:
How to Divide a Big Picture & Print It on Several Pages
Gimp 2.8.1.4 for Windows
Click the Kudos Thumbs-Up to show you appreciate the help.
Click Accept as Solution when the Answer is a good Fix or Workaround!
Although I strive to reflect HP's best practices, I do not work for HP.
Kind Regards,
Dragon-Fur -
In cursor i have two queries where put the condition and how to print the d
hi i have 2 tables 1 is emp(empid,empname,dept,grade)
2 is salary(grade,salary)
in cursor when ever grade is increased salary automatically increased
in 2 diffrent queries where i will put the if condition and how to print the output.
any one can please suggest me.
finally my required out put is
empid,empname,grade,salary
thanksIt is always helpful to provide the following:
1. Oracle version (SELECT * FROM V$VERSION)
2. Sample data in the form of CREATE / INSERT statements.
3. Expected output
4. Explanation of expected output (A.K.A. "business logic")
5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details. -
How to print a HTML file in browser look using DocPrintJob
Hello guys,
Does anyone know how to print HTML output/file into browser look?
I'm using DocPrintJob and the DocFlavor set to DocFlavor.INPUT_STREAM.AUTOSENSE.
posted below is my code :
public class BasicPrint {
public static void main(String[] args) {
try {
// Open the image file
String testData = "C:/new_page_1.html";
InputStream is = new BufferedInputStream(new FileInputStream(testData));
DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
// Find the default service
PrintService service = PrintServiceLookup.lookupDefaultPrintService();
System.out.println(service);
// Create the print job
DocPrintJob job = service.createPrintJob();
Doc doc= new SimpleDoc(is, flavor, null);
// Monitor print job events; for the implementation of PrintJobWatcher,
// see e702 Determining When a Print Job Has Finished
PrintJobWatcher pjDone = new PrintJobWatcher(job);
// Print it
job.print(doc, null);
// Wait for the print job to be done
pjDone.waitForDone();
// It is now safe to close the input stream
is.close();
} catch (PrintException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
static class PrintJobWatcher {
// true iff it is safe to close the print job's input stream
boolean done = false;
PrintJobWatcher(DocPrintJob job) {
// Add a listener to the print job
job.addPrintJobListener(new PrintJobAdapter() {
public void printJobCanceled(PrintJobEvent pje) {
allDone();
public void printJobCompleted(PrintJobEvent pje) {
allDone();
public void printJobFailed(PrintJobEvent pje) {
allDone();
public void printJobNoMoreEvents(PrintJobEvent pje) {
allDone();
void allDone() {
synchronized (PrintJobWatcher.this) {
done = true;
PrintJobWatcher.this.notify();
public synchronized void waitForDone() {
try {
while (!done) {
wait();
} catch (InterruptedException e) {
}the printed ouput for this code will be look like this
<html>
<body>
<div style="page-break-after:'always';
background-color:#EEEEEE;
width:400;
height:70">
testPrint</div>
ABCDEFGHIJK<p>
</p>
</body>
</html>however, the output that i want is the HTML in browser look not HTML code itself.
i've tried to change the DocFlavor into any TEXT_HTML type but it gives error:
sun.print.PrintJobFlavorException: invalid flavor if you guys has any idea or solution, can you share with me... already search in Google but still not found any solution
Thanks in advanced.hi,
do the following
URL url = null;
try
url = new URL("http://www.xyz.com");
catch (MalformedURLException e)
System.out.println("URL not correct " + e.toString());
if (url != null)
getAppletContext().showDocument(url,"_blank"); //shows the page in a new unnamed top level browser instance.
}hope that helpz
cheerz
ynkrish -
How to print last page in sap script in ladscape format?
Hi all,
can any 1 tell me How to print last page in sap script in ladscape format?
Thanks In advance.
PravinHi Pravin Sherkar,
we can do this in SAP Scripts.
we need to create two pages, one of landscape and another of potrait.
now after filling the data at last we need to call the page which is of format landscape using START_FORM function module.
You can use condition &PAGE& = &FORMPAGES&.
Please check this link
Printing Portrait/Landscape in sapscript
Re: Landscape and potrait in same layout?
http://www.sap-img.com/ts013.htm
Best regards,
raam -
How to print the superscript in smartform
Hi gurus,
Please tell me the procedure how to print the superscript in middle of the text displaying?
when we are displaying the smartform its converted to some special character like & .
please let me know procedure at the earliest
Regards
RajHi thanks for ur patience.
see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
then aftet HLL how it prints as superscript.
for HLL we are using another character format and for superscript we are using the another character format.
If posiible send me the code to write in smartforms
Regards
RAj
Points are awarded for useful answers. -
How to print the script in condensed mode
Hi to all,
Pls help me.
How to print the script in condensed mode and particular window only print in the condensed mode.Hi,
Hi
It will remove the blank spaces in front of the variable
and if you use the extension NO-GAPS
It will remove all the blank spaces in the variable field.
DATA: ws_val1 type char12.
ws_val1 = ' 100 123'.
Condense ws_val1.
Write / ws_val1.
Condense ws_val1 no-gaps.
write / ws_val1.
It will give output as
100 123
100123
The CONDENSE statement deletes redundant spaces from a string:
CONDENSE c NO-GAPS.
This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
Please check this link for sample code.
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
Regards,
Raj. -
How to print all columns in one page
Hi,
Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
Can anyone explain me how to print ALL COLUMNS IN ONE PAGE .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
Edited by: kotha123 on Oct 11, 2010 5:58 PMHi,
Your best bet is to use a workbook template or else Excel to pdf option...Thanks -
How to print page numbers in adobe form
Hi,
Can anybody tell me how to print page numbers in adobe form.
Thanks in advance
ChaitanyaHi,
Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
My requirement is to have the user control on current page. For Example:
Example for a Invoice with 5 PO items (stands on 2 pages) :
1st page is the letter : no page number
2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
I have used the follwing java scripting:
this.rawValue = wv_pages - xfa.layout.page(this)
where wv_pages is total no of pages calculated from print program.
Please help me in this regard with some formcal or java scripting conditions.
Thank You,
Regards,
Naresh. -
How to print text vertically in smart forms
hi,
Can any one tell how to print text vertically in smartforms
ADVANCE THANKS
GUHAPRIYANHI,
Chk out this thread.Maybe it proves helpful.
Re: vertical writing in smartforms
Regards,
Gayathri -
How to print a something in oracle sql developer
Hello all
Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
thank u in advance.
best1003209 wrote:
Hello all
Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
thank u in advance.
bestDBMS_OUTPUT() -
How to print Arabic characters in Oracle BI Publisher report
Dear Experts,
Kindly suggest me how to print arabic characters in BI Publisher.
Regards,
Mohansee link
https://blogs.oracle.com/BIDeveloper/entry/non-english_characters_appears -
How to print system-time in XML?
Hi,
Please help me how to print system-time in XML. Like we use sy-uzeit in ABAP.
Can we use anything in XML too..
Thanks & Regards,
Saihi movilogo
Please try this.
Create hidden item P1_DATE
Create On load process in page 1 and put this code
begin
:P1_DATE:=TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MM:SS');
end;
Open your region in Page 1 put this code in Footer area
*&P1_DATE.*
Refresh your page.
you will get the output like this.
16-SEP-2009 11:09:17
thanks
Mark Wyatt -
How to print long text in scripts
plzzzzzzzzz answer this qestion
how to print long text in scriptsHi Kranthi,
You can create Text Id and include that in your script.
For example:
/E TEXT
/: INCLUDE ZTEXT OBJECT TEXT ID ST
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa
Maybe you are looking for
-
Crossdomain and Flash Player 10
Hello, I've been using the same crossdomain.xml file for years. Now with the release of flash player 10 my application has stopped working. All my users on Flash player 9 work just fine, but for some reason 10 does not. I have my swf on one domain an
-
Retrieving Active Directory infomation from SQL Server
Dear All We have a requirement to load active directory users and user groups into a SQL Server database. Looking at the information available it seems you need to create a Linked Server of type 'Active Directory Service Interfaces'. Creating a linke
-
Snooped at work -How is this possible?
The other day at work I discussed my boss has the capability to monitor what I am doing on the internet on my macbook. It is my computer but I use his internet. He does not know my password and I have my security settings set to NO FILESHARING. How i
-
Transitions showing up differently after rendering
Hello, Sorry for the double post - I just wanted to make certain that I was making myself as clear as possible when stating my problem. It appears that when I put in a Cross Zoom to a clip, before rendering, it looks exactly as I want it. However, af
-
Why exactly u need to deactivate and activate in lo extraction?
why exactly u need to deactivate and activate in lo extraction?