Store Proc - Empty Value

Hi folks, how do you write a store proc to return all tyre Speeds if no Speeds are selected, it won’t work with
IS NULL!
I have tried the following
@Speed = ' ' and kind of works i.e. the first search work perfectly, but when you change one of the other
dropdown list you get all the same results  regardless of what you have selected, it’s like the other dropdowns lists don’t filter the data after the first search!
SQL
WHERE  Width
= @Width and Product.Profile
= @Profile and Product.Diamete
= @Diamete and Product.Speed
= @Speed or @Speed
= ' '
and Suppliers.SupplierDistrict
= LEFT(@CustPostcode,2)     
ORDER
BY Product.ProductUnitSalePrice
ASC
ASP
<asp:DropDownList
ID="DropDownList1"
runat="server"
DataSourceID="SqlDataSource1"
DataTextField="Width"
DataValueField="Width"
Height="27px"
style="margin-left:
0px"
Width="99px"
AppendDataBoundItems="True">
  <asp:ListItem
Text="Width"
Value=""
/>
</asp:DropDownList>
    <asp:DropDownList
ID="DropDownList2"
runat="server"
DataSourceID="SqlDataSource3"
DataTextField="Profile"
DataValueField="Profile"
Height="27px"
Width="97px"
AppendDataBoundItems="True">
<asp:ListItem
Text="Profile"
Value=""
/>
    </asp:DropDownList>
    <asp:DropDownList
ID="DropDownList3"
runat="server"
DataSourceID="SqlDataSource4"
DataTextField="Diamete"
DataValueField="Diamete"
Height="29px"
Width="97px"
AppendDataBoundItems="True">
  <asp:ListItem
Text="Diamete"
Value
=""
/>
    </asp:DropDownList>
    <asp:DropDownList
ID="DropDownList4"
runat="server"
DataSourceID="SqlDataSource5"
DataTextField="Speed"
DataValueField="Speed"
Height="29px"
Width="99px"
AppendDataBoundItems="True">
    <asp:ListItem
Text="Select All"
Value=" "
/>
</asp:DropDownList>
Brucey

this?
WHERE Width = @Width
and Product.Profile = @Profile
and Product.Diamete = @Diamete
and (Product.Speed = @Speed
or COALESCE(@Speed,'') = '')
and Suppliers.SupplierDistrict = LEFT(@CustPostcode,2)
ORDER BY Product.ProductUnitSalePrice ASC
and set default value as blank at your front end
ie
 <asp:DropDownList ID="DropDownList4" runat="server" DataSourceID="SqlDataSource5" DataTextField="Speed"DataValueField="Speed" Height="29px" Width="99px" AppendDataBoundItems="True">
    <asp:ListItem Text="Select
