Skip to Content
avatar image
Former Member

Zipped multi excel .csv files to Idoc

Hi,

I have scenario where i have 'header' excel .csv and 'detail' excel .csv files zipped and available on PI server to send it as an IDOC to ECC. Now how do i approach this scenario: Zipped file to IDOC ? Thx!

Moderators, please do not close this thread. i did research on the answers.sap site but i couldnt find the answers. so please. wait. thx!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Mar 29, 2017 at 07:48 PM

    Hi Prema!

    You could use PayloadZipBean to extract contents of your ZIP file and java mapping to parse that files and compose output IDoc message.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 29, 2017 at 09:02 PM

    Hi Prema!

    In this case you can use standard java API to zip/unzip files:

    http://www.oracle.com/technetwork/articles/java/compress-1565076.html

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 29, 2017 at 09:13 PM

    Hi Prema!

    You can pass your zip file to java mapping and use classes mentioned above to extract files from source zip archive.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks again Evgeniy. I'm not a java person, so not that comfortable playing with this interface. also i have very less time to deliver the interface.

  • avatar image
    Former Member
    Mar 30, 2017 at 12:49 PM

    Hi Prema,

    You could also Use "Run OS command before message processing" in file adapter and unzip the files using command line (this requires addon to be installed on your PI SERVER may be WinZip or 7Zip) and then process files individually.

    Below are the reference links

    https://archive.sap.com/discussions/thread/3195587

    https://blogs.sap.com/2007/02/08/xipi-command-line-sample-functions/

    https://wiki.scn.sap.com/wiki/display/XI/SAP+XI+File+Adapter+OS+Command+Line+Feature?original_fqdn=wiki.sdn.sap.com

    This has little overhead of programming batch file and placing on application directory but its not that difficult to implement.

    Thanks,

    Amit

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 31, 2017 at 07:35 AM

    You would need to look into file content conversion

    https://wiki.scn.sap.com/wiki/display/XI/Basic+File+Adapter+Content+Conversion

    https://help.sap.com/saphelp_nw75/helpdata/en/44/6713ec3f914ddee10000000a1553f7/frameset.htm

    However, in your setup it might be difficult (maybe someone can weigh in here) to operate on two different files (HeaderExport.csv / DetailExport.csv). You might want to look into merging those two files in one CSV before you enter File Content Conversion (which resides in the sender adapter, so before mapping) and then use "complex structures" feature of FCC which allow you to operate on multiple structures (e.g. headers and detail records) within one file. See here: http://www.riyaz.net/sap/xipi-file-content-conversion-for-complex-structures/79/

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 30, 2017 at 08:56 PM

    thanks Evgeniy..

    can somebody tell me to convert the below two payload files into an Idoc? Thx!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 31, 2017 at 12:20 PM

    Thanks Evgeniy and Jens. much appreciated your time and help.

    i was thinking of the following steps to achevie this interface.

    - interface 1: to unzip the files(which are available on PI server from Ariba) and place files on PI server.

    - interface 2: merge files and place it in different folder on PI server.

    - Interface 3: use merged file to convert to IDoc.

    and as i said I'm not java person. may be lil difficult to get into it. but i'm ABAP programmer, i can tweak into java programming.

    or i have to pass the files to ECC and process with ABAP program, dont know the consequnces. thx!

    Add comment
    10|10000 characters needed characters exceeded