Problem in key field name in FCC

hi,
I am using FCC on the sender side.
Source file is
1;;PY;X101;20060630;06;20060630;GBP;Ref.1;Payroll June 2006; (Header)
1;1;40;S2225000;;1050;;;;;;;;;;;;;;;X101003;;;;;;;;;;;;;;;
1;2;240;S2225000;;4563;;;;;;;;;;;;;;;X101004;;;;;;;;;;;;;;;
1;3;31;3100001;;5013;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1;4;31;3100002;;600;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;;PY;X101;20060630;06;20060630;GBP;Ref.2;Payroll June 2006;  (Header)
2;1;40;S2225000;;530;;;;;;;;;;;;;;;X101003;;;;;;;;;;;;;;;
2;2;40;S2225000;;2490;;;;;;;;;;;;;;;X101004;;;;;;;;;;;;;;;
2;3;31;3100002;;3020;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The first field in the header is the key field to identify the header, which keeps incrementing for evry occurence of the header.
So for the first occurence of the header first field of header will be 1, first field of item will be 1( same as header) and second field of item will be the key field now  which will increment with evry occurence of item within the header.So there is no constant value for key field name.
So how do i perform FCC for this type of structure?
Regards,
Loveena

Hi,
You can create a custom Adapater Module and add it in your Sender Adapter. This will add a Unique Identifier to your Header and Record item which you can give in FCC.
For more details refer to this forum
https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=6143385
Thanks
Amit