All" Value="" />
    </asp:DropDownList>
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Schedule a store proc to run with different values

    Hi ALL ,
    I have a store Proc i need to schedule it using the sql agent that i can do but the requirement is to exec the same store proc for different values at same time .
    like for eg i need to run the below same store proc for 3 different values at the same time.
    exec getIPs 'US'
    exec getIPs 'IND'
    exec getIPs 'UK'
    So for instance time is 02:30 am .
    The Same Store Proc should exec for values like US,IND & UK . If the exec for one of the values fail it should still continue .
    Like for eg if by chance due to some reason US fails it should move to next value IND in short continue with the exec.
    These values US,IND,Uk am getting from a table called Countries .
    Kindly help with this requirement.
    Thanks 
    Priya

    I am unable to test but you can try something like this,
    DECLARE @COUNTRYID INT
    SET @COUNTRYID = 1WHILE @COUNTRYID <= (SELECT MAX(COUNTRY_ID) FROM COUNTRY)
    BEGIN
    DECLARE @COUNTRY_CODE VARCHAR
    BEGIN TRY
    SELECT @COUNTRY_CODE = COUNTRY_CODE FROM COUNTRY WHERE COUNTRY_ID = @COUNTRYID
    EXEC getIPs @COUNTRY_CODE
    END TRY
    BEGIN CATCH
    INSERT INTO [dbo].[ERROR_LOG]
    SELECT
    GETDATE(),
    ERROR_NUMBER() AS ErrorNumber
    ,ERROR_SEVERITY() AS ErrorSeverity
    ,ERROR_STATE() AS ErrorState
    ,ERROR_PROCEDURE() AS ErrorProcedure
    ,ERROR_LINE() AS ErrorLine
    ,ERROR_MESSAGE() AS ErrorMessage
    END CATCH;
    SET @COUNTRYID = @COUNTRYID + 1
    END
    Regards, RSingh

  • To convert the "IBM DB2 Store Procs written in C" to Oracle PL-SQL

    Hi, Is it possible to convert the "IBM DB2 Store Procs written in C" to Oracle PL-SQL. If you have any info, PL do let me know. Thanks in advance.
    EG :
    /* SMG Stored Procedures */
    /* DB2 Stored Procedure: OrganisationExists */
    /* Linkage: SIMPLE (no NULLs permitted) */
    /* Load module name: SMGEC00 */
    /* Purpose: DELETE FROM SSE_LOOKUP_MAP */
    /* to run. */
    /* Parameters: argvÝ1¨ short - return error code - OUT */
    /* argvÝ2¨ char - return error message - OUT */
    /* argvÝ3¨ char - BLEID - IN */
    /* Reason for edit Date Who */
    /* Initial version 09/04/03 Arockia */
    #pragma runopts(plist(os))
    #include <stdlib.h>
    #include <string.h>
    void main (int argc, char *argvݨ)                                             
    EXEC SQL INCLUDE SQLCA;
    EXEC SQL BEGIN DECLARE SECTION;
    char bleid??(12??);
    EXEC SQL END DECLARE SECTION;
    /* Set defaults for error code (argvÝ1¨) and error message (argvÝ2¨) */
    strcpy(argv??(2??)," ");
    *(int *)argv??(1??) = 0;
    strcpy(bleid,argv??(3??));
    EXEC SQL
    DELETE FROM SSE_LOOKUP_MAP
    WHERE BLEID = :bleid;
    /* Set error code to record status of last SQL command */
    *(int *)argv??(1??) = SQLCODE;
    return;

    For this program, you could do some thing like:
    SQL> CREATE TABLE sse_lookup_map(BLEID varchar2(10));
    Table created.
    SQL> CREATE or replace PROCEDURE test(p_bleid_in IN varchar2)
      2  AS
      3  BEGIN
      4  DELETE FROM sse_lookup_map
      5  WHERE BLEID = p_bleid_in;
      6  END;
      7  /
    Procedure created.
    SQL> ed
    Wrote file afiedt.buf
      1* INSERT INTO sse_lookup_map values('test1')
    SQL> /
    1 row created.
    SQL> ed
    Wrote file afiedt.buf
      1* INSERT INTO sse_lookup_map values('test2')
    SQL> /
    1 row created.
    SQL> SELECT * FROM sse_lookup_map;
    BLEID
    test1
    test2
    2 rows selected.
    SQL> EXEC test('test1')
    PL/SQL procedure successfully completed.
    SQL>  SELECT * FROM sse_lookup_map;
    BLEID
    test2
    1 row selected.
    SQL>

  • Pass parameters to sql store proc?

    Is it possible to pass parameters from Crystal Report to sql store proc? I know it will prompt for paramters if the report is built based on a parameterized store proc. I am NOT talking about these parameters. I still want user to be able to select parameter values from dropdowns and use them as the procedure parameters.
    Reason for my question is I don't want the store proc to create a table having all records then crystal makes report by filtering. The all-record table could grow huge very quickly as more data is put in.
    Thank you very much.

    Hi Peter
    Follow these steps:
    A. Following steps applies to the main procedure:
    1. Create a main report which accepts the same fields as you want to pass to the stored procedure. (Note that this main report is not based off the procedure that you want to execute. Just get the data that you want to pass to the procedure. We will call the procedure in the subreport.)
    2. Now create the no. of dynamic parameters that you want your user to choose the data from in the main report. (Lets assume that the user will select a single value.)
    B. Following section applies to the subreport:
    1. Add a subreport to the main report. This subreport will be based off your procedure. This will automatically add up the stored procedure parameters to the subreport.
    2. Take care that in the procedure you define the datatype of the parameters same as the field's data type that you want to pass to the procedure. This will show up your stored procedure parameters while subreport linking.
    3. Now link the main report to the subreport with each parameter. Uncheck the "Select data based on" dialog box while linking each parameter.
    Hope this post solves your problem. i am sorry for sounding descriptive.
    Regards
    Nikhil Sabnis

  • Cfprocparam type="OUT" brings back empty value

    ISSUE OBJECTIVE:
    After conversion from CF 5 to CFMX 7, <cfprocparam
    type="OUT" brings back empty value
    OUR STORED PROC:
    <cfstoredproc procedure="sp_rass_user_guidance"
    datasource="#rass_data_source#" returncode="YES">
    <cfprocparam type="IN" dbvarname="@status" value="2"
    cfsqltype="CF_SQL_INTEGER">
    <cfprocparam type="IN" dbvarname="@addname"
    value="#form.newVersionName#" cfsqltype="CF_SQL_CHAR">
    <cfprocparam type="IN" dbvarname="@userid"
    value="#client.userid#" cfsqltype="CF_SQL_CHAR">
    <cfprocparam type="OUT" dbvarname="@rc" variable="rc"
    cfsqltype="CF_SQL_SMALLINT">
    <cfprocparam type="OUT" dbvarname="@reason"
    variable="reason" cfsqltype="CF_SQL_VARCHAR">
    <cfprocresult name="retrieveVersions">
    </cfstoredproc>
    In SQL query anylizer this stored proc brings back some
    values for variables rc and reason, but empty values on CF pages.
    Cf gurus please help

    Something sounds fishy. I'm not sure what more you could do
    at the database, since PL/SQL VARCHAR2 variables have a max length
    of 32,767 (as opposed to the VARCHAR2 data type limit of 4000
    bytes). Should let you return more than 900 bytes! Perhaps you may
    need to look into your kernal parameters, or Oracle parameters like
    sga_max_size, etc.
    You say that "Long Buffer Varchar is checked and set to
    max"... what value? Also, what version of ColdFusion are you using,
    as I can not "check" Long Text Buffer (chr) but only supply a
    value, or I can check CLOB (or BLOB), where checking CLOB will
    override the Long Text Buffer (chr) value.
    Phil

  • Store Proc

    Hi folks, I’m slowly building up my SP, I don’t fully understand the syntax yet.
    I’m trying to retrieve the Customer primary key that has been created for the new customer record, and then assign it to the @CustomerFK parameter, could you give me any pointers on this!
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    /***********************Declare variables ***********************/
    /******tblCustomer******/
    @CustomerID uniqueidentifier,
    @Forename nvarchar(50),
    @Surname nvarchar(50)
    /******tblOrder******/
    @OrderID uniqueidentifier,
    @CustomerFK nvarchar(50),
    @DateOrdered date,
    @TimeOrdered time,
    @AnyAdditionalInfo nvarchar(Max),
    As
    Begin TRANSACTION
    SET NOCOUNT ON
    INSERT INTO [TyreSannerSQL].[dbo].[Customers]
    (Forename,
    Surname)
    OUTPUT INSERTED.CustomerID INTO @CustomerFK
    VALUES
    (@Forename,
    @Surname)
    INSERT INTO [TyreSannerSQL].[dbo].[Order]
    (OrderID,
    CustomerFK,
    DateOrdered,
    TimeOrdered,
    AnyAdditionalInfo)
    VALUES
    (@OrderID,
    @CustomerFK,
    @DateOrdered,
    @TimeOrdered,
    @AnyAdditionalInfo)
    COMMIT TRANSACTION

    Hi folks, store proc is not working correctly,
    @OrderID uniqueidentifier and @OrderID, keep coming up with under line red
    SET @CustomerFK = SCOPE_IDENTITY()
    USE [TyreSannerSQL]
    GO
    /****** Object: StoredProcedure [dbo].[AddCustomerDetails] Script Date: 10/06/2014 20:49:31 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    /******tblCustomer******/
    @CustomerID uniqueidentifier,
    @Forename nvarchar(50),
    @Surname nvarchar(50)
    As
    Begin TRANSACTION
    SET NOCOUNT ON
    INSERT INTO [TyreSannerSQL].[dbo].[Customer]
    (Forename,
    Surname)
    VALUES
    (@Forename,
    @Surname)
    SET @CustomerFK = SCOPE_IDENTITY()
    /******tblOrder******/
    @OrderID uniqueidentifier,
    @CustomerFK uniqueidentifier,
    @DateOrdered date,
    @TimeOrdered time,
    @AnyAdditionalInfo nvarchar(Max),
    INSERT INTO [TyreSannerSQL].[dbo].[Order]
    (OrderID,
    CustomerFK,
    DateOrdered,
    TimeOrdered,
    AnyAdditionalInfo)
    VALUES
    @OrderID,
    @CustomerFK,
    @DateOrdered,
    @TimeOrdered,
    @AnyAdditionalInfo
    COMMIT TRANSACTIONA

  • System.Exception: null or empty values

    Have designed a 4 part form Using DW MX, ASP.NET C# and MySQL
    and currently getting the below error when moving from one page to
    the next.
    The web.config file is on the server, there are no null or
    empty values, and the key tags match.
    I am new to applicaiton development in DW and am now stuck -
    any suggestions?
    System.Exception: This page has a MM:DataSet, MM:Insert,
    MM:Update or MM:Delete tag with a null or empty value for the
    ConnectionString and DatabaseType attributes.
    Often, such values come from application settings in the
    web.config file. That file might be missing from the server
    executing this page. Or, it might be missing the particular add key
    tags for the database connection this page uses. If you are using
    Dreamweaver, look for the web.config file in the local root folder
    of your Dreamweaver site. Once you find this file, you can either:
    Put this file onto the server that is executing this page.
    Copy the add key tags from the web.config in the local root
    folder of your Dreamweaver site and paste them into the web.config
    file in the server that is executing this page.
    at DreamweaverCtrls.DataSet.DoInit()
    Text

    http://java.sun.com/docs/books/tutorial/uiswing/components/spinner.html#model
    Might be a good start.

  • Passing null/empty values from a actionscript VO to a Coldfusion ORM object

    This is the situation.
    If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
    For instance, if you have the following actionscript VO:
    package vo
        [RemoteClass(alias="com.companyname.Person")]
        [Bindable]
        public class Person
            public var person_id:Number;
            public var last_name:String;
            public var first_name:String;
            public var email:String;
            public var created_date:date;
         public function Person() {}
    And you have the corresponding Coldfusion component:
    <cfcomponent displayname="person" output="false"
        alias="com.companyname.Person"
        schema="dbo" persistent="true"
        table="PERSON">
        <cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
        <cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
        <cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
        <cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
        <cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
    </cfcomponent>
    Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created.  This is bad, bad, bad.  Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails.  But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not.  If you pass an empty string ("") you still have the same problem.  I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
    There seems to be two ways around it.  One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine.  I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
    Have other people encountered this problem?  How have you gotten around it?  Thanks.

    I realize that I didn't clarify that I am using ColdFusion
    for getting the data. This class was generated by the Create CFC
    wizard in Flex Builder.
    package com.generated
    [Managed]
    [RemoteClass(alias="components.generated.clients.Clients")]
    public class Clients
    public var clientid:Number = 0;
    public var clientfirstname:String = "";
    public var clientlastname:String = "";
    public var clientaddress1:String = "";
    public var clientaddress2:String = "";
    public var clientcity:String = "";
    public var clientstate:String = "";
    public var clientzip:String = "";
    public var clientphone:String = "";
    public var clientemail:String = "";
    public function Clients()
    }

  • Passing null/empty values from Flex to a Coldfusion ORM object

    This is the situation.
    If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
    For instance, if you have the following actionscript VO:
    package vo
        [RemoteClass(alias="com.companyname.Person")]
        [Bindable]
        public class Person
            public var person_id:Number;
            public var last_name:String;
            public var first_name:String;
            public var email:String;
            public var created_date:date;
         public function Person() {}
    And you have the corresponding Coldfusion component:
    <cfcomponent displayname="person" output="false"
        alias="com.companyname.Person"
        schema="dbo" persistent="true"
        table="PERSON">
        <cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
        <cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
        <cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
        <cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
        <cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
    </cfcomponent>
    Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created.  This is bad, bad, bad.  Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails.  But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not.  If you pass an empty string ("") you still have the same problem.  I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
    There seems to be two ways around it.  One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine.  I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
    Have other people encountered this problem?  How have you gotten around it?  Thanks.

    Looks like a known workaround to this issue is to wrap the Flex object in an array.
    The ColdFusion CFC will accept that as an array, with the first an only element being a struct, which is the object you built in Flex.

  • Remove null & empty values

    I created a report with multiple fields. I would like to create a generic formula in which it evaluates all the values and if it found a null or empty value it will be replaced by a 'N/A'. I was searching in the forums and I found the following formula
    if  (isnull() or ( ='')) then
           "Display the required text"
    else
    when I tried to use it i had an error that the value must be boolean. Is there is a way where  I can change all the fields as string?? and a assign "N/A"
    or
    how can I assign a "N/A"to a boolean field??
    also  I have approx. 140 fields to evaluate, does the formula can be generic or I will need to create a formula for each variable??
    thanks

    Usually when Crystal runs across a field that is NULL, it immediately stops executing the formula, unless the field is enclosed within IsNull().  However, I'm not sure if that is the case for a parameter being passed to a function.  So, you may be able to create a function like (Formula Workshop -> Create Custom Functions -> Add; basic syntax):
    function DisplayString (inVal as string) as string
    if (isnull(inVal) or (inVal ='')) then
      DisplayString = "N/A"
    else
      DisplayString = inVal
    end if
    If Crystal does stop when passing a NULL value as a parameter, then you could code a similar function (without the isnull()), and check the Convert NULL Database Values to Default option on the File -> Report Options panel.
    You would need to create one such function for each data type that you want to show "N/A" for, and for data types other than string, convert the value to a string when it is not null.
    These functions could then be used in the Display String formula for the field on the report.
    The only other way I can think of achieving this would be to base the report(s) on an SQL Command and convert NULL values to "N/A" there.  It might be a bit easier to do in an SQL Command, but probably not a whole bunch.
    Or, educate your users that when nothing is printed, it means that it's not applicable! 
    HTH,
    Carl

  • How to define null or empty value in BAPI function modules?

    Hi,
    I have problem with BAPI functions, where some parameters are mandatory.
    For example: when I try to use HR BAPI's(BAPI_PERSDATA_CHANGE, etc.) I have to insert parameters like SUBTYPE,OBJECTID,LOCKINDICATOR. The PA0002 table that is used from this BAPI doesn't have SUBTYPE, OBJECTID, LOCKINDICATOR, for any of the records that I would like to select.
    So what I tried, was to put a ' ', to indicate that is empty. It returned an error message saying "Make an entry in all required fields". Next tried to put in some values for these fields -- and it returned an error message saying "No data selected from 0002 for this period".
    I also tried to run BAPI_FAMILY_CHANGE that uses data from table PA0021. Here I found some records with  SUBTYPE, OBJECTID fields that were not empty, but LOCKINDICATOR was still missing. So I tried to put LOCINDICATOR value directly in to database (with MS SQL Enterprise Manager).  After that I was able to use BAPI_FAMILY_CHANGE.
    I think that manually inserting data in database is not normal procedure.
    Is there something that I have missed out?
    I mean -- how can I get this to work without inserting data directly in database?
    How can I define null or empty value in BAPI function modules?
    Thank you in advance.
    Best regards,
    Mihail

    Defining an empty value for a parm in a table is easy.
    First get the function's definition from the SAP system
    Second only populate the fields for which you have a value to set
    Third execute the function.
    The JCO takes care of the rest.
    Enjoy

  • How can I pass empty value in URL Parameter

    Hi,
    I am passing different URL parameters to one page, to filter
    the recordset on that page. How can I pass an empty value in the
    URL parameter so that the recordset in unfiltered?
    The URL parameter is based on one field of the database:
    ContentType. So, the link would be to
    default.asp?ContentType=Event
    and then all records that have the ContentType field in the
    DB as Event are displayed. Is it possible to use this system to
    pass an empty parameter so that all records are displayed?
    Thanks
    Ian

    ?ContentType=All
    <% if (ContentType == "All")
    Build recordset w/o filtering
    ASP is rusty, but those are the basics.
    "iandobie" <[email protected]> wrote in
    message
    news:e8im80$q7m$[email protected]..
    > Hi,
    > I am passing different URL parameters to one page, to
    filter the recordset
    > on
    > that page. How can I pass an empty value in the URL
    parameter so that the
    > recordset in unfiltered?
    > The URL parameter is based on one field of the database:
    ContentType. So,
    > the
    > link would be to
    > default.asp?ContentType=Event
    > and then all records that have the ContentType field in
    the DB as Event
    > are
    > displayed. Is it possible to use this system to pass an
    empty parameter so
    > that
    > all records are displayed?
    > Thanks
    > Ian
    >

  • Error while trying to assign an empty value

    Hi ,
    In my bpel process i get an error while trying to assign an empty output to a variable. It occurs in assign activity copy operation. What can i do? How can i skip this? Sometimes there may be null /empty values ...below is the error message
    Error in evaluate <from> expression at line "146". The result is empty for the XPath expression : "/ns5:getAccessSwitchResponse/SwitchPortInfo/SwitchID
    Thanks in advance
    Edited by: Turkmen Mustafa on 27.Haz.2011 04:08

    Hi,
    No it is not possible. However this issue is resolved in SOA Suite 11g PS3. Where it uses BPEL WS 2.0 standards.
    Edited by: user9285225 on Jun 27, 2011 4:42 AM

  • UDF of type "Lookup" - doesn't accept "space/Empty" value in lookup defn

    Hello there,
    I have created a Combo Box UDF field - but I don't want to put any value in it. If I give only "space" in Encode and Decode - it gives error of providing some value to it. I want to give a default blank value over there along with other values so that the user is free to declare an empty value if he/she doesn't wants to provide one otherwise the user has to mandatorily provide some value to this like "NULL/zzz/NOTHING" as a string.
    Is there anyway we can achieve this - giving blank value in a lookup/combo field ?
    TIA,
    - oidm.

    I don't think you can enter nulll/space in decode.
    For Lookup Field Code as well as Decode can't be null.
    If you want to give blank so it is not possible APMK, in decode you can give ---. You can treat it as Blank.
    Code Key > NULL
    Decode > ---

  • DropDown List Problem for Dynamic Store Proc Parameter in SAP B1 8.8

    I am working with the crystal report 2008 in SAP B1 8.8 and the report is used the Store Proc for retrieving data. As i need to show a list of Documnet No (DOCNUM) from Sales Order (ORDR) and Purchase Order (OPOR) for the users to select, i use the Dynamic Parameter as for the Store Proc parameter (@Contno), However, the drop down list can be shown fine in Crystal Report, but cant be shown in "Report Selection Criteria" while opening the Crystal Report through SAP B1.
    Therefore, can anyone tell me how to add the dynamic drop down list (cause the documnet no list will be changed very frequently) in the  SAP B1 8.8  "Report Selection Criteria" screen.
    Thanks!!

    Classic Crystal Reports and Classic SAP connectivity questions
    Classic Crystal Reports and Classic SAP connectivity questions

Maybe you are looking for