Uplaod Adobe form from application server
I've a requirement where the Adobe interactive from files will be located in the application server directory and need to be uploaded from there.
I'm using "open data set... in binary mode" comment to open the file and then read it and store in the lt_rawtab table. But I'm not sure how to get the length of the file (which you can get when you're uploading the file from front end/local disk using the method cl_gui_frontend_services=>gui_upload).
If you have address this kind scenario please share how did you upload the Adobe from application server?
Hi Anto,
In fact my problem was due to l_len parameter when calling the function 'SCMS_BINARY_TO_XSTRING' to convert bin pdf document to Xstring type.
I was not sure what value should I pass to input_length parameter.
Then, I saw in some post that the length should be no of lines in lt_rawtab * 255 and that resolved my issue.
I'm having another issue though. When I open the Adobe form, it says "message limit exceeded"... any idea how to fix this?
Similar Messages
-
Picking of Adobe forms from application server
Hi Gurus
We have SAP ECC 6.0. So far in our system we have text files and CSV excel files which comes from external system and lies in application sever and these are being picked up automatically by system and gets processed in SAP.
1)The requirement is to "pick the adobe forms from application server and read some fields in the form and update the fields (required) in customer master data in SAP". How can we achieve this?
Any kind of help is appreciated.
Thanks
AleemHi Aleem,
I tried to work on a similar scenario couple of months back. But it was not successful. Will you please let me know if you get any solution???
Thanks in advance
Poornima -
Retrieving PDF form from Application server
hi all,
i am saving a pdf form in application server and when the user wants the same file then i want to retrive that file from application and show the user and it should not be saved to presentation server only he should see it.
iam able to save it to presentation layer using gui_download but my requirement is not to save it show only display the form.
Thanks in advance,
Sree
helpful answers will be surely rewarded pointsHi,
1st solution - use DOI (desktop office integration). This way you can open Adobe, Microsoft, and others application documents directly in the SAP windows. See SAP document how to do it. It's not a little work, but it should fulfill your requirements.
2nd solution - share the folder with the PDF documents and then with shell command (start
server\folder\xxxxxx.pdf) at the front end access it and start the associated application at the frontend. I don't recommend this one, sharing folders at the appl.server is a security threat...
You know about the points and useful answers... -
Web DynPro - Save Adobe Form on Application Server
Hello Seniors,
We are working on a WebDynPro ABAP Application where in we need to display an Adobe from in a browser and the upload it to the Application Server automatically. We are able to display the form in the browser but are stuck up on how to upload the Adobe Form to the application server. Could you please let me know if there is a way on how to upload the Adobe form to the application server automatically. Your help is highly appreciated..
Thank you,
Srini M.Hi,
Duplicate Post,
Upload Adobe Form to Aplication Server from WebDynPro automatically
Cheers,
Kris. -
Fetching a image in the adobe form from sap server/appliaction layer
hi all,
i want to fetch a logo/image from the application layer/ sap server, so that everyone can use it in adobe form. i have already upload the image using SE78.
I try to add the image into library, it works. But the problem is that, only from my login i can access that image, other can't. I want that image to be shared by everybudy like we use in smartform.
But i want to fetch that image from SAP server/application layer.
plzz help me out...
and tell me the steps for fetching the image from sap server/application layer into the adobe form layout.Hi rahul,
I too have the same requirement. Can you please tell me the steps. -
Problem in uploading file from Application Server
Hi everyone,
i got a problem in uplaoding a file from application server.i am having two folder (one folder name is current and another one is processed)in application server. In current folder i am having N no of files.I want to upload all the files names into one internal table and i want to process one by one file.After processing each file the file should be moved to processed folder and the files should not exist in current folder.All these process must be done everyday.Please rectify my problem asap.Ramesh,
Take authorization from basis guy.
Use the below code to get the list of files from require directory
*& Report ZDIRFILES *
REPORT ZDIRFILES .
PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/tmp'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
*START-OF-SELECTION
START-OF-SELECTION.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.
Now in internal table "it_filedir" will have all your files.
For moving and deleting
report zrich_0001.
Parameters: d1 type localfile default '/usr/sap/TST/SYS/fld1/Data1.txt',
d2 type localfile default '/usr/sap/TST/SYS/fld2/Data1.txt'.
data: begin of itab occurs 0,
rec(20) type c,
end of itab.
data: wa(20) type c.
start-of-selection.
open dataset d1 for input in text mode.
if sy-subrc = 0.
do.
read dataset d1 into wa.
if sy-subrc <> 0.
exit.
endif.
itab-rec = wa.
append itab.
enddo.
endif.
close dataset d1.
open dataset d2 for output in text mode.
loop at itab.
transfer itab to d2.
endloop.
close dataset d2.
delete dataset d1.
Check below FM if required
To move the file to archive directoryuse FMs 'PFL_COPY_OS_FILE'
To Delete 'EPS_DELETE_FILE'.
Don't forgot to reward if useful -
Open documents/files from Application Server in forms 6i
Hello All,
Our requirement is to open files that are in Application server( We do not want to upload them into database).
Is there a way to open this files from forms 6i.
I am wondering how the "View Output" or View log button works on the concurrent program submission form. Its the doing the same thing i.e pulling the file from Application server and showing up.
Please let me know if anyone has any ideas on how to get this done.
Thanks
SunilI assume you are using Forms 6i in web mode here. Then it is just a URL to the file if you properly map to a directory where you store the files:
web.show_document('http://...../myfile.pdf');
But it also looks like you are using Oracle Apps, so might want to ask it in the e-Business Suite. -
Call standard adobe form from a WD application
Hi All,
I have a requirement of displaying a standard adobe form from a click of a button in a WDA portal,
I am an ECC developer and have no idea of WD. I created a function module which uses submit statement to invoke the driver program and displays the PDF output, but when this function module is invoked from the portal on the click of button it gives and error FP job open error.
I understand that displaying PDF wont work in this way on portal, so can anyone please guide me the correct procedure on how to achieve this.
I came across this thread
[Regarding adobe form using Webdynpro ABAP|Regarding adobe form using Webdynpro ABAP]
which mentions of feeding the complete PDF document to the UI element as an XSTRING context node bound to the pdfSource property, but the help link provided in the thread is not opening.
Thanks in advance.
Regards,
KartikHi karthick , creat a button in the view and assign a action to it .
inside that action eventhandeler method call the method for prepare_adobe _form for dislay PDF .
method ONACTIONSHOW_ADOBE_FORM .
data : l_pdfstring type xstring.
" Select for print
wd_this->prepare_adobe_forms( importing p_pdf = l_pdfstring ). " coding is given below
" Call print
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'adobe_form.pdf'
i_content = l_pdfstring
i_mime_type = 'application/pdf'
i_in_new_window = abap_false
i_inplace = abap_false ).
endmethod.
prepare PDF
method prepare_adobe_forms.
data: lv_funcname type funcname.
data: ls_outputparams type sfpoutputparams.
data: ls_formoutput type fpformoutput.
call function 'FP_FUNCTION_MODULE_NAME'
exporting
i_name = 'FP_TEST_DATE'
importing
e_funcname = lv_funcname.
ls_outputparamsu2010nodialog = 'X'. " suppress printer dialog popup
ls_outputparamsu2010getpdf = 'X'. " launch print preview
call function 'FP_JOB_OPEN'
changing
ie_outputparams = ls_outputparams
exceptions
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
others = 5.
call function lv_funcname
* exporting
* /1bcdwb/docparams = fp_docparams
importing
/1bcdwb/formoutput = ls_formoutput
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
call function 'FP_JOB_CLOSE'
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
p_pdf = ls_formoutputu2010pdf.
endmethod .
Regards
Chinnaiya P -
Problem with pdf display downloaded from application server
Hi all,
I have a problem with displaying pdf downloaded from application server (saved in BINARY MODE).
I am getting the pdf output of adobe form in FPFORMOUTPUT-PDF as rawstring back to my program and then converting that rawstring into binary form using the function module SCMS_BINARY_TO_STRING.
Now, when I export the data to presentation server directly using cl_gui_frontend_services=>gui_download, the pdf is downloaded properly.
However, when I save the data to application server file by looping at the internal table obtained from SCMS_XSTRING_TO_BINARY and using TRANSFER, and subsequently downloading the file in "unconverted format" from AL11 to my desktop, I am getting a "blank" pdf file (with the same number of pages as the one downloaded using gui_download).
I have tried different encodings during download but in those cases i get corrupted pdf message. only the default option of INTIAL value seems to work.
I am forced to believe that there is a problem in my code which saves the data to app server but I cant find any solution that is logical. Any solution to this would be greatly appreciated.
Regards,
Sasi
Edited by: Sasi Upadrasta on Sep 29, 2010 7:55 PMused a program to read the file from appl server and then downloading it to desktop.
-
How to delete file from application server(Unix)
Hi All,
Using the below code downloading a file from application server(Unix) to client machine. I want to delete the file from application server once it is downloaded to client
We work on Forms 11.1.1.4.0 and Oracle DB 10g. Client machine are Windows 7.
BEGIN
IF webutil_file_transfer.AS_to_Client
(clientFile => Name_In('global.g_file_name')
,serverFile => ls_AppServer_Loc)THEN
message('Data exported Successfully');
ELSE
message('File download from Application Server failed');
END IF;
EXCEPTION
WHEN OTHERS THEN
message('File download failed: '||SUBSTR(sqlerrm,1,200));
END;
I have search for solution on OTN. Few suggested to use HOST.
Can any one help me how to use Host() built_in to delete the file.
Thanks,
MaddyCan any one help me how to use Host() built_in to delete the file.
Host('/bin/rm <complete file path>'); -
How to upload data from application server
Hi,
please help me out in uploading the data from application server which is a tab delemited file into an internal table.
Thanks
kumarhi,
Use this sample code as an example.
table declaration
tables: mara.
*data declaration
data: begin of it_lfa1 occurs 0,
vendor like lfa1-lifnr,
land1 like lfa1-land1,
name1 like lfa1-name1,
ort01 like lfa1-ort01,
end of it_lfa1.
selection screen
selection-screen: begin of block b1 with frame.
parameters: p_file type rlgrap-filename obligatory.
selection-screen: end of block b1.
at selection screen
at selection-screen on value-request for p_file.
*& start-of-selection
start-of-selection.
perform transfer_file using p_file.
perform write.
*& Form transfer_file
text
-->P_P_FILE text
form transfer_file using p_p_file.
data: l_message(30) type c.
***opening dataset for reading
open dataset p_p_file for input in text mode encoding default message
l_message.
if sy-subrc ne 0.
message i001(zerr2) with p_p_file.
endif.
*******transferring data from file to app server.
do.
read dataset p_p_file into it_lfa1.
if sy-subrc = 0.
append it_lfa1.
clear it_lfa1.
else.
exit.
endif.
enddo.
*******closing dataset
close dataset p_p_file.
endform. " transfer_file
*& Form write
text
--> p1 text
<-- p2 text
form write .
loop at it_lfa1.
write:/ it_lfa1-vendor,
it_lfa1-land1,
it_lfa1-name1,
it_lfa1-ort01.
endloop.
endform. " write
Thanks
Aneesh. -
How to Upload Smartforms from Application Server
Hi Guys,
I have to upload the SMARTFORMS in to the System.That can be done as follows:
1- Tcode - Smartforms
2- Utilities -> Upload form
3- Give form Name
4- Give path of Form on presentation server and upload.
But I have to give the path of Form from the Application Server. As i have all the forms to be uploaed in New system on the Application Server.
I will be writing the program to program to read XML file(smartform) from application server to internal table and then upload it in the System.
Please let me know if it is possible to upload Smartforms from Application Server?
Regards
SandeepVinod,
Thanks for the reply.
But Actually I want to Automate this process of Uploading the Smartforms.
So I want to directly upload it from Application server.
As it is not possible to upload the Smartforms from Presentation Server Automatically.
In this human Intervention will be required. -
How to upload file from Application Server?
Dear Friends,
How to upload file from Application Server?
Plz. with example...
Regards,
Dharmeshhi,
check the code for upload from application server.
tables: kna1.
types: begin of s_file,
customer type kna1-kunnr,
country type kna1-land1,
name type kna1-name1,
region type kna1-regio,
end of s_file.
*--Internal tables
data: it_file type s_file occurs 0 with header line.
*-- Selection screen
selection-screen: begin of block b1 with frame title text-001.
parameter: p_file type rlgrap-filename default 'C:/customer.txt'
obligatory.
selection-screen: end of block b1.
*-- At selection screen
at selection-screen on value-request for p_file.
perform file_help using p_file.
*-- Process File
start-of-selection.
perform upload_file using p_file.
*-- write File data to o/p
end-of-selection.
perform write_data.
*& Form file_help
form file_help using p_p_file.
data: l_filepath type ibipparms-path.
call function 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
importing
file_name = l_filepath
p_p_file = l_filepath.
endform. " file_help
*& Form upload_file
form upload_file using p_p_file.
call function 'WS_UPLOAD'
exporting
filename = p_p_file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = it_file
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 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 i001.
endif.
endform. " upload_file
*& Form write_data
form write_data .
loop at it_file.
write:/ it_file-customer, it_file-country, it_file-name,
it_file-region.
endloop.
endform.
regards,
keerthi. -
How to bring the data from application server to presentation server
hi,
i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this topic.folowing is the code .
*& Report ZPFA_HIER_LOAD
REPORT ZFPA_HIER_LOAD.
*---- Declaration of Oracle connectioN
DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
DATA : mfilename type string.
data: begin of matab1 occurs 0,
MFL1(9) TYPE C,
MFL2(5) TYPE C,
MFL3(9) TYPE C,
MFL4(2) TYPE C,
MFL5(8) TYPE C ,
end of matab1 .
data: setid(8) type c.
data: begin of source occurs 0,
setid(8) type c,
end of source.
*PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
*PARAMETERS : m_bsenty(8). " type c obligatory.
*mfilename = P_PFILE.
EXEC SQL.
SET CONNECTION :con_name
ENDEXEC.
EXEC SQL.
CONNECT TO :con_name
ENDEXEC.
EXEC SQL PERFORMING get_source.
SELECT set_id FROM UNIT_SET INTO
:setid
ORDER BY SET_ID
ENDEXEC.
start-of-selection.
LOOP AT SOURCE.
REFRESH matab1. CLEAR matab1.
EXEC SQL PERFORMING evaluate.
SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
:MFL5
where set_id = :SOURCE-SETID ORDER BY MEM_ID
ENDEXEC.
if SOURCE-SETID = '80000000'.
mfilename = '/tmp/aesorg'.
elseif SOURCE-SETID = '80000006'.
mfilename = '/tmp/Consolidation_Manager'.
elseif SOURCE-SETID = '80000010'.
mfilename = '/tmp/10org'.
elseif SOURCE-SETID = '80000012'.
mfilename = '/tmp/20org'.
elseif SOURCE-SETID = '80000018'.
mfilename = '/tmp/30org'.
elseif SOURCE-SETID = '80000025'.
mfilename = '/tmp/40org'.
Endif.
mfilename = '/usr/test.dat'.
************************This was i tried***********************
open dataset mfilename for output in text mode encoding default." IN
*TEXT MODE ENCODING DEFAULT.
if sy-subrc <> 0.
exit.
endif.
close dataset mfilename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = MFILENAME
FILETYPE = 'ASC'
TABLES
data_tab = matab1
EXCEPTIONS
file_write_error = 1
invalid_type = 2
no_authority = 3
unknown_error = 4
OTHERS = 10.
loop at matab1 .
transfer matab1 to mfilename.
endloop.
clear matab1.
ENDLOOP.
loop at matab1 .
transfer matab1 to mfilename.
endloop.
close dataset mfilename.
MFL5 = '0'.
CLEAR MFL5.
FORM evaluate.
if MFL5 = -1.
MFL5 = ''.
ENDIF.
concatenate MFL1 ',' into MFL1.
concatenate MFL1 ',' into MFL3.
matab1-MFL1 = MFL1.
matab1-MFL2 = 'ZBUE,'.
matab1-MFL3 = MFL3.
matab1-MFL4 = ' ,'.
matab1-MFL5 = MFL5.
append matab1 .
CLEAR MFL1.
CLEAR MFL2.
CLEAR MFL3.
CLEAR MFL4.
CLEAR MFL5.
ENDFORM.
"evaluate
*& Form GET_SOURCE
text
FORM GET_SOURCE.
source-setid = setid.
append source.
clear source.
ENDFORM. "GET_SOURCEHi Rammohan,
You cannot use OPEN DATASET to transfer data from application server to presentation server.
You can do the following :
<b>Do 1st point in BACKGROUND</b>
1. Read the data file from application server into an internal table using OPEN DATASET
<b>Do 2nd point in Foreground</b>
2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
Best regards,
Prashant -
Fetching of multiple files from Application Server into SAP Program
Hi All,
I have a issue related <b>Fetching of multiple files from Application Server into SAP Program</b>.
Actual issue is as below.
In the <b>selection screen</b> of <b>my program</b> i will give <b>Application Server Path</b> as :
<b>/PW/DATA/SAP/D1S/PP/DOWN/eppi0720*</b>
Then the based on above input it should pick up all the files that are matching <b>eppi0720*</b> criteria.
Suppose if i am having <b>5</b> files with above scenario, i have to fetch all those <b>5</b> files at a time and place in my SAP Program.
All those 5 file's data should come into SAP at a time.
Can anybody tell me how can we solve above issue.
If any body has come across same issue please provide me with solution.
Thanks in advance.
Thanks & Regards,
Rayeez.If you want to get around the authorization check, you can do something like this.
report zrich_0001 .
parameters: p_path type epsf-epsdirnam
default '/usr/sap/TST/SYS/global'.
parameters: p_file type epsf-epsfilnam default 'CO*'.
start-of-selection.
perform get_file_list.
* FORM get_file_list *
form get_file_list.
types: name_of_dir(1024) type c,
name_of_file(260) type c,
name_of_path(1285) type c.
data: begin of file_list occurs 100,
dirname type name_of_dir, " name of directory. (possibly
" truncated.)
name type name_of_file, " name of entry. (possibly
" truncated.)
type(10) type c, " type of entry.
len(8) type p, " length in bytes.
owner(8) type c, " owner of the entry.
mtime(6) type p, " last modification date, seconds since 1970
mode(9) type c, " like "rwx-r-x--x": protection mode.
useable(1) type c,
subrc(4) type c,
errno(3) type c,
errmsg(40) type c,
mod_date type d,
mod_time(8) type c, " hh:mm:ss
seen(1) type c,
changed(1) type c,
end of file_list.
data: begin of file,
dirname type name_of_dir, " name of directory. (possibly
" truncated.)
name type name_of_file, " name of entry. (possibly
" truncated.)
type(10) type c, " type of entry.
len(8) type p, " length in bytes.
owner(8) type c, " owner of the entry.
mtime(6) type p, " last modification date, seconds since 1970
mode(9) type c, " like "rwx-r-x--x": protection mode.
useable(1) type c,
subrc(4) type c,
errno(3) type c,
errmsg(40) type c,
mod_date type d,
mod_time(8) type c, " hh:mm:ss
seen(1) type c,
changed(1) type c,
end of file.
call 'C_DIR_READ_FINISH' " just to be sure
id 'ERRNO' field file_list-errno
id 'ERRMSG' field file_list-errmsg.
call 'C_DIR_READ_START' id 'DIR' field p_path
id 'FILE' field p_file
id 'ERRNO' field file-errno
id 'ERRMSG' field file-errmsg.
if sy-subrc <> 0.
sy-subrc = 4.
exit.
endif.
* Read the file list and add to internal table.
do.
clear file.
call 'C_DIR_READ_NEXT'
id 'TYPE' field file-type
id 'NAME' field file-name
id 'LEN' field file-len
id 'OWNER' field file-owner
id 'MTIME' field file-mtime
id 'MODE' field file-mode
id 'ERRNO' field file-errno
id 'ERRMSG' field file-errmsg.
if sy-subrc = 1.
exit.
endif.
append file to file_list.
enddo.
* Write out the file list
loop at file_list.
write:/ file_list-name.
endloop.
endform.
Regards,
Rich Heilman
Maybe you are looking for
-
I receive the message "Error: Failed to register" at the end of attempting to reinstall Adobe Flash Player 11.5.502.135 (after a complete uninstall of all Adobe programs) on my older machine running Windows XP and the older browser IE 7. I have t
-
When I close CS6 changes in settings are not saved. Reverts to default settings on reopen. Why?
-
Hello, I cannot find any information about songs from iTMS if whether or not they are recorded for 5.1 Surround Sound. Can anyone enlighten me? Thank You.
-
Hi All, I have developed set of new pages in OAF. For my pages i need to give the help documentation. I have seen the seeded pages and developer guide also. There i found that we have to set "Help Target" for our pages to set our help document. I hav
-
Hi friends, As a part of BIAPPS-ODI configuration, @ the step of Applying FMW patches biappshiphome patches is getting failed like in the final patching report im getting error like ----------START OF PATCHING REPORT------------------ * BIAPPSSHIPHOM