Module Processing :

Hi All
I have a scenario where I am picking up a set of files using the File Adapter Sender. The polling is set to 60 seconds and the processing paramerter are EOIO. I have a bean in place to convert the file so picked up into Base64.
What I see happen is that the Bean is returning the same converted string for more then a couple of messages ie.
File1 -> Bean Conversion -> File1 Converted Message
File2 -> Bean Conversion -> File1 Converted Message
File3 -> Bean Conversion -> File1 Converted Message
In the later two cases it should have returned
File2 Converted Message
File3 Converted Message
Why is this happening ? How can I trace this to see what is wrong. Isnt the Module context and Module Data supposed to change with each case.
Here is the code in my Bean
package mckpedBase64;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.ejb.CreateException;
import com.sap.aii.af.mp.module.*;
import com.sap.aii.af.ra.ms.api.*;
import com.sap.aii.utilxi.base64.api.Base64;
@ejbHome <{mckpedBase64.ConvertoBase64Home}>
@ejbLocal <{mckpedBase64.ConvertoBase64Local}>
@ejbLocalHome <{mckpedBase64.ConvertoBase64LocalHome}>
@ejbRemote <{mckpedBase64.ConvertoBase64}>
@stateless
@transactionType Container
public class ConvertoBase64Bean implements SessionBean, Module {
     public void ejbRemove() {
     public void ejbActivate() {
     public void ejbPassivate() {
     public void setSessionContext(SessionContext context) {
          myContext = context;
     private SessionContext myContext;
Business Method.
     public ModuleData process(
          ModuleContext modulecontext,
          ModuleData inputModuleData) {
          try{
          Object obj = null;
          Message msg = null;
          XMLPayload xmlpayload = null;
          String str_b64 = " ";
          String xmldata = " ";
          obj = inputModuleData.getPrincipalData();
          msg = (Message) obj;
          //Payload payload = msg.getDocument();
          xmlpayload = msg.getDocument();
            str_b64 = com.sap.aii.utilxi.base64.api.Base64.encode(xmlpayload.getContent());
          xmldata =
               "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"
                    + "<ns:"
                    + "MC_SOAPFile_mt"
                    + " xmlns:ns=\""
                    + "http:/MCK_FILERFCSOAPRFC.COM"
                    + "\">\n"
                    + "<MCREQ>"
                    + str_b64
                    + "</MCREQ>\n"
                    + "</ns:"
                    + "MC_SOAPFile_mt"
                    + ">";
          xmlpayload.setContent(xmldata.getBytes());
          inputModuleData.setPrincipalData(msg);
          } catch (Exception e) {}
               //System.out.print(e.getMessage());}
          return inputModuleData;
Create Method.
     public void ejbCreate() throws CreateException {
Regards
Aju Paul

Hi Aju,
>>Isnt the Module context and Module Data supposed to change with each case.
Yes, these objects will change with each incoming data.
Comment this line of code and try...
inputModuleData.setPrincipalData(msg);
>>How can I trace this to see what is wrong.
You can trace the messages inside the process method by writing them into a file using the following code...
File f = new File("d:
testing.txt");
FileOutputStream fos = new FileOutputStream(f);
PrintStream ps = new PrintStream(fos);
ps.println("Testing");
and finally close the file fos.close();
Regards,
Uma

Similar Messages

  • Adapter Module Processing

    I have a file to file scenario. The incoming file contains Employee Details and I need to validate each record and need to reject them if they are invalid as per the business rules.
    For this I know I need to create the Adapter Module Processing.
    I am following the below mentioned document.
    https://websmp209.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf
    I dont have an NWDS installed, but I want to develop my java program in Eclipse? Whether it is OK to do it in Eclipse? Once I develop my Java program what exactly I need to do? How to create a Jar file in Eclipse? How to import that in XI?
    Thanks.
    [email protected]

    Hi Jenni,
    This topic has been already discussed in the below thread:-
    Creating Adapter Modules
    In general, I will explain how to create .JAR file:-
    Creating a .JAR file is easy. Go to the directory where your classes are stored and type :-
    jar -cf myfile.jar *.class
    (jar is the command to run the jar utility. -cf are options, where c create arhive and f specify archive file name)
    Now, if you have an existing JAR file, and want to extract it, you'd type:-
    jar -xf myfile.jar
    Also go thro' this link for step by step procedure on simple Module Processing:-
    https://websmp201.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf
    I hope this provides you a solution.
    Regards.
    Praveen

  • Microsoft Operations Manager Condolidator Module processing thread failed

    Hello,
    I got the error: The Microsoft Operations Manager Condolidator Module processing thread failed with an internal error and must be unload.
    with event ID 11105 & 11108 but not the one in the article is it the same issue or more ...
    I could not find any WMI issue as stated in http://thoughtsonopsmgr.blogspot.com/2011/01/error-consolidator-module-failed.html
    Any idea?
    Thanks,
    Dom
    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    try clearing the health service cache on the agents and restart the health service to reload that workflow.
    Juke Chou
    TechNet Community Support
    I did already twice and this did not fix the issue.
    Thanks,
    Dom
    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

  • User Defined Module Processing

    Could some one send me the User Defined Module Processing Step By Step guide to
    [email protected]
    Thanks for your help.

    Hi,
    Are you talking about Adpter Modules ?
    If so , here is a guide from service.sap.com-
    https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202
    Regards,
    Moorthy

  • Module processing inside Sender File Adapter

    Hello,
    I am trying to analyze whether I can create a specialized module inside Sender File Adapter. As of right now, the Sender File Adapter and Receiver as well, assume endSeparator character in the end of each record. For files that do not have this field, it is just on continuous string, I assumed I can create an
         adapter module
         call it BEFORE data in the file is being converted to XML format
         Insert 'nl' character (since the record length is fixed)
         Call regular adapter processing (converting to/from XML)
        However, creating any module inside Sender File Adapter, the payload of the main document is already in XML format. Is there anyway to avoid it?
       Thanks for your help,
             Dmitriy Mindich

    It is not possible with the standard functionality.
    So maintain the sender file adapter with no conversion, but in the module tab enter following modules:
    1. Your module
    2. The conversion module (*)
    3. The standard module.
    (*) for details look here:
    Look here:
    http://service.sap.com/nw-howtoguides
    -> Exchange Infrastructure
    -> How To Use the Content Conversion Module in JMS Adapter
    Regards
    Stefan

  • How to control sequence of Function Modules processed in update task?

    Hello,
    I've some questions regarding following process that needs to be extended: a Function Module (FM) 'Save' calls several other FM e.g. 'X1' and 'X2' in update task. Those update modules are independent from each other and write data to the database that finalize the save process.
    Now a third FM 'X3' needs to be called in update task. This one is also independent from 'X1' and 'X2' but it calls a further FM 'X4' in background task as separate unit which starts a job. This job  requires the data from FM 'X1' and 'X2' already persistent on the database. By the way: the FM 'X3' triggers the Access Control Engine (ACE) notification that calculates the authorization data in the mentioned job. Therefore this process needs to be the last FM call in update task in the queue of calls in FM 'Save'.
    Questions:
    (1) Is it possible to control the process sequence of the FM 'in update task' simply by the sequence they are called in FM 'Save'.
    (2) Presumed that all FM beside 'X3' have processing type "Update with immediate start" or "Immediate start, no restart" (in short  V1) would it be another solution to specify FM 'X3' with type 'Delayed' to control the process sequence? When a delayed FM will be processed?
    (3) Is it uncritical to call in FM 'X3' (already running in update task) the FM 'X4' with addition in background task as separate unit  that furthermore starts a job by an event? I'm afraid that this nesting could lead to unexpected errors.
    Thank you in advance for your help!
    Best regards,
    Oliver

    ya it will this be in  the same sequence only...........
    Regards
    Anbu

  • CRM modules - Process questionnaires, Process flows

    Can any one help find where I can access process questionnaires(RD 20),Process flows for CRM modules Telesales, sales support, I marketing, I store and service contracts. I need them for my present assignement. Any help would be highly appreciated.If you have any previous documentation please send them to [email protected] I would be very helpful to you.

    Hi,
    Refer the links,
    [Explanation of the Process Flow|http://www.sapdb.org/7.4/htmhelp/dc/043d57ed2b11d4aa9a006094b92fad/content.htm]
    [SAP MM Process Flow-1|http://www.saptechies.com/mm-process-flow/]
    [SAP MM Process Flow-2|http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=582]
    Regards,
    Shyamal

  • Production module process

    good evening
    just want to know the flow from bill of materials to production of sap b1
    any suggestions on where to find specific samples on how to transact in this module am not familiar with manufacturing/production processes.
    thank you.

    Hi.......
    Go through the following process:
    4.Prepare BOM for a Finished Goods. Production--> Bill Of Material
    5.Based on the requirement Production dept will plan the production. (Productioon> production Order>Planned)
    6.User will have to select the FG planned for production and its BOM components will come automatically along with its ratio defined into the Bill of Material.
    7.Initially Production Order will be into the Planned Stage.
    8.Once planned the status will have to be changed to Released. (Productioon> production Order>Released)
    9.After release, the commitment for the RM and Order for the FG will be created towards Production Order that can be viewed in inventory status of the item.
    10.On the basis of inventory status raw material has to be issued and that should be done through Issue for Production. ( (Productioon--> Issue for Production)
    11.Once the testing done FG has to be received through Receipt from Production where user has to enter the total approved quantity and total rejected quantity.  (Productioon-->Receipt From production)
    12.Once Production completed, the status of production has to be changed to closed and ready for dispatch. (Productioon> production Order>Planned)
    Regards,
    Rahul

  • Java Docs for the Module Process Classes

    Hi,
    I would like to start creating my own JDBC and file-based modules for interface development. I have found several  SDN contributions which step through the creation of these modules. These are very helpful.
    However, I have not yet found comprehensive documentation describing the classes used in module develpment. i.e.:
    - com.sap.aii.af.mp.module.Module
    - com.sap.aii.af.mp.module.ModuleContext
    - com.sap.aii.af.mp.module.ModuleData
    Does anyone know where to find the Java Docs for these classes? Or is there any other equivalent explanation of how to use these classes, their methods and fields?
    Any help would be greatly appreciated.
    Carl Engel
    CSC Australia

    Hi Carl,
    Another link for you
    http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/frameset.htm
    This says that the java documentation is available in the example adapter/module that is there with XI.
    I vaguely remembering seeing the docu..it was long back though..right now i donot have access to a system...
    Get the rar(java archive) that i talked about in the above link...
    Thanks,
    Renjith

  • Plz Send Me SD Module Process

    Hi Friends
    Anybody send me the SD Module Process

    Hi Mahesh,
    SD document reference:
    http://www.sap-img.com/sap-sd.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/06/57683801b5c412e10000009b38f842/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/8c/df293581dc1f79e10000009b38f889/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/SDSLS/SDSLS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCSD/CAARCSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_SD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSD/BCBMTWFMSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOLISPLN/LOLISPLN.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/92/df293581dc1f79e10000009b38f889/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/55f33e545a11d1a7020000e829fd11/frameset.htm
    Other SD documents:
    http://www.sap-basis-abap.com/sapsd.htm
    http://www.sapgenie.com/abap/tables_sd.htm
    http://planetsap.com/logictics_SD_main_page.htm
    http://www30.sap.com/china/services/education/files/AFS.html
    http://www50.sap.com/useducation/curriculum/course.asp?cid=60193400
    https://websmp208.sap-ag.de/~sapidp/011000358700003596482006
    Reward points pls.
    Regards,
    Govind.

  • Dynamic configuration required in sender file - Adapter Module

    Hi Everybody,
    I am developing an Adapter Module in the file adapter (sender) using Adapter Specific Message Attributes.
    I am using Dynamic configuration inside the Module Process method in the adapter module.
    We are getting an error saying Dynamic Configuration cannot be resolved.
    Can anybody tell me the package to be used.
    Thanks,
    Zabiulla

    You can access the dynamic configuration in adapter module like this:
    Message msg = (Message) inputModuleData.getPrincipalData();
    String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
    You do not need any addition library besides the adapter module API.
    Hope that helps
    Stefan

  • Adapter Module Receiver File Adapter

    Hi All,
    I am getting file name in the Mapping in my target structure in a field FILENAME and i want to use this field to create a file at the target with the name as the value in FILENAME.
    I have to develop this by using Adapter Module.
    Note : This can be done by Variable Substitution and Dynamic Configuration UDF.But i want to implement the same by using adapter module.
    Can somebody help me out in getting the FILENAME from mapping inside the module process method of module.
    Thanks,
    Zabi

    Try this..
    private Map param;
    DynamicConfiguration conf = (DynamicConfiguration) param.get(
    StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String Filename = conf.get(KEY_FILENAME);[/code]
    Thanks
    Sebin

  • Adapter module that dumps file to XI file directory

    I am given a task to find a way of backing up files the simpliest way. Currently, our config is in a scenario where there are 2 receiver, the receiving system (SAP) and the file backup (File adapter). I would want to reduce the config requirements by eliminating the file backup objects. And I am thinking of doing this by creating an adapter module to be included in the sender adapter.
    Another idea I could think of is the adapter module calls upon the file comm channel to do the file backup.
    The purpose of this research is to reduce object transport time and the mistakes the transport guys are doing on the file comm ch reconfiguration.
    To those who have experiences with adapter module development, is this idea feasible?

    Hi Jai,
    Thanks for your reply. That is the 2nd option I have in case the 1st one isnt possible.
    To further elaborate,
    Current config:
    we have two AS2 comm channels (sender and receiver) managing the connection with our external partners.
    File comm channels to backup the files we send and receive.
    The problem:
    We are having problems with the transport guys as they often make mistake on reconfiguring the file comm channel during transport.
    Requirements:
    Reduce object creation and tranport time.
    Solution proposal 1:
    The idea is to remove all existing objects related to file back up and have all the file back ups done by the adapter module. And this adapter module would become part of the as2 comm channels module processes.
    Hope this clarifies things more.

  • File Module Generation: Error: java.lang.NullPointerException in RWB.

    Hello XI Xpert's,
    I am following below SDN blog to generate file module...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805
    I have done all steps as mentioned using NWDS. We have sucessfully deployed same on J2EE engine using SDM. SDM logs shows that it is sucessfully deployed.
    I have configured Sender File adapter to call my customised module.( Called before standard file module).
    But when I checked in RWB, its gives me error :
    Sender Adapter v2703 for Party '', Service 'BS_DEV_XI_401_NA':
    Configured at 2007-08-27 12:28:14 EDT
    History:
    - 2007-08-27 12:32:04 EDT: Retry interval started. Length: 2.000 s
    - 2007-08-27 12:32:04 EDT: Error: java.lang.NullPointerException
    - 2007-08-27 12:32:04 EDT: An unknown error occured.
    - 2007-08-27 12:32:04 EDT: Processing started
    - 2007-08-27 12:32:02 EDT: Error: java.lang.NullPointerException
    If I do not put any file in respective folder status of Sender Communication channel shows as green...as soon as put any file in folder its getting red with above mention error.
    I have gone thru almost all SDN blogs/thread ..I also tried to debug code as mentioned in thread..Error in Module Processing- java.lang.NullPointerException
    But unfortunately it never goes to that point...hence never updates Log.
    In audit log I am getting same message..
    2007-08-27 12:42:50 Error Attempt to process file failed with null
    2007-08-27 12:42:50 Error Attempt to process file failed with java.lang.NullPointerException
    2007-08-27 12:42:52 Success Channel Sys_Dev_File_Client: Entire file content converted to XML format
    2007-08-27 12:42:52 Success Send text file "/usr/sap/tmp/ifATJmgs.csv", size 120436, character encoding ISO646-US with QoS EO
    2007-08-27 12:42:52 Error Attempt to process file failed with null
    2007-08-27 12:42:52 Error Attempt to process file failed with java.lang.NullPointerException
    But could not find my Custom Message... There is any way by which I can check if its calling my Custom Module itself?
    There is any setting / parameters which we need to do on J2EE engine in order to activate call to custome module?
    Any help would be really appreciated.
    Nilesh

    It is strange, but in that document of yours it never says anything about the JNDI name in the ejb-j2ee-engine.xml file.
    Check this doc here:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    According to it, if you properly configure the ejb-j2ee-engine.xml file, then you'd call your module using "localejbs/<JNDIName>".
    Regards,
    Henrique.

  • Error occurred in Lockbox Processing.....

    Hello All,
    While running Lockbox import program in Receivables: Interfaces > Lockbox Its ending with Error.
    I herewith submitting the Source file, Data File and Error Logout put file.
    Please look into error and guide me to clear this error.
    Source File:
    -- Type 2 - Lockbox Header
    INTO TABLE AR_PAYMENTS_INTERFACE
    WHEN RECORD_TYPE = '2'
    ( STATUS CONSTANT 'AR_PLB_NEW_RECORD'
    ,RECORD_TYPE POSITION(01:01) CHAR
    ,DESTINATION_ACCOUNT POSITION(02:11) CHAR
    ,ORIGINATION POSITION(12:21) CHAR
    ,LOCKBOX_NUMBER POSITION(22:27) CHAR
    -- Type 6 - Payment record
    INTO TABLE AR_PAYMENTS_INTERFACE
    WHEN RECORD_TYPE = '6'
    ( STATUS CONSTANT 'AR_PLB_NEW_RECORD'
    ,RECORD_TYPE POSITION(01:01) CHAR
    ,LOCKBOX_NUMBER POSITION(02:05) CHAR
    ,BATCH_NAME POSITION(06:08) CHAR
    ,ITEM_NUMBER POSITION(09:11) CHAR
    ,REMITTANCE_AMOUNT POSITION(12:21) DECIMAL external
    ,TRANSIT_ROUTING_NUMBER POSITION(22:30) CHAR
    ,ACCOUNT POSITION(31:44) CHAR
    ,CHECK_NUMBER POSITION(45:54) CHAR
    ,DEPOSIT_DATE POSITION(55:60) DATE 'YYMMDD' NULLIF DEPOSIT_DATE=BLANKS
    -- Type 4 - Overflow
    INTO TABLE AR_PAYMENTS_INTERFACE
    WHEN RECORD_TYPE = '4'
    ( STATUS CONSTANT 'AR_PLB_NEW_RECORD'
    ,RECORD_TYPE POSITION(01:01) CHAR
    ,LOCKBOX_NUMBER POSITION(02:05) CHAR
    ,BATCH_NAME POSITION(06:08) CHAR
    ,ITEM_NUMBER POSITION(09:11) CHAR
    ,OVERFLOW_SEQUENCE POSITION(12:14) CHAR
    ,OVERFLOW_INDICATOR POSITION(15:15) CHAR
    ,INVOICE1 POSITION(16:30) CHAR
    ,CUSTOMER_NUMBER POSITION(34:41) CHAR
    ,AMOUNT_APPLIED1 POSITION(42:51) DECIMAL external
    "DECODE(:AMOUNT_APPLIED1,0,NULL,:AMOUNT_APPLIED1)"
    Data File:
    2GOVT_MGBSS10123456789L820
    6LB01MGB0010001723187 L150 110401
    4LB01MGB100100109100701 00300001023134857
    4LB01MGB100100209100702 00300001023179809
    4LB01MGB100100309100703 00300001023179809
    4LB01MGB100100409100704 00300001023179809
    4LB01MGB100100509100705 00300001023149841
    4LB01MGB100100609100706 00300001023179809
    4LB01MGB100100709100707 00300001023179809
    4LB01MGB100100809100708 00300001023179809
    4LB01MGB100100909100801 00300001023179809
    4LB01MGB100101009100802 00300001023179809
    Log output:
    ARLPLB module: Process Lockboxes
    Current system time is 24-APR-2012 11:40:51
    Starting ARLPLB
    Input parameters:
    Y
    Test15
    Y
    /muthulb/mgbmuthu/LB.txt
    arplbox
    1000
    Y
    N
    2011/05/01 00:00:00
    A
    N
    Y
    N
    120
    L
    Argv value for ignore invalid: |
    Argv value for report format: |A|
    Argv value for complete batches only: |N|
    Argv value for alt name search: |N|
    Argv value for ussgl trx code: |
    Argv value for org id: |120|
    Ignore Invalid Txn Num: |
    Scoring model Id is NULL
    Lockbox id is NULL.
    Inserted ar_transmissions record
    Control file: /d10/appltop/apps/apps_st/appl/ar/12.0.0/bin/arplbox.ctl
    Bad file: /d10/appltop/inst/apps/SOLDEV_mgbr12/logs/appl/conc/log/b539553.bad
    Log file: /d10/appltop/inst/apps/SOLDEV_mgbr12/logs/appl/conc/log/l539553.log
    Discard file: /d10/appltop/inst/apps/SOLDEV_mgbr12/logs/appl/conc/log/d539553.dis
    Username:SQL*Loader-350: Syntax error at line 3.
    Illegal combination of non-alphanumeric characters
    ^
    SQL*Loader: Release 10.1.0.5.0 - Production on Tue Apr 24 11:40:51 2012
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    0
    AR-ARLPLB: fdpldr returned FALSE.
    AR-ARLPLB: Error in main.
    AR-ARLPLB: 0 ORA-01403: no data found
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Finished executing request completion options.
    AR-ARLPLB: Error in main.
    Thanks and Regards,
    Muthu

    Hi;
    Please check below which could be helpful for your issue:
    AR-ARLPLB: 0 ORA-01403: no data foundTroubleshooting Known Issues In Lockbox [ID 1366298.1]
    Oracle Receivables Lockbox: Known Issues and Patches [ID 1358497.1]
    Receipts Workbench Error: Listing of ORA Errors [ID 1364345.1]
    Regard
    Helios

Maybe you are looking for