Goods Movement via Excel VBA

Dear All,
Manually(MIGO) we can input rcv/issue data in SAP.
I need some VBA example code, where I can input for MIGO data in excel and it will save into SAP via VBA code.
How can I do this? Can anybody help me?
Thanks in Advance.

close

Similar Messages

  • RFC CALL VIA EXCEL VBA

    Hello,
    Hope someone call help with the following.
    I am trying to retrieve data from a table within SAP by using the following Excel VBA code.
    Sub retrieve_table_contents()
    Dim R3, MyFunc, App As Object
    Dim SEL_TAB, NAMETAB, TABENTRY, ROW As Object
    Dim Result As Boolean
    Dim iRow, iColumn, iStart, iStartRow As Integer
    iStartRow = 4
    Worksheets(1).Select
    Cells.Clear
    'Create Server object and Setup the connection
    Set R3 = CreateObject("SAP.Functions")
    R3.Connection.System = "QA2"
    R3.Connection.client = "900"
    R3.Connection.user = "mbrough"
    R3.Connection.password = "st34lh"
    R3.Connection.language = "EN"
    If R3.Connection.logon(1, False) <> True Then
       Exit Sub
    End If
    'Call RFC function TABLE_ENTRIES_GET_VIA_RFC
    Set MyFunc = R3.Add("TABLE_ENTRIES_GET_VIA_RFC")
    Dim oParam1 As Object
    Dim oParam2 As Object
    Dim oParam3 As Object
    Dim oParam4 As Object
    Set oParam1 = MyFunc.exports("LANGU")
    Set oParam2 = MyFunc.exports("ONLY")
    Set oParam3 = MyFunc.exports("TABNAME")
    Set oParam4 = MyFunc.Tables("SEL_TAB")
    oParam1.Value = "E"
    oParam2.Value = ""
    oParam3.Value = "LAGP"
    If frmQuery.txtSelect <> "" Then
        oParam4.Rows.Add
        oParam4.Value(1, "ZEILE") = frmQuery.txtSelect
    End If
    Result = MyFunc.CALL
    If Result = True Then
      Set NAMETAB = MyFunc.Tables("NAMETAB")
      Set SEL_TAB = MyFunc.Tables("SEL_TAB")
      Set TABENTRY = MyFunc.Tables("TABENTRY")
    Else
        MsgBox MyFunc.EXCEPTION
        R3.Connection.LOGOFF
        Exit Sub
    End If
    Result = R3.TABLE_ENTRIES_GET_VIA_RFC(EXCEPTION, LANGU:="E", ONLY:="", TABNAME:="LAGP", SEL_TAB:=SEL_TAB, NAMETAB:=NAMETAB, TABENTRY:=TABENTRY)
    'Quit the SAP Application
    R3.Connection.LOGOFF
    If Result <> True Then
      MsgBox (EXCEPTION)
      Exit Sub
    End If
    'Display table header
    iColumn = 1
    For Each ROW In NAMETAB.Rows
        Cells(iStartRow - 1, iColumn) = ROW("FIELDNAME")
    '   For C and N datatypes, explicitly set the cell to TEXT format, otherwise leading zeroes will be lost
    '   when numbers are imported from a SAP text field
        If ROW("INTTYPE") = "C" Or ROW("INTTYPE") = "N" Then
            Range(Cells(iStartRow - 1, iColumn), Cells(iStartRow - 1 + TABENTRY.Rowcount, iColumn)).Select
            Selection.NumberFormat = "@"
        End If
        Cells(iStartRow, iColumn) = ROW("FIELDTEXT")
        iColumn = iColumn + 1
    Next
    Range(Cells(iStartRow - 1, 1), Cells(iStartRow, NAMETAB.Rowcount)).Font.Bold = True
    'Display Contents of the table
    iColumn = 1
    For iRow = iStartRow + 1 To TABENTRY.Rowcount
        For iColumn = 1 To NAMETAB.Rowcount
            iStart = NAMETAB(iColumn, "OFFSET") + 1
    '       If this is the last column, calculate the length differently than the other columns
            If iColumn = NAMETAB.Rowcount Then
                iLength = Len(TABENTRY(iRow, "ENTRY")) - iStart
            Else
                iLength = NAMETAB(iColumn + 1, "OFFSET") - NAMETAB(iColumn, "OFFSET")
            End If
    '       If the fields at the end of the record are blank, then explicitly set the value
            If iStart > Len(TABENTRY(iRow, "ENTRY")) Then
                Cells(iRow, iColumn) = Null
            Else
                Cells(iRow, iColumn) = Mid(TABENTRY(iRow, "ENTRY"), iStart, iLength)
            End If
        Next
    Next
    'Format the Columns
    Range(Cells(iStartRow, 1), Cells(iStartRow + TABENTRY.Rowcount, NAMETAB.Rowcount)).Select
    Selection.EntireColumn.AutoFit
    End Sub
    However when I run the code I get the following exception message. 'SYSTEM_FAILURE' and nothing is returned.
    Does anyone know why this is?
    Thanks,
    Mike

    You can send data from excel to the MII message listener with a simple http post.
    Message format requirments can be found here:
    [http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm|http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm]
    Edited by: Christian Libich on Aug 10, 2009 10:14 PM

  • Fill a PDF form via Excel (VBA) - Hide text box

    Hi,
    i already created a PDF form and also can fill the text boxes with Excel VBA.
    Now i'm about to hide some fields if they are empty, but i have no clue how to.
    My code to fill the fields is:
    Fields("Title").Value = Worksheets(TabName).Cells(actCell, 4).Value
    To hide a field the code should be similar, but i have no clue what statement i need to set.
    I already tried:
    Fields("Title").Visible = False
    Fields("Title").Hide
    Fields("Title").Hide = True
    What else can i type to hide and unhide the fields?
    Looking forward to hear from you.
    Thanks a lot.

    Does the form have a provision to insert images (e.g. a Browse button)?
    [topic moved to iOS subforum]

  • How to call Copy.GetItem Method in Excel vba function

    Hi,
    I want to use sharepoint copy services to download/upload or retreive field information of a sharepoint file.
    For that i want to sharepoint web services. One class among them is copy. I want to call the GetItem method present in that class.
    Think that modules are not installed or not found in excel vba editor tools reference library list to enable.
    So please provide me the steps from scratch to install the sharepoint library. and call the Copy class methods in my script.
    Just send me a sample vba code to accomplishes the same requirement. I appreciate the help.
    Regards,
    SUBBA

    Hi SUBBA,
    The following articles for your reference:
    VBA - Download files from sharepoint
    http://ckannan.blogspot.com/2012/09/vba-download-files-from-sharepoint.html
    Using Microsoft Windows SharePoint Services with the Microsoft Office System
    http://msdn.microsoft.com/en-us/library/office/aa159897(v=office.11).aspx
    How to download a file from a Sharepoint server via Excel VBA?
    http://www.justanswer.com/computer-programming/7ntq7-download-file-sharepoint-server-via-excel-vba.html
    About the Excel VBA questions, you can also post it to Excel for Developers Forum, you will get more help and confirmed answers from there.
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev<o:p></o:p>
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Process Order - Goods Movements

    Hi All,
    I am working with the process order (COR2/COR3). From the general data tab of the process order I am navigating to Documented Goods movements via the path Goto --> Lists --> Documented Goods movements.
    I need to generate a report of these docs. I am just checking if there is any FM available for this. I did the search and could not find any. I am aware that these are available in the table MSEG which we can parse by the material no and the process order no. Is this the right way to get a list of these docs or do we have a better approach or any FM which I am missing.
    Please drop in your inputs.
    Thanks.

    This info is available in the table AUFM - Goods movements for order .

  • I rented a movie via Itunes on  my PC but half-way through the download recieved a "An unknown error has occured (-50)" notification. This is not my first rental, and I have verified my network and all connections to be good. Will I still be charged?

    I rented a movie via Itunes on  my PC but half-way through the download recieved a "An unknown error has occured (-50)" notification. This is not my first rental, and I have verified my network and all connections to be good. I have rebooted Itunes and resumed the download of the movie only to receive the same error code. Has the movie file been corrupted? Can I recover the rental even though the time has elapsed? Will I be charged?

    Did you figure this out?  I haven't rented a movie in this new iTunes yet and saw one tonight I wanted to rent.  Same fricken thing is happening to me.  I hate this new iTunes, and I really hate that there are problems like this....why the heck do they have to fix something that isn't broken and break it?  This just really stinks.

  • Different movement types for goods issue via outbound delivery

    Hi gurus,
    How can I use different movement types for goods issue via outbound delivery?
    Thanks&Best Regards,
    Burcu

    To use different schedule lines, we need different item types and different document types. Is that right?
    Is there a user exit in outbound delivery to post goods issue?
    Thanks...

  • Illustrator VBA scripting 101 - via Excel

    This post will attempt to introduce newcomers to Illustrator Visual Basic Scripting (well, not actually vbs, but rather tru VBA, Visual Basic for Applications). I personally prefer vba over bvs for a number of reasons. First, I always have Excel and Illustrator open, so it makes sense for me use it to drive Ai. Second, I usually need to transfer data between the two programs. Third...I love the Excel IDE...ok, let's get right into it.
    - Open Excel
    - hit Alt+F11, to bring up the editor
    - in the Tools menu, click on References...
    - add a reference to "Adobe Illustrator CS5 Type Library"
    - in the Personal.xls (or in any other book) add a Module. Personal is a global workbook that is always available. If you don't see it, go back to Excel and record a macro, anything will do. That will create the Personal file.
    - and type the following in that module
    - we have to continue the tradition and do the "HelloWorld" script
    Sub helloWorld()
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim iframe As Illustrator.TextFrame
        Set idoc = iapp.ActiveDocument
        Set iframe = idoc.TextFrames.Add
        iframe.Contents = "Hello World from Excel VBA!!"
        Set iframe = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub
    - save Personal book
    - open Illustrator and create a new document first
    - to run, move the cursor anywhere inside the Sub...End Sub and hit F5
    that's it for now...in the following posts we'll move the text to the middle of the page, create new documents, get data from an Excel Range to Illustrator, get data from Illustrator text frame to an Excel Range...and more, hopefully.
    questions? comments?

    Lesson 4: Creating Shapes, Working with Selections, writing data to Excel
    In the Illustrator world a shape is a....well, I'm not going to bore you with technical terms only rocket scientists would understand....let's just say a Circle is a shape, as well as a Rectangle or a Star, there much better than the actual definition. Then in the scripting lingo all shapes are pathItems.
    There are a number of ways of creating shapes, in this exercise well focus on using the various Methods of the PathItem Object.
    to create a Circle we'll use the Ellipse Method, all arguments are optional, if we don't supply any, the method uses default values.
    Ellipse
    ([top as Double]
    [, left as Double]
    [, width as Double]
    [, height as Double]
    [, reversed as Boolean]
    [, inscribed as Boolean])
    Dim icircle As Illustrator.PathItem
    Set icircle = idoc.PathItems.Ellipse(300, 300, 100, 100)
    similarly, to create a square, we use the Rectangle Method
    Dim isquare As Illustrator.PathItem
    Set isquare = idoc.PathItems.Rectangle(200, 200, 100, 100)
    and to make a star we use the...hum...the Star Method
    Dim istar As Illustrator.PathItem
    Set istar = idoc.PathItems.Star(400, 400, 100, 50, 5)
    now lets select the square and read some of its properties and write them down to Excel
    isquare.Selected = True
    get properties of the top most selection, in case we have many items selected, for now it should only be the square
        w = idoc.Selection(0).Width
        h = idoc.Selection(0).Height
        y = idoc.Selection(0).top
        x = idoc.Selection(0).left
    and lets write those values to Excel, using the Cells object this time. Make sure you have a blank Excel book open, it will write data to the first 4 rows, 2 first columns
        Cells(1, 1) = "width: "
        Cells(1, 2) = w
        Cells(2, 1) = "height: "
        Cells(2, 2) = h
        Cells(3, 1) = "top: "
        Cells(3, 2) = y
        Cells(4, 1) = "left: "
        Cells(4, 2) = x
    here's the complete code, from now on, we'll start every exercise with a blank Excel book and a blank Illustrator document, so please do that before runing.
    Sub lesson4shapes()
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim icircle As Illustrator.PathItem
        Dim isquare As Illustrator.PathItem
        Dim istar As Illustrator.PathItem
        Set idoc = iapp.ActiveDocument
        Set icircle = idoc.PathItems.Ellipse(300, 300, 100, 100)
        Set isquare = idoc.PathItems.Rectangle(200, 200, 100, 100)
        Set istar = idoc.PathItems.Star(400, 400, 100, 50, 5)
        isquare.Selected = True
        w = idoc.Selection(0).Width
        h = idoc.Selection(0).Height
        y = idoc.Selection(0).top
        x = idoc.Selection(0).left
        Cells(1, 1) = "width: "
        Cells(1, 2) = w
        Cells(2, 1) = "height: "
        Cells(2, 2) = h
        Cells(3, 1) = "top: "
        Cells(3, 2) = y
        Cells(4, 1) = "left: "
        Cells(4, 2) = x
        Set istar = Nothing
        Set isquare = Nothing
        Set icircle = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub
    Note that the code we just wrote is not the most efficient way of doing things, we don't have to select an object in order to work on it (get the properties for instance). We did it for illustration purposes, we could also use a loop to write data to Excel. We'll do that in the next lesson.
    also, note that the top/left values don't match exactly with the values we entered (200, 200), homework, can you tell why?

  • Can no longer play movies via home sharing on Apple TV 2

    I'm having trouble sharing movies via iTunes through home sharing.  Everything I have is Mac, a 2008 iMac, Airport Extreme, (2) Apple TV 2's, and a Macbook Pro.  Everything was fine with this entire setup with all of the movies I've ripped (using the Apple TV 2 settings in Handbrake) until Lion came out. Suddenly I got the 'Content cannot be displayed. Try again later' error message.  After much searching, I found that disabling IPv6 was a good solution, temporarily, that is until Apple released iOS 5.  I updated the ATV2's, iPhone, and iPad, and iMac with everything that came out during the update, and the issue came back.
    I've tried everything I can think of, changing router channels, disabling IPv6 everywhere I saw it, wireless, hardwired, reloading the library, disabling the firewall, countless restarts of all my equipement etc.  All of these movies worked perfectly before the updates, and suddenly I cant stream anything through my local MAC network. 
    Has anyone else seen this? Has anyone found any solutions for this problem? I could really use the help, Apple support is... limited. 

    Problem solved for me!  After trying every possible setting on my equipment, including changing firmware revs on my router, rebuilding my library, re-encoding certain movies, changing all my iTunes, Network, Security, Sharing, and WiFi settings, I finally figured it out. 
    It looks to be a bug with the new iOS release V4.4 - Assuming you have your movies encoded in 5.1AC3 surround, you have to go into the Audio & Video settings on your ATV2, go down to Dolby Digital, and change the setting from Auto to On.  For me at least, it was simple as that.  I've tried all the same movies I was trying to play before, only then I was getting 'An error occurred loading this content.'  After changing the setting from Auto to On, every single movie began working again, in full surround sound. To test it, I switched the setting back to Auto and the same problem came back.  I'm sure Apple will have a fix for this later, but for now, we can assume 'Auto' means 'You cant stream your movies.'
    I hope this helps!

  • Enhancement in MIGO for Goods Movement

    Hi Gurus,
    I got a requirement to Create a 262 goods movement materials document with reference to a Sub-Contract GR for an account assigned Sub-Contract PO thru TCODE MIGO. The details are describe as follow:
    Once the 101/543 GR movement is carried out, a 262 movement type needs to be executed to reverse the consumption of the material against the service order and bring it back to the inventory (open stock). This movement needs to be triggered once MIGO ‘subcontractor goods receipt -101/543’ is committed (saved).
    When the 101/543 GR movement transaction MIGO is saved-
    1.     User exit needs to be invoked
    2.     Check if the GR is
    o     for an account assigned (EKPO- KNTTP Acct Assignment Cat =F) Sub-Contract PO (EKPO- PSTYP  Item Category L)
    o     AND the service order number (AUFNR) exists in ZXXXXXX (ZSUBCON_VALIDATION) table
    3.     Identify the line item material in the goods receipt document (First item /against movement type 101),
    4.     Identify the service order number (AUFNR) from ZSUBCON_VALIDATION table.
    5.     Call the goods issue (262) transaction via the BAPI using the material derived via step 3 and against the service order number derived via step 4. BAPI_GOODSMVT_CREATE  post goods movements

    Hi Matt,
    There are lots of Exits and BADI available in this transaction. See which suits you.
    Enhancement                                                                               
    MB_CF001                                Customer Function Exit in the Case of Updating a Mat. Doc.   
    MBCF0011                                Read from RESB and RKPF for print list in  MB26              
    MBCF0010                                Customer exit: Create reservation BAPI_RESERVATION_CREATE1   
    MBCF0009                                Filling the storage location field                           
    MBCF0007                                Customer function exit: Updating a reservation               
    MBCF0006                                Customer function for WBS element                            
    MBCF0005                                Material document item for goods receipt/issue slip          
    MBCF0002                                Customer function exit: Segment text in material doc. item                                                                               
    Business Add-in                                                                               
    MB_DOCUMENT_UPDATE                      BADI when updating material document: MSEG and MKPF          
    MB_DOC_BADI_INTERNAL                    BAdIs During Creation of a Material Document (SAP Internal)  
    MB_ME_CSGMT_BADI_SAP                    BAdI: Consignment Processing - Stock Transfer                
    MB_MIGO_BADI                            BAdI in MIGO for External Detail Subscreens                  
    MB_MIGO_ITEM_BADI                       BAdI in MIGO for Changing Item Data                          
    MB_PHYSINV_INTERNAL                     Connection: Core Inventory and Retail AddOn                  
    MB_QUAN_CHECK_BADI                      BAdI: Item Data at Time of Quantity Check                    
    MB_RESERVATION_BADI                     MB21/MB22: Check and Complete Dialog Data                    
    MB_RESERVATION_SCR                      Screen BAdI for Retrofit DFPS                                
    MB_RESERVATION_UPCHD                    BAdI for Creation and Changing of Manual Reservations        
    MB_RES_BAPI_CHANGE                      BAdI: Execution of Changes to Reservation Fields             
    MB_RES_BAPI_CREATE1                     BAdI: Adoption of Customer's Own Fields as Reserv. Fields    
    MB_RES_BAPI_DETAIL1                     BAdI: Display of Customer's Own Fields in Reservations       
    MB_STOR_LOC_BADI_GTS                    BADI to Check and Change Storage Location (GTS Fct. Only)    
    MB_DOCUMENT_BADI_SAP                    BADI for Creation and Changing of a Material Document        
    ARC_MM_EBAN_CHECK                       BAdI: Enhancement of Archivability Check (MM_EBAN)           
    ARC_MM_EBAN_PRECHECK                    BAdI: Enhancement of Archivability Check (MM_EBAN)           
    ARC_MM_EBAN_WRITE                       BAdI: Enhancement of Scope of Archiving (MM_EBAN)            
    ARC_MM_EINA_CHECK                       BAdI: Enhancement of Archivability Check (MM_EINA)           
    ARC_MM_EINA_WRITE                       BAdI: Enhancement of Scope of Archiving (MM_EINA)            
    ARC_MM_INVBEL_CHECK                     BAdI: Enhancement of Archivability Check (MM_INVBEL)         
    ARC_MM_INVBEL_WRITE                     BAdI: Enhancement of Scope of Archiving (MM_INVBEL)          
    ARC_MM_MATBEL_CHECK                     Prüfung ADD-ON-spezifischer Kriterien für MM_MATBEL          
    ARC_MM_MATBEL_WRITE                     Check Add-On-Specific Data for MM_MATBEL                     
    MB_CHECK_LINE_BADI                      BAdI: Check Line Before Copying to the Blocking Tables       
    MB_CIN_LMBMBU04                         posting of gr                                                
    MB_CIN_MM07MFB7                         BAdI for India Version exit in include MM07MFB7              
    MB_CIN_MM07MFB7_QTY                     Proposal of quantity from Excise invoice in GR               
    MB_DOCUMENT_BADI                        BAdIs During Creation of a Material Document                 
    Regards,
    Atish

  • Error message (M3024) during parallel goods movement

    For publication distribution, collected unreferenced deliveries and goods issues are done in SAP system for a customer group by a program which is triggered by a web service every day. Standart SAP functionalities are used in this program. At goods issue part of program, an error message is occuring "Valuation data for material &  is locked by the user &" with error code :M3024. The user who processes the program is locking himself. Also we have checked the other goods movement types in standart transactions (MB1B-MB11..)and same problem was occured. We have checked the notes that we applied before for to avoid material lock in paralel goods movement. There is nothing changed both in customizing and deveploment after upgrade. So we couldnt find the way to fix this problem. FIRST ANSWER FROM SAP***************************************** Can you kindly review the attached note 70865 with regards to this issue. WE APPLIED.-- We reviewed 70865 and this solution not applicable for our current system. According to note; We set material late lock exclusive time 15 seconds in OMJI. This solution solved material lock error at all plant level. After this solution, We get same batch error during goods movement(m3862), Then We applied note 157423, this note solved material batch lock error during goods movement, At last we have now m3024(Material valuation error lock) error during all goods movement. THEN********************************* As explained in the note 70865 , to ensure data integrity, it is necessary to block the material against updates by other users during good movements. This is achieved by blocking the material plant (lock object MARC) and the material valuation area (lock object MBEW) exclusively against othertransactions which update the material master. What you can do, as advised in the note, is to activate the late block via transaction OMJI. As a result of this change, several users will be able to carry out good movements to the same material and plant simultaneously. The problem is that you will experience a disadvantage of performance loss after this change. Please, notice that with this change in OMJI, several users will be ableto carry out GOODS MOVEMENTS to the same material and plant simultaneously. This change will not allow the simultaneous input of a goods movement and an invoice for the same material (in this case, the material will be locked as soon as the purchase order item is adopted in the invoice and the error message M3024 will occur). When the error message M3024 occurs, you could check with transaction SM12, there you could find some tables like MBEW are locked by user. The table is locked to prevent valuation, quantity etc. to be updated. System does not check if it is standard price or MAP, as soon as you work with one material it will be locked (its valuation data has to be locked, because otherwise there is no guarantee of the consistency of the stock values. Without this lock mechanism the possibility of serious data inconsistencies could arise). your customizing under: SPRO > IMG > Material Management > Set up Material block for goods movements Here you could choose setting 2(at positing) to have only a short locking period at posting. Please review information in attached notes. 521945 FAQ: Material block 322989 Late block: Number of blocking attempts AT LAST ** PROBLEM STILL GOING ON WHAT SHOULD WE DO TO SOLVE THIS ERROR.

    HI Fatih,
    Refer to SAP Note 1744780 - Error message M3024 during Invoice Verification process .
    In the standard system it is not possible the simultaneous entry of a GOODS MOVEMENTS and an INVOICE for the same material and the same plant.
    When you enter the invoice for the purchase order item, the valuation data for the material is updated, therefore this valuation data (table MBEW) needs to be blocked so that it is not changed at the same time by any other transaction (which might cause inconsistencies).
    Resolution
    This system behavior can not be avoided by any customizing setting or any user exit.
    This is correct system behavior to protect the other transactions update the material master.
    As advised in the note 70865 :
    It is possible to activate the late block via transaction OMJI. As a result of this change, several users will be able to carry out good movements to the same material and plant simultaneously, however there is a risk to cause the data inconsistency and performance problems.

  • Is it possible to move the rsw.vba file to a shared directory?

    As I create more global functions, contants, variables, subs etc., this file will get very important. So Important that I suspect if it were somehow to become corrupt, deleted or lost most or all of my scripts would be broken. Right now I don't have source control software so I would like to store this file on our fileserver. I have already moved my repositories, scripts and DataBank Files to this location.
    Thanks in advance,
    hagstal

    Hagstal
    i don't believe is possible to move the RSW.vba file to a shared directory, however you can just copy the file across different machines.
    I would also strongly recommend that, (if this file is gonna become so important) to use a source control system, SVN and tortoise make a very good combination
    (http://tortoisesvn.tigris.org/).
    Have a look at this thread, it has some other ideas on how to share your RSW.vba file
    http://qazone.empirix.com/thread.jspa?threadID=411&tstart=0
    Message was edited by: aamat

  • Problem with controlling Annotations from Excel VBA

    Hi,
    I have a PDF document that has plenty of sticky notes attached to it. These sticky notes have been added by multiple authors on all pages of the document. I am trying to import the contents of these sticky notes, their author and the page number to an excel spreadsheet.  I am using Excel 2007 and Acrobat Professional 9.0.
    This is the code that I am currently using to import the sticky notes, but the problem that I am facing is that when I run the macro -
    Same sticky note contents, author and page numbers are imported multiple times
    Not all sticky notes are imported, only some of them appear in the final excel spreadsheet
    When I compare the number of sticky notes to that in the original PDF file, the number is correct. But the content is repeated content and that is the reason why only some of the sticky notes are imported.
    This is an activity that I need to do on regular basis and the number of sticky notes that I need to import to excel may range between 100 to 200. It is really difficult to do this task manually, so an excel VBA macro could prove really helpful.
    Sub ImportComments_Click()
    Dim Fpath As String
    Dim WordObj As Object
    Dim wbkOutput As Excel.Workbook
    Dim iRow As Integer
    Dim i, j, k As Integer
    Dim lRet As Long
    Dim objAcroAVDoc As New Acrobat.acroAVDoc
    Dim objAcroPDDoc As Acrobat.AcroPDDoc
    Dim numPages As Long
    Dim lAnnotscnt As Long
    Dim Subtype As String
    Dim NumComments As Long
    Dim AcroApp As Acrobat.AcroApp
    Dim objAcroPDPage As Acrobat.AcroPDPage
    Dim annot As Acrobat.AcroPDAnnot
    Sheets("Defect Log").Select
    Range("L3").Activate
    Fpath = ActiveCell.Value
    Sheets("Defect Log").Select
    Range("A1").Activate
    i = 0
    Do While (Not (IsEmpty(ActiveCell.Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 1).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 2).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 3).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 4).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 5).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 6).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 7).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 8).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 9).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 10).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 11).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 12).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 13).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 14).Value)))
    i = i + 1
    ActiveCell.Offset(1, 0).Select
    Loop
    iRow = i + 1
    Set wbkOutput = ActiveWorkbook
    lRet = objAcroAVDoc.Open(Fpath, "")
    Set objAcroPDDoc = objAcroAVDoc.GetPDDoc
    numPages = objAcroPDDoc.GetNumPages()
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(0)
    For k = 1 To numPages
    lAnnotscnt = objAcroPDPage.GetNumAnnots()
    For m = 0 To lAnnotscnt - 1
    If lAnnotscnt = 0 Then Exit For
    Set objAcroPDAnnot = objAcroPDPage.GetAnnot(m)
    If (objAcroPDAnnot.GetContents <> "" And objAcroPDAnnot.GetSubtype = "Text") Then
    Cells(iRow, 5).Value = k
    Cells(iRow, 2).Value = objAcroPDAnnot.GetContents()
    Cells(iRow, 11).Value = objAcroPDAnnot.GetTitle()
    iRow = iRow + 1
    End If
    Next m
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(k)
    Next k
    lRet = objAcroAVDoc.Close(1)
    Set objAcroAVDoc = Nothing
    Set objAcroPDAnnot = Nothing
    Set objAcroPDPage = Nothing
    Set objAcroPDDoc = Nothing
    End Sub

    Make sure you are current with 9.x patches, just on general principles.
    The code seems fine – nothing jumping out at me.
    You can also look at using the JSObject methods and trying this via the JavaScript stuff – that will give you more access to the Annotation information…
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 24 Nov 2011 04:25:12 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Problem with controlling Annotations from Excel VBA
    Problem with controlling Annotations from Excel VBA
    created by apreeti<http://forums.adobe.com/people/apreeti> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4044740#4044740

  • How to block all goods movements incurs to a warehouse?

    Hi all,
    I am wondering if you can provide me a way, a transaction code on how to perform the following?
    How to block all goods movements incurs to a warehouse.
    I am trying to execute LX23 (Stock comparison IM/WM) and try to remove the differences using batch input file.
    SAP document indicates the prerequisite to use this feature is that all inventory movements to the warehouse be blocked before clearing the differences (i.e. adapt the IM figure to that of WM figure).
    Appreciates.
    Daniel

    I think the requirement here is to block inventory movement (GR, GI, PCN etc.) to storage locations which are connected to your warehouse. Blocking movement on storage types in your warehouse does not serve this purpose.
    Is it really necessary to block inventory movement when running LX2? LX23 eventually will need to correct the stock via IM posting at the end.
    Anyway, if storage location level authorisation check is not currently in use in your system (OLMB -> Authorisation Management -> Authorisation check on storage location), you may try to activate authorisation check on storage locations connected to your warehouse so that those who has no M_MSEG_LGO assigned won't be able to post inventory movement to the warehouse.

  • BAPI_PROCORDCONF_CREATE_TT Goods Movement Posting Problem

    When performing a process order confirmation via the BAPI_PROCORDCONF_CREATE_TT, I'm experiencing some difficulties with the goods movements.  Specifically, when attempting to post a goods receipt to the order via a 101 movement along with a goods issue to the order via a 261 movement, the movements are posting as two separate material documents instead of a single material document.  Secondly, the movements post under the transaction code COGI (from the MKPF-TCODE2 field) which seems a little odd to me as I was expecting something specific to the BAPI or at least COR6N.
    For others utilizing this BAPI with goods movements specified, what transaction code do the materials post under and is there some config or setting directly in the BAPI which I'm missing to ensure goods movement postings occur under a single material document?
    Thanks in advance for any/all assistance,
    Randy Lintz
    Foster Farms
    Livingston, California

    Hi Randy,
    Please check with T-Code CORK & also check hte confirmation configuration in OPK4.
    Check the "All Components" under Generally Valid settings Tab.
    Thanks

Maybe you are looking for

  • How do I stop another person using their own Apple ID accessing my Itunes library on a shared computer?

    My daughter and I have our own Itunes libraries on a shared computer.  However we can access each others libraries by using our own Apple ID.  This causes a problem because she was able to access my account and delete some music by mistake.  Is their

  • How to load a customise component?

    I have created a customised component that i want to load dynamic. In the end i want to send a instance of the component i want to load to the user.mxml file. So i dont need to create a new (user) file when i create a new component. I want to use the

  • SOAP Receiver Error - Recoverable Exception

    Can someone please explain why I am getting this: Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error App

  • Exporting iTunes tracks as MP3

    This is a similar query to that in thread 1015795, and is very simple: Can I copy a track I've bought from the iTunes store to MP3 format? Why do I want to do this? Because I've got a MP3 player I want to play it on, and I will not spend 3 figures on

  • Cant Install Mavericks MacBook Pro A1260

    Hello guys, Straight to the point. First I downloaded the update from the app store with no problems, but when I hit continue to install the update it restart it but never installed the update. After restart I got something saying that there was an e