Check Quantity input

Hi,
I'm developing a program which uploads data from a text file (.csv) and creates sales orders.
The user inputs material quantity in a format according to his user profile settings. (decimal point might be , or .)
Now I need to check whether the value input is according to the profile settings, if not I include this record in error log.
If value input is in correct format, I need to convert the value entered to SAP internal format (eg: 34,563 to 34.563) before passing it to bapi.
I used function module CATS_NUMERIC_INPUT_CHECK, but it works for nummbers with upto 2 decimal places. But quatity has 3 decimal places.
Please guide me.
Regards,
Ravi

Hi,
You probably  reading text file into an internal table (say it_data).
All filed of you internal table should be of type char.
And before uploading it to BAPI or BDC. You should change format according to user profile settings.
Write it_data-mat_qty to lv_mat_qty.
Then this variable lv_mat_qty will have decimal point as per user profile settings.
Ashutosh

Similar Messages

  • Material not subj. to inventory mgmt. in plant F315 (Pl. check your input)

    Sir,
    i am facing an issue while making sto's
    the error is as follows "Material not subj. to inventory mgmt. in plant F315 (Pl. check your input)"
    do i need to customise some settings
    ply help
    regards
    amey

    Hi
    Go to OMS2 click material type for this material you have taken..
    Then click quantity/value updating, then for your valuation area ( i.e plant), click the quantity updating and value updating indicator.
    Regards,
    Raman

  • How to check current input/output rate on router subintenterface via SNMP?

    How to check current input/output rate on router (2821, etc..) subintenterface via SNMP, like cacti monitoring system.
    I cant find OID to make this with snmpwalk.
    Or there is no way to check current load by this way? Only polling?
    P.S. Ethernet subinterface, of course.
    With great respect, S.A.

    Hi,
    Try to use:
    1.3.6.1.4.1.9.2.2.1.1.6 - InBitRate
    1.3.6.1.4.1.9.2.2.1.1.8 - OutBitRate
    1.3.6.1.4.1.9.2.2.1.1.28 - ifDescription

  • CRM 5.0 Billing - 'No data found..................check your input' message

    Hi everyone,
    I am facing this message :
    "No data found for the criteria specified - check your input'
    This occurs when : (CRM Billing)
    1.
    I try the step "Maintain Billing due list',punch in a 'Billing Type' and hit Maintain(F8)
    - I get the above message & it does not show my released document number to proceed further w/ Individual or Collective Billing.
    2.
    I try the step "Maintain Billing due list',punch in a 'Billing Type' and error free "Service Order' or a 'Service Confirmation' document number that is released.
    - I get the above message & it does not show my released document number to proceed further w/ Individual or Collective Billing.
    Background:
    I am working on a CRM Service scenario of Service Order to billing and another Service Order to Confirmation to Billing scenario.
    I have done a check of the prerequistes: (Input Processing)
    Billing type, item category, item category determination etc - looks perfect.
    Anybody facing similar situations & got to the problem, would greatly appreciate your wisdom for the benefit of all .
    (any threads, SAP Notes, documentation, pointers , soulations would be appreciated)
    Will reward points generously !!!
    cheers,
    Sam V

    Hi Sam,
    What he meant was: did you go to txcode: CRM_SRVBIL to release the transaction for billing purpose.
    This has to be done before your billing due list are filled with the billable items.
    regards,
    anthony

  • Any function to check the input value is integer?

    May I know if there's any function to check the input value is integer in Form 4.5?
    Thanks.

    just to add :) - (couldn't resist) :
    create or replace function is_integer ( p_number in varchar2 ) return boolean is
      v_return boolean := true;
      v_number number;
    begin
      v_number := p_number;
      if v_number != trunc(v_number) then
        v_return := false;
      end if;
      return v_return;
    exception
      when others then
        v_return := false;
        return v_return;
    end;
    begin
      if not is_integer(1.1) then
        dbms_output.put_line('is not');
      end if;
      if is_integer(1) then
        dbms_output.put_line('is');
      end if;
      if not is_integer('a') then
        dbms_output.put_line('is not');
      end if;
    end;

  • How to use Pl/sql block to edit check user input

    Hi,
    Please advise on PL/SQL Block code that could be used to Check User input from within a Loop and proceed conditionally based upon User Supplied compliant Input. Thanks in advance.

    Hi,
    yakub21 wrote:
    You could use the ACCEPT to get user input and then assign the input to a variable that could then be verified.
    I believe that anything is possible because we don't yet have proof that it is not!
    I do have code that can accept user input. Is it PL/SQL code? Sybrand was clearly talking about PL/SQL:
    sybrand_b wrote:
    Pl/sql is for server side code, it is not a front end tool, and it is incapable of the functionality you describe.If you do have PL/SQL code that accepts user input, please post an example. A lot of people, including me, would be very interested.
    Pass the user-input value to a variable and then assign that value to another variable from within a Declare of a PL/SQL Block.
    The opportunity here is to figure a way to loop with user input until desired input is entered by the user before proceeding with the code. I'm using PL/SQL Block because I don't want the code to persist. I just want to run it as part of database configuration procedure. ThanksIt sounds like you're talking about SQL*Plus, which is a very poor tool for looping or branching.
    It's possible, but it's not pretty. The following thread shows one way of looping in SQL*Plus:
    Re: How to give the different values to runtime parameters in a loop?

  • Check User inputs ( sap.m.input / sap.m.inputType )

    Hi there,
    I'm trying to check user inputs using sap.m.inputs.
    I want my inputs' state to be changed when their value breaks a constraint.
    For example :
    <input type="Number" .../> => Value is "Azerty" => Error, control's valueStat = Error, the inputs becomes red ( as in the example).
    <input type="Number" ... value="{  path:'Id',  type: 'sap.ui.model.type.Integer',  constraints: {  minimum : 0,                                             maximum : 3 }   } /> => Value is "4" => Error
    My view is binded to an odatamodel, and described as below  :
    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
        xmlns="sap.m" xmlns:form="sap.ui.layout.form" controllerName="fioriform.manufacturerFormPage"
        xmlns:html="http://www.w3.org/1999/xhtml">
        <Page title="Manufacturer" showNavButton="false" navButtonPress="handleNavButtonPress">
            <content>
                <form:Form id="aForm">
                    <form:formContainers>
                        <form:FormContainer>
                            <form:formElements>
                                <form:FormElement>
                                    <form:label>
                                        <Label text="Id" />
                                    </form:label>
                                    <form:fields>
                                        <Input id="inputId" type="Number" placeholder="Enter an id" maxDigit="2"
                                            valueStateText="Maximum 3 digits."
                                            value="{
                                                path:'Id',
                                                type: 'sap.ui.model.type.Integer',
                                                constraints: {
                                                    minimum : 0,
                                                    maximum : 3
                                                }" />
                                    </form:fields>
                                </form:FormElement>
                                <form:FormElement>
                                    <form:label>
                                        <Label text="Name" />
                                    </form:label>
                                    <form:fields>
                                    <Input id="testMail" type="Email" valueStateText="Fail." />
                                    <Input id="nameInput"
                                     type="Text"
                                     placeholder="Enter Name ..."
                                     valueStateText="Name must not be empty. Maximum 10 characters."
                                     value="{
                                         path:'',
                                         type:'sap.ui.model.type.String',
                                         constraints : {
                                             minLength: 1,
                                             maxLength: 10
                                         }"/>
                                        <Input id="inputName" type="Text" placeholder="Enter a manufacturer name"
                                        valueStateText="Name must not be empty. Maximum 10 characters."
                                            value="{
                                                 path : 'Name',
                                                  type: 'sap.ui.model.type.String',
                                                   contraints:'{minLength:1 , maxLength:10}'
                                            />
                                    </form:fields>
                                </form:FormElement>
                                <form:FormElement>
                                    <form:label>
                                        <Label text="Street" />
                                    </form:label>
                                    <form:fields>
                                        <Input id="inputStreet" type="Text" placeholder="Enter the street"
                                            value="{Address/Street}" />
                                    </form:fields>
                                </form:FormElement>
                                <form:FormElement>
                                    <form:label>
                                        <Label text="City / Zipcode" />
                                    </form:label>
                                    <form:fields>
                                        <Input id="inputCity" type="Text" placeholder="Enter city"
                                            value="{Address/City}" />
                                        <Input id="inputZipCode" type="Text" placeholder="Enter zipcode"
                                            maxLength="6" value="{Address/ZipCode}" />
                                    </form:fields>
                                </form:FormElement>
                                <form:FormElement>
                                    <Button text="Save" press="handleSave" />
                                </form:FormElement>
                            </form:formElements>
                        </form:FormContainer>
                    </form:formContainers>
                    <form:title>
                        <core:Title text="Manufacturer edit" />
                    </form:title>
                    <form:layout>
                        <form:ResponsiveGridLayout />
                    </form:layout>
                </form:Form>
            </content>
        </Page>
    </core:View>
    I have already checked : sap.m Explored  - Checked  and sap.m Explored Types.
    I have tried to attach some functions to the core as : sap.ui.getCore().attachValidationSuccess, sap.ui.getCore().attachParseError, sap.ui.getCore().attachValidationError but without being successful ( no one is called ).
    I have also tried to call a function onChange ( <Input ... change="myFunction"/> ) but i need to rewrite what UI5 seems to check and do alone.
    None of my inputs works except Email even if its behavior it's strange. It becomes red when an email is not well entered, but the displayed text is not "Fail", it is the standard message.
    I do not understand those mechanics. Can someone explain it to me?
    Thanks for Helping,
    Regards,
    Marc

    i will try this then i come back yo you.
    Thanks,
    Regards,
    Marc
    edit: it works but like i said before, i do not want to rewrite what UI5 seems to do alone - when specifiing types and values -.
    I would like somebody to help me out in my ignorance here.
    Message was edited by: Marc BROSSAIS

  • What about attribute 'checked' of input? What i should do: "removeAttribute('checked')" or "checked = false"?

    SCRIPT
    function vibor(){
    if (document.getElementById('autologin').checked = true){
    document.getElementById('autologin').removeAttribute('checked');
    document.getElementById('autologin1').style.backgroundPosition = 'left top';
    } else {
    document.getElementById('autologin').createAttribute('checked');
    document.getElementById('autologin1').style.backgroundPosition = 'left bottom';
    /SCRIPT
    If i used "removeAttribute", in face input is checked. But if i used "checked = false", input's face not checked, but it checked in HTML code (if FireBug don't lies).
    Please, helped me somebody! I don't know what i should do.
    P.s. Please, don't scold me for my English. I don't speak English very much and that have a cause - i'm 14 years old and lived in Russia, where nobody may helped me.

    It is not an attribute, but a Boolean JavaScript variable and you can't remove it.
    Note that <i>if (document.getElementById('autologin').checked = true){}</i> will set that variable always to true.
    You probably want this:
    <br />
    <pre><nowiki>function vibor(){
    if (document.getElementById('autologin').checked == true){
    document.getElementById('autologin').checked = false;
    document.getElementById('autologin1').style.backgroundPosition = 'left top';
    } else {
    document.getElementById('autologin').checked = true;
    document.getElementById('autologin1').style.backgroundPosition = 'left bottom';
    } </nowiki></pre>

  • Error Acct. assgt. category 3 not defined (please check your input)

    Hello all I'm trying to create BAPI_PO_CREATE and getting error " Acct. assgt. category 3 not defined (please check your input) ".
    What is this Account assignment category concept in SAP ? What input value should i change ?

    Hi
    In addition to Srinivas, account assigment 3 is missing in OME9 in your case
    So before running your Bapi make the necessary settings
    Thanks
    vishnu

  • Check user input

    Have this small script (my first attempt in Scripting), which is loaded with Acrobat 9 at startup.
    app.addMenuItem({ cName: "Gem &KMS-skrivelse", cParent: "File", cExec: "SaveAs('registreringsmeddelelse', 'produkter/')", nPos: 3 });
    app.addMenuItem({ cName: "Gem &dokument i sag", cParent: "File", cExec: "SaveAs('', '')", nPos: 4 });
    function SaveAs(cName, cDirectory)
        //Get full year
        var date=new Date();
        cYear = date.getFullYear();
        //Get year, case number and file name from user input
        var cYear = app.response({ cQuestion: "Indtast sagsår:", cTitle: "Sagsår", cDefault: cYear });
        var cCase = app.response({ cQuestion: "Indtast sagsnr.:", cTitle: "Sagsnr."});
        var cFile = app.response({ cQuestion: "Indtast filnavn (uden .pdf):", cTitle: "Filnavn", cDefault: cName });
        if (cFile == null)
             return;
        //Concatenate path string
        var cPath = "/h/digi/s" + cYear + "/" + cYear + "-" + cCase + "/" + cDirectory + cFile + ".pdf";
        //Try to save the document, if success, inform the user where to
        try {
            this.saveAs({ cPath: cPath, bPromptToOverwrite: true });
            app.alert("Dokumentet blev gemt i " + cPath, 3);
        catch(e) {
            app.alert("Kunne ikke gemme dokument i " + cPath + ". Kontroller at mappen er oprettet, og at du har skriverettigheder til denne, samt at Acrobat/Reader er sat korrekt op.");
        //So long and thanks for all the fish
        return;
    Based on user input it saves documents to folders on a network share.
    It  works just fine, but if the user cancel the input dialog, null is  returned, and eventually will be part of the filename. So I use a if  statement to check if cFile is null, and if true just returns the  function. But this fails with this error message:
    GeneralError: Handlingen mislykkedes.
    Root.(null):17:Menu Gem &dokument i sag:Exec
    script terminated
    Why is this so?
    Best regards
    mp

    The script still continues after return;
    Try this
    app.addMenuItem({ cName: "Gem &KMS-skrivelse", cParent: "File", cExec: "SaveAs('registreringsmeddelelse', 'produkter/')", nPos: 3 });
    app.addMenuItem({ cName: "Gem &dokument i sag", cParent: "File", cExec: "SaveAs('', '')", nPos: 4 });
    function SaveAs(cName, cDirectory)
        //Get full year
        var date=new Date();
        cYear = date.getFullYear();
        //Get year, case number and file name from user input
        var cYear = app.response({ cQuestion: "Indtast sagsår:", cTitle: "Sagsår", cDefault: cYear });
        var cCase = app.response({ cQuestion: "Indtast sagsnr.:", cTitle: "Sagsnr."});
        var cFile = app.response({ cQuestion: "Indtast filnavn (uden .pdf):", cTitle: "Filnavn", cDefault: cName });
       if (cFile == null)
    else
        //Concatenate path string
        var cPath = "/h/digi/s" + cYear + "/" + cYear + "-" + cCase + "/" + cDirectory + cFile + ".pdf";
        //Try to save the document, if success, inform the user where to
        try {
            this.saveAs({ cPath: cPath, bPromptToOverwrite: true });
            app.alert("Dokumentet blev gemt i " + cPath, 3);
        catch(e) {
            app.alert("Kunne ikke gemme dokument i " + cPath + ". Kontroller at mappen er oprettet, og at du har skriverettigheder til denne, samt at Acrobat/Reader er sat korrekt op.");
        //So long and thanks for all the fish
        return;

  • Checking Quantity of a Material

    Hello,
    Just a simple question. Is there a way by using the SAP Table or the Function Modules to check if quantity/stock of a material given on a certain date and specific plant?
    Hope to hear from you soon. Sorry If I can respond sooner.
    Thank you and good day.

    hi
    you can use one of the two t-codes to get the necessary info.
    In MB52 - Shows Material,Material Description,Plant,Storage Location wise Different Stock Value,and Total Value
    In MB5B - Shows Material,Material Description,Plant,Storage Location, Material Doc., Movement Type, Posting Date wise total Receipt and Issue
    Thanks.

  • Want  to check whether input field in selection-screen is numeric or not

    i have a select -option in  selection-screen  in which user enters a value.i just want to check if this value is numeric then it should  be 18 positions prefixed with zeroes if numeric like 000000000000400000  and needs to be left justified if not numeric like G0032-BTI.
    i check the fourm also but it didn't helped me.
    i m using the code.
    SELECT-OPTIONS : S_MAT FOR CDHDR-OBJECTID,
    LOOP AT S_MAT.
    if  S_MAT ca sy-abcde  .
      shift s_mat left deleting leading space.
    else.
        SHIFT s_mat RIGHT DELETING TRAILING SPACE.
        TRANSLATE s_mat USING '0'.
    ENDIF.
    endloop.
    can anybody help.
    <REMOVED BY MODERATOR>
    thanks
    Edited by: Alvaro Tejada Galindo on Jan 17, 2008 4:00 PM

    I have a solution for you! Try this code below, just copy/paste "as-it-is".
    TABLES: cdhdr.
    DATA: gv_type TYPE dd01v-datatype.
    SELECT-OPTIONS : s_mat FOR cdhdr-objectid.
    AT SELECTION-SCREEN.
      LOOP AT s_mat.
        CLEAR gv_type.
        IF NOT s_mat-low IS INITIAL.
          CALL FUNCTION 'NUMERIC_CHECK'
            EXPORTING
              string_in = s_mat-low
            IMPORTING
              htype     = gv_type.
          IF gv_type NE 'NUMC'.
            MESSAGE e016 WITH 'Not Numeric'.
          ELSE.
            SHIFT s_mat-low LEFT DELETING LEADING: '0', space.
            CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
              EXPORTING
                input  = s_mat-low
              IMPORTING
                output = s_mat-low.
            MODIFY s_mat TRANSPORTING low.
          ENDIF.
        ENDIF.
        IF NOT s_mat-high IS INITIAL.
          CALL FUNCTION 'NUMERIC_CHECK'
            EXPORTING
              string_in = s_mat-high
            IMPORTING
              htype     = gv_type.
          IF gv_type NE 'NUMC'.
            MESSAGE e016 WITH 'Not Numeric'.
          ELSE.
            SHIFT s_mat-high LEFT DELETING LEADING: '0', space.
            CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
              EXPORTING
                input  = s_mat-high
              IMPORTING
                output = s_mat-high.
            MODIFY s_mat TRANSPORTING high.
          ENDIF.
        ENDIF.
      ENDLOOP.
    I hope this solves your problem.
    Cheers,
    Sougata.

  • Using a button to check an input text field

    I am an educator and I am designing an interactive activity for my students. I created two buttons named button_B and button_G, and an input textfield named in_Text.  When a student presses button_B, the letter "B" is entered into the input text field; if a student presses button_G, the letter "G" is entered into the input text field. More than one letter entry is acceptable as a student's answer: for exmple the entry BBB, BGB within the input field is okay.  I have no trouble writing AS3 to accomplish this task, however:
    For a student's solution to the input text field to be correct, it has to contain the four values BBB, GGG, BGB, and GBG in any order. I created an array named solution_S with these values. I also have an enter the solution button named enter_btn. The student can check their solution by pressing the enter_btn button; if the input textfield is correct, the quiz moves on to the next frame in my timeline; if it is incorrect, it moves to a different frame in my timeline. How would I enter this actionscript to accomplish this? Thanks much!

    var check:Boolean=false;
    for(var i:uint=0;i<solution_S.length;i++)
      if( solution_S[i].toString()==in_Text.Text)
    check=true;}
    if(check)
    gotoAndStop(...);
    else
    gotoAndStop(...);

  • Retriggering of checks after input in transactions

    Hi all,
    I'm working on an enjoy transaction on an old R3 system (46C).
    When an user enters some info (e.g. by writing into an input field and pressing "enter"), the following - standard - sequence is triggered:
    (the user press enter) 1-> standard code execution 2-> USER EXITS 3-> ... 4
    Now; i have to implement a check in an user exit and I'd like to obtain a sort of rollback in case of negative check.
    The idea is as follows: if the field X has been changed, ask the user (via popup) to confirm. If the user confirms then the flow should go regularly. If the user says "no", I'd like to "rollback" the modification.
    Now; the situation the user changes is dynamically updated using IMPORT/EXPORT to memory.. so the problem to restore the previous situation is quite easy.
    The problem is, after that field X has been restored to the previous value in 3, how can I "rollback" from 3 to 1?
    Alternatively; is there a way, after 3 has been executed, to trigger again the sequence from scratch after restoring the correct field value?
    The problem is generated because that changed value also triggers some standard behaviours that I'd like not to be executed if the user want to undo the change. Another solution could be to trigger again the sequence when restoring the value.
    Looking forward to your help, thanks again

    Solved. Unfortunately it didn't solved my task, anyway the param EX_RECHECK_ITEM in some mereq's exits should do the trick.

  • Check string input

    I tried to use pattern class to check user's input, here is the code
    public boolean InputCheck()
    String REGEX,REGEX_S;
    Pattern pattern;
    Matcher matcher;
    REGEX_S = "\n";
    Pattern p = Pattern.compile(REGEX_S);
    String[] items = p.split(data); //data is a string
    //first try to use split() to split string data to lines
    for(int i=0;i<items.length;i++)
    //then for each line of data ,check if it's ok for the format
    REGEX="^(-?\\d*)\\s(-?\\d*)$";
    pattern = Pattern.compile(REGEX);
    matcher = pattern.matcher(items);
    if (matcher.find()==false){
    return false;
    //if one line not, reture false
    can any one can tell me what's wrong with this code, cos the compiler keeps say ing there is a missing return statement,thanks

    This is because the return statement IS missing =P
    public boolean InputCheck() {
        String REGEX, REGEX_S;
        Pattern pattern;
        Matcher matcher;
        REGEX_S = "\n";
        Pattern p = Pattern.compile(REGEX_S);
        String[] items = p.split(data); //data is a string
        //first try to use split() to split string data to lines
        for(int i=0;i<items.length;i++)
        //then for each line of data ,check if it's ok for the format
            REGEX="^(-?\\d*)\\s(-?\\d*)$";
            pattern = Pattern.compile(REGEX);
            matcher = pattern.matcher(items);
            if (matcher.find()==false){
            return false;
            //if one line not, reture false
        return true; // <----- you've missed this!
    }

Maybe you are looking for

  • Incomplete TOC in Word output

    I am working on making a small intro piece of the RH8.01 project to serve as a customer onboarding tool. First rev I left the default TOC inplace but selected only those 12 tpoics I want to use. (FYI, I am building some small Cap4 sims to be inserted

  • TNS Listener -ORA-12514 error following database shutdown - Oracle 11g

    Hi I have hit a problem with my oracle development database. When in sqlplus I executed the shutdown command, but nothing happened for several minutes and it was just hanging. No messages were displayed to the screen. The only thing was to close the

  • How to add new a font with Forms 6i running on Web URGENT !!!

    In Forms 6i , I have added a new Font and installed it successfully .In client Server mode the Form is Successfully Showing me the newly added font. But when I run this Form on Web It does not shows me the font correctly. The font is a True Type Font

  • Re: Code in Approve() method

    Hi Experts,                I have designed a form  with three buttons like SUBMIT, APPROVE ,REJECT and opened in NWDS.When I click on the Submit() button it triggers the GP and am getting the mail with the form having two buttons Approve & Reject.At

  • Meetingplace express password recovery

    Hi Does anybody know what the procedure is to recover the mpxadmin password on MeetingPlace Express?