Can a class or Module be executed before the sender File Adapter execute?

Hi
In case of sender adapter the module in the module processor gets executed after the adapter has performed its operation.
Is there a way I can execute the module before the sender adapter starts execution?
Or Is it possible to specify a java class to be executed before adapter, through configuration in the communication channel or some other way?
Thanks
Vijendra

HI Vijendra,
The File module adapter is the first one to get executed.
The only thing you can do is to run shell scripts if you have to do any activity in the folder or on the file.
Regards
Vijaya

Similar Messages

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • Module config : XML2PLAIN in the receiver file adapter :

    Hi All,
    I am facing a problem in using the Module XML2PLAIN in the receiver comm channel configuration.
    I am using the same parameters in the another receiver and is working fine,but when I use it another on eit is not working.(and is working fine if I download XML directly).But in the normal format file is getting downloaded with nothing in it .
    I could see some special characters(2 = no of fields) in notepad ,which converts to space in wordpad
    The parameters which I am using is .
    The module I am using is  XML2PLAIN
    Par name                     par value
    Tran.class                       com.sap.aii.messaging.adapter.Conversion
    Trav.con type                      text/plain;charset=utf-8
    Xml.addheaderline                     0
    Xml.conversiontype                   SIMPLEXML2PLAIN
    XML.FIELDFIXEDLENGTHS          25,6
    XML.FIXEDLENGTHTOOSHORTHANDLING  CUT
    Cam some one please help me out from this ..what am I missing in this ?
    Thanks.

    Hi Raju,
    Guess this can help u
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    **Reward points if helpfull**

  • 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

  • Can we control the triggering of sender file adapter

    Hi,
    Can we control the tiggering of Sender file adapter with option of Run OS command before message processing
    This option is available in Sender communication channel, what are the limitations of this option?
    My actual requirement is to see the target folder whether it is empty or not, if empty then I can trigger the interface.
    For this I want to write shell script whihc execute at OS level to check whether the target is empty or not, But the constraint is will this can control the triggering of sender adapter.

    Hi Sekhar,
    I guess this can help you control the file pick up.
    If your shell script works well then using the same you  can modify the filename or its extension if the target folder is empty.
    Say in the sender file adapter you set the source-filename as "inbound_*.ready". Now when originally the source file is dropped into the source folder (by any other process) let it be named as "inbound_001.pending" and your script will change the file name to "inbound_001.ready" if the target directory is empty. I dont think you need to use the pre processing OS command for this.
    Does it make any sense?
    Regards,
    Suddha

  • Stored procedure by using EXECUTE at the sender JDBC

    We have Scenario from JDBC to RFC (ASYNCH).We are using Oracle DB,at the database side we have a stored Procedure and inside the Procedure we are accessing multiple table.
    My query is how can we excecute update sql statement a stored procedure by using EXECUTE at the sender JDBC?
    EXECUTE SP_STUDENT_UPDATE
    ERROR: 'java.sql.SQLException: ORA-00900: invalid SQL statement '. For details, contact your database server vendor.

    Hi. Peter.
    yes , is possible to update your rows in your sp.
    If you want the data determined from the Query SQL Statement to remain in the database unchanged after being sent successfully, enter <TEST>.This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.
    http://help.sap.com/saphelp_nw73/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm?frameset=/en/48/465581929734d9e10000000a42189d/frameset.htm&current_toc=/en/ca/b977f1c7814201954f20bb87ad7aab/plain.htm&node_id=64
    Could you put your sp? Maybe something is  wrong .
    Regards
    Lucho

  • Sender File Adapter Bespoke Module Development

    I have been following the How To ... Create Modules for the J2EE Adapter Engine to create a bespoke module for the Sender File Adapter.
    Initially all the module does is write a message to the Augit Log. The module has been deployed to XI successfully. When I add the module to the sender file adapter the adapter is green in the adapter monitor but I get the following message in the message monitor ....
    "Attempt to process file failed with Path to object does not exist at com.kk.FileAdapter, the whole lookup name is localejbs/sap.com/com.kk.FileAdapter/WriteToLog."
    com.kk.FileAdapter is the package. All of the required files have been built as per the How To pdf.
    Does anyone have any ideas??

    Hi Satish,
    Thanks for the quick response.
    Using the fully qualified name I get the following error in the adapter monitor.
    "Last message processing started 18:32:11 2005-09-19, Error: Module Exception 'com.sap.aii.af.mp.processor.ModuleProcessorException' found, cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
    If is use the JNDI name I do not get an error in the Adapter Monitor but get the following error in the Message Monitor.
    "Attempt to process file failed with Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
    The rest of the message seems to be successful, only the run of the module.
    Any ideas??
    Many thanks
    Gary

  • Does an inline view execute before the rest of the select?

    Hi,
    The O'Reilly book Mastering Oracle Sql defines an inline view simply as a
    subquery in a select FROM clause. This conforms to the definitions in
    the Oracle 9i and 10g docs.
    But unlike the Oracle docs, the O'Reilly book says the inline view is,
    like a WITH clause, executed before the rest of the query. I can't see
    how this can be done unless the inline view makes no reference to
    other tables joined in the FROM clause.
    Is there a species of inline view in 9i/10g that IS restricted as above -
    no refs to other tables in the FROM clause - and what is it called?
    Thanks for any help.
    Ken Quirici

    As explained above, Oracle can choose to merge the query if feasible to do so. Look at the two queries and their plans below. The plan in second query changes to creating a temporary VIEW since in that case, Oracle is unable to perform the merge:
    SQL> select *
      2          from scott.emp e,
      3                  (select * from scott.dept d where d.deptno = 10) dd
      4  where
      5          e.deptno = dd.deptno
      6  /
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO     DEPTNO DNAME          LOC
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10         10 ACCOUNTING     NEW YORK
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10         10 ACCOUNTING     NEW YORK
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10         10 ACCOUNTING     NEW YORK
    3 rows selected.
    Execution Plan
    Plan hash value: 3570059291
    | Id  | Operation                    | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                |     3 |   171 |     2   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS                |                |     3 |   171 |     2   (0)| 00:00:01 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| DEPT           |     1 |    20 |     1   (0)| 00:00:01 |
    |*  3 |    INDEX UNIQUE SCAN         | PK_DEPT        |     1 |       |     0   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS BY INDEX ROWID| EMP            |     3 |   111 |     1   (0)| 00:00:01 |
    |*  5 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |     3 |       |     0   (0)| 00:00:01 |
    SQL> select *
      2          from scott.emp e,
      3                  (select * from scott.dept d where d.deptno = 10 and rownum > 0) dd
      4  where
      5          e.deptno = dd.deptno
      6  /
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO     DEPTNO DNAME          LOC
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10         10 ACCOUNTING     NEW YORK
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10         10 ACCOUNTING     NEW YORK
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10         10 ACCOUNTING     NEW YORK
    3 rows selected.
    Execution Plan
    Plan hash value: 1670713873
    | Id  | Operation                       | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                |                |     5 |   280 |     2   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS                   |                |     5 |   280 |     2   (0)| 00:00:01 |
    |   2 |   VIEW                          |                |     1 |    19 |     1   (0)| 00:00:01 |
    |   3 |    COUNT                        |                |       |       |            |          |
    |*  4 |     FILTER                      |                |       |       |            |          |
    |   5 |      TABLE ACCESS BY INDEX ROWID| DEPT           |     1 |    20 |     1   (0)| 00:00:01 |
    |*  6 |       INDEX UNIQUE SCAN         | PK_DEPT        |     1 |       |     0   (0)| 00:00:01 |
    |   7 |   TABLE ACCESS BY INDEX ROWID   | EMP            |     5 |   185 |     1   (0)| 00:00:01 |
    |*  8 |    INDEX RANGE SCAN             | IDX_EMP_DEPTNO |     5 |       |     0   (0)| 00:00:01 |
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL>
    can it, in it's WHERE clause, reference other tables in the FROM clause?No. it cannot. but as said above, tha may not stop Oracle from merging the queries.
    SQL> select *
      2          from scott.emp e,
      3                  (select * from scott.dept d where d.deptno = 10 and e.sal > 1000) dd
      4  where
      5          e.deptno = dd.deptno
      6  /
                    (select * from scott.dept d where d.deptno = 10 and e.sal > 1000) dd
    ERROR at line 3:
    ORA-00904: "E"."SAL": invalid identifier
    SQL>

  • Can we enhance the Sender SOAP Adapter with our own modules?

    Hi All,
    Can we enhance the Sender SOAP Adapter with our own modules on the Module Tab Page in the Module Processor?
    I believe the answer is no. However, whatever may be the answer, I would like to know that is there any specific reason for that.
    Please help me in this regard.
    Thanks,
    Yogi.

    Hi,
    I think, we are mentioning the URL of the adapter channel directly in the configuration. SO there is no place we can customize this flow..just a thought
    Because in the file adapter etc, After Adapter Engine picks up the data and before it goes into integration engine module is processed..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    Rgds,
    Moorthy

  • Before the answer file what do I need to execute

    After DNS,DHCP and ADLDS and before the answer file what do I need to execute besides:
    net user Administrator "password1" passwordreq:yes
    I am getting an error with NTDS.
    dcpromo /unattend:"E:\AnswerFiles\ForestAdd.txt"
    ForestAdd.txt
    [DCINSTALL]
    InstallDNS="Yes"
    NewDomain="Forest"
    NewDomainDNSName="mysite.com"
    DomainNetBiosName="MYSITE"
    ReplicaOrNewDomain="Domain"
    ForestLevel="4"
    DomainLevel="4"
    CreateDNSDelegation="No"
    DatabasePath="C:\Windows\NTDS"
    LogPath="C:\Windows\NTDS"
    SYSVOLPath="C:\Windows\SYSVOL"
    ConfirmGc="Yes"
    SafeModeAdminPassword=""
    ;ReplicateFromMedia = Yes
    ;SetForestVersion = Yes
    ;AutoConfigDNS = Yes
    ;SiteName = mydomain
    ;Run-time flags (optional)
    ;CriticalReplicationOnly="No"
    ;AllowAnonymousAccess = No
    ;DisableCancelForDnsInstall = No
    ;DNSOnNetwork = No
    ;IsLastDCInDomain = Yes
    ;RebootOnSuccess = Yes
    ;RemoveApplicationPartitions = Yes
    ;ReplicaOrMember = Replica
    ;RebootOnCompletion=Yes

    Hi,
    Please refer to the following articles:
    http://technet.microsoft.com/en-us/library/cc758390(v=ws.10).aspx
    Create an Answer File for Unattended Domain Controller Installation
    http://technet.microsoft.com/en-us/library/cc816873(v=ws.10).aspx
    How to use unattended mode to install and remove Active Directory Domain Services on Windows Server 2008-based domain controllers
    http://support.microsoft.com/kb/947034/en-au
    Meanwhile, please post the detail error message.
    Regards.
    Vivian Wang

  • OS command before file processing in Sender File adapter

    Hi there,
    I'm having troubles running a os command from the sender file (NFS) adapter.  The batch file which I try to run is not getting executed at all.
    When I manually run the same batch file from the command prompt then it works perfectly.
    The OS command looks like this from the adapter config:
    myserver\xi\interface\in\dothis.bat
    I have also try with this notation
    G:\myserver\xi\interface\in\dothis.bat
    Please give me some tips how can I solve this problem, is there any way how can I debug the OS command? When I look at the adapter monitonr no errors are showed.
    Thanks for any tips.
    Roberto

    Hi all,
    The problem is solved.
    Issue: File Receiver Channel does not execute the OS Command before message processing.
    Reason: XI always expects an input file (in my case the sender communication channel) on the source folder. If no input files are found then the rest of the adapter configuration is not executed at all.
    In our scenario the OS command is responsible for retrieving the input files from a FTP server the adapter. SO XI will never trigger the OS Command.
    Solution: Place a dummy input file on the source folder , the sender adapter will always read in this file and put it back on the same location.(e.g. using a condition in the receiver determination).
    Thanks,
    Roberto

  • Adapter Module for Sender File Adapter to access a Flat file

    Hi,
    We have a scenario where the source is a flat file.I want to develop an Adapter Module to make a small change to every line in the Flat file.
    Now how do we read a flat file in the Adapter Module?Coz the flat file will be converted to XML file by the Standard Adapter Module of the File adapter.
    Please help me out with this.
    Thank you,
    Anu.

    Hi Anu,
    If you are not using Content Conversion option Standard Adapter Module does not convert the Flat file to XML .
    You can directly access the payload as it is in flat file in the Adapter Module and make changes.
    Use the Standard classes ModuleData & moduleContext to fetch the Payload.
    chk this :
    Customized Sender Adapter Module
    XI: Read data from PDF file in Sender Adapter
    regards
    Ganga

  • Sender File Adapter Can I  set original MessageID like SOAP Adapter??

    Hello,PI Experts!!
    I want to set original messageID(GUID) to Sender File adapter scenario.
    SOAP Adapter can set original messageID with url, about FILE Adapter??
    I think Adapter Module maybe can set original messageID.
    best Regards,
    Yuuki Fujioka.

    Hello,
    Yes, you can get Message ID with any adapter.
    All neccessary information about approach you can find in links below:
    Use getTransformationParameters().
    Accessing Adapter-Specific Attributes
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Container Object
    http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm (String Mapping Runtime Constants: MESSAGE_ID)
    Br,
    Dzmitry

  • I need to obtain the size of file before the send to server

    Hello,
    I need to obtain the size in bytes the a internal table before the send to server, I use the DESCRIBE sentence but is not allowed me to obtain this value, that sentence I need to use.
    Thanks in advance,
    DL

    If you are on release 620, have a look at class CL_ABAP_MEMORY_UTILITES method GET_MEMORY_SIZE_OF_OBJECT. It will tell you how much memory is allocated and how much is actually used. Here is some sample code:
    TABLES: sflight.
    DATA: isflight TYPE TABLE OF sflight.
    SELECT-OPTIONS: carrid FOR sflight-carrid.
    SELECT * FROM sflight INTO TABLE isflight
            WHERE carrid IN carrid.
    DATA: size1 TYPE abap_msize,
          size2 TYPE abap_msize,
          size3 TYPE abap_msize,
          size4 TYPE abap_msize,
          flag1 TYPE char128,
          size5 TYPE abap_msize,
          size6 TYPE abap_msize,
          flag2 TYPE char128,
          flag3 TYPE char128.
    TRY.
      CALL METHOD cl_abap_memory_utilities=>get_memory_size_of_object
        EXPORTING
          object                     = isflight
        IMPORTING
          bound_size_alloc           = size1
          bound_size_used            = size2
          referenced_size_alloc      = size3
          referenced_size_used       = size4
          is_part_of_non_trivial_szk = flag1
          szk_size_alloc             = size5
          szk_size_used              = size6
          low_mem                    = flag2
          is_in_shared_memory        = flag3.
    ENDTRY.
    WRITE: / 'Size of Bound and Allocated Memory:', size1.
    WRITE: / 'Size of Bound and Used Memory:', size2.
    WRITE: / 'Size of Referenced and Allocated Memory:', size3.
    WRITE: / 'Size of Referenced and Used Memory:', size4.
    WRITE: / 'Strongly Connected Component of Object:', flag1.
    WRITE: / 'Size of Allocated Memory of SCC:', size5.
    WRITE: / 'Size of Used Memory of SCC:', size6.
    WRITE: / 'Flag, whether only bound_size_* are filled due to mem.short.:', flag2.
    WRITE: / 'Flag, whether ONJECT is in the shared memory:', flag3.
    If you aren't on 620 or don't need to be that precise, you might try the following:
    DESCRIBE TABLE isflight LINES size1.
    WRITE: / 'Number of Lines:', size1.
    DATA: wa_sflight LIKE LINE OF isflight.
    DESCRIBE FIELD wa_sflight LENGTH size2 IN BYTE MODE.
    WRITE: / 'Size of one Line:', size2.
    size3 = size1 * size2.
    WRITE: / 'Total Size:', size3.
    Please note that the addition IN BYTE MODE only works in 610 and higher. It isn't neccesary before that release. However it is important to get accurate resuls in an Unicode System.

  • 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.

Maybe you are looking for

  • PSD files saved as Photoshop Image 13

    I have been using Photoshop CS6 (64 Bit) on my Windows 8.1 laptop (64 bit) for over a year and has been working perfect. About two days ago something weird happened. All of my PSD files show that they are Photoshop Image 13 files instead of showing i

  • File Adapter is not polling File.

    Hi All, I am using file adapter to poll a file. When I am restarting server then it is picking file. After then when I am dropping a file then File Adapter is not picking File. Can any one guide me what si problem? I am using SOA SUITE 10.1.3.4 Thank

  • XPRA_EXECUTION Error in OCS Package SAPKW70009

    HI All, while doing patch on netweaver 200s for BW system. i am getting below error. The import was stopped, since an error occurred during the phase XPRA_EXECUTION, which the Support Package Manager is unable to resolve without your input. After you

  • Acrobat "X" Standard...

    I can not download a word doc into PDF format after I installed Acrobat X Standard...why not??

  • "Other" section taking up all memory.

    Okay, so a day or two ago, a message came up saying my disk space was almost full, so I deleted all the stuff that I could. Then, it came up again. I found out how to see what category of stuff (Photos, Applications, etc...) is taking up the most spa