Open a document passing as parameters DocNum and series

Hi all
In my addon, developed I'm trying to open a PurchaseOrder with ActivateMenuItem(<ID>)
then I put Docnum into the Form:
lole_form_obj.Items.Item("8").Specific.value = lfst_doc.n_doc
then when I try to put the series index into the series combo:
lole_RecordSet = Create OleObject
+          lole_RecordSet = gole_DI_Company.GetBusinessObject(gi_RecordSetObj)                                   +
+ls_query = "Select Series                                                      " + &+
+                           "   from NNM1                                                            " + &+
+                           "     where SeriesName = '" + ls_serie + "'"+
lole_RecordSet.DoQuery(ls_query)
lole_form_obj.Items.Item("88").Specific.ValidValues.LoadSeries(lole_RecordSet.Fields.Item(0).Value, 2)
I can see the document when I work on a db and I've an error using another. Why?
There's another alternative method to open a document?
Thank's

Hi,
What do you mean by
"I can see the document when I work on a db and I've an error using another."
What other is giving you error ?
From what i can get from your code is your way to put the series into the combo box should be something like this
ocbo.Select("ValueOfSeries",SAPbouiCOM.BoSearchKey.psk_ByValue)
that is if you are selecting the combo by its value.
In your case should be :
lole_form_obj.Items.Item("88").Specific.Select(lole_RecordSet.Fields.Item(0).Value, SAPbouiCOM.BoSearchKey.psk_ByValue )
Try it and let me know.
Regards
Edy

