Retrieve values where multiple types exist.

I have an Order Table and an order distribution
I will have one order yet could have could have multiple distributions against an order.
I am want to be able to select only Orders  have only the one Distribution Type .
 Example - I could have an X distribution  or S distribution or both
If I have and S and an X I do not want to include the order
If I have an S only I do want to include the order.

Are you looking for something like below:
DECLARE @Orders TABLE (OrderID INT, OrderDate DATE)
INSERT INTO @Orders
SELECT 1, '01/01/2014' UNION ALL
SELECT 2, '01/01/2015'
DECLARE @OrderDistribution TABLE(OrderID INT, DistributionType CHAR(1))
INSERT INTO @OrderDistribution
SELECT 1, 'S' UNION ALL
SELECT 2, 'S' UNION ALL
SELECT 2, 'X'
SELECT *
FROM
@OrderDistribution As MainQry
INNER Join @Orders O On MainQry.OrderID = O.OrderID
WHERE
EXISTS (SELECT 1 FROM @OrderDistribution AS SubQry Where SubQry.OrderID = MainQry.OrderID Group By SubQry.OrderID Having Count(*) = 1)
Output
OrderID | DistributionType | OrderID | OrderDate
1 | S | 1 | 2014-01-01
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

Similar Messages

  • SCD - source sets where multiple changes exist for the same natural key

    I am using the Oracle SCD type2 method (end date old record and insert the new record) which was working fine until my source set contained multiple changes for the same natural key. Does anyone know of a way to handle this?
    Thanks

    Hello,
    I think, the way of handling multiply changes of NK is totally depend on business requirements for your project.
    There could be number of approaches for this. For example:
    - all changes but the last are considered active during one day, going subsequently right after previously existed SCD record;
    - all changes but the last are considered “active” depending on its occurrence within “fact” data (as far as you consider NK change based on some attribute set - probably some of attributes show themselves within “fact” data)
    - etc.
    So, make an agreement upon this with your customer – and ETL design decision will follow immediately.
    Sergey

  • Retrieve Title field values from multiple lists and add into another list

    Hi , Iam trying to retrieve Title field value from multiple lists. and add them into another list. using Javascript. Can any one help me in doing this. Below is the code.. function save() { clientContext = new SP.ClientContext.get_current(); oWebsite = clientContext.get_web(); oList = clientContext.get_web().get_lists().getByTitle('MainList'); clientContext.load(oList); clientContext.executeQueryAsync(OnSucceeded, onQueryFailed); } function GetListItemValue(listName, fieldName) { var list = oWebsite.get_lists().getByTitle(listName); var eventValue = document.getElementById(fieldName).value; eventValue = eventValue.replace(",", ""); var camlQuery = new SP.CamlQuery(); var filterdata = '<view><query><where><eq><fieldref name="Title/"><value type="Text">' + myreqValue.trim() + '</value></fieldref></eq></where></query></view>'; camlQuery.set_viewXml(filterdata); listItems = list.getItems(camlQuery); clientContext.load(list); clientContext.load(listItems, 'Include(Id)'); clientContext.executeQueryAsync(Succeeded,Failed); } function OnSucceeded() { itemCreateInfo = new SP.ListItemCreationInformation(); oListItem = oList.addItem(itemCreateInfo); oListItem.set_item('Title', 'My New Title'); var deptItemLookupField = new SP.FieldLookupValue(); //Problem in below line...I was unable to get ID var getId = GetListItemValue("Listname1", "txtboxname1"); alert("ID" + getId); if (getId != undefined) { deptItemLookupField.set_lookupId(getId); } var getId12 = GetListItemValue("Listname12", "txtboxname12"); alert("ID" + getId12); if (getId12 != undefined) { deptItemLookupField.set_lookupId(getId12); } oListItem.update(); clientContext.executeQueryAsync(itemadded, itemFailed); } function itemadded() { alert('Item added successfully'); } function itemFailed(sender, args) { alert('Item added itemFailed' + args.get_message() + '\n' + args.get_stackTrace()); }
    Raj

    Hi,
    For this requirement, you will need to retrieve all the lists objects you want firstly, then execute the requests one by one to get the value of the Title column using CAML or
    LINQ.
    How to: Retrieve Lists Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185009(v=office.14).aspx
    About
    retrieve list items:
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    You can use
    Promise in your script to make your requests sequentially:
    http://www.shillier.com/archive/2013/03/04/using-promises-with-the-javascript-client-object-model-in-sharepoint-2013.aspx
    http://www.learningsharepoint.com/2013/08/13/using-deferred-and-promise-to-handle-async-calls-in-sharepoint-client-object-model/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Retrieve all values from project type when project type combo box is null

    Hi,
    We are facing a tight situation here. We have a scenario where we have 2 filter options.
    1) Department ID
    2) Project type
    When department ID is selected all the department IDs should be populated in the combo box and the project type combo box should be empty.
    Similarly, when project type is selected all the project types should be populated in the combo box and the department ID combo box should be empty.
    Then, when more than one value is selected from department ID box and all the values from project type must be retrieved from query level (as per business logic).
    How do we do this? Kindly help us with this situation.

    Basically my situation slightly different.
    I am trying to do a bulk insert on SQL Server table using prepared statement, during that time i am getting the exception. I am using JDBC-ODBC driver. However, if i do individual record insertion, it is working.
    Any idea about this type of problem ?
    Regards
    Ramesh

  • Can you calculate multiple text boxes to achieve a total value?  If so how is that done?  I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.

    Can you calculate multiple text boxes to achieve a total value?  If so how is that done?  I am trying to create a order form where multiple items can be purchased but i would like the values of each item to calculate so I can achieve a total value.

    Hi sashby51,
    I've moved your discussion to the PDF Forms forum--the folks who visit this forum regularly should be able to point you in the right direction.
    Best,
    Sara

  • Impact of Addition of New Value Fields in the existing Op. Concern-COPA

    Hi All,
    Want to know the steps of adding new value fields in the existing operating concern in COPA?
    What is the overall impact of addition of New Value fields in the running Operating Concern?
    How do we test the addition of new value fields?
    Is the addition of New Value fields to the running Operating Concern advisable?
    Your support and advice is highly anticipated and appreciated.
    Thanks & Regards
    9819528669
    Ohter details are as follows...
    VALUE FIELDS : Defines the Structure of your Costs & Revenues. (Op. Concern 120 Value Fields) 
    1)     The client requires three new value fields to be created. Value fields for :
    -     Other Airport Charges - International
    -     Cargo Commission Cost
    -     Personal Cost (Direct)
    2)     What are the Steps involved in creation of new value fields? The steps are :
    1)     Before creating new value field we need to check whether we can use already existing UNUSED value fields (There are 62 value fields created for the op concern 1000, in production the value fields TBUL1-L7 i.e. to be used (I assume) screen shot1 provided. My predecessor has used value field VV291, VV292, VV380 original description being TBUL3, TBUL4, and TBUL1. I believe he has changed the description in development client and created a transport request ref screen shot 2)
    2)     You can create new value field thru T-Code KEA6 (4-5 characters beginning with VV) u2013 My predecessor has reused the value fields originally created he has not created new one I believe. please provide give your comments)
    3)     Specify whether this field is for Currency or Quantity (currency defined in attribute of op concern and quantity defined by its own field u2013 unit of measure) u2013 My predecessor has configured the three value fields as Currency.
    4)     Describe how the values in this field are aggregated over characteristics. (SUM, LAS, AVG) u2013 My predecessor has aggregated all the three value fields as SUM and they are in Active status.
    5)     After the value field is created you have to add the value field (active status only) to the operating concern by Editing the Data Structure. (I guess this is done in the next step)
    6)     Assign newly created Value fields to the Operating Concern u2013 T-Code KEA0 (In development client the value fields are assigned to the op concern 1000 refer screen shot 3. In the production client also those three value fields exist (does it mean they are assigned? your comments please.) As they have the original description TBUL3, TBUL4, and TBUL1 refer screen shot 4.
    7)     After the Data Structure is defined you need to activate them. (creates plan vs actual database) u2013 Go to the data structure tab and Choose Activate. The status in dev client is Active with correct description but in the production client it is Active with the OLD description. After addition of the value field you need to regenerate the operating concern. T-Code KEA0 u2013 right?
    8)     Condition Types are assigned to Value Fields? Donu2019t know u2013 T-Code KE45 (I think this is NOT required in our case u2013 Please give your comments)
    9)     Define and Assign Valuation Strategy u2013 Cost assigned to Value fields u2013 T-Code KE4U (I think this is also NOT required in our case)
    10)     Define PA Transfer Structure for Settlement u2013 T-Code KEI1 (This step is crucial u2013 I think I have to to include newly created value fields, but am not aware how to do it and what is the connectivity or what happens after this is done)
    Note: My predecessor has created a Transport Request No# KEDK902167 for the value fields created by him.
    3)     Whether my predecessor has performed all the steps for value field creation? How to test it and check that?
    4)     If yes then,  Do I need to perform additional configuration or can I proceed to transport it to Production?
    5)     What is COPA Allocation Structure & PA Transfer Structure? Where and Why It is used?
    6)     What are the different methods of cost and revenue allocations in SAP?
    7)     I have checked the status of the value fields across clients, It is as followsu2026
         Value Field     Value Field For     Description     Development      Quality     Production
    1     VV291     Other Airport Charges International     TBUL3     Exists      DNE     DNE
    2     VV292     Cargo Commission Cost     TBUL4     Exists      DNE     DNE
    3     VV380     Personal Cost u2013 Direct     TBUL1     Exists      DNE     DNE
    #DNE : Does Not Exist (assumed since the description given to value field is not the same as in development client.)

    HI sree,
    ofter creation value field and saving that time reqwest number appeare copy the reqwest number and go through the se01 select that reqwest number select and transport click the truck symbole, and draft a mail to basis guyw.
    Thank You!
    Best Regards,
    pradheep.

  • We have a situation where in an existing application after go live we need

    We have a situation where in an existing application after go live we need to add a new dimention. The fact is after adding the dimension the existing data will not have any value against this dimension(will have only null values). If so will it create a problem in loading or reporting?. How to resolve it?.

    My experience (on BPC 5.1 MS, and earlier versions) has been as follows:
    1.) create a new dimension, with at least 1 member. Pay particular attention to which member is the first base member in the hierarchy. (If you're planning to have multiple hierarchies in this dimension, wait for now on the ParentH2 etc. Start with just 1 hierarchy until you've completed these steps.) Process the dimension.
    2.) add that dimension to an existing application. When the application is processed, all of the existing data is assigned to that first base member of the new dimension.
    3.) If that's not sufficient, and you want to assign some data to another member of this new dimension, either use the "Move" package, or write custom SQL script logic, to get the data assigned to the correct members.

  • What is the criteria for selecting a license if multiple licenses exist

    Hello experts,
    If multiple licenses exist for an order in GTS, what is the criteria to decide which license will finally be selected?
    The log says "Number of import/export licenses that could be affected: 3" but it finally picks up one.
    Does it do it sequentially using the internal license number?
    We have a scenario where we are upgarding from version 7 to version 10, and there is one license (say A) which was created in the older version and copied to the new system after upgrade. There is also a new license (say B) directly created in the new version (with same selection criteria as A)
    Now when an order is created, both licenses are "affected" but it picks up the license B created in the new version.
    If the system was picking license based on internal number it should have picked up license A which was created in earlier version (as that had a lower internal number sequentially). If I expire license B and recheck the order, then it correctly picks up A.
    So what is the actual criteria to select a license and in this case was License A not given priority because it was created in older version and then copied to new version as part of upgrade?

    As far as I can see from a quick look at the code, there is no attempt to place the determined licences in any particular order.  Since they are selected from table /SAPSLL/LCLIC, it seems reasonable that they would be selected according to field GUID_LCLIC.  Within one system, the GUIDs remain in order of creation date/time; however I don't know GUIDs are formed in relation to different systems.  My bet is that if you check in SE16, your "early" licence actually has a higher GUID value than the recent ones.
    Please check, and see if I'm right.
    Regards,
    Dave

  • RSRV Check Check if characteristic values of text table exist in SID table

    Hello Guys,
    I have run the RSRV check Check if characteristic values of text table exist in SID table and I got a warning
    when I check the Text table and compare it to attribute table, total entries in text table is more than entries in attribute table..
    TEXT TABLE DONT HAVE ANY LANGUAGE...
    is it possible that there are more entries in text rather than attributes... again THERE are no language..
    Many Thanks

    try to do a 'select * from table' and catch the
    exception as it might fail if the table doesn't exist.Which might take quite a time if the table is big! If you really want to do that I'd use SELECT * FROM table WHERE 1=2
    A better way is, to ask the DatabaseMetadata object to retrieve information about the table...
    Thomas

  • Retrieving PL/SQL Table Type returned by stored procedure using Java.

    Hi All,
    I am facing an issue in a Stored Procedure (SP) which returns Table Type, the PL/SQL complex type.
    Below mentioned is how my stored procedure looks like.
    CREATE OR REPLACE package sp_test_pkg as
    TYPE v_value_table_type is table of SW_VALID_CODE.swValue%Type
    index by binary_integer;
    v_swRMAStatus v_value_table_type;
    procedure sp_test
    (locale      in int,
              name      in SW_CODE.swName%Type,
              v_value_table out v_value_table_type,
    batch_size in int,
    out_batch_size in out int,
    status out int);
    end sp_test_lcode_code_pkg;
    My java program to access this stored procedure is as given below:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class OracleTest {       
         public static void main(String args[]) {
         Connection con = null;
    OracleCallableStatement cstmt = null;
    String url = "url";
         String userName = "username";     
         String password = "password";
    try
              DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());     
              con = DriverManager.getConnection(url, userName, password);
         cstmt = (OracleCallableStatement)con.prepareCall("begin " +
              "sp_test_pkg.sp_test_pkg(?,?,?,?,?,?); end;");
              cstmt.setInt(1, 1);
         cstmt.setString(2, "Test");
              cstmt.registerOutParameter(3, OracleTypes.ARRAY);
              cstmt.setInt(4, 10);
              cstmt.setInt(5, 1);
              cstmt.registerOutParameter(5, Types.INTEGER);
              cstmt.registerOutParameter(6, Types.INTEGER);
              cstmt.execute();
    } catch(Exception ex) {
    ex.printStackTrace(System.err);
    } finally {
    if(cstmt != null) try{cstmt.close();}catch(Exception _ex){}
    if(con != null) try{con.close();}catch(Exception _ex){}
    When i execute this java program, i get the following error:
    java.sql.SQLException: Parameter Type Conflict: sqlType=2003
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:245)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:389)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:452)
         at OracleTest.main(OracleTest.java:49)
    I am not sure where i am going wrong. I have never worked on such complex types before. I want to retrieve the complex table type returned by the stored procedure using my java source code.
    Can anyone please help me out in resolving this issue?. This is very urgent.

    JDBC does not recognise types declared in PL/SQL. This is documented in the Dev Guide. [Find out more|http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraarr.htm#1057625].
    The only work around would be to build a wrapper which calls your existing PL/SQL procedures and returns a SQL type instead. Obviously not knowing your precise scenario I have no idea how much work this entails for you. It may be worth building a code generator.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Large array of objects/multiple types in an array

    I've been working on a program over the last several months, and I am bothered because I am using an two-dimensional array containing multiple types. A visual representation is as follows:
    ______label1 label2 label3
    label 1 Int Int Int
    label 2 Int Int Int
    label 3 Int Int Int
    The labels are strings, Int represents a numeric value representing a relationship between labelx and labely. Ultimately with the dataset I'm working with, there are hundreds of rows and columns. To complicate matters, I've been putting summary data (e.g. an average) at the end of each row and column to sort the whole thing.
    Because this data structure mirrors the ultimate output--a matrix in text file--it is appealing. But it also violates the rule of only having one datatype in an array. Currently it is declared as Object[][], which gives me the flexibility I need. I can think of other solutions, but they are not as intuitive and seem needlessly complex.
    Any thoughts?
    Thanks.

    I'd be thinking of writing a class that represents the data (labels, values and calculated summaries). Perhaps using one of the already existing implementations of TableModel.
    Because this data structure mirrors the ultimate output--a matrix in text file--it is appealing. Perhaps the appeal is deceptive. Outputting the data to a file is, presumably, only one of the things you are going to do with it. The methods of a class written to represent this data can model the actual behaviour of the data, something beyond the capacities of the jack-of-all-trades array.
    But it also violates the rule of only having one datatype in an array. Currently it is declared as Object[][], which gives me the flexibility I need. Of course I have no idea of the flexibility you need. (Or what imposes this constraint.) But I would consider it more flexible if I were able to change the actual implementation later - without affecting the code that uses this data. For instance if the data were to grow truely huge I might want to obtain it from a database and never have the whole thing in memory at once (whether as an array or any other way). Or I could desire the data to be obtained from sources on the internet via a URL. Or I could learn more about Collections and end up considering their utility methods of such great value that the array based implementation should give way.
    ---Edited by: pbrockway2 on Apr 20, 2008 1:07 PM
    The point is that a MyTableModel type (especially if it were an interface) would enable users of the data to keep on doing whatever they needed to with the data (including saving it to file). While the actual implemention could change: double array one day, Lists the next, a database after that, user interaction via a JTable...
    I can think of other solutions, but they are not as intuitive and seem needlessly complex.Try them, compare them.
    Bear in mind that one's intuitions and needs are apt to change.

  • Conversion failed when converting the nvarchar value to data type int when returning nvarchar(max) from stored procedure

    Thank you for your help!!! 
    I've created a stored procedure to return results as xml.  I'm having trouble figuring out why I'm getting the error message "Conversion failed when converting the nvarchar value '<tr>.....'
    to data type int.    It seems like the system doesn't know that I'm returning a string... Or, I'm doing something that I just don't see.
    ALTER PROCEDURE [dbo].[p_getTestResults]
    @xml NVARCHAR(MAX) OUTPUT
    AS
    BEGIN
    CREATE TABLE #Temp
    [TestNameId] int,
    [MaxTestDate] [DateTime],
    [Name] [nvarchar](50),
    [Duration] [varchar](10)
    DECLARE @body NVARCHAR(MAX)
    ;WITH T1 AS
    SELECT DISTINCT
    Test.TestNameId
    , replace(str(Test.TotalTime/3600,len(ltrim(Test.TotalTime/3600))+abs(sign(Test.TotalTime/359999)-1)) + ':' + str((Test.TotalTime/60)%60,2)+':' + str(Test.TotalTime%60,2),' ','0') as Duration
    ,MaxTestDate = MAX(TestDate) OVER (PARTITION BY TM.TestNameId)
    ,TestDate
    ,TM.Name
    ,Test.TotalTime
    ,RowId = ROW_NUMBER() OVER
    PARTITION BY
    TM.TestNameId
    ORDER BY
    TestDate DESC
    FROM
    Test
    inner join TestName TM on Test.TestNameID = TM.TestNameID
    where not Test.TestNameID in (24,25,26,27)
    INSERT INTO #Temp
    SELECT
    T1.TestNameId
    ,T1.MaxTestDate
    ,T1.[Name]
    ,T1.Duration
    FROM
    T1
    WHERE
    T1.RowId = 1
    ORDER BY
    T1.TestNameId
    SET @body ='<html><body><H3>TEST RESULTS INFO</H3>
    <table border = 1>
    <tr>
    <th> TestNameId </th> <th> MaxTestDate </th> <th> Name </th> <th> Duration </th></tr>'
    SET @xml = CAST((
    SELECT CAST(TestNameId AS NVARCHAR(4)) as 'td'
    , CAST([MaxTestDate] AS NVARCHAR(11)) AS 'td'
    , [Name] AS 'td'
    , CAST([Duration] AS NVARCHAR(10)) AS 'td'
    FROM #Temp
    ORDER BY TestNameId
    FOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX))
    SET @body = @body + @xml +'</table></body></html>'
    DROP TABLE #Temp
    RETURN @xml
    END
    closl

    Your dont need RETURN inside SP as you've declared @xml already as an OUTPUT parameter. Also you can RETURN only integer values using RETURN statement inside stored procedure as that's default return type of SP.
    so just remove RETURN statement and it would work fine
    To retrieve value outside you need to invoke it as below
    DECLARE @ret nvarchar(max)
    EXEC dbo.[P_gettestresults] @ret OUT
    SELECT @ret
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can i read user input value to my User exist

    Hi Guru's,
    I am facing one problem in Variables in BPS.
    I am calculating days from Month/year .I have one variable it is for Days,Second variable it is for Month/Year.
    First variable is user exist (for calculating the days),Second varible is user defined variable(this is a Input to the first variable).
    When i am giving the Month/Year(02/2008)variable i am getting the 29 days from the first variable.again i am changing the value of Month/Yera(03/2008) i am not getting the desired value.
    my doubt is my user exist not able to read current value of variable(month/year).how can i pass my value to user exist because this value is user input value based on this value i am calculating the days and dynamically displaying the layout.
    Here is the my sample code..
    seq = '0000'.
    ind = 0.
       i_area = 'ZTEST1'.
       area_var = 'ZVar2'.
    PERFORM instantiate_object USING    i_area
                                        area_var
                                 CHANGING lsr_var.
    PERFORM get_current_value_of_variable
                            USING lsr_var
                            CHANGING lto_value.
    READ TABLE lto_value INTO lso_value index 1  .
    i_month = lso_value-low.
    iv_month = i_month+4(2).
    iv_year = i_month(4).
    concatenate iv_year iv_month '01' into iv_date.
    begindate = iv_date.
    below bracket code calculating the leap year
    ( IF iv_date+4(2) = lc_feb.
        lv_hlp_date_year = iv_date+0(4).
        lv_hlp_rest      = lv_hlp_date_year MOD 4.
        IF lv_hlp_rest = 0.
          EV_DAYS = lc_days_29.
          lv_hlp_rest = lv_hlp_date_year MOD 100.
          IF lv_hlp_rest = 0.
            lv_hlp_rest = lv_hlp_date_year MOD 400.
            IF lv_hlp_rest NE 0.
              EV_DAYS = lc_days_28.
            ENDIF.
          ENDIF.
        ELSE.
          EV_DAYS = lc_days_28.
        ENDIF.)
      ELSE.
    below bracket code calculating the days
    (   CASE iv_date+4(2).
          WHEN lc_jan. EV_DAYS = lc_days_31.
          WHEN lc_mar. EV_DAYS = lc_days_31.
          WHEN lc_may. EV_DAYS = lc_days_31.
          WHEN lc_jul. EV_DAYS = lc_days_31.
          WHEN lc_aug. EV_DAYS = lc_days_31.
          WHEN lc_oct. EV_DAYS = lc_days_31.
          WHEN lc_dec. EV_DAYS = lc_days_31.
          WHEN lc_apr. EV_DAYS = lc_days_30.
          WHEN lc_jun. EV_DAYS = lc_days_30.
          WHEN lc_sep. EV_DAYS = lc_days_30.
          WHEN lc_nov. EV_DAYS = lc_days_30.
          WHEN OTHERS.   CLEAR EV_DAYS.
        ENDCASE.)
      ENDIF.
    data: st_date(2) type c.
    st_date = '01'.
    ind = 0.
    ind = ind + 1.
    here i am passing the low value and high value.
    yto_charsel-chanm = '0CALDAY'.
    yto_charsel-seqno = 1.
    yto_charsel-sign  = 'I'.
    yto_charsel-opt   = 'EQ'.
    yto_charsel-LOW = st_date.
    yto_charsel-chanm = '0CALDAY'.
    yto_charsel-seqno = 1.
    yto_charsel-sign  = 'I'.
    yto_charsel-opt   = 'BT'.
    yto_charsel-high = ev_days.
    INSERT yto_charsel INTO sto_charsel INDEX ind.
    ETO_CHARSEL = sto_charsel.
    lto_value = sto_charsel.
    How can i pass user input value to read this exist ,some where again i have to write code or else??
    This is very urgent can you help me..

    Hi,
    Instead of two perform statements, use single perform.
    PERFORM get_value USING i_area
                              i_variable
                         CHANGING lw_varsel.
    Take the values from lw_varsel-low.
    FORM statement for this perform is as follows.
    DATA: li_varsel TYPE STANDARD TABLE OF upc_ys_api_varsel,
            lv_varsel TYPE REF TO cl_sem_variable.
      FORM get_value USING p_area TYPE upc_y_area
                           p_variable TYPE upc_y_variable
                     CHANGING
                           p_lw_varsel TYPE upc_ys_api_varsel.
        CALL METHOD cl_sem_variable=>get_instance
          EXPORTING
            i_area       = p_area
            i_variable   = p_variable
             I_CREATE     =
          RECEIVING
            rr_variable  = lv_varsel.
           EXCEPTIONS
             NOT_EXISTING = 1
             others       = 2
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        REFRESH li_varsel.
    ****Getting the Value*********
        CALL METHOD lv_varsel->get_value
          EXPORTING
            i_user     = sy-uname
            i_restrict = 'X'
          RECEIVING
            rto_value  = li_varsel.
        CLEAR : p_lw_varsel.
        READ TABLE li_varsel INTO p_lw_varsel INDEX 1.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
      ENDFORM.                    "get_value
    Try this code.
    Bindu

  • What are the different values available for type attribute

    Hi,
        I am working with IDOC to Stored Procedure. For each field we need to give the values for 'isInput' and 'type' attributes. I need to pass values for 'datetime' and 'numeric' fields. What are the list of values availabIe for 'type' attribute. I know only about 'CHAR' attribute.
         Can anybody please tell me what all the values availabe for attribute 'type'. I am facing this problem while giving the value for type attribute.
    Thanks in Advance,
    Murthy.

    Does this help
    tring
        Data that contains a combination of letters, numbers, and special characters. String data types are listed below:
    CHARACTER: Fixed-length character strings. The common short name for this data type is CHAR.
    VARCHAR: Varying-length character strings.
    CLOB: Varying-length character large object strings, typically used when a character string might exceed the limits of the VARCHAR data type.
    GRAPHIC: Fixed-length graphic strings that contain double-byte characters.
    VARGRAPHIC: Varying-length graphic strings that contain double-byte characters.
    DBCLOB: Varying-length strings of double-byte characters in a large object.
    |BINARY: A sequence of bytes that is not associated with a |code page.
    |VARBINARY: Varying-length binary strings.
    BLOB: Varying-length binary strings in a large object.
    |XML: Varying-length string that is an internal representation |of XML.
    Numeric
        Data that contains digits. Numeric data types are listed below:
    SMALLINT: for small integers.
    |INTEGER: for large integers.
    |BIGINT: for bigger values.
    DECIMAL(p,s) or NUMERIC(p,s), where p is precision and s is scale: for packed decimal numbers with precision p and scale s. Precision is the total number of digits, and scale is the number of digits to the right of the decimal point.
    |DECFLOAT: for decimal floating-point numbers.
    REAL: for single-precision floating-point numbers.
    DOUBLE: for double-precision floating-point numbers.
    Datetime
        Data values that represent dates, times, or timestamps. Datetime data types are listed below:
    DATE: Dates with a three-part value that represents a year, month, and day.
    TIME: Times with a three-part value that represents a time of day in hours, minutes, and seconds.
    TIMESTAMP: Timestamps with a seven-part value that represents a date and time by year, month, day, hour, minute, second, and microsecond.
    Regards
    Ravi

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

Maybe you are looking for

  • Can not able to print Oracle report on HP inkjet500 Plotter

    Dear All, Please let me know how to print oracle report on HP plotter. I tried with both Bitmape and Character mode report but report preview automatically exit from the menu immediately without any error when i click print button (to the destination

  • Safari 7.1 hangs and crashes when any extension installed

    Hi after latest Safari upgrade (ver 7.1 seed 1), Safari hangs and crashes after I install any extensions. When I delete all extensions from extensions dir, the problem disappear. Thank's for any advice. Date/Time:       2014-07-12 10:14:58 +0200 OS V

  • Replacement iphone 3gs problem

    Replacement iphone 3gs came with iOS 6.0 but on initial set up i am told to use my iCloud i need 6.1.3 onwards. Cannot update iOS as cannot get past the set up stage. Need to recover my 800 odd photos somehow. Do i go the iTunes route on set up? Will

  • S cable vs. av cable vs. cheapos from radio shack

    I just got my ipod video and am trying to connect it to the front av ports on my tv with no luck. i am using a working cable from radio shack that has 2 audios and one video from a headphone jack. i don't have the dock. this does not work. is apple's

  • Obiee 11g  &nbsp display in reports!

    Hello, Can anyone please help me with the following scenario. I have a report with few columns and rows. Some of the cells do not have any data in them. But when I see the final report I see &nbsp displayed in the cells. Is there a way to show empty