Problem in Smartforms table printing
Hi Friends
I have a weird problem with printing the smartforms table.
The problem is as follows.
Suppose there are 10 rows (entries/records) in the table and the page can accomodate only first 5 rows, it automatically overflows into the next page. Now typically the table should print the next 5 entries. But, instead, only the 6th row is printed and the rest 4 rows are not printed.
Please advice.
Thanks
sam.
This is due to some technical reason in the ABAP. If you are passing the sorted table, you have to declare it as already sorted.
please read this
If in the form interface a tables was passed that was sorted before by the application, and it is now processed in the loop of a data node, you must again list the sort fields explicitly and, in addition, mark the checkbox "already sorted".
Due to technical reasons in ABAP, it is not possible to automtically pass the sort fields.
Similar Messages
-
Alignment problem in Smartform table
Hi,
I have a table having four columns no rows. In the first column I have text and in the second, third and fourth I have to display Amounts. The text in the first column changes.
I am facing the problem when the table goes to second page here the alignment to a particular Text of the first column and the amount in corresponding columns are not aligned properly. In the second, third and fourth columns the amount fields may be or may not be there. The problem comes only when the amount field is not there at the page break.
Regards,
Ramu N.Hi,
I have tried printing the borders. The problem comes only when there is no amount field at the page break other wise it is working fine. When there is no amount field at the page break the amount field which is to be printed next is coming down than the actual place where it has to be printed.
Here I have only 1 row but the number of lines in that row are many.
Regards,
Ramu N. -
Problem in Smartform Table/window Line Using Dot Matrix Printer
Dear Experts,
I faced issue in printing smartform using dot matrix printer. In the print result, the table line (horizontal and vertical) is not printed. I already search the forum but none can solve my issue. I already changed the table line width into 30 or 40 TW but still not work. Everything is OK in the print result, except the table line.
If i manually print/write '__' (underscore), it appear in the print result, but to write horizontal line and vertical line manually in the smartform will be huge effort.
I used device type EPESCP9 for the output device.
Can you tell me what i need to do?
your help will be appreciated.
ThanksHi,
Check your device type.
http://forums.sdn.sap.com/thread.jspa?threadID=2016838
Jshree -
Problem in smartforms - Duplex printing
Hi,
I am trying to use a smartform for duplex printing of pages.I have the following pages.
FIRST and OTHER are pages with the same main window
I have also created pages BACK and LAST which is used to print on the reverse page.
Page -> Next page -> Mode -> Printmode
FIRST -> BACK -> Initialise counter -> D ( Duplex )
BACK -> OTHER -> Increase counter -> Blank
OTHER -> BACK -> Counter unchanged -> D
I have created a command in MAIN window to call the LAST page
LAST -> blank -> Counter unchanged -> blank
I tried to print a document with 8 pages ( ie., 4 front page and 4 back page ) in a duplex printer.
Pages 3- 8 are printing fine with print on both sides. But page 1 and page 2 are getting printed in different pages. Any idea what is the issue with the first 2 pages?
Thanks and Regards
SubaHi Suba,
when ever we want to print back side of a page, we need to assign "D" for the
page we wanted to print on back side.
for ex: there r 2 pages, first page and second page .
1) if we define "D" for first page then it will print second page on back of first
page.
2) if we define "D" for both, then second page will start from new page(won't
print on back side of first), but it can print second page both sides.
in ur case,u defined FIRST and BACK pages as "D", but OTHER as default.
so remove Page mode "D" for BACK page.
hope this solves the problem.
Thanks
Dinakar. -
Problem with smartforms barcode printing
Hi,
In my smartforms i use a simply standard barcode (CD39__00)
for delivery number; but when i print there is no barcode, there is the dlivery number as number.
I'm in SAP ECC 6.0 so with the new barcode printing.
Where is the problem?
Thanks a lot.
MatteoHi - Sometimes if the height of bar code is small, then it prints the number instead of barcode. So please try to copy tht barcode into "Z" from se73 transaction and increase the height and then assign the new barcode to ur smartform. Doing this you will be getting the barcode printed on it.
Thanks
Arun Kumar
Ok, i create a new bar code bigger than the first one and now it's printed.
Thanks lot.
Matteo Vernile. -
Problem with smartform table node
hi i am working on smartform,
requirement is to put lot of barcodes , with a horizontal line separating them,
so i felt, displaying a table pattern inside a loop was the way to go,
but when i am setting table parameters in the details part,
i was giving the following and it was giving error saying
the width of matnr and barcode doesnopt correspond to the total width of the table
the total table width is 16 CM,
MATNR 15.50 MM 30.50 MM
BARCODE 15.50 MM 30.50 MM
what ever value i am giving in these columns, it continuosly giving errors,
if some budy has a sample parameters which worked with them, please give me,
i shal;l make necessary changes.
when i increase the table width it says doesnt fit in the page, page is DINA4 with portrait format.
please help.
rgds.hi check this for bar codes in smartforms..
http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
regards,
venkat -
Problem in Smartform where next page is printing unnecessarily
I have written a smartform to print our packing slip. In my main window I loop through the delivery items for printing and after I have finished printing all of the items associated with the one delivery item I want to print out a u-line so that the form will be easier to read(some sort of way of grouping the items visually) I am accomplishing this by using sy-uline. The problem arises though that sometimes Iwhen I hit a page break the only thing that will print on the next page is this uline. I do not want this line to print at the beginning of the main window on a next page but I have been unable to figure out anyway to keep it from printing. I have tried page protection for the paragraph format being used but that does not work. Has anyone come up with a way to print out a dividing horizontal line across the main window after a loop but control it so that it would not cause the form to think a second page is needed just because of this one line.
Any help would be much appreciated.
KarenHI,
Create a Folder, move your table and what ever code written in program lines under the folder.
click on folder check page protection, it will solve your problem.
Thanks,
Sanjay Gogikar -
How to Import customized internal table to smartform from Print Program
Hi Gurus,
I want to Import customized internal table to smartform from print program, Can anybody tell me how it is possible.
With regards,
S.SaravananThere is no problem passing an internal table to a smarforms, smartforms have the same interface as a function module ([Defining the Form Interface|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] in [Smart Forms|http://help.sap.com/saphelp_nw70/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]) so could you elaborate a little more on your requirement (is it a standard a custom forms, etc.)
Regards,
Raymond -
Smartform Table Line types duplicate entries problem
Hi ,
I am getting one strange problem in Smartforms. i tried for information in SDN but i did not get any usefull ones.
I have created my main window with particular width. I created two different Line types. On particular condition i need use these line types.
First line item will have 6 columns in that one column is empty.
Second liitem will have 5 columns.
When i am generating the output, the last item data of the first line type is repeating twice, i.e with first line type and the second line type.
Can anyone give me the inputs to solve this.
Thanks,
Srinivas BhavanamDid you check SAP notes?
I don't understand what you get exactly:
For the last line of the internal table, you would like to get this:
A B C D E F
G H I J K
But you get that:
A B C D E F
A B C D E F
Did I understand correctly?
Did you use something special? (header, footer, conditions, ...) -
Smartforms -Page Skipping Problem in Continue Sheet Printing.....
Hi Gurus,
I face problem with multiple page printing in dot matrix printer for purchase order printing.
Here are the details about my requirement
Our client Purchase order pre-printed Paper size Width 303 mm Height 203 mm and continued sheet. I have created a z layout zpoprint for the above size and assigned it in smarforms and select DINA4 transverse in printer. Whenever we printing 2nd page it starts printing after 5 cm. My friends asked me to create a customized page format in server properties in printer. Is there any other way to overcome this issue? Anybody face this problem kindly reply to me.
By
SP. ManavalanHi
Though you can double check the page layouts of both pages of your smartform, also keep in consideration that using a dot matrix printer to get the output of smartforms will have some impact of the positioning of the print as dot matrix printers are mechanical in nature(wheels are moving!).
Whereas, in laser printers, the whole data is taken, formatted and then sent to print.
Regards
Raj -
Problems with layout and printing tables
Hello,
my first ADOBE-Form "projekt" makes more problems than expected, especially with the layout.
Layout Problem 1:
I want to print the data of a table (thats my only parameter in the interface and the table itself is deep structures with other tables). So I have bound the "standard" subform (the one ADOBE inserts automatically" to the table and selected that the subform is repeated after every record.
Anyhow ADOBE processes only the first record of this table.
Maybe the reason is, that I need to display the data of one record on two pages. So I created two pages each with the "standard" subform and bounded both to the table.
What am I doing wrong? Do i have to do the page split another way?
Layout Problem 2:
I have a text field with multiple lines allowed. But it overwrites the content of the object, that comes below.
Its the same with my other subforms for table data.
How can I tell the system, that an object needs to be pushed downside on the page, if the context above needs more space?
Thanks in advance for your answers!
Regards,
FrankYeah, you say it
subforms and they "flowing" etc. properties are killing me, but after some hours I think I got the concept.
The form looks quite well, everything is pushed downwards if an item above gets expanded.
But one problem remains: this form only prints the very first record of my table.
I have no problems with the tables nested inside the main table. They work perfectly and everything is fine there!
But I cant tell the form to print my other records...
I somehow played around and made it work, but then the next record was not on the next page but directly after the subform created by the context area (if this terminology is correct).
I played around even further and created a paging with reference to the context area, but then the first page looked quite odd (page 2, 3, 4... looks perfect).
I tried to fix also this and then I somehow messed up my form and could not undo my changes (it was only a "to play with" copy...)
Just to explain it again:
I have one table (lets call it the "main table" because its the import parameter of the interface) and inside this table are other nested tables.
I want to print one record of the "main table" across 2 pages and after that the next record of the "main table" should be printed beginning at the 3rd page.
As I said, the two pages look wonderful (even though I have not yet covered the issue of what should happen, two pages are not enough for one record of the "main table"). but as soon as I try to display the next records of the "main table" as well, i am stucked in unpredictable layout problems.
I cant believe that I try anything extraordinary. Lets hope that I can solve this with your very appreciated help.
Thanks in advance Otto!!!
And kind regards, Frank -
Problem with countinuous paper printing in dot matrix printer
Hi All,
I have problem with dot matrix printer (Devise Type EPESCP) while printing continuos printing. If i am printing 2 or more than that prints at a time, 2nd page is printing 5 lines up.
I have developed one smartform for this and i have used A4 size page format.
I have tried to change the Printer initialization code to 86 lines for DINA4. Still no change in continuous printing.
Printer initialization
Reset after exit
Cover page
First Page
Start of even page
Start of odd page
Start of page
End of first page
End of even page
End of odd page
End of page
Start of line on an even page
Start of line on an odd page
Start of line
End of line on an even page
End of line on odd page
End of line
Printer initialization
# reset
\e\0x40
# select character table 3 -> PC 437 character set
\e\0x74\0x03
# set line spacing 6 LPI
\e\0x32
# set page length 86 lines
\e\0x43\0x46
# cancel bottom margin
\e\0x4F
# set left margin to 0
\e\0x6C\0x00
# select LQ quality
\e\0x78\0x01
# select non-proportional spacing
\e\0x70\0x00
Can any one help me.
Thanks,
VishnuHi Vishnu,
Above you have the following commands:
set line spacing 6 LPI
\e\0x32
set page length 86 lines
\e\0x43\0x46
46 HEX = 70
So the above settings mean 70 lines at 6 LPI = 11.66 inches.
So is the paper length 11.66 inches? If not, you should adjust the settings accordingly.
Regards,
Aidan -
Hi Folks,
Here we have designed a Invoice-smartform and converted it into PDF which is by default storing in c-drive as mentioned in the code.When we open the Pdf it is displaying it fine but when given a printout except the logo nothing is getting printed,I mean it is showing all junk characters.May I know what is the problem and how to rectify the same.
Points will be given.
K.Kiran.Hi Kiran, see the OSS notes: 960341 and 776507.
I downloaded and copying here, Hope this will be helpful
OSSNote:960341
Symptom
In some device types (e.g HPLJ4, HPLJ5) you experience non-uniform character spacing in the PDF document after the PDF conversion of SAPscript or Smart Forms documents, using HELVE or TIMES fonts. You want to know the reason.
Other terms
CONVERT_OTF, SAPscript, Smart Forms
Reason and Prerequisites
The problem is not due to an error in the PDF converter but due to the fact, that the printer font, underlying the device type (e.g. Univers or CG Times in PCL-5 device types), is not available for the PDF converter and is either not available in Adobe Reader. The PDF converter has to try to simulate the layout of the printer font by means of a font which is predefined in Adobe Reader. This is done by assigning the letter widths of the printer font to the font used in Adobe Reader.
The PDF file contains a table with letter widths, used by Adobe Reader in the output of text, for each used printer font (except PostScript fonts).
Example:
%Charwidth values from HP4300 HELVE 060 normal
/Widths
[ 278 333 500 633 633 1000 758 333 333 333 633...
Adobe reader converts this width table, by modifying the space between each character, so that the specified letter width (= space between the current and the next letter) is kept.
This 'Simulation' of printer fonts results in the sometimes visible irregular spaces in PDF.
The PDF converter always uses the Helvetica Adobe PostScript font for the display of HELVE and the Times Roman Adobe PostScript font for the display of TIMES. However, for these Adobe PostScript fonts, Adobe Reader often uses a Windows TrueType font, which differs slightly from the original PostScript font.
Solution
Workaround: Use the POST2 PostScript device type or the PDF1 PDF device type for the PDF conversion of documents in the Latin-1 character set. They both use the Adobe PostScript fonts Helvetica or Times Roman for the HELVE/TIMES printer fonts.
Header Data
Release Status: Released for Customer
Released on: 30.06.2006 12:44:06
Priority: Recommendations/additional info
Category: Consulting
Primary Component: BC-CCM-PRN Print and Output Management
Secondary Components: BC-SRV-SCR SAPscript
OSS Note: 776507
Symptom
Documents printed via SAPscript or SmartForms do not print with correct special characters, e.g. ### prints instead of Japanese or Russian characters. What to do?
Other terms
SAPscript, SmartForms, printing, device types, OTF
Reason and Prerequisites
Help required to choose proper fonts in a SAPscript or SmartForm
Solution
When using SAPscript or SmartForms to print (or email or fax) a form from a business application, many factors influence the outcome of the actual text within the form. All these factors must be checked in order to ensure a correct printout:
1) The language version of the form used to produce the printout.
Example: If you want to print a French invoice, you need to have a FR version of your SAPscript or SmartForms invoice form RVINVOICE01. And the application program must specify the corresponding language key (FR) when calling the SAPscript or SmartForms API.
2) The font selections specified in the form (possibly also in a SAPscript style or SmartStyle used in a form).
Example: In a SAPscript form or a SmartStyle you need to specify HELVE if you want to print German text in Helvetica (or similar) font. If you want to print Japanese text, HELVE is not a valid choice but you need to specify a Japanese font like JPMINCHO in your Japanese form.
3) The output character set of the device type
Every printer in transaction SPAD has a "device type" assigned. Device types used by the spooler for printing support only one single specific output character set. All text from the form has to be converted (using SAP's built-in character conversion mechanism) to this output character set.
A character set can typically support either a single language (e.g. Shift-JIS which supports only Japanese) or a set of languages (e.g. ISO 8859-1, which supports Western-European languages). It is possible that a given language (such as German) can be supported by several output character sets, e.g. you may use either ISO 8895-1 (Latin-1) or ISO 8859-2 (Latin-2) to represent German text. This is so because both character sets contain the special characters used in German.
Example: HPLJ4000 is a HP LaserJet device type supporting the ISO 8859-1 (Latin-1) character set. ISO 8859-1 can be used to represent e.g. Dutch, English, French, German, Spanish, Swedish but NOT Russian or Japanese.
As a consequence, it is ok to use HPLJ4000 to print English, German French etc. but not for Japanese or Russian.
4) The set of available printer fonts for a given device type
When formatting a document, SAPscript and SmartForms perform an automatic mapping of the font definitions in the form (e.g. "HELVE 14 point bold") and the available printer fonts of the device type. A replacement printer font is chosen, should the specified font selection not be available in the device type. Now this replacement can be problematic if a language-specific font, such as Chinese CNSONG, is specified in a form and it gets replaced by a font which does not support this language, e.g. COURIER.
To solve this problem, font families in SE73 have language attribute assigned, e.g. some fonts are characterized as being suitable only for certain languages. And when a replacement has to be chosen because the original font from the form is not available in the device type, a replacement font is chosen which has the same language attributes.
If no fonts for the language in question exist in the device type, the resulting font will not be able to print the special characters and you will see "wrong" output characters in the printout.
Note on SAPscript/SmartForms Print Preview:
The OTF Print Preview available in Windows GUI (e.g. from transaction SP01) will sometimes not show the "wrong" characters which appear on the final printout. Here is the reason: since the Print Preview runs in Windows environment, it will use Windows fonts to represent the actual printer fonts. A Windows font typically has more available characters (i.e. covers more character sets) than are actually available in a printer's resident font.
A typical example where the Print Preview will differ from the printout is here: if you have a Chinese PCL5 printer such as CNHPLJ4 and use the Western Latin font COURIER in your document, the print preview will show you Chinese characters if you (by accident) tried to format Chinese characters in COURIER font. This is because Windows will automatically choose a font that can output Chinese characters (which is actually not Courier). But when you print the job on an actual PCL5 printer with resident Western and Chinese fonts, the Courier font will not print any Chinese characters but Western special characters instead, because the printer's resident Courier font does not include Chinese characters.
Rule of thumb: all Asian device types (e.g. CNHPLJ4, JPHPLJ4, JPPOST, KPHPLJ4) support not only Asian fonts but also COURIER, HELVE and TIMES fonts. But these Latin fonts can only be used to print English text, not Chinese/Japanese/Korean characters.
Which fonts are suitable for a given language?
Language(s): Font family to use in a form:
Latin-1 (Western Europe/Americas) *******
DE,EN,FR,ES,NL,SV COURIER, HELVE, TIMES
(LETGOTH, LNPRINT)
Latin-2 (Central Europe) ****************
PL, CZ COURIER, HELVE, TIMES
ISO 8859-4 (Baltic) *********************
ET, LT, LV COURIER, HELVE, TIMES
ISO 8859-5 (Cyrillic) *******************
BG, RU, SR, UK COURCYR, HELVCYR, TIMECYR
ISO 8859-7 (Greek) **********************
EL COUR_I7, HELV_I7, TIME_I7
ISO 8859-8 (Hebrew) *********************
HE COURIER, HELVE, TIMES
ISO 8859-9 (Turkish) ********************
TR COURIER, HELVE, TIMES
Simplified Chinese **********************
ZH CNHEI, CNKAI, CNSONG
Japanese ********************************
JA JPMINCHO, DBMINCHO, DBGOTHIC
Korean **********************************
KP KPBATANG, KPDODUM, KPGULIM
KPGUNGSE, KPSAMMUL
Traditional Chinese *********************
ZF TWDPHEI, TWMING, TWSONG
Thai ************************************
TH THANGSAN, THDRAFT, THVIJIT
Arabic (Unicode systems only) ***********
AR ANDALE_J
Verify your output by examining the OTF data
When analysing printing problems of this type, be sure to check the OTF data which gets produced by SAPscript or SmartForms. OTF or "Output Text Format" is the intermediate page-description format generated from SAPscript or SmartForms. OTF will contain the final printer font names and character set/language identifiers which help to solve the problem. OTF will even name the form and the language of the form used to create the output.
The easiest way to do this is to create a spool request from your application, run transaction SP01, use menu
Goto->Display Requests->Settings
and choose
Display Mode: Raw
Now display your spool request. If this is a SAPscript or SmartForms spool request, you will see OTF data. Each line represents one OTF command, every command starts with a 2-character cmd identifier and possibly some cmd parameters follow.
Here is an excerpt from a sample OTF file where we highlight the most interesting commands:
//XHPLJ8000 0700 00000000001
IN04EALEXTEST_ZEBRA
IN05%PAGE1
OPDINA4 P 144 240 1683811906000010000100001
IN06%WINDOW2
MT0024401289
CP11000000E
FCHELVE 120 00109XSF100SF101110000067E X
UL +0000000000000
SW00067
CT00000000
ST0453037Dieses SF hat Stil ALEXTEST_ZEBRA mit
The 1st line with the // (Control) command reveals the device type usedto print: HPLJ8000
//XHPLJ8000 0700 00000000001
The 2nd line (IN = Info command) shows the name and (internal 1-char)language key of the form:
IN04EALEXTEST_ZEBRA
In this case it is the English (E = EN) SmartForm ALEXTEST_ZEBRA
The OP-line (OP = Open Page) gives the page format used in the form, it is DINA4 Portrait orientation:
OPDINA4 P 144 240 1683811906000010000100001
The CP (CodePage) cmd shows the SAP system codepage used to code the text and the active language. In our case it is codepage 1100 and language E = EN = English.
CP11000000E
Finally, the FC-cmd (Font Call) lists a printer font selected within SmartForms. Please note that every SmartForm has a designated default SmartStyle under "Form Attributes->Output Options". In addition, every text node can have a SmartStyle attached (which will override the definitions from the default style for the text). In our case the resulting printer font that was selected is HELVE 12.0 pt bold-off, italic-off.
FCHELVE 120 00109XSF100SF101110000067E X
Header Data
Release Status: Released for Customer
Released on: 22.08.2005 09:57:20
Priority: Recommendations/additional info
Category: Customizing
Primary Component: BC-CCM-PRN Print and Output Management
Secondary Components: BC-SRV-SCR SAPscript
BC-SRV-SSF Smart Forms
regards,
Anji -
How to upright center the data of the smartforms' table content?
Hello,experts,
I find that smartforms 's format can make the table 's data level-centered ,how to make it upright centered?
pls help me out.thanksin fact ,I have such a problem:I write a print program with smartforms ,and use A4 paper to print ,the result is good ,but when changed to stylus printer ,some line can not display.
I changed the width of the table from CM to MM.,1CM=10MM.
the col line that can not printed at fist now can be printed .so I wonder if I make the data of the table content upright centered ,whether it will be ok:I hope this measure can make the row line that can not printed out previously can be printed out .
so can you give me some solution .I will be appreciate. -
Character Problem For SmartForms to Pdf .
Hi Experts ;
my problem about smartforms . I have a custumer list. I use smartform for output. Customer list of smartform ok . Have any problem . But I convert this output to PDF . Some Characters are overlapping . My main language Türkçe(Turkish) . Characters is incorrect for struct of laguage .( smartform output has no problem but pdf output have problem )
My Code :
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER: p_date LIKE sy-datum.
PARAMETER: p_rea TYPE char255.
SELECTION-SCREEN: END OF BLOCK b1.
DATA: ws_ucomm LIKE sy-ucomm.
DATA: gt_intab TYPE ZSMRT_DNM_T WITH HEADER LINE.
INITIALIZATION.
SET PF-STATUS 'GUI'.
PERFORM get_data.
AT SELECTION-SCREEN.
ws_ucomm = sy-ucomm.
CASE ws_ucomm.
WHEN '&PDF'.
PERFORM f1000_download_form.
EXIT.
WHEN '&BACK'.
LEAVE TO SCREEN 0.
EXIT.
WHEN '&EXIT'.
SET SCREEN 0.
EXIT.
WHEN '&canc'.
SET SCREEN 0.
LEAVE TO SCREEN 0.
ENDCASE.
f1000_download_form
FORM f1000_download_form.
DATA: form_name TYPE rs38l_fnam.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
DATA: t_otfdata TYPE ssfcrescl,
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE i.
DATA: w_bin_filesize TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZDNMSMRT'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_ctrlop-DEVICE = 'I9SWIN'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = wa_ctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = wa_outopt
user_settings = 'X'
mydate = p_date
reason = p_rea
ADRNR = '23713'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otfdata
JOB_OUTPUT_OPTIONS =
TABLES
RTAB = gt_intab[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 150 "132
ARCHIVE_INDEX = ' '
IMPORTING
bin_filesize = w_bin_filesize
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
CODEPAGE = ' '
filename = 'c: est.PDF'
filetype = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
filelength = w_filesize
TABLES
data_tab = t_pdf_tab
FIELDNAMES =
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE i003(z00) WITH 'File not downloaded succesfully'.
ELSE.
MESSAGE i003(z00) WITH 'File Test.pdf downloaded succesfully '
'under C drive'.
ENDIF.
ENDFORM. " F1000_DOWNLOAD_FORM
*& Form GET_DATA
FORM GET_DATA .
SELECT kunnr belnr gjahr from bsid
INTO CORRESPONDING FIELDS OF TABLE gt_intab
WHERE bukrs = '4000' and gjahr = '2007'.
LOOP AT gt_intab.
SELECT SINGLE name1 from kna1
INTO (gt_intab-name1)
WHERE kunnr = gt_intab-kunnr.
MODIFY gt_intab INDEX sy-tabix.
ENDLOOP.
SORT gt_intab by kunnr.
ENDFORM. " GET_DATA
Regards .Try following logic:
DATA: lt_data TYPE TABLE OF tline,
lt_data1 TYPE TABLE OF tline,
lt_objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
Convert OTF to PDF
REFRESH: lt_data.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = l_binfilesize
TABLES
otf = la_jobout-otfdata[]
lines = lt_data[]
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
Error during conversion from OTF to PDF.
ELSE.
Creation of the document attachment
REFRESH: lt_data1.
CALL FUNCTION 'TABLE_COMPRESS' "#EC *
TABLES
in = lt_data[]
out = lt_data1[]
EXCEPTIONS
compress_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
Error during compress operation of the data
ELSE.
REFRESH: lt_objbin.
CALL FUNCTION 'TABLE_DECOMPRESS' "#EC *
TABLES
in = lt_data1[]
out = lt_objbin[]
EXCEPTIONS
compress_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
Error during decompress operation of the data.
ENDIF.
ENDIF.
ENDIF.
Pass table lt_objbin[] to WS_DOWNLOAD function module. It should work.
Thanks
Amol Lohade
Maybe you are looking for
-
ExternalInterface.call not working
***Flash CS4 -published to AS3.0 and Player 10*** I am having a problem using ExternalInterface.call to a javascript function. I have used this method many times in many places and at some point during this project, it was working, but now it stal
-
I am creating a book- Asian theme; page numbers are not placed consistently on page - sometime hidden by text box; will the finished book print this way or does Kodak fix it?
-
AI CS6 install - sample code can't run correctly
Hi I have problem with run sample code in AI CS6. I install AI CS6 and download SDK for AI CS6. I build plugin sample code (tutorial, webter). I build success but This program can't run in CS6. With Tutorial. It's apprirance in menu Help and menu Obj
-
Where do I find tones in Itunes library
"I can not find the "tones" category in my itunes library on my computer. What am I doing wrong?
-
Is it possible to set default table attributes?
The default font in my tables is different than the default composition font I selected. I know I can work around this by editing the table properties, then going to advanced settings, and specifying font attributes under the "inline styles" tab (eve