How to differentiate whether user entered '0' or no value in the parameter?

I need some clarification.On my selection screen I have 4 parameters( P_QTYLL,P_QTYUL,P_AMTLL,P_AMTUL). I have to check the values entered by the user in those fields and I have to display the user entered values in the next screen.My problem is if the user enters '0'(in any of the above fields) means '0' has to displayed in the next screen.But if he enters nothing means then nothing has to be displayed in the next screen.My problem is I am checking for '0', against the values(initial,'',space,0) for user entered value.But I am unable to differentiate the '0' and nothing(no value) even though I checked against the values(initial,'',space,'0').All the 4 conditions are treating both the '0' and 'novalue' the same.How to differentiate whether user entered '0' or entered nothing(no value).
for example below is my code
IF P_QTYLL EQ 0.
P_QTY_LL = P_QTYLL.
ENDIF.
IF P_QTYUL EQ 0.
P_QTY_UL = P_QTYUL.
ENDIF.
IF P_AMTLL EQ 0.
P_AMTLL_S = 0.
ENDIF.
IF P_AMTUL EQ 0.
P_AMTUL_S = 0.
ENDIF.
IF P_QTYLL EQ ''.
P_QTY_LL = ' '.
ENDIF.
IF P_QTYUL EQ ' '.
P_QTY_UL = ' '.
ENDIF.
IF P_AMTLL EQ ' '.
P_AMTLL_S = ' '.
ENDIF.
IF P_AMTUL EQ ' '.
P_AMTUL_S = ' '.
ENDIF.
LIKE THE ABOVE I checked against the values space,initial.But using those I am not getting any difference for no value and '0' .All the four values(space,initial,'0','') are treating both the '0' and no value in the same way.
Thanks,
Balaji

hi,
you said your teamlead doesn't want the type to be changed to 'C'.so try adding one dummy variable  of type c and pass your parameters value to this dummy variable and check  dummy variable for value '0'.
eg:
Data DUMMY(11) type c.
DUMMY = P_QTYLL.
IF DUMMY EQ 0.
P_QTY_LL = P_QTYLL.
ENDIF.
DUMMY = P_QTYUL
IF DUMMY EQ 0.
P_QTY_UL = P_QTYUL.
ENDIF.
i think this will help you 2 some extend.

