Assigning sequential numbers for every lines within a group of records

The scenario is:
This set of records with group number, lets say 100(group number) contains 7 lines/records. How to assign line numbers (sequential) for each line within these groups on the fly during the mapping process before inserting these set of rows in the target. I know it is easy to achieve in a procedure, but not sure how to do this in the mapping.
please advice.
Thanks,
Prabha

Use Rank function
SQL> select empno,ename,deptno,(rank() over (partition by deptno order by empno)) seqno from emp;
EMPNO ENAME DEPTNO SEQNO
7782 CLARK 10 1
7839 KING 10 2
7934 MILLER 10 3
7369 SMITH1 20 1
7566 JONES 20 2
7788 SCOTT 20 3
7876 ADAMS 20 4
7902 FORD 20 5
7499 ALLEN 30 1
7521 WARD 30 2
7654 MARTIN 30 3
7698 BLAKE 30 4
7844 TURNER 30 5
7900 JAMES 30 6
1111 Test 40 1
1222 test 1
1333 2
17 rows selected

Similar Messages

  • Create sequential numbering for chapters in Pages

    Can anyone tell me how to create sequential numbering for my 'scenes' or 'chapters' when writing scripts in Pages.
    I need to have them set up, so if for example, I have...
    Scene 01
    Scene 02
    Scene 03
    and down through scenes to say...
    Scene 52
    But I write another new scene in between scene 02 and 03... I need all the other scne numbers to change automatically below the new scene, instead of me having to manually go through and change every single scene number...
    How do I do this?

    Thanks... this is a reasonable compromise, which I have already done.
    The problem with script writing is that the Scenes are generally headed like this...
    Scene 22: Int - Dinning room - Night
    Then they might have a subtitle, which is a short descriptive of the scene, such as...
    Scene 22: Int - Dinning room - Night
    (Xmas Turkey dilemma)
    So, it could work as you suggest, but it is by far a perfect formula, I am dumbfounded as to why 'Pages' doesn't have this simple function, when just about every other word processing program does. Final Draft is an industry standard for script writing, but I actually prefer Pages, I have a lot more creative control with formatting, except for this one vital function... darn!
    Thanks for you suggestion Peter,
    Cheers

  • Alphanumeric sequential numbering for customers in oracle financials

    Hi ,
    Any one please tell me how to setup Alphanumeric sequential numbering for customers in oracle receivables.
    Thanks
    Guru Prasad

    Hi
    It is either manual or automatic, that is defined system options window on AR.
    If it is automatic, than you can define the start point, sequence name is HZ_ACCOUNT_NUM_S, Responsibility Application Developer,
    Application-Database-Sequence
    I didn't try if you can put a non-numeric template.
    For manual assignment, it is 30 characters total.
    Hope this helps.
    Bilal Sarioz

  • Mail sent by the program are getting appended for every line item in ITAB.

    Hello Experts,
    My program has to send mail for every line item in my internal table. Each line itme will provide the data to be filled in body of the mail .Now the problem is when i recieve mail in outlook the body of the mail is getting appended every time i recieve the mail
    For example , if the mail has to go for 3 entry in itab out of five then i'm getting 3 mails but 2nd has body of 1 also and 3d has body of 1st and 2nd.
    I'm using loop - endloop and it is happening due to this but is there any other way out to send mails for each line without body getting appended.
    Please see the code below i'm using:-
    LOOP AT lt_bg INTO lw_bg.
    PERFORM populate_message_table.>>>>>>Preparing body
    PERFORM send_email_message.>>>>>>>>> need to capture in loop as evry line itme has distinct subject of mail
    ENDLOOP.
    PERFORM initiate_mail_execute_program.
    Thanks,
    Naveen

    Hi,
    I'm using Clear wa and refresh ITAB but still i'm getting the body appended.
    Thanks

  • CRM 2013 On-Premise How to implement sequential numbering for records?

    Hi All,
    I don't know if someone could advise me on the following.
    I have two entities, Transport Routes and Stops with a 1:N relationship. I want to auto-number the Stops records sequentially (1, 2, 3, 4, etc.)  but want to start at 1 within each Transport Route. How should go about it? Is it possible to achieve this
    with JS, or would that be a bit clumsy and would you recommend a plugin instead?
    I have an auto-numbering solution (AdvancedCRMAutoNumber from Xbitz) but that will not restart the counter position to 1 for each Transport Route - at least to me knowledge it cannot.
    Would appreciate any help!
    Thanks, Viktor

    hi Victor,
    I think you can write plugin by following below steps.
    -->Create one field in the Transport route entity to store the sequential number.
    -->As soon creating the Transport stop record get the sequential from the Transport route and create the sequential number for the transport stop.
    -->Update the Transport route record by incriminating the sequential number field.
    So every Transport route record will have sequential number which we can start with 1 as based on the stops we can increment the number.

  • Sequential numbering for pdf form

    I am trying to find out how to have sequential numbering of a pdf form that will be accessible on a shared drive. I need a new number assigned each time it is opened. Please help!

    Hi,
    There is not a way for the person filling out the form to see such a number the instant they fill out the form. If the form e-mails to the respondent with a copy of their responses however, the e-mail includes text indicating which response number their submission has counted up to. (If you also receive e-mail receipts of each submission, you would see the same info.)
    So, for instance, you and the respondent would see, at the top of the e-mail, something like:
    "The form <your form name here> has a new submission.
    Total Responses: 238"
    I hope that helps,
    Brian

  • How to Default what fields and assignment blocks appear for every user?

    Is there a standard way to default what users see in the webui? We'd like to display certain assignment blocks, fields, etc without having the user go thru the personalization process. There are certain pieces we need to display across the board for every user and would like to set this up in advance of them logging into the WebUI.
    Thanks in advance

    Hi James,
    With the business roles you can define what the user is allowed to see or do and not.
    So you create your special user business role e.g. Z_USER_SALESPRO and then you can create a business role specific configuration of the views (add/ remove fields) or overview pages (add/remove assignment blocks).
    If you want to you can also deny user with this business role the possibility to personalize their pages at all.
    If you want to show information to all user in the same way then just maintain the default configuration in the enhanced component. As the WebUI always looks for the most specific key found within the configurations available.
    Please make sure you work in default configuration of the enhanced component, else you change SAP standard cheat sheet.
    Hope this helps.
    Best regards,
    Thea

  • Deleting and Adding components in a Sub contracting PO, for every line item

    Hi,
    I have requirement where in I need to change the Item category from Blank to 'L' for a given Line item, and for this Line Item I need to go to the Delivery Schedule lines and delete the existing Components and add new components to every Delivery Schedule line. This is going to be a LSMW object with a custom program.
    I tried for recording ME22N, but couldn't do this as ME22N  is not BDC friendly, and in ME22 the Item category field is Display only. I also tried with Function modules/BAPIs but nothing seems to be working out.
    Can anybody help me get a solution to this requirement. Would appreciate a quick response as its a priority requirement for me.
    Thanks in Advance,
    Saleem.
    Ph : +91-9845627631

    1. You will definitely create two subcontracting info records for two raw materials say RAW1 and RAW2.
    2. There will be two seperate production versions for these two materials.
    3. Update respective production versions in respective subcontracting info-records.
    4. This will help to upload the alternate BOM even you changed the material from PO
    Amol

  • New contract account for every line item in subscription order....

    Hi Guys,
    I am having a problem with the subscription order.
    Whenever I change the subscription order and add a line item to it, SAP by default  creates a new contract account for that line item. Whereas I want to assign the same contract account to the second line item also.
    Can you suggest me any solution for this problem?
    Thanks in advance...
    Regards,
    Abhay

    Hello Abhay,
    This is the normal and correct function for SAP. If you would like for the subscriptions to be on the same contract that you subscriber has, an enhancement has to be developed.
    We had a similar requirement and an enhancement was developed per specifications.
    Regards,

  • How do I fix text from a PDF that has become a paragraph for every line?

    When opening a PDF in Illustrator, the text gets all messed up. Every line becomes its own paragraph, making it very difficult to edit because I have to edit every single line individually. Is there a way to get these to all become one paragraph again like it was in the original file? (P.s The original was created in illy, converted to a PDF, and now being worked on in illy again.) I am working in CS6.

    Method 1
    copy the text in acrobat
    open pdf in illy, delete all point text excetp one, paste text over this
    Method 2
    install join text frames script
    http://vectips.com/tricks/10-free-and-extremely-useful-illustrator-scripts/
    gave you 2 solutions, casue have not done this for awhile, and forgot waht was nto perfect about the script.

  • Assign carton numbers for deliver

    Hi,
    here i have two tables itab_vbfa_hu which will contain all the delivery orders and their handling units. 'X' denotes handling units.
    Itab_vekp will have handling units and  weight.
    I am trying to assign carton number basing on handling units.
    I am using loop in loop to achieve this.
    when the program pick single delivery order it is working fine.. problem i swhen i pick multiple delivery orders.. i need to differentiate the delivery orders and assign the carton number to that particular delivery orders.. same manner it should apply for all delivery orders..
    hope i am clear with my doubt..
      LOOP AT itab_vbfa_hu INTO str_wvbfa_hu
                            WHERE vbtyp_n = 'X'.
        CLEAR l_carton.
        LOOP AT itab_vekp INTO strt_wvekp
                         WHERE vbelv EQ str_wvbfa_hu-vbelv.
          l_sy_tabix = sy-tabix.
           IF str_wvbfa_hu-vbeln EQ str_wvekp-venum.
             l_carton = l_carton + 1.
             str_wvekp-carton = l_carton.
             MODIFY itab_vekp FROM str_wvekp INDEX l_sy_tabix.
           ENDIF.
      ENDLOOP.
    ENDLOOP.

    Hi
    Achieved the solution with
    LOOP AT itab_vekp INTO str_wvekp
    l_sy_tabix = sy-tabix.
    l_carton = l_carton + 1.
    str_wvekp-carton = l_carton.
    MODIFY itab_vekp FROM str_wvekp INDEX l_sy_tabix.
    AT END OF vbelv
    Clear l_carton.
    endat.
    endloop.
    this way i got the desired result of assigning carton numbers basing on handling units. with innner join statementi have got vbelv field in itab_vekp.

  • Assigning sequential numbers to multiple rows with a common attribute

    Oracle 10i, looking to modify a query to only select a total of 96 unique compoundnames and number each group of batchids 1-96.
    Input
    Table EX
    Unique_ID, CompoundName, BatchID, Quantity
    1, EX 1000, EX 1000 100, 100
    2, EX 1000, EX 1000 101, 100
    3, EX 1000, EX 1000 102, 100
    4, EX 1001, EX 1001 100, 100
    5, EX 1001, EX 1001 101, 100
    6, EX 1001, EX 1001 102, 100
    7, EX 1001, EX 1001 103, 100
    8, EX 1001, EX 1001 104, 100
    9, EX 1001, EX 1001 105, 100
    10, EX 1002, EX 1002 100, 100
    11, EX 1002, EX 1002 101, 100
    12, EX 1002, EX 1002 102, 100
    100+, EX 1095, EX 1095 100, 100
    Using
    select distinct * from
    Select Unique_id, CompoundName, batchid, quantity, SUM(QUANTITY) over (partition by CompoundName) sumqty
    FROM EX
    where sumqty < 500
    Order by 2,3;
    Gives the data batched together by compoundnames and the total quantity of all the data sharing the same compound name (and only results whose total quantity is < 500).
    I'm looking for a way to only grab 96 unique compoundnames (not total rows of data) at a time and numbering them to look like this desired output;
    Unique_ID, CompoundName, BatchID, Quantity, SUM(Quantity), ???
    1, EX 1000, EX 1000 100, 100, 300, 1
    2, EX 1000, EX 1000 101, 100, 300, 1
    3, EX 1000, EX 1000 102, 100, 300, 1
    10, EX 1002, EX 1002 100, 100, 300, 2
    11, EX 1002, EX 1002 101, 100, 300, 2
    12, EX 1002, EX 1002 102, 100, 300, 2
    100+, EX 1095, EX 1095 100, 100, 100, 96
    Thanks in advance.
    Edited by: user13112928 on Jun 26, 2010 11:49 AM
    Edited by: user13112928 on Jun 26, 2010 11:50 AM
    Edited by: user13112928 on Jun 26, 2010 12:01 PM

    Hi,
    If you want the numbers to be assigned only to the groups that remain after the groups where sumqty >= 500 or more have been excluded, then you have to assign the numbers after the groups where sumqty >= 500 or more have been excluded. All analytic funtions in the same sub-query are computed at the same time, so if you want to use analytic functions only, you have to do something like this:
    SELECT DISTINCT
    FROM     (
              SELECT      s.*
              ,     DENSE_RANK () OVER (ORDER BY compoundname)     AS rnk
              FROM     (
                        SELECT     Unique_id
                        ,      CompoundName
                        ,      batchid
                        ,      quantity
                        ,      SUM (quantity) OVER (PARTITION BY CompoundName)     AS sumqty
                        FROM     ex
                   )     s
              WHERE     sum_qty     < 500
    WHERE       rnk     <= 96
    ORDER BY  batchid
    ,       quantity
    ;Since analytic funtions are evaluated after the GROUP BY and HAVING clauses, you could also do it this way, with only one sub-query:
    WITH     got_rnk          AS
         SELECT       CompoundName
         ,       SUM (quantity)               AS sumqty
         ,       ROW_NUMBER () OVER (ORDER BY  CompoundName)     AS rnk
         FROM       ex
         GROUP BY  CompoundName
         HAVING       SUM (quantity)     < 500
    SELECT DISTINCT
           e.unique_id
    ,       e.CompoundName
    ,       e.batchid
    ,       e.quantity
    ,       r.sumqty
    ,       r.rnk
    FROM       ex          e
    ,       got_r_num     r     ON     e.CompoundName     = r.CompoundName
    WHERE       r.rnk     <= 96
    ORDER BY  e.batchid
    ,       e.quantity
    ;I'm not sure the latter will be any faster, since it needs to make two passes through ex.

  • SAP calling Vertex (taxes) for every line instead of at document level

    We use Vertex for taxes and want SAP to call Vertex at the end of the document instead of at every line item.  It then calls again for credit worthiness toward the end of the process as well.
    Does anyone have this same issue?
    How to rectify?
    Thanks,
    Michelle

    Hi Michelle,
    Note 643273 does not have to be used only if there is an error message
    Note 643273 highlights the use of summarization,
    The compression of BSET line items can be switched on via transaction
    OBCY (or the report mentioned in note 36353 for table TTYPV).
    This must be done for each reference (AWTYP) procedure separately.
    with kind regards
    Cora

  • Automatic Sequential Numbering for Archival Labels

    I am in charge of creating archival labels for my company and routinely have to edit a label template number by number by number...
    Example: The template has 24 labels, in the top left starting with 7846 and by the end the list reaching 7869. Therefore, to edit it, I have to change 24 numbers by hand every single time.
    I didn't create this template, but rather was hired after someone had already created the document.
    Since this document has to be updated so often, I figured there has to be a more efficient method to setup the fields where I could enter "7846" on the first label, and the other labels automatically number up sequentially.
    Any help or hints in this matter would be greatly appreciated. I'm very new to Pages (been using it for a week) so be kind .

    Hi lightmeup_again,
    Pages does allow formulas in Tables. For example, type 7846 in cell A2, then in B2, type a formula =A2+1
    (type the formula, press enter, then double click [maybe twice] in B2 to see this view)
    B2 contains the result of A2+1 ( 7847). Fill Right to other cells.
    The question becomes more involved when you need to start a new row. What is the layout of your table? How many rows and columns?
    Here is a small table with formulas
    Each cell in Column A must refer back to the value in the last (rightmost) cell of the previous row
    Please see my next post. Camera icon is playing up.
    Regards,
    Ian.

  • For every line item, I want to write horizontal line.

    Hello experts,
    In the main window of my sapscript form, I am displaying multiple line items. What I want to do is write a horizontal line so what I did is this:
    /: SIZE WIDTH '75.0' CH HEIGHT '0' LN
    /: BOX FRAME 10 TW
    /: POSITION YORIGIN +1 LN
    I was having a problem yesterday as to why my &ULINE& is always shorter than the width of my MAIN window. So I am currently experimenting with BOX statement. But the problem is, I want to write it after every end of a line item. I placed the code above where the original &ULINE& was placed(inside the main window).
    Hope to hear from you guys. Thank you and have a nice day to all!

    Hi,
    Below is my code inside my MAIN window.
    MAIN
    /* Element /E set outside PROTECT statement
    Element POS_ZEILE
    /: PROTECT
    I1 ,,&MSEG-ZEILE&,,&MSEG-MATNR&,,&MSEG-ERFMG&,,&MSEG-ERFME&
    /: IF &MSEG-BWART& EQ 'Z75'
    =  ,,&MSEG-UMLGO&
    /: ELSE
    /:  IF &MSEG-BWART& NE '315'
    =  ,,&MSEG-LGORT&
    /:  ENDIF
    /: ENDIF
    /: IF NOT &MSEG-BWART& EQ '631'
    =  ,,&MSEG-CHARG&
    /: ENDIF
    /: IF &MSEG-BWART& EQ '631'
    =  ,,&KNA1-NAME1&
    /: ENDIF
    /: IF &MSEG-BWART& NE '631'
    /: IF &MKPF-TCODE2& NE 'MB01' AND &MKPF-TCODE2& NE 'MIGO_GR'
    I1 ,,&MSEG-WEMPF&
    /: ELSE
    I1 ,,&MSEG-EBELN&
    /: ENDIF
    /: ENDIF
    I2 ,,&MABDR-MAKTX&
    /: PERFORM GET_RCV_LOC IN PROGRAM ZSR_GOODS_TRANSFER_SLIP
    /: USING &MSEG-EBELN&
    /: USING &MSEG-EBELP&
    /: CHANGING &WA_KOSTL&
    /: ENDPERFORM.
    /: IF &MKPF-TCODE2& EQ 'MB1A' OR &MKPF-TCODE2& EQ 'MB1C' OR &MKPF-TCODE2& EQ 'MIGO_GI'
    /:   IF &MSEG-GRUND& EQ ''
    /*     IF &MSEG-BWART& EQ 'Z29'
    /* ,,</><TX>&MSEG-SGTXT(15)&</>
    /*     ELSE.
    =  ,,&WA_KOSTL&
    /*     ENDIF.
    /:   ELSE.
    =  ,,&MSEG-GRUND&
    /:   ENDIF
    /: ELSEIF &MKPF-TCODE2& EQ 'MB01' AND &V_REVRS& EQ 'Y'
    /:   IF &MSEG-GRUND& EQ ''
    =  ,,&WA_KOSTL&
    /:   ELSE
    =  ,,&MSEG-GRUND&
    /:   ENDIF
    /: ELSEIF &MKPF-TCODE2& EQ 'MIGO_GR' AND &V_REVRS& EQ 'Y'
    /:   IF &MSEG-GRUND& EQ ''
    =  ,,&WA_KOSTL&
    /:   ELSE
    =  ,,&MSEG-GRUND&
    /:   ENDIF
    /: ELSEIF &MKPF-TCODE2& EQ 'MB1B' AND &MSEG-BWART& NE '315'
    /:  IF &MSEG-BWART& EQ 'Z75'
    =  ,,&MSEG-LGORT&
    /:  ELSE
    /:   IF &MSEG-UMLGO& EQ ''
    =  ,,&WA_KOSTL&
    /:   ELSE
    =  ,,&MSEG-UMLGO&
    /:   ENDIF
    /:  ENDIF
    /: ELSEIF &MKPF-TCODE2& EQ 'MB1B' AND &MSEG-BWART& EQ '315'
    /:   IF &MSEG-LGORT& EQ ''
    =  ,,&WA_KOSTL&
    /:   ELSE
    =  ,,&MSEG-LGORT&
    /:   ENDIF
    /: ENDIF
    /: IF &MKPF-TCODE2& EQ 'MB1A'  OR &MKPF-TCODE2& EQ 'MIGO_GI'
    /:   IF &MSEG-KOSTL& EQ ''
    =  ,,&MSEG-EBELN&
    /:   ELSE
    /:    IF &MSEG-BWART& EQ 'Z29'
    =  ,,<TX>&MSEG-SGTXT(15)&</>
    /:     ELSE.
    =  ,,&MSEG-KOSTL&
    /:    ENDIF.
    /:   ENDIF
    /: ELSEIF &MKPF-TCODE2& EQ 'MB1B' OR &MKPF-TCODE2& EQ 'MB1C' OR &MKPF-TCODE2& EQ 'MB01'  OR &MKPF-TCODE2& EQ 'MIGO_GR'
    /:  IF &MSEG-BWART& EQ '323' OR &MSEG-BWART& EQ 'Z73'
    =  ,,&MSEG-GRUND&
    /:  ELSEIF &MSEG-BWART& EQ 'Z75'
    =  ,,&MSEG-GRUND&
    /:  ELSE
    /:    IF &MSEG-UMCHA& EQ ''
    =  ,,&MSEG-EBELN(10)&
    /:    ELSE
    =  ,,&MSEG-UMCHA(10)&
    /:    ENDIF
    /:  ENDIF
    /: ENDIF
    =  ,,&MSEG-KUNNR&
    /: IF &MSEG-BWART& EQ '601'
    /  ,,   &V_BEZEI&
    /: IF &V_MATGRP& EQ 'X'
    /: ENDIF
    /: ENDIF
    /: ENDPROTECT
    /: IF &V_SERIAL_NO& = 'N'
    /: SIZE WIDTH '75.0' CH HEIGHT '0' LN
    /: BOX FRAME 10 TW
    /: POSITION YORIGIN +1 LN     
    /: ENDIF
    Element SERNUM
    /: PROTECT
    /: IF &V_SERIAL_NO& = 'Y'
    /: IF &V_FIRST_NUM& = 'Y'
    /: IF &SERIAL_TAB-END& EQ &SPACE&
    SI ,,Serial Numbers:,,&SERIAL_TAB-START&
    /: ELSE
    SI ,,Serial Numbers:,,&SERIAL_TAB-START&,,-,,&SERIAL_TAB-END&
    /: ENDIF
    /: ELSEIF &SERIAL_TAB-END& EQ &SPACE&
    SI ,,,,&SERIAL_TAB-START&
    /: ELSE
    SI ,,,,&SERIAL_TAB-START&,,-,,&SERIAL_TAB-END&
    /: ENDIF
    /: ENDIF
    /: IF &V_FINISH& EQ 'Y'
    /: SIZE WIDTH '75.0' CH HEIGHT '0' LN
    /: BOX FRAME 10 TW
    /: POSITION YORIGIN +1 LN
    /: ENDIF
    /: ENDPROTECT

Maybe you are looking for

  • Need help with If statement Please

    Hi guys, This is my first time posting and sorry if for some reason i post incorrectly. I am having trouble figuring out what I am doing with my if Statement and why the compiler is giving me an error which says 'cannot find symbol'; Just incase you

  • Premiere Pro CS6 on Mac crashes when attempting to capture HDV

    I've seen this topic previously but without an answer and was hoping for an update. I'm using Premiere Pro CS6.0.5 on a MacPro running 10.9.2 The camera is a Sony HDR-FX7. When in the capture window, the camera is recognized. I can rewind and fast fo

  • Where can I get an EU power supply for my late 2009 mac mini

    I have a late 2009 mac mini.  The power supply is good for US voltage only.  The new mac mini specs say they can accept 110 - 220 VAC, 50-60 Hz.  Will one of these new power supplies work with my older mini?  Where can I get one, can't seem to locate

  • Problem with MathType and CS5 due to InDesign

    We publish Math and Science curriculum and we run into the problem below. the second bullets is imported wrong in CS5. Is there a work around? (I also emailed Design Science). We'd rather use CS5 since all our other subjects are done in CS5 and we wa

  • Cannot open pdf files after installing app

    I have installed the adobe reader app on my tablet but when I try to open a pdf file it downloads and when I try to open it from my downloads it says cannot open file. Please help!