Upload the documents

Hi All,
I am uploading the document throught document library.
My requirement is i need to show the present week documents monday to friday.
After Friday 5 pm it should shownext week documents.
For the present week in page load i wrote code as 
 var culture = CultureInfo.GetCultureInfo("en-US");
                                var dateTimeInfo = DateTimeFormatInfo.GetInstance(culture);
                                var dateTime = DateTime.Today;
                                int weekNumber = culture.Calendar.GetWeekOfYear(dateTime, dateTimeInfo.CalendarWeekRule, dateTimeInfo.FirstDayOfWeek);
 Items = Items.AsEnumerable().Where(d => culture.Calendar.GetWeekOfYear(d.MeetingDate, dateTimeInfo.CalendarWeekRule, dateTimeInfo.FirstDayOfWeek) == weekNumber).ToList();
Please can any one help me with the code.
Thank you,
Sowjanya.

Hi,
According to your description, you might want to retrieve items between a specific date range.
A suggestion is that you can use CAML query to composite the query statement to retrieve items created in a specific date range.
Here is an article with code demo will provide more information about how to achieve it:
http://www.codeproject.com/Articles/414414/SharePoint-Working-with-Dates-in-CAML
You can also composite your CAML query statement with the help of a recommended tool:
 http://www.camldesigner.com/?p=594
Feel free to reply if there are still any questions.
Best regards,
Patrick
Patrick Liang
TechNet Community Support

Similar Messages

  • Uploading the document giving error in CV01n transaction

    Hi All,
       I created one content repository in ECC 5.0, when i was created that time it was giving the error http 401..etc. I solved it by entering the Content server Administrator username and password.
    After creating the content repository, i am trying to upload the document using the transztion cv01n in xls format.It is giving the following error Error while checking in and storing: C:\Documents and Settings\Sridhar\Desktop\DailyChecking.xls Message no. 26253..
    Is there any wrong in that configuration or what?
    Can i have solution for this problem?  Please let me know...
    Thanks & Regards,
    Sridhar M.

    Hi Sridhar
    The path in dc20 C://abc is the path where the temporary files wud be stored..
    For example, when u double click a checked in document, it will open the file and a temporary file would be created in the path mentioned in dc20 against data carrier PC..
    The path mentioned is the area where these temporary file should be stored while u process an original application file..
    If u dont want any temporary files to be stored in ur desktop, simply do not put anything in the path..
    Regards
    Aby
    Please award points if u find the answer useful

  • Errors while uploading the document

    Hi ,
    I am implementing Applcore Attachment functionality to upload the docs to UCM.
    I have created Content Repository in Jdev by specifying the connection details of UCM instance.But I do not see any "Attachments" folder under "Contribution Folders" and no "Trash" folder either.
    Also , I see some errors ( in UCM server )when I upload the document as below:
    +Privilege cannot be determined for role sysmanager. Cannot find the group Attachments. Exception type is 'java.lang.Throwable'. [ Details ]+
    The content server has generated a diagnostic warning. The stack trace below shows more information.
    +!apUnableToDetermineRolePrivilege,sysmanager,Attachments!syExceptionType,java.lang.Throwable+
    java.lang.Throwable
    +     at intradoc.shared.RoleDefinitions.getRolePrivilegeEx(RoleDefinitions.java:266)+
    +     at intradoc.shared.RoleDefinitions.getRolePrivilege(RoleDefinitions.java:222)+
    +     at intradoc.shared.SecurityUtils.determineGroupPrivilege(SecurityUtils.java:119)+
    +     at intradoc.server.ServiceSecurityImplementor.determinePrivilege(ServiceSecurityImplementor.java:655)+
    +     at intradoc.server.DocumentAccessSecurity.checkSecurity(DocumentAccessSecurity.java:162)+
    +     at intradoc.server.DocumentAccessSecurity.checkSecurity(DocumentAccessSecurity.java:117)+
    +     at intradoc.server.ServiceSecurityImplementor.checkSecurity(ServiceSecurityImplementor.java:371)+
    +     at intradoc.server.Service.checkSecurity(Service.java:2776)+
    +     at intradoc.server.Service.checkSecurity(Service.java:2754)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
    More details can be viewed here
    here
    Any pointers will be helpful to me.
    Regards
    Aradhana

    Which version of UCM are you using? UCM 10g had different default content types and came with ADENG, ADHR, ADMFG etc. already created . 11g has a different set of content types which does not include ADENG. These content types are really just examples to get the system started an operational and would not ever be used in production (I hope).
    You can add the ADENG content type Administration > Admin Applets > Configuration Manager > Options > Content Types...
    A better solution would be to see where ADENG is being set in the code you should be able to change the dDocType setting to something supported in UCM 11g like 'document'
    Tim
    Edited by: Tim Snell on 23-Aug-2010 01:38
    Edited by: Tim Snell on 23-Aug-2010 01:38

  • Upload the document

    Dear all
    I want to upload the document from local to DMS.wht i have done
    1) Recording t-code SHDB
    2) Assign 2 files , check in , object aasignment
    3) save
    if you can assign one file  recording is working if you can assign two file recording is not working.
    kindly help

    Hi,
    What is the errormessage you are getting,generally as per the customization only one file can be assigned to a single document.
    CSN

  • IPM11g: Uploading the document through Input Agent

    Hi,
    What is the difference between uploading the document through "*An input*" (which that maps an input file to an application when documents are uploaded in the background by the Input Agent.) and through "*Upload Document*".
    Thanks

    hi,
    1. Storage area [Content reposotory] ex-ZDMS,
    2.you need to create storage category ex-Z_DMS_DOC,
    3. you need to maintain this category in ZDMS.[Content repository].
    then run bapi,
    Benakaraj

  • How to upload the documents like PDF, EXCEL and WORD

    Hi,
    I am working on UI, I am tracking the COREMODS data using this UI. My requirement is need to maintain the related documents also in database using this UI. I think SLM system have that functionality. If any one know about this functionality, explain about
    How to upload the documents into database.
    How to maintain this documents in database.
    Is there any standard methods/function modules to upload this documents ( I am not asking about content of document, I am expecting about total file).
    i.e. I want to maintain the all core mod related test cases and other documents in SAP database.
    How to handle this functionality?        
    Rayudu

    Hi Rayudu,
    For office documents we can use [Business Document Service|http://help.sap.com/saphelp_nw70/helpdata/EN/3d/90a9371c726343e10000009b38f842/frameset.htm]
    Cheers,
    Jose.

  • Access denied error while uploading the document into document library which is associated with a content type

    hi,
     am trying to upload a document in a document library which is associated  with content types [ the content type contains 10 site columns and one of them is taxonomy field]. i added this content type in the document library.
    this document library is residing in a team site which is saved as a template and  based on this template i have created sub sites.
    and when i tried to upload a file to the doc lib, it throws me "access denied error".
    what may be went wrong .
    any help is  appreciated!

    Access denied indicates the user account uploading the file doesn't have access to the library, or sometimes it means there's already a document in the library with the same name that was never checked in. It's also possible that your template contains
    custom code that tries to do something that is not allowed.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Upload the document from other site to sharepoint library

    Hi All,
    I am having folder with document in want to upload the bulk of that document to SharePoint library.
    Please let me know how can i do.
    Thank you,
    Sowjanya.

    Hi.
    1. Open the location of the documents to bring to SharePoint in a windows explorer. The open the document library located in SharePoint. 
    2. Once the document library is viewed, on the upper left hand corner of the page, click on the Library tab. This will display the ribbon controls for the document library.
    3. Within the ribbon controls, locate the Open with Explorer then click it. This should open the document library in windows explorer.
    4. Select the files that you want to copy in the windows explorer then copy or dray those files to the explorer of the document library.
    5. That should be it unless you have set properties in your document library that needs to be filled up. Do not forget to publish/check in the files that you have uploaded.
    Hope this helps.
    Cheers.
    Robert
    Outsource Trainer

  • Issue while uploading the document with VA02 and VA03

    Hello Experts,
    Can any body please help me out from this issue, as while uploading the PDF's, docs from VA02, VA03 in ECC6 EHP7 system.
    Steps to reproduce the issue - TX. VA02 --> service object --> create an attachment then we are facing like below
    Thank you in advance,
    Bhaskar N.

    Hi Bhaskar,
    Please check Tcode: SKPR08 - Category for Document Class) contains the Content server repository settings
    change the category of SOFFPHIO class to R/3, then you will able to attach any documents
    I hope it will help.
    BR
    AKJ

  • Document Metadata stored as default when I upload the document again

    I uploaded a specific document specifying metadata for it, in a library ages ago, but was not ready and deleted it. Now the document is ready for upload  again, but when I upload it, it shows metadata before I even enter any. Is like remembering what
    I put the first time and automatically put them again. Why does this happen? how can I clear the "document cache"? (I don't know how else to call it)

    hello
    yes, for Office documents metadata is stored both in Sharepoint content database and inside files. It is possible to delete this metadata from files:
    Remove Sharepoint metadata from MS Office documents.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How to upload the document into JAVA Webdynpro screen?

    Hi Gurus,
    I have the requirement where I need offer the document uploading option in my java webdynpro screen to the enduser's through which they will upload the supporting document which can be maximum of size 10 MB.User can upload 2 or 3 documents at a time.
    and another field has to show the number of attachments that are attached with the deleting option as button?
    Then finally,I want to upload file from web dynpro to R/3
    Can you provide me a sample code with respect to Webdynpro Java.
    Thanks in Advance,
    Dharani

    Jasmine,
    There are several methods of uploading documents. Check the following links.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/7a3be0e795664cb1d8cae68042ceb7/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bb/d95a42ea221153e10000000a155106/content.htm
    James

  • F-22, Need to upload the document using BAPI

    we have requirement to use BAPI for uploading document to f-22,
    For the BAPI when we input data all the data are correctly posted except posting keys,
    Our requirement is to use the customized posting for crediting customer and standard posting key for debiting GL account,
    We have input the required posting key in BAPI but still its not picking the posting key, its taking the standard posting key,
    Document type used is DC and DB,
    so is there any relation between document type and posting key, any idea from where BAPI is picking Posting key?

    Hello,
    it was originally not intended to use the BAPI to post
    payment documnents. For simplicity the posting keys are not
    at the BAPI's interface, instead they are defaulted with
    the standard posting keys depending on account type and debit/credit
    indicator.
    Please see note 487722 which explains how to pass addditional data
    to the BAPI in parameter EXTENSION1. You can implement the
    Business Transaction Event (BTE) RWBAPI01 to populate the posting
    key (t_accit-bschl) from EXTENSION1 parameter.
    I hope this helps!
    BR,
    Raquel

  • Help on uploading the documents

    Hi Gurus,
    Currently we have a project requirement where in:
    => we need to provide an option for uploading documents in SRM SUS portal
    => we do not want to go for third party content server (no budget for server license); so preferably SAP application server (ECC 6.0 and SRM 7.0 with SUS is currently installed)
    Considering these two prime factors, what would be the best option to satisfy the requirement?
    I have heard about R/3 DMS, Easy DMS and few other options as well...
    But, I really do not know which one to consider or in which direction to go as I have never worked on such kinda requirement before..
    I suppose both the above mentioned DMS options require some installation and thus some licensing would be involved..
    Do we have any option given by standard SAP which is inbuilt and does not require any additional installation to help solve our purpose..?
    Any help would be highly appreciated...!!!
    Thanks in advance!

    Hi,
    => SRM-SUS portal will also support the integration of SAP DMS without installing any additional add-on?
    You will need to install respective adapaters and perform some basic configuration for defining the repository. These adapters are supported on Portals running on NW platform.
    => We would just require to do some configuration changes at SRM end so as to achieve this integration with SAP DMS?
    I am not sure about how much configuration will be required to perform the integration since I have not worked on SRM technology. But since I have integrated SAP DMS repository on SAP Enterprise Portal with KM , I can confidently comment that it can be done with SRM portal as well. May be some tweaking might be required for SRM integration.
    Hope this helps.
    Regards,
    Deepak Kori

  • Getting the document ID of an uploaded document

    Hello All,
    Perhaps someone out there can help with this assumingly simple task of getting the document id of a file that was uploaded.
    Back ground:
    I have a separate system which retains records of transactions. Paperwork is often received as a part of these transactions and my intention is to store those documents into SharePoint. I want to store the document id on the record to facilitate easy retrieval
    of the document. No need to search by meta tags or the like; I will have the specific document id which will point to the document.
    Environment:
    I currently have SharePoint 2013 online. The program that creates and maintains the records is an in-house VB.Net application running on 4.5 framework. The document repository is defined as a record center and contains several content types and meta tags
    (columns) already defined. Again the application is written in VB.
    Goal:
    Upload a given document, get the document id, and store that id to the record.
    What I have done:
    I have created a function that will take a given file name and proceed to upload the document to the given SharePoint list. It then proceeds to update the meta tags with information that will help find it using alternative methods. I have also spend hours
    upon hours researching every corn of every forum to find an answer. But to no avail.
    The problem:
    I cannot find how to get the document id of the document that I uploaded. Either it is so easy that no-one has bothered to post how it is done. Or it is not doable. I say this because I can find absolutely no reference to how to get the document id. There
    is lots of references on how to get the name, the url, the meta tags, etc... But NO example on getting the document id. Very frustrating. Below is the code that I am using. Can someone suggest how I can go about getting the document id. Please treat me like
    I am a noob and spell it out. Sample code would be great! I have already burnt way too much time on this seemingly simple task. I would greatly appreciate any help.
    Thanks
    Mike
    Imports Microsoft.VisualBasic
    Public Class Class1
    Private mVarTitle As String
    Private mVarStockCode As String
    Public Property DocTitle() As String
    Get
    Return mVarTitle
    End Get
    Set(value As String)
    mvartitle = value
    End Set
    End Property
    Public Property StockCode() As String
    Get
    Return mVarStockCode
    End Get
    Set(value As String)
    mVarStockCode = value
    End Set
    End Property
    Public Function UploadFile(FileName As String, Path As String, ListName As String, ContentType As String)
    'For each record, copy the file from knowledgetree to the local directory and then upload it with the metatags.
    Dim mKTFile As String = String.Empty
    Dim mFileName As String = String.Empty
    Dim mSource As String = String.Empty
    Dim mTarget As String = String.Empty
    Dim mTitle As String = String.Empty
    Dim mStockCode As String = String.Empty
    Dim mDocId As String = String.Empty
    Dim mCTid As String = String.Empty
    Dim mBaseKTFolder As String = "\\<computerName>\c$\Program Files\ktdms\documents\"
    mFileName = FileName
    mKTFile = Path
    mTitle = mVarTitle
    mStockCode = mVarStockCode
    mKTFile = Replace(mKTFile, "/", "\")
    mSource = mBaseKTFolder & mKTFile
    mTarget = ".\temp\" & mFileName
    UpdateStatus("uploading " & lrows.ToString)
    ' Copy the file to a new folder and rename it.
    My.Computer.FileSystem.CopyFile(
    mSource,
    mTarget,
    Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
    Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
    Dim mpassword As New System.Security.SecureString()
    Dim mp As String = "<adminPassword>"
    For k = 1 To Len(mp)
    mpassword.AppendChar(Mid(mp, k, 1))
    Next
    Dim mycred As New Microsoft.SharePoint.Client.SharePointOnlineCredentials("<AdminUserId>", mpassword)
    Dim url As String = "https://<SharePoint URL>/sites/rms"
    Dim listTitle As String = ListName
    Using clientContext = New ClientContext(url)
    clientContext.Credentials = mycred
    Using fs = New System.IO.FileStream(mTarget, System.IO.FileMode.Open)
    Dim fi = New System.IO.FileInfo(mTarget)
    Dim list = clientContext.Web.Lists.GetByTitle(listTitle)
    clientContext.Load(list.RootFolder)
    clientContext.ExecuteQuery()
    Dim fileUrl = [String].Format("{0}/{1}", list.RootFolder.ServerRelativeUrl, fi.Name)
    fileUrl = Replace(fileUrl, "#", " ")
    Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContext, fileUrl, fs, True)
    Dim web As Web = clientContext.Web
    Dim newFile As Microsoft.SharePoint.Client.File = web.GetFileByServerRelativeUrl(fileUrl)
    clientContext.Load(newFile)
    clientContext.ExecuteQuery()
    '*****this section finds the content type and sets
    Dim contentTypeColl As ContentTypeCollection = clientContext.Web.ContentTypes
    clientContext.Load(contentTypeColl)
    clientContext.ExecuteQuery()
    mCTid = String.Empty
    '/ Display the content type names that are available in the website
    For Each ct As ContentType In contentTypeColl
    If ct.Name = ContentType Then
    mCTid = ct.Id.StringValue
    End If
    Next
    '***************End content type find.
    newFile.ListItemAllFields("ContentTypeId") = mCTid
    newFile.ListItemAllFields("Title") = mTitle
    newFile.ListItemAllFields("StockCode") = mStockCode
    '******This is the section where I have tried to get the uploaded document Id.
    '******None of these statements work.
    mDocId = newFile.ListItemAllFields("Document ID").ToString
    mDocId = newFile.ListItemAllFields("_dlc_DocId").ToString
    mDocId = newFile.ListItemAllFields("DocID").ToString
    newFile.ListItemAllFields.Update()
    clientContext.Load(newFile)
    clientContext.ExecuteQuery()
    End Using
    End Using
    ' Delete the file .
    My.Computer.FileSystem.DeleteFile(mTarget)
    UploadFile = mDocId
    End Function
    End Class

    Thanks Micheal for confirming SharePoint version.
    Is your VB code working with SharePoint 2010 Client Object model? It would give the idea that there is some poroblem in SharePoint 2013 CSOM.
    By the way, I tried the below code  in C# and I was able to print the Document ID and it worked for me.
     using (ClientContext clientContext = new ClientContext("http://<<Server Name>>:2425/sites/test/"))
                    Web site = clientContext.Web;
                    // Change your document library name
                    List docLib = site.Lists.GetByTitle("tester");
                    clientContext.Load(docLib);
                    CamlQuery caml = new CamlQuery();
                    ListItemCollection items = docLib.GetItems(caml);
                    clientContext.Load(items);
                    clientContext.ExecuteQuery();
                    // Iterate through all items in the document library
                    foreach (ListItem item in items)
                        Console.WriteLine("File Name:: " + item.FieldValues["Title"]);
                        Console.WriteLine("Document Id : " + item.FieldValues["_dlc_DocId"]);
                    Console.ReadLine();
    Output:
    File Name:: Remove_URL
    Document Id : TEST-1-1
    File Name:: Request
    Document Id : TEST-1-2
    Please check that your code is working with SP2010 or not?
    Thanks
    Ashish
    Ashish Gupta Click "Vote As Helpful"! if you think that post is helpful in responding your question click "Mark As Answer, if you think that this is your answer for your question.

  • Where is Stored the document uploaded in the KM?

    Dear Experts.
    I have the following doubt:
    Where is Stored the document uploaded in the KM?
    Thanks in advance
    Regards
    Carmen

    Hi Carmen,
    Documents will be stored in the KM repository under the folder whre you have uploaded the document. By default /root folder will be there and under that you will have different repositories like documents etc..
    Login to Portal,
    You will see Content Administrator tab > Go to KM Content > root folder and your uploaded document will be present here.
    Thanks.
    Sushil

Maybe you are looking for

  • Xml Publisher ---RTF Format

    Hi, I am creating a report using XML publisher and output is an RTF File,I want to wrap coloumns how it can be done. Thanks in advance.

  • Ringtones on 4S keep changing

    New Verizon iPhone 4S user here. Like the phone so far but with a few minor changes it would be perfect. If I assign a ringtone to my wife and then resync the phone to add new contacts, calendar events, etc., the ringtone assignment gets switched bac

  • N8 ovi suite connection not working and unable to ...

    Hi guys, i bought a brand new n8 today with vodafone australia, and being naturally very excited about it i tried to download some apps from the ovi store. i was prompted to download the ovi store installer, which i accepted, but when it came to inst

  • Beneficiary Details coming as null in SOA Custom Composite--Create User

    I have created a soa composite which works on create user workflow. This has one level of approval workflow and once the approval is done i'm sending mail to beneficiary user with the benefeciary firstname,lastname etc which i seleted from the payloa

  • Mitigation of risk at detour path

    Dear experts, I have a scenario wherein I am using detour path for SOD violation.I want that SOD violation path goes to person depending on type of risk present in access request. The path with HR risk should go to person X where as non-HR(ECC) risk