on 02-12-2009 9:15 AM
Hi there
Is it possible to specify the flat file's filename in the abap mapping? I need to create several flat files with abap mapping and each file uses the same receiver adapter but have a different name..
Thanx,
Jan
Hi,
We can do through variable substitution mechanism, configure accordingly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My scenario makes it some what more interesting, I can only get the filename one in the abap mapping. The variable mechanism only seems to work if you specify the filename before you execute the abap mapping. Is it possible to get a returning parameter and according to that determine the filename. Or in the abap mapping itself set the filename?
Hi Jan,
>The variable mechanism only seems to work if you specify the filename before you execute the abap mapping
aeh, no
>Or in the abap mapping itself set the filename
yes
You need a XML element like <filename> in your target message, there you store the filename (by ABAP mapping).
At adapter side you define the filename with %myVariable%
And finally you need to fill the variable, choose payload: myRootElement,1,filename,1 for example, if this is your structure. Have a look to Variable substituion at SAP help [Configuring the Receiver File/FTP Adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm]
Regards,
Udo
Hi again
My scenario is as follow, I pick up a flat file using the ftp adapter. The flat file contains an X amount of records. Each record has a header and body. So I must create 2 files, one for the body and one for the header. These 2 files have different names. Every record can have X amount of lines. So I have to dynamically look and see where a new record starts and the create the two files for each record. I tried content conversion but could not get it working so i'm creating the two file in abap mapping. Just not sure how I am supposed to allocate the filenames..
Regards,
Jan
Hi Jan,
you can use a variable for the file name which is filled by a field value from payload. So you need to fill a certain field in the ABAP mapping with the file name.
Regards,
Udo
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.