cancel
Showing results for 
Search instead for 
Did you mean: 

Source Structure determination Dynamically

Former Member
0 Kudos

Hi ,

I got a requirement to develop a File to IDoc scenario. Below are requirement details.

1. Source system application creates maximum 9 XML files of different strucure for each run. File name is generated dynamically by the source application.

2. Each file represents one message(MATMAS, ORDERS01,etc.,) in SAP R/3 (IDoc)

3. Each file has two sections one is header and another details section.

4. Header section structure is same for all the files. and it has a key to determine the document type.

5. Details section structure differs from file to file.

6. PI has to process the source files in the order its created on the source system.

Process flow is : PI has to pick the file/s from the sources system and post the data on SAP R/3 system after data transfermations.

Hope above details help in understaning the requirement. Please suggest me how can i achive this functionaly.

Please give me some light....

Thanks & Regards

Sree

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

you can use the file adapter.

you can use extended receiver determination to map to the correct structure based upon the header field that identifies each file.

simple.

Former Member
0 Kudos

Hi Ivan,

Please provide me documentation or link to get more information on extended receiver determination.

Thanks & Regards

Sreeni

Former Member
0 Kudos

Hi Ivan,

As i mentioned, source files has to process in the order its created on source system. There is dependency between the files.

We can not control sequence if we develope one interface for each file. So we have only one interface to process the files of different structure. Please correct me if i am wrong in this regards.

Thanks & Regards

Sreeni

Former Member
0 Kudos

Hi Sreeni,

Try to develop a unix script which check the presence of all the files, if all the files are present than rename the filename with prefix as "XX" and mention the filename in sender channel with prefix "XX".

As there is a dependency, try to put a wait between the files to get rename in the script.

regards,

Chandra Shekhar.

Former Member
0 Kudos

HI Jonnavarapu,

I dont think it is possible using the standard file adapter funcitonality because of the dynamic nature your items are having. For this you need to have an adapter module where you put your own code and then deploy the same and use it.

Else since your header is same for all the files and details are differnet. If you can ask the source file system guys to generate a file in this format:

first 10 fields are for Orders and next 10 fields are for matmas etc. Then you can create a source message type with 20 fields and read that file. Based upon the data inside the items you can route to the corresponding idoc. If they cannot generate this format then you cannot achieve your requirement.

Else you can request them to put the files in different folders and then you can create that many no. of interfaces.

or you need to come up with some generic file communication channel and then use java modules as mentioned in this blog:

/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter

Regards,

---Satish

Former Member
0 Kudos

Hi,

all file are dropped in the same directory? If it is, If there is any patter to generate the files' names?

Regards

Ivan

Former Member
0 Kudos

Hi Ivan,

Yes all files are stagged in same folder. File name will be in the below pattern.

XXXX_MATMAS.xml

XXXX_ORDERS.xml

...

..

.

XXXX_ZCLASS.xml

Here XXXX is the source application dynamically generated random number. And files needs to be processed in the order of its created.

Thanks & Regards

Sreeni