‎2005 Dec 27 7:18 AM
Hi All1
Is it possible to draw column lines in SAPSCRIPT for a dynamic table.Please suggest me the ways to accomplish this.
Thanks in advance
Prasanna Kumar
‎2005 Dec 27 7:21 AM
Hi prasanna,
1. No its not possible for dynamic table
having x number of rows.
2. At the most we can use the character
| (vertical line character)
but it won't look good.
(ie. it won't look like a table grid )
Regards,
Amit M.
‎2005 Dec 27 7:21 AM
Hi prasanna,
1. No its not possible for dynamic table
having x number of rows.
2. At the most we can use the character
| (vertical line character)
but it won't look good.
(ie. it won't look like a table grid )
Regards,
Amit M.
‎2005 Dec 27 7:28 AM
Yeah u can.
try sy-vline...
its like this..
in your script write,
&tab-field& &Sy-vline&. write this below a text element.
and use this in fm "WRITE_FORM". as u loop the table, each time the sy-vline is output.
hope this helps..:)-
madan...
‎2005 Dec 27 7:32 AM
please close the thread by awarding points if your query is solved.
regrds,
Madan
‎2005 Dec 27 7:50 AM
Not really,
But i have done it before, Though there are some limits to it.
You make a box in SAPSCRIPT with following statement
/: BOX FRAME 10 TW
draws a box around the window
You can create colums by drawing other boxes like this
/: BOX WIDTH '10' CM HEIGHT 1 CM FRAME 10 TW
and
/: BOX XPOS '10' CM WIDTH '10' CM HEIGHT 1 CM FRAME 10 TW
and so on
To have them dynamically there only one dirty solution (can be done with limited number of lines)
In you sapscript you make code like this.
/: IF &counter& > 1.
/: BOX WIDTH '10' CM HEIGHT 1 CM FRAME 10 TW
/: ENDIF.
/: IF &counter& > 2.
/: BOX YPOS '1' CM WIDTH '10' CM HEIGHT 1 CM FRAME 10 TW
/: ENDIF.
...
In your print program you have your output table and you do this test
abap code
DATA : counter type i.
DESCRIBE table out_tab lines into counter.
As you can see this can be done if you need to make a dynamic table of something like 5-10 lines but for large chuncks of data this becomes to messy.
You can also try to replace the XPOS and YPOS with dynamic values ex /: BOX YPOS &YPOS& CM FRAME 10 TW
but i'm not sure this works.
Hope this help was usefull.
Best Regards,
Defour Frederik
‎2005 Dec 27 11:25 AM
Hi Frederik!
I am using a SAP standard print program.Can I do the changes to the standard print program?Also how to access the print program of a standard SAP program in SAp.Please advice.
Rewarded points
Thanks in advance
Prasanna Kumar
‎2005 Dec 27 11:56 AM
Hello,
Sure you can, but i would advice to use a copy instead.
Your printprogram can be altered through custumizing (SPRO) -> look for output control ( It's different for eatch form ex. invoice, delivery... ).
The form and printprogram are attached to the output type.
In your case it could be possible to do it without print program changes. If your lucky you could have a field in your outputtable that can act as the "counter".
ex. In a invoice -> tvbrp-posnr ( If i recall correct ).
Hope this helps.
Best Regards,
Frederik Defour
‎2005 Dec 27 2:07 PM
Hi frederik!
I am working on customer statements F140_ACC_stat_01 standard program.Can u please suggest me the field name to be taken as the counter in this case.
Thanks
Prasanna KUmar
‎2005 Dec 27 2:21 PM
Sorry can't help you further with this one. Our Sap version has no F140... program.
Just use the sapscript debugger an see what fields and structures are used during printing. Front screen se71 > from menu > activate debugger.
Always helps me to find fields during sapscript.
Greetz,
Frederik Defour
‎2005 Dec 27 7:38 AM
Hi Prasanna,
Since it is dynamic table you cannot get the table view.
even if you use sy-vline.
regards
vijay
‎2006 Feb 01 12:16 PM
hi aLL
i am using this as driver program to print the form
F140_ACC_STAT_01 problem is i am not able know from where the addresss is being picked from
This is about Account Statement printing output. The Logo has displayed in NZ (correct) but the address is still in Australia (wrong). It should be New Zealand Address.
can any oe tell me solution to do this
or at least from where the address is being picked in there based on which condition.
with regards
siddhartha
‎2006 Feb 01 3:29 PM
Hello,
Address is usually picked using pre-configured
INCLUDE T001G-TXTAB OBJECT TEXT ID ADRS LANGUAGE T001-SPRAS
Go to the table T001G and check the name of text go to the SO10 ... and ask your module consultant if you could change this text or maybe create the new ones in customizing
Bogusia