Imported Archives - Do I need an XLST code?

Not sure if I understand the significance of XLST code. I have my jar and class file ready to be zipped and imported. Can one you explain if I need an XLST and how do I go about creating one.
Any sample? help?, etc
Thank you,
Parimala

Hi Parimala,
U have the possibility to map with XSL or Java or both or something else. U can load a zipped folder with XLS file into a archive and referr it in an interface mapping.
Regards,
Udo

Similar Messages

  • Access Imported Archive in User Defined Function

    Hi!
    I want to access a XML file in an user defined function in a message mapping. The XML file is included in an imported archive. I need the information out of this XML file for configuring an extended receiver determination.
    Does anyone know how to solve this?
    Best regards,
    Daniel

    Hi Krishna,
    a property file will be a solution but is has to be stored in the filesystem. In my scenario I prefer a file (not neccessary xml) which is editeable in the IR.
    I tried something in this way (just for testing):
    try {
         DocumentBuilderFactory factory = null;
         DocumentBuilder builder = null;
         Document document = null;
         Element element = null;
         factory = DocumentBuilderFactory.newInstance();
         builder = factory.newDocumentBuilder();
         document =  builder.parse(Container.class.getResourceAsStream("routing.xml"));
         element = (Element)document.getElementsByTagName("BUSINESS_SYSTEM").item(0);
         return element.getNodeValue();
    } catch (Exception e) {
         return "Crash: "+e.getMessage();
    But it crashes, because the resource "routing.xml" cannot be found. I tried to add the namespace or the name of the imported archive or both as prefix, but it don't work. How can I find out under which address/url I can open the xml document?
    Best regards,
    Daniel

  • Static initialization of java code included in the Imported Archives jars?

    Hi
    Does SAP PI 7.0 support static initialization of java code included in the Imported Archives jars?
    Static block of a java class included in the Imported Archive jars throws a Runtime Exception called ExceptionInInitializationError while trying to run.
    Regards,
    RDS

    Have you tested the code outside PI?

  • Roles needed for importing archives in IR

    Hi masters,
    can somebody tell me which roles we need to be able to import archives in the Integration Repository ?
    Thx

    hi elliot,
    check this link for roles
    http://www.erpgenie.com/sap/netweaver/xi/xiauthorizations.htm
    regards
    Ramesh P

  • UDF: Load file from "imported archives"

    Hi everybody,
    I need some code for loading a file from the imported archive. I can't find any blog.
    Regards Mario

    >>loading a file from the imported archive
    I dint get this. What does the imported archive contain? A java class? If so, you can acess the members of the class in the UDF with the correct package name.
    Regards,
    Jai Shankar

  • I need a Sample Code about flash++.h and swc.

    hi,help me !
    i need a Sample Code about flash++.h and swc.
    my Sample Code bitmapdata.cpp:
    #include <AS3/AS3.h>
    #include <Flash++.h>
    using namespace AS3::ui;
    void gettpoint() __attribute__((used,
    annotate(“as3sig:public function gettpoint(x:Number,y:Number):uint”),
    annotate(“as3package:MyLibrary”)));
    void gettpoint()
    double xx;
    double yy;
    inline_as3( “%0 = x;%1 = y\n” : “=r”(xx) : “r”(yy) );
    flash::geom::Point p=flash::geom::Point::_new();
    AS3_Return(xx);
    int main()
    AS3_GoAsync();
    return 0;
    the compile command is “$(FLASCC)/usr/bin/g++” $(BASE_CFLAGS) -O4 bitmapdata.cpp -emit-swc=MyLibrary -o bitmapdata.swc -lFlash++ -lAS3++
    It took me ten minutes to compile,but it can’t work.why?

    Compiling a SWC using Flash++ will result in poor compiler performance if you are using the Flex SDK to compile that SWC into a SWF.
    To get better performance try using the new version of mxmlc that is shipped in the Adobe Gaming SDK.  (Note that this new version of mxmlc doesn't support Flex)
    You will need to install the Gaming SDK and then extract the archive in the "AIR SDK" folder.  Once that archive is extracted you'll notice the new mxmlc compiler in the bin folder.
    Unfortunately compiling a SWF seems to be a little tricky.  You'll notice in the sample Makefile below project that it changes directory into the bin folder before calling ./mxmlc.  Ideally you wouldn't need to do this (like how it worked with the Flex mxmlc).  I'll investigate why that is the case.
    Makefile:
    # Path to your FlasCC SDK folder
    $?FLASCC=/Users/stshongr/builds/alchemy/1.0.0/sdk
    $?GAMINGSDK="/Applications/Adobe Gaming SDK 1.0/AIR SDK/air3-5_p4_sdk_asc2_mac_112112/bin"
    # The folder the source files are in
    $?SRC_FOLDER=$(PWD)
    all:
              "$(FLASCC)/usr/bin/g++" MyLibrary.c -emit-swc=MyLibrary -o MyLibrary.swc -lFlash++ -lAS3++
              cd $(GAMINGSDK) && ./mxmlc -library-path=$(SRC_FOLDER)/MyLibrary.swc $(SRC_FOLDER)/demo.as -o $(SRC_FOLDER)/demo.swf
    clean:
              rm -f *.swf *.swc *.bc *.exe
    MyLibrary.c:
    #include <AS3/AS3.h>
    #include <Flash++.h>
    using namespace AS3::ui;
    void gettpoint() __attribute__((used,
                                    annotate("as3sig:public function gettpoint(x:Number,y:Number):uint"),
                                    annotate("as3package:MyLibrary")));
    void gettpoint()
        double xx;
        double yy;
        inline_as3( "%0 = x;%1 = y\n" : "=r"(xx) : "r"(yy) );
        flash::geom::Point p=flash::geom::Point::_new();
        AS3_Return(xx);
    int main()
        AS3_GoAsync();   
        return 0;
    demo.as:
    package {
        import flash.display.Sprite;
        import flash.text.TextField;
              import flash.events.Event;
        import MyLibrary.CModule;
        public class demo extends Sprite {
                        private var tf:TextField;
            public function demo() {
                addEventListener(Event.ADDED_TO_STAGE, initCode);
            private function initCode(e:Event):void {
                tf = new TextField();
                addChild(tf);
                // start the FlasCC library
                MyLibrary.CModule.startAsync(this);
                // call the function
                                  tf.appendText("OUTPUT:" + MyLibrary.gettpoint(2,2));

  • Upgrading Stellent 7.5 to OCS 10gR3 Import Process failing HELP NEEDED

    Hi,
    I am upgrading Stellent 7.5 to Oracle COntent Server 10gR3. Here is what I have done.
    1. Migrated all the configuration from Stellent to 10gR3
    2. Migrated the Folders from Stellent to 10gR3
    3. Migrated the content by creating an Archive and then importing the Archive in 10gR3.
    I am seeing lot of errors in the log file. Following are the errors I see in the log file.
    1.
    Could not send mail message from (null) with subject line: Content Release Notification. Could not get I/O for connection to: hpmail.rtp.ppdi.com java.net.ConnectException: Connection timed out
    2.
    Import error for archive 'ProductionContent' in collection 'prod_idc': Invalid Metadata for 'ID_000025'. Virtual folder does not exist.
    3.
    Import error for archive 'ProductionContent' in collection 'prod_idc': Content item 'ID_004118' was not successfully checked in. The primary file does not exist.
    4.
    Import error for archive 'ProductionContent' in collection 'prod_idc': Content item 'ID_004213' was not successfully checked in. IOException (System Error: /u01/app/oracle/prod/ucm/server/archives/productioncontent/09-dec-21_23.29.44_396/4/vault/dmc_unblinded_documents/4227 (No such file or directory)) java.io.FileNotFoundException: /u01/app/oracle/prod/ucm/server/archives/productioncontent/09-dec-21_23.29.44_396/4/vault/dmc_unblinded_documents/4227
    5.
    Import error for archive 'ProductionContent' in collection 'prod_idc': Content item 'ID_031414' with revision label '2' was not successfully checked in. The release date (11/4/08 9:12 AM) of the new revision is not later than the release date (11/4/08 9:12 AM) of the latest revision in the system.
    6.
    Import error for archive 'ProductionContent' in collection 'prod_idc': Invalid Metadata for 'ID_033551'. Item with name '07-0040_IC_Olive-View_UCLA_ERI_Cellulitis_2008-08-26.pdf' already exists in folder '/Contribution Folders/2007/07-0040/07-0040Site_Specific_Documents/07-0040Olive_View_UCLA_Medical_Center/07-0040Archive/07-0040Essential_Documents_ARC/07-0040Informed_Consent_ARC/'.
    7.
    Import error for archive 'ProductionContent' in collection 'prod_idc': Aborting. Too many errors.
    QUESTIONS:
    Is there a way to keep the import processing running even if the errors are coming. As it looks like when there are too many errors the import process stops in the middle.
    How do I find out the total number of folders and the documents. As I want to run the same query on Stellent 7.5 and find out total number of folders and the documents and then run the same query on 10gR3 and compare the results. Just want to fnd out how much content is imported.
    How do I run the import process over again as half of the content is imported and my import process failed in the middle when running the process over again what settings do I need to provide to make sure no duplicates get created etc.
    Any help is really appreciated.
    Thanks

    Hi
    There are a couple of ways to get around the issues that you are facing such that import process is not interrupted because of these. They are as follows :
    1. Use ArchiveReplicationException component . This will keep the import process running and make a log of the failed process which can be used for assessing / gauging the success of the import and what all needs to be redone.
    I would suggest this as the option for your case.
    2. Put the config variable for arciver exception to 9999 so that the archive process stops only after hitting the limit of 9999 errors.
    I would suggest to go for step 1 as that would be a much more foolproof and methodical way of knowing what all items have failed during import.
    Thanks
    Srinath

  • In bdc if date format of records is different  do we need to hard code

    in bdc if date format of records is different  do we need to hard code or bdc will support automatically,please provide the answer.

    Make sure to format the date before passing to BDC.
    data: datum(10) type c.
    call function 'CONVERT_DATE_TO_EXTERNAL'
      EXPORTING
        DATE_INTERNAL                  = SY-DATUM
      IMPORTING
        DATE_EXTERNAL                  = datum.
    Regards,
    Rich Heilman

  • Accessing a file in Imported Archive from Adapter module

    Hi,
    I am designing a module for File/FTP and Mail adapters. Is it possible to retrieve data from a CSV or TXT file uploaded in the Imported Archive from the Java code in the module? If this is possible, do I use the same approach as accessing the CSV data from the mapping using a UDF? If this is not possible, can you suggest other ways were I can access a CSV or TXT configuration file from an adapter module?
    I would like to avoid using Module key, Parameter name and Parameter value as I would like to make the adapter module generic and the data I will be reading might be too much to be specified in this location. However, I would use the Module key, Parameter name and Parameter value to specify the CSV or TXT filename which the adapter module will be using.
    Thanks in advance for any help that you can provide.
    Regards,
    Elbert

    Imported archives are part of mapping flow and adapter modules are more part of routing. Therefore I don't think imported archive could  be made accessible anywhere outside mapping.
    but my CSV or TXT file would be updated regularly by the developer.
    So were you planning to import this file again and again under imported archive? This doesn't seems to be a good solution when you think about changin Design part in Production environment. It would be better to give access to certain folder to developer to put the file there and access it using some code. You may refer this
    /people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
    Regards,
    Prateek

  • Imported Archive not visible

    Hi Guru,
    I have imported into XI a XSLT Mapping in IMPORTED ARCHIVE; now I have to use thi mapping in my Interface Mapping, but the imported Archive (the XSLT Mapping...) is not visible! How is it possible?
    Thanks to all!

    hi,
    1. Make sure that the XSLT program .zip or jar format.
    2. If the mapping program it' not showing then forceble you need to push your interface mapping.
      If the mapping program it is not showing mean particular source message particular target message couldn't defind the mapping program..this is not complesary any mapping program we can push through forceble .
    Regards,
    Venu.

  • Imported archives

    How to import externally defined mapping programs in to Imported archieves? could anybody help me....
    Thanks in advance,
    Manoj

    Hi Manoj,
                XI supports 4 types of mappings
                            1. Message mapping
                            2. XSLT MApping
                            3. JAVA Mapping
                            4. ABAP Mapping.
                     If you go with message mapping or ABAP mapping no need to use imported archive. If you want to implement XSLT or JAVA mapping then only you need to import those programmes into imported archives. when import the external programms(XSLT or JAVA) to the Imported archives then should keep those file as a ZIP. The ZIP files only can import to the Imported Archives. 
    Thanks,
    Satish

  • Using imported archive in UDF using import statement

    Hello Expert,
    I am trying to use the class of keystore_api.jar which is impoted in imported archive in my UDF using the import statement
    com.sap.engine.interfaces.keystore.KeystoreManager but I am getting the error
    package com.sap.engine.interfaces.keystore does not exist
    import com.sap.engine.interfaces.keystore.*;
    Appreciate your valuable replies.
    Kind Regards,
    Kubra fatima

    Hi,
    as ur import statement  states
    com.sap.engine.interfaces.keystore
    You need to import the jar in directory hierarchy as above manner.
    com[sap[engine[interface[]keystore[JAR]]]]
    Regards
    Ashu

  • Needed example working  code for  FM"LAST_DAY_IN_PERIOD_GET"

    needed example working  code for  FM"LAST_DAY_IN_PERIOD_GET"

    Hi,
    Go through this code
    *& Report  Z_FICO_REP_SHIPMENTS
    REPORT  z_fico_rep_shipments MESSAGE-ID sd.
    TYPE-POOLS : slis.
    TABLES : vbak,
             kna1,
             likp,
             vbfa.
    *>> DEFINE global Types
    TYPES : BEGIN OF gt_vbak,
              vbeln TYPE vbeln,
              kunnr TYPE kunnr ,
              spart TYPE spart,
              audat TYPE audat,
            END OF gt_vbak,
            BEGIN OF gt_kna1,
              kunnr TYPE kunnr,
              name1 TYPE name1,
            END OF gt_kna1,
            BEGIN OF gt_likp,
              vbeln     TYPE vbeln,
              wadat_ist TYPE wadat_ist,
            END OF gt_likp,
            BEGIN OF gt_vbfa,
              vbelv     TYPE vbelv,
              erdat     TYPE erdat,
              rfwrt     TYPE rfwrt,
           END OF gt_vbfa,
            BEGIN OF gt_final,
              kunnr   TYPE kunnr,
              name1   TYPE name1,
              cumon   TYPE monat,
              trcum   TYPE rfwrt,
              trcuy   TYPE rfwrt,
              perce   TYPE rfwrt,
              fiscy   TYPE gjahr,
              ftrcum  TYPE rfwrt,
              ftrcuy  TYPE rfwrt,
              fperce  TYPE rfwrt,
            END OF gt_final.
    DATA : gwa_vbak   TYPE gt_vbak,
           gwa_kna1   TYPE gt_kna1,
           gwa_likp   TYPE gt_likp,
           gwa_vbfa   TYPE gt_vbfa,
           gwa_final  TYPE gt_final,
           gwa_sort   TYPE slis_sortinfo_alv,
           gwa_layout TYPE slis_layout_alv.    "ALV Layout
    DATA : gi_vbak    TYPE STANDARD TABLE OF gt_vbak,
           gi_kna1    TYPE STANDARD TABLE OF gt_kna1,
           gi_likp    TYPE STANDARD TABLE OF gt_likp,
           gi_vbfa    TYPE STANDARD TABLE OF gt_vbfa,
           gi_likp1   TYPE STANDARD TABLE OF gt_likp,
           gi_vbfa1   TYPE STANDARD TABLE OF gt_vbfa,
           gi_final   TYPE STANDARD TABLE OF gt_final WITH HEADER LINE,
           gi_final1  TYPE STANDARD TABLE OF gt_final WITH HEADER LINE.
    *>> DEFINE INTERNAL TABLE
    DATA : gi_fieldcat    TYPE slis_t_fieldcat_alv,   "ALV Fieldcatalog
           gi_events      TYPE slis_t_event,          "ALV EventS
           gi_sort        TYPE slis_t_sortinfo_alv ,
           gi_top_of_page TYPE slis_t_listheader.     "ALV LIST HEADER
    DATA : gv_month(2) TYPE n.
    *>> GLOBAL CONSTANTS
    CONSTANTS: gc_day(2) TYPE n VALUE 01,
               gc_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
               gc_x TYPE c VALUE 'X'.
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_monat      TYPE     monat OBLIGATORY,
                p_gjahr     TYPE     gjahr OBLIGATORY.
    SELECT-OPTIONS : s_bukrs      FOR      vbak-bukrs_vf OBLIGATORY,
                     s_vkorg     FOR      vbak-vkorg,
                     s_spart     FOR     vbak-spart     OBLIGATORY,
                     s_audat   FOR    vbak-audat NO-DISPLAY.
    SELECTION-SCREEN:END OF BLOCK b1.
    SELECTION-SCREEN:BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    PARAMETERS: p_det RADIOBUTTON GROUP grp DEFAULT 'X' ,
              p_sum RADIOBUTTON GROUP grp.
    SELECTION-SCREEN:END OF BLOCK b2.
    START-OF-SELECTION.
    *>> Take Period And year and find starting and ending date
      PERFORM fiscal_date.
      PERFORM collect_data.
      PERFORM manipulation_collect_data.
    END-OF-SELECTION.
    *>> Sort
      PERFORM gi_sort_table.
    *>> MEARGE FIELD CATALOG USING INTERNAL TABLE
      PERFORM mearge_field_catalog.
    *>> SET EVENTS
      PERFORM set_event.
    *>> FOR ALV HEADER
      PERFORM n_top_of_page USING gi_top_of_page[].
    *>>For ALV Layout
      PERFORM build_layout.
    *>>For output display
      PERFORM alv_grid_display.
    *&      Form  fiscal_date
    FORM fiscal_date.
      TYPES : BEGIN OF lt_fisc,
                bukrs TYPE bukrs,
                periv TYPE periv,
                bumon TYPE bumon,
                butag TYPE butag,
              END OF lt_fisc,
              BEGIN OF lt_t009b,
                periv TYPE periv,
                bumon TYPE bumon,
                butag TYPE butag,
                poper TYPE poper,
               END OF lt_t009b.
      DATA : lwa_fisc  TYPE lt_fisc,
             lwa_t009b TYPE lt_t009b.
      DATA : li_fisc  TYPE STANDARD TABLE OF lt_fisc,
             li_t009b TYPE STANDARD TABLE OF lt_t009b.
      DATA : lv_date(2) TYPE c,
             lv_mont(2) TYPE c,
             lv_year(4) TYPE c.
      SELECT bukrs periv FROM t001
                         INTO TABLE li_fisc
                         WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT * FROM t009b
                 INTO CORRESPONDING FIELDS OF TABLE li_t009b
                 FOR ALL ENTRIES IN li_fisc
                 WHERE periv EQ li_fisc-periv .
        IF sy-subrc NE 0.
          CLEAR li_t009b.
        ENDIF.
      ELSE.
        CLEAR li_fisc.
      ENDIF.
      SORT li_t009b BY periv poper.
      LOOP AT li_fisc INTO lwa_fisc.
        READ TABLE li_t009b INTO lwa_t009b WITH KEY periv = lwa_fisc-periv
                                                    poper = '001'
                                           BINARY SEARCH.
        IF sy-subrc = 0.
          s_audat-option = 'EQ'.
          s_audat-sign   = 'I'.
          CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
            EXPORTING
              i_gjahr = p_gjahr
              i_periv = lwa_t009b-periv
              i_poper = lwa_t009b-poper
            IMPORTING
              e_date  = s_audat-low.
        ENDIF.
        CLEAR lwa_t009b.
        READ TABLE li_t009b INTO lwa_t009b WITH KEY periv = lwa_fisc-periv
                                                    poper = '012'
                                           BINARY SEARCH.
        IF sy-subrc = 0.
          CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
            EXPORTING
              i_gjahr = p_gjahr
              i_periv = lwa_t009b-periv
              i_poper = lwa_t009b-poper
            IMPORTING
              e_date  = s_audat-high.
        ENDIF.
        CLEAR lwa_t009b.
        READ TABLE li_t009b INTO lwa_t009b WITH KEY periv = lwa_fisc-periv
                                                    poper = p_monat
                                            BINARY SEARCH.
        IF sy-subrc = 0.
          lv_date = s_audat-high+6(2).
          lv_mont = s_audat-high+4(2).
          lv_year = s_audat-high(4).
          lv_mont = lwa_t009b-bumon.
          lv_date = lwa_t009b-butag.
          CONCATENATE lv_year lv_mont lv_date INTO s_audat-high.
          APPEND s_audat.
          CLEAR: lwa_fisc,lwa_t009b,lv_date,lv_mont,lv_year.
        ENDIF.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM s_audat.
    ENDFORM.                    "fiscal_date
    *&      Form  collect_data
    FORM collect_data .
      SELECT vbeln kunnr spart audat
          FROM vbak
          INTO TABLE gi_vbak
          WHERE audat    GE s_audat-low  AND
                audat    LT s_audat-high AND
                vkorg    IN s_vkorg AND
                spart    IN s_spart AND
                bukrs_vf IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT kunnr name1
        FROM kna1
        INTO TABLE gi_kna1
        FOR ALL ENTRIES IN gi_vbak
        WHERE kunnr EQ gi_vbak-kunnr.
        IF sy-subrc NE 0.
          CLEAR gi_kna1.
        ENDIF.
        SELECT vbeln wadat_ist
        FROM likp
        INTO TABLE gi_likp
        WHERE wadat_ist  GE s_audat-low  AND
              wadat_ist  LT s_audat-high .
        IF sy-subrc EQ 0.
          SELECT vbelv erdat rfwrt
          FROM vbfa
          INTO TABLE gi_vbfa
          FOR ALL ENTRIES IN gi_likp
          WHERE vbeln   = gi_likp-vbeln AND
                 ( vbtyp_n = 'M' OR
                vbtyp_n = 'H' ) .
          IF sy-subrc NE 0.
            CLEAR gi_vbfa.
          ENDIF.
        ELSE.
          CLEAR gi_likp.
        ENDIF.
        PERFORM change_date.
        SELECT vbeln wadat_ist
        FROM likp
        INTO TABLE gi_likp1
        WHERE wadat_ist  GE s_audat-low  AND
              wadat_ist  LT s_audat-high .
        IF sy-subrc EQ 0.
          SELECT vbelv erdat rfwrt
          FROM vbfa
          INTO TABLE gi_vbfa1
          FOR ALL ENTRIES IN gi_likp1
          WHERE vbeln   = gi_likp1-vbeln AND
                 ( vbtyp_n = 'M' OR
                vbtyp_n = 'H' ) .
          IF sy-subrc NE 0.
            CLEAR gi_vbfa.
          ENDIF.
        ELSE.
          CLEAR gi_likp.
        ENDIF.
      ELSE.
        MESSAGE i261.
        LEAVE SCREEN.
      ENDIF.
    ENDFORM.                    "collect_data
    *&      Form  Manipulation_collect_data
    FORM manipulation_collect_data.
      SORT gi_vbak BY vbeln.
      SORT gi_kna1 BY kunnr.
      LOOP AT gi_vbak INTO gwa_vbak.
        MOVE-CORRESPONDING gwa_vbak TO gwa_final.
        READ TABLE gi_kna1 INTO gwa_kna1 WITH KEY kunnr = gwa_vbak-kunnr
                                       BINARY SEARCH.
        IF sy-subrc EQ 0.
          gwa_final-name1 = gwa_kna1-name1.
        ENDIF.
      ENDLOOP.
    *    v_month = gwa_vbak-audat+4(2).
    *    gwa_final-cumon = p_monat.
    *    gwa_final-fiscy = p_gjahr.
    *    IF v_month = p_monat.
    *      CLEAR wa_ckmlhd.
    *      READ TABLE i_ckmlhd INTO wa_ckmlhd WITH KEY matnr = wa_vbap-matnr
    *                                                  bwkey = wa_vbap-werks
    *                                                  BINARY SEARCH.
    *      IF sy-subrc EQ 0.
    *        CLEAR i_nckmlcr.
    *        READ TABLE i_nckmlcr INTO wa_nckmlcr
    *                             WITH KEY kalnr = wa_ckmlhd-kalnr
    *                             BINARY SEARCH.
    *        IF sy-subrc EQ 0.
    *          gwa_final-peinh = wa_nckmlcr-peinh.
    *          gwa_final-kzwi6 = wa_vbap-kzwi6 - wa_vbap-kzwi5.
    *          gwa_final-kzwi5 = wa_vbap-kzwi5.
    *          gwa_final-totre = gwa_final-kzwi6 + gwa_final-kzwi5.
    *          gwa_final-actco = ( wa_nckmlcr-pvprs / wa_nckmlcr-peinh ) *
    *                            wa_vbap-kwmeng.
    *          gwa_final-profit = gwa_final-totre - gwa_final-actco.
    *          gwa_final-prows  = ( gwa_final-profit - gwa_final-kzwi6 ) *
    *100.
    *        ENDIF.
    *      ENDIF.
    *    ELSE.
    *      CLEAR wa_ckmlhd.
    *      READ TABLE i_ckmlhd INTO wa_ckmlhd WITH KEY matnr = wa_vbap-matnr
    *                                                bwkey = wa_vbap-werks
    *                                                BINARY SEARCH.
    *      IF sy-subrc EQ 0.
    *        READ TABLE i_ckmlcr INTO wa_ckmlcr
    *                             WITH KEY kalnr = wa_ckmlhd-kalnr
    *                             BINARY SEARCH.
    *        IF sy-subrc NE 0.
    *          CLEAR wa_ckmlcr.
    *        ENDIF.
    *        CLEAR wa_nckmlcr.
    *        READ TABLE i_nckmlcr INTO wa_nckmlcr
    *                             WITH KEY kalnr = wa_ckmlhd-kalnr
    *                             BINARY SEARCH.
    *        IF sy-subrc EQ 0.
    *          gwa_final-fkzwi6  = wa_vbap-kzwi6 - wa_vbap-kzwi5.
    *          gwa_final-fkzwi5  = wa_vbap-kzwi5.
    *          gwa_final-ftotre  = gwa_final-fkzwi6 + gwa_final-fkzwi5.
    *          gwa_final-factco  = ( ( wa_nckmlcr-pvprs / wa_ckmlcr-peinh )
    *                               * wa_vbap-kwmeng ) / wa_nckmlcr-count.
    *          gwa_final-fprofit = gwa_final-ftotre - gwa_final-factco.
    *         gwa_final-fprows  = ( gwa_final-fprofit - gwa_final-kzwi6 ) *
    *100
    *        ENDIF.
    *      ENDIF.
    *    ENDIF.
    *    APPEND gwa_final TO gi_final.
    *    CLEAR : gwa_final,wa_nckmlcr,wa_ckmlcr,wa_ckmlhd,
    *            gwa_vbak,wa_vbap,gwa_kna1.
    *  ENDLOOP.
    *  gwa_final-matnr = space.gwa_final-vbeln = space.
    *  MODIFY gi_final FROM gwa_final TRANSPORTING vbeln matnr
    *                                WHERE matnr NE space.
    *  SORT gi_final BY kunnr vbeln matnr.
    *  IF p_sum = gc_x.
    *    LOOP AT gi_final INTO gwa_final.
    *      COLLECT gwa_final INTO gi_final1.
    *    ENDLOOP.
    *    CLEAR gwa_final.REFRESH gi_final.
    *    gi_final[] = gi_final1[].
    *  ENDIF.
    ENDFORM.                    "manipulation_collect_data
    *&      Form  change_date
    FORM change_date.
      DATA : lv_date(2) TYPE c,
             lv_mont(2) TYPE c,
             lv_year(4) TYPE n.
      lv_date = s_audat-low+6(2).
      lv_mont = s_audat-low+4(2).
      lv_year = s_audat-low(4).
      lv_year = lv_year - 1.
      CONCATENATE  lv_year lv_mont lv_date INTO s_audat-low.
      CLEAR : lv_date ,lv_mont,lv_year.
      lv_date = s_audat-high+6(2).
      lv_mont = s_audat-high+4(2).
      lv_year = s_audat-high(4).
      lv_year = lv_year - 1.
      CONCATENATE  lv_year lv_mont lv_date INTO s_audat-high.
      CLEAR : lv_date ,lv_mont,lv_year.
    ENDFORM.                    " change_date
    *&      Form  gi_sort_table
    FORM gi_sort_table.
      IF p_det = gc_x.
        gwa_sort-spos = '1'.
        gwa_sort-fieldname = 'KUNNR'.
        gwa_sort-tabname = 'gi_final'.
        gwa_sort-up = gc_x.
        gwa_sort-subtot  = gc_x.
        APPEND gwa_sort TO gi_sort.
        CLEAR gwa_sort.
        gwa_sort-spos = '2'.
        gwa_sort-fieldname = 'NAME1'.
        gwa_sort-tabname = 'gi_final'.
        gwa_sort-up = gc_x.
        APPEND gwa_sort TO gi_sort.
    *  ELSE.
    *    gwa_sort-spos = '1'.
    *    gwa_sort-fieldname = 'KUNNR'.
    *    gwa_sort-tabname = 'gi_final'.
    *    gwa_sort-up = gc_x.
    *    APPEND gwa_sort TO gi_sort.
    *    CLEAR gwa_sort.
    *    gwa_sort-spos = '2'.
    *    gwa_sort-fieldname = 'NAME1'.
    *    gwa_sort-tabname = 'gi_final'.
    *    gwa_sort-up = gc_x.
    *    gwa_sort-group = gc_x.
    *    gwa_sort-subtot  = gc_x.
    *    APPEND gwa_sort TO gi_sort.
      ENDIF.
    ENDFORM.                    "gi_sort_table
    *&      Form  mearge_field_catalog
    FORM mearge_field_catalog .
    *>> LOCAL WORK AREA FOR FIELDCATALOG
      DATA : lwa_fieldcata TYPE slis_fieldcat_alv.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'KUNNR'.
    *  lwa_fieldcata-col_pos      = 1.
      lwa_fieldcata-key          = 'X'.
      lwa_fieldcata-key_sel      = 'X'.
      lwa_fieldcata-ref_tabname  = 'KNA1'.
      lwa_fieldcata-seltext_l    = 'Customer No.'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'NAME1'.
    *  lwa_fieldcata-col_pos      = 2.
      lwa_fieldcata-ref_tabname  = 'KNA1'.
      lwa_fieldcata-seltext_l    = 'Customer Name'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      IF p_det = gc_x.
        CLEAR lwa_fieldcata.
        lwa_fieldcata-fieldname    = 'VBELN'.
    *    lwa_fieldcata-col_pos      = 3.
        lwa_fieldcata-ref_tabname  = 'VBAK'.
        lwa_fieldcata-seltext_l    = 'Sales Order Number'.
        APPEND lwa_fieldcata TO gi_fieldcat.
        CLEAR lwa_fieldcata.
        lwa_fieldcata-fieldname    = 'MATNR'.
    *    lwa_fieldcata-col_pos      = 4.
        lwa_fieldcata-ref_tabname  = 'VBAK'.
        lwa_fieldcata-seltext_l    = 'Material No.'.
        APPEND lwa_fieldcata TO gi_fieldcat.
      ENDIF.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'KWMENG'.
      lwa_fieldcata-col_pos      = 5.
      lwa_fieldcata-ref_tabname  = 'VBAP'.
      lwa_fieldcata-do_sum       = 'X'.
      lwa_fieldcata-seltext_l    = 'Order Quantity'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'PEINH'.
      lwa_fieldcata-col_pos      = 6.
      lwa_fieldcata-ref_tabname  = 'CKMLCR'.
      lwa_fieldcata-text_fieldname = 'PEINH'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'CUMON'.
      lwa_fieldcata-col_pos      = 7.
      lwa_fieldcata-ref_tabname  = 'VBKPF'.
      lwa_fieldcata-seltext_l    = 'Month'.
      lwa_fieldcata-no_sum       = gc_x.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'KZWI6'.
      lwa_fieldcata-col_pos      = 8.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Costed Sales'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'KZWI5'.
      lwa_fieldcata-col_pos      = 9.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Surcharges'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'TOTRE'.
      lwa_fieldcata-col_pos      = 10.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Total Revenues'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'ACTCO'.
      lwa_fieldcata-col_pos      = 11.
      lwa_fieldcata-ref_tabname  = 'VBAP'.
      lwa_fieldcata-seltext_l    = 'Actual Cost for Period'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'PROFIT'.
      lwa_fieldcata-col_pos      = 12.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Profit'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'PROWS'.
      lwa_fieldcata-col_pos      = 13.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Profit % w/surcharge'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FISCY'.
      lwa_fieldcata-col_pos      = 14.
    *  lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Fiscal Year'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FKZWI6'.
      lwa_fieldcata-col_pos      = 15.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Costed Sales'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FKZWI5'.
      lwa_fieldcata-col_pos      = 16.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Surcharges'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FTOTRE'.
      lwa_fieldcata-col_pos      = 17.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Total Revenues'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FACTCO'.
      lwa_fieldcata-col_pos      = 18.
      lwa_fieldcata-ref_tabname  = 'VBAP'.
      lwa_fieldcata-seltext_l    = 'Actual Cost for Period'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FPROFIT'.
      lwa_fieldcata-col_pos      = 19.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Profit'.
      APPEND lwa_fieldcata TO gi_fieldcat.
      CLEAR lwa_fieldcata.
      lwa_fieldcata-fieldname    = 'FPROWS'.
      lwa_fieldcata-col_pos      = 20.
      lwa_fieldcata-ref_tabname  = 'VBAK'.
      lwa_fieldcata-seltext_l    = 'Profit % w/surcharge'.
      APPEND lwa_fieldcata TO gi_fieldcat.
    ENDFORM.                    " mearge_field_catalog
    *&      Form  set_event
    FORM set_event .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 1
        IMPORTING
          et_events   = gi_events.
      SORT gi_events BY name.
    *-- To read Top of Page event
      PERFORM read_events USING slis_ev_top_of_page gc_top_of_page.
    ENDFORM.                    " set_event
    *&      Form  top_of_page
    FORM n_top_of_page USING lp_top_of_page TYPE slis_t_listheader.
      DATA: lwa_listhead TYPE slis_listheader,
            lv_ccode TYPE string,
            lv_sales TYPE string,
            lv_divis TYPE string.
      CONCATENATE 'From : ' s_bukrs-low  ' To: ' s_bukrs-high INTO lv_ccode.
      CONCATENATE 'From: ' s_vkorg-low       ' To: ' s_vkorg-high INTO lv_sales.
      CONCATENATE 'From: ' s_spart-low       ' To: ' s_spart-high INTO lv_divis.
      CLEAR lwa_listhead.
      lwa_listhead-typ  = 'H'.
      lwa_listhead-info = text-003.
      APPEND lwa_listhead TO lp_top_of_page.
      CLEAR lwa_listhead.
      lwa_listhead-typ  = 'S'.
      lwa_listhead-key  = 'Month'.
      lwa_listhead-info = p_monat.
      APPEND lwa_listhead TO lp_top_of_page.
      CLEAR lwa_listhead.
      lwa_listhead-typ  = 'S'.
      lwa_listhead-key  = 'Year'.
      lwa_listhead-info = p_gjahr.
      APPEND lwa_listhead TO lp_top_of_page.
      CLEAR lwa_listhead.
      lwa_listhead-typ  = 'S'.
      lwa_listhead-key  = 'Company Code'.
      lwa_listhead-info = lv_ccode.
      APPEND lwa_listhead TO lp_top_of_page.
      CLEAR lwa_listhead.
      lwa_listhead-typ  = 'S'.
      lwa_listhead-key  = 'Sales Org'.
      lwa_listhead-info = lv_sales.
      APPEND lwa_listhead TO lp_top_of_page.
      CLEAR lwa_listhead.
      lwa_listhead-typ  = 'S'.
      lwa_listhead-key  = 'Division'.
      lwa_listhead-info = lv_divis.
      APPEND lwa_listhead TO lp_top_of_page.
      IF p_det = gc_x.
        CLEAR lwa_listhead.
        lwa_listhead-typ  = 'A'.
        lwa_listhead-info = text-004.
        APPEND lwa_listhead TO lp_top_of_page.
      ELSE.
        CLEAR lwa_listhead.
        lwa_listhead-typ  = 'A'.
        lwa_listhead-info = text-005.
        APPEND lwa_listhead TO lp_top_of_page.
      ENDIF.
    ENDFORM.                    "top_of_page
    *&      Form  TOP_OF_PAGE
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          i_logo             = 'ENJOYSAP_LOGO'
          it_list_commentary = gi_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  build_layout
    FORM build_layout .
      gwa_layout-no_input          = gc_x.
      gwa_layout-colwidth_optimize = gc_x.
      gwa_layout-zebra             = gc_x.
    ENDFORM.                    "build_layout
    *&      Form  alv_grid_display
    FORM alv_grid_display .
    * Function module to display ALV report
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = gwa_layout
          it_fieldcat        = gi_fieldcat[]
          it_sort            = gi_sort
          i_save             = 'A'
          it_events          = gi_events[]
        TABLES
          t_outtab           = gi_final
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_grid_display
    *&      Form  read_events
    FORM read_events  USING  pr_events    TYPE slis_alv_event-name
                             pr_eventname TYPE slis_formname.
      DATA: lwa_event TYPE slis_alv_event.
      CLEAR lwa_event.
      READ TABLE gi_events INTO lwa_event
                          WITH KEY name = pr_events BINARY SEARCH.
      IF sy-subrc = 0.
        MOVE pr_eventname TO lwa_event-form.
        MODIFY gi_events FROM lwa_event
                        TRANSPORTING form
                        WHERE name = pr_events.
      ENDIF.
    ENDFORM.                    " read_events
    Regards
    Sandipan

  • Imported Archive

    Hi,
    Can anyone tell me where does XI actually make a copy of the Imported Archive?
    eg. the jar aii_map_api.jar is available @ usr/sap/X01/DVEBMGSOO/j2ee/cluster/server0/apps/sap.com/com.sap.xi.services
    on the XI server.
    So there must be a location where XI stores the imported archives also
    Actually I am trying to access a .xsd file in a java code
    for this the suggested solution is to include the .xsd also in the jar file which will finally be imported in to the Imported archives in XI
    But now when I run the java code/mapping it throws an error saying hte .xsd cud not be found.
    So please tell me whether there is any special care I have to take for this.
    Ranjit

    Hi,
    Could you please try by importing the xsd file in external definitions instead of imported archives. Please make sure you are importing in the same SWCV. I dont know if this is the correct reason. Just give a try.
    Regards,
    Sudheer.

  • Again: UDF: Load file from "imported archives"

    Hi everybody,
    I tried to read a txt-File from the "imported archives".
    The following does not work:
    try {
    +     FileInputStream fstream = new FileInputStream(Filename);+
    +     DataInputStream in = new DataInputStream(fstream);+
    +     BufferedReader br = new BufferedReader(new InputStreamReader(in));+
    } catch (Exception e) {// Catch exception if any
    +     return "Error: " + e.getMessage();+
    }//catch
    return "test";
    I get the error:
    abc.txt (No such file or directory)
    Any ideas?
    regards Mario

    Hi roberti,
    it is possible!
    I found some coding that works:
         String returnString="";
         byte[] buffer;
         try {
              InputStream is = this.getClass().getClassLoader().getResourceAsStream(filename);
              buffer = new byte [is.available()];
              is.read (buffer);
              returnString = new String (buffer, "ISO-8859-1");
         catch (Exception e) {
              returnString = e.getMessage();
         return returnString;
    Unfortunately this coding gets the whole file in once. But I need the single lines.
    Thats why I tried to use FileInputStream instead on InputStream
    Any idea?
    Regards Mario

Maybe you are looking for

  • Can I set up a shortcut for an application ?

    in a way that it will be activated whenever a shift+something is pressed (from any state of the phone) ? or maybe there exists a key that it funcionallity can be defined, that even better... nir

  • IPhoto 6 freezes up requiring force quit - help!

    I loaded all my JPEGs and MPEG4s from my Sony DSCW1 onto 2 DVDS and imported them into iPhoto, creating new albums but keeping the DVDs as the path, ie not copying them to the hard disc. Now iPhoto starts up fine and works for a while but then a mess

  • Import & export from oracle 9i

    Can anyone tell me how to import and export database schema from oracle 9i. any help will be appreciated

  • Midi tracks changing pitch when un frozen

    Whats up, is this a known problem and I am unaware. I had every midi track on 6 songs do the same thing upon unfreezing. All went up a half step sharp. Steve Cooley

  • Cursors for strip chart controls?

    I'm using a strip chart control to plot data during real-time.  I allow the operator to pause the chart to view old data.  The operators would like to be able to see a specific value when the chart is paused,  either by enabling cursors, or clicking