Facing problem to Checkin and checkout file from starteam using vba

Hi,
Im trying to checkin and checkout file in starteam through vba. I have imported the
StarTeamSDK104.dll in reference in vba project and tried to accomplish my task.
I am able to locate the file, but not able to checkout/checkin the file. I am not sure how to use checkin/checkout function in vba. I am getting an error at the checkout code(hichlighted in bold in the below code). Also I was able to
do it in java but i want it in vba.
Could someone help me on this.
Below is the code im using.
Sub ST_Test()
Dim strAddress As String
Dim nPort As Long
Dim strUser As String
Dim strPassword As String
Dim strProjectName As String
strAddress = "Sample Address"
nPort = 1234
strUser = "Sample Username"
strPassword = "Sample Password"
strProjectName = "Sample Project"
Dim Factory As New StServerFactory
Dim Server As StServer
Set Server = Factory.Create(strAddress, nPort)
Server.Connect
Server.logOn strUser, strPassword
Dim project As StProject
Set project = FindProject(Server, strProjectName)
Dim view As StView
Dim finder As StStarTeamFinder
Dim Folder As Stfolder
Set view = project.DefaultView
Set Folder = view.RootFolder
For Each chk In Folder.getItems(Server.TypeNames.File)
    Dim fileitem As StFile
    Set fileitem = chk
    If fileitem.Name = "Filename.txt" Then
        fileitem.checkout(0,False,True,False )
    End If
Next chk
End Sub

Hi,
As for the checkout method, please refer to the following link:
http://msdn.microsoft.com/en-us/library/office/aa223821(v=office.11).aspx
The syntax is:
expression.CheckOut(FileName)
Jaynet Zhang
TechNet Community Support

