Visual Basic RFC SAP no-unicode. Latin2 Caracteres are converted in '#'
Hi,
I are inserting data in Z SAP tables from a Visual Basic Script.
I are doing a RFC call.
The problem is that the data type text aren´t iserting correct when its are Latin2 caracteres.
Example:
Text in Visual Basic: "Prevozni strou0161ki-železniu0161ki"
But when theRFC function inserts the data in SAP, SAP shows "Prevozni stro#ki-#elezni#ki".
Could somebody help me??
thanks in adavanced,
Javi
Thanks for your answer.
But i din´t solve the problem.
I changed the encoding to UTF-16 and ISO-8859-5 but the caracteres are inserting bad yet :(.
I'm debugging the visual basic code and I can see that the text is correct in Visual Basic, but after it is incorrect in SAP.
Too, I'm inserting the value directly in visual basic sourcecode:
T_BAPI_P.Value(index, "TXZ01") = "Prevozni strou0161ki-železniu0161ki NOVO"
But the result is the same.
SAP shows "Prevozni stro#ki-#elezni#ki NOVO".
I have seen that in the transaction SM59 you can specify if the RFC conexion will be UNICODE.
The SAP system that i am working isn´t unicode, then it can not the tag to especificate this in SM59.
Could it be the problem that the SAP system isn´t unicode??
sorry, for my English's low level.
Thanks in advanaced for all yousr answer!
Javi
Similar Messages
-
How to connect visual basic with sap
hi
i want to connect vb system and sap system.can any1 help me?Hi
Using BAPIS u statrt communicating with vb or java --etc.
For example,
U want tot connect vb .U need to use the component
SAP.BAPI.1 Component.
U design a form in vb,
Declarations:
Public obj As Object
Public boOrder As Object
Public oHeader As Object
Public oHeaderde As Object
Public oHeaderup As Object
Public oHeaderin As Object
Public conn As Object
Public ovalues As Object
Public oReturn As Object
Public x As String
In form load event:
Private Sub Form_Load()
On Error GoTo err1
Form_Timer
Set obj = CreateObject("SAP.BAPI.1")
Set conn = obj.connection
conn.logon
Set boOrder = obj.GetSAPObject("ZBAPISTUD(bapiname)")
Set oHeader = obj.dimas(boOrder, "ZbapiSearch(bapi method name)", "STUD") 'searching the record
Set oHeaderde = obj.dimas(boOrder, "DeleteStud", "STUD") 'deleting the record
Set oHeaderup = obj.dimas(boOrder, "ZbapiUpdate", "STUD") 'updating the record
Set oHeaderin = obj.dimas(boOrder, "CREATESTUD", "STUD") 'inserting the record
Exit Sub
err1:
MsgBox Err.Description
DoCmd.Close
End Sub
Every bapi is must a remote enabled fm. Every bapi method linked with a rfc fm.
If it is helpful rewards points
Regards
Pratap.M -
LabView TEDS library into DLL or ActiveX Control so that I can use it in C or Visual Basic?
We are developing software in LabWindows/CVI and Microsoft C. I heard that LabView can generate DLLs. Can I turn LabView TEDS library into DLL or ActiveX Control so that I can use it in C or Visual Basic development environment?
Technically what you are proposing is possible with LabVIEW. With LabVIEW's application builder, VIs can be built into dlls. Also, LV has ActiveX hooks and so you could create a system for calling into it from CVI. However, this is not what I would recommend.
The LabVIEW VIs have been written to a preliminary version of the IEEE specification (1451.4) that describes the TEDS data which is primarily why I'm advising you against using them. Once the IEEE spec is approved (the current timeline is currently late March), it will become public and you can write your own code according to the specification (or wait for someone else to write it). To help you get started, the spec includes flex and bison code that describes the syntax and structure of the template files
Internally, we've written some C, C++ and Java code to the preliminary version of the spec and we've found that we can duplicate the functionality of the TEDS Library for LV in roughly 2 weeks in any other language. -
How to compare two PDFs using Visual Basic
Hi,
We have created one Visual Basic exe for comparing two PDFs.We are using AcroExch.App and AcroExch.avDoc
for creating adobe application object. And we are using MenuItemExecute "DigSig:ToolsDiff" for comparing the PDFs. This piece of code is working fine with Adobe 4.0 and it is comparing the PDFs and showing the mismatches.
But the same piece of code is not working with Adobe 8.0 Professional. Is there any similar command to MenuItemExecute "DigSig:ToolsDiff" in Adobe 8.0 to find out the mismatches or any alternate approaches that i can try to make the existing code works properly to see the mismatches between two PDFs.
Thanks in advance,
RajuThe only APIs for comparing PDFs are part of the plugin APIs, and not exposed to COM/IAC. You would need to write a custom plugin that called the APIs directly and then expose your plugin for use via VB.
Leonard -
SAP Connection R/3 using a SSO in Visual Basic
Hello, I have been trying to get an R/3 connection to SAP using VB.
I log into SAP by getting a SSO ticket and running SAPGUI with the ticket.
Is there a way to use R/3 and the SSO ticket to log in using VIsual Basic?
Set R3 = CreateObject("SAP.Functions")
R3.Connection.Client = "000"
R3.Connection.User = "123456789"
R3.Connection.Language = "EN"
R3.Connection.System = "0"
If R3.Connection.logon(0, True) <> True Then
MsgBox "No connection to R/3 System"
Exit Sub
End If
I have a string from the .SAP file each time it is downloaded, I assume it is the single use password..
[User]
Name=123456789+
at="MYSAPSSO2=thisIsAReallyLongStringOfCharectersEndingWIthA="
Language=EN
Thanks.solved it: SAPJCO was not included in the Windows Environment Path Variable. I included D:\usr\sap\yyyy\j2ee\j2ee_00\os_libs;D:\usr\sap\yyyy\j2ee\j2ee_00\cluster\server\additional-lib
Bye
Christoph -
How to read an APO table from excel in place using Visual Basic ?
We have enhanced some APO reports using layouts that use excel in place with custom visual basic (VB) code. For example, the VB code can append the data with additional columns that perform specific calculations and then proceed to create pivot table reports in excel..That is working fine.
The challenge is to see if that VB code could read specific APO tables (e.g. product master tables) to bring additional elements into excel and thus expand the report content. We know that additional fields can be added to the reports, but having the flexibility to read tables from VB could be more flexible.
Can that be done?. If so, would it be possible using exclusively the VB code attached to the layout, i.e. no ABAP?Hello Anselmo,
I am assuming you are doing this either using BeX analyzer or by reading the planning book using the RFC ActiveX component and a BAPI.
I think it's possible to retrieve the data from the product master table. Here are my thoughts on how can this be done:
1) You can create a generic datasource (transaction RSO2) for the product master table, connect that to a BW remotecube and use a BeX query to retrieve that values. You can then join the queries using VBA. Alternatively, you can build a muti-provider that connects your current InfoCube to the new RemoteCube and build a query from there. The multi-provider, in this case, joins the data (no more VBA).
2) If you have already loaded your product master data into master data carrying InfoObjects then you can try the same technique as #1 but this time there is no need to create the generic datasource. You can use the InfoObjects for your master data as the InfoProviders for your query.
3) You can try the ActiveX component from SAP which can connect to any emote enabled function in SAP system. SAP already provided some BAPIs (check transaction BAPI for a list) which might be able to provide the data. You can also create your own function modules (be sure to make it remote enabled) using ABAP. (transaction SE37).
Hope this helps -
What is advantage of using Visual Composer In SAP
Hi friends,
please tell me what is advantage of using visual composer in SAP.
and please give me basic notes to understand Visual Composer.
I Don't have any idea about this topic.
please help me.
Thanks & Regards,
YogeshHi Yogesh,
SAP Visual Composer is a browser based, graphical modeling tool that - by reusing existing data services like RFCs, web services, queries, query-views, tables - allows creating business applications with both transactional and analytical services seamlessly integrated. In addition it gives modelers the choice to select the UI technology and build user interfaces.
Go through the following links:
Getting Started with Visual Composer for SAP NetWeaver 7.0 [original link is broken]
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/6cb05174-0701-0010-448b-caf8c6fcc97a
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e254377-0c01-0010-9787-b285e9af529f
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ceea45f3-0c01-0010-049c-c2b001f590fb
Reward points if helpful.
Regards,
Renuka. -
I want to know how to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl
You have to connect via ODBC, then use code along the lines of what is described here:
http://scn.sap.com/thread/3526924
by me on March 28 and Jan on March 29.
Also see KBA: 1686419 - SAP Crystal Reports designer does not recognize Access *.accdb file
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Using Crystal Reports in Visual Basic 2010
I am trying to add several Crystal Reports to a new project and having a major problem. Here's the situation. I created a new Visual Basic 2010 project with only one form, In visual Basic I added Crystal Reports. I then imported a form that was created in Crystal Reports 8.5.
There were no errors and the report with valid data was visible. I then tried to run...it wouldn't run and 31 errors appeared.
Obviously I missed something. I have searched for a very simple basic tutorial and either can't find one or didn't recognize one.
Can anyone point me in the right direction.
MiltOk. So, you added the report to the project. Now we have to add the CR assemblies to the project, add the viewer (if need be) and fire it off. Simplest code would be:
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
CrystalReportViewer1.ReportSource = ("path to report")
End Sub
In this case you are using the viewer SDK to runt he report. The report will prompt for any logon parameters - but you can code these also. You can load the report via the engine as bellow. Again, the report will prompt. I prefer to use the engine as it is way more "extensible"...
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
crReportDocument.Load("path to report")
'Bind the report to the viewer
CrystalReportViewer1.ReportSource = crReportDocument
End Sub
If you have a report added to the project (strongly typed) the code would be:
CrystalReportViewer1.ReportSource = New myReport()
For more details, I'd recommend looking at the sample app vbnet_win_simplepreviewreport.zip available from the following location:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
The developer help files are here:
[SAP Crystal Reports .NET SDK Developer Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip]
[SAP Crystal Reports .NET API Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip]
- Ludek -
Visual Basic errror when logging on to BPC
We have an user with problem logging on to BPC after installing Microsofts Visio on the computer.
The user gets the following Visual Basic errormessagebox : "The language DLL 'VBE6INTL.DLL' could not be found"
How can this be solved?What version of SAP BPC?
I suppose you have to unistall the SAP BPC and after you have to do a check diagnostic for client.
If everything is fine into check diagnostic perform again the installation.
If after the new install you still receive the error then try to find into window folder of another computer that dll.
You have to copy that dll into computer where is missig and to try again.
Kind Regards
Sorin Radulescu -
Strange axbridge issue with Visual Basic
I started having a very strange problem with my axbridge wrapped bean around the time I switched to JDK 1.5. Problem is, I can't seem to get rid of it by rolling back to earlier versions.
Here's what happens: I create a very simple non-visual bean:
package pack;
public class Bean1 {
public Bean1()
System.out.println("Constructor");
public boolean someMethod ()
System.out.println("1");
return false;
I then create Bean1.dll using the packager.exe provided with the JDK, and register it as part of the packaging process.
Then, I go into Visual Basic 6 and enter this code:
Private Sub Command1_Click()
Dim xx As Object
xx = CreateObject("Bean1.Bean.1")
End Sub
On the CreateObject call, Visual Basic gives me the error "Object variable or With block variable not set", which isn't helpful.
In the Java console with level 5 tracing turned on, I see this:
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=1
basic: Registered modality listener
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: Stopping applet ...
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
basic: Finding information ...
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=0
basic: Caching classloader: sun.plugin.ClassLoaderInfo@17ba38f
basic: Current classloader cache size: 1
basic: Done ...
basic: Joining applet thread ...
basic: Destroying applet ...
basic: Disposing applet ...
basic: Quiting applet ...
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Exception: java.lang.NullPointerException
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Modality pushed
basic: Joined applet thread ...
basic: Unregistered modality listener
The only thing I've found in the bug database that seems even remotely related to this is bug 6391104, which is related to plugins somehow.
I do not understand why applets are involved in this at all.
When I try to instantiate the COM object from a C++ program, everything works fine. My problem only seems to occur with Visual Basic (version 6, not .NET).
This problem seems so fundamental that it seems impossible that no one else has run into it, but there 's nothing about it on any forum or buglist that I've seen. So, I figured there must be something very obscure wrong with my setup. However, I tried installing this on a brand new machine using my trivial case, and I still have the problem. I'm really at my wits' end. Anyone have any ideas?You definately want to go to CR 2008. I'd recommed that you call 866-681-3435 and ask about the possibility of getting a 30 day eval.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Creting PO through Visual Basic
Hello Guys,
I have to create a Purchase order with Visual Basic. I have created following code but at the end error is showing that <b>NO MASTER RECORD EXIST FOR VENDOR (VENDOR NO).</b>
but with the help of same data i am able to create PO in SAP. I have attach source code. Please take a look and provide me the valuiable information.
Option Explicit
Dim functionCtrl As Object
Dim sapConnection As Object
Dim theFunc As Object
Dim PoNumber
Private Sub Command1_Click()
Set functionCtrl = CreateObject("SAP.Functions")
Set sapConnection = functionCtrl.Connection
sapConnection.Client = "220"
sapConnection.User = "PTBITUSR"
sapConnection.Password = "HELLO2"
sapConnection.Language = "EN"
If sapConnection.Logon(0, False) <> True Then
MsgBox "No connection to R/3 System"
Exit Sub 'End program
End If
Set theFunc = functionCtrl.Add("BAPI_PO_CREATE")
Dim pocur As Object
Dim poheader As Object
Dim poitems As Object
Dim poitemschedule As Object
Dim retMess As Object
Dim returnFunc As Boolean
Dim startzeil As Integer
Dim endcol As Integer
Dim the_name As String
Set poheader = theFunc.exports.Item("PO_HEADER")
Set poitems = theFunc.Tables.Item("PO_ITEMS")
Set poitemschedule = theFunc.Tables.Item("PO_ITEM_SCHEDULES")
Set pocur = theFunc.exports.Item("PO_HEADER_ADD_DATA")
poheader.Value("VENDOR") = "24001291" 'Text1.Text
poheader.Value("PUR_GROUP") = "PE6" '''Text3.Text
poheader.Value("DOC_TYPE") = "NB" ''Text4.Text
poitems.Rows.Add
poitems.Value(1, "PUR_MAT") = "SC101" ''Text5.Text
poitems.Value(1, "PLANT") = "1500" ''Text6.Text
poitems.Value(1, "NET_PRICE") = "2000" ''Text7.Text
poitemschedule.Rows.Add
poitemschedule.Value(1, "DELIV_DATE") = DTPicker1.Value
poitemschedule.Value(1, "QUANTITY") = 3 'Text9.Text
pocur.Value("CURRENCY") = "INR"
poheader.Value("PURCH_ORG") = "1500" '''Text2.Text
returnFunc = theFunc.call
PoNumber = theFunc.imports.Item("PURCHASEORDER")
Set retMess = theFunc.Tables.Item("RETURN")
If retMess Is Nothing Then
MsgBox retMess.Value(1, "MESSAGE")
Else
MsgBox retMess.Value(1, "MESSAGE")
MsgBox "Purchase Order No : " & PoNumber & "Created"
End If
End Sub
Regards
Swati Namdeoin this case u have to pass complete data in full length.
<b>poheader.Value("VENDOR") = "0024001291" = 10 char length.</b>
Regards
Peram -
Call stored procedure in Visual Basic 6.0 and datatype CLOB
Hi
Has somebody a Visual Basic 6.0 Sample Code which can call the following example procedure.
test_package.getTestdata(
pPeid IN NUMBER,
pReturn OUT NUMBER,
pData OUT CLOB
Many Thanks in advance.
Best regards
Martinhi,
give these links a try:
http://help.sap.com/saphelp_nw04/helpdata/en/7f/c6dc63c54811d194af00a0c94260a5/frameset.htm
and further:
http://help.sap.com/saphelp_nw04/helpdata/en/72/90fd343603c95ee10000009b38f844/frameset.htm -
BW reporting, Excel macros, Visual Basic
HI friends,
I want some information want in BW reporting, Excel macros, Visual Basic with Finance background.I want some good notes .thanks for advance.
Bye
habeebi am not sure what exactly you are looking into as there are many variants of reporting..
hope the below link would answer few of your queries
http://help.sap.com/saphelp_erp2005vp/helpdata/en/43/8d8d5e6413614fe10000000a1553f7/frameset.htm
reward points if you find it useful
regards
GulshanRaj -
Visual Basic Screen Updating in BPC
We are developing a highly customized BPC input template in Excel and have made extensive use of Visual Basic; however it appears that the "application.screenupdating=false" VB function does not work when logged into BPC. I assume somehow the BPC application disables this functionality?
Has anyone else run into this situation? Found a workaround?
Any suggestions would be greatly appreciated!You can greatly improve your chance of receiving a helpful answer to your question if you state the version (MS or NW) and the release (5.1, 7.0) of BPC which you are using.
Also notice the sticky [note|Please do not post BPC, SSM or FI/CO questions here!; at the top of this forum whereby we announced new dedicated forums for BPC which are the proper place to post your questions regarding BPC in the future.
Thanks and best regards,
[Jeffrey Holdeman|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/jeffrey+holdeman]
SAP BusinessObjects
Enterprise Performance Management
Regional Implementation Group
Maybe you are looking for
-
Use VZ Messages+ to get text from one phone on another??
Here is my situation. I have 2 phones, an IPhone 5c from work and a Casio Commando 4g. I only want to carry one of them and would prefer it to be the Commando. I am trying to use VZ Messages to get my work texts on the Commando. No matter how many ti
-
Export georaster into file (tfw problem)
Hi, I want to export some georaster into the file system with different resolution of the image. after storage the data in sdo_georaster i built pyramids. now i want to export the data in different pyramid-level with: CREATE OR REPLACE PROCEDURE A IS
-
My powerbook G4 is version OS 10.3.9, I tried to update to version 10.4, I've used the software update and installed it. I also have rebooted my computer, but when I checked it again, the version still says version 10.3.9. Is it not possible to updat
-
Closing a browser with the help of servlet code
Is it possible to close a browser by using servlet code? If so please help me with code. Thanks
-
Greyscale threshold using ni black gives invalid results on large image
I am analyzing images of hot steel slabs looking for cracks in the surface of the slab. The images are 2048 pixels wide by 14000 to 40000 pixels high. I am using NI Vision Assistant 8.5. Sometimes the threshold does not work right when using the gr