Similar Messages

  • How do I let user enter a primary key value on a form

    I'm creating my first APEX application. I have a simple table called HOSTS with 2 columns HOSTNAME and IP_ADDRESS. HOSTNAME is the primary key for the table. HOSTNAME is a perfectly acceptable primary key and I don’t wish to create an additional column to be populated by a sequence.
    What are my options for creating a form on the table without using "Existing trigger", "Custom PL/SQL function" or "Existing Sequence" to populate the primary key column, i.e. HOSTNAME, so that the user can enter a value for the primary key?
    Any assistance greatly appreciated.
    Gavin

    The debate about natural keys versus surrogate keys
    will no doubt continue with advocates for both sides.
    However there is also a difference between
    'making your life easier' for APEX development and
    'making your life more difficult' by having to
    analyse, implement and deploy a surrogate key only
    approach to an existing database which employs both
    natural keys and surrogate keys.
    hould we be forced to change the database design
    because a development tool does not cater for natural
    primary keys?The application development product is TRYING to save you from shooting yourself in the foot. The idea is to separate the primary key from being accessed by the user or ANY carbon based unit.. The key is mainly used by the system to join and lookup data rows, not for people to change whenever they decide that the key is WRONG.
    Think about this, if you use Last Name as a key in your system (a bad idea to begin with since this is NOT a unique id when you have two Smiths). When a person needs to change this because Jimmy Smith is NOT the only Smith working for Acme Toys, you have to cascade that change through all the child tables related to the main person table.
    If instead you use a system generated key, no change will be required since the key has NO relation to the data other than it represents a pointer to that row of data.
    Works for me, since I do not want to write all the supporting code when APEX builds it for you...
    Thank you,
    Tony Miller
    UTMB/EHN

  • How do I let user enter a number?

    how do I let user enter a number?Any method or proccess.Plz help.

    On the command line you can use:
    BufferedReader in = new BufferedReader(new InputStreadReader(System.in));
    String line = in.readLine(); // characters so far
    int number = Integer.parseInt(line);Notify that if the user enters something different from a number an exception in thrown. In that case you should possibly ask him again.
    In swing applications of applets you would do it different.
    regards
    Sven
    regards
    Sven

  • How to check whether user login in SNC mode or Non - SNC Mode

    Hi
    When SNC is enabled system will accept secure network connections. But,It is up to the user to login in SNC mode or NOT.
    Can any one let me know How to check whether user login in a SNC mode / Non-SNC mode?. Is it only through SU01?.
    Is there any other possibility?. where to check if user login through RFC connections?.
    Please correct me if i am wrong.
    Regards
    Srinivas P.

    Hi,
    Where to check if user login through RFC connections?
    Check T-Code SM04 on every instance. In the column Type you can see what kind of login has been used (GUI, RFC, Plugin, System).
    But,It is up to the user to login in SNC mode or NOT.
    Depends. Check these [parameters|http://help.sap.com/saphelp_nw04/helpdata/EN/19/164442c1a1c353e10000000a1550b0/content.htm]:
    snc/accept_insecure_cpic     
    snc/accept_insecure_gui      
    snc/accept_insecure_r3int_rfc
    snc/accept_insecure_rfc      
    Regards,
    Sven

  • How to tell whether one driver(say driver A) is in the same driver stack with another driver(say driver B)?

    I'm new to WDF, so the questions below might be trial. However, I cannot find the answers in MSDN or text book(e.g. Developing Drivers with the Microsoft Windows Driver Foundation)
    The questions below only apply to KMDF on Windows Phone.
    1. Can I say that one *.sys file is one driver?
    2. How to tell whether one driver(say driver A) is in the same driver stack with another driver(say driver B)?
    3. If several *.sys files are included in one *.inf file, can I say that those drivers are in the same driver stack?

    Drivers are not in a stack, the devices created from the driver are.  Consider having two identical pieces of hardware in a single computer, each will have a device object which will come from the same driver, but each device object will be in
    its own stack.  Things can get even more complex since a filter driver can create more than one device object in a single stack. 
    Just as a single driver can create devices that are in different stacks, your question on multiple drivers in an INF has the same answer, there is nothing that says they will be in the same stack.
    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

  • Please..how to instal libero mail on mi Ipad. I need the parameter for send and receive mail..Thanks

    Please..how to instal "libero" mail on my Ipad. I need the parameter for send and receive mail..Thanks

    FYI: POP will by default, delete messages from the server after downloading them (This applies to most pop clients, computer or mobile). POP is old tech and is not recommended if IMAP or Exchange are available. The default when setting up a g-mail type account is IMAP. Full synchronization with the server. You may also be able to set it up as an Exchange account, allowing for push e-mail and sync of calendars and contacts as well. See the Gmail help pages for instructions.

  • How to know whether User is Buyer or not?

    Hi,
    I am developing a function module to create/update/unassign Employee Org Hierarchy. In this I have to know whether User is BUYER OR NON BUYER?.
    If user is assigned to purchase org/purchase group then he will be BUYER or else he will be NON BUYER. If once I come to know whether user is BUYER OR NOT, then I have to proceed further differently in both the cases.
    Pls help me out in this regard asap.
    Thanks & Regards,
    Nagaraju Maddi
    Message was edited by: Nagaraju Maddi

    Nagaraju
    Buyer will be having purchaser roles like SAP_BBP_STAL_PURCHASER, SAP_EC_BBP_PURCHASER, SAP_EC_BBP_ST_PURCHASER. Check the roles of the users. If you find Purchaser(standard roles) or Buyer(in case of customized roles) in their roles then he/she will be buyer.
    Similarly Non buyer user will be having Employee role like SAP_EC_BBP_EMPLOYEE.
    Hope this will help you.
    Do reward points for helpful solution.
    Regards
    Jagdish

  • How do you use user defined error messages in Value Help?

    Hi,
    I'm currently working on a Modifiable Value Help Selector in Web Dynpro Java, and I want to use a user defined error message when I validate the values entered by a user. Currently, it's returning its default error message ("Character <string> does not match...").
    Since the project requires a different error message, is there a way to override the default error message and use my defined error message instead?
    Thanks!

    Hi Angelo,
    I am not sure why message area is showing both Custom and inbuilt messages but you can try the following:
    i guess you must be using reportContextAttribute exception for showing Error messages on the input fields as well.in that case you can disable the message area so messages will appear only on the Context level ie; on input fields.
    For other messages apart from validation messages you can enable the message area before reporting the exception.
    make sure the boolean context variable which will be used for enabling and disabling the message area should have Readonly property set as true.
    I am not sure whether this is the only solution for this but you can try and see if it works.
    Siddharth

  • How to find out user info for a forecasted value

    Hi Experts,
    Suppose, a user plans on a planning application and consequently creates some forecast values. How do i find out which user did the planning? Is there any way to know this? Please let me know of this if anybody knows.
    Regards
    Swaroop

    Hi, I'm using BPS so can't say forIP. But if you really want to see who posted which data, the planning application has to be set up that way in order to capture the user, time, date details, as indicated by the previous post. This will ptentially of course create very many more records in some cases, where data is amended.
    But your post also requested info about who ran which planning functionality, and when. You can get this sort of information in BPS from the transactions BPS_STAT0 and BPS_STAT1. You may want to narrow the amount of analysis using the username/ date /time filters.
    Stephen

  • How to check whether calendar is being used in any of the sap application

    Hello All,
    We are having few factory calendars. However some of the calendar having valid to year 2010. Can you please let me know how to check whether these calendar is being used in any of the sap application/module
    kindly reply as early as possible
    Regards
    Girish

    Hi RKS
    yesterday BLOG by our SUMMER WANG helps every SRM consultant to debug the PO error
    /people/summer.wang/blog/2010/05/11/trouble-shooting-of-srm-po-transfer-error
    Good work Summer wang !!
    Muthu

  • How to pass wild card '%'  value from the parameter to the query

    Hello everyone,
    I have following 2 problems
    1) I was trying to do some thing like below
    select * from emp
    where ename like 'J%'
    for this i have used the following code
    select * from emp
    where ename like :P_ENAME
    and before running the query in the parameter box i entered J%. But my report returns an error which says INVALID PARAMETERS REQUESTED.
    2) I have a req of passing both comma separated and wild card for the same parameter. If we take the same example as above,
    user should be able to enter
    a) JASON, SMITH, JOHN OR b) J%
    I have used comma separated value option of the parameter for the csv values and its working fine, but i need to add the wild card feature also to the same parameter.
    Can anyone please help me with these things?????
    Thanks in advance!!
    Raghu

    Hi Raghu,
    I guess you are in older version, You have to get into latest version to use %, it should work well
    you should use where ( ename like :P_ENAME ) or ( ename in (:P_ENAME)) for both the condition to satisfy.

  • How to hide/show a column in reports 10g according to the parameter value

    Hi,
    I want to hide a column in the report according to the parameter value, is it possible?
    For example, there is a parameter called P_TYPE. I want to hide a column called 'BALANCE' if the P_TYPE=0.
    This column is not the last one in the table, so if it is hide then that empty space should be occupied by next column.
    Is it possible means please explain me how to do it?
    Thanks in advance,
    SAN

    Create a format trigger (for both the header and the column item) that returns False on you condition.
    Set the horizontal elasticity to Contract (for both the header and the column item).
    Sometimes Contract doesn't work. Try Variable in that case. This has the disadvantage that the field can also expand.

  • How to assign values to the parameter

    I have write a procedure in procedure builder like this:
    PROCEDURE "GETMCTOREPORT" (
    p_logname IN VARCHAR2,
    p_mysql IN VARCHAR2,
    p_opyear IN VARCHAR2,
    p_exrate IN VARCHAR2,
    p_flag IN OUT VARCHAR2)
    but I don't know how to run this procedure, espically how to declare a variable and then assign to last parameter, in the procedure builder environment.
    Anyone helps me,Thanks
    PL/SQL>

    Have a look at JDeveloper and it's PL/SQL development capabilities. You can write a PL/SQL procedure click run and a window will popup letting you fill values for the parameters. And you can even debug the procedure.
    For more info:
    http://otn.oracle.com/products/jdev/htdocs/database/db_overview.html

  • How do I get (in c) a method return value from the java side?

    I have a class in the Java side, that I pass as object to the c side.
    in the Java class I have the following method:
    public String getPgmId()
    return pgmId;
    where pgmId is a private string.
    I nees to get the value of pgmId, hopefully by using the getPgmId method.
    what I have until now is:
    JNIEXPORT jint JNICALL Java_JavaAPI_StartProgram (JNIEnv *env, jobject obj, jobject obj2)
    jmethodID methID;
    jstring jstr;
    const char *str;
    /* Get a reference to obj2 class */
    jclass cls = (*env)->GetObjectClass (env, obj2);
    if (cls == NULL){
    return;
    methID = (*env)->GetMethodID (env, cls, "getPgmId", "()Ljava/lang/String;");
    }//StartProgram
    my question is how from this point, can I get the return value of the method getPgmId().
    tnx

    jString CallStringMethod(env, obj2, methID);

  • How do I set a NULL value for the parameter field

    Hi
    I've another question. I'm going to set single values for parameter fields.
    // e.g. set today for StartDate parameter field
    fc.setCurrentValue("", "StartDate", new Date());
    It should be possible to set a NULL value for date parameter fields.
    fc.setCurrentValue("", "StartDate", (Date)null);
    But this do not work. How do I set a NULL value correctly?
    Thank you in advance.
    Best regards,
    Thomas

    First question - is it a stored procedure parameter?
    You can't set a regular parameter field value to a null value.
    There was an issue with old version of the JRC, where it was allowing null to go through, but had unexpected behavior at times.
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • XML second page output overlap with predefind Header

    Hii XML Report second page output in overlap with Predefined Header (Paper Header) . so in second page how can i put down the row from Predefined Header. Thanks

  • [SOLVED] No sound in skype nor grooveshark but in phonon

    I am stuck with this problem. I've tried it all without success.. (arch forums, google, ...) I have snd-had-intel installed and in phonon (KDE) i can hear the sound. However, if I open grooveshark or skype, there is no sound. The most strange is that

  • HTML Pages/Macromedia Flash and OBIEE

    Hi there. I need to integrate an HTML page and/or Macromedia Flash app's with OBIEE. What I'm planning to do is creating a HTML or Flash page, with some fancy art representing different dashboards. When user click one of thos pics, then I must go to

  • Signing with Code Certificate from COMODO ?

    Hi, does anyone have some experience with a Code Signing Certificate from COMODO ? I exported the certificate from Chrome or IE and tried the signing for a ja file, but get: jar signed. Warning: The signer's certificate chain is not validated. Can an

  • Iphone 4 wont activate

    iphone 4 will not activate with verizon