How to Open OpenFileDiologe Box  from Business One

Hi....
        I want to Select .txt File From Required Location. on click event of Button.
Please Help

Hi venkat,
use the following code on item pressed event..
Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
Select Case pVal.ItemUID
Case "Btnbrowse"                   
Me.OpenFile()
end select
Private Sub OpenFile(ByRef BubbleEvent As Boolean)
Try
ShowFolderBrowserThread = New Threading.Thread(AddressOf ShowFolderBrowser)
If ShowFolderBrowserThread.ThreadState = ThreadState.Unstarted Then ShowFolderBrowserThread.SetApartmentState(ApartmentState.STA)
ShowFolderBrowserThread.Start()
ElseIf ShowFolderBrowserThread.ThreadState = ThreadState.Stopped Then
ShowFolderBrowserThread.Start()
ShowFolderBrowserThread.Join()
End If
Catch ex As Exception
sbo_application.MessageBox("OpenFile" & ex.Message)
End Try
Private Sub ShowFolderBrowser()
Dim MyTest As New OpenFileDialog
Dim MyProcs() As System.Diagnostics.Process
Dim filename As String
MyProcs = process.GetProcessesByName("SAP Business One")
If MyProcs.Length = 1 Then
For i As Integer = 0 To MyProcs.Length - 1
'// WindowWraper concepts are used to access open dialogue box of windows
Dim MyWindow As New WindowWrapper(MyProcs(i).MainWindowHandle)
MyTest.Filter = "Excel files (.xls)|.xls|Document files (.doc)|.doc|Presentation (.ppt)|.ppt|Adobe PDF Files (.pdf)|.pdf|Text Documents (.txt)|.txt" '|All Files (.)|."
'MyTest.InitialDirectory = "C:\Program Files\SAP\SAP Business One\Attachments"
'// Initial path for open dialogue box
'// We can change as per the requirements
MyTest.InitialDirectory = "C:\Program Files\SAP\SAP Business One\Attachments"
If MyTest.ShowDialog(MyWindow) = DialogResult.OK Then
                        filename = MyTest.FileName
.your validations........
Else
           System.Windows.Forms.Application.ExitThread()
   End If
