Flat file in http folder

Hi,
Is there anyway of downloading a flat file into a folder in some http address rather than the application server or local directory.
Regards,
Sukumar.

You can run the VB script on any PC where the SAP Gateway and SDK have been installed.
I am working on a project where we use vbscript and ASP to extract data from SAP and use it on the intranet.
You can use the VB-Script in an excel or word document and also on a webpage. The example below I have used in a excel spreadsheet (use a macro to call the subroutine).
I hope this helps you.
Example below retrieves a list of vendors.
VBScript to list vendors from SAP table LFA1
Sub GetTable()
'Logon
Dim sapConn As Object 'Declare variant
Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object
If sapConn.Connection.Logon(0, False) <> True Then 'Try Logon
   MsgBox "Cannot Log on to SAP"
End If
'Define function
Dim objRfcFunc As Object
Set objRfcFunc = sapConn.Add("RFC_READ_TABLE")
'Set import parameters
Dim objQueryTab, objRowCount As Object
'Table name
Set objQueryTab = objRfcFunc.Exports("QUERY_TABLE")
objQueryTab.Value = "LFA1"
'Set max nr of rows
Set objRowCount = objRfcFunc.Exports("ROWCOUNT")
objRowCount.Value = "10"
'Set table parameters
Dim objOptTab, objFldTab, objDatTab As Object
Set objOptTab = objRfcFunc.Tables("OPTIONS")
Set objFldTab = objRfcFunc.Tables("FIELDS")
Set objDatTab = objRfcFunc.Tables("DATA")
'First we set the condition
objOptTab.FreeTable    'Refresh table
'Then set values where statement (TEXT field in table parameter OPTIONS)
objOptTab.Rows.Add
objOptTab(objOptTab.RowCount, "TEXT") = "KTOKK = 'HSUB' and "
objOptTab.Rows.Add
objOptTab(objOptTab.RowCount, "TEXT") = "ORT01 = 'London'"
'Next we set fields to obtain (fields we want to retrieve from the table)
objFldTab.FreeTable    'Refresh table
'Then set values (FIELDNAME field in table parameter FIELDS)
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "LIFNR"  'vendor nr
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "NAME1"  'vendor name
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "ORT01"  'city
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "ADRNR"  'address nr
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "ERNAM"  'user who created the vendor
If objRfcFunc.Call = False Then
   MsgBox objRfcFunc.Exception
End If
Dim objDatRec As Object
Dim objFldRec As Object
For Each objDatRec In objDatTab.Rows
   For Each objFldRec In objFldTab.Rows
      Cells(objDatRec.Index, objFldRec.Index) = Mid(objDatRec("WA"), objFldRec("OFFSET") + 1, objFldRec("LENGTH"))
   Next
Next
End Sub

