Call SmartForms In BSP
Hi experts,
I am implementing of copy of standard bsp application "hap_document" and I would like to call a smartforms anytime I click on print button. Does anybody can tell me what are the different steps to call a smartforms which will display all the data in a nicer layout than the bsp?
Thanks in advance,
Best Regards,
Murai
Hi Murai,
Please check the below links may helpful you :
BSP/HowTo: Generate PDF Output from a BSP.
Smart Form output into a BSP page?
Regards,
Prakash.
Similar Messages
-
Hello
In our scenario we are entering data into a BSP and want to call a smartform and archive the smartform output as PDF on the click of a button. The displaying of the PDF file in the browser works fine. What I cannot get working is for the smartform to automatically archive the output using archive_index and archive_parameters. In ABAP this works fine but I cannot find why the same call in the BSP displays the form but does not archive the displayed data.
Does anybody have any ideas?
Thanks
HarryHello Prabu
Thanks for your answer. I thought in my question I clearly stated that converting the OTF and displaying the PDF was not the problem. Sorry if it was not clear enough.
In any case I have found a solution to the problem myself. After receiving the OTF data I copy it into an identical structure of the same type and use one to archive with FM CONVERT_OTF_AND_ARCHIVE and the other is used to display the PDF file in the browser. Surely not "state of the art" but it solves my problem.
Thanks to all
Harry -
How do we call smartforms in abap program or web services
how do we call smartforms in abap program or web services
How many types of smartforms are there?
points will be rewardedHi
See this sample program
Using the fun module smartform is called from the program
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
<b>call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'</b>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function <b>FM_NAME</b>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
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>Reward points for useful Answers</b>
Regards
Anji -
How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?
Hi Experts,
How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?
I mean, in driver program i called SSF_FUNCTION_MODULE_NAME to get the related FM for my smart form. after that How do I call it(smartform fm) . I tried to call by pressing PATTERN button in Report. but it is showing FM is not exist error.
Call function SSF_FUNCTION_MODULE_NAME
Export
formname = 'zsmartform'
import
fm_name = function_name.
function_name is stored the corresponding smartform fm. then How do i call it to process my smartform?
thanks in advance.hi,
Chk this sample.
DATA: p_output_options TYPE ssfcompop, "occurs 0 with header line
p_control_parameters TYPE ssfctrlop. "occurs 0 with header line
p_output_options-TDCOPIES = 3. "number of copies.
p_output_options-tddest = 'LP01'. "def
p_control_parameters-no_dialog = 'X'. "no dilog box
p_control_parameters-preview = 'X'. "no preview
DATA : v_form_name TYPE rs38l_fnam.
*---- Function to get the function module name of the ----
*---- specified Smart form. ----
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'GIVE YOUR SMART FORM NAME'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3 .
*---- Function Module to call the Smart Form ----
*step 1 - go to ur smart form
*step2 - take environment
*step3-take function module name
*copy that unique number.
*step4 -come back to ur driver program.
*step5 - place ur cursur here. take patter,.give that unique number.
*at that time u will get the below code.
*step6 - rename that unique number with 'v_form_name' in the code generated by pattern.
CALL FUNCTION v_form_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_PARAMETERS =
control_parameters = p_control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = p_output_options
user_settings = ' '
* ARCHIVE_INDEX_TAB =
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
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.
for any clarifiaction pls revert.
regards,
Reshma -
hi,
1. Can anyone suggest me how to call a dll in a bsp. if you can help me with a sample code it'll be helpful.
2. Is it possible to call VBScript in BSP
Thnx in Advance
VinodhIt is done the same way you do in normal HTML.
A BSP is only an HTML page which ABAP is compiled into during runtime just like a JSP page or ASP page.
<htmlb:content design="design2003">
<htmlb:page title = "Test submit ">
<htmlb:form id="myform" method="POST" enctype="multipart/form-data">
<htmlb:inputField id="myFile"
visible="true"
width="300px" /><br>
<htmlb:listBox id="filelist"
width="300px" />
<script>
function selectFolder(){
var myText = "Browse for file";
var objShell = new ActiveXObject("Shell.Application");
var ssfWINDOWS = 0;
var objFolder;
objFolder = objShell.BrowseForFolder(0, myText, 0, ssfWINDOWS);
if (objFolder != null) {
document.forms.myform.myFile.value=objFolder.Items().Item().Path;
getFileList(objFolder.Items().Item().Path);
function getFileList(id) {
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var myStartingFolder = id;
if ( myStartingFolder != null || myStartingFolder != "" ) {
var myFolder = FSO.GetFolder( myStartingFolder );
var myFileList = new Enumerator(myFolder.files);
// First clear all entries
document.forms.myform.filelist.options.length = 0;
for (; !myFileList.atEnd(); myFileList.moveNext()) {
document.forms.myform.filelist.options[document.forms.myform.filelist.options.length] = new Option(myFileList.item().name,FSO.GetFileName(myFileList.item()));
} // start folder found
} // getFileList
</script>
<htmlb:button id="myButton"
onClientClick="selectFolder()"
text="Browse" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
Just remember with ActiveX you have security issues to keep in mind! -
How to call smartform in me54n
Hai All,
Iam developing a smartform for PR print with ztcode,the user asked me that,he dont want seperate tcode,in me54n tcode itself he want
print.I have tried in the enhancement spot but it is not firing.
Regards,
Siva jyothi.Hi ,
The print button creates a spool number through which you can get ALV output of the ITEM details but cannot call smartform from that.
PR is just an internal document.There is no other way to do it(As far as i know).
You now have only two options to go for:
1) Create a subscreen with a pushbutton , and then call the driver program to print the smartform.
2) A Z transaction to print the PR , which you have already done.
Let me know if you find any other way to do it.
Br.
Giri -
Hi all,
i want to print the data that i have in Portal (WD) in a PDF via Smartforms,
can somebody tell me how can i do this?
Best Regardsget the Smartform function module
call smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = '<Smartform name>'
IMPORTING
FM_NAME = LV_FUNC_MOD_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0 .
RETURN.
ENDIF.
call LV_FUNC_MOD_NAME with Control parameter NO_DIALOG,GET_OTF marking X
*convert the OTF to PDF using
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = LV_LENGTH
BIN_FILE = LV_XSTRING
TABLES
OTF = LT_RETURN-OTFDATA
LINES = LT_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
RETURN.
ENDIF.
now use use runtime service method to push the PDF to browser client
CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE -
Excel sheet generation through RFC call from a BSP application
Hi,
I am calling a RFC FM ( in R3) in Event handler 'OnInputProcessing' of a BSP application in a SRM server.
That function submits a report program which geneates a excel sheet using download FM . Excel sheet is not getting generated.
But when i am calling this RFC FM (in R3) from a report program ( in srm server)
this is generating an ecel sheet.
I want to have call RFC from BSP application.
I tried the way of submit a program ( which contains RFC call) from BSP application ,but it is also not generating excel sheet.
My ultimate AIM is to generate excel sheet by trigerring CALL or submit from BSP
application.
can any one propose solution for it.
Useful answers will be rewarded.Hi,
Which FM is it. I guess that the download generated is a SAP gui oriented solution, which will never work in a web environment
Eddy
PS. Reward useful answers and earn points yourself -
i have created a ITS screen which in turn calls a Abap report
I want to call this ITS screen from a BSP application .
Could you please provide some sample code which is used to call ITS from BSP application..
Useful answers will be rewarded
ThanksSince it is related to both ITS and BSP i thought i can post it in both. and also i didnt get answers for the queries..... for a long time. Anyhow i will take your suggestion for my future query.
i hv done using iframe to call my ITS application.
I can able to call the Bsp application whichin turn calls its screen abap program.
while executing , the selecting the directory from the file browse pop up doesnt work for downloading the file
becos the client , they will not change the settings related to applet in the internet browser for security reasons.
I hav to make it some how to make it work in the portal which calls this BSP application..
at the moment i mapped this BSP application to the user role in the SUS Portal . but it appears in the SUS portal . but i m not able to click the application and also handsymbol is not seen while bringing the mouse to that area.
Could you please tell me , how to use Action_id for that particular application, Authorisation profile settings.
Kindly give your suggestions asap. -
Calling Smartforms from Module pool: Most Urgent
Hi, Exeperts
how can I call smartforms from module pool.
I have done like below.
First Created a push button on screen and used
these code in user command through PAI
FORM CALL_SMARTFORMS .
DATA: V_FORM_NAME TYPE RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSMART'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
ENDFORM. " CALL_SMARTFORMS
now I am getting form name in v_form_name, but it is not executing.
Please help me out.
Regards
Rajiv singh.Well, as it's most urgent....
One you have a value in V_FORM_NAME you need to call this function module, passing the fields and strucures that make up the interface to your form.
Eg.
DATA: DEVICE TYPE SSFCTRLOP .
DEVICE-DEVICE = 'PRINTER'.
DEVICE-NO_DIALOG = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = device
USER_SETTINGS = 'X'
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
Regards,
Nick -
Problem while calling smartform in webdynpro
Hi Experts,
I am calling a smartform in webdynpro abap. It was working fine in development server. I have ported the same request to Quality Server, there it was not working.it is giving sy-subrc = 1 and it is displaying a blank screen
I m following the following steps for calling smartform in webdynrpo.
I am calling the smartform by
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM_NAME'
importing
fm_name = fname
exceptions
no_form = 1
no_function_module = 2
others = 3
if sy-subrc 0.
Error MESSAGE
endif.
call function fname
exporting
control_parameters = lv_control_parameters
output_options = lv_output_options
user_settings = space
pernr = stru_input1-zpernr
reinr = stru_input1-zreinr
pdvrs = stru_input1-zpdvrs
importing
job_output_info = lv_ssf_output
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.
But it is not passing otfdata and it is returning 1 in sy-subrc.
Please help me to solve this issue.I m not using any image.
I have checked through debug and the function module is not transfering any file to OTF table.
Please suggest me..
Edited by: zakirriyaz on Nov 4, 2011 9:47 AM -
Calling Smartform in WD application?
Hi,
Is it possible to call Smartform in WD application?
ThanksYes it is. Check out the thread [Displaying Smartforms in Webdynpro ABAP |Re: Displaying Smartforms in Webdynpro ABAP; and check the code as Vikrant Trivedi suggested.
Also check the SAP document [How to Display a Smartform as PDF document in Web Dynpro for ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785].
Hope it helps. -
How to avoid Priner prompt while calling smartform
Hi All,
I am calling smartform FM from my program. I am passing following settings in Output-Options and Control-Parameters:
wa_outputoptions-tddest = 'LP01'. "Printer name
wa_outputoptions-tdnewid = 'X'. "New request
wa_controlpara-device = 'PRINTER'. "Device
wa_controlpara-no_dialog = 'X'. "No dialog
Even after these settings I am getting prompt which asks printer name and other details.
Please tell me how I can avoid the prompt which asks printer name and other settings such as new spool request and print immediately.
Thanks in Advance.
Regards,
Vijayhi,
try this....
DATA : control TYPE ssfctrlop.
control-no_dialog = ''.
control-preview = ''.
control-no_open = 'X'.
control-no_close = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
USER_SETTINGS = 'X'
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
OUTPUT_OPTIONS =
control_parameters =<b> control</b>
IMPORTING
JOB_OUTPUT_OPTIONS =
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. -
Smartform or BSP HTML Emails in Outlook 2007
Hello,
we create different HTML e-mails based on smartforms or BSP. Everything looks as it should with <b>Outlook 2003</b>. But if you send the same mails to user with <b>Outlook 2007</b>, no formats, boxes and colors are visible anymore.
Does anyone has an idea what we could do to make it suitable for Outlook 2003 and 2007?
Thank you in advance,
HeikoThere isn't a very good solution unless there are some recent updates. I've answered on this before. In 2007, Microsoft chanegd the HTML rendering engine to Word. There is very limited support for HTML and CSS in Word's engine. You can Google it or go to MSDN to read more about it. I haven't looked for a better solution because 99% of our user community is still using 2003 though that will change soon. We're actually considering dumping Microsoft altogether and switching to Google Apps.
-
How to avoid printer name prompt while calling Smartform
Hi All,
I am calling smartform FM from my program. I am passing following settings in Output-Options and Control-Parameters:
wa_outputoptions-tddest = 'LP01'. "Printer name
wa_outputoptions-tdnewid = 'X'. "New request
wa_controlpara-device = 'PRINTER'. "Device
wa_controlpara-no_dialog = 'X'. "No dialog
Even after these settings I am getting prompt which asks printer name and other details.
Please tell me how I can avoid the prompt which asks printer name and other settings such as new spool request and print immediately.
Thanks in Advance.
Regards,
VijayHi Vijay,
Try like this.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
<b> control_parameters = wa_controlpara</b>
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
<b>output_options = wa_outputoptions
user_settings = space</b>
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = tab_otf_data
JOB_OUTPUT_OPTIONS =
TABLES
it_tab = itab[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
Regards,
SP.
Maybe you are looking for
-
MBP retina slow booting after repartitioning and cloning OS X
I bought a Macbook Pro retina 15" (512/16GB) few days back. OS : Mountain Lion 10.8.4 I wanted to partition the SSD to have Windows 7 in Boor Camp (120 GB), then a partition with ExFAT (260 GB) for shared data between Mac and Windows and lastly Mac H
-
Hi Everybody, I have a few questions on XI, I am new to XI 1)what is PRODUCT?why we wil create PRODUCT?use of product? 2)what is technical system and business system?diference between the two?use of tech system and bus system? 3)for a product y we ar
-
Using DW 8.0.2 & FW 8.0.0.777 and trying to create a photo album. Created several in the past with notproblems. Now I get the following: While executng onClick in Create Web Photo Album2.htm the following JavaScript error(s) occurred: At line 1626 of
-
It all started with Itune issues...
First Itune kept shutting down when opening. Then I began having issues opening certain files. Now iphoto is having trouble. When I try to access material from my computer to put on the web it only allows for me to use the keyboard arrows and won't a
-
Determining the state of an LDAP connection
Hi all, I'm in a situation where I need to determine the state of an existing LDAP connection. The code is called from Java servlets / JSP's, and we're having a problem where the client mysteriously disconnects. The stack trace points to: 04/10/04 10