end sub
Public Class WindowWrapper
Implements System.Windows.Forms.IWin32Window
Private _hwnd As IntPtr
Public Sub New(ByVal handle As IntPtr)
_hwnd = handle
End Sub
Public ReadOnly Property Handle() As System.IntPtr Implements System.Windows.Forms.IWin32Window.Handle
Get
Return _hwnd
End Get
End Property
End Class
to open the file you can use the follwing code on display button pressed.
Private Sub fileopen(ByVal filename As String)
        '// Opening specified document with reference to the filename distributed 
        Try
            System.Diagnostics.Process.Start(filename)
        Catch ex As Exception
            sbo_application.StatusBar.SetText("File Not Found in Specified Path:" & filename, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
        End Try
    End Sub
Regards,
Ganesh K

Similar Messages

  • How to open Crystal Reports from Business Content Ext BW

    Hi friends,
    I have activated 0CR_FIAA_M20_Q0007 Crystal Reports from Business Content Ext BW and I have configurated BW_Publisher services in BW but I do´t see reports in /CRYSTAL/RPTADMIN.
    I check RFC connection and it´s ok
    Here I can´t get a role
    and here I don´t see reports
    Do I have to create special role with especial authorization?
    How do I save this Crystal reports in a Rol?
    How do I open this Report ?
    I check Ingo Blog BusinessObjects and SAP - Publishing of Crystal Reports Part 1 of 3 
    but I think, I don´t have some configuration.
    Regards

    Hi,
    I can open report from Role thru CR 2013.
    Here SAP  2.0 folder y Rol
    Here, settings in /CRYSTAL/RPTADMIN are:

  • How to open "All Tabs" from previously shown pages history?

    Hi,
    How to open "All Tabs" from previously shown pages history. I am not asking about "Reopen from last session". I am asking about how to open all tabs from previous webpage links from a past date from history, currently its allowing me to select each page link manually by clicking it.
    Thank you!

    Select the first item you wish to open, scroll down to the last, Shift-click that one & all those between should be selected too. Double-click on them & they should all start to open... or you can copy & then drag/paste into a new or existing bookmarks folder.

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • How to open an Applet from a text link in a HTML Page

    Hi There
    How to open an Applet from a text link
    in a HTML page
    For example I have a HyperLink "Open Applet"
    When a user clicks that link i want to open a
    Applet in a AWT Window.
    How can i do this
    Will any one help me?
    -Ramya

    u can use javascript for that
    <SCRIPT language="javascript">
    function loadAppNow() {
    document.write("<APPLET ......></APPLET>")
    </SCRIPT>
    LoadApplet
    this will overwrite the applet on current window
    There are many good ways other than document.write to open in same window. I don't remember the syntax right now.
    Plz. refer to javascript tutorial for that.
    even you can insert the applet while retaining previous contents. its quite easy actually.
    regards....bhart

  • How to open a pdf from pdf target with page no using javascript

    Hi
    How to open a pdf from pdf target with page no using javascript
    Thanks in Advance.

    Hello,
    <p>Web.show_document calling .htm files saved on disk.....</p>
    Francois

  • How to open a RPD, from a linux folder? OBIEE 11g

    Hi,
    How to open a RPD, from a linux folder? Is there a tool, or any command line command to open the RPD?
    Thanks for your time and help.

    Hi,
    You cannot open an rpd on a Linux manchine.
    You have to install the client (Admin tool) on windows and open the rpd remotely in online mode
    Thanks
    Deva

  • TS4256 How to open .RAF files from Fuji camera?

    How to open .RAF files from Fuji camera in Aperture 3?

    Only these Fuji cameras are currently supported: http://www.apple.com/aperture/specs/raw.html
    Fujifilm
    FinePix S2 Pro
    FinePix S3 Pro
    FinePix S5 Pro
    FinePix X100**
    X-Pro1***
    X-A1***
    X-E1***
    X-E2***
    X-M1***
    X-T1***
    X20***
    X100S***
    If you have a different camera, use the software that came with your camera to develope the RAW files and convert them to a different lossless format, that Aperture recognizes.

  • Exel to open automaticially after expeorting from Business One

    Hi guys
    How can make excel to open up after exporting with the data. I have a few PC's which do it and a few which save it but won't opoen the file up automaticially. Where would the setting be??
    Thanks a lot

    This is usually related to user right to the file for Autoopen.Xls.  You could allocate the file under ..Program Files\SAP\SAP Business One\ExclDocs if it is local.  If it is under shared folder, the user has to got full right to the folder.
    Thanks,
    Gordon

  • Error while opening in-box from ESS

    We have a user in SAP, and he has 1200 unread  doc in his In-box. If this user tried to open his in-box from ESS, he will get an error
    Any idea How to resolve it ?
    Regards
    Suraj

    Suraj,
    Can you kindly post the error.
    James

  • How to open the files from the system

    Hai to all
    Here I am doing a project where I have to put backup word files on the browser . I have created an applet with browse , attach and done (Buttons) . By clicking browse I have to get the open dialog box so that i can give the path easily . Any one can help me in that action event.

    If you're calling FileDialog from an applet via a browser you will throw a security exception (check the browser's Java console). As mentioned in my previous post unless your applet is digitally signed opening a FileDialog is not possible (however it is possible using appletviewer as that tool considers the applet "trusted").

  • How to edit Printed Documents in Business One

    When you print any documents in SAP Business One the status field become Open-printed thereafter i am not able to edit the document.How to edit this document after printing it?

    Hello,
    It is possible to update particular fields in existing marketing documents as of SAP Business One 2005 A SP01. You may refer to SAP Note  941272 for detailed information or just check below.
    Regards,
    Canna Mu
    SAP Business One Forums Team
    Business scenario                                                                               
    Solution                                                                               
    As of SAP Business One 2005 A SP01, it is possible to update the data of specific fields after the documents are added, under certain conditions, listed below.                                                                               
    -  This solution is available for Italy, Japan, UK, US, Spain, Sweden, Norway, and Finland.                                                                               
    1. Due Date                                                                               
    If the documents listed below are fully opened, that is, the documents were not fully or partially drawn to a target documents, or were not fully or partially paid, you can change their due date:                                                                               
    o  A/R Invoice & A/P Invoice                                                                               
    o  A/R Down Payment Request & A/P Down Payment Request                                                                               
    o  A/R Down Payment Invoice & A/P Down Payment Invoice                                                                               
    o  A/R Reserve Invoice & A/P Reserve Invoice                                                                               
    o  A/R Credit Memo & A/P Credit Memo                                                                               
    Additional Information:                                                                               
    Installments:                                                                               
    -  In the case of one installment only, if you change the due date in the document header, the due date of the installment is updated accordingly. The opposite also occurs; if you change the due date of the installment, the due date in the  document header is updated accordingly.                                                                               
    -  In the case of more than one installment, you can change the due date of each installment, but only a change in the due date of the latest installment updates the due date in the document header accordingly.                                                                               
    -  There is no option to change the number of installments.                                                                               
    Journal Entries:                                                                               
    -  If you change the due date of a journal entry created by a document, the due date of the respective document is not  updated.                                                                               
    -  If you change the due date of document or installment, the due date of the respective row in the journal entry created by that document/installment is updated accordingly.                                                                               
    2. Payment Method                                                                               
    If the documents listed below are fully opened, that is; the documents were not fully or partially drawn to a target documents, or were notfully or partially paid, you can change their Payment Method:                                                                               
    o  A/R Invoice & A/P Invoice                                                                               
    o  A/R Down Payment Request & A/P Down Payment Request                                                                               
    o  A/R Down Payment Invoice & A/P Down Payment Invoice                                                                               
    o  A/R Reserve Invoice & A/P Reserve Invoice                                                                               
    o  A/R Credit Memo & A/P Credit Memo                                                                               
    o  Delivery & Goods Receipt PO                                                                               
    o  Return & Goods Return                                                                               
    3. Sales Employee/Buyer                                                                               
    You can change the sales employee or buyer data for all the documents listed in section #2 at any time (including after the document is closed), at both document and row level.                                                                               
    If the change is done at the document level, a message asking the user whether to apply the change on the rows appears.                                                                               
    4. Owner                                                                               
    You can change the owner of all the documents listed in section #2 at any time (including after the document is closed), at both document and row level.                                                                               
    If the change is at the document level, the row owner is automatically updated accordingly.                                                                               
    5. Pay To/Bill To                                                                               
    You can change the Pay To or Bill To data for all the documents listed in section #2, only if the documents are fully opened. That is; the documents were not fully or partially drawn to a target document, or were not fully or partially paid.                                                                               
    6. Payment Terms                                                                               
    You can change the payment term of Delivery, Goods Receipt POs, Return, and Goods Return only if the documents are fully opened. That is; the documents were not fully or partially drawn to a target documents.                                                                               
    7. Text Rows                                                                               
    You can modify the text of existing text rows in all of the documents listed in section #2, at any time (including after the document is closed). However, you cannot add new text rows or delete existing ones.                                                                               
    8. Printing                                                                               
    If you make one or more of the above mentioned changes after the document is printed, the next printout, which takes place after the change, reflects the changes and includes the title "Amended".                                                                               
    -  Note that only print layouts that save the printing information, indicating whether or not the document was printed, include the title "Amended".                                                                               
    9. Change Log                                                                               
    All the changes described above are documented in the Change Log window.                                                                               
    10. Authorizations                                                                               
    Only authorized users can submit the changes described above. For this purpose the following authorizations are added to the Authorizations window:                                                                               
    o  Modify Posted A/R Documents - to enable changing sales documents. Located under Sales - A/R authorization entry.                                                                               
    o  Modify Posted A/P Documents - to enable changing purchasing documents. Located under Purchasing A/P -> Purchase Order.

  • How to open a scanner from Forms

    HI,
    Can any one tell me how can I open a scanner from the click of a button . I know u can use the HOST command to call an exe file . But its not working . Please let me know if any one has an Idea .
    Thanks in advance.

    hi
    use OCX control if u are using Forms6i
    then call some packages
    1) AdminLib_CONSTANTS
    2) ImgeditLib_CONSTANTS
    3) Wang_Scan
    4) Wang_Admin
    5) Wang_Edit
    6) Wang_Scan_Events
    then call from button
    declare
    my_ole OLEOBJ;
    dummy number;
    begin
    forms_ole.activate_server('scan');
    my_ole := forms_ole.get_interface_pointer('SCAN');
    if Wang_Scan.ScannerAvailable(my_ole) <> 0 then
    dummy := Wang_Scan.StartScan(my_ole);
    else
    message('no scanner found !');
    message('no scanner found !');
    end if;
    end;
    Rizwzn

  • Cannot open UDO in SAP Business One

    Hi experts,
    We have successfully created a UDO in SAP Business One and we have inserted it in Main Menu under the Sales Module.
    When we click the UDO it does not open. We have already checked the authorization and user licenses (professional) and everything seems
    fine.
    Can you please advice on how to proceed?
    Has anyone faced this issue before?
    We are using SAP Business One 9.0 PL:05
    Thank you in advance.
    Kind regards,
    Vassilis Korolis

    Hi Vassilis,
    Please check that if you have allotted SAP ADDOns License to this User.
    If you want that User can access UDO's then you have to allot SAP ADDOns License in License Administration window.
    Hope this help
    Regards::::
    Atul Chakraborty

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

