on 08-25-2008 4:25 PM
Hi,
Is there any way that i can print data at new line in sap scripts. I am looping my data and its printing in the same line but i need to print it at new line. Is there any formating options or any command to do that.
Thanks
I have cheque printer issue... when we print on cheque each line are printing on the next line so what setting which i should follow? or what is the exact procedure to solve?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the quantity of variables to print is variable, you might want to send it one by one, declaring a variable that will contain the value for each calling of the sapscript, this way you only print the lines you have. This could work for a complete unknow number of values.
If you know that the number of values has a maximun and a minimum, and they are only 3 or so instances possible, you could declare elements into the sapscript, one for each case, and call the one you need according to the data you need to print.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can also control the output from the program, with simples if-then or AT END OF or similar in your LOOP.
And then, instead of writing to the window = 'MAIN' write to the window = 'your var window' in that instance, so normal printing for normal data and special printing for special data.
You can also declare ELEMENTS inside the sapscript to define areas of print code, and then call window = 'your window' and element = 'your element'. to differentiate different print instances.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to print data in new lines we normally do this way...
loop at itab.
write:/ itab-field1.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If this must be done for every line just add a second line into the main window of the Sapscript and put there the text or &variables& you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Than you must take all the values from the internal table into the different variables and than print them.
In program:
READ TABLE ITAB INTO WA_TAB INDEX 1.
IF SY-SUBRC = 0.
VAR1 = WA_TAB-FIELD1.
ENDIF.
* read all the lines and fill the VAR variables
In SAPScript:
/E LINE_VAR
/P &VAR1&
/P &VAR2&
/P &VAR3&
/P &VAR4&
Regards,
Naimesh Patel
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.