This website is not affiliated with, sponsored by, or approved by SAP AG.
SAP-OTHER (SAP Components and all other issues that do not fall under above categories)
3 posts • Page 1 of 1
Do you know the solution how to attach external documents like outlook messages, excel files to each sap posting (e.g journal entry) Normal way is to use transaction FB03, but using this I'm able to attach only one document at time. Is there any transaction which would attach the same document to 150 or more postings?
I don't have administrator access, I can only do it using transactions.
I've tried to make it faster by creating a VBA macro in Outlook 2003 which saves message in .msg format on hard drive, then opens sap, sendkeys to open fb03 but there is no button to "create attachment"
Any help would be appreciated
Nothing standard. You could try use SAP DMS to object link to a transaction but it doesn't come with an object standard to FB03 so you would have to create it with ABAP.
Specialist SAP DMS Consultant/Specialist SAP ArchiveLink Consultant
I have returned to above subject few days ago. Please see my solution for attaching emails directly from Outlook to SAP
If anyone is interested please see the VBA code I used in Outlook 2007 (vba saves email as msg on Z:\Test, copy the file path to clipboard then open SAP, FB03 input data from textboxes. Enters the document, opens create attachment window and then STOP
1) code which opens userform
2) JVForm has 3 text fields where you should put document no., fiscal year and company code. The same as in FB03. After clicking "proceed"
Private Sub CommandButton1_Click()
Dim Original As Outlook.MailItem
Dim subject As String
Dim MyText As DataObject, TextStr As String
Dim spath As String
Set MyText = New DataObject
Set Original = Application.ActiveExplorer.Selection(1)
Original.SaveAs "Z:\TEST\" & TextBox1.Text & ".msg", o1msg
spath = "Z:\TEST\" & TextBox1.Text & ".msg"
If Not IsObject(Wantuch) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set Wantuch = SapGuiAuto.GetScriptingEngine
If Not IsObject(connection) Then
Set connection = Wantuch.Children(0)
If Not IsObject(Session1) Then
Set Session1 = connection.Children(0)
If IsObject(WScript) Then
WScript.ConnectObject Session, "on"
WScript.ConnectObject Wantuch, "on"
Session1.findById("wnd/tbar/okcd").Text = "/nfb03"
Session1.findById("wnd/usr/txtRF05L-BELNR").Text = TextBox1.Text
Session1.findById("wnd/usr/ctxtRF05L-BUKRS").Text = TextBox2.Text
Session1.findById("wnd/usr/txtRF05L-GJAHR").Text = TextBox3.Text
Session1.findById("wnd/usr/txtRF05L-GJAHR").caretPosition = 4
Now user activates SAP FB03 session and pastes the path by CTRL + V
Unfortunatelly I don't know other solution for pasting the path where email is saved. I can't control explorer window (nothing works here , sendkeys, autohotkey..) If anyone knows the solution how to control the explorer window from VBA then kindly share
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests