Home > Ask the SAP Experts > SAP NetWeaver, ESA and EAI Questions & Answers > Strings in 'RFC_RAD_TABLE_ENTRIES from VBA' code example
Ask The SAP Expert: Questions & Answers
EMAIL THIS

Strings in 'RFC_RAD_TABLE_ENTRIES from VBA' code example

Axel Angeli EXPERT RESPONSE FROM: Axel Angeli

Pose a Question
Other SAP Categories
Meet all SAP Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 23 January 2007
I've tried your example - RFC_RAD_TABLE_ENTRIES from VBA - and it works fine for that function.

Now I've modified that code to use the function DDIF_FIELDLABEL_GET, but I get the following error message:

wdtfuncs   SAP data type not supported

error on line:
Set i_TABNAME = Func.Exports("TABNAME")

Here is my VB code:

Option Explicit

Public Functions As SAPFunctionsOCX.SAPFunctions
Private LogonControl As SAPLogonCtrl.SAPLogonControl
Private R3Connection As SAPLogonCtrl.Connection
Private TableFactory As SAPTableFactory

Dim Func As SAPFunctionsOCX.Function

Public i_TABNAME  As SAPFunctionsOCX.Parameter

Public i_FIELD  As SAPFunctionsOCX.Parameter
Public i_LANGU  As SAPFunctionsOCX.Parameter

Public strLabel  As SAPFunctionsOCX.Parameter

'Public tENTRIES  As SAPTableFactoryCtrl.Table

Public Sub Main()
    Dim ix As Integer
    Dim retcd As Boolean
    Dim SilentLogon As Boolean
    Set LogonControl = CreateObject("SAP.LogonControl.1")
    Set Functions = CreateObject("SAP.Functions")
    Set TableFactory = CreateObject("SAP.TableFactory.1")
    Set R3Connection = LogonControl.NewConnection
    R3Connection.client = "000"
    R3Connection.ApplicationServer = "A1KGNB09"
    R3Connection.language = "DE"
    R3Connection.User = "BCUSER"
    R3Connection.Password = "minisap"
    R3Connection.System = "A1 SAP 620 09"
    R3Connection.SystemID = "000"
    R3Connection.SystemNumber = "00"
    R3Connection.UseSAPLogonIni = False
    SilentLogon = False
   
    retcd = R3Connection.Logon(0, SilentLogon)
    If retcd <> True Then MsgBox "Logon failed": Exit Sub
   
    Functions.Connection = R3Connection
    Set Func = Functions.Add("DDIF_FIELDLABEL_GET")
   
    Set i_TABNAME = Func.Exports("TABNAME")
    Set i_FIELD = Func.Exports("FIELDNAME")
    Set i_LANGU = Func.Exports("LANGU")
   
    Set strLabel = Func.Imports("LABEL")
   
    i_TABNAME.Value = "USR02"
    i_FIELD.Value = "BNAME"
    i_LANGU.Value = "DE"
   
    Func.Call
   
    MsgBox strLabel
'    Debug.Print eNUMBER_OF_ENTRIES
'    For ix = 1 To tENTRIES.RowCount
'        Debug.Print tENTRIES(ix, 1)
'    Next
    R3Connection.Logoff

End Sub

>
EXPERT RESPONSE
Unfortunately the OCX-Version does not support strings properly. DDIF_FIELDLABEL_GET exports a string. I suggest using DDIF_FIELDINFO_GET instead.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
SAP NetWeaver, ESA and EAI
Breaking into SAP from outside IT
Online SAP certification providers
Fixing IDoc status 53 error message
How to find errors in ABAP coding
Becoming an SAP BW consultant
Which to learn first: XI, ABAP, or SD?
How to learn Web Dynpro
Web Dynpro or BSP for my SAP career?
When to specialize in Web Dynpro/ABAP
Email and user exits in IDoc input orders

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SAP White Paper Topics
HomeNewsTopicsBlogsTipsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts