CallSapAdapter Module code

Hi there,
I have a specific requirement where I need to develope a custom adpater module by customizing the standard callsapadapter module. Can somebody help me with the path where I can find the EAR file corrosponding to the callsapadapter.
That way I will try to exratc out the sourse java code and customize it to meet my requirements.
- Rajan

you can create custom module separately and specify it  in the communication channel  module tab before the standard module.
then custom module will be excuted before the  std module callsapadapter
refer [this|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e] guide for how to develop an adapter module
Edited by: Kubra fatima on Sep 17, 2009 10:12 AM

Similar Messages

  • Accessing dynamically configured filename inside adapter module code.

    Hi,
    I am having a requirement where i have to access the filename configured using Dynamic configuration inside my receiver file adapter MODULE code.  I am having PI7.1.
    For accessing the DC filename i have inserted this piece of code inside my adapter module code:
    MessagePropertyKey MPK =new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
    String filename = msg.getMessageProperty(MPK);
    But when i am tesing this module i am getting: "Message processing failed. exception encrypting session key".
    This module is basically written for encryption.I am referring this blog:
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Do i  need to do something else for accessing DC filename inside my module??Please help??
    Thanks
    Amit

    Hi,
    My code is something like this:
    public ModuleData process(ModuleContext mc,
                   ModuleData inputModuleData)
                   throws ModuleException {
            Object obj = null;
             Message msg = null;
             MessageKey amk = null;
             String inpKeyLocation = (String) mc.getContextData("inpKeyLocation");
                try {
                  obj = inputModuleData.getPrincipalData();
                     msg = (Message) obj;
                  amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
                    XMLPayload xpld = msg.getDocument();
                  MessagePropertyKey mpk = new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File");
                  String filename = msg.getMessageProperty(mpk);
                  InputStream inps = (InputStream) xpld.getInputStream();
                                        and so on ......
    My encryption method somewhere down the line will use "filename" as one of its input.
    Please help??
    Thanks
    Amit
    Edited by: AmitSri on May 25, 2010 1:43 PM

  • Changes to standard BIC EJB Module code possible ?

    Hi All,
    Can we get the code of standard ejb module "localejbs/CallBicXIRaBean "  ? if yes , from where ?
    Also can we edit this code to make a custom module , so that I can move the error file (failed in validation) to another directory?
    "MP: exception caught with cause Error in BICMODULE-module:Temporary error: BIC XI Adapter call failed. Reason: SegmentDescription: checkAndResetChildrenCounter() not enough repetitions of the segment UNH found: 0 instead of 1 offset :80 DESCRIPTION: SegmentDescription Warning: Not enough repetitions of the segment UNH (not specified/not specified)."
    Please suggest .
    Thankyou,
    Jyoti

    Hi,
       Not sure but check the error directory configured if using file adapter and then set the MessageTransform property(Transform.PermanentErrors) to Fail...and check
    But i dont think you can get the source for the module as it is provided by the Seeburger which is not free of cost..
    you need to get the class files and decompile them and try to analyse if interested you will get part of the flow but not complete..
    Gud luck
    HTH
    Rajesh

  • Application module Code

    hi all,
    at present iam working in jdev 11.1.1.3
    i write one method in application module,add to the client interface also and when i click one button in my page(.jspx)that method is exectuted automatically ,how to navigation to the button and my code in AM.
    Edited by: user13092208 on Jan 3, 2011 1:33 AM

    I don't get your question.
    Please describe in detail what you want to do and where your problem is.
    Timo

  • Content Holder Module code shows in autoresponder email

    Hi there,
    We have sent out a campaign, and it appears that at least one customer has received the autoresponder without any styling/images. All that is showing is the text and the code for the various contentholder modules e.g.:
    Having trouble viewing this email? {tag_viewinbrowser}
    {module_contentholder, name="Copyright"}
    Don't want to receive these emails?
    Unsubscribe.
    We know that others have recieved the autoresponder and that they are viewing the template correctly with the images and styling in place. Is there a glitch with BC that could have caused this one person to receive an autoresponder that looks like this?
    Thanks.

    Hi
    Can you provide the site URL, campaign name and the e-mail application used by the client who didn't receive it properly.
    Thanks,
    Alex.

  • Copliling Solaris kernel module code in 64bit for AMD64

    Hi,
    I have solaris10 OS in my HP ProLiant DL-145 server machine
    I m using SunStudio C compiler (cc) for compling my kernel module source code. My code is successfully work in 32bit kernel mode. But when i boot the OS in 64bit mode & complile the same code , then no error during compliaion & linking. but my module doesn't work. When i add two flags
    -xarch=amd64 -xmodel=kernel , then also no error during compilation, but module still not work.
    I want to know , how i can complie my soruce code successfully in 64bit kernel for AMD64, so that it can be loaded successfully through modload command.
    I think i need some other flags for that, pls help.

    from
    http://docs.sun.com/app/docs/doc/817-5789/6ml7kh1b4?q=amd64&a=view
    Compiling with Sun Studio
    Use the -D_KERNEL option to indicate that this code defines a kernel module.
    If you are compiling for a 64-bit x86 architecture, use both the -xarch=amd64 option and the -xmodel=kernel option:
    % cc -D_KERNEL -xarch=amd64 -xmodel=kernel -c mydriver.c
    % ld -r -o mydriver mydriver.o
    tim

  • No CallSapAdapter module

    Hi Gurus,
    I get a lot of files in an ftp folder which I need to process very quickly.  But with some big files and few modules in the CC this takes too much time and I get timeouts.
    So I developed a module to be used in a new CC were it will get the files and dispatch them into different local folders. Up to there all is good.
    Now I want to track which files I picked and drop. I am able to write into Audit log but as there is no module "CallSapAdapter" then there is no record on "Message Display Tool"
    Question: How can I write into Message Display Tool without calling "CallSapAdapter"
    Thanks in advance for you time and patience.
    Luis.
    Edited by: Luis Diaz on Nov 23, 2010 10:31 AM

    Hi Stefan,
    Thanks for your response.
    I tried what you mentioned but I still don't see the entries.
    Let me explain a little further.
    I am using PI 7.0 and I use just one module prepared by myself in a Sender CC of type File
    FileDispatcher
    In this module I use these statements to write log:
      private AuditMessageKey amk;
      amk = new AuditMessageKey(msg.getMessageId(), AuditDirection.OUTBOUND);
      Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "FileDispatcher started");
    Audit.flushAuditLogEntries(amk); //Based on your suggestion.
    Audit.addAuditLogEntry(amk, AuditLogStatus.WARNING, "After flushAuditLogEntries.");
    return inputModuleData;
    But I still don't see any entry in:
    http://host:50000/MessagingSystem/monitor/monitor.jsp
    This is the place where I want my log.  Cause in the CC is not persistent.
    I hope there is a way to flush it there.
    Thanks for your help.
    Luis.

  • Template and application module code sharing

    Experts,
    I have a template which has some BTF as dynamic regions. Each BTF is based on one App Module. My use case is
    Login page - AppModule
    Main page
    pageFragment1 - AppModule1
    pageFragment2 - AppModule2
    Successful login takes me to Main Page with Pagefragment1 as the default region. In page Fragment 1 , i am displaying total by exposing a method from AppModulue1 (cant store this in any scope variable as i need to have a ppr from the pageFragment to the main template page).
    I want this total to be appearing on the main page also.
    How can i do this ?
    thnks
    Jdev 11.1.2.1

    Hi,
    this is only possible if the bounded task flows share the DataControl scope in which case adding the AM to the main page also shows the value you see in the bounded task flow. Alternatively, you can pass a JavaBean object defined as a managed bean in the main page to the task flow (as an input parameter), then have the bounded task flow updating the bean reference and use EL in the main page to show the value (addressing the managed bean property)
    Frank

  • Proper way to Module Code for Problem

    Hi I am looking solution for this problem If any one can help me out .....
    At ACME a "job" is a group of print items.
    JOB For example, a job can be a run of business cards, envelopes, and letterhead together.
    Some items qualify as being sales tax free, whereas, by default, others
    are not. Sales tax is 7%.
    ACME also applies a margin, which is the percentage above printing cost that is charged to the customer.
    For example, an item that costs $100 to print that has a margin of 11% will cost:
    item: $100 -> $7 sales tax = $107
    job: $100 -> $11 margin
    total: $100 + $7 + $11 = $118
    The base margin is 11% for all jobs this problem. Some jobs have an "extra margin" of 5%. These jobs that are flagged as extra margin have an additional 5% margin (16% total) applied.
    The final cost is rounded to the nearest even cent. Individual items are rounded to the nearest cent.
    Write a program in Java that calculates the total charge to a customer for a job. The program should accept the inputs below and output the total bill for the customer.
    Include this problem statement with your solution.
    Job 1:
    extra-margin
    envelopes 520.00
    letterhead 1983.37 exempt
    should output:
    envelopes: $556.40
    letterhead: $1983.37
    total: $2940.30
    Job 2:
    t-shirts 294.04
    output:
    t-shirts: $314.62
    total: $346.96
    Job 3:
    extra-margin
    frisbees 19385.38 exempt
    yo-yos 1829 exempt
    output:
    frisbees: $19385.38
    yo-yos: $1829.00
    total: $24608.68
    Thanks

    I want to make best use of OOPS concepts to modularize this problem, like using interface, abstract class, etc. What to keep in mind (steps) before modularizing such a problem. If some one can focus some light on it , that would be of great use.
    I had solution as under, But what else could be best way.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.text.DecimalFormat;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    public class Job {
         private List itemList; //Job contains a list of Item objects
         //Job object can contain any number of Item objects, as given by user at runtime
         private boolean extraMarginApplied;
         private double totalCostforJob;
         //Following three variables will be provided by user
         //For each input, construct one item object and add it to the Job-ItemList
         private String itemName;
         private double itemCost;
         private boolean itemTaxExempted;
         private static final double SALESTAX = 0.07; //Sales tax applied
         private static final double MARGIN = 0.11;
         private static final double EXTRAMARGIN = 0.05;
         public Job() {
              itemList = new ArrayList();
         public String getItemName() {
              return itemName;
         public void setItemName(String itemName) {
              this.itemName = itemName;
         public double getItemCost() {
              return itemCost;
         public void setItemCost(double itemCost) {
              this.itemCost = itemCost;
         public boolean isItemTaxExempted() {
              return itemTaxExempted;
         public void setItemTaxExempted(boolean itemTaxExempted) {
              this.itemTaxExempted = itemTaxExempted;
         public List getItemList() {
              return itemList;
         public void setItemList(List itemList) {
              this.itemList = itemList;
         public boolean isExtraMarginApplied() {
              return extraMarginApplied;
         public void setExtraMarginApplied(boolean extraMargin) {
              this.extraMarginApplied = extraMargin;
         public double isTotalCostforJob() {
              return totalCostforJob;
         public void setTotalCostforJob(double totalCostforJob) {
              this.totalCostforJob = totalCostforJob;
         public Item getItemFromUser(InputStreamReader isr, BufferedReader br)
                   throws IOException {
              System.out.println("Enter Item Name: ");
              setItemName(br.readLine());
              System.out.println("Enter Item Cost: ");
              setItemCost(Double.parseDouble(br.readLine()));
              System.out.println("Item Tax Exempted(Y/N)?: ");
              String input = br.readLine();
              if (input.equals("Y") || input.equals("y")) {
                   setItemTaxExempted(true);
              } else {
                   setItemTaxExempted(false);
              //Now construct an Item object and return it
              return new Item(itemName, itemCost, itemTaxExempted);
         public static String getSystemExit() throws IOException {
              System.out.println("\nDo you want to add more items(Y/N)?: ");
              InputStreamReader isr = new InputStreamReader(System.in);
              BufferedReader br = new BufferedReader(isr);
              return br.readLine();
         public void addItemToJob(InputStreamReader isr, BufferedReader br)
                   throws IOException {
              itemList.add(getItemFromUser(isr, br));
         public static void main(String agr[]) throws IOException {
              String proceed;
              InputStreamReader isr = new InputStreamReader(System.in);
              BufferedReader br = new BufferedReader(isr);
              Job job = new Job();
              job.getExtraMargin(isr, br);
              do {
                   job.addItemToJob(isr, br);
                   proceed = getSystemExit();
              } while (proceed.equals("Y") || proceed.equals("y"));
              job.calculateAndPrintTotalCostforJob();
              br.close();
              isr.close();
         private void getExtraMargin(InputStreamReader isr, BufferedReader br)
                   throws IOException {
              System.out
                        .println("Is extra margin to be charged for this Job?(Y/N)?: ");
              String input = br.readLine();
              if (input.equals("Y") || input.equals("y")) {
                   setExtraMarginApplied(true);
              } else {
                   setExtraMarginApplied(false);
         private void calculateAndPrintTotalCostforJob() {
              Iterator itr = itemList.iterator();
              Item item;
              double totalCost = 0;
              double itemCostWithSalesTax;
              while (itr.hasNext()) {
                   item = (Item) itr.next();
                   if (item.isTaxExempted()) {
                        itemCostWithSalesTax = item.getCost(); //No sales tax applied, so cost is same
                   } else {
                        itemCostWithSalesTax = item.getCost() * (1 + SALESTAX); //Add sales tax
                   if (isExtraMarginApplied()) {
                        totalCost = totalCost + itemCostWithSalesTax + item.getCost()
                                  * (MARGIN + EXTRAMARGIN);
                   } else {
                        totalCost = totalCost + itemCostWithSalesTax + item.getCost()
                                  * MARGIN;
                   System.out.println(item.getItemName() + ":  "
                             + itemCostWithSalesTax);
              setTotalCostforJob(totalCost);
              System.out.println("Total: " + totalCostforJob);
    }=================================================================================
    public class Item {
        private String itemName;
        private double cost;
        private boolean taxExempted=false;
        public Item(String itemName, double cost, boolean taxExp) {
            this.itemName = itemName;
            this.cost = cost;
            this.taxExempted = taxExp;
        public String getItemName() {
            return itemName;
        public void setItemName(String itemName) {
            this.itemName = itemName;
        public double getCost() {
            return cost;
        public void setCost(int cost) {
            this.cost = cost;
        public boolean isTaxExempted() {
            return taxExempted;
        public void setTaxExempted(boolean b) {
            this.taxExempted = b;
    }Thank you for your help and guideline.

  • Code of callSapAdapter

    Hello there,
    Is it possible to get the code of callSapAdapter module which is a default call for each adapter? I am sure the code must be there on the server but can anyone help me with the location so that i can get it and use the logic in one of the adapter module requirement.
    The requiremnt i have is the adapter module has to read a file containing many records, say 10 and give out one record at a time to the queue - 10 seperate records like 10 messages.
    Can anyone help me?
    Regards,
    Yash
    Edited by: Yash Agarwal on Dec 9, 2008 8:30 PM

    Please see my other thread for the answer on this!

  • File Sender Adapter without module CallSapAdapter

    Hi
    What happens with a message when the standard module CallSapAdapter has been deleted by accident?
    I tried this out and could not find the message in the monitoring tools, although the message had been read by the adapter (it has been deleted as configured in the communication channel configuration).
    I there a way to find the message?
    Regards, Marc

    Hi Marc,
    As far as I know, I think you would not able to find the message in the adapter engine tables because the CALLSAPADAPTER module is the root cause for calling the adapter. When it is deleted then it would not be able to process the message.
    You can check the message in the Message Display Tool ie Message content.
    Check the tables of the Adapter engine:
    Adapter Engine Tables -
    Schema Name - SAPSR3DB
    XI_AF_MSG AF XI Message
    XI_AF_MSG_AUDIT audit log entries
    If runing on PI 7.1, table names are as follows -
    BC_MSG AF PI 7.1 Message
    BC_MSG_AUDIT PI 7.1 audit log entries (**)
    Let us know if you are able to find the message.
    Thanks,
    Edited by: Hareenkumar on Mar 15, 2011 9:02 AM

  • Does the 'CallSapAdapter' adapter module perform the FCC?

    Hello,
    I have a scenarion where
    Step 1 - An encrypted file has to be picked by the sender file channel
    Step 2 - It has to be decrypted (we have developed an adapter module for doing this, so no problem with that)
    Step 3 - It has to be FCC'ed (since it is a flat file) before sending it to the Integration Engine.
    To execute these 3 steps sequentially, I have configured the Sender File Channel in the following way
    Setting 1 - I have configured the necessary FCC parameters
    Setting 2 - In the 'AdapterModules' tab, I have placed my custom developed decrypter adapter module first followed by the default 'CallSapAdapter' adapter module.
    My question is, will the above setting suffice for carrying out my steps 1 - 3 in the correct order.
    Basically I need to make sure that FCC is done only after decrypting the file.
    So I need to confirm if FCC is being taken care by the 'CallSapAdapter' module.
    Can anybody help me here plese?

    Hi,
    File adapter will check the FCC function first.So you will get error that time.Because you have encrypted data.So use the "MessageTransformBean"module for FCC.
    Step 1 - An encrypted file has to be picked by the sender file channel
    Step 2 - It has to be decrypted (we have developed an adapter module for doing this, so no problem with that)
    Step 3-MessageTransformBean
    Step 4-'CallSapAdapter' adapter module
    Check the bellow link for "Message Transform Bean".
    [http://help.sap.com/saphelp_nw70/helpdata/EN/57/0b2c4142aef623e10000000a155106/content.htm]
    Regards,
    Prakasu.M

  • Enhance sorce code in Function module option

    Dear Expets ,
              Please let me the advantage of the button - enhance source code in the menu bar of the standard function module.
              Can i write my own logic there .
              I am planning to modify the function module - CK_F_INTERNAL_ACTIVITY_VAL - based on certain condition.
    Thanks,
    Dev

    Hi,
    The option mentioned is a part of the enhancement framework provided by SAP to write Implict enhancements
    Search for Keyword "Implict enhancements" in SDN and elsewhere to get a brief idea
    Using this we can write codes in specific areas of the code as indicated by SAP.
    To view these locations -> click on the " enhance source code " button and then go to EDIT->Enhancement Operations -> show Implicit Enhancements ...SAP will highlight the areas where code can be written.
    Right Click on the area required->Enhancement Impelemtation -> Create
    It asks for a "Enhancement Implementation" as  a table control pop-up -> Creata a new one using the "create Icon" and give a suitable name .Your enhancement code will be save under this.
    In case you plan to undo the changes,go to the spot created Right Click ->Enhancement Impelemtation -> Undo
    Always use the "Where -used list" to analyse the impact of the changes when the function module code is changed and use this "Implict enhancement" only as the last option to edit source code.Implicit options may not always be available for all source codes and at all locations desired.
    Hope it helps!
    Regards
    Byju

  • What will be input for custom module developed for JDBC adapter

    Hi,
    I have a scenario SQLDB -> Xi -> R3 .
    Here I have added a custom module before callsapadapter module.
    As I know the sequence of module calling will be as follows :
    1. Standard jdbc adapter
    2. custom module
    3. callsapadapter
    Standard jdbc adapter has a select query . After that what will be the input format for my custom module .Will it be the xml structure of my source Data type or will it be a resultset or will it be a inputstream(stream of xml fomat????).
    And then in which format i need to generate the output format for CallSapAdapter.
    Regards

    Hello Moni,
    SAP has a wonderful feature in ABAP. There are some Runtime Errors that you can <i>catch</i>. This is somewhat similar to the Exception Handling procedure in Java / C++. So here's how you go about it....
    Sometimes there might some calculations that we do, multiplication , for example, where the result of the arithmetic operation is known only at run-time. And the recepient for this result may not always be of the right type to take the result. Consider the following code:
    parameters a type i obligatory.
    data : b type i,
           c type i.
    b = 99999999.
    ** Assume that the user has entered 99999999 for the value of the parameter a.
    c = a * b.    " 99999999 * 99999999 "
    write c.
    This program will certainly give a short dump saying that there was an arithmetic overflow. But we can actually avoid this Shor Dump and handle the situation quite elegantly. consider the following.
    parameters a type i obligatory.
    data : b type i,
           c type i.
    b = 99999999.
    CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 1.
    ** Assume that the user has entered 99999999 for the value of the parameter a.
       c = a * b.    " 99999999 * 99999999 "
    ENDCATCH.
    if sy-subrc ne 0.
      write: 'There was an arithmetic overflow in the calculation.'
    else.
      write c.
    endif.
    This way you can actually avoid the short dump and make the system set a value for sy-subrc. Based on the avlue of the sy-subrc, you can go ahead with further processing / error-handling, as the case may be.
    Here, ARITHMETIC_EXCEPTIONS is called an <i>exception group</i>. For more information on what other run-time errors can be <i>caught</i>, and What the various exception groups contain, please refer to the online documentation for the CATCH statement.
    Regards,
    Anand Mandalika.

  • Module Processor

    Hi Friends,
       I am using the sap provided module CRLFfromToLF in sender side file adapter.How can i check the output.Atleast whether that module being called or not. Even i coouldn't see the trace information in Adapter Monitoring.Can any one tell me how to know atleast whether that module being Executed or not.
       And one more thing is I have developed a module just copied the source code of "CRLFfromToLF" module source code.I have deployed also. Then in Integration Directory's sender communication channel before the
    "all SapAdapter" module i have given the JNDI name of my module.But this time atleast it hasn't read the file.Where might be the error.
    Regards,
    Gowtham K
    In Integration Directory in sender communication channel

    Hi piyush,
      I have created a new EJbB and deployed it also.This is code of my module.
    public ModuleData process(ModuleContext moduleContext,
    ModuleData inputModuleData)
    throws ModuleException {
    //     File f = new File("c:
    xi
    emp.txt");               
         Object obj = null;
    Message msg = null;                    
      obj = inputModuleData.getPrincipalData();
           msg = (Message) obj;     
         AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),
         AuditDirection.INBOUND);
         Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,
         "CreateAttachment: Module called"); 
           try {
        XMLPayload xmlpayload = msg.getDocument();
         xmlpayload.setContent(addMessage(xmlpayload.getContent()));     
         java.util.Iterator iter = msg.getAttachmentIterator();
          Payload payload = null;
          while (iter.hasNext()) {
           payload = (Payload) iter.next();     
                     if (payload instanceof TextPayload){
                     TextPayload textpayload = (TextPayload) payload;
    textpayload.setContent(addMessage(textpayload.getContent()));
    inputModuleData.setPrincipalData(msg);
    catch (Exception e) {
    return inputModuleData;
    private byte[] addMessage(byte[] src) {
                     int i;
                     int dstlen;
                     int srclen = src.length;
                     dstlen = 0;
                     for (i = 0; i < srclen; i++) {
                                    src[dstlen++] = src<i>;
                     String User_str = "_Extended";
                     for(i=0;i< User_str.length();i++)
                     src[dstlen++] = (byte) User_str.charAt(i);
                     byte[] dst = new byte[dstlen];
                     System.arraycopy(src,0,dst,0,dstlen);
                     return dst;
    When i placed my module in sender communication channel before callsapadapter module the file has been read. But when i saw the output file it is same as input file.No message extra has been added.And in the audit log there is no indecation that my module has been called although i have written audit log.
      On the server when i saw whether this module has been deployed or not, my module is there on server.
    Can anyone please tell me where might be the Error. Is the problem is with my module code or deployment.
    Regards,
    Gowtham K

Maybe you are looking for