08-26-2013 12:19 PM
Dear Gurus,
I am new in SAP Script, now I have to make a table in main window, in which their are 7 columns, kindly please guide me...
How can I do this.....
Example is below....
Above is header and below I have to insert the line items..
Many Thanks / Himanshu Gupta
08-26-2013 12:23 PM
08-26-2013 12:36 PM
Dear Girod,
I read the doc. and did some coding like below...
But the output is not coming right, kindly please guide me the concept...
Thanks for early response...
Many Thanks / Himanshu Gupta
08-26-2013 12:52 PM
Hi HIMANSHU GUPTA,
2. Write the code given below under the 'TABLE_HEADER' text element to draw the boxes. You need 11 boxes, change the XPOS, YPOS, HEIGHT and FRAME values in the below code to get your desired table layout.
//code to draw vertical lines
BOX XPOS 35 MM YPOS 9 MM WIDTH 0 TW HEIGHT 187 MM FRAME 10 TW
BOX XPOS 70 MM YPOS 9 MM WIDTH 0 TW HEIGHT 187 MM FRAME 10 TW
BOX XPOS 111 MM YPOS 9 MM WIDTH 0 TW HEIGHT 187 MM FRAME 10 TW
BOX XPOS 145 MM YPOS 9 MM WIDTH 0 TW HEIGHT 187 MM FRAME 10 TW
//code to draw horizontal lines
BOX YPOS 9 MM WIDTH 178 MM HEIGHT 0 TW FRAME 10 TW
3. Now define another text element to draw the table body.
4. Next, write the code you have used to draw boxes for table header under the new text elemnt.
5. While calling the form from your driver program call the second text element (Table body) inside the loop of your final output table. It will dynamically draw the no of boxes you need to display the table data.
Also please check the below link for SAPScript pdf
http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
Please feel free to ask if you have more doubts.
BR,
Anson
08-26-2013 1:03 PM
Hi Gupta,
First try to pass the value,and print . Later box , ulines, vlines can be included .
In the Driver program Just loop the final internal table .Inside the loop call the form's Functional module named 'WRITE FORM' . Note : Try to use separate window for text and item details .
1 ) Simply if you want to display text . Example ('Name','Desc','Qty' ...) you no need text element .
In your case you have named it as item_header .instead of that use paragraph Format TH alone.
2) In the write form function module call the text element 'ITEM_LINE' .
The above solution would help you . all the best .
cheers,
Sanjith N