Use field from file header record in detail records

Hi,
I receive a file with different records type (transmission header, file header, detail records, file footer). The fields in each record type are different. The transmission header tells me who the sender of the file is. I need this information, because I am merging data of various senders into one table.
When processing the files, I need to split each file according to recordtype. (I can not use the same logic for each recordtype). How can I populate an extra column in the detail files with the value from the header record?
What I tried so far is the following:
- Populate a global variable using a script: This does not seem to work in the context of dataflows.
- Create a 'join' between header record and detail record. However there are no fields I can join, so Data Services is not happy with that.
- Store the field value from the header record in a DS (I chose a cache datastore, memory datastore did not work in batch scenario. I feel I can get this to work, but it seems quite an elaborate and expensive solution: First Filter the header record from the file, write the required field to the cache datastore, then read the same file but now filter the detail records, and join this with the datastore.
Is there a better way to do this? I was hoping I could just use a script and read the first line of my file and move the value to a global variable....
It would be great if someone could give me some tips...
Many thanks,
Jan.

Hi Werner,
I am not sure if I understand you correctly.
I have declared $State as a global variable, not as a parameter.
When I check my custom function I do get a warning that a variable is called which is not declared.
I thought I did not have to worry about this as the variable does exist within the job where the function is called.
It looks like I can not set a value to a global variable in a custom function.
Is that correct, or is there something wrong with my syntax?
Really the only reason I call a custom function is to set the global variable, so I could even make my function as simple as this:
$State = 'NSW';
Return 0;
It still doesn't work...
Any idea why?
Thanks,
Jan.

Similar Messages

  • What is the use of EIN_FEDERAL and EIN_STATE_LOCAL fields in Voucher header record (PeopleSoft AP) ?

    What is the use of EIN_FEDERAL and EIN_STATE_LOCAL fields in Voucher header record (PeopleSoft AP) ? And where can we check record field related information in PeopleBooks ?

    Hi User,
    The best place to search for questions like this one is OTN, Oracle Technology Network. If you have any question about CLOUD and partnering with Oracle we will be more than glad to help! Thanks.

  • Validate Technical Information from Flat File header record

    Hi Experts,
    I would like to know the best way to validate data from a flat file where the layout has a header containing the number of records sent and the total amount distributed along the file content.
    Please, notice we have a commom layout where the first 3 fields are only used by header record (record type = 00)
    For example:
    RECORD TYPE     NUMBER OF RECORDS     TOTAL AMOUNT     COST CENTER     AMOUNT
              00                              3                                  250,00                                                    
              01                                                                                1000000             100,00
              01                                                                                2000000             100,00
              01                                                                                1000000               50,00
    So, let´s suppose I received the file content above and I have recorded all 4 records in a first DSO. The next step I would like to load to a different DSO the records where RECORD TYPE = 01 (business) data. That´s OK.
    The header record where RECORD TYPE = 00 (technical data) has to be uploded to a log DSO validating the total amount (250,00) and number of records (3)  sent in the file. This line will be further exported as a validation information.
    Well, any suggestions how to validate the data as described above?
    Any information will be fully appreciated.
    Thanks.
    Fábio
    Edited by: Fabio Chaves on Jan 30, 2010 9:30 PM

    Hi Fabio,
    You seem to compare the first record of file or header record with the collated values of rest of the records in the flat file.
    Simple way would be to do validation separate and load the file...
    create a function module to read a file...
    compare the first record with the collated values in the rest of file.
    If the file seems to be okay,then loading is your choice...
    rakesh

  • Getting a field from a derived record

    I have been asked to put a value on a page that seems to be part of a PS-supplied derived record in Campus Solutions, derived_cs. My understanding is that derived records are built on the fly. I can see in App Designer what table is used for a prompt for the field I care about but since the field is part of a derived record, I don't see anything in the PeopleCode for the field for where its value gets written to. How do I figure out where the values entered on a page in fields of a derived record go? I need to get the real value. I don't want to try to reconstruct the derived record in my custom app. Thanks.
    Ken

    Derived/work records allow you to display the values of variables on pages. As you noted, they don't have database compliments. In other words, Derived/Work record field values are not persisted. This makes it difficult to determine where the values come from and, if they are data entry fields, where the values go. The movement of the data to and from a Derived/Work record is all done in PeopleCode. To find where the values come from, I usually start with an SQL trace level of 7. You can also use an SQL trace to determine where the values go. The nice thing about Derived/Work values that are persisted is that you will see values in the SQL insert bind variables. Unfortunately, when reading data from the database, you only see bind variables, you don't see the values that were selected. This makes finding where data comes from very difficult.

  • Need fields from file

    I am parsing a stored procedure in my VB.NET Windows application.  I read the procedure in and do a split when I come across the values "Loan."
    For example, here are some of the lines:
    Loan.ID=Loan.ABC
    Loan.LoanNumber as 'LoanNumber'
    isNull(Loan.LoanNumber,
    dbo.o_func_Convertxxx(Loan.YieldToDate)
    ExtractLoan.StartDate
    I Want to extract the alias and the fields. 
    Loan.ID
    Loan.ABC
    Loan.LoanNumber
    Loan.YieldToDate
    I DO NOT want  "ExtractLoan.StartDate"
    How can I do this ?

    I am parsing a stored procedure in my VB.NET Windows application.  I read the procedure in and do a split when I come across the values "Loan."
    For example, here are some of the lines:
    Loan.ID=Loan.ABC
    Loan.LoanNumber as 'LoanNumber'
    isNull(Loan.LoanNumber,
    dbo.o_func_Convertxxx(Loan.YieldToDate)
    ExtractLoan.StartDate
    I Want to extract the alias and the fields. 
    Loan.ID
    Loan.ABC
    Loan.LoanNumber
    Loan.YieldToDate
    I DO NOT want  "ExtractLoan.StartDate"
    How can I do this ?
    Perhaps you should provide an explanation of what you are doing rather than wanting to do something this particular way. Then maybe advice and/or code on methods available to do what you want to do could be provided rather than doing that the way you think
    it should be done.
    Or else use XML and save information to fields in an XML file then only get the fields from the XML file that you want perhaps.
    I don't use XML much but I suppose you can create Classes with Properties or just Properties and use
    XML Serialization in order to save your data to an XML file. Here's a link to some
    Examples of XML Serialization which may be able to assist you with that. I've found numerous information on
    XML and using a variety of methods it seems like to write and read XML but it's been awhile since I've written code to do that and it would probably be confusing due to probably being poorly written even though it works.
    Others that reply in this forum know XML by heart probably.
    La vida loca

  • Using Fields from PDF when saving

    Im looking on how to use fields in a pdf form when saving the form.
    ex. Incident Report
    Staff open up the form. Put in the information. Want it so when they save it puts the clients name and date in the save as. So they open Incident_Report.pdf when they save it would be Incident_Report_ClientsName_Date.pdf Yes the staff could type that in that way but want to make it as easy for everyone involved.

    So let's say you have the following fields in your file:
    Incident_Report
    ClientsName
    Date
    You can then add this code to the file's WillSave action (under Tools - JavaScript - Set Document Actions):
    var newFileName = this.getField("Incident_Report").valueAsString + "_" + this.getField("ClientsName").valueAsString + "_" + this.getField("Date").valueAsString + ".pdf";
    app.response("Please copy the text below and use it as the new file-name:","", newFileName)
    Of course, you can adjust the message to the user, and even the format of the file-name, although I've used the format you specified.

  • How to use Parameter from file in window env

    hi All,
    Please tell me the how I can get Parameter from Saved file and can use in other file.
    EX:
    I want to use Password file for each instance like
    ORCL-manager
    ORCL_1-tiger
    ORCL_2-*****
    how to call this file in other file. using pasword for instance
    any help would be appereciated.
    Regards,

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Setting up position of front panel objects using input from file

    I am working on a project and i have got the following query.
    i have a front panel with lot of objects like knobs,dials,push buttons etc..
    the entire panel will be the console to the user and as he changes the various
    positions of the objects their values will be written in to a file.
    now after a days work when the system is restarted again the next day
    the values of various objects should be read from the file and the front panel objects should be set in their position according to it
    in short the objects(knobs,buttons etc) should both act as o/p i.e when user interacts with them and they should also act as i/p when their position will be set from
    file.
    how can i achieve this.any help regard
    ing this would be greatly appreciated

    You should separate the read portion of this vi from the write portion of the vi. You want to execute the read portion of the vi only at startup and the write portion of the vi only at shutdown. So you'll be reading the file and writing the output to the property nodes, running your program, and then taking the value of the controls and writing to file. I have attached an example of how this might work. You might also do this with a state machine structure to control the data flow.
    Hope that helps
    Attachments:
    query.vi ‏49 KB
    read_file.vi ‏42 KB
    write_file.vi ‏36 KB

  • Plant Field from Delivery Header

    Hello Gurus,
    I am trying to understand what is the Plant (WERKS) field on the Delivery Header(LIKP). Where else is this Plant (WERKS) stored in SAP Tables. I do not want to take it from the LIKP table because of a limitation. So can anyone help me if this field is available in any other table in SAP.
    Thanks,
    Jayaswy Kota

    Hi Pranava
    check this tables in se12
    MARA-General Material Data
    MARC-Plant Data for Material,
    MARD-Storage Location Data for Material,
    EBAN-Purchase Requisition
    EINE-Purchasing Info Record: Purchasing Organization Data
    EKBE-History per Purchasing Document
    MKPF-Header: Material Document
    hope clear your issue.
    Regards,
    Krishna.

  • Buliding a SELECT in PSP using fields from html form

    Hi everyone, first of all forgive me my poor english.
    I'm making "CV Base" in PSP as a school project. And I've got a search html form like this (simple version):
    select list: Profession
    text field: Age
    And my question is... How to build a select in psp which will parse only given parameters? For example. I'm looking for C Programmer in any age so i select C Pogrammer from the list and leave afe field blank. So the SELECT should be sth like this: select * from Person where Profession like 'C Programmer'; But in another search i need a programmer who is 25 years old... So select has one more WHERE... I'm sure You all know what I mean
    Please help me.
    Martin

    Hey, i wanna open cursor and don't know how to do this. Got this:
    <%@ plsql parameter="f_wyk" type="varchar2" default="NULL" %>
    <%! sel_str varchar2(1000) := 'SELECT imie, nazwisko, wiek, ulica, nr_domu, nr_lokalu, kod_pocz, miasto, nazwa_woj FROM Uczelnia ucz, Stanowisko stan, Jezyk jez, Wojewodztwo woj, Wyksztalcenie wyk, Adres adr, Osoba os, os_wyk ow, os_jez oj, os_sta ost, os_ucz ou WHERE nazwa_wyk LIKE :1 ...
    <% OPEN cur FOR sel_str USING 'pod%'; %>
    <% LOOP %>
    <% FETCH cur INTO rosoba; %>
    <% EXIT WHEN cur%NOTFOUND; %>
    <%= rosoba.imie %>
    <% END LOOP; %>
    <% CLOSE cur; %>
    and when i put <% OPEN cur FOR sel_str USING *'pod%'; %>* it works but i'cant use parameter <% OPEN cur FOR sel_str USING *<%=f_wyk%>*; %>
    I have
    Projekt\psp>loadpsp -replace -user system/system szukaj2.psp
    ORA-20006: "szukaj2.psp": compilation failed with the following errors.
    "szukaj2.psp", line 100, pos 31: PLS-00103: Encountered the symbol "<" when expecting one of the following:
    ( - + case in mod new not null out <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively-q
    please help

  • Using field highlighter to highlight records with a certain date range

    I've been asked to highlight a field based on the fact that the "Submit" date is greater than a certain value. The problem is that there's no way to pre-determine what that value is. It changes.
    The user wants to be prompted for the value when he runs the report. That value would then be stored as a variable which would be used in the script to determine if the field should be highlighted.
    Does anyone know if there a way to do this?

    Thanks for your quick reply Raghavendra.
    How does that prompt the submitter for the Date value he wants to use and the date to compare the submit date against?
    Here's the scenario.
    A user wants to highlight all "new" tickets submitted since last time he ran the report. It's not like he runs the report every friday which would make it easy because then you'd compare the submit date to "today-7" so-to-speak. He runs the report randomly. He wants to be prompted for a date before the report runs to replace "today-7".
    Could you help explain how to prompt the use for that date.

  • Not able to use fields from tables

    Hello,
    I have recently got Crystal Reports 2008, created an ODBC connection with our Progress database. I can see all tables, but when selecting, only a few would actually be usable - in the sense that even if I see the fields, I cannot use them in report design. When selecting a table in database Expert, it shows an icon only without the table name.
    I have tested the ODBC by successfully opening all tables in Excel. there are no restrictions on the tables
    I believe it might be some setting in Crystal. Can you help?
    Thank you.

    Hi,
    Sorry for the delay...
    I am using version 2008, database is an ODBC connection with a Progress database (called ASI).
    I am not sure about the driver.
    Ovi

  • Trouble using exists() from File Class

    I'm trying to have the user input a filename, and then I'm storing the filename in a file object called childFile.
    I'm having trouble with the conditional and boolean statements. The screen should print "I'm real" if the file exists, but it doesn't. It prints I don't exist every time, no matter what the user inputs.
    I really appreciate any help.
    import java.io.*;
    import java.util.Scanner;
    public class FileObject {
         public static void main(String[] args)
         throws java.io.IOException
              //boolean childFile.exists() = true;
              Scanner keyboard = new Scanner( System.in );
              System.out.print("Please enter the name of an existing file: ");
              String input = keyboard.nextLine().trim();
              File childFile = new File (input);
              File parentFile = new File( childFile.getCanonicalFile().getParent() );
              boolean exists = childFile.exists();
              if (exists)
                   System.out.println("I'm real.");
              else
                   System.out.println("I don't exist");
              System.out.println(childFile);
              System.out.println(parentFile);
              //displayFiles(list.listFiles(), indent + " ");
         //void displayFiles(File[]list, String indent) {

    Use File.getAbsolutePath() to make sure your file is actually pointing where you think it's pointing

  • Use field from diffrent FM

    HI ,
    There is FM that called to proxy instance during FM run-time lot of time and i want to do singleton to this instance
    I.e. create the object proxy just one time and send the proxy instance to the FM   .
    the problem is that the i cant change the FM's signature and i need to move the instance object in global parameter but there is another problem that the FM dont have the same top .
    what i think is to use the memory to export the parameter but i am not sure if this is the only way
    any diffrent idea ?
    if the export to mem is the only way please provide an example .
    Thanks
    James 
    e.g.
    Main FM <---Called one time
    Sub FM <---- called multiple times with create instance

    you may store the object in a class as a static attribute, then you'll be able to access it from anywhere, provided that it's in the same internal session of course (I can't know if it's your case).
    about memory, you may use the EXPORT/IMPORT "family" (choose whether you want to use the abap memory or the shared memory) and also use the shared objects (shared memory too), or use ASSIGN ('(prog)globvar') TO <var> (though it is an internal SAP statement). See sap library and forum for more information.

  • Flat file export with a “Constant” header record???

    I have a mapping that export the records of a table in a Flat File.
    But I need to agreggate a constant in the first line of the export file (Header Record)
    For example ‘AAABBBCCCDDDEEEFFFGGG’
    How Can I put a “Constant” Header record?

    Marcelo,
    When you use flat file as a target you can set the header to be your field names. Now... it looks like this is not exactly what you are looking for.
    Alternative is to use a pre mapping procedure to create your file with the one line in it, and have the mapping produce additional records that are appended to the first line. Whether you create a new file or append to an existing file is a property on the target file, if I am not mistaken (it would be a configuration property otherwise).
    Thanks,
    Mark.

Maybe you are looking for

  • Third Party VPN Solution - Private/Dynamic Addressing

    I am looking for a solution for the following: I need a to bring up sites in remote locations that don't have access to Cisco gear. I would like to be able to grab a PC or Linksys or equivalent and bring up a site to site VPN with a Cisco router. The

  • Refresh database and another is create database

    Hi All, In the Hyperion planning under the administration menu there are two option, one is refresh database and another is create database. Is there any way to hide/delete or not give the access to users of "create database" option? I mean other tha

  • BAPI_PO_CHANGE + SERVICES

    Hi guys, somebody knows how to use this to crete a new line item with services, or some documentation about this BAPI? Tks,

  • Export PDF - Page Only

    In Numbers 08, I used to be able to export a single page to a PDF. Now it seems as though my only option is to export the entire document to the PDF (Share > Export...). Am I missing the option or did they remove it from us?

  • Using Bulk operations for INSERT into destination table and delete from src

    Hi, Is there any way to expediate the process of data movement? I have a source set of tables (with its pk-fk relations) and a destination set of tables. Currently my code as of now, is pickin up the single record in cursor from the parentmost table,