HOW CAN I PASS A DEFAULT VALUE IN INTERNAL TABLE

HOW CAN I PASS A DEFAULT VALUE IN INTERNAL TABLE.
DATA : BEGIN OF ITAB OCCURS 0,
           FIELD1(2) TYPC C DEFAULT   '12',
           FIELD2     TYPE C ,
           END OF ITAB1.
IT'S GIVING ERROR MESSAGE.
PLZ LOOK INTO THIS AND GIVE ME CORRECT SOLUTION.
THANKS
SURI

DATA : BEGIN OF ITAB OCCURS 0,
FIELD1(2) TYPC C,
FIELD2 TYPE C ,
END OF ITAB1.
itab-field1 = '12'.
itab-field2 = 'A'.
append itab.
clear itab-field2.
itab-field1 = '12'.
itab-field2 = 'B'.
append itab.
clear itab-field2.
Now everytime u'll have the value for field1 = '12'.
Regards
Vasu

Similar Messages

  • How can i pass the Input value to the sql file in the korn shell ??

    Hi,
    How can i pass the Input value to the sql file in the korn shell ??
    I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
    can any one help me out.
    Raja

    Can you please more elaberate., perhaps you should more elaberate.
    sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
    so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense.

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How can i pass function return values in to varray

    Hi
    create procedure name(parameters list)
    here ---i am calling a function
    varname := function name
    returns 4 values
    My doudt is how can i pass these return values in to varray..
    Type varray vname[5] date type
    Begin
    statements
    end prodedure name;
    pls clarify me its urgent

    This may give u a start
    sql>
    create or replace package test_array_pack as
    type ar1 is varray(10) of number;
    end;
    Package created.
    sql>
    create or replace function test_array return test_array_pack.ar1 is
      v_ar1 test_array_pack.ar1;
    begin
    v_ar1 := test_array_pack.ar1(1,2,3,4);
    return v_ar1;
    end;
    Function created.
    sql>
    declare
    v_ar2 test_array_pack.ar1;
    begin
    v_ar2 := test_array;
    end;
    PL/SQL procedure successfully completed
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can we pass the entire rows of a table to a web service in a VC model ?

    Hi,
    On the click of the submit button, I have to pass the rows of two tables into an enterprise service. This service also takes other fields of a form as an input.
    How can we pass the entire rows of a table into a service ?
    Regards,
    Nitin

    Hi Nitin,
    It seems that you have two or three different structures to pass data using your webservice. In your main question, two tables, you can join both in one table and from there call the webservice. In order to pass the entire table you need:
    1. Draw a line between your joinned table and your service,
    2. Map the fields,
    3. Create a 'SUBMIT' in your table tool bar. Right click on your table and choose 'Create Toobar', '+', name and choose 'Submit' as your event.
    4. Go to Configure Element (Table View) 'Multiple' at Selection Mode.
    Reward points if helps you to solve your question.
    Regards,
    Gilson Teixeira

  • How can i pass a variable instead of a table name in the Select statement.

    Dear all
    how can i pass a variable instead of a table name in a select statement ?
    Example :-
    Begin
    P_get_procedure_tname (aap_name,otable_name);--It will take an application name and will return a table name
    Select col1 into ocol1
    from  ---- here i want to pass the variable OTABLE_NAME
    End;How can i pass this ?

    Hi,
    You can use dynamic sql.
    EXECUTE IMMEDIATE 'SELECT COL1 INTO ' || OCOL1 || ' FROM " || OTABLE_NAME;
    {code}
    cheers
    VT                                                                                                                                                                                                                                                                                                   

  • How can I get Number of Lines from internal table?

    Hello at all,
    i have in my Report a internal Table, which have many KUNNR.
    For example the internal Table:
    MANDT.......KUNNR......NAME.........FIRSTNAME........CITY
    ...040..........12345.........Owen............Michael........Liverpool
    ...040..........12345.........Owen............Michael........Liverpool
    ...040..........99999.......Johnson.......... Jeffrey........London
    ...040..........12345.........Owen............Michael........Liverpool
    ...040..........55555.......Hardley.......... Kingston.......Birmingham
    I want to know, how many same KUNNR are existing in the internal Table?
    In my example i need the result 3, because their is existing 3 times the Kunnr 12345 in the internal Table.
    Have anyone an idea, how can I resolve this problem?
    Edited by: Thomas Zloch on Jun 21, 2010 2:55 PM - one question mark at a time is sufficient

    Hi,
    1.Create two internal tables of same type and sort according to Kunnr then Delete the
    adjusent duplicates by comparing KUNNR
    2.Sort the table by KUNNR and use ON change of Concept in that Just increment the counter.
    I am writing the sample logic here.
    tables kna1.
    data: t_kna1 type table of kna1,
             w_kunnr type kna1-kunnr,
             counter type i," Holds No.of KUNNRs in the T_kna1
             t_kna2 type table of kna1.
    select * from kna1 into table kna1 up to 100 rows.
    t_kna2[] = t_kna1[].
    delete t_kna2 by kunnr.
    delete adjusent duplicates from t_kna2 by comparing kunnr."1st Method
    read table t_kna2 transporting no-fields.
    counter = sy-tfill."1st Method
    loop at t_kna1 into kna1."2nd Method
    at first.
    w_kunnr = kna1-kunnr .
    counter = 1.
    endat.
    if w_kunnr ne kna1-kunnr.
    counter = counter + 1.
    endif.
    endloop.
    Note : Here I used a sample table KNA1 in this there are no Duplicates of KUNNR .

  • How can i pass the one value for two bind parameters

    hi All,
    i have a search Query
    select Distinct CONSOLIDATION_SUMMARY_ID,CREATION_DATE,CREATED_BY,BATCH_ID,PROCESS_FLAG,ERROR_MESSAGE,CUSTOMER_ID,BILLING_FREQUENCY
    ,CONSOLIDATION_LEVEL,SOLD_TO_ORG_ID ,SHIP_TO_ORG_ID ,TRANSACTIONAL_CURR_CODE ,INVOICE_TO_ORG_ID ,PRICE_LIST_ID
    ,ORIG_SYS_DOCUMENT_REF,INVENTORY_ITEM_ID ,ORGANIZATION_ID ,ORDERED_ITEM ,ORDERED_QUANTITY ,UNIT_LIST_PRICE
    ,UNIT_SEELING_PRICE,ORDER_QUANTITY_UOM,ORDER_NUMBER ,ORDER_DATE ,INVOICE_NUMBER ,INVOICE_DATE
    ,FEE_CALCULATION_WORKSHEET_PDF ,TRADE_DETAILS_PDF ,INVOICE_REPORT_PDF ,PRICING_ATTRIBUTE_CONTEXT
    ,PRICING_ATTRIBUTE ,PRICING_ATTR_VALUE_FROM
    from xxcurrnx.xxcur_trade_consol_summary XXSTR
    WHERE XXSTR.BATCH_ID=NVL(:1,XXSTR.BATCH_ID)
    and XXSTR.CUSTOMER_ID=nvl(:2,XXSTR.CUSTOMER_ID)
    But i need to pass only one value to this query: throw the below code
    public void passTocusttrxn(String vcustid)
    System.out.println("The customer id in trxn vo:"+vcustid);
    XxcurtradeconsummaryVOImpl vOrdnumb=getXxcurtradeconsummaryVO1();
    vOrdnumb.setWhereClauseParam(0,vcustid);
    vOrdnumb.setWhereClauseParam(1,null);
    vOrdnumb.executeQuery();
    System.out.println("The executed query After is :"+vOrdnumb.getQuery());
    But it throws the below exception.
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could you please tell me how can i achieve this.
    Thanks,

    hi Meher,
    i need to pass this value throug the Spell Parameter.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    XxcustdtlsmainAMImpl am=(XxcustdtlsmainAMImpl)pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("PCustID")!=null) // PCustID is the Spell parameter here
    if(pageContext.getParameter("PbtchID")!=null)
    if(pageContext.getParameter("PordNum")!=null)
    String vcustID=pageContext.getParameter("PCustID");
    String vOrdNum=pageContext.getParameter("PordNum");
    System.out.println("The cust id in PR:"+vcustID);
    System.out.println("The cust id in PR:"+vOrdNum);
    am.passTocustlinetrxn(vcustID);
    how this vcustID value will passed to the search Code.
    if(pageContext.getParameter("BatchID")!=null && !pageContext.getParameter("BatchID").equals(""))
    String BchID=pageContext.getParameter("BatchID");
    int vInBtchID=Integer.parseInt(BchID);
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(0,vInBtchID);
    System.out.println("The Batch ID is :"+vInBtchID);
    f=1;
    }else
    srchVO.setWhereClauseParam(0,null);
    if(pageContext.getParameter("CustmeCode")!=null && !pageContext.getParameter("CustmeCode").equals(""))
    System.out.println("i am im customer code ");
    String vCustID=pageContext.getParameter("CustmeCode");
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(1,vCustID);
    System.out.println("The customer code is "+vCustID);
    f=1;
    }else
    srchVO.setWhereClauseParam(1,null);
    if(f==1)
    srchVO.executeQuery();
    Regards,

  • How can I change the default value of a command ?

    I want to be able to change the default value of a comand when the vi
    is running. (I know how to do that with a right click when the vi is
    not running).
    In fact I would like the user of the vi to be able to choose a new default value for a command.
    How can I do that ?

    You can't do this on a running VI. If you have an idle VI, you can open a reference to that VI and use an invoke node with the Make Current Values Default method, but that will only work in LV (i.e. not in an EXE) and will affect all the controls. What you can do is save the values to a file and load them when the program starts. OpenG's File I/O package includes some VIs which will help you with that.
    Try to take over the world!

  • How can I change the default value in IT0009?

    Right now in our system when we create a new IT0009 entry, several fields are defaulted such as the payee name, bank country, and currency (field WAERS). But in table T588Z I can not find anything defined for IT0009. Now even I create entries in T588Z ex. as 
    0009              WAERS     06     10     W     P0009-WAERS='USDN'
    the currency still shows up as 'USD' when I create a new record. Can anyone tell me where the field 'WAERS' is defaulted as 'USD' and how can I control this?
    Thank you very much.
    Best regards,
    Johnson

    Hi Johnson,
    Correct me if I am wrong,You need to default a value, so i guees you would need to use the feature P0009 not the dynamic action. If you could let meknow the current structure of the p0009 feature, may b i could help you figure the could-be structure of the p0009 to default the required value.

  • How can I pass a variable  value from first jsp page to thired jsp page

    In my program ,threr are three jsp pages . I want the first pages's variable value in to thired page .How can I acess.
    I used the request.getparameter() ,but when I print the value , null value is getting .

    request parameters only last for one request.
    To save them longer than that you need to save them somewhere.
    Couple of alternatives
    1 - store them to session
    session.setAttribute("username", request.getParameter("username");
    2 - create a hidden field on page 2 and store the value from page 1 there. When you submit page2, you can get it on page3 with request.getParameter again.
    <input type="hidden" name="username" value="<%= request.getParameter("username") %>">

  • How can I get a default value to show the name instead of the ID.

    I have a field with with a LOV that works great! It displays first & last name and returns the ID to the field.
    The problem is the users want the first & last name to automatically default in the field without selecting from the LOV. However, I still need to store(return) the ID.
    Also are application users username and passwords case sensitive?

    Angie, Can you provide some more details.
    This is a popup LOV correct? So the field in question is the source database column or is it static or what is it currently?
    I am not sure if I understand your business rule of "automatically default in the field without selecting from the LOV" if that is the case why select from the LOV.
    None the less try this.. Here is what I am assuming you would like: a value is set on a previous page or throughout yoru application when you arrive on page X a LOV is there that could have it's value derived from an item on a previous page.
    So your LOV query should be like this
    select a,b from your_table where foo = 'abc' OR :ITEM_VALUE_OF_LOV
    make sure you add the "or clause" on your query otherwise the LOV will display the numerical value in the LOV and not the display value
    If your LOV source column is a database value and you want to override it in essenece with your default value you can do something like this:
    set a pl/sql process on load to:
    select value into :P_ITEM_VALUE_OF_LOV from table;
    or you could set your source used as "only when null" and set a default value within the element as well..

  • How can i implement the default value for this variable?

    In one of our Stored procs,we have a variable RECS_TO_DELETE, which determines the number of records to delete from various DELETEs that happen within this proc.
    The value for RECS_TO_DELETE variable should be obtained from a configuration table sys_config
    select
    rec_num into RECS_TO_DELETE
    from sys_config
    where
    sys_code=55;
    But if something goes wrong with sys_config table or the above SELECT INTO, our client wants to makes sure that RECS_TO_DELETE should have a default value of 1000.
    In the code, how will i implement having this default value of 1000 for RECS_TO_DELETE variable  in case the above SELECT INTO fails for some reason.

    Hi,
    You have to assign a value before the execution...
    DECLARE
        RECS_TO_DELETE NUMBER(9) := 1000;
    BEGIN
        SELECT rec_num
        INTO   RECS_TO_DELETE
        FROM   sys_config
        WHERE  sys_code = 55;
        DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
           DBMS_OUTPUT.put_line(RECS_TO_DELETE);
    END;
    /Regards,

  • How can we change Prompt  default values based on other prompts....

    Hi Experts,
    I have a prompt Status --> DAILY,WEEKLY and MONTHLY.
    If user selects any one of this value the default value in another prompt Startdate and Enddateshould change,Here Startdate and Enddate is Editbox/calander control.
    Declared the presentation variable in first prompt and in the second prompt of SQL Results(Default to) i am writing
    +SELECT CASE WHEN '@{Pres}='WEEKLY' THEN VALUEOF(VAR_WEEKLY) END+
    but in the default one it was not showing the Repository variable value...
    Please suggest me any solution its an urgent
    thanks,
    saichand.v

    Hi Saichand,
    Are you getting an error ("Error Generating Drop Down Values")? Or are you just seeing a blank default value?
    If you are getting an error, do you have any presentation columns in your default SQL formula? If not, that's your problem. OBIEE won't let you construct a logical SQL query without having a presentation column in it somewhere.
    If this is your issue, try the following: SELECT CASE WHEN 1=0 THEN <PRESENTATION_COLUMN> WHEN '@{Pres}'='WEEKLY' THEN VALUEOF(VAR_WEEKLY) END FROM <SUBJECT_AREA>
    Be sure to replace SUBJECT_AREA and PRESENTATION_COLUMN with appropriate names. The condition 1=0 will never evaluate to true, so it's as if it's not there, but OBIEE will see that there's a presentation column in the formula and stop giving you the error.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • How to Add column with default value in compress table.

    Hi ,
    while trying to add column to compressed table with default value i am getting error.
    Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
    Can anyone help me in this .
    Thanks.

    Aman wrote:
    while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
    "+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
    Nicolas.

Maybe you are looking for

  • How long does it takes that GPS in MAP 3.1 will wo...

    Question to NOKIA: HOW LONG TIME YOU NEED TO MAKE GPS TO WORK WITH OVI MAP 3.1 in N97? On all N97 I know and as you can read here in forum the GPS doesn't work usable in N97 and with MAP 3.1. I believe that this is a software problem because often I

  • HT204267 Macbook Pro Mid 2011 Wont Boot

    I have a macbook pro mid 2011 but wont boot. THe charging light and the power light in front come on but it does not make the start up noise nor anything like.

  • Bea weblogic can't see index.jsp?

    For some weird reason bea weblogic has started to act strange... it doesn't automatically go into 'index.jsp' when i access /MyWebapplication/someotherdir/index.jsp I've tried index.html too but i just get a 404?? i verified the same web project on t

  • Avoid substitute material.., while creating sales order with BAPI?

    Hi experts. I use BAPI_SALESDOCU_CREATEFROMDATA1 function module to create a sales order. Material A has a substitute material B with substitute reason 0005. So if I use material A when creating sales order with above BAPI function, the order is crea

  • Very weak WLAN signal on Satellite Pro L10

    Hi, I have a Sat Pro L10 that came without a mini pci wireless card so I bought and installed one and fitted internal antenna behind the screen. When I am in the same room as the router I have a brilliant connection but as soon as I leave the room I