Smartforms in SAP4.6B
Hello There,
Is there any possibility to use SAP Smartforms in SAP version 4.6B? If so could any one let me know the procedure to install in 46B Unix Enviornment?
Thanks in Advance.
Cheers
Sankar
Hi,
As far as I know Smartforms are fully available since SAP release 4.6C. Some of the latest patches of 4.6B implements some of the smartforms fuctionalities, but they are not very useful.
Svetlin
Similar Messages
-
Can i transport SMARTFORM from SAP4.7EE to SAP-ECC6.0 ?
Hii,
I am working in Upgradation project want to know wheather the SMARTFORM that is developed in SAP4.7EE can to transported to SAP-ECC6.0. If yes please do share procedure with me its very very urgent task given to me.
Please help me to achieve this.
Thksmay be this can help
http://www.saptechies.com/smartforms-faq-part-two/
Just u need is a transport request, Try out this method.
Best of luck -
Convert Smartform Output to PDF
Hi all,
I am trying to save Output of Smartform in PDF file format. for that purpose i am calling "CONVERT_OTF" FM from my driver program.
But it is giving me Information "OTF end command // missing in OTF data"
while executing FM "CONVERT_OTF". i debug it it is giving Sy-subrc = 2.
Please Help me in this context. I am also givin code of my driver program:
TABLES: vbrp.
DATA: fm_name TYPE rs38l_fnam,
it_invoice TYPE STANDARD TABLE OF vbrp,
it_invoice_wa TYPE vbrp,
it_inv TYPE STANDARD TABLE OF vbrp,
it_inv_wa TYPE vbrp,
invoice_no(25) TYPE c,
invoice_l(10) TYPE c,
invoice_h(10) TYPE c.
Converting Output to PDF Declaration **********
DATA: tab_otf_data TYPE ssfcrescl,
pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
bin_filesize LIKE sood-objlen,
outop TYPE ssfcompop, " Output Parameters
cparam TYPE ssfctrlop, " Control Parameters
tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
my_tabix TYPE sy-tabix,
file_size TYPE i.
SELECT-OPTIONS doc_no FOR vbrp-vbeln.
SELECT vbeln posnr fkimg vrkme meins netwr matnr
FROM vbrp INTO CORRESPONDING FIELDS
OF TABLE it_invoice
WHERE vbeln IN doc_no.
Inserting Unique Invoice Numbers for Displaying Individual Details in
Smart Form
LOOP AT it_invoice INTO it_invoice_wa.
AT NEW vbeln.
MOVE it_invoice_wa-vbeln TO it_inv_wa-vbeln.
APPEND it_inv_wa TO it_inv.
ENDAT.
ENDLOOP.
invoice_no = doc_no.
invoice_l = doc_no-low.
invoice_h = doc_no-high.
suppressing the Print dialog box *********************
*outop-tddest = 'locl'.
*cparam-no_dialog = 'X'.
*cparam-preview = space.
*cparam-getotf = 'X'.
START-OF-SELECTION.
Calling Smart Form *********************************
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSB_SMARTFORM_INVOICE'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
CALL FUNCTION fm_name
EXPORTING
invoice_no_h = invoice_h
invoice_no_l = invoice_l
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = outop
user_settings = ''
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = tab_otf_data
JOB_OUTPUT_OPTIONS =
TABLES
it_invoice = it_invoice
it_inv = it_inv
***removing the initial and final markers from the OTF data*********
DELETE tab_otf_data-otfdata WHERE tdprintcom = '//'.
searching for the end-of-page in OTF table************
READ TABLE tab_otf_final WITH KEY tdprintcom = 'EP'.
my_tabix = sy-tabix + 1.
appending the modified OTF table to the final OTF table****
*INSERT LINES OF tab_otf_data-otfdata INTO tab_otf_final INDEX my_tabix.
tab_otf_final[] = tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
IMPORTING
bin_filesize = bin_filesize
BIN_FILE =
TABLES
otf = tab_otf_final
lines = pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
write :/ bin_filesize.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = bin_filesize
filename = 'E:/Test.pdf'
FILETYPE = 'ASC'
IMPORTING
FILELENGTH = file_size
tables
data_tab = pdf_tab
FIELDNAMES =
Help will be rewarded.
Regards,
Sachinhi
good
go through this ,hope this ll help you to solve this problem
Check out the following documentation and example program and help links
s_control_parameters-no_dialog = 'X'.
s_control_parameters-getotf = 'X'.
CALL FUNCTION v_func_name "call your smartform
EXPORTING
output_options = s_output_options
control_parameters = s_control_parameters
IMPORTING
job_output_info = s_job_output_info
call function 'CONVERT_OTF_2_PDF'
tables
otf = s_job_output_info-otfdata
lines = t_pdf
here is the example for SAMRTFORM TO PDF.
http://www.sap4.com/wiki/index.php/Genera_PDF_a_partir_de_Smartforms
Example Program
data:
fm_name TYPE RS38L_FNAM, "Smart Forms: FM Name
sf_name TYPE TDSFNAME
value 'YOUR_FORM_NAME', "Smart Forms: Form Name
P_OUTPUT_OPTIONS TYPE SSFCOMPOP,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP,
P_LANGUAGE TYPE SFLANGU value 'E',
P_E_DEVTYPE TYPE RSPOPTYPE.
data:
P_BIN_FILESIZE TYPE I,
P_BIN_FILE TYPE XSTRING,
P_OTF type table of ITCOO,
P_DOCS type table of DOCS,
P_LINES type table of TLINE,
name type string,
path type string,
fullpath type string,
filter type string,
guiobj type ref to cl_gui_frontend_services,
uact type i,
filename(128).
GET SMARTFORM FUNCTION MODULE NAME ---
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = sf_name
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.
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_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
****...................................PRINTING.........................
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
(....) <--- your form import parameters
IMPORTING
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO.
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_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
****...................................CONVERT TO PDF...............
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_OTF
DOCTAB_ARCHIVE = P_DOCS
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.
concatenate 'xxxx' '.pdf' into name.
****..................................REQUEST FILE NAME.................
create object guiobj.
call method guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = name
file_filter = filter
CHANGING
filename = name
path = path
fullpath = fullpath
user_action = uact.
if uact = guiobj->action_cancel.
exit.
endif.
move fullpath to filename.
****..................................DOWNLOAD AS FILE................
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = P_BIN_FILESIZE
FILENAME = filename
FILETYPE = 'BIN'
TABLES
DATA_TAB = P_LINES
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.
reward poing if helpful..
thanks
mrutyun^ -
RSTXSCRP is a program for importing/exporting SAPscripts. Can you tell me if there is any such program exists for importing/exporting smartforms?
Thank you in advance. Shall definitely award points for helpful answers.HI,
There is no such a program for Smartforms....
but Smartform session, Utilities --> Download, then it will download to the given path as a XML file, then
Utilities --> Upload, give the same path to upload.
See the below link for a Program which downloads the Smartform as well as Smartstyles.
http://sap4.com/wiki/index.php?title=ZSMART_FORM_UPLOAD_DOWNLOAD
mark all the helpful answers
Regards
Sudheer -
Smartforms or Adobe Interactive Forms?
Hello Folks,
my client currently are beginning the decision making process to replace all of their current Jetform based SAP printing solution to a newer more stable solution - and they are interested in the possible options available.
Note that this is a major project as we have to migrate all documents (invoices, orders, POs, account statements etc) defined in multi languages and versions. Currently we are running SAP4.6C - but there is the possibility of an upgrade in the near future too.
To me the most stable alternative right now appears to be SAP smartforms - as this is a tried, proven and well integrated technology. Now I read here about the possibilities offered by Adobe interactive forms - and that from 6.40 onwards they will be integrated into the ABAP workbench. It is not clear to me though if Adobe interactive forms are intended to replace Smartforms or if they are merely an alternative approach - and what the pros and cons are of each technique.
Also it is not clear to me how well Adobe forms can be integrated with standard NAST table style output control - is it possible to integrate adobe forms to the standard output control?
What we are really concerned with is that we spend a lot of effort migrating to Smartforms only to find out that it is yesterdays technology and that we subsequently have to remigrate to Adobe interactive forms...
Can anyone there at SAP or on SDN provide any advice as to the pros and cons of the Smartform solution when compared with Adobe interactive forms, and any advice you can offer as to which solution to opt for in our migration project?Hi Julian,
it sounds to me that all your current forms are output forms (for printing, faxing, e-mailing, etc.) i.e. non-interactive.
Interactive Forms based on Adobe software is SAP's new solution for forms development. Its first release has the focus on interactive use of forms. High-volume printing is supported in principle, but - being a new solution - the performance has not yet reached the same level as Smart Forms or SAPscript, two established solutions that had years to grow. Interactive Forms is the only solution that will continue to be enhanced with new features, while SAPscript and Smart Forms will be supported without limitations.
When (or if) to move to Interactive Forms depends on your requirements. For interactive forms usage, i.e. the new functions, you have no choice, as the existing solutions don't support it. High-volume print scenarios need to be carefully analyzed to see whether your concrete requirements can be met at this point.
However, it is possible to move to Smart Forms and design your forms in such a way that a migration at any point in the future would be but a small step. Smart Forms offers from Web AS 6.40 a migration wizard to Interactive Forms. Technically, everything can be migrated, but we recommend against things like ABAP program nodes, for example.
You are not forced to ever go to Interactive Forms if you don't want to. It really depends on whether your client needs any of the new features in Interactive Forms. Also, if they are currently working with JetForms, they could enquire with Adobe directly what migration path they offer to the joint solution.
Hope this helps.
Best regards,
Markus Meisl
SAP NetWeaver Product Management -
Download smartform on local machine
Dear Experts,
I want to download smartforms on local machine from a programme .means if i give smart form name in option it download a smartform on loacl machine.
Thanks,
jatenJaten,
use this Function module is FB_DOWNLOAD_FORM and FB_UPLOAD_FORM.
check this link..
http://www.erpjobs.co.uk/forum/showthread.php?t=63
goto sm37 then run this fm give I_FORMNAME = your smartform name
This will down load smartform in XML format.
Use the Utilities--> Upload for upload the form .
Please sure the upload file is in XML format.
If you want only from program than just refer:
http://sap4.com/wiki/index.php?title=ZSMART_FORM_UPLOAD_DOWNLOAD
Amit. -
Font size increases when smartform is sent as email attachment
Hi,
I am facing a problem with font size of smartforms. when the output medium is printer, the form looks good. but when i convert smartform into PDF and send as email attachment, the font siz increases and text is getting truncated. Please help me solve this problem.
Thanks,
HariHi,
Check the given below links and compare your code with them:
http://sapient.wordpress.com/2007/06/19/smartform-to-mail-as-pdf-attachment/
http://sap4.com/wiki/index.php?title=Envio_smartform_por_mail
If still there is a problem, please do share a code.
Also check sending a PDF document from your system via a Email(Outlook), and open the same in a different system and look for the changes. -
Filename in Webdynpro for a PDF created with Smartform
Hi,
I created a PDF with Smartform in my Webdynpro-Application.
When I click the save button there is a default filename f.pdf .
How can I change the filename?
Regards
Marcus SchugHi Experts,
any update on this?
I am facing the same problem with ESS payslip (smartform/Hrform): my customer wants to have custom file name for download salery statements from the portal. Do you know how to change the default form name unknown.pdf to e.g.. "payslip_month_year"?
I spent a lot of time to find any possibility to get and change the file name but without success till now.
Please respond.
Regards,
Zdzislaw Kaczmarczyk
Edited by: Zdzislaw Kaczmarczyk on Jun 14, 2010 4:41 PM -
Sy-tabix for internal table in smartform
Hi friends,
How to capture the sy-tabix value for the entries in an internal table which has been looped into the loop of table node of a smartform?? I need to print something immedaitely after the end of the table
For every record the value of sy-tabix is showing 1 !!
Advance Thanks
AadarshHi Aadarsh,
Give ur sy-tabix at the end of the loop.
loop at itab.
//table node populations.
endloop.
give a seperate loop for this.
loop at itab.
sy-tabix.
endloop
get the total no and print it after the table.
If u r using do loop then give sy-index.
Hope tihs helps u,
Regards,
Nagarajan.
Message was edited by: Nagarajan Kumarappan -
Installation problem on AIX ( SAP4.7, Oracle-9i)
Hello Gurus,
We are installaing SAP4.7 on AIX with oracle-9i as an database
we have completed central instance successfully, while database instance we are facing error
I am attaching error log for your referenec
error log
You entered: /sapcd/oracle9/51030360/ORA92_1
Found the label ORACLE:9.2:RDBMS(1/4):Oracle RDBMS AIX5 CD:CD51018585_1 but need
the label ORACLE:9.2.0:RDBMS(1::
Can any body help me regarding this error.
Thanks & regards
Shishir> You entered: /sapcd/oracle9/51030360/ORA92_1
> Found the label ORACLE:9.2:RDBMS(1/4):Oracle RDBMS AIX5 CD:CD51018585_1 but need
> the label ORACLE:9.2.0:RDBMS(1::
Are the CDs numbers matching to your installation master CD?
Markus -
Dunning won't print to smartform
Hey all,
I've been trying to set up the Dunning process to print to the standard SAP dunning smartform (F150_DUNN_SF). Here's what I've done so far:
1. Used transaction BF31 to change the function module for dunning to FI_PRINT_DUNNING_NOTICE_SMARTF.
2. Used transaction SPRO under Financial Accounting->Accounts Receivable and Accounts Payable->Business Transactions->Dunning->Printout->Assign Dunning Forms to set the Form for our custon procedure for all 3 Dunning Levels to F150_DUNN_SF
3. I then run the dunning report out of transaction F150. The Dunning list shows that the customer should receive the letter.
When I try to print, the job terminates. When I check the job log in SM37, I get the following error: "Include text does not exist (object TEXT, ID )" (Message class SSFCOMPOSER, Message No. 610). Everything looks like it is set up correctly. Did I miss a step?
Thanks for your help!
~WilliamHi,
Seems that the smartform that you are using has a standard text which is not avaliable check the smartform for standard texts being used and check if they are all avaliable in SO10.
Regards,
Himanshu -
Smartforms: How 2 fire print & download 2 PDF simultaniously 4 my forms
Dear Murugesh, Cristian
The following is my piece of code which directly downloads my forms into PDF but not creating any spool 4 firing print ,
1) I need the both to happen simultaniously .
2) I need to include the o/p(either SAPScript/report o/p) as the Smartform pages with o/p of my Driver prog ,by calling another TCODE from my driver prog .
Please throw some light on this .
have a look into my code
*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_NAME1 TYPE RS38L_FNAM,
FM_NAME2 TYPE RS38L_FNAM,
FM_NAME3 TYPE RS38L_FNAM,
FM_NAME4 TYPE RS38L_FNAM,
P_E_DEVTYPE TYPE RSPOPTYPE,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
T_OTF LIKE ITCOO OCCURS 0 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,
OK_CODE LIKE SY-UCOMM.
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.
*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-GDESC = 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'.
*Item Remarks
TIDNO = 'ZREM'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-REMARK = mslines-tdline(40).
EXIT.
ENDLOOP.
*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.
*Gross Wieght
TIDNO = 'Z078'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-GWT = mslines-tdline(15).
EXIT.
ENDLOOP.
*Net Wieght
TIDNO = 'Z079'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-NWT = mslines-tdline(15).
EXIT.
ENDLOOP.
T_ADRS-TOT_WORDS = WORD-WORD.
APPEND T_ADRS.
START-OF-SELECTION.
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 = 'LOHP'.
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 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSD_REP_MULTI_PRINT1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME1
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.
CALL FUNCTION FM_NAME1
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.
LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
APPEND T_OTF.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSD_REP_MULTI_PRINT2'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME2
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.
CALL FUNCTION FM_NAME2
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.
LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
APPEND T_OTF.
ENDLOOP.
<b>SET PARAMETER ID: 'AUN' FIELD SSORD ,"VBAK-VBELN VALUE ,
'APO' FIELD ITNO."VBAP-POSNR.
CALL TRANSACTION 'ZPL3' AND SKIP FIRST SCREEN.
IF SY-SUBRC NE 0.
MESSAGE E001(ZQOTBANK).
ENDIF.
*SET PARAMETER ID: 'AUN' FIELD VBAK-VBELN,
'APO' FIELD VBAP-POSNR.
*CALL TRANSACTION 'ZA3C' AND SKIP FIRST SCREEN.
*IF SY-SUBRC NE 0.
MESSAGE E001(ZQOTBANK).
*ENDIF.
IMPORT (T_OTF2) FROM MEMORY ID 'MEMID'.
LOOP AT T_OTF2 INTO T_OTF2.
APPEND T_OTF2 TO T_OTF.
ENDLOOP.
</b>
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSD_REP_MULTI_PRINT4'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME4
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.
CALL FUNCTION FM_NAME4
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.
LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
APPEND T_OTF.
ENDLOOP.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = T_OTF
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 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = P_BIN_FILESIZE
FILENAME = 'C:\SD4.pdf'
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH = P_BIN_FILESIZE
TABLES
DATA_TAB = P_LINES
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& 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
Thnx
moni
Message was edited by: md monirujjaman
Message was edited by: md monirujjamanHello,
I had thought that your 4th output of the Transaction is an output of a list and NOT from a SCRIPT.
Now, if it is a SAP SCRIPT ourput, it is quite simple as you have to get the OTFDATA from the SCRIPT. But you may have to make the correction in your SAPSCRIPT driver program.
Sample:
CALL FUNCTION 'CLOSE_FORM'
TABLES
otfdata = te_otf_table
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
OTHERS = 3.
Next you may EXPORT this OTF Data Internal Table to ABAP Memory.
In your program where you are calling all the 3 forms + the transaction which outputs the SAPScript output, the exported data may be imported and appended into the MAIN Interal Table and single PDF could be generated.
Secondly, The PRINT prieview of the SSFs could be generated by passing Export options of the SSF FM
SAmple:
ssfctrlop-no_dialog = ' '.
CALL FUNCTION l_form
EXPORTING
control_parameters = ssfctrlop
output_options = ssfcompop
I hope this helps you.
Regards, Murugesh AS -
How to print the superscript in smartform
Hi gurus,
Please tell me the procedure how to print the superscript in middle of the text displaying?
when we are displaying the smartform its converted to some special character like & .
please let me know procedure at the earliest
Regards
RajHi thanks for ur patience.
see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
then aftet HLL how it prints as superscript.
for HLL we are using another character format and for superscript we are using the another character format.
If posiible send me the code to write in smartforms
Regards
RAj
Points are awarded for useful answers. -
How to print horizantal lines in smartforms?
hi friends,
how to print horizantal lines in smartforms.
waiting for ur valuble replies.
Thanks,
KiranHI,
If u use templates or table,then use borders to print the horizontal lines.
Eg : Create template-->Table painter->click select pattern button->Display framed pattern->select 3rd one.it will display only horizantal lines.
if want to print horizantal line under the text, then create one paragraph or character formate with Underline in smartstyles.Use that paragraph or character to u r text element -
How to print a bullet in smartforms?
Hi All,
How to print a bullet in smartforms?
I need it urgently.
Any help would be appeciated.
Regards,
Mahesh.Hi,
if i remember correct <600> is the value for bullets.
you can insert this using sap system symbols ---> select bullets (before this place your cursor where ever you want the bullets.
eg:
P1 <600> test.
Thanks,
Sree.
Maybe you are looking for
-
Difference between cancel_flag IS NULL and cancel_flag ='N'
Hi , Please clarify Difference between cancel_flag IS NULL and cancel_flag ='N' in PO Headers . Because from front end cancel check box is unchecked in abobe both the cases . We can see cancel check box status only in Help>Diagnostics>Examine . Thank
-
Getting error while creating rows in database
Hi , I am new to java and currently working on EJBs . The tables i have are ABC and XYZ and their columns are ABC - fk1,fk2 // these make the composite primary key XYZ- fk1 // which is primary key for this table I am trying to create multiple rows in
-
Level of Integration between IS Retail and R3 on Finance
Hi experts, Can you share some expereinces on level of Finance capabilities that are used in IS-Retail - AP, AR, Month/Year End, Store P&L- etc? If it is wholesale/Retail type client how does the above work? Any help is appreciated. Thanks Subha
-
Access Denied when Posting Files
I've been trying to update the index file on my site. I haven't touched any setting in Dreamweaver on this site. It will not allow me to post this file or any others. I quit and restarted the program and deleted and rebuilt the site and am still gett
-
I did search but cannot find anything that specifically addresses the proble of "converting" MKV files to QT. I can play the mkv's that I have using videolan, or MPlayer, but I want to be able to get them into a QT format. I have QT 7 Pro; I also hav