Similar Messages

  • Flat file over HTTP or SOAP

    Hey Guys,
    I need to post a Flat file over HTTP (or SOAP), is this possible without developing my own Adapter module?
    I just need to get a Flat file from a FTP server and post to another server via HTTP,since there is no message mapping involved, i developed the scenario without any Integration Repository objects, it is just a pass-through scenario.
    Now i am stuck on the receiver side since i am unable to post Flat file over HTTP.
    Secondly i have Login URL, Logout URL and upload URL from the receiver system, i don't see any place in receiver HTTP adapter to put all these 3 URL's, can i use SOAP adapter to put all these URL anywhere?
    Any help would be appreciated.
    Thanks
    Saif
    Edited by: Saif Manzar on Jan 19, 2010 2:51 AM

    Hey Guys,
    I need to post a Flat file over HTTP (or SOAP), is this possible without developing my own Adapter module?
    I just need to get a Flat file from a FTP server and post to another server via HTTP,since there is no message mapping involved, i developed the scenario without any Integration Repository objects, it is just a pass-through scenario.
    Now i am stuck on the receiver side since i am unable to post Flat file over HTTP.
    Secondly i have Login URL, Logout URL and upload URL from the receiver system, i don't see any place in receiver HTTP adapter to put all these 3 URL's, can i use SOAP adapter to put all these URL anywhere?
    Any help would be appreciated.
    Thanks
    Saif
    Edited by: Saif Manzar on Jan 19, 2010 2:51 AM

  • Flat file using http

    Hi guys,
    I work on pi 7.1.
    A flat file is sent to me using http request. I want to read the file, remove the heading and then convert it to xml and pass it into R3 through an idoc.
    Do anybody have any suggestions.
    Thanks
    Ugur

    Thank you for the link. I have been working using that document. But the problem is that i  can not trigger a break point in that code, so i can not manipulate with that data coming in.
    Have you any input to how to invoke the debugger.
    Regards

  • Loading flat files from a folder

    hi,
    i'm new in O.W.B., want to know if there is a way to import flat files into OWB directly from a folder. that is, automatically, without having to import one at a time.
    thanks.

    Hi Francesco
    So the UI lets you import one at a time or say this file is the same as that file (if same number of columns). You can also configure an external table or flat file mapping to add many data files to be read for the one external table or flat file mapping.
    If you want to import the metadata into OWB by pointing at a directory and importing all of the files there automatically then you would have to script this up. I have written scripts in the past that read metadata from files (such as for fixed length files for example the Oracle Sales Analyzer/OSA product has such files) and generate flat file definitions and external tables. The metadata files describe the fixed length fields, both the positional and datatype information. With CSVs if the files have a header row with a name for the column, you could script some of this or default the names, but then the datatypes would also have to be inferred by analyzing or from some metadata that can be added.
    Cheers
    David

  • IDOC --- XI -- HTTP (via a flat file structure, not XML)

    I am working on a senario in which we need to send a third party payroll service provider our HR Master Data records (Message type HROT_UM).  The manual method is to create a flat file from an IDOC and place the file in a shared directory, then upload the flat file by logging on to the web server.  We would like to automate this process using XI.
    Is it possible to send a flat file structure to a webserver using a HTTP receiver adapter?  If not, can you provide a basic view of how to accomplish this task.  Please note that FTP is not an option for us. 
    Any suggestions or recommendations would be greatly appreciated.

    hey
    flat file over HTTP is not possible,it takes only XML.
    have a look at the following thread
    Send file through http
    thanx
    ahmad
    PL:reward with points for helpful answers

  • How to load multiple flat files

    Hi,
    I am new to ODI 10, I have one requirement where I need load flat files containing the folder size11GB.
    I want to load them all in a single instances with using of single data server, single physical schema and single logical schema.
    How can we do this.
    Also to execute this in package what steps and precautions do we need to follow.
    Thx

    Is the data in your files the same format?
    If so, simply follow one of the many guides to looping around files that use a common structure to load them, you can do this in parallel if you want.
    http://odiexperts.com/multiple-files-single-interface/
    or
    http://www.odigurus.com/2011/05/multiple-files-single-target-table.html

  • Flat file as a source - now more confused then before.

    Sorry to open this topic again - i just got confused to what needs to be done (i did read all of the posts on previous topic - honest!) got confused to who did what and how it needs to be done. it's hard to be stupid sometimes :(
    here is what i have:
    OWB server (target + runtime repository) = RHEL 4
    Source (the location of the flat files) = shared drive/folder on Windows
    OWB client (my machine) = Windows (unfortunatelly)
    I followed the steps described in
    http://download-uk.oracle.com/docs/cd/B31080_01/doc/owb.102/b28223/def_flatfiles.htm#CHDHBECD
    created samba mount point from OWB server to the Source files:
    /mnt/folderA/folderB/source_file.txt
    mapped shared drive from the source onto my machine
    Z:/folderA/loderB
    created location for the flat files in OWB:
    TEST_LOCATION = \\windows\folderA\folderB\
    imported flat files into OWB (had to go through the sample)
    created the map 'TARGETLOAD' - simple load the data from the flat file into the table
    validation produced the following message:
    VDL-2398: No data file specified. Generated code will use the sampled file name and the file location 'TEST_LOCATION'
    --which is fine isn't it? it should be using this file in that location
    generation went OK.
    deployment produced this error:
    SQL*Loader-500: Unable to open file (/u01/app/oracle/product/10.2.0/owb_1/owb/bin/unix/\windowsfolderAfolderBTARGETLOAD.ctl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    i checked this directory - there are 2 files there that were created by OWB:
    \\windows\folderA\folderB\TARGETLOAD.ctl
    \windowsfolderAfolderBTARGETLOAD.log
    Could anyone please enlighten me on what is going on? What do i have to change/amend/edit/tweak in order to solve this? all i want is to be able to load the data from flat file on the source windows box into the table in OWB server.
    Any help/thoughts would be greatly appreciated.

    Hi GB
    Thank you very much for your reply.
    I cannot use external tables - my superiors decided agains it, so i am lambered with external files (even jedi mind trick didn't work!).
    What i do is import external files from windows box. The location is specified as \\windows\forlderA\folderB
    --Mount the drive onto unix then register the files location as the unix path.
    i have a samba mount point from unix box to this windows location. But what i can't do is to select is as a location. i even tried to mapping this mount point onto windows box, so that it looks like \\unix\mnt\folderA\folderB - and of cause when i execute - i get the same error.
    I even tried configuring the sql loader (right click on map and select configure -- create), but i cannot do it even that way. coz everytime i try to create - OWB automatically assigns windows path to it.
    IT told me to let them know what i need and they will create it (map the drive etc) the problem is - i can't think of how to do it! and i do not have a priveleges to start 'trying things out'... well they say if i break their security one more time -i am in trouble!
    I know it sounds sad, but could you please let me know what i need to have/to do in order to make it work.
    Hope you do not mind my request and thank you very much for all your kind help and advise
    Kind Regards
    Vix

  • Ssis issue - load recent added 5 flat files

    HI
    i have one query like i have 5 flat files in one folder today i loaded into sql server table,tomorrow again added 5 flat files in same folder.i want to load recent added 5 flat files,
    can any one give me answer?

    You need to have a loop and inside it have a step to check for file modified date for getting the recent files. Much better is if filename has timestamp part use that to determine the latest files
    see example here
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Moving of flat file from the application server after upload.

    Hi All,
    I am uploading data from a flat file placed on the application server by a BDC program.
    After the BDC has created the session i want to transfer the flat file from that folder to another folder on the application server by changing the name of the flatfile.
    Can any one suggest the best way of doing this particular scenario?
    Thanks in advance.
    Regards
    Satish Nair.

    Here is a sample program.
    report zrich_0001.
    data: d1 type localfile value '/usr/sap/TST/SYS/Data1.txt',
          d2 type localfile value '/usr/sap/TST/SYS/Data2.txt'.
    data: begin of itab occurs 0,
          rec(20) type c,
          end of itab.
    data: wa(20) type c.
    start-of-selection.
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          itab-rec = wa.
          append itab.
        enddo.
      endif.
      close dataset d1.
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
      delete dataset d1.
    Regards,
    Rich Heilman

  • Flat File automation process - limitations

    Hello Everyone,
    I would really appreciate any insight on the process improvement suggestions.
    Background:
    Currently we have around 12 territories providing a new flat file with new data on a daily basis depending on the business activity. Which would also mean that, on a given day if there is no activity would mean no flat file provided to BI for loading process.
    The flat files provided need to be loaded into the BI system (PSA - DSO - InfoCube).
    The flat file loading process has been automated for the daily file by implementing the logical file name for each territory.
    1. The process variant in the process chain is to ensure if the flat file is available on the App server (Custom ABAP program).
    2. 12 InfoPackages have been created to pick the data from the flat file on the app server and load the data over into the PSA.
    3. All the InfoPackages merge into an "AND" event in the process chain before the DTP load into the DSO kicks off.
    4. DSO Activation
    5. Recon between the flat file and the DSO to ensure all the data from flat file has been loaded into the DSO.
    6. DTP loads into the InfoCube.
    7. Recon between the InfoCube and the DSO itself.
    8. Moving the flat file from one folder into another.
    All the above processes are automatically performed without any issues if the flat file is available on the server.
    Problem / Issue:
    As one of the major limitations of the above design is the flat file for sure needs to be made available on the app server in order for the whole data flow in the process chain to continue without any breakpoints.
    Current workaround / process improvement in place:
    Based on the above limitation and upon further research, I was able to apply the OSS Note to give us the option of maintaining multiple DTPs for the same data target with different filter values.
    So, even if have individual data stream for each territory with a different DTP the issue still remains where the process variant (ABAP program to check if file exists) or the InfoPackage load if the ABAP program is removed will fail.
    Which means due to the above fact, the support team is alerted about the process chain failure.
    Question / Suggestions required:
    The main questions or any suggestions would be welcome, if one of you can let us know an approach where the flat file check program doesn't have to give a hard failure in the process chain for the rest of the process chain to continue with the loading process. (As in order for the rest of the process chain to continue the only options we have are Error, Success, Always).
    I have also looked into the Decision process variant available in the process chain, but based on the options available within I cannot utilize it for the loading process.
    Error can be caused by generating an error message in the ABAP program which in turn is causing the issue of alert being sent over even if the rest of the process chain finishes.
    Success would mean the flat file needs to be available. Always cannot be used in this case as it will cause a failure at the InfoPackage level.
    If the InfoPackage load can be avoided without a hard error to be generated, the process chain does not have to remain in the failed state which in turn will not trigger any alert to the support team.
    Please do let me know if you need more details about the above process improvement question.
    Thanks
    Dharma.

    The main issue with this as you mentioned is that the file has to be available for sure.
    We had a similar issue - we had a very critical data load that had to happen everyday , failure of the file getting loaded would mean that the reports for the day would be delayed.
    We were running on UNIX and we implemented a simple UNIX command that would not complete till the file was available in the app server.
    Something like
    while ( the file does not exist )
    delay of 15 seconds
    you will come out of the while only after the while completes which means that the file becomes available.
    You can write a similar ABAp program to check file availability if required and put it into your program.
    we also had a failover process where we created a zero byte file with the same name if the file did not come beyond a certain number of tries and the PSA would load zero records and the data load will continue.
    Edited by: Arun Varadarajan on Jan 26, 2009 10:18 AM

  • Background job finished but flat file not created in the Background

    Dear all,
    ZHR_CSD program is scheduled to run daily at 00:01:00. This program is generating the flat file in the folder CSD/HR.
    when i  schedule this program to run immediately it is generating the flat file.
    But when i schedule this program in Background it is not generating flat file .
    Regards

    Hi,
    As suggested by Eric, your Z Program is probably using GUI_DOWNLOAD Function Module.
    GUI_DOWNLOAD or any other GUI function modules (FM) will only run in foreground, not in Background.
    Ask your developer to code that Z Program with OPEN DATASET logic, if its possible.
    The Reverse situation is well described in [this thread|Background Job assigment with variant in SM37 , for Textfile uploading], please refer it to get some relative information for the same.
    Regards,
    Bhavik G. Shroff

  • Steps to create Data loading from Flat File to Info Cube in BI

    Hi,
         I am very new BW, I need some one help. When I am trying to create info source i am any pop window stating to create Transaction data or master data.
         After creating Info source, I dont know how to assign this info source to source system (which i created).
          When select the context menu of info source I dont have option to assign the datasource.
          And one more thing is When I am creating the Info Cube. I cant understand how to create.
          Please some one help me how to map the fields to Source system.
    Regds
    Dave.

    Hi,
    For flat file upload, first you need to create the source system.
    Then you need to create the infosource based on the format of the flat file you are going to upload or vice versa depending on your requirements.
    Once your infosource is ready, right click on it and select assign datasource. Here you can assign your flat file datasource. Then create an infopackage and give the path from where the file is to be upload to BW (in the infopackage).
    Also look at the thread below for procedure on flat file upload :
    http://help.sap.com/saphelp_nw04s/helpdata/en/8e/dbe92341c84242be2c7d3917f1c197/frameset.htm
    Cheers,
    Kedar

  • How to receive flat file from XI to R/3 system?

    Hello guys,
    The XI will receive XML files from other source. I have to pick that XML file  and convert it in flat file so that i can receive it in R/3 with required BAPI. Guys plz tell me necessary steps need to follow to do the whole process. I dont know much about XI and from lots of tutorials i am getting confused. I have to work with both XI and SAP R/3. What to do. Plz advise me.
    Thanks in advance.
    With regards,
    Rosaline.

    Dear Abhishek,
    Thanks for your help.
    1) convert the XML content of the file into flat structure (using UDF or JAVA mapping)....map the output of the JAVA mapping to the the BAPI structure....so now you would have falt file (content) in the BAPI.
    2) create a flat file using PI and place it in some folder....now the BAPI program should pick this flat file from the folder and process accordingly....this will not require a JAVA mapping and can be done by FCC parameters of the File channel.
    These are 2 diff way or steps? Plz provide any help link.
    With regards,
    Rosaline.

  • Regarding ssis - Matching flat files

    Hi,
      1. I have one scenario like....
    We have 8 flat files in one folder and 5 flat files in another folder
    In that we have 5 matching files in those 2 folders...
    Now we need to load that matching 5 files into one destination..How???

    Explain matching files.
    Does that mean files with same name and extension? Or does it mean only internal data is same with different names?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help with loading infocube from flat file

    Hi:
    I am using SCM 5.1 and the BI 7.0 component that comes with it. I am trying to create an infocube and load it with flat file data but getting errors.
    1. First I created the infoobjects and the infocube.
    2.a I first tried to create only the data source and activate the datasource. This was not successful.
    2.b I then tried to create the application component, infosource etc. (like one does in BW 3.0) but was still not successful.
    If you have any pointers, could you please let me know? Thanks.
    Satish

    You can go through the following Blog for flat file loads.
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60debae1-84dd-2b10-e7bf-bdedf1eabdf9
    If you are getting any specific error, then you can post it here.
    Regards,
    Gaurav

