Using mail payload to create target file directory
Hi Folks
I have a scenario where I need to get email attachments and place them in a folder structure based on text written in the subject field of the original payload.
My current setup is:
Sender:
Mail adapter using PayloadSwapBean module in order to get the attached .csv file in the mails.
Receiver:
Plain File adapter currently pointing to a specific destination.
I would like to use the Subject field from the original payload (MailMessage), but as I use the PayloadSwapBean, the payload is swapped to MailAttachment-1 in which I dont have subject information.
Now the question is: Is it possible to get this information and then use it in e.g Adapter Specific Message Attributes of the receiver channel, AND still swap the payload to put the attachment in the folder created?
Please let me know if something needs clarification
Thanks,
Chris
Hi Chris,
you pick the email and use the ASMA to read email subject. then you can use AF module to put email subject value to directory variable. then use the variable in receiver file adapter.
refer the below blog
Combining three different aspects of PI (ASMA, AF Module and variable substitution) in one shot
regards,
Harish
Similar Messages
-
Create target File is possible?
Hi,
I just need to know whether we can create a Target file in the interface? Let me explain my steps which i am doing.
1. I created a interface which holds MSSQL Server table let say employee table in source and its been mapped with a simple file technology in the target let say employee.txt.
All my question is when i ran the interface is it possible for moving all the records from employee table to employee file in the target and create the employee file automatically.
Note: its same like in IKM there is an option called Create Target Table.
Please let me know if its possible or not. If yes what i have to do for that?
Thanks,
GuruHI...
If you use the IKM Sql to File it should create the file...
Isn't that working? -
Using open hub to create a file on another server
Hello everyone,
I am wanting open hub to create a file, but create it on a different server (a file sharing server not associated with SAP). Both BW and this file share server run Windows.
Can this be done using logical files (FILE transaction) or other configuration?
I am aware of some other people posting here that send the file from open hub to DIR_HOME and then have created an OS command (SM49) to copy to the other file share server. Also I know one could also write an ABAP to FTP the file from this location out to the file share server as well.
I was hoping that FILE transaction would allow this but so far I have not had any luck with it.
Many Thanks,
KevinAll,
Found out that this can be done, you can send a flat file from BW to a completely different server in one step, no need for SM49 or AL11 or FTP or ABAP program in the middle. The trick lies in the configuration in transaction FILE.
FILE transaction configuration steps:
Step 1 - Define Logical File Path - just a place holder here
Step 2 - Assignment of Physical Paths to Logical Path, here is where you enter the server & path but not a filename, for example
\\server_swvs01\SAPFILE\<SYSID>\BPC\Cust_R3_sales\<FILENAME>
Step 3 - Define Cross-client Logical File Name, here is where you specify the actual file name to be written to the file share on the other server in field "Physical file", just make sure and link this to the Local path you created in Step 1 above. You can also use system variables in the physical file name or hard code it all.
your_file_name.csv
Hope this helps someone
Cheers,
Kevin -
Creating Linked File Directory Tree Using Spry?
Hey guys,
First post on help forums as I'll racking my brains tring to
find a way to do the following.
Basically I created a multimedia cd for my works data sheet
pdf's using dreamweaver CS and using spry horz menu wigets to
create links to files etc ... everything worked sweet and happy as
but now I have been asked to attempt one step further.
Basically what I am trying to acheve here create a HTML page
in dreamweaver containing a spry menu that links automaticlly to
all our work pdf doc's regarding our products on a network drive,
in case the drive sits here F:\sales\suppliers data sheets\
Inside this directory is extra diretorys containing the data
sheets ... e.g F:\sales\suppliers data
sheets\3M\3Mpaper\100grit.pdf ... F:\sales\suppliers data
sheets\3M\3Mpaper\150grit.pdf ... etc
Is there any way I can create a widget spry menu automaticlly
to capture all of these directories and files and display as a
linked tree?
I can do it manually but this would take forever ... ha-ha
I am hoping you undertsand what I mean ... basically I want
to make a html menu page which features a drop down menu sustem
where the sales guys can find the info much faster and easyer than
always exploring the drive.
Thanks in advance for any ideas or suggestions.
Muz (NZ)Hey guys,
First post on help forums as I'll racking my brains tring to
find a way to do the following.
Basically I created a multimedia cd for my works data sheet
pdf's using dreamweaver CS and using spry horz menu wigets to
create links to files etc ... everything worked sweet and happy as
but now I have been asked to attempt one step further.
Basically what I am trying to acheve here create a HTML page
in dreamweaver containing a spry menu that links automaticlly to
all our work pdf doc's regarding our products on a network drive,
in case the drive sits here F:\sales\suppliers data sheets\
Inside this directory is extra diretorys containing the data
sheets ... e.g F:\sales\suppliers data
sheets\3M\3Mpaper\100grit.pdf ... F:\sales\suppliers data
sheets\3M\3Mpaper\150grit.pdf ... etc
Is there any way I can create a widget spry menu automaticlly
to capture all of these directories and files and display as a
linked tree?
I can do it manually but this would take forever ... ha-ha
I am hoping you undertsand what I mean ... basically I want
to make a html menu page which features a drop down menu sustem
where the sales guys can find the info much faster and easyer than
always exploring the drive.
Thanks in advance for any ideas or suggestions.
Muz (NZ) -
So I'm having the old 32-bit/64-bit compatibility issues with Windows SIM. I have a Windows 7 64-bit PC (actually a virtual machine) that I intend to use to run Windows SIM and make answer files for 32-bit Windows 7 unattended installations.
I've installed the latest Windows ADK (the Win 8.1 one). When doing this there was no choice of download or prompt during installation regarding 32-bit or 64-bit architectures. Once installed the Windows Kits folder is under Program Files (x86), but imgmgr.exe
is a 64-bit executable. When I try and generate the catalog for a 32 bit install.wim, I get an error that 64-bit SIM cannot catalog 32-bit images.
Is there any way to install a version of Windows SIM on a 64-bit Windows 7 PC that can catalog 32-bit Windows 7 images?Hi,
I think the biggest problem is the architecture specific in answer file:
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OEMInformation>
<Manufacturer>[ REPLACE WITH COMPANY NAME ]</Manufacturer>
<SupportURL>[ REPLACE WITH SUPPORT WEBSITE ]</SupportURL>
</OEMInformation>
</component>
</settings>
The answer file must include processor-specific components. The answer-file settings in the windowsPE configuration pass must match the architecture type of the preinstallation environment. The settings that apply to the Windows image must match the architecture
type of the image. For example, if you create an answer file that deploys 64-bit images from a 32-bit preinstallation environment, all components in the answer file for the windowsPE configuration pass must include the processor attribute type of x86. Settings
to be applied in the specialize, oobeSystem, or other configuration passes must include the processor attribute type of amd64.
If you have any feedback on our support, please click
here
Alex Zhao
TechNet Community Support -
Using custom fields to create Target Groups?
Hi Experts,
I might be missing something but I couldn't find anything in the different help guides, so if anyone saw that please help!
Do you know if it is possible to edit the available fields to search/filter Contacts, Accounts etc. when trying to add them to a Target Group?
We are currently not really using any Marketing-related features but this will be a focus for us in a few months so we are having a closer look at this area. There might be some other settings in the Admin/Project Scope etc. that I am missing and need to check and activate.
We have some custom fields integrated with our on premise SAP CRM system which are heavily used by our marketing departments for extracting Contact lists, this is why we would like to see how we could reproduce this in C4C.
Thanks a lot in advance,
JB.Hi JB,
You can go to => Marketing => Target Groups => Your Group => Members => Personalize => Start Personalization => Add => Add Contacts => here you can select the field you want to change/hide, you can also drag and drop a field to change its order on the screen => Personalize => End Personalization.
Please find attached file with only a few changes that I did on that screen.
Best Regards,
Cristiano Rosa -
Using a filter when creating a hybrid directory
Hi all,
Has anyone succesfully used an LDAP filter notation when specifying the LDAP URL for a hybrid directory during configuration> We are using AD, and the URL we are using is as follows:
ldap://ldap-na.foo.net/dc=foo,dc=net???(&(&(objectclass=user)(objectCategory=Person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))(&(%7c(%7c(description=*contractor*)(description=*co-op*)(description=*consultant*))(&(employeeID=*)(FOOEmploymentStatus=3)))))
I have escaped the | characters with %7c as per the RFC spec. We see directory results but these results lead me to believe the filter was ignored when the configuration executed.
Anyone have an udea about this?
TIA,
IGSWell modifying the ldap.conf file won't work because this is resident on an MS-AD controller not located on the same server as BPM. I have trashed through the BPM config files and WLS config to no avail. I think I need to go back to the URL syntax.
Thanks,
IGS
Edited by: user10248000 on Dec 15, 2009 8:48 AM -
Mail continues to create Delivered files and reset preferences
I'm not sure what I've done (if anything), but for just over a week now, whenever I restart Mail it resets and does two things. 1) Opens a new delivered file (and keeps opening new ones if I don't delete them: Delivered 1,2,3,4...I assume it will keep going AND 2) Asks me if I want to see the new things added to Mail, like when I first installed it. It also resets all my preferenences...I'm not sure what to do.
On another different, but I think related note, Safari has also reset SOME of my preferences whenever I restart. Bookmarks Bar and Bookmarks remain normal, but Tabbing preferences needs to be re-selected each time AND the size of my window needs to be reset (i have to drag it back to full screen size instead of it remembering)
I suspect the two are related some how. Any suggestions?
(BTW, I don't just mean restart the computer, but also if I just resart the application.)
Thanks
ChrisDavid,
I believe you've hit the nail right on the head. The other thing I've been dealing with, which I was going to try and address somewhere else, was Kernel Panics I've been experiencing. But, as it happens, the link you have lead me to deals with this exact issue AND considering that I've been running with less than 2GB (instead of the recommended absolute minimum of 5) it's no wonder I"ve been having problems.
Since there are many steps (but very clear ones) to take, I don't know if my problem is solved as of yet, but over the next couple of days I will implement them. I"m sure this is it though (Forever an optimist).
I'll keep you posted and in advance,
Thanks
Chris
PS. I think you've also saved me the money I was going to spend on purchasing Disk Warrior!! -
When trying to download videos from any site i get the message cannot create target file
I have tried uninstalling firefox and video download helper then reinstalling them and changing the destination folder and resetting the commands .
Do you see a "3G", "E", or "o" next to the carrier name and signal indicator on the phone? If not, then you are not connected to a cellular data network at all. It's not impossible that you're not in range of their data network. Who is your carrier and where are you located?
If you do see one of those, you may want to call them again and ask explicitly to have them check the provisioning on your account. Just because it looks right in the billing system does NOT mean they have it set up correctly. -
ABAP CLASSES - XI don't create the Target File..
Hallo,
I have a problema in XI when I use an ABAP Class.
This is My FLOW:
1) R/3 SEND an IDOC DEBMAS to XI un idoc DEBMAS(Customer data)
2) XI have this Interface Mapping: Interface_Mapping_Anagrafica_Cliente.
It si composed on:
- Input: IDOC (DEBMAS)
- 1° Mapping ==> named: Message_Mapping_Anagrafica_Cliente
This mapping, from IDOC DEBMAS, create the message type Message_Type_Anagrafica_Cliente.
- 2° Mapping ==> Classe ABAP
This mapping, from Message_Type_Anagrafica_Cliente create the message type Message_Type_Click.
- Output: Message_Type_Click
3) I want that this Message_Type_Click will be in the file.
But, if I execute the transaction SXMB_MONI in XI, I can see the IDOC OK .. but if I make double click on it, I don't see the Payload for the target file. Infact the target file is not be created by XI...
I have made debug after my class and I found a Problem in the Trace with type E with message: CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV.
What is this?
Can you help me?
Thanks.
MoniaHi Monia,
first put your trace to 3: SXMB_ADM, Integration Engine Configuaration, Specific Configuration, Runtime/Trace Level
Second delete your abap mapping from your interface mapping and look in the monitoring for the output. Is it what you expect? Is it the datatype the abap mapping can work with?
Copy the result as source for the next test. Now you put the ABAP mapping inside and delete the message mapping from your interface mapping. Test with transaction SXI_MAPPING_TEST. Look to the weblog <a href="/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping ABAP Mapping</a> how to test an ABAP mapping.
The problem with more than one mapping program in one interface mapping is that you see only the result of both!
Regards,
Udo -
Unable to Create a file in a directory through a Job
Hi,
We have a anonymous block which uses utl_file package
It created a file in an oracle directory.
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
DECLARE
v_definition_clob CLOB;
v_codes VARCHAR2 (32767);
v_engine_name application.NAME%TYPE := 'CLAIMS';
v_knwldgebase_name knowledge_base.NAME%TYPE := 'CLAIMS';
v_rule_name VARCHAR2 (32767);
v_msg VARCHAR2 (200);
fid UTL_FILE.file_type;
BEGIN
fid :=
UTL_FILE.fopen ('MID5010_DOC1TEMP', 'Diagnosis_Report.csv', 'W', 32767);
UTL_FILE.put_line (fid, 'Rule Name ,Associated Codes');
FOR rule_name IN (SELECT DISTINCT rh.NAME, rh.rule_header_id
FROM rule_header rh,
knowledge_base kb,
application app
WHERE
app.application_id = kb.application_id
AND rh.knowledge_id = kb.knowledge_base_id
AND app.NAME = 'CLAIMS'
AND kb.NAME = 'CLAIMS')
LOOP
v_codes := NULL;
BEGIN
SELECT definition
INTO v_definition_clob
FROM rule_header
WHERE rule_header_id = rule_name.rule_header_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
v_definition_clob := EMPTY_CLOB ();
WHEN TOO_MANY_ROWS
THEN
v_definition_clob := EMPTY_CLOB ();
END;
DBMS_OUTPUT.ENABLE (50000000);
FOR code_indx IN (SELECT d.diagnosis_code AS code
FROM midev.diagnosis d
WHERE d.diag_ctgry_lkpcd = 'D' AND ROWNUM < 10
ORDER BY 1 ASC)
LOOP
IF REGEXP_INSTR (v_definition_clob, code_indx.code) > 0
THEN
v_codes := v_codes || code_indx.code || '|';
END IF;
END LOOP;
IF LENGTH (v_codes) > 0
THEN
v_codes := CHR (39) || v_codes;
END IF;
UTL_FILE.put_line (fid,
REPLACE (rule_name.NAME, ',', ' ')
|| ','
|| SUBSTR (v_codes, 1, LENGTH (v_codes) - 1)
END LOOP;
UTL_FILE.fclose (fid);
EXCEPTION
WHEN OTHERS
THEN
UTL_FILE.fclose (fid);
v_msg := DBMS_UTILITY.format_error_backtrace ();
DBMS_OUTPUT.put_line (v_msg || SQLCODE || ',' || SQLERRM);
END;
Now when i converted anonymous block into a procedure "DIAGNOSIS_REPORT_PROCEDURE" and calling it thorough a job its not creating the file. we are using the below code to create a job
BEGIN
--DBMS_SCHEDULER.drop_job (job_name => 'DIAGNOSIS_TESTING_REPORT_3');
DBMS_SCHEDULER.create_job
(job_name => 'DIAGNOSIS_TESTING_REPORT_3',
job_type => 'STORED_PROCEDURE',
job_action => 'DIAGNOSIS_REPORT_PROCEDURE',
start_date => to_Date('30-Mar-2012 16:44:03','dd-mon-yyyy hh24:mi:ss'),
--repeat_interval => 'freq=yearly',
enabled => TRUE,
comments => 'DIAGNOSIS_TESTING_REPORT_3'
END;Any help would be appreciated..
Thanks
P Prakash.I got the answer.
If we need to run a procedure through job then we must execute privilege . -
File format conversion of Target file using FTP adapter
Hi All,
I am using FTP adapter to create the file on the Target side. But file needs to below format : How do i conver the XML File fomat( Default generate by XI ) to be generat to below file format;
000000000000154162,
CWC1A,,,,
CWC1B,,,,
CWC2A,,,,
CWC2B,,,,
Please provide your suggestion;
thanks;
MKHi Mohan,
I have a collection of Blogs (links) which Specify the File content conversion parameters.
File content conversion, I am Not sure as which Link will Match Your Requirement exactly...
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
File Content Conversion for Unequal Number of Columns
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
Content Conversion (Pattern/Random content in input file)
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
Regards,
Sainath chutke -
Cannot create a file using UTL_FILE.FOPEN
Dear All,
I am using this syntax for creating a file in window
i have declare this like this
l_file_id UTL_FILE.file_type;
l_file_name := 'DHL_'||110570284||'_'||TO_CHAR(SYSDATE,'ddmmyyyy')||'.txt'
l_file_id :=UTL_FILE.FOPEN('C:\D2R',l_file_name,'W');
Is this syntax work?
My database version is oralce 10g
ThanksFirst of all, UTL_FILE is PL/SQL package and is executed on database server side, not on client side. Therefore, it is trying to create file in directory C:\D2R on database sefrver. So if you want to create file in directory C:\D2R on your client box - you can't. Next point - you are specifying directory explicitly which old and obsolete syntax. It requires, for security reasons to add C:\D2R to init.ora parameter UTL_FILE_DIR, otherwise UTL_FILE will raise an error. You should use directory objects:
CREATE DIRECTORY dir AS 'C:\D2R';and grant READ/WRITE on it to users. Then use:
l_file_id :=UTL_FILE.FOPEN('DIR',l_file_name,'W'); -- use directory name in upper caseAnd keep in mind, as I already mentioned UTL_FILE is PL/SQL package and is executed on database server side which means it runs under OS user oracle. Therefore OS user oracle must have write permission on C:\D2R.
SY. -
How to create variable record length target file in SAP BODS
Hi All
I have a requirement to create target file which will have various record layout; meaning different record length (similar to cobol file format), but this is for the target. Please let me know what is the best practice and how to solution this requirment.
Thanks
AshHi Shiva,
Thanks for your feedback. My issue is that I have 10 different detail records (each record type is fixed length).
For each customer account, I have to write to file the header record, the detail records in the exact order, then continue with next account and so on and then write the trailer record. I have given sample layout below. Highlighted text is the record identifier in this exmaple while the underlineds are account numbers. Fields are fixed length right padded with space or 0.
220700000000SA00 Wednesday 2014-12-12 ASA00034 334 000 ---> (this is header)
220700000010SA10 AAb 00000+000000+ Akab xxxx bb 0000000000943 3433 --> (detail rec)
220700000010SA14 AAA 00034354 DDD 000000000+ --> (detail rec)
220700000010SA15 888e a88 00000000+ --> (detail rec)
. . . . . remaining detail records
220700000012SA10 AAb 00000+000000+ Akab xxxx bb 0000000000943 3433 --> (detail rec)
220700000012SA14 AAA 00034354 DDD 000000000+ --> (detail rec)
220700000012SA15 888e a88 00000000+ --> (detail rec)
. . . . . remaining detail records
220700000000SA99 Wednesday 2014-12-12 d334 000 --> (trailer is header) -
Hi,
My scenario is a simple file-2-file scenario but want to create target file name based on element of the payload without any udf?
thanks
saihi,
My scenario is a simple file-2-file scenario but want to create target file name based on element of the payload without any udf?
We have 3 approaches to create target file based on element
1. Using dynamic configuration set the attribute value of payload dynamically to ASMA
2. Using AF module, write the value of ASMA in a variable
3. Using the variable substitution (with out udf)
Please refer below WIKI:
http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
thanks,
Maybe you are looking for
-
Need advice using different macs together + macpro users: Attention Please!
Hello to all Logic-freaks:-) I'm new on this forum and have a couple of questions. For now I'm working on PC with CubaseSX3 mainly and I'm tired of software and hardware issues(worked on G4 3 years ago but finances led me logically to pc...) As I can
-
Studdering... buffer slower than movie
I have employed two different methods to embed an flv movie in webpage, but both result in studdering because the movie catches up to the buffer. I can't figure out what is wrong... is the frame of 30fps rate too high? is my method of embedding th
-
Adding parameters to HttpServletRequest
Hi, Can any one suggest me a solution to add parameters to the HttpServletRequest? I am not talking about request attributes, but I am talking about user parameters sent through the browser. I would like to add some more such parameters in my busines
-
How to install Summit Sporting Goods schema???
I have downloaded the sql scripts, but don't know how to install in my server. It will be greatly appreciatied if someone can write down procedure in step by step. Thanks very much in advance. Charles
-
Why ?= used in wide casting
in wide casting , if we are assigning super class object2 to super class object1 using '?='. having the same effect as '='. so y we need to add '?' in wide casting. class lcl_super DEFINITION. PUBLIC SECTION. METHODS method1. ENDCLASS. CLAS