Similar Messages

  • Communication error when calling web service for checkin and checkout files

    Hello,
    I am trying to checkout  and also to checkin files within the DMS via web service. The files are stored in the VAULT (=TRESOR) without the data server parth and DVA computer.
    For checkout:
    Original zum Ändern auschecken
      CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTMODIFY2'
        EXPORTING
          documenttype    = pi_documenttype
          documentnumber  = pi_documentnumber
          documentpart    = pi_documentpart
          documentversion = pi_documentversion
          documentfile    = lf_documentfiles
          pf_http_dest    = ''
          pf_ftp_dest     = ''
        statusextern    = lf_status
        IMPORTING
          return          = lf_return
          checkedoutfile  = ls_checkedoutfile.
    and for checkin:
    Dokument einchecken
      CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
        EXPORTING
          documenttype    = pi_documenttype
          documentnumber  = pi_documentnumber
          documentpart    = pi_documentpart
          documentversion = pi_documentversion
          hostname        = ''
          statusintern    = ''
       statusextern    = lf_status
          statuslog       = ''
        IMPORTING
          return          = lf_return
        TABLES
          documentfiles   = lt_files.
    But it is not working cause I always get a 'communication error' from the function CV120_FTP_START_REG_SERVER when calling one of these BAPIs via web service:
    IF pf_check_gui = 'X'.
        CLEAR: gf_gui_exist,
               gf_gui_checked.
        CALL FUNCTION 'RFC_PING'
             DESTINATION 'SAPGUI'
             EXCEPTIONS: communication_failure = 1 MESSAGE lf_msg_text
                         system_failure        = 2 MESSAGE lf_msg_text.
        IF sy-subrc = 0.
          gf_gui_exist = 'X'.
        ELSE.
          CLEAR gf_gui_exist.
        ENDIF.
        gf_gui_checked = 'X'.
      ENDIF.
    Afterwards the following function is called where I got the error 'Program no longer started via RFC. No return possible.':
    -> Vault with DVA -> ** Start FTP on the client
      CALL FUNCTION 'SYSTEM_START_REG_SERVER'
           EXPORTING: progname    = 'sapftp'
                      startmode   = ''                          " X
                      exclusiv    = 'Y'
                      waittime    = 500
                      startcomp   = 'C'    " G=gui, C=RFC
                      startpara   = ' '
          IMPORTING: err_code    = lf_errno
                     err_mess    = lf_error_msg
                     destination = pfx_destination.
    Regards
    Jens

    Hi! As mentioned below I had the same problem.
    There are two notes concerning security setting of the SAP Gateway:
    1069911 - GW: Changes to the ACL list of the gateway (reginfo)
    1480644 -  gw/acl_mode versus gw/reg_no_conn_info
    Your basis team should check if the Gateway settings allow external programs to register on the gateway.
    Best regards
    Dominik

  • Problem viewing .xlsx and .xlsm file in DMS using Display from Archive Link

    Hello All,
    We are using IXOS as a content server for storing the documents through SAP Archive Link.
    We are not storing any documents in SAP DMS.
    The client has an requirement to manage .xlsx and .xlsm documents.
    1. xlsx - We defined a new document class xlsx under SAP NetWeaver ..-> ArchvieLink  and made the required mime and sheet settings. This allows to upload a .xlsx file to IXOS server succesfully (using Check in Archive) link.
    But whenever we try to view the file using "Display from Archive", the browser gives a warning message that the file is in different format than xls. Do you want to still open (Standard Excel application message). On clicking yes, the file opens in .xls format instead of .xlsx.
    The client doesn't want to change the format to .xls. What can be done to preserve the .xlsx files.
    2. xlsm - Any clue as to does SAP ECC 6.0 support this file type for DMS? And if how the config settings are to be done?
    I will be grateful any help.
    Thanks.
    Ketki

    Hi Ketki,
    based on your description I think that maybe SAP note 1289314 could help here and made sure that the local copy also has extension XLSX or XLSM.
    Best regards,
    Christoph

  • Video and audio files from dvd using FCP

    Hi
    Trying to get footage from a dvd using fcp. I can import the clips ok using file >import but they have no audio with them and the audio folder on the dvd is blank...any ideas????????
    cheers

    The audio_TS folder is normally blank.
    You need to use MPEG Streamclip to get the DVD files to Quicktime.

  • I am facing problem regarding graphical user interface. I am using text box for editing files. I want to show the line numbers and graphical breakpoint​s along with text box. Can anybody help me in this? Thanks.

    I am facing problem regarding graphical user interface. I am using text box for editing files. I want to show the line numbers and graphical breakpoints along with text box. Can anybody help me in this? Thanks.

    Thanks for you reply.
    But actually I don't want to show the \ (backslashes) to the user in my text box. 
    Ok let me elaborate this problem little more. 
    I want to show my text box as it is in normal editors e.g. In Matlab editor. There is a text box and on left side the gray bar shows the line numbers corresponding to the text. Further more i want that the user should be able to click on any line number to mark specific line as breakpoint (red circle or any graphical indication for mark). 
    Regards,
    Waqas Ahmad

  • Facing problem in xml schema xsd file registration

    Hi,
    i am facing problem in xml schema xsd file registration when
    the number of column is more. It is showing persing error.
    if i am deleting few column from xsd file . It is working otherwise
    showing error. Is there any solution for that please suggest me.
    The Error is
    ORA-31011:XML parsing failed
    ORA_19202: Error occurred in XML processing
    LPX-00230 : (message vary time to time-like invalid tag ending etc.)
    Regards
    Manoranjan
    and thanks in advance

    Where is you XML coming from. Are you sure it's valid. If you are hard coding it as a SQL String constant are you hitting the 4k / 32K limit on the size of SQL / PL/SQL constant. Have you tried loading the content from a bfile..

  • Problem with Preview and PSD files - random gray square

    Hi guys, hope you can help...
    I've got a problem with Preview and PSD files.
    If I open in Preview both an original jpg straight from my reflex and the photoshop version of the same picture, the psd file presents a gray square (of what it seems unrendered image) in a random area of the photo (sometimes in the center.). The square is quite big...
    If I zoom in or zoom out it disappears...if I scroll to another photo and then back to the psd, the square it's there again...sometimes in a different position.
    I've tried the same psd on my older iMac with leopard...and got no problem at all.
    I suspect it got something to do with my Ati...
    (this is the second iMac 27...the first went back for gray banding on the lcd screen and flickering and yellow tinge........)
    Thanks for your help.
    DAve.

    maybe I'm onto something...
    I've just found out that opening Preview in 32bit mode (instead of default 64bit) works flawlessly with any psd files. If I switch back to 64bit mode, Preview is much faster but the gray square comes back...
    It seems like the i7 is much faster than the Ati....
    Any more realistic ideas?

  • I have 2 iphones syncing on one computer and on the same apple ID. Before i updatad my Itunes to the last available update and my Iphones to 5.01 i had no problem draging jpg. and mp3 files into my iphones DCIM folder (the picture folder that opens when c

    I have 2 iphones syncing on one computer and on the same apple ID.
    Before i updatad my Itunes to the last available update and my Iphones to 5.01
    i had no problem draging jpg. and mp3 files into my iphones DCIM folder (the picture folder that opens
    when conecting to Itunes). Since my updates Itune wont let me drag and drop any files' even pictures that
    were taken with my Iphone on 4.3.3.
    Please help as we have no itunes music in Israel, only apps and i cant copy any of my old music from my computer
    to my iphones.
    If it helps, i am using a pc with 32 bit windows 7.
    Other from the obove Itunes works fine and does sync pictures from my computer to my Iphone from "my pictures" folder.
    Thank you for your time
    Yoni Bliss
    [email protected]

    The title of my initial post is a bit misleading. I already took a chance deleting one of the iPhones, hoping if I deleted the wrong one, I can still reauthorize it (all with the same Apple ID acct, so not subject to 90-day waiting period, right?) The iTunes database just updated itself, and it says I have 4 "devices" "in the Cloud", but 5 "computers" associated w my account. How can I find out what computers are associated? Isn't there a list I can see? I dont have a clue what computers they might be. If I use the  "Deauthorize All" option, is it a pain to add them all back in. I assume I would have to log in from each computer to reauthorize each one. Would I have to be running the newest OS or version of iTunes to reauthorize? I think I have a PowerBook G4 Titanium with an older OS and iTunes. I'd like to keep that authorized, if possible.

  • I'm not able to copy and paste files from my mac to hard disk and usb. I have tried dragging the items to those devices but it won't work. I also have tried copying and pasting those files onto those devices but that doesn't work too. Can any one help?

    I'm not able to copy and paste files from my mac to hard disk and usb. I have tried dragging the items I want to copy to those devices but it won't work. I also have tried copying and pasting those files onto those devices too but that doesn't work too. Can any one help?

    Hi BobRz
    Thanks for you suggestion but it didn't work - are there other ways for solving this problem? Or is it because my files that I want to copy and paste onto my hard disk etc are too big? (However there is space on my hard disk and it works on a PC)

  • Problem in tutorial and zip file. can anyone file it or correct it..

    hi jdev experts,
    am using jdev11.1.1.5.0.
    when am new to these webservice. i followed this tutorial
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_14/jdtut_11r2_14.html
    url wsdl link when use that wsdl.
    throws some error.
    what is the reason john says. ok at second post of the thread.
    Consuming a Web Service from a Web Page
    so if i change the wsdl means and somethings has to be changed in tutorial steps.
    if any newbie crossing this tutorials feels very difficult to work. so can change the wsdl url link and those steps.
    and another thing I installed 11.1.2.0 and download that zip file in that tutorial and i run throws the same error.
    so. problem in tutorial and zip file. can anyone file or correct..
    i think think this is the right place to tell this. or else re-direct me.

    this is to arun.
    As the exception stack clearly mentions that the endpoint is moved, it is up to the users to make use of any other webservice.trace says link is moved i know.
    thing am here is:
    please make note on that tutorials.
    * note :- just like this consume some other external webservices. dont use this webservice this webservices link is broken.
    this what saying.
    this to john.
    thanks. thanks again.

  • Need to create PDF and Spreadsheet file from RDF file when user passes the parameters

    Hi Everyone,
    I am beginner as report developer ,i came across one  issue when the requirement came from the client regarding generating EXCEL FILE and PDF FILE from same RDF file .
    I was able to generate the PDF file but i when i tried to create excel file it does not include the margin in it, also the cell border are not seen( file comes with data but with no CELL borders), I have also attached screenshot for reference .
    View image: problem
    or
    http://i43.tinypic.com/2mq017k.jpg
    Software Used :
    Oracle reports Developer : 11g 1.2.3.0
    Thanks ,
    Harshil

    Dear  Olga12,
    Thanks a lot for your quick reply.
    When i suggested the solution to my client  for creating two separate templates attached to same data definition , they declined and argued that  we cant create 2 separate templates for all reports( more than 200 reports).
    Is there any way to create the PDF/EXCEL from same RDF other than creating two separate templates ?
    Thanks ,
    Harshil

  • How to save my emails and adressbook files from an old ibook?

    How to save my emails and adressbook files from an old ibook (bought around 2002) ?
    The screen from the old ibook doesn´t work anymore (logicboard problem I guess).
    I saved everything else with starting it in target modus. That worked fine.
    I want to delete the files after that as well, because I wanna give away the old ibook and don´t want anyone to read my emails!
    Little helpers I have:
    A running MacBook
    External Screen (and cables to connect)
    Fire Wire Cable

    Don't know how helpful this will be but I often copy mail from one computer to another, I drag the mail from the mail window to the other computers drop box, then from the other computer double click it and mail asks me what I want to do with it, of course without a screen you'd need to use back to my mac.
    If you don't have back to my mac running, you could set up a second user account on the newer mac, import everything via target mode as suggested by c above, and then drag the mail to the first user account drop box.

  • Download and view file from db

    Hi!
    Is there any way to download the file from db and view its contents?
    Using webutil I can download the file to a specific location in the client machine. Since I don't know what type of file is (pdf, doc, txt...), I don't know how can I view the file in the client browser...
    Is there a way to download the file into a temp directory and show the content in the web browser?
    Thanks!
    Ana

    It worked, thanks!
    But I have a little problem with .doc files....
    I download the file from db using webutil (showing a file dialog window to save the file to a specific directory in the client), the file is downloaded successfuly and when I call "web.show_document('file:///c:\temp\test.doc','_blank')", appears the window telling me to save the file to disk or to open the file from its current location... It was supposed not to show this window and to open the file directly from its location....
    How can I do this?
    Thanks!
    Ana

  • My macbook pro with OS x Lion will not drag and drop files from finder or iTunes

    My macbook pro with OS x Lion will not drag and drop files from finder or iTunes. Can anyone help?

    Hi, I just have same problem.. I can't drag and drop file /folder.. please help.. I can drag the file/folder and move it , but I can't drop it after move it please help...!!!
    It is happen just after I re-start my computer.. I tried to repair and anything but just don't work. Actually the old style one finger double tab and lock is much better rather the 3 fingers.
    Please help to fix the drag and drop for file/folder/itunes.

  • I want to transfer my photo and movie files from my iPhone 4S to my mac.

    I have posted this question before without any success and was hoping by reposting it may promt a solution to my problem.
    I want to transfer my photo and movie files from my iPhone to my Mac OS X (10.5.8).
    But I don't want to use Cloud or iTunes.
    Is there a way to connect my iPhone 4S to my Mac directly,
    say ... via a program or such on my MAC, to drag and drop the photos and Movie files,
    directly into a folder. ??????????
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone Mobile plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data.
    Thanks in advance for any help.

    Sorry I should of mentioned ....
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data  (so needs to be on the  iPhone).

Maybe you are looking for

  • L2 Cache and Memory

    I'm about to buy a MacBook, mainly for Grad School purposes, but I also do a lot with music and movies. My questions are: What is the difference between a 3MB and a 4MB L2 cache? Will I notice the difference? Will there be a noticible difference betw

  • All mail messages appear in ical work calendar

    For some mysterious reason, all email messages I receive in Mail turn up as To Do items in my Work calendar in iCal. I tried turning off the iCal option 'Automatically retrieve invitations from Mail', but that makes no difference. Anybody any ideas a

  • Unknown state or association field

    Hi, I have a table "client" that has many "request", both have an id attribute that´s the primary key. I need to query the request of a type that belong to a certain type of client. In the Request entity I have the following named query: @NamedQuery(

  • I encountered an error when trying to uninstall CS4

    I had CS4 and CS6 installed on my Macbook Pro.  The uninstall app for CS4 wouldn't work so I deleted CS4 files manually thinking that I could then reinstall CS4 and then uninstall it properly.  Didn't work and so I know I am stuck with a bunch of CS4

  • Can not attach files in an e-mail

    If I use internet explorer 7 I can attach e-mail. But using Firefox 3.6.23 I can not.