Attaching smartforms and print prog to invoice
hi
ive developed a smartform and a print program.
da program has a selection screen dat asks user for doc number(vbeln).
it den displays data in da smartform.
now ive to attach it to va02.
wen i attach it using v/40 output type(RD000) program name : zinvoice and pdf/smartform: zinv .and try to get print preview using vf03 da preview doesnt appear.also wen i click on print it shows message "output cannot be issued".
can ny1 suggest wat da problem is and how to resolve it...
points 'll b rewarded...
rgds
Message was edited by:
abapuser
1.
How did u assigned the output type in NACE.
2.
did u go through the form routines of data/transfer copy controls in VOFM .
if its VA02 and VF02 then VTFA has to be used for the same in setting the output type .
if option 2 is not ur case then check with ur functional consultant as to which requirement this output is configured in the nace and in procedures.
o/p cannot be issued is not able to pick the output type for the form and the print program.
This output type has to be configured in NACE first of all.
Then to test the invoice enable this output type for that vbeln number in GOTo-_header->output -> and enable the output type.
regards,
vijay
Similar Messages
-
Attaching smartform and print prog to invoice
hi
ive developed a smartform and a print program.
da program has a selection screen dat asks user for doc number(vbeln).
it den displays data in da smartform.
now ive to attach it to va02.
wen i attach it using v/40 output type(RD000) program name : zinvoice and pdf/smartform: zinv .and try to get print preview using vf03 da preview doesnt appear.also wen i click on print it shows message "output cannot be issued".
can ny1 suggest wat da problem is and how to resolve it...
points 'll b rewarded.
rgdsfirst call the function module name using ssf_function module _name
and then inluce ur fm.
as below.
Reading the NAST and DOC structures
CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
EXPORTING
ix_nast = nast
ix_screen = ent_screen
IMPORTING
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
CHANGING
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
CHECK ent_retco EQ 0.
SmartForm from customizing table TNAPR
gv_formname = tnapr-sform.
Calling the layout set
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = gv_formname
IMPORTING
fm_name = gv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
PERFORM protocol_update.
ENDIF.
For Print output:
IF nast-nacha = '1'. " Print output
ls_control_param-preview = 'X'.
ls_control_param-no_dialog = 'X'.
ENDIF.
For fax output.
IF nast-nacha = '2'. " Fax
Create the Recipient Object
CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
EXPORTING
ip_country = gv_land1
ip_faxno = gv_telfx
ip_type_id = lv_fax_tp
IMPORTING
ep_recipient_id = ls_recipient_id
EXCEPTIONS
invalid_recipient = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF write_out = 'X'.
FORMAT COLOR 6.
WRITE AT /5 text-004.
ENDIF.
RAISE other.
ENDIF.
Create The Sender Object
CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
EXPORTING
ip_sender = sy-uname
IMPORTING
ep_sender_id = ls_sender_id
EXCEPTIONS
invalid_sender = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF write_out = 'X'.
FORMAT COLOR 6.
WRITE AT /5 text-003.
ENDIF.
RAISE other.
ENDIF.
Output options
ls_output_options-tdteleland = gv_land1.
ls_output_options-tdtelenum = gv_telfx.
ls_output_options-tdfaxuser = sy-uname.
Control parameters
ls_control_param-device = lc_fax.
ls_control_param-no_dialog = 'X'.
ls_control_param-langu = nast-tdspras.
ENDIF.
IF gv_fm_name IS NOT INITIAL.
Below function module is used to show the Smart form
CALL FUNCTION gv_fm_name
EXPORTING
is_nast = l_nast
doc = l_doc
control_parameters = ls_control_param
output_options = ls_output_options
user_settings = ' '
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
Error handling
cf_retcode = sy-subrc.
PERFORM protocol_update.
ELSE.
ENDIF.
ENDIF. -
Can anybody plz give me Smartforms print prog for Invoice/PackList
Hello Smartforms Gurus
Can anybody plz give me Smartforms print prog for Invoice/Packing List. I need to develop the same from scratch. I know Smartform for simple Application but complex application i need to refer u all guys prog plz.
I would be greatful plz.
Thnx In AdvanceHi,
Could you please give me the link where you found these group of pre-configured smartforms available in sap labs?
I looked for... but i have not founded it.
Thanks in advance!.
Regards,
Albio.- -
Standard smartform and print program for sales document
HI All,
Is there a standard smartform and print program for sales document or sales order. If someone has worked with it do reply.Hi Shashank,
What exactly you would like to print for Sales Orders in Smartforms..?
regards,
Ram. -
Regarding Smartforms and Print Programs in MM
HI
ALL
I need to customise the all the standard smartforms Purchase Requisition , Purchase Order,Goods receipt,Goods issue,Goods return in MM .For this I need the standard smartforms and driven programs(Print Programs) for these . send me the smartforms and printprograms for these.
Regards
VenkatHi,
You can goto 'NACE' transaction and select the Required Application then Click on OUTPUT TYPES and select the required Output type and click on PROCESSING ROUTINES.
In this way you can get the standard Smartforms.
Hope this may be helpful,
Regards,
Sravanthi -
Is there a way or transaction to tell the print program associated with a standard SAP smartform. The smartform is WB2_CONTRACT_VENDOR
Hi Amrutha,
Please note that the smartform WB2_CONTRACT_CUSTOMER will be using in trading contracts package "WB2B". I think you have to assign this form to O/P determination for trading contracts thru customization. then that will crate an entry in TNAPR table.
Have you implemented Global Trading ? If so then you can see the print program for this form in table TNAPR.
Hope this will help you.
Lanka
Message was edited by: Lanka Murthy -
Standard samrtforms and print program for Bill of Lading in delivery
Is there a standard smartform and print program for Bill of Lading for delivery?
Hi
Check this:
Print Program: RLE_DELNOTE.
Smartform: LE_SHP_DELNOTE.
Regards,
Vishwa. -
Hello Experts,
Can anyone please let me know where HR_SGPPP smartform and print form is configured(Transaction code and steps to configure the smartform and print program ).
Kindly do the needul help.
Thanks & Regards,
Lakshmi PrasadHello Experts,
Details :
For the pensionable employees, the form 'Option for Retirement Benefit' needs to be printed along with pension paper.
The standard pension paper print program u201CRPUPBSR8_PRINTu201D calls the smatform u201CHR_SGPPPu201D from the routine u201CPRINT_PPu201D.
Thanks & Regards,
Lakshmi Prasad -
URGENT: Smartform - Attaching Font to Device Type and Printing
Hello Smarform Gurus,
I have uploaded CORPOS font to SAP and using in SMARTFORMS. Whenever the PDF is called for invoice, it should print immediately.
When I open the smartform and then print, the printout is coming fine with CORPOS font.
Problem: When Invoice is created and PDF is called immediately, the prinout is not coming properly. It's because the printer device type KYOFS150 we are using does not support CORPOS. Pls let me know the options we have. We have also referred to SAP note 12462.
Thanks in advance,
AbhishekHi
U need to update the printer device type KYOFS150 or use another one supports that font
Max -
SmartForms: Purchase order Print prog and SLIN
Hi all,
I am on 4.7 and Purchase Order Print Prog name is /SMB10/FM06P. When i am doing SLINE Check on this Prog. I am getting the following Message.
Program: /SMB10/FM06P Row: 1
The namespace of program /SMB10/FM06P has the setting "C" and cannot be tested.
A possible cause for this is that an SAP program is being checked in a customer
system.
Note, the following rule applies after a change in the source code:
For testing the namespace setting is ignored for one week
(The message cannot be hidden using pseudo-comment "#EC .., or by using SET
EXTENDED CHECK OFF/ON)
Is any one have idea about this?
Thanks in advnace.Thanks for your Reply,
When i am doing Syntax check in SE38, I am getting the below error message.
<b>"The Program "/SMB10/FM06P" is not Unicode-compatible, according to its program attributes."</b>
I have found the OSS Note No: 751007
Solution
Copy the program into your own namespace (e.g "ZZsmbfm06p"), maintain the program attribute to make sure the flag "Unicode checks active" is selected. Then maintain the customizing for output control again.
<b><u>
GOD BLESS SAP, SAP asking to Create Custom Object.</u></b>
Thanks
Message was edited by: Vipin Nagpal
Message was edited by: Vipin Nagpal -
Smartforms :Multiple forms 2 be printed in single print prog,PDF too
Hello Smartforms Gurus
I need to print 4 forms (Export Invoice, packing List, Enclosure to Packing list, Case marking) within a single print prog .
User will execute this prog and it should print all the 4 forms and then by clicking on a button(Archive) there
it should download a single pdf file containing all 4 forms .
At present my following program directly download this form(only Export Invoice) to a pdf file but doesnt leave options to go to Print or Print Preview .
Plz look into my code , and suggest.
Thnx
Moni
*Printing of Export Invoice, Packing List,Enclosure to Packing List & *
*Case Marking in one SMART FORMS Layout *
REPORT ZSD_REP_MULTI_PRINT.
TABLES :
vbak,
vbap,
vbpa,
vbfa,
VBRK,
VBRP,
LIKP,
LIPS,
KONV,
objk,
tvko,
ser01,
sadr,
equi,
makt,
mast,
t005t,
kna1,
t001w,
T001,
ADRC,
sscrfields,
zpp_plcmi, "Packing list history For Conf: Item data
zplh, "PACKING LIST HISTORY : HEADER DATA
zpli. "PACKING LIST HISTORY : ITEM DATA
DATA: FM_NAME TYPE RS38L_FNAM,
P_E_DEVTYPE TYPE RSPOPTYPE,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
P_DOC LIKE DOCS OCCURS 2000 WITH HEADER LINE,
P_LINES LIKE TLINE OCCURS 200,
P_BIN_FILESIZE TYPE I,
P_LANGUAGE TYPE SFLANGU,
P_BIN_FILE TYPE XSTRING,
<i>OK_CODE LIKE SY-UCOMM.</i>
DATA: T_ITEM TYPE ZSD_TABL_LITEM,
WA_ITEM TYPE ZSD_STRUCT_LITEM,
T_ADRS LIKE ZSD_STRUCT_ADRS OCCURS 0 WITH HEADER LINE,
MSLINES LIKE TLINE OCCURS 1 WITH HEADER LINE,
TIDNO LIKE STXL-TDID,
TNAME LIKE STXL-TDNAME,
TOBJT LIKE STXL-TDOBJECT,
SSORD LIKE VBAK-VBELN,
TOT LIKE VBAK-NETWR,
WORD LIKE SPELL.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: P_DELNO LIKE LIKP-VBELN OBLIGATORY,
P_INVNO LIKE VBRK-VBELN OBLIGATORY,
P_DATE LIKE SY-DATUM.
SELECTION-SCREEN END OF BLOCK blk1.
AT SELECTION-SCREEN.
CLEAR T_ADRS.
REFRESH T_ITEM.
T_ADRS-INVNO = P_INVNO.
T_ADRS-INVDAT = P_DATE.
SELECT SINGLE VBELV INTO VBFA-VBELV
FROM VBFA
WHERE VBELN = P_DELNO
AND VBTYP_N = 'J' .
SSORD = VBFA-VBELV.
*Exporter's Address
SELECT SINGLE BUKRS_VF INTO VBAK-BUKRS_VF
FROM VBAK
WHERE VBELN = VBFA-VBELV.
SELECT SINGLE ADRNR
INTO T001-ADRNR
FROM T001
WHERE BUKRS = VBAK-BUKRS_VF.
SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
T_ADRS-POST_CODE1, ADRC-COUNTRY)
FROM ADRC
WHERE ADDRNUMBER EQ T001-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-COUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
**BUYERS NO & DATE
SELECT SINGLE BSTNK BSTDK INTO (T_ADRS-BSTNK,T_ADRS-BSTDK)
FROM VBAK
WHERE VBELN = VBFA-VBELV.
*Consignee Address & Buyer Other Than Consignee
SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
FROM LIKP WHERE VBELN = P_DELNO.
IF LIKP-KUNNR = LIKP-KUNAG.
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,
T_ADRS-CTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNNR.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-CCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
T_ADRS-ONAME1 = T_ADRS-CNAME1 .
T_ADRS-ONAME2 = T_ADRS-CNAME2 .
T_ADRS-OSTREET = T_ADRS-CSTREET .
T_ADRS-OCITY = T_ADRS-CCITY.
T_ADRS-OPCODE = T_ADRS-CPCODE .
T_ADRS-OREGIO = T_ADRS-CREGIO.
T_ADRS-OTELF1 = T_ADRS-CTELF1 .
T_ADRS-OCOUNTRY = T_ADRS-CCOUNTRY.
ELSE.
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,
T_ADRS-CTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNNR.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-CCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
*Buyer Other than Consignee
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
T_ADRS-OCITY, T_ADRS-OPCODE, T_ADRS-OREGIO,
T_ADRS-OTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNAG.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-OCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
ENDIF.
*Other's Ref
TIDNO = 'Z071'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-OREF = mslines-tdline(25).
EXIT.
ENDLOOP.
*Buyer's Order No Ref
TIDNO = 'Z023'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-BUYER = mslines-tdline(25).
EXIT.
ENDLOOP.
*Exporter Ref
TIDNO = 'Z072'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-XPREF = mslines-tdline(25).
EXIT.
ENDLOOP.
*Pre-Carraige By
TIDNO = 'Z074'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PCRG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Place Of reciept by Pre-Carraige
TIDNO = 'Z073'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PLPCRG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Vessel/Flight No
TIDNO = 'Z075'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-VFNO = mslines-tdline(25).
EXIT.
ENDLOOP.
*Port Of Loading
TIDNO = 'Z077'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PLOAD = mslines-tdline(25).
EXIT.
ENDLOOP.
*Port Of Discharge
TIDNO = 'Z076'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PDISG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Final Destination
TIDNO = 'Z070'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-FDEST = mslines-tdline(25).
EXIT.
ENDLOOP.
*Terms Of Delivery & Payment
TIDNO = 'Z080'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-TERMS = mslines-tdline(50).
EXIT.
ENDLOOP.
APPEND T_ADRS.
*BODY SECTION FOR LINE ITEMS
SELECT POSNR KWMENG VRKME WAERK
INTO (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
FROM VBAP
WHERE VBELN = SSORD.
*Mark/Case No
TIDNO = '0002'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-MARKNO = mslines-tdline(40).
EXIT.
ENDLOOP.
*Packing Type
TIDNO = '0003'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-PACKTYP = mslines-tdline(40).
EXIT.
ENDLOOP.
*Goods Description
TIDNO = '0001'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-PACKTYP = mslines-tdline(40).
EXIT.
ENDLOOP.
*Goods Quantity
WA_ITEM-QTY = VBAP-KWMENG.
WA_ITEM-VRKME = VBAP-VRKME.
*Goods Rate
SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
SELECT SINGLE KBETR WAERS
INTO (WA_ITEM-RATE, WA_ITEM-WAERS)
FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = VBAP-POSNR
AND KSCHL = 'PR00'.
*Goods Amount
WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
WA_ITEM-WAERK = VBAP-WAERK.
TOT = TOT + WA_ITEM-AMOUNT.
APPEND WA_ITEM TO T_ITEM.
ENDSELECT.
T_ADRS-TOT = TOT.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = TOT
CURRENCY = VBAP-WAERK
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = WORD
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 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.
T_ADRS-TOT_WORDS = WORD-WORD.
APPEND T_ADRS.
START-OF-SELECTION.
<b> SET PF-STATUS '1000'.</b>
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SD_REP_MULTI_PRINT'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_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.
P_LANGUAGE = 'EN'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-TDDEST = 'LOCL'.
APPEND P_OUTPUT_OPTIONS.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
APPEND P_CONTROL_PARAMETERS.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS =
TABLES
T_ADRS = T_ADRS
T_ITEM = T_ITEM
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.
<b>AT USER-COMMAND.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'ARCHIVE'.</b>
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_JOB_OUTPUT_INFO-OTFDATA
DOCTAB_ARCHIVE = P_DOC
LINES = P_LINES
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 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.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = P_BIN_FILESIZE
CODEPAGE = ' '
FILENAME = 'C:\sd.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 = P_BIN_FILESIZE
TABLES
DATA_TAB = P_LINES
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
NO_AUTHORITY = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>ENDCASE.</b>
*& Form FINDTEXT
text
FORM FINDTEXT.
REFRESH mslines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = tidno
language = sy-langu
name = tname
object = tobjt
TABLES
lines = mslines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
DELETE mslines WHERE tdline IS INITIAL.
ENDFORM. "FINDTEXT
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjamanHello,
You cannot get continuous page numbers, But you will be able to merge all the 4 form outputs into one PDF file.
In yesterdays example you called one form, then converted OTF data into PDF data and downloaded on Presentation server.
In this case, after you call first form, you get the OTF data. Push this OTF data into a MAIN Internal table ( Same type as of OTF dada Int TAB ). Then Call second form. Then you get second set of OTF data. This second set of OTF data may be appended to the MAIN Internal table and the follw same procedure for the rest of the forms. In the end you will have one Internal table which holds OTF data of all the 4 forms.
Now convert the OTD data to PDF Data by the FM and Download one file which has output of all the 4 forms.
I hope my explanation is quite clear.
Regarding your second question, the Archive and Print and archive buttons on the PRINT PREVIEW screen works for Spool archiving which is to be enabled by customizing. If you wish to archive the output as PDF, you may have to do it in program.
I am NOT accessible on YAHOO.
Plz let me know if you are stuck.
Regards, Murugesh AS -
Preview and Printing of Chinese Characters in Smartform
Hi everyone!
I have a development that needs to output in Smartform a combination of Chinese and English characters, on an English Logon,
When I debug the form, the Chinese characters are shown in the debug screen, but when it is previewed or printed, it shows garbage. Can anyone help me with this?
Thanks a lot! Points for any helpful answer!Hi
check this OSS Note
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
Regards
Anji -
I am using Numbers app for the ipad and it has been working absolutely fine but now, when I want to email a spreadsheet as a PDF via the 'share and print' option, the file now doesn't appear as an attachment to the recipient. Any ideas please?
Hi mafiose15,
Thanks for visiting Apple Support Communities.
Restoring your iPod to factory settings is the best way to try and get it back to working order. You can use the instructions below to restore it:
How to restore iPod
Verify that you have an active Internet connection, because you may need to download new versions of the iTunes and iPod Software.
Download and install the latest version of iTunes if necessary.
Open iTunes. Connect your iPod to your computer using the USB or FireWire cable that came with your iPod.
After a few moments, your iPod will appear in the Source panel in iTunes.
Select your iPod in the Source panel. You will see information about your iPod appear in the Summary tab of the main iTunes window.
Click Restore.
If you are using a Mac, you will be asked to enter an administrator’s name and password.
A progress bar will appear on the computer screen, indicating that stage one of the restore process has begun. When this stage is done, iTunes will present one of two messages with instructions specific to the iPod model you are restoring.
Disconnect iPod and connect it to iPod Power Adapter (typically applies to older iPod models).
Leave iPod connected to computer to complete restore (typically applies newer iPod models).
During stage two of the restore process, the iPod displays an Apple logo as well as a progress bar at the bottom of the display. It is critical that the iPod remain connected to the computer or iPod power adapter during this stage.
Note: The progress bar may be difficult to see, because the backlight on the iPod display may be off.
After stage two of the restore process is complete, the iTunes Setup Assistant window will appear. It will ask you to name your iPod and choose your syncing preferences, as it did when you connected your iPod for the first time.
You can find the instructions in this article:
Restoring iPod to factory settings
http://support.apple.com/kb/ht1339
All the best,
Jeremy -
I have a iPad 2 and need to print of a invoice can I print on my hp photos art 3110 all in one if so how do I go about it please
your printer doesn't appear in the compatible Airprint printers listed in this basic article: http://support.apple.com/kb/ht4356
There might be an app HP has to help you out, but there's no Apple supported way, as it's not an Airprint printer.
Anyways, hope this helps
Good luck
Stijn -
How do I get a PDF document put into an attachment form that I can drag to an e-mail. Usually I get an icon showing an spiral note book which then becomes an attachment when I drag it to the e-mail, but occasionally it stays in PDF and prints out on the e-mail. What have I done differently?
Thanks again for the detailed instructions Srini!
And I really hate to be a pest . . . but . . .
Using your example and not modifying it, I get the e-mail form filled out correctly and the pdf attached, however, I'm not prompted to sign it.
Any more clues?
Maybe you are looking for
-
I have an amplifier which is capable of various surround sound arrangements, i.e. DTS and Prologic, and a Macbook connected to it via TosLink. I acquired an album with DTS audio and managed to encode the contents into 5.1 channel WAV files (L R C LFE
-
I need to know how to open the laptop to replace the card that controls the wlan and treble. I tried to find a manual to show how to get the laptop open and then be able to get the card number so I can order one. I have removed the screws but can't g
-
SQL Developer Cart Deployment Losing Time on Date Columns
I tried using the SQL Developer cart feature to migrate from AWS to Oracle Cloud and I found that the time element of any date attributes is not migrated. I checked the deployment file contents and found that both the SQL*Loader control file and the
-
Hi All 1.Will there be Customer Master data available in IS etail like SD? 2. Can anybody send me the link for IRT100 material Regards Kumar
-
Hello Gurus, I am new to BW and not quite sure on how to design the current report. I need to take the cost of goods for the sales done on a given period. 1) I can take the billing docs from the billing ODS. 2) The sales order line item completion st