Importing Structure field values in Excel using VBA and SAP RFC

I am calling a RFC MEASUREM_DOCUM_RFC_SINGLE_001 from Excel VBA. The export parameters of the RFC has a parameter MEASUREMENT_DOCUMENT and structure COMPLETE_DOCUMENT. I am able to get back parameter value in excel from RFC using
ActiveCell = Funct.imports("MEASUREMENT_DOCUMENT")
Now I want to get the value of one of the fields say POINT of the structure COMPLETE_DOCUMENT in Excel. The following code doesnt work
ActiveCell = Funct.imports("COMPLETE_DOCUMENT-POINT")
It gives an error.
Even I have tried to using code for tables
dim tab as object
set tab = funct.tabels("COMPLETE_DOCUMENT")
but it did'nt work.
Can any one help me how to access the field value of a structure?
regards
Ravindra

I am calling a RFC MEASUREM_DOCUM_RFC_SINGLE_001 from Excel VBA. The export parameters of the RFC has a parameter MEASUREMENT_DOCUMENT and structure COMPLETE_DOCUMENT. I am able to get back parameter value in excel from RFC using
ActiveCell = Funct.imports("MEASUREMENT_DOCUMENT")
Now I want to get the value of one of the fields say POINT of the structure COMPLETE_DOCUMENT in Excel. The following code doesnt work
ActiveCell = Funct.imports("COMPLETE_DOCUMENT-POINT")
It gives an error.
Even I have tried to using code for tables
dim tab as object
set tab = funct.tabels("COMPLETE_DOCUMENT")
but it did'nt work.
Can any one help me how to access the field value of a structure?
regards
Ravindra

Similar Messages

  • I would like to execute an existing BW report from Excel (using VBA).

    I would like to execute an existing BW report from Excel (using VBA) and download the results into Excel.  I understand that there is an Excel Add-In which (I believe) should allow me to do this.  I am an experienced user of Excel / VBA but I have virtually no experience with SAP.  If someone could point me to any source of information or specific instructions I would be extremely appreciative.  I've done multiple searches on the internet but everything I find seems to assume more knowledge of SAP and SAP acronyms than I possess. 

    Paul,
    If your company (or your client's company) has an SAP license (I assume this is the case, since there would be no other reason for you to want to access an SAP system using Excel), there is a person in your company who can request an ID for you.  It is called a SAP Service Marketplace userid, more commonly called an 'S' number.  This person in your company is usually a Basis Administrator.  Go to your SAP Basis team and ask them for access to Service Marketplace.
    The common solution for your Excel analysis problem is to install the Bex Analyzer on your PC.  You will need these same guys (Basis Team) to help you with getting the required SAP access, and to install the associated SAP software onto your PC.
    In the meantime, here is some bedtime reading for you.
    Analysis & Reporting: BEx Analyzer - Business Intelligence - SAP Library
    Best Regards,
    DB49

  • Export Project Tasks to Excel using VBA by Custom Field

    Question referring to the link:
    http://social.technet.microsoft.com/Forums/projectserver/en-US/9c46458c-893f-41ba-bd46-bdb59c533f4a/export-project-tasks-to-excel-using-vba-by-custom-field?forum=project2010custprog
    Help needed. I have inserted my question at this address for Andrew or anybody else to reply. Hope to hear from you.
    Regards,
    Chuck

    Thank you Andrew for getting back to me and I have found somewhere on the net the following macro that would do the job for the version 2007. Here is a copy for those that may need it.
    Option Explicit
    Sub CreateMenus()
    Dim cbrMain As CommandBar
    Dim ctlMain As CommandBarControl
    Dim ctlOLExport1 As CommandBarControl
    Dim ctlOLExport2 As CommandBarControl
    Dim ctlOLExport3 As CommandBarControl
    Set cbrMain = Application.CommandBars.ActiveMenuBar
    Set ctlMain = cbrMain.Controls.Add(Type:=msoControlPopup, Temporary:=True)
    ctlMain.Caption = "Export to Outlook"
    Set ctlOLExport1 = ctlMain.CommandBar.Controls.Add(Type:=msoControlButton)
    With ctlOLExport1
    .Caption = "Selection to Outlook tasks"
    .OnAction = "Macro """ & "Export_Selection_To_OL_Tasks"""
    End With
    Set ctlOLExport2 = ctlMain.CommandBar.Controls.Add(Type:=msoControlButton)
    With ctlOLExport2
    .Caption = "Selection to Outlook appointments"
    .OnAction = "Macro """ & "Export_Selection_To_OL_Appointments"""
    End With
    Set ctlOLExport3 = ctlMain.CommandBar.Controls.Add(Type:=msoControlButton)
    With ctlOLExport3
    .Caption = "Selection to Outlook notes"
    .OnAction = "Macro """ & "Export_Selection_To_OL_Notes"""
    End With
    End Sub
    Cheers!
    Chuck

  • Use VBA and Excel to open Dreamweaver HTML (CS5), find and replace text, save and close

    I wish to use VBA and Excel to programmatically open numbered Dreamweaver HTML (CS5) and find and replace text in the code view of these files, save and close them.
    I have  5000 associations between Find: x0001 and Replace: y0001 in an Excel sheet.
    I have the VBA written but do not know how to open, close and save the code view of the ####.html files. Please ... and thank you...
    [email protected]

    This is actually the code view of file ####.html that I wish to find and replace programmatically where #### is a four digit number cataloguing each painting.... In 1995 I thought this was clever... maybe not so clever now :>)) Thank you for whatever you can do Rob!
    !####.jpg!
    h2. "Name####"
    Oils on acrylic foundation commercial canvas - . xx X xx (inches) Started
    Back of the Painting In Progress </p> </body> </html>
    Warmest regards,
    Phil the Forecaster, http://philtheforecaster.blogspot.ca/ and http://phils-market.blogspot.ca/

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • Hi - I cannot upload my emails through the mail icon.  The first time I tried it only loaded very old emails, I then tried the whole process again and it has not imported a single email.  I use hotmail, and have had no problems with my iPhone or iPad.

    Hi - I cannot upload my emails through the mail icon.  The first time I tried it only loaded very old emails, I then tried the whole process again and it has not imported a single email.  I use hotmail, and have had no problems with my iPhone or iPad.  So the only way I can check my emails on my mac is to go through the internet.  Can anyone help?

    Hello, do you mean Download?
    In Mail's Window Menu, choose Connection Doctor, any red dots for status, if so what is the message?
    Then click the Show Details button & Check again.

  • BAPI Access from Excel using VBA

    Im writing an excel macro (VBA) to call a bapi that populates a spreadsheet.
    The user will then do some manipulation of the data collected, and then it must be sent back to sap.
    The Bapi in question is BAPI_GET_USER_DETAIL
    *"  IMPORTING
    *"     VALUE(USERNAME) LIKE  BAPIBNAME-BAPIBNAME
    *"  EXPORTING
    *"     VALUE(LOGONDATA) LIKE  BAPILOGOND STRUCTURE  BAPILOGOND
    *"     VALUE(DEFAULTS) LIKE  BAPIDEFAUL STRUCTURE  BAPIDEFAUL
    *"     VALUE(ADDRESS) LIKE  BAPIADDR3 STRUCTURE  BAPIADDR3
    *"     VALUE(COMPANY) LIKE  BAPIUSCOMP STRUCTURE  BAPIUSCOMP
    *"     VALUE(SNC) LIKE  BAPISNCU STRUCTURE  BAPISNCU
    *"     VALUE(REF_USER) LIKE  BAPIREFUS STRUCTURE  BAPIREFUS
    *"     VALUE(ALIAS) LIKE  BAPIALIAS STRUCTURE  BAPIALIAS
    *"  TABLES
    *"      PARAMETER STRUCTURE  BAPIPARAM OPTIONAL
    *"      PROFILES STRUCTURE  BAPIPROF OPTIONAL
    *"      ACTIVITYGROUPS STRUCTURE  BAPIAGR OPTIONAL
    *"      RETURN STRUCTURE  BAPIRET2
    *"      ADDTEL STRUCTURE  BAPIADTEL OPTIONAL
    *"      ADDFAX STRUCTURE  BAPIADFAX OPTIONAL
    *"      ADDTTX STRUCTURE  BAPIADTTX OPTIONAL
    *"      ADDTLX STRUCTURE  BAPIADTLX OPTIONAL
    *"      ADDSMTP STRUCTURE  BAPIADSMTP OPTIONAL
    *"      ADDRML STRUCTURE  BAPIADRML OPTIONAL
    *"      ADDX400 STRUCTURE  BAPIADX400 OPTIONAL
    *"      ADDRFC STRUCTURE  BAPIADRFC OPTIONAL
    *"      ADDPRT STRUCTURE  BAPIADPRT OPTIONAL
    *"      ADDSSF STRUCTURE  BAPIADSSF OPTIONAL
    *"      ADDURI STRUCTURE  BAPIADURI OPTIONAL
    *"      ADDPAG STRUCTURE  BAPIADPAG OPTIONAL
    *"      ADDCOMREM STRUCTURE  BAPICOMREM OPTIONAL
    *"      GROUPS STRUCTURE  BAPIGROUPS OPTIONAL
    Ive Managed to glean from various sources on the internet, the various basics on doing a bapi call from VBA
    Here is what i have so far.
    Private Sub Fetch_User_details_Click()
    'Take username in cell 2,2 and check to see it it exists.
    'Display the First and Last name of the user
    'Get list of all roles and their expiry dates and populate list
    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
    'RFC Paramaters
    Dim Pusername As Variant
    Dim Preturn As Variant
    Dim copyFromc As String
    'Clear Table Section of Spreadsheet
    Worksheets("Sheet1").Select
    For x = 9 To 200
      For y = 1 To 8
        Worksheets("Sheet1").Cells(x, y).ClearContents
        Next y
    Next x
    'Create Server object and Setup the connection
    Set R3 = CreateObject("SAP.Functions")
    R3.Connection.System = ""
    R3.Connection.client = ""
    R3.Connection.user = ""
    R3.Connection.Password = ""
    R3.Connection.Language = "EN"
    'Logon to SAP
    If R3.Connection.logon(0, False) <> True Then
       Exit Sub
    End If
    'R3.loglevel = 9
    'R3.logfilename = "c:guilog.txt"
    Set MyFunc = R3.Add("BAPI_USER_GET_DETAIL")
    copyFromc = Worksheets("Sheet1").Cells(3, 2).Text
    Set Pusername = MyFunc.exports("USERNAME")
    Pusername.Value = copyFromc
    'Call the BAPI
    If MyFunc.call Then
    '  ok now what ?
    ' Process the returned data into the spreadsheet
    Else
        MsgBox ("Call returned FALSE")
    End If
    'Close Connection to SAP
    R3.Connection.logoff
    End Sub
    To update the data ( User Role Assignements ) i will be using bapi BAPI_USER_ACTGROUPS_ASSIGN
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(USERNAME) LIKE  BAPIBNAME-BAPIBNAME
    *"  TABLES
    *"      ACTIVITYGROUPS STRUCTURE  BAPIAGR
    *"      RETURN STRUCTURE  BAPIRET2
    * Dieser Baustein ist gleichgestellt mit der Pflege eines Benutzers
    * über die Pflegetransaktion, gepflegt werden die Felder, für die die
    * Pflege erlaubt ist
    I need help deciphering the data received from the bapi and then repackaging it using VBA.
    I know writing this in ABAP would take less than 30 mins, but that is not an option for me.

    Ok, Ive made some headway
    I can now Read all the data i need from SAP
    Now comes the bit to write it back again.  Will Update when i have a solution
    Private Sub copydata_Click()
    Dim x1 As Integer, x2 As Integer
    'copy all data from "Copy From" to "Copy To"
    'first determine how many rows contain roles
    'before copying the roles, check that the destination user has no roles assigned
    If Cells(9, 6).Text <> "" Then
       MsgBox ("Error. Destination User already has Roles assigned.")
       Exit Sub
    End If
    For x1 = 0 To 1000
       If Cells(9 + x1, 1).Text = "" Then
         Exit For
       End If
    Next
    Worksheets("Sheet1").Range(Cells(9, 1), Cells(9 + x1 - 1, 4)).Copy _
       Destination:=Worksheets("Sheet1").Range(Cells(9, 6), Cells(9 + x1, 9))
    For x2 = 1 To x1
    Worksheets("Sheet1").Cells(9 + x2 - 1, 8).Value = Date
    Next
    End Sub
    Sub Mail_small_Text_Outlook()
    ' Is working in Office 2000-2007
        Dim OutApp As Object
        Dim OutMail As Object
        Dim strbody As String
        Set OutApp = CreateObject("Outlook.Application")
        OutApp.Session.Logon
        Set OutMail = OutApp.CreateItem(0)
        strbody = "User " & Worksheets("Sheet1").Cells(3, 7).Text & _
                  " Has Been Moddelled off of User " & _
                    Worksheets("Sheet1").Cells(3, 2).Text & " in system " & _
                    Worksheets("Connection").Cells(1, 2).Text & vbNewLine & vbNewLine & _
                  "Please Adjust Mitigating Controls Accordingly"
        On Error Resume Next
        With OutMail
            .To = Worksheets("Connection").Cells(10, 2).Text
            .CC = ""
            .BCC = ""
            .Subject = "User Modelled"
            .Body = strbody
            .Send   'or use .Display
        End With
        On Error GoTo 0
        Set OutMail = Nothing
        Set OutApp = Nothing
    End Sub
    Private Sub Fetch_CopyTo_User_Click()
    'Take username in cell 3,7 and check to see it it exists.
    'Display the First and Last name of the user
    'Get list of all roles and their expiry dates and populate list
    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
    'RFC Paramaters
    Dim Pusername As Object
    Dim PAddress As Object
    Dim PTable As Object
    Dim Preturn As Object
    Dim copyFromc As String
    'Clear Table Section of Spreadsheet
    Worksheets("Sheet1").Cells(5, 8).ClearContents
    Worksheets("Sheet1").Cells(6, 8).ClearContents
    'Create Server object and Setup the connection
    Set R3 = CreateObject("SAP.Functions")
    R3.Connection.System = Worksheets("Connection").Cells(1, 2).Text
    R3.Connection.SystemNumber = Worksheets("Connection").Cells(2, 2).Text
    R3.Connection.Destination = Worksheets("Connection").Cells(3, 2).Text
    R3.Connection.HostName = Worksheets("Connection").Cells(4, 2).Text
    R3.Connection.client = Worksheets("Connection").Cells(5, 2).Text
    R3.Connection.user = Worksheets("Connection").Cells(6, 2).Text
    R3.Connection.Password = Worksheets("Connection").Cells(7, 2).Text
    R3.Connection.Language = Worksheets("Connection").Cells(8, 2).Text
    'Logon to SAP
    If R3.Connection.Logon(0, -1) <> True Then
       MsgBox ("We Had a Logon Error")
       Exit Sub
    End If
    'R3.loglevel = 9
    'R3.logfilename = "c:\guilog.txt"
    Set MyFunc = R3.Add("BAPI_USER_GET_DETAIL")
    Set Pusername = MyFunc.exports("USERNAME")
    Set PAddress = MyFunc.imports("ADDRESS")
    Set Preturn = MyFunc.tables("RETURN")
    Set PTable = MyFunc.tables("ACTIVITYGROUPS")
    Pusername.Value = Worksheets("Sheet1").Cells(3, 7).Text
    'Call the BAPI
    If MyFunc.call Then
       Dim xxx As String
       Worksheets("Sheet1").Cells(5, 7).Value = PAddress.Value("FIRSTNAME")
       Worksheets("Sheet1").Cells(6, 7).Value = PAddress.Value("LASTNAME")
    'Get Assigned Roles
       Dim datarec As Object
       Dim datafld As Object
       x = 9
       For Each datarec In PTable.Rows
         Worksheets("Sheet1").Cells(x, 6).Value = datarec("AGR_NAME")
         Worksheets("Sheet1").Cells(x, 7).Value = datarec("AGR_TEXT")
         Worksheets("Sheet1").Cells(x, 8).Value = datarec("FROM_DAT")
         Worksheets("Sheet1").Cells(x, 9).Value = datarec("TO_DAT")
         x = x + 1
       Next
       copydata.Enabled = True
    Else
        MsgBox ("Error Calling Function - Probably Authorizations")
    End If
    'Close Connection to SAP
    R3.Connection.logoff
    End Sub
    Private Sub Fetch_User_details_Click()
    'Take username in cell 3,2 and check to see it it exists.
    'Display the First and Last name of the user
    'Get list of all roles and their expiry dates and populate list
    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
    'RFC Paramaters
    Dim Pusername As Object
    Dim PAddress As Object
    Dim PTable As Object
    Dim Preturn As Object
    Dim copyFromc As String
    'Clear Table Section and other areas of Spreadsheet
    Worksheets("Sheet1").Select
    For x = 9 To 1000
      For y = 1 To 9
        Worksheets("Sheet1").Cells(x, y).ClearContents
        Next y
    Next x
    Worksheets("Sheet1").Cells(5, 2).ClearContents
    Worksheets("Sheet1").Cells(6, 2).ClearContents
    Worksheets("Sheet1").Cells(5, 7).ClearContents
    Worksheets("Sheet1").Cells(6, 7).ClearContents
    copydata.Enabled = False
    'Create Server object and Setup the connection
    Set R3 = CreateObject("SAP.Functions")
    R3.Connection.System = Worksheets("Connection").Cells(1, 2).Text
    R3.Connection.SystemNumber = Worksheets("Connection").Cells(2, 2).Text
    R3.Connection.Destination = Worksheets("Connection").Cells(3, 2).Text
    R3.Connection.HostName = Worksheets("Connection").Cells(4, 2).Text
    R3.Connection.client = Worksheets("Connection").Cells(5, 2).Text
    R3.Connection.user = Worksheets("Connection").Cells(6, 2).Text
    R3.Connection.Password = Worksheets("Connection").Cells(7, 2).Text
    R3.Connection.Language = Worksheets("Connection").Cells(8, 2).Text
    'Logon to SAP
    If R3.Connection.Logon(0, -1) <> True Then
       MsgBox ("We Had a Logon Error")
       Exit Sub
    End If
    'R3.loglevel = 9
    'R3.logfilename = "c:\guilog.txt"
    Set MyFunc = R3.Add("BAPI_USER_GET_DETAIL")
    Set Pusername = MyFunc.exports("USERNAME")
    Set PAddress = MyFunc.imports("ADDRESS")
    Set Preturn = MyFunc.tables("RETURN")
    Set PTable = MyFunc.tables("ACTIVITYGROUPS")
    Pusername.Value = Worksheets("Sheet1").Cells(3, 2).Text
    'Call the BAPI
    If MyFunc.call Then
       Dim xxx As String
       Worksheets("Sheet1").Cells(5, 2).Value = PAddress.Value("FIRSTNAME")
       Worksheets("Sheet1").Cells(6, 2).Value = PAddress.Value("LASTNAME")
    'Get Assigned Roles
       Dim datarec As Object
       Dim datafld As Object
       x = 9
       For Each datarec In PTable.Rows
         Worksheets("Sheet1").Cells(x, 1).Value = datarec("AGR_NAME")
         Worksheets("Sheet1").Cells(x, 2).Value = datarec("AGR_TEXT")
         Worksheets("Sheet1").Cells(x, 3).Value = datarec("FROM_DAT")
         Worksheets("Sheet1").Cells(x, 4).Value = datarec("TO_DAT")
         x = x + 1
       Next
    Else
        MsgBox ("Error Calling Function - Probably Authorizations")
    End If
    'Close Connection to SAP
    R3.Connection.logoff
    End Sub
    Private Sub UpdateSap_Click()
    End Sub

  • How can I export multiple PDF fillable forms into a spreadsheet (Excel) using VBA?

    Hi guys,
    I never used VBA with with Adobe Acrobat. I would like a tip to start doing that. What I would like to do know is:
    1 - I have multiple PDF Forms that are filled.
    2 - I want all the data from those forms to be exported to Excel via VBA code.
    3 - Adobe Acrobat already have an option to do that manually (Forms > Merge Data Files Into Spreadsheet) and it works perfectly.
    4 - I would like to access that feature using VBA, then generate a spreadsheet.
    Any tips? How can I start?
    Thanks!

    A good place to start is Karl Heinz Kremer's blog, where he has a few examples:
    http://khkonsulting.com/2010/09/reading-pdf-form-fields-with-vba/

  • RFC call from Excel using VBA

    I am trying to do an RFC call from Excel to SAP using VBA. RFC is working fine for most the RFC enabled Function Modules except DDIF_FIELDINFO_GET and DDIF_FIELDLABEL_GET.
    What can be the reason for this?
    Can someonme please help me with a macro code where these FMs are working.
    Also can someone please help me with some tutorial on SAP connection with Excel.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Nov 12, 2008 9:14 AM

    Hello Jon.
    DDIF_FIELDINFO_GET is not working for me either. But I have used another FM (/ZOPTION/LIVE_DDIF_FIELDINFO):
    Public Sub RFC_FIELDINFO()
    Dim Func As Object
    Dim sapConn As Object
    Dim tblFIELDTAB
    Dim tblFIXED_VALUES
    Dim intRow%
    Dim intCol%
    '* Sub     : Call FM /ZOPTION/LIVE_DDIF_FIELDINFO                         *
    '* Author  : Holger Köhn                                                  *
    '* Created : 23.08.2014                                                   *
    '* Changed :                                                              *
    ThisWorkbook.Sheets("TEST").Activate
    Cells.Select
    Selection.ClearContents
    ThisWorkbook.Sheets("TEST").Range("A1").Select
    '* create RFC-Connection                                                  *
    Set sapConn = CreateObject("SAP.Functions")
    sapConn.Connection.RfcWithDialog = True
    If sapConn.Connection.LogOn(1, False) <> True Then
        MsgBox "Cannot Logon to SAP"
        Exit Sub
    End If
    DoEvents
    '* run FM /ZOPTION/LIVE_DDIF_FIELDINFO                                    *
    Set Func = sapConn.Add("/ZOPTION/LIVE_DDIF_FIELDINFO")
    Func.Exports("TABNAME") = "AUFK"
    Set tblFIELDTAB = Func.Tables("FIELDTAB")
    If Func.Call = False Then
         MsgBox Func.Exception
         Exit Sub
    Else
        Application.ScreenUpdating = False
            For intCol = 1 To tblFIELDTAB.ColumnCount
                ThisWorkbook.Sheets("TEST").Cells(1, intCol).Value = tblFIELDTAB.ColumnName(intCol)
            Next
            If tblFIELDTAB.RowCount > 0 Then
                For intRow = 1 To tblFIELDTAB.RowCount
                    For intCol = 1 To tblFIELDTAB.ColumnCount
                        ThisWorkbook.Sheets("TEST").Cells((intRow + 1), intCol).Value = tblFIELDTAB(intRow, intCol)
                    Next
                Next
                ThisWorkbook.Sheets("TEST").Activate
            End If
            Columns.AutoFit
        Application.ScreenUpdating = True
    End If
    '* clear tblFIELDTAB                                                      *
    Do Until tblFIELDTAB.RowCount = 0
         Call tblFIELDTAB.Rows.Remove(1)
    Loop
    Set sapConn = Nothing
    Set Func = Nothing
    Set tblFIELDTAB = Nothing
    End Sub

  • Error in importing qualified field values

    Hi,
    I have a query related to importing qualified tables. At the source side, the main fields and qualified table fields are given in 2 different sheets of Excel, joined by the product ID. While importing the qualified tables, I am only able to import non qualified field values in data manager and rests of the qualified field values are not getting imported. Following are the steps I have followed:
      Map Non Qualified fields (Source: Qualified table;   Destination: Qualified table)
      Import Non Qualified fields
      Map Non Qualified fields (Source: Qualified table; Destination: Main Table)
      Create compound key and map with the destination field.
      Map qualified fields (Source: Qualified table; Destination: Main table)
    o Match records and Import. (No fields are coming up in the Match records pane  (Error))
    Pls let me know the solution to rectify the error.

    Hi Vishal,
    You cannot have your Qualified table (Non -qualifier and Qualifier)details in a separate excel sheet and the Main table fields in a separate sheet.As the Qualifiers are part of the main record only and besides whenever you import data in the qualified tabel itself by selecting the qualified table as the destination table ,you will be able to map only the non-qulaifiers as the Qualifiers are only visible under the main table destination.
    So you can create your source in two ways
    - All the non-qualifiers of the qualified table in a separate excel and all the main table fields along with the Qualifiers in a separate sheet.
    - All the fields in a single sheet ,as you can select the same source when you want to import the qualified table as well as the main table.
    You can import the Qualified tabel records either before or after the main table importing as mentioned in the above post.
    kindly follow the below link to understand qualified table importing:
    Taming the animal - Qualified Tables
    - When you are importing data (non qualifiers) in the qualified table you can select any one or combination of the non qualifiers as the matching fields
    - When you are importing the main table you need to map the qualifiers as well as the main table fields.You need to select the primary key field of the main table as the matching field.
    - The link is established between the qualifiers and the non qualifiers in the main table mapping.
    - You will able to see the same in the qualified tab in data manager
    Hope it helped
    Thanks & Regards
    Simona

  • Manipulating ShockwaveFlash in Excel Using VBA

    I am trying to change various variables in an embedded shockwaveplayer but I cannot get the video to play through code. My code is below. Any help would be appreciated and thanks in advance.
    Sub TestVideo()
        On Error GoTo iErrors
        Set appxl = Excel.Application
        Set sht = appxl.ActiveSheet
        Dim shFl As ShockwaveFlash
        For Each obj In sht.OLEObjects
             If InStr(obj.progID, "ShockwaveFlash") > 0 Then
                Set shFl = obj.Object
                shFl.LoadMovie 0, shFl.Movie 'http://www.youtube.com/watch?v=1YuH8IoqaAg&feature=feedrec_grec_index
                Exit For
            End If
        Next
        Exit Sub
    iErrors:
        Err.Clear
        Resume Next
    End Sub
    Thanks again

    Hi Mr.Thomas,
    Based on my understanding, the suggestion using Regular Expressions is a very helpful. Have you fixed the issue now?
    If you still have the issue about develop with Regular Expressions using VBA, I suggest that you reopen a new thread in
    Visual Basic for Application forum.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Reading filters fields in a pivot using vba

    Hi 
    I am able to store the Row Fields, Value Fields, Column Fields of a pivot. But if a filters are applied to a pivot.
    like Pivot.PivotFields, Pivot.RowFields, etc
    How can we read the what is the field applied for the filter fields?
    Thanks
    Sreeram
    Madhukar

    Hi,
    Please try the sample code, it'll read the filter field which you select:
    Sub Test()
    Dim pt As PivotTable
    Dim pf As PivotField
    Dim pi As PivotItem
    Set pt = Sheets("Scores").PivotTables(1)
    For Each pf In pt.PivotFields
    If pf.Orientation = xlPageField Then
    Debug.Print pf.Name
    For Each pi In pf.PivotItems
    If pi.Visible = True Then
    Debug.Print pi.Value
    End If
    Next
    End If
    Next pf
    End Sub
    PS: 
    This is the forum to discuss questions and feedback for Microsoft Excel, if you have any further question about Excel developer, please post the question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Structure(Fields) needed for Excel file for GLPLUP process

    Hi friends,
    Im new in this, could you please help me how to create the layout or what the basic structure(Fields) is needed to upload the Excel file in GLPLUP tcode.
    Please advise.
    thanks & regards
    Sankar.

    Solved

  • Modify the field value in itab1 using itab2

    Hi experts
    I need some help.
    My question is : I have ITAB1 contains IBLNO field it is a legacy value.
    I want to modify this field.
    Another internal table  ITAB2 contains sap, legacy value of IBLNO(Cross refrenced table).my requirement is  IBLNO of  ITAB1 is modified with corresponding sap IBLNO in ITAB2.
    plz help
    Durga Parsad

    Hi Durga,
    You want to get following results -
    1. You have ITAB1 containing IBLNO.
    2. ITAB2 has IBLNO.
    3. Modify ITAB1-IBLNO from ITAB2-IBLNO.
    4. There must be some common value between the two tables. It has to be there otherwise the two records won't match.
    Kindly find the following code for doing so -
    LOOP AT ITAB2 INTO WA_ITAB2.
    * Modify ITAB1 from workarea of ITAB2 for matching records
      MODIFY ITAB1 FROM WA_ITAB2     
        TRANSPORTING IBLNO                " Modify only IBLNO of ITAB1 for matching records
        WHERE FIELD1 = WA_ITAB2-FIELD1.   " Some common field between the ITAB1 & workarea of ITAB2  
      CLEAR WA_ITAB2.
    ENDLOOP.
    Hope this helps.
    PS If the answer solves your query, plz close the thread by rewarding each reply and marking it Solved.
    Regards

  • Automatic price update if key field values changed in sales order and bill

    Hi Experts,
    I have requirement as follows.
    <b><u>Scenario: -</b> </u>We wanted carryout the pricing based on Incoterms, customer and material. I have created the condition table with these fields. And maintained the condition record. The values will flow to sales order without any problem.
    <b>
    Problem: - </b>When we change the incoterms say for CIF to FOB the system should redetermine the price automatically, but this is not happening (If will redetermine only freight). If we carryout new pricing manually the right price will flow.
    <b>
    Expectations: -</b> Is their any exit or any configuration setting where in system will redetermine the price automatically if we change the field value in sales order(For the field value it will be used to create condition table).
    If anyone done this please help me with setting or Exit and code to enable us to come out from the situation.
    We need this to happen while creating sales order as well as billing, Since @ billing prices will be redetermined.
    Thanks in advance for the needful.
    With regards,
    Manjunatha H.S.
    M: 9740433511
    <b></b><u></u><u></u>

    Hi Shivakumar,
    You can use USEREXIT_NEW_PRICING_VBAP in include SAPMV45A for this.
    Regards
    Nikhilesh

Maybe you are looking for