Reading Filename of a attachment
Hi everyone,
in the QM03 Transaction I can place some file attachments to the Object. In the attachment window are the attachments listed and with a doubleclick the documents will be opened. So far so good.
I can read some informations about the attachments with the CALL METHOD cl_binary_relation=>read_links and with the 'SWL_GET_OBJECT_INFORMATION'
function I can read some Information's about the attachments to the object, but not the filename of the attachment.
How can I get the filename of the attachment?
Thx in advance.
Regards Ralf.
these methods sounds good,the question is, which value have these parameters.
(Classname,client, object_key).
CALL METHOD cl_bds_document_set=>get_info
EXPORTING
logical_system =
<b> classname =
classtype =</b>
client =
<b>* object_key =</b>
check_state = ' '
IMPORTING
connections =
extended_components =
CHANGING
components =
signature =
EXCEPTIONS
nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6
others
Similar Messages
-
Read filename of email attachment for sender mail adapter
Hi All,
We have a requirement to read filename of email attachment received from Sender email adapter and send details to SAP by Proxy call.
Can we retrieve the filename of email attachment ?
Any help on this will be really useful.
Regards,
AshishHi,
>>>Can we retrieve the filename of email attachment ?
Please see the below link, it might be useful to you.
http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
Regards,
P.Rajesh -
Extract the uri filename of an attached file
Hi,
I am attaching a file by the click of a button. It is required to retrieve the filename of the attachment as a Text/ label.
can anybody help me out on these lines.
PrashAs documented in Converting Acrobat® JavaScript for Use in LiveCycle Designer Forms:
"All Acrobat Annot properties and methods can be used in LiveCycle Designer forms.
"Note: Only Static forms support the annotation layer; Dynamic forms do not."
You will need to know the number of the annotation on the page and then you can use the "contents" property to obtain the name of the file. -
I can no longer open excel documents in my doc to go app. Error message simple reads can not open attachment. And the attachment is now a winmail.dat
winmail.dat files usually mean the email has been sent in rich text format - you could either the person who sent it to send it in a different format e.g. plain text or HTML, or there are a few apps in the store that support it (search for winmail.date in the store).
winmail.dat files : http://support.apple.com/kb/TS1506 -
How to get filename from mail attachment
Hi all,
I have a XI scenario Mail->XI->RFC. I have created my own adapter module which handle all attachments from incoming mail.
Everything work fine, but in my module I try to get information about filename of mail attachment. I use getContentType() metod to get the filename but this method return only the mimetype of the document. The getDescription() method return olny string "mail attachment". I need to get the original filename of the attachment or at least the file extension.
Is it possible to get the whole filename from mail attachment?
Thanks
PeterHi,
You can tryout with adapter modules . You can make use of following Adapter attributes also -
http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm
Similar discussion-
Email attachment file names
PayloadSwapBean-
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Regards,
Moorthy -
Read Filename form Adapter-Specific Message Attributes in Java Mapping
Hi,
I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
in java mapping.
Thank you and Best regards
FernandHello Fernand,
Are u using DOM or SAX parser?
In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
Just put this code in ur java mapping
As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
public class YourClass implements StreamTransformation
private Map map;
public void setParameter(Map param)
map = param;
public void execute(InputStream in, OutputStream out) throws StreamTransformationException
DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// read value
File = conf.get(KEY_FILENAME);
Now just call File in the mapping program,
Should help u out
Regards,
Tauseef -
How to read/get the document attached to PO line item
Hi experts,
I got a requirement wherein I need to read/get the document attached at PO line item and to send that document through mail as an attacment .
please suggest me how to proceed on this.actually your are picking up the correct data from Table EKET (EKET-EINDT) but your are printing that in item data loop for EKET might have already executed in your script and the header of that internal table consist the last entry of the table so for that. Fetch the delivery date explicite from the Table EKET when your in item level processing and print that.
For Example u can use this code.
To print you have write the this code in Script item level printing window "MAIN" window
Following perform is called to get the line item delivery date in PO
{/: PERFORM GET_DEL_DATE IN PROGRAM ZPerform_prog
/: USING &EKPO-EBELN&
/: USING &EKPO-EBELP&
/: CHANGING &DEL_DATE&
/: ENDPERFORM}
{* Dellivery date &DEL_DATE& }
write the below code in the Z program "ZPerform_prog"
{ FORM get_del_date TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
READ TABLE in_par WITH KEY 'EKPO-EBELN'.
CHECK sy-subrc = 0.
$_po_no = in_par-value.
READ TABLE in_par WITH KEY 'EKPO-EBELP'.
CHECK sy-subrc = 0.
$_po_line = in_par-value.
SELECT *
FROM eket UP TO 1 ROWS WHERE ebeln EQ $_po_no AND ebelp EQ $_po_line.
$_del_date = eket-eindt.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = eket-eindt
IMPORTING
date_external = $_del_date
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
READ TABLE out_par WITH KEY 'DEL_DATE'.
CHECK sy-subrc EQ 0.
out_par-value = $_del_date.
MODIFY out_par
INDEX sy-tabix.
CLEAR : $_po_no , $_po_line ,$_del_date.
ENDSELECT.
ENDFORM. "GET_DEL_DATE } -
How to read Filename using FileAdapter
I am trying to write some xml files using FileAdapter of SOA11g. For that I have created synchronous BPEL process.
My xyz.jca file looks something like this:
<endpoint-interaction portType="Write_ptt" operation="Write">
<interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
<property name="PhysicalDirectory" value="/mnt/vol_ora_SOADEV1_apps_01/DevCsvFiles/Inventory"/>
<property name="Append" value="false"/>
<property name="FileNamingConvention" value="FileTemp%SEQ%.txt"/>
<property name="NumberMessages" value="1"/>
</interaction-spec>
</endpoint-interaction>
Now the problem is I want to know the filename which is just being written by this Adapter. I want to use that filename later in my code.
I tried using filename property in invove activity, but I am unable to read filename after its written to disk.Got right way to do it. Create one variable eg varFileName, assign some value eg. "Filenamexyz.ext" and refer to that variable (set properties of invoke activity jca.file.filename as varFileName and type 'Input')in Invoke activity invoking read adapter .
-
Reading filenames with characters other than a-z
Hi!
My problem is that I'm writing very simple integration that only transfers files around. Problem is that some directories and filenames have for example scandinavien characters.
Examples:
D:\lähtevä\lähtö.xml
Problem is that when I read files/directories via following code while in the D:\lähtevä folder:
File dir = new File(fname);
String[] chld = dir.list();
if(chld == null){
System.out.println("Specified directory does not exist or is not a directory.");
System.exit(0);
}else{
for(int i = 0; i < chld.length; i++){
String fileName = chld;
System.out.println(fileName);
variable "fname" would be "." given from command line when application starts up.
Result is that all "ä" letters become "Σ" characters. Other scandinavian letters are also messed up. I'm running on windows machine.
What is the correct way to read filenames so that their country-specific characters are not messed up?Will this small test run correctly on your machine?
public class ReadingFilesWithNonASCIINames {
public static void main(String[] args) {
String dirPath = "E:/lähtevä";
String fName = "lähtö.txt";
File directory = new File(dirPath);
assert directory.exists();
File file = new File(directory, fName);
assert file.exists();
//Now try to read it
try {
FileReader reader = new FileReader(file);
int c;
while((c = reader.read()) != -1) {
System.out.print((char)c);
} catch (IOException e) {
e.printStackTrace();
}Compile it and run it with -ea flag. On my machine it ran without any problems (Windows XP, BE/fr locale, default encoding for files: System default -- windows-1252) -
Garbled FileName of email attachment
I am trying to send one email with attachment whose filename is in Japanese. Every character in subject, body of the mail is in Japanese and it is coming in mail very correctly. But the filename which also in Japanese is coming as garbled characters. I even tried to open this mail on windows Japanese OS box with Japanese MS outlook, but the problem still remain.
I am using JSP and Jrun as app server which are on English OS box. I even tried doing same steps on Japanese OS box, but still the result is same. Please help me.Hi,
>>>Can we retrieve the filename of email attachment ?
Please see the below link, it might be useful to you.
http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
Regards,
P.Rajesh -
Javac can't read filename.java
Hi
my problem is that javac can't read filename.java
i have saved the source code as filename.java under text document file type and i kept the capitalization the same for the[i] filename and classname but i am still having this error message: "error : can't read : filename.java" .
does that have anything to do with windows xp that i am using or there is absolutely something else that prevents javac from reading and compiling the file?
please help
Kind regards
NourThe only 2 reasons that I can figure out why you are getting this error is either because your java file has not been properly named ie. filename.java or else then it is not in the same location ie directory from where you are trying to run your compiler.
Thus you need to run the compiler from the directory that contains your java source file so it really does'nt matter where you have saved your java file on the machine as long as your path is set to your j2sdk /bin Just cd your way to that directory where you have the java file and run the compiler javac -
PC Users cannot read the JPG images attached to my emails
Several users of PC's, running Vista or Win 7, have difficulties to read the JPG images attached to my emails. All they see is an endless list of numbers and signs (in fact the binary data of the image).
The problem can only be solved by zipping the images.
is this due to a setup option in MAIL, or do you know how to solve this issue?
PatrickIf I had to guess, I would bet that your images do not have a ".jpg" or ".jpeg" extension on the end. This is how PCs identify the file - and Macs, too, these days, unfortunately. You also should make sure that Edit -> Attachments -> Always Send Windows-Friendly Attachments is checked.
-
How can we read filenames from a specific folder
Hi forum,
I have a situation that, there are several files coming daily in a specific folder.
I want to read filenames from that folder and want to get that filename in a variable.
That filename contains account nos. which I need for further processing.
Now, how can we read filenames from a specific folder with using Oracle PL/SQL Procedure?
Please suggest.
Thanks & regards,
KiranIf you are on 10g (not sure which exact release I'm afraid) you might look at Chris Poole's XUTL_FINDFILES that lists the files in a directory using PL/SQL and DBMS_BACKUP_RESTORE.SEARCHFILES (all a bit undocumented as it seems to be provided as part of rman).
The conventional (i.e. supported) approach is to use a Java stored procedure - there is an example on AskTom.
Message was edited by:
William Robertson -
Fail read filename from attachment in multipart message
Hi,
I use Javamail 1.4 for reading mail from imap server.
Sometimes i have received mail with this header (this mail was produced with thunderbird):
--------------040307090809070400040607
Content-Type: application/pdf;
name*0="20060908 - DOCUMENT.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename*0="20060908 - DOCUMENT.pdf"
When i use the method part.getFileName() the result is null.
Why?
Thanks all.Interesting. What version of Thunderbird?
These headers are using a feature of RFC 2231 that allows
a parameter in a header to be split over multiple lines.
In this particular case, there's no need to use this feature
since clearly these parameters are short enough to fit on
one line.
While JavaMail supports part of RFC 2231 - the part that
allows parameters to be encoded - it doesn't support this
aspect of RFC 2231.
I would suggest reporting this as a "bug" in Thunderbird, that
it's gratuitously using this new feature in cases where it's not
needed, and thus reducing interoperability with other mailers
that don't support this feature. -
Filename of a attachment: *.csv XML IDOC
Hi folks,
our scenario is:
1. are receiving mails with a csv file as an attachment
2. we use a senderChannel with the Mail adapter to get the mails
3. we swap the mail content with the attachment with localejbs/AF_Modules/PayloadSwapBean
4. we transform the "attachment" to XML with
localejbs/sap.com/com.contentmaster.CMTransformModule/CMTransformBean
5. we use the mail adapter
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
My question:
We need the filename in SAP but I have no idea how I can get the filename after the swap. Is it possible to get the filename and how can I integrate the filename into the XML or IDOC?
Andreas SolfHello again,
still searching for a solution.
The payload data are:
Content-ID: <[email protected]>
Content-Type: application/octet-stream;name="filename.csv"
Content-Disposition: attachment;filename="MailAttachment-1.bin"
Content-Description: MailAttachment-1
<?xml version="1.0" encoding="UTF-8"?>
How can I get the filename out of the headerdata to include it into the XML.
Cheers Andreas
P.S. I start my first steps in XI and I'm not a XI professional. So please send me a step by step solution.
Maybe you are looking for
-
Is it possible to use Boot Camp to install Windows on an external HD?
So I don't use up space on my internal hard drive, would it be possible to use Boot Camp to install Windows to an external hard drive?
-
Looking to create editable PDF forms with drop downs and text boxes for use on a Mac computer and iPad. Which product do I need to purchase? Do not need anything fancy
-
Acrobat X Global Form Field Settings
Good day - Is there a way in Acrobat X to globally set font face and size for all fields in a form? My objective: > take template which had a form with 50 filelds > globally set font face and size It is a real pain in the neck having to do each one f
-
I need to know when to sell the new Ipad 3.
I need to know when to sell the new Ipad 3 ?
-
my ipod touch recently cracked the screen is not very broken, I'm from Brazil and bought my ipod touch in Miami want to know where I can fix it there in the united states? And how much it would cost?