Assigning a variant string to a function pointer issue?

Hello,
This is a little complex for me to describe, so I will try my best to explain !
I don't know if this is doable in C?
Basically, I need a function pointer to hold the name of a function coming form a character array!
From the examples I have seen, it seems that what I am trying to do is not the conventional way of doing function pointers, but I don't see any other way of doing what I need to do.
In one instance, the function pointer in my code, will require to be assigned a function name like this:
_g_BlkFuncs_ =_BUF_FUNC_PTR_ParseBlockStatus;
and at other instances, the same function pointer needs to be assigned to a function called:
_g_BlkFuncs_ =_INV_FUNC_PTR_ParseBlockStatus;
and at other instances:
_g_BlkFuncs_ =_AND_FUNC_PTR_ParseBlockStatus;
or
_g_BlkFuncs_ =_OR_FUNC_PTR_ParseBlockStatus;
etc....
The only time I will know which function to assign is when I will retrieve the first part of the function name from a table called
_x_UserPrgBlock_. The first part being the name differentiator such as "_BUF_", "_INV_", "_AND_", "_OR_" and so forth which
is initially stored in the one of the table members called m_LogicElement_ residing in the _x_UserPrgBlock_ table or struct.
In the example below, I made it simple by hard coding the assigning of the m_LogicElement_ member as "_BUF_" (see the line commented as "Manual assignment line" below). In reality the  m_LogicElement_ member is assigned from
a user defined string which will vary from time to time. 
Here is the sample snippet which shows the issue.
================================STRUCT.h
#ifndef STRUCT_H
#define STRUCT_H
typedef struct USR_PRG_CNV{ // User program converter table
char m_LogicElement_[2][knst_BUF_LOGIC_ELEM]; // Name of the logic block
} User_Prg_Block;
#endif
=================================_BUF.h
#ifndef BUF_H
#define BUF_H
void _BUF_FUNC_PTR_ParseBlockStatus(void);
#endif
================================_BUF.c
void _BUF_FUNC_PTR_ParseBlockStatus(void){
int i = 0;
i = 10;
===============================UPC.h
#ifndef UPC_H
#define UPC_H
void AssignmentFunc();
#endif
===============================UPC.c
User_Prg_Block _x_UserPrgBlock_[2];
void AssignmentFunc(){
strcpy(_x_UserPrgBlock_[0].m_LogicElement_, "_BUF_"); // Manual assignment line
===============================DFP.c
#include "_BUF.h"
void (*_g_BlkFuncs_) (void);
char volatile _g_FuncPtrStrVariant_[35];
void SomeFunction(){
strcpy(_g_FuncPtrStrVariant_, _x_UserPrgBlock_[0].m_LogicElement_); // Get "_BUF_"
strcat(_g_FuncPtrStrVariant_, "FUNC_PTR_ParseBlockStatus"); // Complete the function name
// Now try to assign the full function name to the function pointer
//_g_BlkFuncs_ = _BUF_FUNC_PTR_ParseBlockStatus;
//_g_BlkFuncs_ = &_g_FuncPtrStrVariant_;
_g_BlkFuncs_ = _g_FuncPtrStrVariant_; // ???
==============================Main.c
void main(){
AssignmentFunc();
SomeFunction();
In reference to the following line listed above:
_g_BlkFuncs_ = _g_FuncPtrStrVariant_;
I do realize that conventionally, it should be:
_g_BlkFuncs_ =_BUF_FUNC_PTR_ParseBlockStatus;
The problem I find myself faced with is that the function that "_g_BlkFuncs_" points to, has to vary in accordance to the name of the function stored in the _g_FuncPtrStrVariant_ character array! The reason is that the _g_FuncPtrStrVariant_
array is actually built up to the name of the function based on the current contents of m_LogicElement_ residing in the _x_UserPrgBlock_ table.
I think!!!!! that even if I use an array of function pointers, it won't solve the issue.
In summary, in C, is there a way to assign a name of a function built from a character array to a function pointer?
All help sincerely appreciated!
Thanks

I am interpreting your question a little different than Brian.
If I understand you correctly you are asking:  "Given the name of a function as a string, how do I get a pointer to that function".
The unfortunately fact is that C++ does not support reflection, so getting a function by name is not possible.  By the time the linker has done its thing, the function name has been stripped from code.
This means if you need to support string lookup of a function name you need to support an alternate mechanism to handle this.  If you were using C++, a map would be an ideal mechanism.  C can still do this, but the mechanism is a lot uglier
due to the lack of data structures like std::string and std::map.

Similar Messages

  • GRC 5.3 - Management Report Error: Cannot assign an empty string to host..

    Good day Kiran Kandepalli and Others.
    I have successfully executed the background jobs -
    Full User, Role, Profile Synchronization & a
    Full Batch Risk Analysis
    When I run the Management Reports I receive the following error -
    Error while executing the Job:Cannot assign an empty string to host variable 10.
    Has anybody had this error message before?
    When I check table VIRSA_CC_PRMVL, variable 10 is set to No in Nullable collumn.

    Hi Sahad,
    Thanks for your response.  I have checked the usr02 table and logs and do not see any empty fields or strings.  This process worked for 5.2 but fails in 5.3.  Here is the excerpt from the log for the Management Report run.  It seems to fail consistenly at a certain point.  If I knew what the batch job was looking for in host variable 10 I might be able to resolve the problem.  It seems to fail when it starts to report on users.
    Thanks.
    Dan.
    INFO: -
    Scheduling Job =>935----
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob run
    INFO: --- Starting Job ID:935 (RISK_ANALYSIS_BATCH) - tst
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob setStatus
    INFO: Job ID: 935 Status: Running
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob findJobHistory
    FINEST: --- @@@@@@@@@@@ Find the Job History -
    1
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob updateJobHistory
    FINEST: --- @@@@@@@@@@@ Updating the Job History -
    1@@Msg is tst started :threadid: 0
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.dao.BgJobHistoryDAO insert
    INFO: -
    Background Job History: job id=935, status=1, message=tst started :threadid: 0
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis performBatchSyncAndAnalysis
    INFO: --- Batch Sync/Analysis/Mgmt Report started ---
    Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis runBkgMgmReport
    INFO: --- Running the Background Management Report -
    Jan 23, 2009 8:04:39 AM com.virsa.cc.xsys.mgmbground.dao.MgmStats execute
    INFO: Start insert int cc_mgriskd all violations.... 1232726679108
    Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis runBkgMgmReport
    WARNING: Exception in Management Report Job: Cannot assign an empty string to host variable 10.
    com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 10.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.types.VarcharResultColumn.setString(VarcharResultColumn.java:57)
         at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:511)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:355)
         at com.virsa.cc.xsys.mgmbground.dao.MgmStats.execute(MgmStats.java:314)
         at com.virsa.cc.xsys.bg.BatchRiskAnalysis.runBkgMgmReport(BatchRiskAnalysis.java:1182)
         at com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1430)
         at com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:402)
         at com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:264)
         at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:240)
         at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:80)
         at com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:436)
         at com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1225)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BgJob run
    WARNING: *** Job Exception: Cannot assign an empty string to host variable 10.
    com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 10.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.types.VarcharResultColumn.setString(VarcharResultColumn.java:57)
         at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:511)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:355)
         at com.virsa.cc.xsys.mgmbground.dao.MgmStats.execute(MgmStats.java:314)
         at com.virsa.cc.xsys.bg.BatchRiskAnalysis.runBkgMgmReport(BatchRiskAnalysis.java:1182)
         at com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1430)
         at com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:402)
         at com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:264)
         at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:240)
         at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:80)
         at com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:436)
         at com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1225)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BgJob setStatus
    INFO: Job ID: 935 Status: Error
    Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BgJob updateJobHistory
    FINEST: --- @@@@@@@@@@@ Updating the Job History -
    2@@Msg is Error while executing the Job:Cannot assign an empty string to host variable 10.
    Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.dao.BgJobHistoryDAO insert
    INFO: -
    Background Job History: job id=935, status=2, message=Error while executing the Job:Cannot assign an empty string to host variable 10.
    Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob scheduleJob
    INFO: -
    Complted Job =>935----

  • Assign transaction variant to standard transaction.

    Hi All,
    I want to alter the column nos. in table control for transaction VA41 / VA42.
    I created transaction variant ZVA41 using tcode SHD0. I have created new tcode ZVA41_1 using SE93, option 4 - Transaction with variant. I have used transaction - VA41 and transaction variant ZVA41_1 in SE93.
    When i am testing this new Tcode ZVA41_1 from SE93 only, its working fine. but when i am executing tcode ZVA41_1 its not displaying screen as per new variant ZVA41. Its displaying standar screen of VA41. Not getting what else i need to do? I also tried to assign this variant as standard transaction but still no positive result. Its working fine when i am testing it but not working when i am executing it independently.
    Would appreciate your replies. Thanks

    Hi Patrick,
    When you create a transaction variant, I assumed you created a Z transaction that points to PZ03 with a variant. Then in your user profile, you should have this transaction code included. Parameter id tab in SU01 is for the default values of a parameter id when a user logs in.

  • Function Point Analysis for SAP BW Projects

    Hello All,
    Have been assigned a task to come up with Function Point
    analysis for SAP BW projects.
    Any help will be appreciated.
    Thanks,
    Mainak

    Hi Mainak,
      Function Point Analysis is independent of technology, methodology or platform, so there is no function point analysis specific for sap bw, rather you should familiarize with the fundamentals of FPA.
      And as you might know, FAP is used to determine whether a given a tool, an environment or a language is more productive when compared to others.
      I can send you good links if you can give me your email-id.
    Hope this helps...
    Thanks,
    Raj

  • Is it possible to get a function pointer to a getter/setter function

    Please do not respond with questions asking why, what usage, or suggesting alternative ideas.
    Looking for a yes/no answer, from someone who actually knows.
    The generally used workaround for this, is to use a regular function instead of a getter/setter.  This results in having to have ( ) after the function variable obviously.  The question is, can a Function variable be assigned to a getter/setter function and retain its attribute of not needing brackets.  Everything I have read seems to imply it is not, but I am looking for a definitive answer.
    Below is some Pseudo code representing the question:
    public class Foo(){
         private var prop:Object;
         public function get Prop():Object{return prop;}
         public function set Prop(o:Object):void{prop=o;}
    //==================
    var GlobalFuncVar:Function = Foo.<get Prop>;
    *** - If Foo.Prop is used, it returns the value. how can the function pointer be accessed...

    The answer Should be no, but with a dynamic Object you can make this posible where a property call is actually a shortcut to a function.
    But this is a terrible practice because you will confuse anyone looking at the code when they feel its a property its actually a method being used.
    NOT AN ALTERNATIVE SOLUTION, SAME SOLUTION WITH GOOD ENCAPSULATION, DELEGATE to an object.
    use a get and set to set an object that has a common method to execute such as execute()
    then call your prop functionCall or whatever you choose.  myObject.functionCall= (ICanExecute type)
    now that its in myObject.functionCall.ecex()
    swap out your behavior that is required, but keep it clear to the user of your code.

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • Management Report - Cannot assign an empty string to host variable 10

    We ran a Management Report for the first time after completing the User/Role/Profile Full Sync and the user/Role/Profile Batch Risk Analysis.  The job failed with the following error:
    Oct 16, 2008 12:13:29 PM com.virsa.cc.xsys.bg.BatchRiskAnalysis runBkgMgmReport
    WARNING: Exception in Management Report Job: Cannot assign an empty string to host variable 10.
    com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 10.
    We are on GRC 5.3 support pack 4.  Has anybody encountered this error? What does host variable 10 refer to?

    I checked our USOBT_C table and we have a lot of empty values. If this is allowed to be empty in SAP and this is the table that is uploaded into CC, why would all the fields in CC tables then be defined as NOT NULL?  We suspect that since we had uploaded USOBT_C under 5.2 and if this had been an issue before, it may have been corrected when we upgraded to 5.3 but then the old data is still in our system. Is there an easy way to get around or correct this?
    Thanks.

  • Cannot assign an empty string to host variable 1

    Guys,
    I am getting the following problem while trying to create an entity bean., cmp field is not blank string yet I am getting the error. can you please help out?
    _33##0#0#Info##Plain###Remote Exception in Create: CreateA2iLogin: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method a2i.beans.login.LoginHomeImpl0.create(java.lang.String).
         at a2i.beans.login.LoginHomeImpl0.create(LoginHomeImpl0.java:408)
         at a2i.beans.login.LoginHome_Stub.create(LoginHome_Stub.java:56)
         at com.nibco.a2i.beans.A2iLogin.createA2iLogin(A2iLogin.java:118)
         at com.nibco.a2i.beans.A2iLogin.<init>(A2iLogin.java:38)
         at com.nibco.training.servlet.SayHelloServlet.doPost(SayHelloServlet.java:121)
         at com.nibco.training.servlet.SayHelloServlet.doGet(SayHelloServlet.java:32)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.ejb.entity.ContainerException: Exception in method ejbStore().
         at com.sap.engine.services.ejb.entity.ContextFP.store(ContextFP.java:118)
         at com.sap.engine.services.ejb.entity.ContextFP.store0(ContextFP.java:103)
         at com.sap.engine.services.ejb.entity.Context.passivate(Context.java:235)
         at a2i.beans.login.LoginHomeImpl0.create(LoginHomeImpl0.java:401)
         ... 21 more
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is a2i.beans.login.LoginBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.finishWork(TransactionContext.java:454)
         at a2i.beans.login.LoginBean0PM.ejbStore(LoginBean0PM.java:184)
         at com.sap.engine.services.ejb.entity.ContextFP.store(ContextFP.java:115)
         ... 24 more
    Caused by: com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 1.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:584)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:341)
         at a2i.beans.login.LoginBean0Persistent.ejb_iInsert(LoginBean0Persistent.java:335)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
         ... 29 more
    ; nested exception is:
         com.sap.engine.services.ejb.entity.ContainerException: Exception in method ejbStore().#
    #1.5#001143A7AF4000680000005900000F4C00040C3E95D97A60#1139362848402#System.out#sap.com/A2IEARCURR#System.out#Guest#0####edec5450984311da917b001143a7af40#SAPEngine_Application_Thread[impl:3]_33##0#0#Info##Plain###Success 2#

    Guys,
    I am getting the following problem while trying to create an entity bean., cmp field is not blank string yet I am getting the error. can you please help out?
    _33##0#0#Info##Plain###Remote Exception in Create: CreateA2iLogin: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Exception in method a2i.beans.login.LoginHomeImpl0.create(java.lang.String).
         at a2i.beans.login.LoginHomeImpl0.create(LoginHomeImpl0.java:408)
         at a2i.beans.login.LoginHome_Stub.create(LoginHome_Stub.java:56)
         at com.nibco.a2i.beans.A2iLogin.createA2iLogin(A2iLogin.java:118)
         at com.nibco.a2i.beans.A2iLogin.<init>(A2iLogin.java:38)
         at com.nibco.training.servlet.SayHelloServlet.doPost(SayHelloServlet.java:121)
         at com.nibco.training.servlet.SayHelloServlet.doGet(SayHelloServlet.java:32)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.ejb.entity.ContainerException: Exception in method ejbStore().
         at com.sap.engine.services.ejb.entity.ContextFP.store(ContextFP.java:118)
         at com.sap.engine.services.ejb.entity.ContextFP.store0(ContextFP.java:103)
         at com.sap.engine.services.ejb.entity.Context.passivate(Context.java:235)
         at a2i.beans.login.LoginHomeImpl0.create(LoginHomeImpl0.java:401)
         ... 21 more
    Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: SQLException while the data is being flushed. The persistent object is a2i.beans.login.LoginBean0Persistent.
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:101)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
         at com.sap.engine.services.ejb.entity.pm.TransactionContext.finishWork(TransactionContext.java:454)
         at a2i.beans.login.LoginBean0PM.ejbStore(LoginBean0PM.java:184)
         at com.sap.engine.services.ejb.entity.ContextFP.store(ContextFP.java:115)
         ... 24 more
    Caused by: com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 1.
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
         at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:584)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:341)
         at a2i.beans.login.LoginBean0Persistent.ejb_iInsert(LoginBean0Persistent.java:335)
         at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
         ... 29 more
    ; nested exception is:
         com.sap.engine.services.ejb.entity.ContainerException: Exception in method ejbStore().#
    #1.5#001143A7AF4000680000005900000F4C00040C3E95D97A60#1139362848402#System.out#sap.com/A2IEARCURR#System.out#Guest#0####edec5450984311da917b001143a7af40#SAPEngine_Application_Thread[impl:3]_33##0#0#Info##Plain###Success 2#

  • No Requisition Found in Assign sources of Supply,  under central function

    Steps followed:
    1) PR is created in ECC prod 1000000262
    2) Through SRM after selecting the PR we selected Collective Processing
    and then transfered to sourcing cockpit. We got the green message
    transfered to sourcing.
    3) We tried to access the same PR in Assign Source of supply in central
    function. But we could not access the the PR. The message is "No
    requisition found; verify your entries ".
    Any clue or solution to this Issue. ??
    Thanks in advance
    SK

    Hi Manjunath,
    In BBP_PD SC is created
    In SXMB_MONI in SRM, ECC and PI/XI system everything looks ok
    I am a SRM Tech Consultant Did not understand from NOTE  1263876.
    When I go for "Assign Sources of Supply" under Central function
    I do not get any result...I get message
    "No requisition found; verify your entries "
    Thanks
    SK

  • Unexpected behavior of spreadsheet string to array function

    Hello,
    I found some weirdness in LabVIEW 2011 that I do not understand. In the attached vi, I provide a one-dimensional spreadsheet string separated by spaces. I use the spreadsheet string to array function to convert this spreadsheet string into an array of strings.
    I ran into problems when I wanted to specify a space character as the delimiter.
    The conversion works as intended, if I do not specify a delimiter (i.e., the default tab delimiter is used). But if I specify the delimiter, only the first element of the spreadsheet string is converted. I do not understand this behavior.
    Thanks for your help.
    Peter
    Solved!
    Go to Solution.
    Attachments:
    Test spreadsheet string to array.vi ‏9 KB

    You don't have spaces in your string. You have tabs and of course the default delimiter works. Right click and select '\' Codes Display and see the \t.

  • Function Pointer/Parent functionality in Java?

    Hi,
    I'm fairly new to Java and still finding my way around.
    I have to write a game for a university project and need some functionality simalar to that of function pointers in C++. Basically, the game has several different types of objects (ships, planets, projectiles, etc). I have a class which runs a physics simulation, if I want an object to be included in the physics simulation, I instanciate a physics object class within that object and add a reference of the physics object to the physics simulator.
    When the physics simulator detects a collision between two physics objects, i want the appropriate methods to be called within the two objects containing the physics objects. If i was using C++, i would simply construct each physics object with a function pointer to the method i want to run in the event of a collision.
    I hope that made some sense...
    Thankyou in advance for any input =)

    If i was using C++But are you familiar with object-oriented programming? And Patterns?
    Check out the Strategy Pattern: http://en.wikipedia.org/wiki/Strategy_pattern

  • T-Code MIRO with assigned screen variants

    Dear Experts,
    We are using a BDC recording to call MIRO and send it to an agent via workflow using a z-table.
    The customer wants the baseline date on this recording grey'ed out and the business area field required.
    The baseline date is on the "PAYMENT" tab of MIRO and Business Area on the "DETAILS" tab.
    I assigned three screen variants to a transaction variant and activated it. When I post via MIRO outside the BDC recording, everything works perfect.
    However, with the BDC a SAP standard transaction with assigned screen variants doesnu2019t work?
    How can I do it via BDC?
    Transnet Freight Rail

    Hi Suresh,
    FI user tell me, when she entry the incoming ivoice by T-Code MIRO,
    she typed $1882 (TWD) amount in "Basic datea Tab", and typed Item amount $1882(TWD) (System Default Where User Entry Delivery Note),
    but when she clicked clisimulate button,
    the system procedure FI Document as below :
    Debit : Accrued Accounts Payable : $1883 (TWD)  <-- GR/IR Account
    Credit : AP - Vendor 1 : $1882 (TWD)
    Credit : Price difference-direct material $1 (TWD)
    I have already checked that invoice data. The invoice amount is $1882(TWD),
    but when user post fi document, the GR/IR Account Amount is $1883(TWD),
    How did I know the GR/IR Account $1883(TWD) is how to produce?
    Best regards,

  • Searching strings in procedures, function and packages (OWB)

    Hi all,
    I'm working on an OMB script to look for a string in procedures, function and packages in OWB. So far, I found how to do it for functions and procedures:
    string match -nocase \*text_to_find* [OMBRETRIEVE FUNCTION 'my_function' GET PROPERTIES(IMPLEMENTATION)]
    string match -nocase \*text_to_find* [OMBRETRIEVE PROCEDURE 'my_procedure' GET PROPERTIES(IMPLEMENTATION)]
    I have tried something similar for packages but it didn't work. Does someone know how to do this search in packages? Any help will be appreciated.
    Regards,
    Mauricio

    Of course, if you are looking for a match in any source - including procedures and packages not imported into OWB, then OMB+ isn't going to be a ton of help as it won't be aware of those other packages.
    In that case, you can always find those dependencies by doing a standard select owner, name, type, text from all_source where text like '%YOUR_SEARCH_CRITERIA%' query.
    and you can embed that in your OMB+ using the Java/SQL library: How to run SQL from OMB+
    Cheers,
    Mike

  • Binding function pointer to class member fnction

    Hi,
    I have created a function pointer to class nonstatic member function. But facing some compilation issue. Can someone help on this.
    #include "stdafx.h"
    #include "iostream"
    #include <functional>
    using namespace std;
    using namespace std::placeholders;
    class A
    public:
    void Fun(void* param, bool b){cout<<"Hi\n";}
    typedef void (A::*fptr)(void*,bool);
    int _tmain(int argc, _TCHAR* argv[])
    fptr obj;
    auto f = std::bind(&A::Fun, &obj,_1,_2);
    f(NULL,1);
    return 0;

    See some samples about std::bind and std::function
    http://en.cppreference.com/w/cpp/utility/functional/bind
    http://en.cppreference.com/w/cpp/utility/functional/function
    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.

  • Vi reference = function pointer for external DLL?

    So I'm porting this simple program from C to LabVIEW. All it does is getting some signals from an haptics hardware (Sensable Phantom Omni). It should be simple, but it has shown several complications. (been stuck for 2 weeks )
    I successfully imported the hardware's DLL with all of its functions (using LV 8.2, because 8.5 and 8.6 's wizard sucks).
    But there is a function whose argument is a function pointer:
    hUpdateHandle = hdScheduleAsynchronous(updateDeviceCallback, 0, HD_MAX_SCHEDULER_PRIORITY);
     I already have the corresponding VI for updateDeviceCallback (which gets a (void *) that does not really use, and returns an int).
    hdScheduleAsynchronous is part of the hardware's API (I can't mess with it, nor I know what's inside), and as first argument expects a function pointer.
    Can I use the Open VI reference node to get the 'pointer' for my VI and then feed it as an argument for the external DLL? How do I properly cast the VI ref datatype into a function pointer?
    Solved!
    Go to Solution.
    Attachments:
    QueryDevice.c ‏9 KB
    updateDeviceCallback.vi ‏14 KB

    JavierRuiz wrote:
    So I'm porting this simple program from C to LabVIEW. All it does is getting some signals from an haptics hardware (Sensable Phantom Omni). It should be simple, but it has shown several complications. (been stuck for 2 weeks )
    I successfully imported the hardware's DLL with all of its functions (using LV 8.2, because 8.5 and 8.6 's wizard sucks).
    But there is a function whose argument is a function pointer:
    hUpdateHandle = hdScheduleAsynchronous(updateDeviceCallback, 0, HD_MAX_SCHEDULER_PRIORITY);
     I already have the corresponding VI for updateDeviceCallback (which gets a (void *) that does not really use, and returns an int).
    hdScheduleAsynchronous is part of the hardware's API (I can't mess with it, nor I know what's inside), and as first argument expects a function pointer.
    Can I use the Open VI reference node to get the 'pointer' for my VI and then feed it as an argument for the external DLL? How do I properly cast the VI ref datatype into a function pointer?
    LabVIEW has no concept that can translate seemlessly to function pointers and there is certainly no sensible way to make the Call Library Node support something like this.
    There are possibilities to create a DLL from your callback VI and import the function using Windows API calls to pass it as a function pointer to your other function. But this is involved and quite dirty and most importantenly a total nightmare to maintain, since things go completely awry if your DLL is created in a different LabVIEW version than the LabVIEW version you call it with. This may seem like a piece of cake now but whoever will have to upgrade your software to a new LabVIEW version later will love you to the point that they will feel like sending you as the original programmer a nice little present that blows in your face when opened 
    The only feasable way is to write a wrapper DLL in C that translates between something more LabVIEW friendly like a user event and the actual callback function mechanisme.
    Rolf Kalbermatter
    Message Edited by rolfk on 06-09-2009 10:24 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Simulating high and low resolution

    Edit: I'm using CS5 I'm clueless about creating an effect to an existing image. I want a very small center point of the image to be unchanged. Just outside of the center should appear as if it's slightly lower resolution, and the further you go from

  • Email language

    Hello all, recently I moved to Germany and updated my address. However I left english as preferred language in profile. Then I started getting e-mail from Oracle in German not in English. Is it possible to receive them in English? Thanks, Igor

  • F.13 auto clear

    Hi all, 1)Do the system have that functionality to auto-clear open items in GRIR? (Auto-clear meaning no human intervention)? Please any one clarrify the above question Thanks in advance Nandha Moderator: Please, search before posting

  • Why is my iTunes app blocked?

    I try to run it but it just doesn't. It only appears a box " iTunes is blocked, might by you have not permission to use it" or something, but it it my Mac, so.. thank you (:

  • Availability checking user exit at sales order level

    Hi , Is ther any availability Check user Exit at the sales order level? 1)I want to make Confirm quantity to zero in the sales order level 2)The block confirmation is set to VBEP-BMENG to "0" for each item where VBEP-LIFSP =Z1 Is ther any related USE