Get Last Document from document flow

I would like to retrieve last document flow's document. i use VBFA and pass Preceding sales and distribution document to where condition and get Subsequent sales and distribution document but i don't know how to get the latest one.
I use
select single VBELN into last_doc from vbfa
where VBELV = 'preceding doc'
order by ERDAT ERZET
but it's not work. How can i do that. Thanks!

try like this
data : begin of vbfat occurs 0,
        last_doc like vbfa-vbeln,      
        last_date like vbfa-erdat,
        end of vbfat.
select vbeln max( erdat ) into table vbfat from vbfa
        where VBELV = 'preceding doc'
          group by vbeln.
loop at vbfat.
<do the processing.>
endloop.
regards
shiba dutta

Similar Messages

  • Getting last record from mseg

    Hi,
    Can any one tell me how to get last record from any db(MSEG) table?
    reward guaranteed
    kaki

    Hello,
    Entries have no "natural order" within a database, apart from the primary key. If you need the "last entry" then you need to know what defines the last entry. If the last entry is the one with the highest year (MJAHR) the you could select it like this:
    data: ls_mseg type mseg.
    select * from mseg into ls_mseg.
        where bwart = 321
          and ebeln = 400000005
          and mjahr = ( select max( mjahr ) from mseg
                          where bwart = 321
                            and ebeln = 400000005 ).
    "process result in ls_mseg
    endselect.
    Note: This is a loop because there might be more than one matching entry.
    best regards
    Roland

  • How to get File  object from Document Object . ?

    In conventional Dom Parsing we pass file to DocumentBuilder to get Document Object .
      File file = new File("c:\\MyXMLFile.xml");
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse(file); // gOT Document here . My problem is how do i get File object back from Document . If i have Document object with mi.
    Please consider above code as example i dont have File object in my code . i am using Xhive DB API where i get Document directly from API method .
    I need to convert this Document to File to get size of file
    Please suggest solution on this
    Edited by: AmitChalwade123456 on Dec 5, 2008 6:10 AM

    Hello Guys any views on this topic

  • Get Billing info from document in EASIM

    Hi,
    I need to know if it's possible to get billing data generated in document from EASIM and the use it in FM for manual billing doc creation.
    Thanks,
    Daniel

    The scenario we´re working on is about billing of energy theft or consumption not read due to meter problems.
    the billing has to be done over already billed periods, without changing meter readings. The billing consumption in this scenario involves 12 months average consumption, prior to the date in which the theft or malfunction is assumed to had begun, minus the actual billed consumption for each "questioned" period.
    With EASIM I can simulate an already billed period. This cannot be done in EA00 or EASISI.
    Nevertheless I'm working on a new approach wich includes adjustment reversal with a certain reason which can be "read" in billing with IF12, then use specific rate steps for this. I'm not totally sure that this new approach can work, so I'm still insterested in using EASIM generated billing doc.
    Another problem with adjustment reversal is that the "questioned" period can have periods which shouldn't be included in migration relevant periods for BILLDOCEBF object,
    Regards,
    Daniel

  • Publish a document from Document Workspace back to source location - missing option in SharePoint 2013

    We intend to use Document Workspaces for reviewing all our Policies & Procedures.
    Once all the changes to the document have been made, I am trying to publish a document from a document workspace back to the source location but the 'Send to: Publish to Source Location' option is missing in SharePoint 2013.
    So instead I try to use 'Send to: Other Location' and copy / paste the URL from the original document library but this produces an error.
    Has anyone come across this and if yes, know of a workaround?
    A prompt response would be much appreciated.
    Thanks in advance.

    Thank you so much for your prompt feedback and response.
    Once I click on the file (from the Document Workspace) and go File | Send to | Other Location and then I paste the URL from the original document library and test it and the link works. It shows me the document library of the original location. When I keep
    the filename the same (as I want it to override the original document with the new changes) and then I press OK and then it produces the error? I don't know what I am doing wrong???
    When I look at the second hyperlink as below I complete all the steps but after step 5 which settings do I enable in the Content Organizer: Settings & Rules? I doesn't state what I need to configure?
    Enable the Content Organizer in the Destination Site
    To enable the Content Organizer in the destination site, do the following:
    Browse to the site you want files routed to.
    Select Settings, Site Settings.
    Under the Site Actions Grouping, select Manage Site Features.
    Activate the Content Organizer feature.
    Click Settings, Site Settings, Site Administration, configure Content Organizer Settings and Rules.
    Your prompt assistance would be much appreciated.
    Thanks

  • HELP!!! Can't open any documents from documents to go

    Helo anyone can help me...
    i can't open any documents (word, excel, jpeg etc)from documents to go it says: "there is no application to open this document"
    what should i do....i've just deleted the documents to go from my Handheld cause i got frustated already...
    so....what should i do now...?
    please help me...
    Message Edited by fachrul on 07-15-2008 11:47 AM
    Message Edited by fachrul on 07-15-2008 11:48 AM

    I am trying to open a pdf file through documents to go on my Centro (verizon). I received a this message: An unexpected error occured! Error number: 0x7371803. 
    What does this mean?
    I saw on another thread there is a palm pdf software that works. I went to the site; it said this program is not compatitable with Centro. Has anyone else found a workaround or another program?
    Hi, and welcome to the Palm Community Forums.
    The error could be caused by the particular file you are trying to open, the way it was created, etc.  Have you tried opening other .pdf documents? 
    Post relates to: Centro (AT&T)
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • SharePoint excelservice.asmx - Delete documents from document library

    Hi,
    How to delete a document from SharePoint Document Library using excelservice.asmx xml.
    Thanks.

    Hi Synoverge,
    Yes the batch command you mentioned should work provided you use ListWebServices, For more details check this out
    http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx
    http://sridharu.blogspot.in/2008/10/createdelete-folers-using-listsasmx-web.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/61466984-1844-48a1-8c1e-1c59a0f9876a/move-and-delete-files-remotely-using-sharepoint-web-services-?forum=sharepointdevelopmentlegacy
    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

  • Sharepoint 2010 -Script to get file name from Document Library

    Hi 
    can anybody send be script that works in "SharePoint 2010 management Shell" to get list of file names in document library.
    Thank

    See my updated answer. The double quotes need to be removed. Also note that you need to use $item.File.Name
    and not $item.Name to get the name of the files.
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Uploading and sending a PDF document from document management

    Hello to all,
    does anybody know a function module which is able to upload a pdf document stored within the document managemenent system of ERP and then send it via e-mail?
    Thanks to all
    Jörg

    Hi,
    Getting PDF:CONVERT_OTF
    mail:SSF_FUNCTION_MODULE_NAME
    Regrds:
    Prabu

  • Get work Item from Work flow

    hello all,
    I am looking for a FM that return the work Item Id from the work flow Id,
    can anyone help me pleae,
    thank you all

    SAP_WAPI_GET_DEPENDENT_WIS  , in this FM five the workitem id of the main workflow and you will get the dependent workitems .
    other Way
    Workitems are based on workflow instance  , so you can give the instance of your business object to the WAPI FM and get the existing workitems . See the code below
    call function 'SAP_WAPI_WORKITEMS_TO_OBJECT'
          exporting
            objtype                  = 'ECM'
            objkey                   = g_objkey
            top_level_items          = 'X'
            selection_status_variant = 0001
          tables
            worklist                 = i_worklist[].
    Another way would be to  access SWWWihead table

  • How to get return values from task flow in af:region ?

    Hi!
    I'm working with a taskFlow that is rendered inside a popup using the "popup inside a region pattern" (http://www.oracle.com/technology/products/adf/patterns/popupregionpattern.pdf), but now this taskFlow has an input parameter and a return value definition. So the question is how to get a value returned by this taskFlow thas is called inside a region?
    Any suggestion?
    Thanks in advance!

    Hi,
    write the value to a shared memory scope like session and read it in the regionNavigation listener. If you follow the paper you refer to then the listener determines of the viewId is null, this a return happens. It wuld then look in the memory scope for the return value.
    Another option would be to use an object that you pass as an argument to the task flow you open in the popup. Then you change the object you passed in, which then makes the return information available in teh calling flow. The object you pass in would have to be in a shared scope too
    Frank

  • How to restrict users to download, copy and print the documents from document library

    I want in SharePoint documents which I uploaded in documents library. no user will be able to download, copy and print.
    How it can be possible these types of restrictions apply?

    You can't achieve this goal by just setting appropriate access rights on SharePoint. You need to setup and configure Information Rights Management: https://support.office.com/en-in/article/Apply-Information-Rights-Management-to-a-list-or-library-6714cfe3-ef39-43b0-bb65-a887726bb63c

  • Search not returning some documents from document library

    Hi
    I have a situation where I have five documents in DL,While searching I was not able to find one of the document.
    1440-20-IC-DG-6011.dwg is the document which does not came in search.
    If search as
    '1440-20-IC', It came.
    '1440-20-IC-DG' or '1440-20-IC-DG-6011', It doesn't.
    '1440-20-IC-DG-6011.dwg' or '1440-20-IC-DG-6011*', it came.
    For information - Using Content type hubs, Content organizer rules.

    Hi Shubhr,
    According to your description, my understanding is that you cannot search the document when searching with ‘1440-20-IC-DG-6011’.
    Was this document a .dwg file and was the name of the document ‘1440-20-IC-DG-6011’?
    If yes, when we search with ‘1440-20-IC-DG-6011’, the document will appear in the search result; but if we search with ‘1440-20-IC-DG-6011.dwg’, it will not display in the search result.
    I recommend to upload a new document with a similar name to see how the search works.
    I tested the same scenario in my environment, if I searched with ‘1440-20-IC’ or
    ‘1440-20-IC-DG-6011’, it will appear in search result; if I searched with ‘1440-20-IC-DG’ or
    ‘1440-20-IC-DG-6011.dwg’, it will not appear in search result. Per my test, SharePoint will extract the first three part which is connected with ‘-’ and the full name of the document
    as indexes, then when we search with ‘1440-20-IC’ or ‘1440-20-IC-DG-6011’, the document will appear in search result.
    The '*' is used as wild search in SharePoint, when the string before '*' matches, no matter what the following part is the document will display in the search result.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • JDeveloper 10.1.2 - ADF BC - get last date from a view in validation

    Hello
    I have a list of subscribers. One person can be several times in this list with start and end dates.
    How can I get the last end date when I try to add a new row to validate it?

    Thanks. I tried to use the alternative writeXml(long, HashMap) method. This results in:
    * Defining a bidirectional viewlink, using the viewlink and using writeXml(long, HashMap): ok.
    * Defining a bidirectional viewlink, using the association (not the bidirectional viewlink) and using writeXml(int, long): error.
    * Not defining a bidirectional viewlink: always ok.
    So it seems that using the bidirectional viewlink alone does not account for the error, but that the writeXml(int, long) automatically traverses too much viewlinks and gets into an infinite loop. Controlling which viewlinks, viewobjects, attributes to use like the code in your example worked out.
    Is it still possible to set the depth count when using the writeXml(long, HashMap) method?
    I noticed that the com.sun.java.util.collections.HashMap class is used. In thread JSP with BC4J on JBoss requires com/sun/java/util/collections/HashMap you explain this is for upward compatibility. Do you know if it is scheduled to be replaced by the Java collection classes since JDeveloper 10.1.2 and 10.1.3 use JDK 1.4.2 and JDK 1.5? It was pretty confusing at first sight why the java.util.Map class wasn't used.
    Thanks, Ronald

  • Avoid login while opening document from Document library

    Even though I loginned into Share point 2013 site, when i click on any document in the document library to open , it is asking again for Login. How can i avoid this.

    Rajesh,
    Please add the site in Intranet Zone and Trusted Zone under IE and also check the box automatically login using current user name and password.
    Thank You, Pallav S. Srivastav ----- If this helped you resolve your issue, please mark it Answered.

Maybe you are looking for

  • 10.0.4 Upgrade

    I have had the 10.0.4 upgrade sitting in my App Store for a few weeks.  I was in the middle of a 10.0.3 project and remembering the chaos that the last upgrade caused I decided to wait till I had finished it before upgrading again.  Now I have finish

  • Receiver Mail adapter Content type issue

    Hello, I am formatting the body of the receiver mail. The body of the email  should look like below. Dear PI User, The following Interface has been successfully processed by the middleware PI system. Please do not reply to this email. If you need mor

  • Lookup functionality

    Hi Guru's, How to implement informatica's lookup functionality in ODI. Any help is appreciated. Thanks, Navin Kumar Bolla

  • Language Translation in Xcelsius based on Infoview language settings

    Hi, Could you please tell me how to do language translation in Crystal Xcelsius. I built the dashboard using WebI Report in English version. The client wants to view the Dashboard in French. Also, the client donu2019t want to have 2versions of the da

  • Samsung HT-Z310 Help

    I am lookiing into getting this system - wondering if anyone has comments or has this system.  I have read a few things not great about wireless surround sound - We don't know anything about it and don't want to make it harder than it has to be just