Similar Messages

  • Which version doesn't produce this error: "there was an error opening this document. the file is damanged and could not be repaired"?

    This error message occasionally occurs with Acrobat 5 on XP 2.  However the same files can be opened with Acrobat 6.0.4 on Win98(se2).
         "There was an error opening this document. the file is damanged and could not be repaired."
    I'd like ot upgrade 5 on my XP system, but have read many posts complaining about the same error with newer versions.
    Is there a version that never produces this error on files that aren't actually damaged? And has anyone figured out what produces this error? (The posts I've seen suggest solutions that don't seem to work.)
    Thanks.
    Ellen

    Thanks, Prasanth.
    I've read posts about this problem happening on all versions, and wanted to see if it was least likely to happen in one version.
    I just need the basic function - the ability to read a pdf file.
    Of course, it seems to be a problem only for some, and there's no way of knowing the extent, so I will try an upgrade or two.
    Ellen

  • How to deal with "There was an error opening this document, the file is damaged and could not be"

    Hello, everyone:
    I open one pdf document with Adobe Reader 9.3, but it appeared that "There was an error opening this document, the file is damaged and could not be repaired".. and I found that another several pdf document in the same folder that I have not opened for a long time is also "damaged and could not be repaired".
    But in the same folder, other documents of different types are ok, does that mean there is something wrong with my hard drive?
    Has anyone else run into this issue or have any suggestions?
    Thank you very much

    It could be that the directory is damaged. It could be that at one time you had a virus that did damage, it is hard to say. Do you have a good backup?

  • Acrobat 11 there was an error opening this document. the file is damaged and could not be repaired

    we are receiving an error when opening certain pdfs saying "there was an error opening this document. the file is damaged and could not be repaired"
    i've tried a few things to fix this issue with no luck
    tried on a brand new windows 7 install without any added software like anti-virus software, etc
    tried on my home pc (I forwarded the document from my work pc to my home pc and still receiving the same error)
    don't think it's anything related to the computers, thinking it's more an issue with the pdf. i've tried the basics like deleting temp files from IE, going to %temp% and deleting that out, doing an acrobat repair, trying in reader instead of acrobat, updating users from acrobat 10 to 11, and still receiving the same issue. the odd thing is, some people can open this document and some receive the error. the other thing is i've tried alternative pdf programs with no avail, same errors from those as well
    i work on the helpdesk with one other person  for the company and not sure what else we can try
    don't think this is a pc issue - tried on pcs in the company, home pcs, personal pcs and all get this error
    got to be an issue with either the pdf, or the way its being sent
    i did reach out to OUR e-mail team here (lotus notes admin) and they've ruled out anything as far as an encryption causing the conflict may go, so notes isn't the issue either
    would it be possible it's on the persons end that's sending the file?

    Unfortunately, CR 10.5 is not supported on WIN 2012 Server. See this wiki for more details. In order to work in a supported environment you will have to upgrade to CR 2008 Service pack 7, or SAP Crystal Reports, developer version for Microsoft Visual Studio (2010 / 2012 / 2013).
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • There was an error opening this document. the file is damaged and could not

    Dear all, I am simpley reading pdf file & producing to browser with this servlet
    ( which i got this from same forum)
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Isotest2 extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException
    //String file = request.getParameter("file");
    String file = new String("d:/xyz.pdf");
    if (file != null)
    File f = new File(file);
    if (f.isDirectory())
    //Do something that identifies the file as a directory...
    } else
    //otherwise, open a stram, and begin the download...
    InputStream input = new FileInputStream(f);
    response.setContentType("application/pdf");
    response.setBufferSize(8192);
    response.setHeader("Content-Disposition","attachment; filename=\"" + f.getName() + "\"");
    OutputStream output = response.getOutputStream();
    int count = -1;
    byte[] buffer = new byte[8192];
    while((count=input.read(buffer))!= -1)
    output.write(buffer, 0, count-1);
    output.close();
    input.close();
    but it is unable to open pdf file giving error
    "There was an error opening this document. the file is damaged and could not be reapired"
    what is the problem? [ PDF  file is not damaged !]
    pls help me out
    thanks

    Probably because you aren't writing the last byte read every time through the while loop.

  • Crystal Reports Marketing Documents are requesting the DocNum and Type

    In 8.81 SP00 PL7, I have created a custom Purchase Order using Crystal Reports Developer (latest version supplied by Download Basket)  I have published the Purchase Order using the Report and Layout Manager and the SAP Add-In in CR.  However, everytime I go to preview or print a purchase order, I am prompted with a 'parameters screen' to enter the the document type (perhaps wrong terminology) and document number.  Once I enter it, I get the report.
    I was under the impression that if I enabled the report using the Report and Layout Manager or the SAP Add-in that the parameters would be set for me and automatically recognized.  By the way, I am using a stored proc to get the data and I have included these items in the stored proc, as in the default crystal report provided.
    Is there something else that I may be missing?  Or is this something that I should be submitting as a bug?
    Thanks in advance,
    Donald

    Hi Donald
    Have you named the parameters correctly with the SAP specific names including the @ at the end in your stored procedure so that they flow through into the parameter fields in the report itself?.  (Eg DocKey@ and ObjectId@)
    Also, DocKey@ needs to be used to get the value of DocEntry in the purchase order record rather than DocNum.
    Rob

  • When you open multiple documents, what's the rhyme and reason for the order the tabs are arranged?

    Hi, a student had a question and I honestly never thought about this: when you open multiple documents in Photoshop CS4, what's the rhyme and reason behind the order they're arranged in (left to right?). Sometimes they're in one order and sometimes they're in another, and it doesn't always correspond with the filenames or the order in which they were selected.
    Thanks, hope someone can enlighten us. It's probably really obvious, but... !

    My student says that's not exactly what she was asking. What she meant was, is the arrangement of multiple tabbed documents open within Photoshop (which one is furthest left, which one comes next to it, which one is furthest right etc) dependent on something? In what order they were opened, alphabetical, date created or what?

  • Passing multiple parameters (caption and textbox) to another form failing to pick up Caption

    I have an Microsoft Access application that is more like a form than a database. Users complete the form and then submit it to us for review. There are many questions and memo fields on the different forms (sections). Some of the memo forms are small due
    to the limitation of the size of the form (22 inches) therefore there is a lot of scrolling. I want to include a button on each question so that when users click on it will display a form where I pass the label caption (question) and the answer to this form.
    Alternatively I can have a expanded form for each question but that would require over 50 forms. The Application is quite large. I wanted to have one form and just call the different questions/answers.
    The below is working for the text box (AnswerTxt). However the CaptionTxt is not holding it's value when it gets to the new form. It's only displaying the name of the variable name, CaptionTxt
    On the form where the data resides I have:
    Private Sub test_Click()
    Dim CaptionTxt As String
    Dim AnswerTxt As String
    CaptionTxt = Me.lblSect11_5.Caption
    AnswerTxt = Me.Section11_5.Value
    Debug.Print CaptionTxt
    Debug.Print AnswerTxt
    DoCmd.OpenForm "Form1", OpenArgs:="CaptionTxt|" & AnswerTxt
    End Sub
    On the new form with an expanded memo field
    Private Sub Form_Load()
    Dim intPos As Integer
    Dim strControlName As String
    Dim strValue As String
    If Len(Me.OpenArgs) > 0 Then
    ' Position of the pipe
    intPos = InStr(Me.OpenArgs, "|")
    If intPos > 0 Then
    strControlName = Left$(Me.OpenArgs, intPos - 1)
    Debug.Print strControlName
    strValue = Mid$(Me.OpenArgs, intPos + 1)
    Debug.Print strValue
    ' Retrieve Control Name from the first part of the string
    Me.lblText11.Caption = Left$(Me.OpenArgs, intPos - 1)
    ' strControlName = Left$(Me.OpenArgs, intPos - 1)
    ' Retrieve Value to Assign from the end of the string
    Me.txt_Section11.Value = Mid$(Me.OpenArgs, intPos + 1)
    ' strValue = Mid$(Me.OpenArgs, intPos + 1)
    ' Assign the value to the control
    ' Me(strControlName) = strValue
    End If
    End If
    End Sub
    jim neal

    The below is working for the text box (AnswerTxt). However the CaptionTxt is not holding it's value when it gets to the new form. It's only displaying the name of the variable name, CaptionTxt
    It will, because you are passing it as a literal string with:
        DoCmd.OpenForm "Form1", OpenArgs:="CaptionTxt|" & AnswerTxt
    In this "CaptionTxt|" is a literal string, whereas AnswerTxt references the variable.  It should be:
        DoCmd.OpenForm "Form1", OpenArgs:=CaptionTxt & "|" & AnswerTxt
    You might be interested in the file Args.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    This little demo file illustrates how to pass multiple arguments, using a module originally developed by Stuart McCall and later expanded by me to allow the passing of named arguments.
    Ken Sheridan, Stafford, England

  • Wouldn't be a handy update if at the top of the open Pages document, next to the Apple and Pages menu option, it showed the open document name or file name?

    Just as the title says, really.

    I'm not sure where the Apple and Pages menu option is.  When I'm editing a document in iCloud Beta the name of the document is in the window caption (below).
    But your suggestions should be sent directly to Apple and you can do that via the Send Us Feedback button at the top of the document list page:

  • Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    I just got my mac a month ago so go easy on me but I was just working with the pages that was already on it, and then today I know it updated, and now I am unable to open a lot of my documents!:(  Idk what you mean by the icloud version lol sorry! As for the version, when I open pages from my apps and click 'about' it says version 5.1? And when I open the document it just goes grey and kind of blinks and doesnt open? No error message or any indication of why it will not open now when I for sure have opened it in the past! Andddd for the OS X I think it is 10.9.1 ??

  • Error with Adobe Acrobat X "error opening the document. The file is damaged and could not recover"

    Good morning,
    I have a problem when generating PDF files with Adobe Acrobat X.
    When I give print a Word document 2003 ... 2007 ... 2010 ... and select a network drive to save the PDF file, I get the following error "error opening the document. Thefile is damaged and not could recover."
    The file is saved on your drive well ... but I always get this error.
    Any ideas???
    Thank you.

    First of all thanks for responding.
    The installed version of Adobe's Adobe OS X and Windows XP machines is thelatest patch level.
    The local system .... works well ... Open Office 2010 ... create a new Word document and save it locally ... and all good.
    The problem is though that same machine ... it enters network (not Windows network. OES2 is a network with Novell network client) ... and to open and create a new document to WORD .... when printing the PDF printer ... select a network drive... and when the document is saved well ... but it shows the error.
    I have an amount of hours lost with this ... I hope you can help me find a solution.
    Thank you very much.

  • When I open a document , the document goes to the right of the screen and I cannot see it.

     I have HP Windows 7.   It happened when I initially purchased  computer in 2010 and now it happened again.  I tried to right click off the screen to drag it in but it doesn't work.
    It is doing this now when I download from an email and try to view the download and when I open a document in MS Word and Excel.

    This can happen if you have ever connected a second monitor,
    opened a document in that extended display,
    and then closed the document in that extended display...
    Later when you have only one monitor, that is, your main display, the document is still opening in that "ghost" monitor.
    I do not know if this is what you did, but if yes, then the fix may be as follows..
    Go back into your Display settings and set your monitor to display to just ONE (your main) display. 
    Your open documents should pull back into place in your main display area.
    Kind Regards,
    Dragon-Fur

  • Can no longer open Pages documents in LibreOffice

    I used to be able to open documents created and  saved as 'Word' documents in Pages with LibreOffice Writer.
    This is no longer possible.
    I can still open other documents created with Microsoft office and saved with the .doc extension in LibreOffice Writer.
    Is Pages now saving the documents in a non stanard 'Word' format?
    I have the latest version on the Word App on my iPad and I am using LibreOffice Writer Version 3.6.2.2 (Build ID: 360m1(Build:2))
    iPAD, iOS 4

    Without the iPad connected, open up iTunes on your computer.  Go to iTunes/Preferences/Devices and delete the backups that you're absolutely certain do not have the documents.  Refer to figure below.
    iTunes, select the iPad and then select the Summary tab.  Follow directions for Restore and be sure to say "NO" to creating a backup.  (You don't want to create a new backup that does not have the docs.)  You will then be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad.  This time, say "yes."
    Repeat all of the above as required until you get the docs.

  • Problem with opening cs4 document in cs5.5

    I have quite a big document of a catalog, created in InDesign cs4. It contains many layers and different master pages. When I open this document in cs5.5 layers and master pages get completely confused and the document looks completely different. When I created the inx-file in cs4 and opened it in cs3 everything was alright. Does anybody know what the problem in cs5.5 could the problem? Am I doing sth wrong?

    I've been looking at the file, and it is indeed a puzzlement.
    There is some good news, however. I don't know why it is happening (perhaps a bug, and maybe John would like to take a look at this, too), but it looks like the Paper-filled rectangle from Hinweise layer on the right of Master Ee is being copied to the left half of the actual document spreads on random layers. The pages that seem to be blank are easy to spot in the Page panel (22, 24, 26 & 32) and you can simply Cmd-Shift click on the rectangles on those pages to override and your text and graphics will be revealed. I'm not immediately picking up any other problems scanning quickly through the pages. For a quick and dirty get it done solution, I think this will work, though I would use the .inx file rather than the .indd for the conversion in CS5.5.
    I've looked through the file history, and it is long. This started out in 2007 in CS2 and has gone through updates in CS3 and CS4, and been recovered from crashes at least 4 times (which might have something to do with the strangeness). I also think there are a lot of extraneous unused frames on many of the pages. If it were my project, I'd probably clean it up as much as possible in CS4, even going as far as recreating the master pages in a new document and then going page by page and doing a copy/paste in place of all non-master objects into the new file if you don't want to spend the time to place everythign again from scratch, which in my opinion would be a better idea (I tried moving the pages to a new file, but that didn't make any difference in the CS5.5 conversion). You could also rebuild from Scratch in CS5.5.

  • How to open office document in read only mode

    Hi,
    I've a library that contains Excel Documents. I've create an access group with read permission.
    A user belonging to this group can open a document in Excel, do changes and save back the document to the library. This is not what I want.
    I want to allow users to open the document but not save it back to the library. How can I do it?
    Best regards.

    To check at the document level...
    1) Navigate to the document library and choose a random document that a user in that group should have access to
    2) Go to "View Properties" of the document. Choose "Shared With"
    3) Than choose "Advanced"
    This will bring up the specific permissions for a specified document. 
    Also for a test, try creating another permission level for a test user. 
    1) go to "Site Settings" 
    2) Choose "Site Permission"
    3) In the ribbon choose "Permission Levels"
    4) Choose to "Add a permission Level"
    5) Give the level a name... and only give it the access to read. Add a test user and see if you still get the same results. If not than you have you fix.
    Let me know if this helps
    Thanks, Danny Hickman IT Support Specialist

Maybe you are looking for