on 11-02-2008 3:22 AM
Hi Everyone,
I have a bunch of text files with different extensions (.TXT,.VDU ETC) Would like to FTP these files to different server. Here is the problem "I want to send these files directly to the receiving file server". Should I use File content conversion?.I heard that we can send any file using a converter. Is that true?
I want a response from the receiving FTP server to update a SAPZTABLE whether the file has received successfully or not.Is that possible?
Thanks in advance.
Thanks,
Gowri
HI
Corrected your code itself Try it
DynamicConfiguration conf = (Dynamic.Configuration)
container.getTransformationParameters().get (Stream TransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/xi/system/File","FileName");
String name = conf.get(key);
return name;
Well its not different from what Mike did
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2664
Thanks
Gaurav
Edited by: Gaurav Bhargava on Nov 7, 2008 3:56 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
Thanks for your help.Its really quick. I had tried the code in the below mentioned steps.
1. Created message mapping between two identical message types.
2. Created UDF function with name "result".
3. Deleted argument line and selected radiobutton "CONTEXT".
4. COPY PASTED your given code.
5. Mapped RESULT to TARGET name.
6. In the TEST tab I gave file name executed the code.
7.Got below error
22:50:04 Start of test
Compilation of test_af2f_mm successful Runtime exception during processing target field mapping /ns0:test_af2f_mt/binaryfile/filename. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._test_af2f_mm_ method Result$[] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:test_af2f_mt/binaryfile/filename. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._test_af2f_mm_ method Result$[] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:364) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._test_af2f_mm_ method Result$[] at com.sap.aii.mappingtool.tf3.rt.C2CFunctionWrapper.cacheContext(C2CFunctionWrapper.java:98) at com.sap.aii.mappingtool.tf3.rt.C2CFunctionWrapper.gotoNextContext(C2CFunctionWrapper.java:44) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:266) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:test_af2f_mt/binaryfile/filename. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._test_af2f_mm_ method Result$[]
22:50:06 End of test
Thanks in advance,
Gowri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Mike & Raj
I think its doable.
I have tried this once but it hit on performance. As for Ack message BPM keep on waiting and file size was 40 MB. Due to issues we removed this and moved with a Java proxy based approach
I had transferred the files using Java proxy and then send message to XI which in turn updates SAP table.
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,Raj,Anand,
Thanks for your help. Can I get the response with out BPM? If at all I need to use the BPM do we have any step by step guide, coz I had never used BPM before.
Thanks in advance.
Gowri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
I had tried reading a filename in mapping progrm, using the procedure that you had mentioned in the scenario
(http://sapient.xi.googlepages.com/xi-excellentintegration). This is the code I had wriiten in the UDF.
DynamicConfiguration conf = (Dynamic.Configuration)
container.getTransformationParameters().get (Stream TransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/xi/system/File","FileName");
String name = conf.get(key);
conf.put(key,name);
return ""name"";
But when I am tessting this in TEST tab in MAPPING PROGRAM. I am getting an error.
Could you please correct me if I am wrong.
Thanks in advance,
Gowri
Hi Gowri
Try this UDF cache type context
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename = conf.get(key);
result.addValue(filename);
Thanks
Gaurav
Gowri,
I believe it's possible using BPM. Please go thru Michal's blog.
PS: Since it's possible only thru BPM, you can't implement the blog, which referred by Anand above. You can read any files in xi, even without Content conversion.for example -http://sapient.xi.googlepages.com/xi-excellentintegration
raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Raj,
>I believe it's possible using BPM. Please go thru Michal's blog.
I don't think it's possible to update a table with an application ack - unless I'm mistaken
if this would be possible I'd like to see it too
BTW
you don't need a BPM to receive an app ack from ftp (it's mentioned in the comments of my blog)
Regards,
Michal Krawczyk
Michal,
I didn't meant to say that you have to do exactly your BPM in order to insert the data into the SAP Table. We need some additional steps in order to send update to SAP.
As you said, the process will be completed only after the BPM gets successful Transport Ack , correct? Hence I thought,it would be good option to keep another Send step after that in order to send Update to table. I thought only after XI got successful Transport ACK, it will go to the next step! Please correct me if I'm wrong.
If I'm wrong, apologize for leading to the wrong direction!
Thanks
raj.
hi,
>I thought only after XI got successful Transport ACK, it will go to the next step! Please correct me if I'm wrong.
but can we evaluate ack in a BPM ?
I never done this but maybe it's possible - did you ever do that ?
if so then sure we could go this way I'm just not sure about this ack evaluation
Regards,
Michal Krawczyk
>
> Hi Everyone,
>
> I have a bunch of text files with different extensions (.TXT,.VDU ETC) Would like to FTP these files to different server. Here is the problem "I want to send these files directly to the receiving file server". Should I use File content conversion?.I heard that we can send any file using a converter. Is that true?
if u dont' need any conversion, then u don;t need File content conversion..
i don;t know answer for other question... but with BPM, i think it should be possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.