System Extract - Incrementing a sequence number in detail record layout

I have a system extract for a bank that requires a file header, batch header, detail, batch trailer and file trailer record. The detail record is at the run result level as I am looking to choose all records for a particular deduction (savings bonds) and I also have to put employee ssn and full name. This is working fine. I also have to put a sequence number, ie. detail record layout is record type, length 2, string, record sequence number, 5, ?????, employee SSN, length 9, field, employee full name, length 9, field. I need to increment the record sequence number by one for each detail record in the file. Ie. detail record 1 has record sequence number of 00001, detail record 2 has record sequence number of 00002.
What type of data element would I set up? For this particular field, I don't need to go against a database field, I only need to keep track of the previous record's sequence number so that I can keep incrementing by 1 until all detail records have been written. The batch trailer has a record count of the number of detail lines and that works fine because I've set that up as a type 'total' with a 'count' of the detail records. I also have in the batch trailer a sum of the pay values from each of the detail records and that works fine as subtrailers allow total data elements where detail records do not.

You can use any of the below mentioned 2 options in the ctl (Control) file:
1. SEQUENCE(1,1)
2. "xxcust_autoinv_seq.nextval"
where xxcust_autoinv_seq is a database sequence.
Thanks,
Angelica.

Similar Messages

  • Counting the number of detail records at target side...

    Hi
    I have a requirement where i need to caluclate the number of detail records formed and add it in trailer section...both at target side...
    The output will look like this :
    <Detail>
        <Field></Field>
    </Detail>  
    <Detail>
        <Field></Field>
    </Detail>
    <Detail>
        <Field></Field>
    </Detail>
    <Trailer>
       <Count> 3 </Count>
    </Trailer>
    Basically, In trailer the Count field will contain the number of Detail records.
    Can this be achived by a UDF?? Please help!!!

    Actually teh detail node formation at target depends on a lot of nodes of source side...using Count I have already done it but due to lot of nodes @ source side it becomes kind of a mesh...
    Hence I was trying to figure out a way in which if I can count the number of detail nodes at target side I can remove the present mapping...
    Corect me if I am wrong but can't we declare this target detail node as global variable and then use 'Count' function to capture its occurence???
    P.S : In XI 3.0 we used to have a tab to declare global variables but here in 7.1 we have Functions tab...could anybody tell me how to declare the variable in 7.1?

  • How to Create a Sequence Number from BI Publisher Layout editor?

    How to Create a Sequence Number (1,2,3,4,......,etc) from BI Publisher Layout editor

    Thank you for your replay, but <?position()?> we can used it in template builder only not from BI layout editor
    I found a solution in this case we can used the following query.
    SELECT
    ROW_NUMBER() OVER(order by item_status) as Row,

  • How to get max sequence number when some record exists in data base table

    Hi,
    I need to create sequence such a way that it should starts from max value already exists in table.
    Example:
    I have table like below:
    ID NAME
    1 A
    2 B
    3 C
    4 D
    Now when creating sequence it should start from 5 but I should't hard code STARTS WITH 5 in the create sequence. Is there any way to do this without hard code the max value in the sequence. It should automatically take the max + 1 value for next data when I insert.
    CREATE SEQUENCE TEST_SEQ.NEXTVAL
    START WITH [Max + 1 val from the table]
    MAXVALUE 9999999999999999999999999999
    MINVALUE 1
    NOCYCLE
    CACHE 20
    NOORDER;
    Thanks.....
    Edited by: 998976 on Apr 18, 2013 4:37 AM
    Edited by: 998976 on Apr 18, 2013 4:38 AM

    Hi,
    The numbers in a CREATE SEQUENCE statement are all literals; no other kinds of numeric expressions are allowed.
    You need dynamic SQL to do anything like what you want. For example:
    COLUMN     seq_start_col     NEW_VALUE  seq_start
    SELECT     1 + MAX (val)     AS seq_start_col
    FROM     table_x;
    CCREATE SEQUENCE TEST_SEQ.NEXTVAL
    START WITH  &seq_start
    MAXVALUE 9999999999999999999999999999
    MINVALUE 1
    NOCYCLE
    CACHE 20
    NOORDER;

  • Generating Sequence Number

    Hi,
    I have created a Query form. I had displayed the sequence number of the record displayed by selecting rownum from the table.
    Now I have added a order by clause in the query. So the rownum is not displayed in the order.
    I have created a small procedure to generate the sequence number.
    I would like to know from which trigger I should call this procedure.
    procedure resequence is
    v_cursor_record number;
    v_position number;
    begin
    v_cursor_record := to_number(:system.cursor_record);
    v_position := v_cursor_record;
    loop
    :detail.item := v_position;
    v_position := v_position + 1;
    exit when :system.last_record = 'TRUE';
    Next_record;
    end loop;
    go_record(v_cursor_record);
    end;

    Thanks for your reply. I have tried this method.It assigns value only for the first record in the block. As the post query trigger is not passing the control to other items ,though more than 10 records are fetched the sequence is generated only for the first record.
    Any other method to achieve this?

  • File content conversion - sender adapter for Header and detail records

    Hi Experts,
                     I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes fields.There is no record identifier for Header and Detail records.In one file first line is Header records and remaining subsequent line is DetailRecord.What are the parameters we have to set for sender file content conversion parameters as i donot have any key field and key field value.And in one file we have only one header records ( first line) and n number of detail records from 2nd line onwards.
    Thanks
    Deepak

    Hi
    Refer the below fourm link,
    Flat file whitout id
    Regards
    Ramg.

  • Portal Master-detail form how to auto assign detail record sequence number

    Portal Master-detail form how to auto assign detail record sequence number.Please help me?

    You can just read the following section
    Can I specify a sequence number generator as the default value for a form column?
    Yes. Enter the following in the "default value" field for the column:
    #<schema name>.<sequence name>.nextval
    where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
    For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
    #SCOTT.CUSTOMER_SEQ.NEXTVAL
    same way you can do for master - detail form.
    for more information on forms please refer the following URL.
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    hope it helps.

  • Error While Generating Sequence Number. Contact your system Administrator

    Hi All,
    I have developed a form to provide our client with 'an easy to fill' User Interface. This form will be used instead of the standard form present in Business Suite.
    Some columns of the table, on which form is based, are getting populated via generation of sequence numbers.
    Now the problem is, after deploying custom form developed by me in the instance, Standard form is showing this error
    " Error While Generating the Sequence Number. Please contact the System Administrator "
    I am unable to trace why this error had started appearing..
    Any suggestions would be of great help...
    Thanks in Advance,..

    Forms version 6i,
    Database version 9.2.0.6.0
    Sequences which I am using are used there in Standard form also..
    So evrytime i need to save the record, I am selecting NEXTVAL of it into
    the respective item of the datablock..

  • Sequence number - increment one for every 3 rows

    Dear All,
      I want to get a sequence number /group number, which increments 1 for every 3 rows. 
      For Example:
       Seq     Name   
        1          a
        1          b
        1          c
        2          D
        2          E
        2          F
        3          G
        3          H
        3          I
        4          abc
        4          aaa
        4          bbb
    Is there a function to do this?

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. Did you read the header of this forum?? But besides being rude, you are also ignorant.  A table has no ordering, so
    there is no concept of every third row. What are you using for a sort key? What happens when a new row is added to or deleted from this table? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Create Auto increment sequence number for list view report

    Hi All,
              Am using BAM 11.1.1.6 version, Have updating list report & wants to create auto increment sequence number at report level. Is it possible to create column at run time in BAM reports.
    Please help.
    Thanks.

    Hi All,
              Am using BAM 11.1.1.6 version, Have updating list report & wants to create auto increment sequence number at report level. Is it possible to create column at run time in BAM reports.
    Please help.
    Thanks.

  • Lightroom export sequence number automatic increment and update

    I'm exporting to hard disk using the name-sequencenumber option. When exporting multiple times, Lightroom does not seem to remember what sequence number it last used. Is there a configuration option somewhere to let Lightroom keep track of the sequence numbers used? For example, I have a set of 20 photos that I export. I set the name to X and the sequence number to 1000. So, the first export adds them to my destination folder numbers X-1000 through X-1019. Now, I import another batch of say 30 photos. When I go to export those, I get a warning that there are duplicate file names since Lightroom is starting over at 1000 again instead of 1020. I don't want to enter a new sequence number every time I export. Is there a way for Lightroom to remember the last sequence number it used?

    AFAIK, you have to enter the sequence number with every export.

  • File sequence  number in a Flat file

    Hi,
    I am working on Idoc to file scenario wherein my output file will have a sequence number assigned to each level.
    there are 4 levels and hence 4 sequence number to be genearted and its values should also have the same sequence number.
    i am doing this just by using Counter function.
    But when i am getting  a multiple detail records, for each detail record(0040) level its keep incrementing.but it should have the same value what its level has.
    for ex:
    ALPHAMER AS2 E5 710 20114806124829 01.00   
    0000 00000000 20100102 V3.0 SORD CZ1
    0010 00000001 76767 123 100 WER Constant BNG 560011 RAJ WERR     560011    BTM   X EN RT
    0020 00000001 TYUIOP
    0040 00000001 8765 6532 200 45 10 WE 20 AG
    0040 00000002 8765 6532 200 45 10 WE 20 AG
    0040 00000003 8765 6532 200 45 10 WE 20 AG
    0040 00000004 8765 6532 200 45 10 WE 20 AG
    9999 99999999
    It has to be like this.
    ALPHAMER AS2 E5 710 20114806124829 01.00   
    0000 00000000 20100102 V3.0 SORD CZ1
    0010 00000001 76767 123 100 WER Constant BNG 560011 RAJ WERR     560011    BTM   X EN RT
    0020 00000001 TYUIOP
    0040 00000001 8765 6532 200 45 10 WE 20 AG
    0040 00000001 8765 6532 200 45 10 WE 20 AG
    0040 00000001 8765 6532 200 45 10 WE 20 AG
    0040 00000001 8765 6532 200 45 10 WE 20 AG
    9999 99999999
    Can someone help me in achieving this.
    Regards

    Hi there,
    Just to try out from a different view, the following case could be implemented if the pre-requiisites are satisfied:
    Pre-requisites:
    1) The element that carries a primary factor, let us say, '8765' from your example.
    2) Functionally there is an element in your header item that relates the line items under it.
    My understanding of your example:
    1) Line items present for 00, 10, 40
    2) Line item 30 absent in the series
    Proposal:
    Map source field (the one that is arelating factor, here the one that carries '8765') -> INDEX (start by 0, increment by 1) -> multiply by one.
    INDEX standard function property: Donot Reset for every context;
    Srikanth Srinivasan
    Edited by: Srikanth Srinivasan on Jan 10, 2011 11:02 AM

  • Daily sequence number

    Hi,
    I need a clean solution for a daily sequence number (starts from 1 everyday). Clean in the sense that upon initial setup, I do not have to do anything and I can get my number everyday by just one jdbc call/query.
    Thank you in advance.

    What is the business justification for this requirement? Normally, you should just use a regular non-resetting sequence. If users want to see a "pretty" sequence number, simply generate something for them when you query the data using the row_number, rank, or dense_rank analytic functions. If users want to see sequences reset, they probably also want to see gap-free sequences, which is not something that you can ever guarantee in a scalable system where multiple users are allowed, though you can present gap-free sequences of values at query time.
    You can have a job that either drops and recreates the sequence every day or that goes through some logic to reset the sequence to 1 by changing the increment. This gets rather hairy, though, because the job will fail (or fail to run) on occasion and requires that no one be processing data at the time.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to create a System Extract for Communication

    Hi,
    I've built System Extracts before but not for Communication. Does anybody know what the steps are to create a System Extract for Communication? I already built a particular Communication Type and the delivery method is email. I was told that Oracle only creates the trigger for this Communication Type but not the email. If I built the System Extract Communication and run it, is that supposed to send an email? and if so, what kind of information will be sent in the email?
    Thanks,
    Ronaldo

    Hi James,
    If you like to use SAP web dispatcher as a solution for load balancing portal application, you no need to create system object under systems..
    You have to install web dispatcher as separate instance where you need to configure portal apps into it..
    Configure web dispatcher like to hit the admin port, use http://<webdisp-server>:<adminport>/sap/admin
    For normal portal access, use http://<friendly URL>/irj/portal
    The good news is that the webdispatcher knows that the portal supports SSL
    Another advantage of this config, is the webdisp, will just replace the apache redirect server. Users will access mycompany.com, without any port number, since we are redirecting 80 to the backend j2ee. Also, https should work like in the normal world.
    Profile will be like below...
    SAPSYSTEMNAME = WEB
    SAPSYSTEM = 00
    INSTANCE_NAME = W00
    DIR_CT_RUN = $(DIR_EXE_ROOT)/run
    DIR_EXECUTABLE = $(DIR_CT_RUN)
    Accesssability of Message Server
    Message Server Parameters ##########
    NOTE: The "ms/http_port" must match the profile on the Central Instance
    rdisp/mshost = <FQDN of portal CI Host>
    ms/http_port = <Ms port of portal>
    SAP Web Dispatcher Ports
    #icm/server_port_0 = PROT=HTTP,PORT=81$$
    icm/server_port_0 = PROT=HTTP,PORT=80, TIMEOUT=3600, EXTBIND=1 (some OS will not allow to bind ports <1024)
    Admin port details
    icm/server_port_1 = PROT=HTTP,PORT=3200
    #, EXTBIND=1
    icm/HTTP/admin_0 =
    PREFIX=/sap/admin,DOCROOT=./admin,PORT=3200,AUTHFILE=/usr/sap/WEB/SYS/global/security/data/icmauth.txt
    SSL
    icm/HTTP/redirect_0 = PREFIX=/ , TO=http://<friendly URL name>/irj/portal
    WebAS Message Server Parameters
    rdisp/TRACE = 1
    icm/trace_secured_data = 1
    Regards
    Suresh

  • How can find SCN or sequence number on the update operation?

    nedd to recovery database, how can find the SCN or sequence number before the update exection?
    thanks

    nedd to recovery database, how can find the SCN or
    sequence number before the update exection?Sorry - there is something confusing about your question ...
    It seems to me the SCN is the 'system change number', which identifies when a change (table, row, block, flush log buffer to log file, etc) has ocurred.
    You seem to be asking for the SCN associated with an update before the update actually occurred.
    Are you actually asking "How do I perform a point in time recovery to immediately before a specific update?"
    Perhaps you could include a few more details, such as database version. For some reason different versions have different capabilities - that could be helpful here.

Maybe you are looking for

  • DECODE statement

    please can someone kindly code the following line of SQL using the DECODE statement: case when Student_Status in ('Registered','Repeat','Referral', 'Deferral')and GRADE <> 'MISSING' then EXAM1_RESULT else Null end as Valid_EX1 It will be most appreci

  • Coldfusion - Simultaneous Requests

    Hi, BACKGROUND: I have developed a "Flash Remoting" application using Coldfusion and SQL 2000 and am almost ready to go live. The remoting application uses many queries/responses to/from the SQL 2000 database via Coldfusion. The Flash Remoting applic

  • Lightroom update link

    I have received an information to update my lightroom 5 and download  the update but the link does not work : it leads me to a page to buy Lightroom 6. How can I truly update LR5 without buying LR6 ? Thanks

  • Repaint in propertyChange

    Hello, Consider these lines of code: public class myObject      extends JPanel      implements PropertyChangeListener      public void paint(Graphics g)           super.paint(g);           g.drawString("foo", 10, 10);      public void update(Graphics

  • Suppressing a line if the sum of a value = 0 in a group footer

    How do i suppress a line if the sum of a value = 0 in a group footer I have tried this this formula in the section expert - Sum ({RM_INV.QUANTITY}) = 0 will not work.