How to declare ranges on ECC6.0

Hi All,
i have probelm with the ranges statement in ECC 6.0 i have declared the renages like below.
RANGES: RA_BZOBJ FOR KEKO_WA-BZOBJ.
Using like this:
    RA_BZOBJ-SIGN = C_INCL.
    RA_BZOBJ-OPTION = C_EQ.
    RA_BZOBJ-LOW = WA_KEKO_DATA-BZOBJ.
    APPEND RA_BZOBJ.
But SLIN throwing errors for this. So please let me know or give one example for ranges in ECC 6.0
Mant Thanks
Raghu.

Hi...
In ECC 6.0 Declaring internal table with Header line will give errors in SLIN.
Ranges will create a Header line always.
So ..Try this way.
Eg:
<b>Data : r_date like Range of Sy-datum.
dATA : WA LIKE LINE OF R_DATE.
WA-sign = 'I'.
WA-LOW = SY-DATUM - 1.
WA-HIGH = SY-DATUM.
APPEND WA TO R_DATE.</b>

Similar Messages

  • HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.

    HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.
    how can we add range selection in screen painter.
    regards.

    Hi,
       create two input fields and a push button like select option in the screeen.
    Try checking this logic
    <b>Program:</b>
    <b>ranges</b> ra_matnr for mara-matnr.
    <b>Layout field name declaration:</b>
    Give the low field name as ra_range-low
      and high field name as ra_range-high.
    extension for pushbutton.--exten(function code)
    next -- function code for the enter key.
    PBO
    module status_3000.
    PAI
    module user_command_3000.
    <b>module user_command_3000.</b>
    if sy-ucomm = exten.
      call screen 400. (screen which shows extension values can be kept).
    elseif sy-ucomm = Next.
    if ra_matnr-low is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    if ra_matnr-high is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    endif.
    endmodule.
    module status_3000.
    read table ra_matnr  index 1 into ra_matnr .
    set pf-status '3000'.
    set title '3000'.
    endmodule
    Br,
    Laxmi.

  • How to declare variant

    Hi all
             how to declare variant in the screen(not the selection screen) used in module programming

    Hi Ganesh,
    Check this info.
    Variants
    the link is
    http://help.sap.com/search/highlightContent.jsp
    Variants allow you to save sets of input values for programs that you often start with the same selections. You can use them for any programs except subroutine pools (type S).
    Contents
    Variants: Overview
    Initial Screen
    Displaying a Variant Overview
    Creating and Maintaining Variants
    Creating Variants
    Attributes of Variants
    Changing Variants
    Deleting Variants
    Printing Variants
    Variable Values in Variants
    Creating Variables for Date Calculations
    User-specific Selection Variables
    Creating User-specific Variables
    Changing Values Interactively
    Changing Values from the Program
    Fixed Values from Table TVARV
    Creating Table Variables from TVARV
    Changing TVARV entries
    Running a Program with a Variant
    Variants: Overview
    Use
    Whenever you start a program in which selection screens are defined, the system displays a set of input fields for database-specific and program-specific selections. To select a certain set of data, you enter an appropriate range of values.
    For further information about selection screens, see Working with selection screens in the ABAP User's Guide.
    If you often run the same program with the same set of selections (for example, to create a monthly statistical report), you can save the values in a selection set called a variant.
    You can create any number of variants for any program in which selection screens are defined. Variants are assigned exclusively to the program for which they were created.
    You can also use variants to change the appearance of the selection screen by hiding selection criteria. This is particularly useful when you are working with large selection screens on which not all of the fields are relevant.
    Reports, module pools, and function groups may have several selection screens. It is therefore possible to create a variant for more than one selection screen.
    Variants are an interface between the user and the selection screen. They can be used both in dialog and in background mode, although their uses are slightly different.
    Variants in Dialog Mode
    In dialog mode, variants make things easier for the user, since they save him or her from continually having to enter identical values. They can also make the selection screen easier to read, because you can use them to hide input fields. Running an executable program with a variant containing an optimal set of values also reduces the capacity for user error. The optimized database selections speed up the runtime of the program.
    Variants in Background Mode
    Variants are the only method for passing values to a report program in a background job. Therefore, when you run a program in the background, you must use a variant (or SUBMIT... VIA JOB). To avoid you having to create a new variant each time you run the report, ABAP contains a mechanism allowing you to pass variable values to variants. See variable values in variants.
    To ensure that an executable program is always started using a variant, you can specify in the program attributes that the program may only be started in this way.
    Features
    Creation of variants
    Display, change, copy, print, and delete variants
    Use and definition of variables in variants
    Variable date calculation
    User-specific fixed values
    Fixed values in table TVARV
    You access the variant maintenance tool from the initial screen of the ABAP Editor. Enter the name of the program, select Variants in the Sub-objects group box, and then choose Display or Change.
    Functions
    The above screen allows you to:
    Create variants
    Display the variant directory
    Display and change values and attributes
    Copy, delete, and rename variants
    Before creating a new variant for a program, you should check whether you can use or adapt an existing variant instead.
    There are two ways to display variants:
    Position the cursor on the Variant field on the initial screen and press F4. The following dialog box lists all of the available variants:
    Choose Variants ® Directory on the initial screen:
    Creating Variants
    Prerequisites
    You must have defined one or more selection screens for the relevant program. The program may have any type except type S.
    Procedure
    On the initial screen of the ABAP Editor, enter the name of the program for which you want to create a variant, select Variants in the Sub-objects group box, and choose Change.
    On the variant maintenance initial screen, enter the name of the variant you want to create.
    Note the naming convention for variants (see below).
    Choose Create.
    If the program has more than one selection screen, a dialog box appears in which you can assign the variant to one or more screens. The dialog box does not appear if the program only has one selection screen. In this case, the selection screen of the program appears straight away.
    If there is more than one selection screen, select the screens for which you want to create the variant.
    Example:
    If you choose Variant for all selection screens, the variant also applies to any selection screens that you create after creating the variant.
    Otherwise, the variant only supplies values to the selection screens that you select in the list.
    Choose Continue.
    The (first) selection screen of the program appears.
    If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them. If you keep scrolling forwards, the Continue button appears on the last selection screen.
    Enter the required selections, including multiple and dynamic selections.
    Choose Continue.
    Result
    When you have finished, an overview screen appears (ABAP: Save Attributes of Variant), on which you can enter the attributes of your variant and save it.
    Note that when you create a new variant, you must enter both values and attributes.
    Names of variants: Names can consist of up to 14 alphanumeric characters. The "% " character is not allowed. If you want the variant to be transported automatically with its program, you must create a system variant. The name of a system variant starts "CUS&" for customers, and "SAP&" for SAP system variants. You can only use the "&" character within this prefix in the name of a system variant. It may not occur in any other context. System variants are administered by the Workbench Organizer. Although you can create and access variants from any client, they are always stored in client "000".
    Check this Link :
    http://help.sap.com/saphelp_47x200/helpdata/en/0a/af73ec76ac11d1ad670000e8a6353a/frameset.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • How to declare a list of dates

    Hi,
    I have an item which type is "Display as text based on LOV". I put in the source section under the type "Pl/SQL function body" the following pl/sql function :
    DECLARE
    X VARCHAR2 (4000);
    Y DATE ;
    BEGIN
    X := 'SELECT distinct(TO_CHAR(DATE1, ''YYYY'')) d, (TO_CHAR(DATE1, ''YYYY'')) r FROM SIVOA.EVV_'|| :p4_site ||' WHERE CLEF_VAR = (SELECT CLEF_VAR FROM SIVOA.SITE_DEBIT_RIVIERE WHERE SITE ='''|| :p4_site ||''')
    order by d';
    EXECUTE IMMEDIATE X INTO Y;
    RETURN Y ;
    END;The problem is that I get an ORA error.
    ORA-00932: types de données incohérents ; attendu : - ; obtenu : -
    I know that I have declared Y as a date and that what is returned by my function is a list of dates. I don't know how to declare a list of dates or whatever to be returned as a lis of values. Hope I am clear, sorry for my english.
    Thank you for your kind help.
    Christian

    Hi Tony
    You hare very patient with me thank you !!!
    Let me clarify well.
    I am trying to create a list of values based on dates contained in a table. This list of values should contains the "years". If the table contains data for the years 2005, 2006, 2007, then the list of value should return :
    2006
    2007
    2008
    As I want a list of value I need to have a display and a return value. The name of the table is 'dynamic' It is the item P4_SITE that contains a part of the name of the table. This is why I am usins PL/SQL, because I don't know the name of the table in advance.
    I have not seen any way to put a pl/sql statement in the List of values definition of the item. Thi s is why I try to make a LOV with the SOURCE of the item.
    Hope I am clear.

  • How to declare top of page in alv report

    hi guru
    how to declare top of page in alv report
    thanks
    subhasis

    Hi,
    check this simple program.
    REPORT ZBHALV_LIST.
    TABLES:MARA.
    SELECT-OPTIONS: MATNR FOR MARA-MATNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    ERSDA LIKE MARA-ERSDA,
    MTART LIKE MARA-MTART,
    MBRSH LIKE MARA-MBRSH,
    END OF ITAB.
    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE MATNR
    IN MATNR.
    TYPE-POOLS SLIS.
    DATA:FCAT TYPE slis_t_fieldcat_alv.
    DATA:LAYOUT TYPE slis_layout_alv.
    DATA:EVE TYPE slis_t_event WITH HEADER LINE.
    DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SORT-UP = 'X'.
    SORT-SPOS = 1.
    SORT-FIELDNAME = 'ERSDA'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    SORT-SPOS = 2.
    SORT-FIELDNAME = 'MTART'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    EVE-NAME = 'TOP_OF_PAGE'.
    EVE-FORM = 'TOPOFPAGE'.
    APPEND EVE.
    EVE-NAME = 'TOP_OF_LIST'.
    EVE-FORM = 'TOPOFLIST'.
    APPEND EVE.
    EVE-NAME = 'END_OF_LIST'.
    EVE-FORM = 'ENDOFLIST'.
    APPEND EVE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-no_hline = 'X'.
    LAYOUT-NO_VLINE = 'X'.
    LAYOUT-window_titlebar = 'MATERIAL DETAILS'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = SY-REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = FCAT
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    IT_SORT = SORT[]
    IT_EVENTS = EVE[]
    TABLES
    T_OUTTAB = ITAB .
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM TOPOFPAGE.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM TOPOFLIST.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS-LISTTOP'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM ENDOFLIST.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS-LISTEND'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    Regards,
    Priyanka.

  • How to use ranges?

    Hi all,
    can any body explain how to use ranges?  i used like below..
    but im not getting pls  correct it...
    RANGES : HKONT FOR BSEG-HKONT.
    DATA : WA_HKONT LIKE LINE OF HKONT.
    START-OF-SELECTION.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725140'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725120'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725110'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725190'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725130'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725160'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725180'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725150'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725170'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    and in select quer i have used like this.
    SELECT BUKRS
           BELNR
           GJAHR
           BUZEI
           HKONT
           LIFNR
           DMBTR
           KTOSL
           WERKS
           SEGMENT
           FROM BSEG INTO CORRESPONDING FIELDS OF TABLE IT_BSEG
           FOR ALL ENTRIES IN IT_BKPF
           WHERE BUKRS = IT_BKPF-BUKRS
           AND   BELNR = IT_BKPF-BELNR
           AND   GJAHR = IT_BKPF-GJAHR
           AND   LIFNR IN S_LIFNR
           AND   WERKS IN S_WERKS
           AND   HKONT IN HKONT
          AND    KTOSL = 'FR1'
           AND   SEGMENT IN S_SEGM.
    pls  help...

    Hi Sameer,
    Let me share my solution with you.
    try with this....
    RANGES : HKONT FOR BSEG-HKONT.
    INITIALIZATION.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725140'.
    APPEND  HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725120'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725110'.
    APPEND  HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725190'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725130'.
    APPEND  HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725160'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725180'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725150'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725170'.
    APPEND  HKONT.
    CLEAR HKONT.
    Hope this helps you. Reply for queries, shall post the updates.
    Regards. 
    Kumar.

  • How to declare variables in standard text  - so10 t.code

    Hello Friends,
             How to declare variables in standard text  - so10 t.code? Your response will be appreciated much.
    Thanks
    Sri

    For Script & Smartform  Text - &VAR&

  • How to declare value binding to array list element in a pojo?

    I have a POJO called P, that contains an ArrayList member called w.
    class P {
    private ArrayList w = new ArrayList(5);
    w is initied in the class constructor.
    The POJO is in the SessionBean and I would like to reference individual
    elements in the ArrayList via a value binding like so;
    #{SessionBean1.instanceOfP.w[5]}
    I'm not sure how to declare the getter/setter for member W in POJO P
    so that setter and getter injection work.

    You may not be able to directly set the indexed value.
    Try some thing like this.
    Add a property that returns the indexed value.
    Ex. if you ArrayList objets are of type "String"
    int index = 5;
    public String getMyValue(){
    return w.get[index]
    Now your value binding would look something like
    #{SessionBean1.myValue}
    BTW, if you want to access different index, create another method
    public void setIndex(int index){
    this.index = index;
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • How to declare Dynamic table in Tables Parameters of a Function Module...

    Hi Gurus,
    I would like to Know how to declare a Dynamic table in Tables parameters of a Function Module.
    so that it should be able to hold any table data ....
    I have tried all possible ways of trying to assign fields-symbol like declarations which doesnt allow here ...
    plz Dont reply with the basics of creating dynamic internal tables, coz my case is not an Internal table it is FM table parameter declaration.....

    Hi,
    If you are requirement is to create a function module with tables parameter having a generic line type i.e. no specific line type
    just declare it with a name under Parameter name with out specifying the type.
    A reference function module with such parameter, i would quote is the standard GUI_UPLOAD/ GUI_DOWNLOAD where the parameters specified under TABLES are generic.
    If you want to process the values passed to these parameters in the source code of function module, field symbols would be a preferable option.
    Regards,
    Sharath Panuganti

  • HR abap :  how to declare internal table to fetch data from 0585 infotype

    Hi all ,
    I am able to fetch the data from pa0585 infotype for set of employee no , but the problem is as the fields in pa0585 (like Contr to ULIP , NSC , Medical Treatment,Contribution to Certain Pension Funds so on ..) will be changed dynamically and will be displayed based on the amount value in descending order iam not able to store the values of the fileds into internal table . I dont understand how to declare the internal table ..Please help in if u have solved this kind of problem.
    I shld get the output in this way ...
    Emp No     Name    Medical treatment       Contr to ULIP             ....... so on
    101          abc           10000                        150000                      .......so on
    102          xyz           12000                        150000                      .......so on
    My header shld be fixed and I shld display values in this way .... I can use write statement to display directly .
    Thanks ....

    Hi
    Decalre INFOTYPE
    Goto SE37 - Find FM -
    READINFOTYPE*

  • How to declare internal table in BADI with variable name beginning with 0..

    Gurus,
    How to declare an internal table within a BADI. I have to implement a BADI UC_TASK_CUSTOM for BCS to BW load and there i have to  declare an internal table like:
    TYPES:          BEGIN OF t_cube_data,
                    0cs_version       TYPE /bi0/oics_version,
                    0sem_cgcomp       TYPE /bi0/oisem_cgcomp,
                    bcs_vers          TYPE /bic/oibcs_vers,
                    bcs_lcus          TYPE /bic/oibcs_lcus,
                    bcs_ldch          TYPE /bic/oibcs_ldch,
                    bcs_invcom       TYPE /bi0/oibcs_invcom,
                    bcs_litem         TYPE /bic/oibcs_litem,
                    bcs_llob          TYPE /bic/oibcs_llob,
                    bcs_lmay          TYPE /bic/oibcs_lmay,
                    0move_type        TYPE /bi0/oimove_type,
                    pcompany         TYPE /bi0/oipcompany,
                    bcs_lprg          TYPE /bic/oibcs_lprg,
                    figlxref3         TYPE /bic/oifiglxref3,
                    fiscyear         TYPE /bi0/oifiscyear,
                    fiscper3         TYPE /bi0/oifiscper3,
                    fiscvarnt        TYPE /bi0/oifiscvarnt,
                    curkey_gc        TYPE /bi0/oicurkey_gc,
                    unit             TYPE /bi0/oiunit,
                    cs_trn_gc        TYPE /bi0/oics_trn_gc,
                    cs_trn_qty       TYPE /bi0/oics_trn_qty,
              END OF t_cube_data
    But with this declaration it gives a error saying that u cannot have a variable beginning with 0...like 0cs_version....
    but i have to do it for my functionality to wrk...
    Please help me do it....
    how can i declare a internal table that allows me to have variable names that start with 0....
    Please help....Its URGENT....
    Thanks
    Sam

    Murali,
    I need to have 0 before the variable name in the declaration of the internal table....how can i attain that....
    Please suggest...
    Thanks
    Sam

  • How to declare in anonymous block

    Declare
    CURSOR c_je2acct_othr
    IS
    SELECT j.jemq_num, j.ml_retail_account,
    -- (CASE WHEN j.exer_type = 4 THEN j.sar_shares ELSE j.shares END) shares, -- removed * -1 from sar_shares Manu 12/02/04
    /* Commented 02/01/07*/
    (CASE WHEN j.exer_type = 4 THEN
    fn_get_shares(u.user_id,u.exer_num,u.soc_sec,j.
    sar_shares)
    ELSE (case when u.exer_type=2 and u.opts_exer!=u.shrs_sold and j.shares=u.shrs_sold then 0 else j.shares end)
    END) shares,
    -- removed * -1 from sar_shares Manu 12/02/04
    j.name_first,
    j.name_last, j.exer_type, j.ml_sec_num, j.ivr_plan_num,
    j.exer_dt, j.grant_dt, j.user_id, j.mlu_rowid, j.settle_dt,
    j.exer_num, j.plan_type, j.grant_num, j.acct_num_othr,
    j.add_cancel,
    /* (CASE WHEN j.exer_type = 4 THEN j.sar_cash_amount * -1 -- turned negative Manu 12/02/04 ml_retail distr
    commented the above line for calculation of proceeds into other account for sar sale.
    (CASE WHEN j.exer_type = 4 THEN
    Pk_Xop_Citibank_Forex.fn_get_netamount(u.user_id,u.
    exer_num,u.soc_sec,
    u.sar_cash_amount,NVL(u.comm_value, 0),
    NVL(u.tot_fee, 0),
    NVL(u.multi_curr_handling_fee, 0))
    -- Removed the negative as on ml_exer_upload all values are +ve.
    ELSE
    ( (DECODE(u.exer_type,0,u.opts_exer * u.mkt_prc,u.shrs_sold * u.mkt_prc
    - ( ROUND((u.opts_exer * NVL (u.opt_prc, 0)),2)
    -- SPIF 39060 Added a Round of condition.
    + DECODE (NVL (u.shrs_wthld_for_taxes, 'N'),
    'Y', 0,
    ROUND (u.tot_tax, 2)
    + u.tot_fee
    + NVL(u.multi_curr_handling_fee,0)
    + u.comm_value
    - u.backup_withholding
    END ) AS gl_amt,
    T.je_othr_mlacct_jemsg AS vc_trailer_desc,
    u.opts_exer ,
    u.shrs_sold,
    u.rsu_type
    FROM TB_XOP_JEMQ j, TB_ML_EXER_UPLOAD u, TB_FC_COMPY T
    WHERE j.q_flag = 'N' AND u.je_flag = 'Y'
    AND j.entry_dttime >= TRUNC (SYSDATE)
    AND j.entry_dttime < TRUNC (SYSDATE) +1
    AND j.source = 'X'
    AND j.acct_num_othr != ' '
    and (case when u.exer_type=2 and u.opts_exer!=u.shrs_sold then  (case when j.shares=u.shrs_sold then 0 else 1 end) else 1 end)=1 FIx for PCTUP00566081
    AND ( disp_flag <> 'D' OR disp_flag IS NULL ) Added by MARAN ARUNACHALAM on 01/25/2011 for PCTUP00493542 Fix
    and j.current_status = '2Q'  removed not required now in new plan
    AND NOT EXISTS (
    SELECT 1
    FROM TB_XOP_JEMQ j2
    WHERE j2.prev_jemq = j.jemq_num
    AND source = 'T'
    AND j.add_cancel = j2.add_cancel
    AND j.user_id = j2.user_id
    AND j.exer_num = j2.exer_num)
    AND j.mlu_rowid = u.ROWID
    AND 'CMS'||T.compy_acronym||'_USER' = j.user_id
    ORDER BY add_cancel DESC;
    v_mlac_mesg VARCHAR2(1000);
    -- JE_OTHR_MLACCT_JEMSG
    BEGIN
    dbms_output.put_line('success');
    FOR v_je2acct_othr IN c_je2acct_othr
    LOOP
    dbms_output.put_line('success1');
    BEGIN
    dbms_output.put_line('success2');
    IF v_je2acct_othr.add_cancel = 'C'
    THEN
    dbms_output.put_line('success3');
    UPDATE TB_XOP_JEMQ
    SET add_cancel = DECODE(current_status,
    'RJ',
    add_cancel,
    'C'),
    q_flag = DECODE(current_status, 'RJ', q_flag, 'N'),
    activ_dt = DECODE(current_status,
    'RJ',
    activ_dt,
    SYSDATE)
    WHERE prev_jemq = v_je2acct_othr.jemq_num
    AND user_id = v_je2acct_othr.user_id
    AND exer_num = v_je2acct_othr.exer_num
    AND source ='T';
    dbms_output.put_line('success4');
    ELSIF v_je2acct_othr.add_cancel = 'A'
    THEN
    dbms_output.put_line('success5');
    -- manipulating amount and shares to transfer when different exercise types
    v_je2acct_othr.gl_amt :=( CASE
    WHEN v_je2acct_othr.exer_type = 0 THEN 0
    WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer
    != v_je2acct_othr.shrs_sold
    THEN v_je2acct_othr.gl_amt
    WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer =
    v_je2acct_othr.shrs_sold
    THEN v_je2acct_othr.gl_amt
    ELSE v_je2acct_othr.gl_amt
    END );
    ---- Commented on 11/01/2006 For Fixing 30585
    /* v_je2acct_othr.shares :=( CASE
    WHEN v_je2acct_othr.exer_type = 0 THEN v_je2acct_othr.opts_exer
    WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer != v_je2acct_othr.shrs_sold
    THEN v_je2acct_othr.opts_exer - v_je2acct_othr.shrs_sold
    WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer = v_je2acct_othr.shrs_sold
    THEN 0
    ELSE v_je2acct_othr.shares
    END );*/
    ---- Commented on 11/01/2006 For Fixing 30585
    v_je2acct_othr.shares :=( CASE
    WHEN v_je2acct_othr.exer_type = 0 THEN v_je2acct_othr.
    Shares
    --- Replaced opts_exer with the Shares amount from the previous journal for fixing 30585
    WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer
    != v_je2acct_othr.shrs_sold and v_je2acct_othr.shares!=0 and v_je2acct_othr.plan_type <> 0 -- Added plantype condition for CQ:PCTUP00493542
    THEN v_je2acct_othr.Shares - v_je2acct_othr.shrs_sold
    --- Replaced opts_exer with the Shares amount from the previous journal for fixing 30585
    WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer =
    v_je2acct_othr.shrs_sold
    THEN 0
    ELSE v_je2acct_othr.shares
    END );
    dbms_output.put_line('success6');
    IF LENGTH(TRIM(v_je2acct_othr.acct_num_othr))=8 OR TRIM(v_je2acct_othr.acct_num_othr) IS NULL
    THEN
    v_mlac_mesg :=NULL;
    ELSE
    v_mlac_mesg :='Check the ml a/c length';
    dbms_output.put_line('success7');
    END IF;
    INSERT INTO TB_XOP_JEMQ
    (jemq_num,
    prev_jemq,
    ml_retail_account,
    wcma_shares,
    shares, wcma_taxes, tax_amt,
    wcma_reimburse,
    reimburse_amt,
    name_first,
    name_last, exer_type,
    ml_sec_num, wcma_bulking, bulking_amt,
    ivr_plan_num,
    exer_dt, grant_dt,
    user_id, source,
    mlu_rowid, settle_dt,
    exer_num, plan_type,
    grant_num,
    vc_trailer_desc, rsu_type
    VALUES (Pk_Xop_Get_Jemqnum.fn_xop_get_jemqnum,
    v_je2acct_othr.jemq_num,
    v_je2acct_othr.acct_num_othr,
    -- 2nd ml_retail_account,
    v_je2acct_othr.ml_retail_account,
    -- move shares from old acct to 2nd acct above
    v_je2acct_othr.shares,
    --this is SHARES
    --wcma_taxes
    0,
    --tax_amt,
    v_je2acct_othr.ml_retail_account,
    -- move gl_amt from old acct to 2nd acct above
    v_je2acct_othr.gl_amt * -1,
    v_je2acct_othr.name_first,
    v_je2acct_othr.name_last, v_je2acct_othr.
    exer_type,
    v_je2acct_othr.ml_sec_num, ' ',
    --wcma_bulking,
    0,
    --bulking_amt,
    v_je2acct_othr.ivr_plan_num,
    v_je2acct_othr.exer_dt, v_je2acct_othr.
    grant_dt,
    v_je2acct_othr.user_id, 'T',
    --source
    v_je2acct_othr.mlu_rowid, v_je2acct_othr.
    settle_dt,
    v_je2acct_othr.exer_num, v_je2acct_othr.
    plan_type,
    v_je2acct_othr.grant_num,
    v_je2acct_othr.vc_trailer_desc,
    v_je2acct_othr.
    rsu_type
    dbms_output.put_line('success8');
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    Pr_Xop_Log_Errors ( 'Code :'
    || NVL(v_mlac_mesg,SQLERRM)
    || ' at '
    || USER
    || 'at sub exec block in pop_je2acct_othr'
    END;
    dbms_output.put_line('success9'); -- end of begin within loop
    END LOOP;
    --COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    Pr_Xop_Log_Errors ( 'Code :'
    || NVL(v_mlac_mesg,SQLERRM)
    || ' at '
    || USER
    || 'at pk_xop_jemq.pop_je2acct_othr'
    dbms_output.put_line('success10');
    END;}
    {ORA-06550: line 10, column 31:
    PL/SQL: ORA-00904: "FN_GET_SHARES": invalid identifier
    ORA-06550: line 6, column 11:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 81, column 17:
    PLS-00364: loop index variable 'V_JE2ACCT_OTHR' use is invalid
    ORA-06550: line 81, column 14:
    PL/SQL: Statement ignored}
    HI friends, as i am getting two errors when running code in the anonymous block, then how to declare that 2 errors in declare section plz guide me}

    Noone, will read your code unless it is formatted like below. See the comments added
    DECLARE
      CURSOR c_je2acct_othr
      IS
        SELECT j.jemq_num,
          j.ml_retail_account,
          -- (CASE WHEN j.exer_type = 4 THEN j.sar_shares ELSE j.shares END) shares, -- removed * -1 from sar_shares Manu 12/02/04
          /* Commented 02/01/07*/
          CASE
            WHEN j.exer_type = 4
    --"The current user is not seeing the below function fn_get_shares.Privilege issue probably.
            THEN fn_get_shares(u.user_id,u.exer_num,u.soc_sec,j. sar_shares)
            ELSE (
              CASE
                WHEN u.exer_type=2
                AND u.opts_exer!=u.shrs_sold
                AND j.shares    =u.shrs_sold
                THEN 0
                ELSE j.shares
              END)
          END) shares,
          -- removed * -1 from sar_shares Manu 12/02/04
          j.name_first,
          j.name_last,
          j.exer_type,
          j.ml_sec_num,
          j.ivr_plan_num,
          j.exer_dt,
          j.grant_dt,
          j.user_id,
          j.mlu_rowid,
          j.settle_dt,
          j.exer_num,
          j.plan_type,
          j.grant_num,
          j.acct_num_othr,
          j.add_cancel,
          /* (CASE WHEN j.exer_type = 4 THEN j.sar_cash_amount * -1 -- turned negative Manu 12/02/04 ml_retail distr
          commented the above line for calculation of proceeds into other account for sar sale.
          CASE
            WHEN j.exer_type = 4
            THEN Pk_Xop_Citibank_Forex.fn_get_netamount(u.user_id,u. exer_num,u.soc_sec, u.sar_cash_amount,NVL(u.comm_value, 0), NVL(u.tot_fee, 0), NVL(u.multi_curr_handling_fee, 0))
              -- Removed the negative as on ml_exer_upload all values are +ve.
            ELSE ( (DECODE(u.exer_type,0,u.opts_exer * u.mkt_prc,u.shrs_sold * u.mkt_prc )) - ( ROUND((u.opts_exer * NVL (u.opt_prc, 0)),2)
              -- SPIF 39060 Added a Round of condition.
              + DECODE (NVL (u.shrs_wthld_for_taxes, 'N'), 'Y', 0, ROUND (u.tot_tax, 2) ) + u.tot_fee + NVL(u.multi_curr_handling_fee,0) + u.comm_value ) - u.backup_withholding )
          END )                  AS gl_amt,
          T.je_othr_mlacct_jemsg AS vc_trailer_desc,
          u.opts_exer ,
          u.shrs_sold,
          u.rsu_type
        FROM TB_XOP_JEMQ j,
          TB_ML_EXER_UPLOAD u,
          TB_FC_COMPY T
        WHERE j.q_flag       = 'N'
        AND u.je_flag        = 'Y'
        AND j.entry_dttime  >= TRUNC (SYSDATE)
        AND j.entry_dttime   < TRUNC (SYSDATE) +1
        AND j.source         = 'X'
        AND j.acct_num_othr != ' '
          --and (case when u.exer_type=2 and u.opts_exer!=u.shrs_sold then (case when j.shares=u.shrs_sold then 0 else 1 end) else 1 end)=1 -- FIx for PCTUP00566081
          --AND ( disp_flag <> 'D' OR disp_flag IS NULL ) -- Added by MARAN ARUNACHALAM on 01/25/2011 for PCTUP00493542 Fix
          --and j.current_status = '2Q' -- removed not required now in new plan
        AND NOT EXISTS
          (SELECT 1
          FROM TB_XOP_JEMQ j2
          WHERE j2.prev_jemq = j.jemq_num
          AND source         = 'T'
          AND j.add_cancel   = j2.add_cancel
          AND j.user_id      = j2.user_id
          AND j.exer_num     = j2.exer_num
      AND j.mlu_rowid = u.ROWID
      AND 'CMS'
        ||T.compy_acronym
        ||'_USER' = j.user_id
      ORDER BY add_cancel DESC;
      v_mlac_mesg VARCHAR2(1000);
      -- JE_OTHR_MLACCT_JEMSG
    BEGIN
      dbms_output.put_line('success');
      FOR v_je2acct_othr IN c_je2acct_othr
      LOOP
        dbms_output.put_line('success1');
        BEGIN
          dbms_output.put_line('success2');
          IF v_je2acct_othr.add_cancel = 'C' THEN
            dbms_output.put_line('success3');
            UPDATE TB_XOP_JEMQ
            SET add_cancel  = DECODE(current_status, 'RJ', add_cancel, 'C'),
              q_flag        = DECODE(current_status, 'RJ', q_flag, 'N'),
              activ_dt      = DECODE(current_status, 'RJ', activ_dt, SYSDATE)
            WHERE prev_jemq = v_je2acct_othr.jemq_num
            AND user_id     = v_je2acct_othr.user_id
            AND exer_num    = v_je2acct_othr.exer_num
            AND source      ='T';
            dbms_output.put_line('success4');
          ELSIF v_je2acct_othr.add_cancel = 'A' THEN
            dbms_output.put_line('success5');
            -- manipulating amount and shares to transfer when different exercise types
    --"You cannot assign values to the recor variable declared for a loop. Either define seperate variables or use explicit record variable"
            v_je2acct_othr.gl_amt :=
              CASE
              WHEN v_je2acct_othr.exer_type = 0 THEN
                0
              WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer != v_je2acct_othr.shrs_sold THEN
                v_je2acct_othr.gl_amt
              WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer = v_je2acct_othr.shrs_sold THEN
                v_je2acct_othr.gl_amt
              ELSE
                v_je2acct_othr.gl_amt
              END );
            ---- Commented on 11/01/2006 For Fixing 30585
            /* v_je2acct_othr.shares :=( CASE
            WHEN v_je2acct_othr.exer_type = 0 THEN v_je2acct_othr.opts_exer
            WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer != v_je2acct_othr.shrs_sold
            THEN v_je2acct_othr.opts_exer - v_je2acct_othr.shrs_sold
            WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer = v_je2acct_othr.shrs_sold
            THEN 0
            ELSE v_je2acct_othr.shares
            END );*/
            ---- Commented on 11/01/2006 For Fixing 30585
            v_je2acct_othr.shares :=
              CASE
              WHEN v_je2acct_othr.exer_type = 0 THEN
                v_je2acct_othr. Shares
                --- Replaced opts_exer with the Shares amount from the previous journal for fixing 30585
              WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer != v_je2acct_othr.shrs_sold AND v_je2acct_othr.shares!=0 AND v_je2acct_othr.plan_type 0 -- Added plantype condition for CQ:PCTUP00493542
                THEN
                v_je2acct_othr.Shares - v_je2acct_othr.shrs_sold
                --- Replaced opts_exer with the Shares amount from the previous journal for fixing 30585
              WHEN v_je2acct_othr.exer_type = 2 AND v_je2acct_othr.opts_exer = v_je2acct_othr.shrs_sold THEN
                0
              ELSE
                v_je2acct_othr.shares
              END );
            dbms_output.put_line('success6');
            IF LENGTH(TRIM(v_je2acct_othr.acct_num_othr))=8 OR TRIM(v_je2acct_othr.acct_num_othr) IS NULL THEN
              v_mlac_mesg                               :=NULL;
            ELSE
              v_mlac_mesg :='Check the ml a/c length';
              dbms_output.put_line('success7');
            END IF;
            INSERT
            INTO TB_XOP_JEMQ
                jemq_num,
                prev_jemq,
                ml_retail_account,
                wcma_shares,
                shares,
                wcma_taxes,
                tax_amt,
                wcma_reimburse,
                reimburse_amt,
                name_first,
                name_last,
                exer_type,
                ml_sec_num,
                wcma_bulking,
                bulking_amt,
                ivr_plan_num,
                exer_dt,
                grant_dt,
                user_id,
                source,
                mlu_rowid,
                settle_dt,
                exer_num,
                plan_type,
                grant_num,
                vc_trailer_desc,
                rsu_type
              VALUES
                Pk_Xop_Get_Jemqnum.fn_xop_get_jemqnum,
                v_je2acct_othr.jemq_num,
                v_je2acct_othr.acct_num_othr,
                -- 2nd ml_retail_account,
                v_je2acct_othr.ml_retail_account,
                -- move shares from old acct to 2nd acct above
                v_je2acct_othr.shares,
                --this is SHARES
                --wcma_taxes
                0,
                --tax_amt,
                v_je2acct_othr.ml_retail_account,
                -- move gl_amt from old acct to 2nd acct above
                v_je2acct_othr.gl_amt * -1,
                v_je2acct_othr.name_first,
                v_je2acct_othr.name_last,
                v_je2acct_othr. exer_type,
                v_je2acct_othr.ml_sec_num,
                --wcma_bulking,
                0,
                --bulking_amt,
                v_je2acct_othr.ivr_plan_num,
                v_je2acct_othr.exer_dt,
                v_je2acct_othr. grant_dt,
                v_je2acct_othr.user_id,
                'T',
                --source
                v_je2acct_othr.mlu_rowid,
                v_je2acct_othr. settle_dt,
                v_je2acct_othr.exer_num,
                v_je2acct_othr. plan_type,
                v_je2acct_othr.grant_num,
                v_je2acct_othr.vc_trailer_desc,
                v_je2acct_othr. rsu_type
            dbms_output.put_line('success8');
          END IF;
        EXCEPTION
        WHEN OTHERS THEN
          Pr_Xop_Log_Errors ( 'Code :' || NVL(v_mlac_mesg,SQLERRM) || ' at ' || USER || 'at sub exec block in pop_je2acct_othr' );
        END;
        dbms_output.put_line('success9'); -- end of begin within loop
      END LOOP;
      --COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
      Pr_Xop_Log_Errors ( 'Code :' || NVL(v_mlac_mesg,SQLERRM) || ' at ' || USER || 'at pk_xop_jemq.pop_je2acct_othr' );
      dbms_output.put_line('success10');
    END;
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 

  • How to declare a dynamic array in java

    I have to use a dynmic array of boolean and the size of this array will defiend throuh the run of the program to explian
    boolean[][] a;
    a=new boolean[number_of_ raw][number_of_ culm];
    after the program run the number_of_ raw and number_of_ culm will defind..so if any body know how to declare this kind of arraies in java please help me.

    My previous post gives me an idea on how to use ArrayList of ArrayList as dynamic 2 dimensional array.
    More info bellow
    ArrayList rows = new ArrayList()
    ArrayList columns_of_row0 = new ArrayList()
    rows.insertAt(0) = columns_of_row0;
    ArrayList columns_of_row1 = new ArrayList()
    rows.insertAt(1) = columns_of_row1;and so on..
    You can't use the code exactly or similar way, it would depend on how this array grows in your application.
    But this and my previous post should give an idea on how to insert and retrieve elements from ArrayList when
    treated as 2 dimensional array.
    Hope this helps.

  • How to Declare Arrays in bpel and use them as acollection

    Hi,
    I Am new to Bpel, I had created an empty Bpel Process and configured file adapter to a directory, In my text file i have 3 records with four columns, each column seperated by ',' and each record seperated by "EOL(end of line)", Below is the xsd file generated by the native format xsd builder, taken a recieve activity to recieve the contents of file from file adapter.
    So all the data which is in the file will be there in recieve activity.
    FileContents
    55555,rgfdgsd,gfdgfdg,23
    66666,retretret,trtertg,21
    77777,rtrttreter,trtter,23
    My Question is
    I want to compare whether value of C1 = '55555' and if the value is equal to 55555 then that record with c1=55555 has to be inserted into database by using Arrays
    How to compare the value of c1 through bpel functions.
    with java i have to use the logic similar to this by using Xpath
    getElement by tagname(c1);- it will give all the elements with tagname c1, three records are there with tagname c1 (c1=55555,c1=66666,c1=77777), we have to iterate through the elemnts and check whether the value iof c1='55555' and get the whole parent block which contains values of c1,c2,c3,c4 and insert that to database
    What variables we have to use to get the Similar logic in bpel
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/FileAdapter"
    xmlns:tns="http://TargetNamespace.com/FileAdapter"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="Associates">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Associate" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C1" type="xsd:double" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="C2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="C3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="C4" type="xsd:double" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    I want to do it by using Arrays,
    Please post the step by step procedure like
    How to declare an Array?
    How to iterate the results in recieve acticity of file adapter and put them to array?
    How to compare the values in array with our desired value?
    Please Look into this and suggest me the solution.
    Regards

    I think it is a good option to use transformations. Do you have any critical reason why you want to do this using array?
    Little explanation below for your questions.
    As per my understanding from variable is the recieve activity variable and to variable is the Array variable is it right?
    Yes. Here I was try to build my array from the different source system data. This will append data to the array variable.
    How can we declare an array variable in bpel(to variable) with name as Variable_Array, part as payload and query as ArrayList?
    *Any element that can hold another element can be a array.
    For example if element A is declared as sequence of element B type, then A acts as a array for B*
    Could you please explain this also, what is from variable? and what is to variable?
    +<assign name="Assign_XPath_For_Array">+
    +<copy><from expression="concat('/ns1:ArrayList/ns2:ArrayElem') "/><to variable="Variable_Xpath"/></copy>+
    +</assign>+
    what is the type of to variable "Variable_Xpath"(String or int etc)?
    This creates a dynamic Xpath and store in some variable here. Here the variable is called Variable_Xpath which is a string
    similarly what is the type of to variable?
    +<assign name="Assign_Read_Array">+
    +<copy>+
    +<from expression="bpws:getVariableData('Variable_Array','payload',bpws:getVariableData('Variable_Xpath'))"/>+
    +<to variable="Variable_Read_Array_Element" query="/ns1: ABC"/>+
    +</copy>+
    +</assign>+
    To variable type is the variable that I read from the Array.
    *For example if A is the array holding B, then the to variable is B and from is doing A[counter]*
    Every Little Helps
    Kalidass Mookkaiah
    http://oraclebpelindepth.blogspot.com/

  • How to declare ftp in File class. I want to display filename of file in FTP

    How to declare ftp in File class. I want to display filename of file in FTP server.
    I try
    File f2= new File("ftp://abc:abc1111@ABC/file");
                   String n[] = f2.list();
                   System.out.print(n[0]);
                   Vector filename = null ;
                   for (int i2 = 0; i2 < n.length; i2++) {
                        filename.add(n[i2]);
    but it is not work
    Thank you.

    You can use Jakarta's net-package to connect to a FTP server.
    Download it here:
    http://jakarta.apache.org/site/downloads/downloads_commons-net.cgi
    Here's a small demo:
    import org.apache.commons.net.ftp.*;
    public class FTPTest {
        private boolean isConnected;
        private FTPClient client;
        public FTPTest() {
            isConnected = false;
            connect();
        private void connect() {
            String server = "server.org";
            String username = "user";
            String password = "password";
            client = new FTPClient();
            try {
                client.connect(server);
                client.login(username, password);
                String[] files = client.listNames();
                for(int i = 0; i < files.length; i++) {
                    System.out.println(files);
    isConnected = true;
    disconnect();
    catch(Exception e) {
    e.printStackTrace();
    private void disconnect() {
    if(isConnected) {
    try {
    client.disconnect();
    isConnected = false;
    catch(Exception e) {
    e.printStackTrace();
    public static void main(String[] args) {
    new FTPTest();

Maybe you are looking for