How to generate the sequential number in Javascript

Hi ,
I am facing one issue.
I am adding the record to the underneath record and it works fine. But I have one problem there. I am having 10 records and adding one record between any of those records. I can able to reinitialize the index using xfa.form.recalculate(1). it works fine..
Issue is : Newly inserted subform has 10 fields....But the issue is, I have to populate the number on the one of the field(F1) in newly added recordbetween 8&9 and the field F1 values to be 001. If I add second record between 18th and 19th record that record F1 field should become 002...It is not one way they may even create the record between 2 and 3 after created the 18th record.. Now I have to renumbering the all newly added records like 2&3 F1 become 001....8&9 F1 become 002...18th&19th F1 should have 003..
As you said, I took the get full year with substring.  The number is : last two digit of year+ F or R + (sequence number 001 or 002 or 003 only newly added record fields F1)..
I added the code in click event rightnow I am getting 10F- ... I dont know how to get sequence number for Only Newly added records..
when I add it first time I can populate the 001..But when I add the second record I have to somehow remind it already I added 001 and this time I have to add 002..Globally can we declare the varaible ?
Help really appreciated...
Thanks
GJ

Hi Chandra,
let say I am creating one global varaible a = 1. In the event directly I can use a = a++ like that right..No need of var a statement..
Thanks
GJ

Similar Messages

  • How to generate the batch number for group of records

    Hi All,
    requirement: i have created one sequence to generate the batch numbers.i have to get the nextval of the sequence for batch number (this column is not part of the table. its dynamic column/alias column) only for every 50000 records of a table.
    detail description:
    for example, if i have 10 records in a table. And, if i want to generate the batch number for every 2 records, then the output should look like belo.
    batch-number qty
    1 10
    1 20
    2 30
    2 40
    3 50
    3 60
    4 70
    4 80
    5 90
    5 100
    Please help me on this. Please let me know if you need more info.

    one more update on the above request. this has to be done using SQL query only.

  • How to generate the request number for the changed  script

    Hi guys
        I am having a reqirement, to modify the script which was already transported to production server. I changed the script, but while saving it is not asking any request number.
        On which request number it is getting saved?
        Or is there any methods to generate the <b>request number for the changed script</b>
         Kindly suggest me the procedure with step by step operation.

    Goto Se03 Transaction : 
    select change object directy entries ->execute->select one empty check box ->FORM-> your form name -Execute->

  • How to generate new perner number using Abap Code in pa0002. what is the fu

    how to generate new perner number using Abap Code in pa0002. what is the function Module used.

    hi
    define internal number ranges for ur implementation then when u run PA 40  do not input any employee number , system will generate the employee number automatically.
    Regards
    sameer

  • Very Urgent : how to generate continious sequential No. (se 38 + smartform)

    Dear All,
                 Could you plz tell me how to generate continious sequential  No.. Atually i have to print TC No. on the form, but it's not available in the SAP. TC No. should be in sequence i.e for first time say it 's 10, at the second time it should be 11, third time it should be 12 and so on.
    Plz tell me ASAP. It's very urgent.
    Looking forward to your earliest response.
    thanks in Advance.
    Gulrez Alam

    You can create a number range(SNRO) to get the continuous numbers.You can use the FM 'NUMBER_GET_NEXT' to get the next number from number range.

  • How to get the selectOneRadio value in javascript

    Hi,
    I want the selectOneRadio value in javascript. Can anyone give us a solution how to get the selectOneRadio value to javascript from jspx page.
    Thanks,
    Eswari

    Hi,
    I assume you are talking about JDeveloper 10.1.3 in where there is no JavaScript API ADF Faces.Here you will have to use document.getElementById() to access the radio button component (which is a list component). You can look at the generated HTML for how the component and its ID look like.
    However, what is the usecase that you cannot handle in native JSF ?
    Frank

  • How to cancel the delivery number in the billing due list

    Hi Gurus,
    My User has created the Consignment Fillup order and Dlivery for that order.
    Now User asking that the delivery number coming into Billing Due list (VF04).
    As you know all for Consignment Fillup there is no invoice. Please suggest me
    how to cancel the Delivery number in Billing Due list for above scenario.
    Br,
    Satish

    What you have faced is not at all an issue.  Its a standard behaviour only.  Though you are not generating commercial invoice here, you can generate (F8) proforma via VF04 in bulk.  Either you can generate one proforma per delivery or consolidate multiple deliveries into one proforma which it depends on VTFL copy control for the field Data VBRK/VBRP.   There if you maintain 001 or 007, you can club multiple deveries and if you maintain 003, one proforma per delivery can be created.
    thanks
    G. Lakshmipathi

  • How to generate the deferent pdfs for deferent vendor ?

    Hi,
    i have requirement to generate the each pdf for each vendor and i need to mail those pdfs to respective vendor,
    here i am facing the prob to generate the no of pdfs for deferent vendors...please can any one help me in this how i generate the no of pdfs ?? using wrapeer program ....
    if possible any one can provide some example code..(Exmplae program)
    Thanks,
    PK..

    There are two function use one for convert PDF and second use to email, hope it will give u idea proper.
    Assigning the OTFDATA to OTF Structure table
      CLEAR gt_otf.
      gt_otf[] = gs_otfdata-otfdata[].
    Convert the OTF DATA to SAP Script Text lines
      CLEAR gt_pdf_tab.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = gv_bin_filesize
        TABLES
          otf                   = gt_otf
          lines                 = gt_pdf_tab
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = gs_docdata
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = gt_objpack
            contents_bin               = gt_objbin
            receivers                  = gt_reclist
          contents_txt               = i_objtxt
            object_header              = objhead
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.

  • How I can change sequential number in RFUMSV00 (Spanish declaration of VAT)

    Hi!
    How I can change sequential number of Output /Input Tax in RFUMSV00 transaction (Spanish declaration of VAT)?
    In input declaration I would like to have one sequential number for input tax and for output tax that appears on in.  Is possible with standard Sap or I need a Z-transaction?
    Thanks

    Dear friend,
    Please refer the below note.
    SAP Note 849459
    Reg
    Madhu M

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to delete the Request Number

    Hi all,
                 How to delete the Requset Number in Development Client.Already i transported this Req. Number to Tesing Client.

    For what purpose, deleting the request number won't restore your dev system. You can remove the request from the import queues via transaction STMS to insure it will not be accidentally imported.
    You can usually only destroy a request in source system if it has not been released and all objects are unlocked, but this is risky in some cases and may cause a loss of information or coherence.
    Regards

  • How to retrieve the vendor number during creation of Purchase Order?

    Dear SAP experts,
    For our Purchase Orders, during PO creation (t-code ME21 or ME21N) we want to achieve the following:-
    1) default the delivery address to our plant A address if the vendor is local and
    2) default the delivery address to our plant B address if the vendor is foreign.
    At the moment, we are trying to use the user exit enhancement "MMDA0001" to achieve the above.
    The problem is how to retrieve the vendor number from the screen so we could pass the vendor number to ZXM06U32 to check the ktokk field in LFA1 table in the whether the vendor is foreign or local.
    Thank you in advance.
    Regards,
    Alex

    u can do one thing, create 2 partner function, like 1 for local, and second for import vendor.
    or make 2 batch  n activate vendor batch and make mandatory field from SPRO. 
    then goto SHD0, and do one by one step. first time take 1st requirement and second time take second . like that make two variant .
    i dont know how much it will be helpful. bt i want to suggest smth like that only.
    or, go for ABAPER help
    thanks
    nisha

  • How to get the total number of pages printed in a report?

    Hi All,
    I have a requirement where I need to print a frame of fields only in the last page. Unfortunately I cannot use the 'Print Object On' property as it doesnt work in my case. So, I am planning to write a format trigger on the frame to return TRUE if the page is the last physical page. Now, I need to know how to get the total number of physical pages that will get printed in the report so that I can use this to manipulate the frame. I was planning to use the 'Total Physical Pages' built-in, but it seems like I can just use it to print in a field and I can't use this field's value anywhere in the plsql code (formula column function/format trigger) in the report. Is there anyway to get the total number of pages printed in the report which can be used in the report plsql code?
    Thanks,
    Srini.

    i found the solution, thanks

  • How to get the page number in the break section?

    Hi expert,
    The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
    ABC Compnay
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 1
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 2
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    CDE Company
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    How to get the page number in section break level?

    Hi Wes
    * Create a Field on the margin.
    * Set its "Source" to "Page Number"/"Physical Page Number".
    * Click "Page Numbering" button.
    * In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
    This should cause Reports to increment the page number until the "Company" repeating frame resets.
    Regards
    Sripathy

  • How to hide the PORT NUMBER from the URL

    Hi,
    We have Application on Node 1 and Database on Node 2
    Apps Version: 11.5.10.2
    DB: 9.2.0.6
    We recently added a new node to act as web server for iSupport.
    Now we are able to access the url using public Ip-address which looks like
    http://<Internet Ip-Address>:<PORT NUMBER>
    Eg: http://******.com:8000
    But we dont want the *'PORT NUMBER(8000)'* to be displayed.
    How to hide the port number ?..
    Thanks in Advance,
    Mahesh

    Hi Hsawwan,
    Can you plz explain me the steps how to hide the port number from the url as our network administrator is not aware of this.
    Regards,
    Mahesh