Maybe you are looking for

  • Logical limit on Select clause

    I am working on Oracle 10g 10.2.0.3 and I cannot select more than 1000 columns using SQL. But I could select more than 1000 columns in Oracle 11g R2. What is the limit on number of columns that can be selected in a select query on Oracle 11g R2? Also

  • Itunes 10.5 DMG won't open, itunes 10.5 DMG won't open, itunes 10.5 DMG won't open

    Downloaded itunes 10.5 dmg open it after download chesum error shows when skipping de cheskum check and installing itunes it won't install! in console the description beneath shows. Can some one please help me? 12-10-11 23:27:33,449 installd: Package

  • File Content conversion for Fiexed length output file

    Hi, I am Working on Idoc to File scenario. I would like to know the content conversion partmenrts for the follwoing structure. Structrure is as below: Message Type   Header Record  1..unbounded .    Field1   0...1 .    Field2   0...1 .    Field3   0.

  • Internal copy of sales order (ZORI) is printing on printer

    Internal copy of sales order (ZORI) is printing on printer each time a credit block is released for only 1 user regarding the ZORI. The printing has started automatically about a year ago. Her colleagues don't get the printout when they release credi

  • Can universe connect to restful web service which is not soap based

    Can universe connect to restful webservice? I know it is allowed to connect to SOAP webservice. Currently is using WSDL1.1. How about restful web service which does not have any wsdl file?