Maybe you are looking for

  • Mapping problem with Wireless Keyboard and Japanese iPhone

    Hi everyone: This seems to be a slightly obscure question -- at least, I can't find a ready answer for it with the search terms I've tried, possibly because most people don't use this particular accessory with the iPhone. I have an iPhone 4 that I bo

  • Creation of change pointer for condition split

    Hi, We have  SAP  system which is integrated with PMM(mainly used for pricing). Scenario is as explained below. There is one condition record whose validity is from 25/12/2011 to End of TIme (EOT) for one price record. Assume today (08/02/2012) busin

  • How to make a restart of the workflow in a process controlled workflow?

    Hi Experts, How to make a restart of the workflow in case of process controlled workflow? Scenario is like this: The user has created a shopping cart with 1000 USD. The process schema has three process level with the first level being approval with c

  • 6003f error on OS X Recovery

    My MacBook Air (purchased on October 2012) crashed. I erased the drive and used OS X recovery to reinstall Mountain Lion. Since I had already purchased Mountain Lion, once my computer was working again, I downloaded it. Installation of Mountain Lion

  • 30 days back data from selected date

    Hi Gurus, I have date prompt in a format (02/01/1998(MM/DD/YYYY)12:00:00 AM) and I have report with 4 columns in the 1st column date 2ed column sales 3ed column 30 days back date 4th column 30 days back sales. Date | Sales | 30 days Back date(from th