Maybe you are looking for

  • Variance Journal Appear in Reversal Goods Receipt of CO Production Order

    Good afternoon Currently we face a problem that variance journal appear when doing Reversal Goods Receipt (MBST) of CO Production Order. But the variance journal appear after we reverse goods receipt for the second time, third time, and so on. No pro

  • WEBUTIL (attach and view files from database) --- Vista vs. XP differences

    I have attached the following code. We are using Oracle Application Server 10.1.2.3 patch My questions are provided following the code. -- Open the local temporary file -- -- v_COMMAND := 'cmd /c start "" /WAIT "' || v_FULL_FILENAME || '" /w'; v_COMM

  • Smart folder doesn't include all the files it should

    I'm trying to set up a smart folder to show all .graffle (OmniGraffle) documents on my Mac modified within the last 7 days, but no matter what I do, there are many that don't show up. Even if I just set up a simple query to show all .graffle files, i

  • Hide the "show complete album" option?

    I have many incomplete albums that I don't want to complete, and so have no interest in seeing "show complete album" every time I'm listening to something from one of them.  Is there a way to get rid of this? Thanks.

  • How to extract Project Plan Cost

    Hi SDNs, I need extract the Project Plan Cost which we can display via t-code CN41N,which datasource can I use to do it? Thanks a lot. Best regards Simon Liu