cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically generation of folder path

Former Member
0 Kudos

Hello,

We are working on an interface from ABAP Proxy to FlatFile

files to be sent to FTP folder are 4 types.

MC - Montly Create

MA - Monthly Append

DC - Daily Create

DA - Daily Append

In the MT there is one field(FLAG) in which the above value will be sent. We will see any one of the above values.

I have created two connmuncation channles:

CC_CREATE_FTP_RECEIVER (folder path-/fm/test/S/in/daily)

CC_APPEND_FTP_RECEIVER (folder path -/fm/test/S/in/)

so the daily files needs to be sent to /fm//S/in/daily folder

monthly ->/fm//S/in/ accordingly...

How can I generate the path dynamically depending on the Daily or Monthly...something similar to (/fm/test/S/%Reg Expression%))

Where to keep the condition....

Can you please help me out ....

In the receiver determination I have included the condition

CONDITION SERVICE

/p1:MT_ECC_FILE/RECORD/FLAG = MC BS_FILE_CREATE_RECEIVER

/p1:MT_ECC_FILE/RECORD/FLAG = MA BS_FILE_APPEND_RECEIVER

/p1:MT_ECC_FILE/RECORD/FLAG = DC BS_FILE_CREATE_RECEIVER

/p1:MT_ECC_FILE/RECORD/FLAG = DA BS_FILE_APPEND_RECEIVER

Thanks in advance.......

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Refer to link below

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

and section "Variable Substitution"

Gaurav Jain

Points if answer is helpful

Former Member
0 Kudos

Hi ,

Is there any possibility that I can use the Dynamic configuration instead of variable substitution.....?

similliar to code as below, which is for the FileName...

I need for ftp folder path ...

________

Map map= container.getTransformationParameters();

//This is for generating the file Name Dynamically

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey keyFileName = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileDirectory");

conf.put(keyFileName, strFileName);

____________

Former Member
0 Kudos

Code you have mention is to get the foldername from the sender file adapter.

This you can not use in communication channels.

If you have to generate filename based on some conditions then you can go for module.

Gaurav Jain

Answers (0)