I want to upload files in sap-directories using webdynpro abap.
My requirement is i need to read the filess from the local system in a folder and save those files in the sap directories(AL11).Need help .
Thanks.
Hi Dear,
U have to use File upload UI element , then read the file then follow the code for transfering into SAP directories:
check this
*Declare T_UPLOAD , W_UPLOAD itab and wa with your file heading structure
DATA:L_LINE TYPE STRING.
P_FLNAME = 'Test123'. " file name
OPEN DATASET P_FLNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
CHECK SY-SUBRC = 0.
LOOP AT T_UPLOAD INTO W_UPLOAD.
CONCATENATE W_UPLOAD-Field1
W_UPLOAD-Field2
W_UPLOAD-Field3
W_UPLOAD-Field4
W_UPLOAD-Field5
INTO L_LINE
SEPARATED BY ','.
TRANSFER L_LINE TO P_FLNAME.
ENDLOOP.
CLOSE DATASET P_FLNAME.
I think it may help u a lot..
Regards
Aisurya
Similar Messages
-
Uploading files to KM repository using Webdynpro APIs
Hi All,
I was reading the following blog /people/rohit.radhakrishnan/blog/2005/05/27/uploading-files-to-km-repository-using-webdynpro-apis and I was trying to upload a document from a URL for example http:/ntek.com.mx/wp-content/uploads/2008/12/sap_logo1.gif
So far I am getting the following error:
http:/ntek.com.mx/wp-content/uploads/2008/12/sap_logo1.gif (No such file or directory (errno:2))
Any Ideas?
Regards,
Orlando CovaultHi Jay,
So far I think I followed all the intructions given in the links you provide. This is the snipped code
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try {
String path = "/documents";
IResourceContext resourceContext = buildResourceContext();
// get a resource factory
IResourceFactory resourceFactory = ResourceFactory.getInstance();
// Get a RID from the current path to display the according content
RID pathRID = RID.getRID(path);
// Get a Iresource object to work on
ICollection folder =
(ICollection) resourceFactory.getResource(
pathRID,
resourceContext);
String templateUrl =
WDURLGenerator.getResourcePath(
wdComponentAPI.getDeployableObjectPart(),
"PositionModPDFView_InteractiveForm.xdp");
File file = new File(templateUrl);
FileInputStream template = new FileInputStream(file);
manager.reportWarning(template.toString());
if (template != null) {
template.read();
Content content = new Content(template, "byte", -1L);
manager.reportWarning(content.getContentType());
IResource newResource =
folder.createResource("sap_logo1.gif", null, content);
template.close();
}else{
manager.reportException("Documento Vacio",false);
} catch (ResourceException e) {
// TODO Auto-generated catch block
manager.reportException(e.getLocalizedMessage(), false);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
manager.reportException(e.getLocalizedMessage(), false);
} catch (IOException e) {
// TODO Auto-generated catch block
manager.reportException(e.getLocalizedMessage(), false);
} catch (ContentException e) {
// TODO Auto-generated catch block
manager.reportException(e.getLocalizedMessage(), false);
} catch (WDAliasResolvingException e) {
// TODO Auto-generated catch block
manager.reportException(e.getLocalizedMessage(), false);
But I am still getting the same error: http://ntek.com.mx/wp-content/uploads/2008/12/sap_logo1.gif(No such file or directory (errno:2)) . Any Idea of what could be wriong?
Regards,
Orlando Covault -
Uploading File into SAP Transaction using BSP
Hi Everybody,
I would like to know how to save the file into SAP Transaction thro BSP. I have one requirement,For example,the captured file from the web should be attached into the Equipment master (Transaction Code IE02).Its possible via SAP GUI.But i would like to know how it can be done from BSP.The same example applicable to sales order also..
Also i wondering where these files get stored.
Anybody could help me out of this issue please?...
Naga BokkisamYou can do that using BDS..But you need to find the Business object to store it under Equipment Master or Sales order.
Here is the example where i stored the document under Warranty process, ie sub set of Equipment master:
Here BUS2222 is business object for Warranty Process:
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = STR_FILE_CONTENT
TABLES
BINARY_TAB = I_FILE_CONTENT.
CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
EXPORTING
CLASSNAME = 'BUS2222' "classname_select
CLASSTYPE = 'BO'" classtype_select
CLIENT = SY-MANDT
OBJECT_KEY = OBJECT_KEY
BINARY_FLAG = 'X'
TABLES
SIGNATURE = I_SIGNATURE
COMPONENTS = I_COMPONENTS
CONTENT = I_FILE_CONTENT
EXCEPTIONS
NOTHING_FOUND = 1
PARAMETER_ERROR = 2
NOT_ALLOWED = 3
ERROR_KPRO = 4
INTERNAL_ERROR = 5
NOT_AUTHORIZED = 6
OTHERS = 7 .
Let me know if you need any detail..
<i>*Reward each useful answer</i>
Raja T -
Search Help from SAP values using WebDynpro ABAP in ADOBE Interactive Form
Hi,
How to populate search help on ADOBE interactive online form which is residing on a WebDynpro ABAP application?
Thanks & Regards,
Sandip amarHI,
Adobe from is integraated with R/3 just like smartform.
So if u use any DDIC tabel field which have inbuilt search help then it will automatically intergrated with Adobe form.
If not then u have to make at ztable via foreign key or via FM at program level.
Regards
ricky -
File upload in SAP BI using Webdynpro.
Hi,
I have requirement in Webdynpro, where I need to upload the data from file of type Tab delimited (*.txt) file from desktop. In ECC I know how to upload the file i.e., by using the Function module (FM) 'HR_KR_XSTRING_TO_STRING'. But in SAP BI the FM doesnu2019t exist.
Is there any way to upload TAB delimited (*.txt) file in SAP BI for Webdynpro ABAP.
Can we move or copy the package P99E from ECC to SAP BI.This package contains the above said Function module. If it is possible then please guide on this.
Edited by: SUNIL B SMG on Jan 27, 2012 3:19 PM
Edited by: SUNIL B SMG on Jan 27, 2012 3:22 PMHi,
iView:
<hbj:form encodingType="multipart/form-data" >
<hbj:fileUpload id="myfileupload" maxLength="125000" size="50" />
</hbj:form>
Action-Method:
public void onLoadFile(Event event) {
FileUpload fu = (FileUpload) this.getComponentByName("myfileupload");
// this is the temporary file
if (fu != null) {
// Output to the console to see size and UI.
System.out.println(fu.getSize());
System.out.println(fu.getUI());
// Get file parameters and write it to the console
IFileParam fileParam = fu.getFile();
System.out.println(fileParam);
// Get the temporary file name
File f = fileParam.getFile();
String fileName = fileParam.getFileName();
// Get the selected file name and write ti to the console
ivSelectedFileName = fu.getFile().getSelectedFileName();
System.out.println("selected filename: "+ivSelectedFileName);
Regards,
Gerhard -
How to upload pdf file to DataBase using webdynpro abap.
Hi Experts,
how can i upload a pdf file in document server using webdynpro abap and display the same pdf file on the view using webdynpro abap.
Please Provide requried information .
Thanks & Regards.
Bhushan.NB - the "data" that is returned by these classes is the data as defined in an adobe form - it doesn't return the content of non-form PDF documents.
The PDF must be an interactive form ( although that doesn't restrict you to using the SAP process for creating the form is my understanding - but I could be wrong. )
Edit - I was wrong! ONLY PDF documents that have been created by the ADS can have data extracted using these classes. So unless you are using Adobe interactive forms - then you will get no value from this functionality - and if you're using AIF then you're probably just use the standard UI element
Edited by: Chris Paine on Oct 26, 2010 6:04 PM -
Upload image using webdynpro abap
Gudday,
I have a requirement to provide three functionalities like
1)browse 2)upload 3)review the image using webdynpro ABAP.
I tried with functionn module 'ARCHIV_CREATE_DIALOG_META' which uploads images..but if i try to use the samething using service call in webdynpro ..it is throwing a dump..saying...'ARCHIV ID OF CLASS BASED NOT OCCURRED'
Please suggest me how to proceed further ....its high priority....
Awaiting your reply.
Thanks,
Deepthi.Hello Martina,
Could you solve this problem?
I need to upload documents in PA30 from Web Dynpro ABAP but the called funtions are not working. Could you please explain me how you resolved this?
Thanks you very mutch!
Regards
Belé -
T-code to upload mutliple files into SAP directories ?
Hi,
Is there any other transaction to upload multiple files into SAP directories ( ALL11) other than CG3Z ? Any other procedures at the operating system level ? Please advise.
Regards
ShivaI dont think so. But you can :
-- Ask your developer to create a BDC for this transaction to upload multiple files.
-- Use LSMW to record this transaction to upload multiple files.
Regards,
Jazz -
Down-/Upload files via Web Services using a NON-SAP system!?
Hello,
is it possible to down-/upload files via web services using a NON-SAP system!?
Regards,
JensHi Jens,
I am not sure about your requirement here. What i could understand is that you want to check whether service could handle file processing?
1) Uploading file - You can build a Webservice which has import/export parameters as the file structures and implement the proxy class in such a way that the passed data is written to application server.
2) Downloading file - Same as uploading file, but the proxy class would have the code to extract data from the application server and pass them as output parameter.
Functionality of Non SAP system: The system which calls these services should be able to convert the output of proxy data into file in case of downloading the file and it should be able to convert the file data into export parameters in case of uploading file.
Hope this helps.
Regards,
Prasanna -
I want read PDF file from SAP directory and create a spool request or print
Hi all,
I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body help me in this.
Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
Thanks in advance,
SunnyHi Sunny,
Check these links.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
http://www.erpgenie.com/sap/abap/pdf_creation.htm
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Hope this resolves your query.
Reward all the helpful answers.
Regards -
Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar
Hi All,
Check out the blog post 'Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar'
Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar
Regards
Prabaharanaplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
Which correspondents fine with the
device "hw:0,3"
in my mpd.conf alsa section.
Also sound worked fine withh this config before I started installing ffmpeg-svn and alikes
hokasch:
I tried changing the mixer to "Master" but that did not change much. -
Save file in multiple directories using receiver file adapter?
Hi,
Is it posible to save file in multiple directories using receiver file adapter?
Regards,
AshishWell, there is a round about way to do that -
The idea is to use multi mapping. 1:n mapping
1) Map ur message to 2 different record set nodes. Since you want to use the same file both the mapping will look exactly the same. make sure that the filepath and filename are a part of the output payload message
2) In the file adapter config. make sure the the file name and file path are from these payload fields. You can use a context object to refer these fields. Voila...the files are created in the 2 direcoties you mentioned.
of course the simplest way is to route the same message to 2 business systems/services and write them out using 2 ccs.,
Arvind R -
I want to take files from my PC (using a Seagate external hard drive) then plug this Seagate External hard drive into my Mac Book Pro and move the files from the Seagate External Hard drive onto my Time Capsule. I do not want to put these files on my Mac. How do I do this? Where do I put these files on my Time Capsule? Will it affect the functioning of my Time Capsule?
Mixing files with data is not always great idea.
See info here.
Q3 http://pondini.org/TM/Time_Capsule.html
Why not just connect the PC directly to the TC by ethernet and copy the files over?
It is hugely faster and much less mucking around.
In windows load the airport utility for windows.. if you have not already as this will help you access the drive.
There is more info here.
http://support.apple.com/kb/HT1331 -
How to upload a pdf file using webdynpro abap
Hi Experts,
I need to upload pdf files using webdynpro abap.my question is where to upload this files and how to upload this files, and how to display this pdf file.
Please Provide Requried Information.
Waiting for Reply.
Thanks & Regards.
Bhushan.Hi,
There is a UI element with the type 'File Upload'.
You can use that in your view.
For further details and coding, please refer to
[http://www.****************/Tutorials/WebDynproABAP/Upload/Page1.htm]
Hope this helps you.
Regards,
Dolly -
Send multiple files in different directories using Receiver File Adapter
Hi Experts,
I have one File to File without ESR scenario where I have to pick multiple files from different directories and to save them in different directories on receiver side.
Can anyne help me to send multiple files in different directories using receiver file adapter.
Is it possible??
Any help will be appreciated.
Regards,
Danishhi ,
that is possiable without esr,
we need to create one sender communication channel , in that we nend to use "adavnced selection for source file " for sending multiple files from multiple directories.
we need to create 'n' receiver communication channels and 'n' receiver agreements based on communication channels .
in receiver determination, provide multiple receivers
In interface determination , provide * symbol for receiver communication components
thanks,
Maybe you are looking for
-
Hi Experts, I want to compare two characteristics in bex. Is it possible to do in BEx ? If yes, how can i do it. If char A is equal to char B, display value of this key figure other wise display value of this key figure.
-
How to give inline-style for SelectItem??
Hi, Because of some business requirement, I have to change the look and feel of some of the select items of SelectOneChoice. But i didn't see any such attribute available for af:SelectItem. How can i do? Any way? Raghu
-
Hi abapers doubt in client dependent and independent
i am having a doubt could you please explain me i created a dependent table using mandt in client 100(development). if transfered this table to quality 110(quality). it is possible access data? when i see development 100 it's having data but i can't
-
Hi is it possible to see the photos on laptop from iphone without installing itune software. I am connection my iphone with laptop but not able to see the phots pls guide me how to do that?
-
Exporting a book to another Mac with iPhoto 6
Is there any way to move an iPhoto Photo Book off my computer to another that has the same iPhoto software? I need to continue working on it on my laptop while I travel. Anyone got any ideas? thanks!