Adapter Modules when executed?

Hi
I have a module in file adapter (sender). when the module will be executed. is it before the file is polled or it is after the file polling? any broader view on this will be highly appriciated.
thkx
Prabhu

Hi Prabhu ,
Very nice to see your question here ...
After pick the file from sender side the file native format message into XI message format will be done in Adapeter and message id will be generated for the XI message format , later this XI message will be send it Module processor, here generic AF modules and Adapter spcific modules will be executed here
see the below links to helps you lot
http://help.sap.com/saphelp_nw2004s/helpdata/en/fd/16e140a786702ae10000000a155106/content.htm
/people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi
http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/a12241c20af16fe10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/e4/6019419efeef6fe10000000a1550b0/content.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/327dc490-0201-0010-d49e-e10f3e6cd3d8
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/34a1e590-0201-0010-2c82-9b6229cf4a41
Regards
Chilla

Similar Messages

  • Issue with overwriting msg using adapter module when WSS enabled in SOAP CC

    Hi guys,
    I have a SOAP->RFC scenario where on the sender side I'm using an adapter module. This adapter module should modify the message content based on some conditions. This works fine unless the WSS is enabled in the sender SOAP CC. When enabled, the message doesn't get modified. If disabled, it works fine. Do you have any explanation for this? Is there any workaround for this?
    Thanks, Olian

    Hi Olian,
    For 2004s (PI71) too sender adapter doesn't support modules (in normal SOAP mode and not in AXIS)
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    >>if I use the module w/o WSS enabled on the CC,
    Can you tell me how you did this??
    Regards
    Suraj

  • Dummy XML not getting generated from empty file by J2EE adapter module

    Hi All,
    i know when XI gets an empty input text file, it does not generate a send message for it in sender communication channel.
    in my scenario, if i get a file with data, i have to generate an XML message for it using file content conversion - this i have done...........
    but if i get an empty text file, then i have to generate a dummy XML send message for it for my BPM.......
    So i made a J2EE adapter module to generate dummy xml for empty file.....<b>when i give a file with data in it, then my adapter module is called..... but when i give an empty file, then my adapter module is not called</b>.........
    <b><i>Can anybody suggest why the module processor is not invoking my customer-adapter module when an empty file is given.............but the module processor is invoking my customer-adapter module when a file with data is given</i>.</b>
    Thanks,
    Rajeev Gupta

    Hi Amit,
    Below is the code of process method which i used:
    <i>public ModuleData process(ModuleContext moduleContext,
      ModuleData inputModuleData)
        throws ModuleException
    Object obj;
    Message msg_audit;
    AuditMessageKey amk;
    try
    File f = new File("/components/XITEMP/sample/PWC/check.txt");
    PrintStream ps;
    if (f.canWrite())
    FileOutputStream fos =new FileOutputStream(f);
    ps = new PrintStream(fos);  
    ps.println("Testing");
    ps.close();
    fos.close(); 
    else
      f = new File("/components/XITEMP/sample/PWC/check4.txt");
      if (f.exists() ==false)
      f.createNewFile();
    obj = inputModuleData.getPrincipalData();
    if (obj!=null)
    msg_audit = (Message)obj;
    amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
    Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
    else
      String str = new String();
    String str1 = new String();     
                  str1="<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
                 str1+="<ns:MT_PWC_RECORD xmlns:ns=\"urn://PWC_SR3_01/PWC/Customer\">";
             str1+="<RECORD_SET>";     
                 str1+="<RECORD>";
             str1+="<RECORD_DATA>BLANK_FILE</RECORD_DATA>";
             str1+="</RECORD>";
             str1+="</RECORD_SET>";
             str1+="</ns:MT_PWC_RECORD>";     
    str=str1; 
    inputModuleData.setPrincipalData(str);
    catch(Exception e)
    try
    File f = new File("/components/XITEMP/sample/PWC/check.txt");
    PrintStream ps;
    if (f.canWrite())
      FileOutputStream fos =new FileOutputStream(f);
      ps = new PrintStream(fos);  
      ps.println(e.toString());
      ps.close();
      fos.close(); 
    catch(Exception ex)
    return inputModuleData;
       }</i>
    in the above methood, i  used file operations at start just to see whether the module is getting invoked or not...so when i give a data file, then the file operations are performed and messages are written in audit log.........but when i give an empty file, then the file operations are not performed - meaning the module is not getting invoked........
    Thanks,
    Rajeev Gupta

  • Function module when used should not display ALV

    Hi ,
    All ABAP Gurus
    I want to use a function module WS_DELIVERY_MONITOR which should give the VBELN on the basis of CHARG in internal table so that on the basis of VBELN I can fulfil further requirement and display the final output in ALV.
    But this function module when executed display an ALV.
    My requirement is that it should retrieve all the VBELN on the basis of CHARG (which is in the internal table and is passed to the function module) in an internal table and do not display the ALV so that when all the VBELN come in internal table then I can perform further calculation.
    Please guide me in this matter.
    Thanks & Regards
    Bharti Jain

    Hi Bharti,
    Please try calling FM 'WS_LM_DATA_SELECTION' instead. This FM is callled inside main FM 'WS_DELIVERY_MONITOR' and is used to fetch data. You will only need to fill extra import parameter for using  this FM ( if_flag_inbound) and two changing tables  (lt_postab) and  ( lt_postab_kodat), which will have results. 'if_flag_inbound' field will be having value X for all inbound cases.
    I have used the same FM to get open deliveries:
    CALL FUNCTION 'WS_LM_DATA_SELECTION'
        EXPORTING
          if_proctype                 = c_proc_type_f
        TABLES
          it_matnr                    = i_deliv_matnr
          it_lgort                    = i_deliv_lgort
          it_lfart                    = i_deliv_type
          it_kostk                    = i_deliv_kostk
          it_wbstk                    = i_deliv_wbstk
          ct_postab                   = i_deliv_nos
        CT_POSTAB_KODAT             =
        EXCEPTIONS
          no_data_found               = 1
          wrong_proc_type             = 2
          OTHERS                      = 3 .
      IF sy-subrc = 0.
    **-Calculate open delivery quantity
        LOOP AT i_deliv_nos INTO wa_deliv_nos
                                 WHERE NOT posnr IS INITIAL.
          pc_open_deliv_qty = pc_open_deliv_qty + wa_deliv_nos-lfimg.
        ENDLOOP.
      ENDIF.
    <removed by moderator>
    Edited by: Thomas Zloch on Sep 7, 2010 9:06 AM - please do not ask for ...

  • Unable to deploy custom adapter module in PI 7.31

    Hi pros,
    I created a custom adapter module to split some complex input files to multiple messages. We use a SAP PO 7.31 java-only installation. I followed this document to create my adapter module:
    How to Create Modules for the JEE Adapter Engine
    I know it is for PI 7.1 but a colleague of mine said that he was able to create a running adapter module for PI 7.3 following the guide. I created the following projects:
    EAR project references the EJB project:
    Project facet of the EJBproject:
    ejb-jar.xml config:
    application-j2ee-engine.xml (in EAR project):
    When I try to deploy my module, I get the following error:
    Java version:
    NWDS version:
    Any hint is appreciated! What can be wrong? What can I check again?
    THANKS!
    Message was edited by: Stefan Münchow

    I am not sure if the version is the problem. We have PI 7.31, support package 14, patch level 0 and NWDS 7.31 support package 12, patch level 4. The version of NWDS is lower than the version of the PI. According to Note 1599298 the error occurs when the NWDS is higher than the one of PI. Besides, we are able to deploy BPMN processes with the same NWDS to the same server.
    This is the exact exception trace shown in NWDS:
    com.sap.ide.eclipse.sdm.deploy.DeploymentException: [ERROR CODE DPL.DCAPI.1027] DeploymentException.
    Reason: ASJ.dpl_dc.001085 Operation [deploy] of [sap.com_SplitArticleFileModule_EAR] failed
    at com.sap.ide.eclipse.sdm.threading.DCDeployThread.run(DCDeployThread.java:110)
    ------------- Nested exception -------------------
    com.sap.engine.services.dc.api.deploy.DeployException: [ERROR CODE DPL.DCAPI.1027] DeploymentException.
    Reason: ASJ.dpl_dc.001085 Operation [deploy] of [sap.com_SplitArticleFileModule_EAR] failed
    at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.deployItems(DeployProcessorImpl.java:862)
    at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.deploy(DeployProcessorImpl.java:259)
    at com.sap.ide.eclipse.deployer.dc.deploy.DeployProcessor70.deploy(DeployProcessor70.java:105)
    at com.sap.ide.eclipse.sdm.threading.DCDeployThread.run(DCDeployThread.java:80)
    Caused by: com.sap.engine.services.dc.cm.deploy.DeploymentException: ASJ.dpl_dc.001085 Operation [deploy] of [sap.com_SplitArticleFileModule_EAR] failed
    at com.sap.engine.services.dc.cm.deploy.impl.OnlineDeployProcessor.performDelivery(OnlineDeployProcessor.java:246)
    at com.sap.engine.services.dc.cm.deploy.impl.BulkOnlineDeployProcessor.deploy(BulkOnlineDeployProcessor.java:67)
    at com.sap.engine.services.dc.cm.deploy.impl.AbstractDeployProcessor$DeployProcessorHelper.visit(AbstractDeployProcessor.java:282)
    at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:84)
    at com.sap.engine.services.dc.cm.deploy.impl.AbstractDeployProcessor.deploy(AbstractDeployProcessor.java:100)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployThread.run(DeployThread.java:39)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: com.sap.engine.services.dc.gd.DeliveryException: [ERROR CODE DPL.DC.3298] Operation [deploy] of [sap.com_SplitArticleFileModule_EAR] failed
    at com.sap.engine.services.dc.gd.impl.ApplicationDeployer.deploy(ApplicationDeployer.java:167)
    at com.sap.engine.services.dc.gd.impl.InitialApplicationDeployer.performDeployment(InitialApplicationDeployer.java:138)
    at com.sap.engine.services.dc.gd.impl.InitialGenericDeliveryImpl.deploy(InitialGenericDeliveryImpl.java:57)
    at com.sap.engine.services.dc.cm.deploy.impl.OnlineDeployProcessor.performDelivery(OnlineDeployProcessor.java:213)
    ... 8 more
    Caused by: com.sap.engine.services.deploy.server.utils.DSRemoteException: ASJ.dpl_ds.006193 Operation [deploy] of [/usr/sap/DP2/J64/j2ee/cluster/server0/temp/tc~bl~deploy_controller/archives/213/SplitArticleFileModule_EAR.ear] failed
    at com.sap.engine.services.deploy.server.DeployServiceImpl.catchDeploymentExceptionWithDSRem(DeployServiceImpl.java:3370)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:315)
    at com.sap.engine.services.dc.gd.impl.ApplicationDeployer.deploy(ApplicationDeployer.java:139)
    ... 11 more
    Caused by: com.sap.engine.services.deploy.container.rtgen.GenerationException: Open failed for '/usr/sap/DP2/J64/j2ee/cluster/server0/temp/deploy/SplitArticleFileModule_EAR.ear1422275742985/com.sap.aii.utilxi.server.jar' with fd 218 returning message 'couldn't find 'END' tag' and errno 0 after trying cache.
    at com.sap.engine.services.webservices.server.deploy.preprocess.WebServicesGenerator.createSingleModule(WebServicesGenerator.java:100)
    at com.sap.engine.services.webservices.server.deploy.preprocess.WebServicesGenerator.generate(WebServicesGenerator.java:54)
    at com.sap.engine.services.deploy.container.rtgen.AnnotationsSupportingGenerator.generate(AnnotationsSupportingGenerator.java:27)
    at com.sap.engine.services.deploy.ear.jar.moduledetect.GeneratorWrapper.generate(GeneratorWrapper.java:43)
    at com.sap.engine.services.deploy.ear.jar.ModuleGeneratorTool.generate(ModuleGeneratorTool.java:110)
    at com.sap.engine.services.deploy.ear.jar.ModuleGeneratorTool.generateOverExistingModules(ModuleGeneratorTool.java:97)
    at com.sap.engine.services.deploy.ear.jar.ModuleGeneratorTool.generateModules(ModuleGeneratorTool.java:80)
    at com.sap.engine.services.deploy.ear.jar.EARReader.read(EARReader.java:240)
    at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.prepareNewDeploymentInfo(DeployUtilTransaction.java:217)
    at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:199)
    at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:421)
    at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:473)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:1836)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:360)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:313)
    ... 12 more
    Caused by: java.util.zip.ZipException: Open failed for '/usr/sap/DP2/J64/j2ee/cluster/server0/temp/deploy/SplitArticleFileModule_EAR.ear1422275742985/com.sap.aii.utilxi.server.jar' with fd 218 returning message 'couldn't find 'END' tag' and errno 0 after trying cache.
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:154)
    at java.util.jar.JarFile.<init>(JarFile.java:141)
    at java.util.jar.JarFile.<init>(JarFile.java:105)
    at com.sap.engine.services.webservices.server.deploy.preprocess.WebServicesSupportHandlerImpl.generateWebSupport(WebServicesSupportHandlerImpl.java:79)
    at com.sap.engine.services.webservices.server.deploy.preprocess.WebServicesGenerator.createSingleModule(WebServicesGenerator.java:69)
    ... 26 more
    Maybe the used jar files could be the problem?

  • File Receiver adapter module Dynamic Configuration

    Hi All
    I have a adapter module in a receiver file adapter. In the code I try to access the file name through dynamic configuration,The file name gets set in the mapping.
    String strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
    When my module get executed I get error: nested exception is: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageProperty(com.sap.engine.interfaces.messaging.api.MessagePropertyKey) of an object loaded from local variable 'msg'
    Is it possible to get file name in receiver adapter? if so why does this error occur?

    Yes it is possible...chk this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    i guess u have added this import statement in ur code:
    import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
    Code will be soemthing like this (FOR PI7.1)
    MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
    String filename = msg.getMessageProperty(mpk);
    Thanks
    Amit

  • SAX Parsing in Adapter Module

    Hi All,
    I need to build a custom Adapter Module where i want to use SAX Parsing for parsing XML document. I tried with a piece of Code but i'm getting following error while running the same:
    Error occurred while sending message (GUID 6da4ff1c-3736-4990-1881-a8f09edd5fde): null
    When i check the Audit Log the i just see following two lines:
    Success Channel JDBC_s_Article_Grp1: Query executed successfully and confirmation skipped. Data may be sent again ("TEST" mode)
    Send query result. Size: 1398556 characters
    There are no logs being created for module at all. Also when i run the same code with DOM parsing, it works perfectly fine.
    I have tries with re-deployment multiple times but no result.
    Any pointers?
    Regards,
    Anurag

    try to handle exceptions and use logging to know what the issue is.
    That is the best way to troubleshoot your code
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a?quicklink=index&overridelayout=true
    refer section 4.4.2 Writing Audit Logs

  • MalformedInputException Error in Adapter module for SFTP channel

    Dear All,
    I am using MessageTransformBean in adapter module for Plain to XML conversion. The channel works fine in all the cases but when I recieve     "  ì " or few more special characters in the file my channel does not pick file and show below error.
    Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    I am using below parameter value in adapter module.
    Transform.Class : com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType : text/xml;charset=ISO-8859-1
    Please help me if any of you have faces such error in your developments.
    Avanish

    Hi Grzegorg,
    I have tried using UTF-8 encoding in my channel but this doesn't work. Communication cahnnel is still giving same problem.
    Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    The file which we are trying to process have character  Ì and as far as my serach is concerned i think this belongs to charset ISO-8859-1.
    Any more suggestion Guys to solve this problem.
    Thanks and Regards
    Avanish

  • Issue in Adapter Module

    Hi Experts,
    I have written an Adapter module to set the target file name (because it could not be done with usual DynamicConfig in mapping because of multimapping). I am facing a peculiar issue with it. For ex: I have 3 msgs. First msg started executing the module to set the target fillename and about to end the module execution. Meanwhile second msg enters the module execution and changes the file name. This is resulting in first msg to post a file with name set by second msg. I have put "Maintain order at runtime" in interface determination of ID to fix the issue. But this isssue is still persisting. Please let me know, how can a msg acquire a lock on the module and untill it finishes it execution, no other msg should start the module execution.
    Thanks,
    Rakesh

    Hi Michal,
    I have written below code to name the \target file in module code. I have also set "Adapter specific msg attributes" in receiver file adapter and referred file name from dynamic config:
    public ModuleData process(ModuleContext inputModuleContext, ModuleData inputModuleData)
         throws ModuleException {
                   Object obj = null;
                   Message msg = null;
                   AuditAccess audit = null;
                   MessageKey keyOut = null;
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message) obj;
                   keyOut = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
                   try
                        audit = PublicAPIAccessFactory.getPublicAPIAccess().getAuditAccess();     
                        audit.addAuditLogEntry(keyOut, AuditLogStatus.SUCCESS, "Module Started Execution..");
                        MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
                        InputStream is = msg.getDocument().getInputStream();
                        DocumentBuilderFactory docBuilderFact = DocumentBuilderFactory.newInstance();
                        DocumentBuilder docBuilder      = docBuilderFact.newDocumentBuilder();
                        Document doc = docBuilder.parse(is);
                        Node nl = (Node) doc.getDocumentElement();
                        Node n = nl.getFirstChild();
                        Attr a = (Attr) n.getAttributes().item(0);
                        String Num = a.getValue();
                        audit.addAuditLogEntry(keyOut, AuditLogStatus.SUCCESS, "Number is "+Num);
                        Attr a1,a2;
                        if (n.getNodeName().equalsIgnoreCase("Create"))
                             a1 = (Attr) n.getAttributes().item(1);
                             String sd = a1.getValue();
                             audit.addAuditLogEntry(keyOut, AuditLogStatus.SUCCESS, "Start Date is "+sd);
                             String fileName = sd + "-" + Num + ".xml";
                             msg.setMessageProperty(mpk,fileName);
                        else(n.getNodeName().equalsIgnoreCase("Update"))
                             a2 = (Attr) n.getAttributes().item(2);
                             String sd = a2.getValue();
                             audit.addAuditLogEntry(keyOut, AuditLogStatus.SUCCESS, "Start Date is "+sd);
                             String fileName = sd + "-" + Num + ".xml" ;
                             msg.setMessageProperty(mpk,fileName);
                   catch(Exception e)
                        audit.addAuditLogEntry(keyOut, AuditLogStatus.ERROR, "Execption Occured.." + e);
                   return inputModuleData;
    When 3 msgs get created for Create interface, File name set by first msg is being changed by second and file for first msg is posted with name set by second (because second msg has changed the target file in module code by that time )

  • Error in Adapter modules

    Hello Gurus,
    We are facing issue in Adapter modules installed in J2EE engine. We deployed two different Adapter modules in J2EE engine and two different interfaces are using them. But if any one of the interfaces run, the other interface is giving following error:
    "Error: BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.".
    If we restart the J2EE engine, it will start to work but the another interface is giving the smae error.
    Please help me.
    Regards,
    Indira D

    I facing the same error few days before.
    My module was working well for the first time but running again used to give problem.
    But on restarting server or redeploying module it again use to work fine.
    The basic problem was...
    there were few variables used in my modules which were initialised as class variables.
    when the process() method gets called for first time it use to execute properly.
    solution:
    Reinitialize variables at the starting phase of process() method.
    Reward points if useful.
    thanks

  • FileName in Sender File Adapter Module

    Hi Folks,
    In my sender file adapter have written a module to read the picked file name. The protocol used is NFS.
    Notice that the file name read in the module has the absolute path, including the directory path. E.g The file name xyz has to be picked from source directory
    XIServer\Outbound. In the module when I retrieve the file name, it comes up as
    XIServer\Outbound\xyz. Is this expected behaviour?
    I was expecting just the file name<xyz> to be retrieved.
    Thanks,
    Anand

    HI,
    Create an UDF and write this code.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key =
    DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName;
    in Adapter u will have Adapter specific parameters check the file name check box.
    Using this UDF u will get the file name at target side.
    Regards,
    Phani.

  • SAP PI crashes because of Custom Adapter module

    Hi,
    We are facing a strange problem. We have deployed a custom adapter module developed in java which accesses a Hardware Security Module(HSM) and uses the keys in HSM to digitally sign our data. Now, when I use particular methods in this code and deploy it on PI server, the server crashes while testing this out. As soon as I run the channel having this adapter module, PI server becomes unavailable. It restarts on its own after a few minutes.
    One of the reasons I identified to be causing this issue is the signing mechanism used in code. When I used a mechanism that was not supported or not correct, it crashed the server. If i corrected it, it worked fine. I found no other thing in my code causing this behaviour apart from this mechanism. But I am still not able to understand how a single method in a code can cause the whole server to crash. Has anybody here faced such a problem? Any pointers would be appreciated.
    We are using SAP PI 7.31 java only installation.
    Thanks,
    Ravi Desai

    Hi Ravi
    1. To check if it is a memory issue. Once you start the channel, check the memory usage in nwa. Check if the memory is increasing once the channel is started.
    2. Add debug statements to print logs in default traces at as many places as possible. Since your code is not reaching the Catch block, using the debug statement you can reach the line in the code which is causing this issue.
    Regards
    Osman Jabri

  • Error when executing statement for table/stored proc

    Hi All,
          I am getting this error when executing IDOC to JDBC (Stored Procedure) Scenario.
         In my stored procedure I have three insert statements to insert rows in to 3 tables.
        This stored procedure is working fine for two insert statements i.e, 
             For this I have created data type for stored procedure with 10 elements and executed the scenario and was successfully running.
        when I added 3rd insert statement to stored procedure ie., when i added 5 more elements to the datatype (totally 15 elements) it starts giving the bellow error in Message Monitoring.
    <i><b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC_1' (structure 'Statements'): java.sql.SQLException: General error</b></i>
    <i><b>Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC_1' (structure 'Statements'): java.sql.SQLException: General error</b></i>
       Note:- I have run the stored procedure  with three insert statements in Sql Server, and also by calling an external program also, and was working fine.
    <i><b> Note : Is there any structure needs to be follow when working with IDOC to Stored procedure.</b></i>
    I am struck up with the error, can any body resolve this issue.
    Thanks in Advance,
    Murthy

    Hi narasimha,
                      This seems to be any error due to incorrect query formation.In your receiver jdbc channel set the parameter logSQLstatement = true.you can find this parameter in the advanced mode. Using this parameter you will be able to see the sql query which is generated at runtime in the audit log in RWB.
    Regards,
    Pragati

  • GUI_DOWNLOAD fails in FM when executed remotely

    Hi guys,
    First of all I dont know much about ABAP programming as I am from a different background.
    I created a ZBAPI which has some functionality of storing some data (which has been provided through import parameters i.e., as input) to a file system.
    This function module when I am testing locally using SE37 works as expected.
    However when I execute this FM externally using some JCO client API, the FM fails at GUI_DOWNLOAD function level saying that "code page cannot be asertained".
    Note: I searched forum for this topic tried different ways with no success.
    Thanks,
    - Gujjeti.
    Edited by: Praveen Gujjeti on Apr 1, 2009 11:52 AM

    >
    Ravi Ranjan wrote:
    > Hello,
    >  DATA: lv_filename TYPE dxfilename,
    >            lv_data        TYPE STRING.
    >
    > *Here you can pass the application server location and file name.
    > lv_filename = '/usr/sap/tmp/test.dat'.
    >
    > * open dataset-Open the file in write mode .
    >     OPEN DATASET lv_filename FOR APPENDING
    >                  IN TEXT MODE ENCODING DEFAULT.
    >
    > * Transfer the Recored to application server 
    >     TRANSFER lv_data TO lv_filename.
    >
    > * close data set.
    >       CLOSE DATASET lv_filename.
    >
    > Hope this will help.
    >
    > Please let me know if you need anything else on this.
    > Regards
    > Ravi
    Can I use the same code for handling binary data. As far as I know it requires a type XSTRING instead of STRING.
    so this line lv_data TYPE STRING. should be changed to lv_data TYPE XSTRING.
    Is my assumption correct or anything else I am missing.
    Thanks,
    - Gujjeit.

  • Adapter Module (Reading Excel File)

    Hi Guys,
    I followed the Webblog : Read Excel instead of XML through FileAdapter
    For File Adapter Module Development , for reading Excel Sheet.
    Deployment all went fine and when i used in my configuration , file is getting picked up but the xml content is not getting displyed , it says not well formated.Below error is shown in the CC Monitor
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'http://pxxxxx:50xxx/mdt/messagecontentservlet?att...
    My coding in nwds
              xmldata =   "<?xmlversion="1.0"encoding="UTF-8"?>
                             + "<ns:"+wb.getSheet(0).getCell(0, 0).getContents() +"xmlns:ns=""
                             + wb.getSheet(0).getCell(1, 0).getContents() + "">"
                             + "<Name>"+ wb.getSheet(0).getCell(1, 2).getContents()
                             + "</Name>" +"</ns:" wb.getSheet(0).getCell(0, 0).getContents()">";
    Kindly suggest if any
    srini
    Edited by: Venkateswarlu Srinivas on Jul 4, 2008 2:47 PM

    try removing the \n you have added in the string

Maybe you are looking for