on 08-12-2005 3:48 PM
Hi,
I have written a print program for sapscript and designed a layout for it.
Three fields have been defined in the layout set.
Every time the loop runs around write_form the three field gets printed.
<b>Print program logic:</b>
loop at iresb. "IRESB is internal table.
IF IRESB-SHKZG = 'S'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'CO-PRO' "Text Element
WINDOW = 'MAIN'.
ENDIF.
endloop.
<b>Layout logic:</b>
/E CO-PRO
A1 &IRESB-MATNR&,, ,,&IRESB-MAKTX&,, ,,&IRESB-BDMNG&
<b>Now the problem is I get output as follows:</b>
MACHINE1 CUTTING 5.000
M2 DRILLING 2.000
BIGMACHINE FITTING 7.000
<b>But I want output like:</b>
Machine1 Cutting 5.000
M2 DRILLING 2.000
BIGMACHINE FITTING 7.000
(If I keep the tab position constant then if the description of next matnr is long or short as compared to previous one the other data gets mis-alligned as you can see from the above one which I am getting)
What is solution for this ?
Tushar,
In your Paragraph Format 'A1' you want to assign the "Tabs". This option allows you to define the tab spacing. When you write out the text, the ",," says to use the next Tab.
Try definign the tabs as follows:
1 11CH Left
2 33CH Left
Then change the code in your SAPscript to be as follows:
A1 &IRESB-MATNR(10)&,,&IRESB-MAKTX(20)&,,&IRESB-BDMNG&
This will be he equililent to:
write:/ iresb-matnr(10).
write at 11 iresb-maktx(20).
write at 33 iresb-bdmng.
Let me know if you need more info.
Cheers,
Pat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is related to previous post.
Even if I alligned the output which I want during posting message, I think the Java script for this post does not allow the spaces so its showing the same misallignment but i guess you might have got what I want.
Tushar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.