Similar Messages

  • FCC configuration in Sender File Channel Without any key field name

    Hi Everyone,
    We have below flat file generated from ECC using standard tcode.
    The flat file is fixed length file and first record is header record followed by line items.
    There is no key field name in the file name.
    Can we read the file and convert into xml without any key field name?
    I want to understand if the FCC configuration for above file can be done without key name or not.
    Thanks,
    Vertika

    Hello,
    AFAIK, using FCC i really doubt u can convert file into xml.
    So technically, there are two options either read each line one by one and then do conversions in ur mapping or write a custom module which will read ur input file and convert into xml.
    Configuring Generic Sender File CC Adapter
    Thanks
    Amit Srivastava

  • What Oracle Table contains Partition Key Field Name?

    What Oracle table/view maintains the partition key field name?
    All_Tab_Partitions does not appear to maintain such information.
    When I use Toad -> Schema -> Tables -> Partitions, it lists the partition key field name that the partition is based.
    Thank You

    all_part_key_columns
    or
    USER_part_key_columns
    Edited by: OrionNet on Dec 5, 2008 3:56 PM

  • Diferent key field names within a recordset

    Hi
    Can we have different key field names for records within a recordset.
    When i give different key field names for Header and detail records in a recordset i get the error below: -
    message not processed: com.sap.aii.messaging.adapter.trans.TransformException: Transformer Conversion3.0.5227 Error initializing Class: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found (4408) Parameter 'xml.keyFieldName' is missing (4403) ; nested exception caused by: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found (4408) Parameter 'xml.keyFieldName' is missing (4403)
    Thanks

    Hello Pratihchi,
                   One keyfield name is allowed, eventhough we have different records per recordset. Because we can differentiate the rows based on the keyfieldvalue and those value we need to mention in the fieldname. Check below link which contains the example on this.
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5393- [original link is broken] [original link is broken]> [original link is broken] File Adapter->Sender File Adapter for Content Conversion
    Regards.
    Prasanna.

  • Key Field Value in FCC

    Hi Experts,
    I have a scenario in PI, where I have 1 Header, n Data Records and 1 Trailer in the source file. This data is coming in CSV format.
    I am using FCC to convert CSV into XML.
    In the FCC, I have used keyFieldValue parameter. For the Header Record, the Key Field Value is constant "H"; for Trailer Record the key field value is constant "T".
    However for Data Record, the key field value is not constant. The first character of Key field of Data Record will always be "D", but rest of the Alphabets can change.
    Sample File:
    "H","3.04",22/10/2009,16:31:12
    "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    "T",1393.27,1393.27,8
    Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    I have no clue, if this can be converted into XML through FCC.
    Any help will be highly appreciated.
    Regards,
    Varun

    >
    Varun Agarwal wrote:
    > Sample File:
    >
    "H","3.04",22/10/2009,16:31:12
    > "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    > "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    > "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    > "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    > "T",1393.27,1393.27,8
    >
    > Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    >
    > I have no clue, if this can be converted into XML through FCC.
    > Any help will be highly appreciated.
    >
    >
    > Regards,
    > Varun
    Write a simple module. The module will do a replace of the Dxx fields to D (you can use simple regex function for this)
    After the module, use the messagetransformbean to do the FCC for you.
    The module might sound complex, but trust me its a simple logic you need to implement and you can easily do the FCC with the messagetransformbean

  • Problem using alias field names in a sql query

    Hello,
    I have a question regarding a simple Oracle database SQL query writeup:
    In the following (badly written but properly working) SQL query:
    Query 1:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    (soe.field5 - (soe.field2 + soe.field3)) as field6,
    (select comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 1:
    I am re writing the code (soe.field2 + soe.field3) to get the alias field4 or column name field4 that I have created on the fly in the previously for use with the following fields. Can't I rewrite the query as follows. There is something simple missing!
    Query 2:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6, <<< field4 does not work here
    (select
    comp.parValue*soe.field7
    from
    CompTable comp) as parValue,
    (select
    soe.field8 - (comp.parValue*soe.field7+ soe.field9)
    from
    CompTable comp) as field10
    from
    SomeTable soe
    PROBLEM 2:
    Similar to the above problem, I was thinking to get a field parValue out of the CompTable table and re-use many times rather than the code shown in Query 1:
    Query 3:
    select
    soe.field1,
    (soe.field2 + soe.field3) as field4,
    soe.field5 - field4 as field6,
    soe.field7* (select comp.parValue from CompTable comp) as parValue1,
    soe.field8 - (parValue1*soe.field7+ soe.field9) as field10      <<<< parvalue1 does not work here
    parValue1*soe.field9 as TaxCondition               <<<< parvalue1 does not work here
    from
    SomeTable soe
    See that the query becomes so simple, but the above query does not work. There is something fundamentally wrong in my usage of the alias field names in creating other fields. The Query1 seems to be the only working option but its very slow as I am redoing and re-writing the whole code again and again to get the parValue field out of the CompTable table for use to create many other fields.
    I will appreciate if you can guide me in the right direction on this issue.
    Thanks and Regards
    Rama

    SELECT tmp.contract_no, tmp.Actual, tmp.Actual - tmp.NbHours
    FROM ( SELECT t.contract_no, sum(l.hrs) AS Actual, (c.labour_hours * c.labour_progress_per) / 100 AS NbHours
    FROM TASK_DELEGATION t
    INNER JOIN COST_CODE c
    ON t.cost_code = c.cost_code AND t.contract_no = c.contract_no AND t.is_inactive=0
    INNER JOIN Labour.dbo.LABOURALLOT l
    ON l.contractNo = c.contract_no AND l.costcode = c.cost_code AND l.pm = 'N'
    GROUP BY t.contract_no, c.labour_hours, c.labour_progress_per
    ) tmp

  • Different Key field Names - Possible?

    Hi All,
       I have 2 main nodes, Header and Detail. Is it possible for me to have a different nodes (like Hkey in header & Dkey in Detail) as keyfields?
    Thanks & Regards,
    Jai Shankar.

    No, you need to have one key field, and value of this can be different in each segment/node.
    E.g
    H,123,122...
    D,123,4,4....
    H,123,122...
    D,123,4,4....
    If your file looks like this, and assume your file contains H for ( Header)and D for (details)> and these values acts as key value to determine the nodes.
    Then keyfied name be any name like <i>Key</i>.
    But here, <i>Key</i> value is different in each segment right. It is possible in file adapter. SO I think it clarifies you.Also have a look into the given blog to get more
    Regards,
    Moorthy

  • Prepared statement problem using a field name that contains a "?"

    I am attempting to execute the following query via use of a PreparedStatement:
    select [Spread_By_Cost_Center?], Debit_Category, Credit_Category, Start_Date, End_Date, Allocation_Type From ALLOCATION_FORMULA Where FormulaID = ?
    The query fails with the following message:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT
    field incorrect
    However, I can run this query directly in MS-ACCESS, using a value for the substitution parameter (i.e., FormulaID = 1)
    If I remove the "Spread_By_Cost_Center? field from the query within the PreparedStatement, the PreparedStatement query executes successfully.
    So, it would appear that the "?" in the field name is possibly being treated as a substitution parameter. Is this a bug within PreparedStatement? I do not want to use a Statement object, as the PreparedStatement provides a much more elegant solution (when it works).
    Any suggestions?

    That may be so, but as I see it there are two alternatives:
    1. Wait for the "bug" to be fixed.
    2. Change the database to use less problematic column names.
    I know which alternative I would choose.

  • Problem with column/field names in Oracle resultset being UPPERCASE

    Hi everyone,
    I understand that Oracle DBMS returns all the field names in UPPERCASE in the result set. However this is undesired for my application and I was wondering if there is any workaround for getting the field names in the application in exactly the same format as your select query. Is there any set method which can be called before to control this behavior.
    E.g. select ename as employeename from table_name;
    ORACLE RETURNS --> EMPLOYEENAME
    Required --> employeename
    Please help me
    ..Vinit

    Vinit,
    You can use column aliases in your query -- see Oracle SQL Reference for more details.
    Then you can set some connection property in Oracle JDBC that allows you to obtain the column alias (I think). Check the Oracle JDBC User's Guide and Reference for more details.
    Good Luck,
    Avi.

  • Key Field Name not there_Content conversion

    Hello SDN,
                   I am doing a sender content conversion in send file adapter but i donot have a keyfield and my structure is :-
    Header,*,body,1 but there is no common field between header and body so i cant use a keyfield . Any solutions ?
    Regards,
    Anirban.

    Hi,
    Refer this ...
    http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    Hope it helps..
    kumar.S

  • GUID in table key (field name IDHEADR) is not supported

    Hi Experts,
    the above mentioned message (see subject) was displayed after I have tried to generate a
    maintanace view thorugh se11/ Utilities/ Table Maint. Generator / F6.
    What is wrong ?
    How can this problem be solved
    Regards
    sas

    ok I have followed your instructions but now I get the dump
    Syntax error in program "SAPLZPD_ZSDTAB ".
    ""OK_CODE" has already been declared."
    The include has been created and last changed by:
    Created by: "SAP "
    Last changed by: "SAP "
    Error in the ABAP Application Program
    The current ABAP program "SAPLSVIM" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    regards
    sas

  • Sender File FCC - Key Field Value not available in file

    Hi All,
    I am new to SAP PI. I am working on Sender FCC. Below is the source file structure. I need to handle multiple sub structures Header,1Data,*. I think I have to use Key.field Name and Value. But in the below format we don't have any indicator to identify which is header and which is data record. Please suggest how to processed.
    Header Record (Pipe delimited) (Cardinality 1:1)
    Date
    Invoice Number
    Total Amount
    Company Name
    Data Records (Fixed Length) (Cardinality 1:n)
    Date
    Amount
    Country
    Card Number
    etc...
    Sample File Snippet:
    20100430|4123451810|218.50|CC
    20100430    $150.00     INDIA       1234567     
    20100430    $150.00     INDIA       1234567     
    20100430    $150.00     INDIA       1234567     
    20100430    $150.00     INDIA       1234567

    Hi
    Try using the below parameters in FCC
    Header.fieldSeparator    |
    Header.endSeparator    'nl'
    Data.fieldFixedLengths   ur values --3,5,5..
    Data.endSeparator         'nl'
    Regards
    Ramg
    Edited by: Ramkumar Ganesh on May 24, 2010 4:05 AM

  • Problem in Sender File Adapter using FCC with Variable structure

    Hi Experts,
    Hi Experts,
    I have facing an issues while using FCC in Sender File adapter. Below are the configs for the same:-
    Recordset structure required is ==HEADER,1,DATA,*,TRAILER,1
    Recordset per message == *
    Key Field Name == Key
    (Sorry i dont know how to insert screen shot here..pls tell me how can i insert screen shots here on sdn)
    HEADER.fieldSeparator           ,
    HEADER.endSeparator           u2018nlu2019
    HEADER.fieldNames               Key,x,y,zu2026
    HEADER.keyFieldValue          1
    HEADER.keyFieldInStructure      ignore
    HEADER.fieldContentFormatting     trim
    HEADER.additionalLastFields     ignore
    HEADER.missingLastFields     ignore
    DATA.fieldSeparator
    DATA.endSeparator
    DATA.fieldNames
    DATA.keyFieldValue
    DATA.keyFieldInStructure
    DATA.fieldContentFormatting
    DATA.additionalLastFields
    DATA.missingLastFields
    Using same variables for Trailer record as well.
    Source CSV file which i am picking:-
    ADSE ,RASD,replan  Contact ,2  0080509 0 8:43:25   ,        
    EMPL ,0011111,  S Top Up ,20080401  ,20080430  ,sdf  ,                          00000000431250  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:35,
    EMPL ,0222222,  r Cash Award ,20070701  ,20070703  ,ded  ,                          00000000023509  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:09:31,
    EMPL ,0233333,   Cash Award ,20070801  ,20070831  ,df  ,                          00000000044057  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:10:56,
    EMPL ,0244444,   Cash Award ,20080101  ,20080111  ,sf  ,                          00000000026717  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:29,
    BTRL ,   5140, 
    When i tested the scenario and monitored it using MDT in CC monitoring tool its giving me below mentioned error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'http://myurlname/mdt/me...
    However if i change the occurence of DATA as some specific value for eg 4 instead of * it works fine.
    Kindly help me in solving this problem.
    Thanks,
    Aditya Verma

    Hi Madan,
    Thanks a lot for giving me the way to this. But when i tested this with the below file its giving me the same error. Please let me know if i need to do any changes to the parameters mentioned above:-
    ADSE ,ASDA,Sha  replan Fr ont Feed Contact ,2  0080509 0 8:43:25   ,        
    EMPL ,0011111,   Cash Top Up ,20080401  ,20080430  ,TPV  ,                          00000000431250  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:35,
    EMPL ,0222222,   r Cash Award ,20070701  ,20070703  ,TPV  ,                          00000000023509  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:09:31,
    EMPL ,0233333,  r Cash Award ,20070801  ,20070831  ,TPV  ,                          00000000044057  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:10:56,
    EMPL ,0244444,   Cash Award ,20080101  ,20080111  ,TPV  ,                          00000000026717  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:29,
    EMPL ,0255555,   Cash Award ,20080301  ,20080320  ,TPV  ,                          00000000027870  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:25,
    EMPL ,0266666,   Cash Award ,20071001  ,20071020  ,TPV  ,                          00000000020681  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:09:31,
    EMPL ,0877777,   Cash Top Up ,20080401  ,20080430  ,TPV  ,                          00000000036000  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:05,
    EMPL ,0888888,   Leaver Cash Award ,20071201  ,20071231  ,TPV  ,                          00000000157200  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:11:29,
    EMPL ,0899999,  S Leaver Cash Award ,20080301  ,20080331  ,TPV  ,                          00000000153530  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:42,
    EMPL ,0800000,  S Leaver Cash Award ,20070701  ,20070731  ,TPV  ,                          00000000012234  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:34,
    BTRL ,   5140,
    This the original csv file which i'll get in live. Kindly suggest as ur solution worked with other file but not working with this scv file.
    Thanks a lot,
    Aditya.

  • Key Field Value for File Adapter Sender Wildcard

    Hello everybody, is there a way to use a wildcard for the property of NamA.keyFieldValue in the cc for a Fils Sender????, here's an example why, I need to take some Files via PI 7.0 and my key filed can change according to the file an example is that in a file can be HF28 and in another file can be HF29, the only character that is going to be constant is the H, I would really appreciate any suggestions, thanks in advance.
    Regards,
    Julio Cesar

    Hi Julio
    File sender adapter will read the file using FCC
    Key Field Value entry is mandatory if the key field name is set. Otherwise, the entry can be ignored
    http://help.sap.com/saphelp_nw70/helpdata/EN/34/393071e9b998438ddb8ce97cd617a1/frameset.htm
    Content Conversion ( The Key Field Problem )
    Thanks
    Gaurav Bhargava

  • Sender File adapter File Conversion with key fields

    Please help me guys, I already spent way too much time on this!
    I checked a couple of BLOGs and I think I'm doing the right thing except I'm not getting the result I would expect.
    I'm trying to create an IDoc using the from a flat file.
    I get the following error:
    During the application mapping com/sap/xi/tf/_MM_TEST_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~
    The Source file is this:
    H
    L0015
    The file adapter does create the XML below (looks fine):
      <ns:MT_SINGLE xmlns:ns="http://PPSC_TO_BO_INVOICE">
      <HEADER>
         <ID>H</ID>
      </HEADER>
      <LINE>
         <ID>L</ID>
         <SITE>0015</SITE>
      </LINE>
      </ns:MT_SINGLE>
    When I test the map in IR, with the XML that this file adapter created (above) it works fine!
    Also if I take away the HEADER from the source structure everything works fine and I can create the IDoc, therefore I think something must be wrong in the file conversion, the mapping is so simple there is nothing to fail there.
    The file conversion parameters that I have:
    Document Name: MT_SINGLE
    Document Namespace: http://PPSC_TO_BO_INVOICE
    Document Offset:
    Recordset Name: 
    Recordset Namespace:
    Recordset Structure: HEADER,1,LINE,*
    Recordset Sequence: Ascending
    Recordset per Message:
    Key Field name: ID
    Key Field Type: String (Case-Sensitive)
    LINE.fieldNames: ID,SITE
    LINE.fieldFixedLengths: 1,4
    LINE.keyFieldValue: L
    HEADER.fieldNames: ID
    HEADER.fieldFixedLengths: 1
    HEADER.keyFieldValue: H
    What am I doing wrong???
    Any help is much appreciated.
    Thanks,
    Viktor Varga

    Hi Viktor,
    Basic rules:
    1. Down load XML payload(output From Adapter) and test it in IR mapping program. If it is working there is no reason why it will fail in Runtime. Also Check Cache is up to date.
    Generally the problem lies with namespace.
    Hope this helps
    Regards,
    Satish

Maybe you are looking for

  • Error message at send: "MailTips could not be retrieved" - need a cure

    after an Exchange server update by Comcast, I am getting the above error message and I need a cure.

  • Error : java.io.UTFDataFormatException: Invalid UTF8 encoding.

    When trying to create a new Application in JDeveloper after I go thru all the screens to create a New Fusion Application I receive the error message java.io.UTFDataFormatException: Invalid UTF8 encoding...... after clicking finish. Has anyone else se

  • "House of mirrors" bug with cover flow

    Anyone else having this? House of mirrors with cover flow. It appears to be a redrawn / VRAM issua. I'm running iTunes 7 on an iBook G3 500 (with 8MB of VRAM). If I choose to thousands of colors or lower the resolution, things work fine. However, I h

  • I have a iPhone 4s and I can't create new lists in Reminders

    my wife has an iPhone 4s, running IOS 7.0.4 She is trying to create a new list in Reminders and nothing happens - just dumb screens I have the same phone running same IOS and do not have the problem - Suggestions?

  • 'instance of' or subclass Expression

    Login is a subclass of Entity. I need to include things in my expression that are in Login but I only have a reference to Entity. builder.get("entity").get("username") does not work because only the login subclass has username. builder.get("login").g