Converting multiple records to a single "Y" on a report?

Okay, here's one for the experts. I have a table that's a many-to-one relation to each line of detail on my report. For example, a hard drive, Part Number 1234, might be assigned to multiple types of servers, i.e. it was assigned to 6 PE-C servers, 3 DCS servers, and 8 Blade servers. The assignment cross-reference table tells me the server PNs that the drive is assigned to. In the report detail for the hard drive PN, I have several categories, labelled: "PE-C", "DCS", "Blade", "EQL", etc. What I need to do for each line of main report detail (by PN), spin through the XREF file to find the PNs of the servers, then read each server for "Type". If even one server of a given Type (PE-C, etc) is assigned to that hard drive, I need the letter "Y" in the associated column, else a "N".
So it would look something like:
Part of the main Report Detail:
PN. . . . PE-C. . . DCS. . . Blade. . . EQL. . . CML
1234. . . . .Y. . . . . . Y. . . . . . N. . . . . .N. . . . . .Y
5678. . . . .N. . . . . . Y. . . . . . Y. . . . . .N. . . . . .Y
9012. . . . .Y. . . . . . N. . . . . . N. . . . . .Y. . . . . .Y
depending on which server types are assigned to the HD. There can be several server models under each type assigned to a drive, hence the many-to-one relationship.
So:
HD Master Table --> Server Assignment XREF Table -->Server Master Table
(HD Master: HD PN
Server Master: Server PN and TYPE
Server Assignment XREF: HD PN and Server PN)
I have absolutely NO CLUE how to go about doing this. Any thoughts or ideas would be hugely appreciated.
Thanks!!

Interesting. The problem is that the assignment is done through a stand-alone table, the Drive-Server-XREF table. That table only has the PN of the drive and the PN of the servers assigned to it. I would then need to take the PN of each server from that table, use it as a key to lookup the Server data, and pull the Type from that table. Then I would have to determine what the type is, and then assign a "Y" to a field (there would be something like 7 of these Y/N fields, one for each server type), depending on the type. Will your method work in that way?
So, for example, in the Drive Master table, we have ONE entry for PN 1234:
1234, somedata1, somedata2, etc
In the XREF table, we'd have something like:
1234,DX431 (the PN of the server it's assigned to)
1234, LT556
1234, AA221
1234, DP001
etc
Each of those PNs might be a different Type (or some of them would be the same type).
In the Server Master table, it would be:
DX431, somedata1, PE-C, somedata2
LT556, somedata1, Blade, somedata2
AA221, somedata1, Blade, somedata2
DP001, somedata1, DCS, somedata2
so you see, I would have to read across two tables to get what I need.

Similar Messages

  • MessageTransformBean - SimplePlain2XML - Multiple records on a single line

    Hi,
    I am trying to convert multiple record from a single line to multipe rows in an XML message with the MessageTransformBean.
    If the record look like this it's working:
    RECORD1textETC
    RECORD2textETC
    But the incoming message are all on a single line:
    RECORD1textETCRECORD2textETC
    Is there a way to add a linefeed to my incoming message after X characters, or to tell the adapter to split by length instead of spliting on the end of line?
    Thanks,
    Martin

    I had to code a custom Module Adapter to do it.
    Here's the main part of the module adapter EOLConvertBean...
    Message msg = (Message) inputModuleData.getPrincipalData();
    XMLPayload xmlpayload = msg.getDocument();
    byte[] content = xmlpayload.getContent();
    byte crlf = 0x0A; // end of line char
    int current = 0;  // current bytes read     
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int lines = content.length / recordLen; // record len = insert EOL after X recordLen
    // TODO change for do while for 1x line record
    for (int i = 0; i <= lines; i++) {
         baos.write(content, current, recordLen);
         baos.write(crlf);
         current += recordLen;
    xmlpayload.setContent(baos.toByteArray());
    inputModuleData.setPrincipalData(msg);
    Edited by: Martin Lavoie Rousseau on Oct 6, 2010 9:08 PM

  • Concatenate multiple records into one single record

    Hello everyone,
    Can anyone guide me how to merge multiple records into one single record
    like......... I am getting the data in the file like
    aaaaa/bbbbbbb/ccccccccccc/dddddddddddd/eee
    ffffff/gggg/hhhhhhhhhhhhhh
    /123/4567/55555/99999999/kaoabfa/eee
    fffff/kkkkkkkk/llllllllllllllllllllllll
    when i use gui_upload I am getting the data into the internal table in the above format.
    My main intension is to split the record at / to multiple lines and dowload it into another file.
    What i am planning to do is... if the line does not start with / then i want to concatenate the multiple lines into single line and then split it into multiple records. Can anyone guide me how to achieve this.

    Yes, it should work.
    In my example
    Loop at itab.
    concatenate i_text itab into i_text.
    endloop.
    You change that loop for the loop of your internal table with the file records
    So if you have this three records
    'aaaa/bbb/ccc'
    '/dddd/efg'
    'hijk/lmn'
    i_text will look like this at the end
    'aaaa/bbb/ccc/dddd/efghijk/lmn'
    then in this part of the code
    split i_text at '/' into table itab2.
    itab2 will have the records looking like this
    aaaa
    bbb
    ccc
    dddd
    efghijk
    lmn'

  • How to insert multiple records in a single query

    Dear all,
    Can you please tell
    how to insert multiple records in a single query ??

    INSERT INTO table_name (column_1, column_2) VALUES ('value_A', 'value_B')OR
    INSERT INTO table_name
    (column_1, column_2)
    SELECT 'value_A', 'value_B' FROM DUAL
    UNION ALL
    SELECT 'value_C', 'value_D' FROM DUAL
    ;Edited by: Benton on Nov 9, 2010 1:59 PM

  • Multiple records as a single transaction in JDBC Receiver Adapter

    Hi,
    I am sending multiple records in a single message to a JDBC receiver adapter to get updated to the database. How to make all the insert a single transaction. Like all the records has to be inserted else all has to be rolled back.
    For eg for table Employee two fields EMPNO and EMPNAME
    EMPNO  EMPNAME
    1            Jay
    2            Christie
    These two records are in the same message and has to be updated
    if one fails the other has to be rolled back.
    How can i achieve it using a JDBC Receiver Adapter.
    Thanks
    Sebin

    Hi Rolf Micus,
    My xml structure to insert 2 tables are as follow:-
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_PODB xmlns:ns0="http://abeam.com/xi/fer_filejdbc_scenarios1">
    ..   <STATEMENT_HEADER>
    ....      <ROW action="INSERT">
    ......         <TABLE>ZPO_HEADER</TABLE>
    ......        <access>
    ........            <PONUMBER>001</PONUMBER>
    ........            <PODATE>20070801</PODATE>
    ........            <POAMOUNT>200.99</POAMOUNT>
    ....         </access>
    ....      </ROW>
    ..   </STATEMENT_HEADER>
    ..   <STATEMENT_DETAIL>
    ....      <ROW action="INSERT">
    ......         <TABLE>ZPODETAIL</TABLE>
    ......         <access>
    ........            <PONUMBER>001</PONUMBER>
    ........            <PONO>1</PONO>
    ........            <POITEMCODE>A12345</POITEMCODE>
    ........            <POITEMDESC>Testing A</POITEMDESC>
    ........            <POITEMAMOUNT>2990.00</POITEMAMOUNT>
    ........            <POITEMQTY>55</POITEMQTY>
    ......         </access>
    ....      </ROW>
    ..   </STATEMENT_DETAIL>
    </ns0:MT_PODB>
    Fro the structure that you have declared..there is only contained 1 statement, try to admend your MT to have 2 statements.
    If you wish to insert multiple records, just create a loop/multiple of access tag inside STATEMENT tag. For example, multiple records insert into Header should have multiple access tag in Header STATEMENT. Same goes for muliple records insert into Details STATEMENT should have multiple access tag in Details STATEMENT.
    With this structure, whenever any records insert/update/delete failed...it will rollback all the transactions together, ie. Header and Details.
    PS: For different table, please create different STATEMENT.
    Hope it helps.
    Message was edited by: Pua Ming Fei

  • Function Module to convert multiple records into single record and vice-ver

    hi,
    i have a requirement to convert 10 records in an internal table to single record which should be passed
    to a single variable and store in the database.Kindly let me know is there any function module
    which meets my requirement. Also i need to do split one single record to 10 records each of
    say 65 length interval.
    kindly provide me if there is nay functinon module as such.
    I can do with ABAP-OOPS.Please suggest function module.

    I dont think such FM exists, but if you wanna code one it would be simple. Just loop through the internal table, keep concatenating the currently processing record into a long character variable to convert 10 records into one record.

  • Multiple records for a single transaction - Issue in LSMW

    Hi,
    i'm facing a issue in LSMW
    i have the data coming up in the flat file. the data which constitutes the single transaction consists of  data from multiple records from the flat file..
    suppose we have 10 records in the flat file... and all the 10 records related to ony  2 transactions i.e say 6 records to first transaction and next 4 records to next transaction.
    we have a direct input method to handle this data like field1 for first record, field2 for 2nd record and so on...
    while uploading, we will get all the records one by one into our source structure. My question is can we handle this scenario in lsmw? if yes, pls suggest
    Thanks in advance
    Shekhar

    Hi Kris,
    this is regarding the asset creation via AS01..
    we are getting the flat file in that way. Lets assume like this:
    suppose for one transaction we may need to fill 5 depreciation keys and for another option only 3 dep. keys we need to fill.
    then in the flat file, we can get like 5 records for first transaction i.e asset and 3 records for 2nd transaction
    Can we handle this via lsmw
    Regards
    shekhar

  • Mapping is inserting multiple records from a single source to Dimension.

    Hi All,
    I am very new to OWB. Please help me out. I've created Dimension with the help of the wizard and then a mapping which consist of single source and single dimension. The mapping is populating nearly 500 times of the actual records. Following are some details to give you a better understanding of mapping: I created a dimension with four levels and two hierarchy. Levels are L1, L2, L3 and L4 and hierarchies are H1-> L1, L2 and L4
    and H2-> L3 and L4. L4 is lowest level of hierarchy. L1 and L3 are parent levels in the respective hierarchies. I assigned an attribute of each level as Business identifier that means business identifier attribute is different in each level. In mapping I mapped the parent natural key(Key for parent Level in a hierarchy) as the value which has been mapped for parent level. The result is coming 500 times of the record that exist in source table. I've tried even single common business identifier for each level but again the result is 5 times of the records. Please let me know the solution.
    Thanks is advance.
    Amit

    Hi ,
    You may not be having multiple records in your dimension.
    To understand better the records insertion, try a snow flake version of the dimension and see how the records are inserted as per the levels in the respective tables.
    Thanks

  • Examples for converting multiple form output to single pdf

    Hi all ,
         I need sample code or examples for converting multiple smart form outputs (more than 1)  to single pdf. Can someone provide that? Reply  ASAP 
    Thanks & Regards,
    Pavan.

    Hi,
    check this:
    [How to merge multiple spools into single PDF file?;
    [Merge multiple PDF Files;
    [https://www.sdn.sap.com/irj/scn/advancedsearch?query=multipleformoutputtosinglepdf++]
    hope u'll get some idea.
    Regards,
    Sneha.

  • Combining multiple records into a single record (View)

    Okay so here is my scenerio:
    There is a table I have made that details SQL jobs and the various details about them. What i wan't to do is make a view with specific logic implemented. Fields that will be taken across to this view will be: LastRunDate, LastRunTime and Step_Status.
    JobName will also be used to define the logic but will not be a column in itself.
    What i wan't is an additional column using this logic, called 'DataSet'. For each Dataset there are multiple jobs that are unique to it, so there are multiple records being brought over from the table to view for one particular dataset. For example,
    for 'ExampleDataSet' there are three jobs, i wan't it so these jobs are combined and named as 'ExampleDataSet' under a calculated column called 'Dataset'. For the following fields i would like it so that LastRunDate and LastRunTime are the time in whichever
    job was last to be intitiated is the date and time set. For Step_Status, there are three possible results, 'Running', 'Failed' or 'Succeeded'. If any of the three jobs are 'Running', then 'Running'. If neither are running yet one has failed then 'Failed'.
    Only when all three have succeeded should it then be set to 'Succeeded'.
    I hope i have made that clear enough, please feel free to ask any questions if not. I am relatively new to SQL but i thought to at least try least try (I knew it wouldn't work) and it didn't work. But it may give you a better idea of
    what i wan't:
    CREATE VIEW [dbo].[vw_DataAvailabilityAnalysts] AS
    SELECT CASE
    WHEN JobName in ('Job1','Job2','Job3') and step_status='Running' THEN 'Running'
    WHEN JobName in ('Job1','Job2','Job3') and step_status='Failed' THEN 'Failed'
    WHEN JobName in ('Job1','Job2','Job3) and step_status='Succeeded' THEN 'Succeeded'
    END as StatusCheck,
    CASE WHEN JobName in ('Job1','Job2','Job3') THEN 'ExampleDataSet'
    END as DATASET,
    LastRunDate,
    lastruntime,
    step_status,
    FROM [CDS_Common].[dbo].[DataAvailability]
    Many Thanks,
    Plain_Clueless
    Plain_Clueless

    Okay so here is what my table looks like (Simplified). There are four columns and the data within is extracted via a Stored Procedure.
    JobName
    LastRunDate
    LastRunTime
    Step_Status
    Job1
    11/06/2014
    09:30:00
    Succeeded
    Job1
    10/06/2014
    09:37:20
    Succeeded
    Job2
    11/06/2014
    04:05:00
    Succeeded
    Job1
    09/06/2014
    02:17:41
    Succeeded
    As you can see there are 3 jobs which are all 'Job1'. This jobs are obviously different within the table however this represents that they are jobs which all update the same DataSet within our local warehouse. Whereas Job2 updates a different dataset alltogether.
    I wan't to create a view which will alagmate the jobs that are of the same DataSet, which will disclude the column JobName but would create a whole new column that looks like this:
    DataSet
    LastRunDate
    LastRunTime
    Step_Status
    DataSet2
    11/06/2014
    04:05:00
    Succeeded
    DataSet1
    11/06/2014
    09:30:00
    Succeeded
    Bascically what this shows you is all the Job 1's combined so they are one record, Amaglamated. The last time any of these jobs were run is the LastRunDate & LastRunTime, which was the first record in the first table provided. Again for Step_Status,
    there are three possible results, 'Running', 'Failed' or 'Succeeded'. If any of the three jobs are 'Running', then 'Running' (Absolute). If none of the three jobs are running yet one has failed then 'Failed'. If one has failed yet another is also running then
    'Running'.Only when all three have succeeded should it then be set to 'Succeeded'. (This last bit isn't as important).
    Hope this clears it up a bit,
    Plain_Clueless
    Plain_Clueless

  • Convert Multiple Rows in a single Comma Seprated value

    Is is possible to convert miltiple rows in a single value by concatenating each row value in OBIEE. I think OI had seem a blog post relted to this by I'm not able to to find it again. Basically Here is what I would like to do:
    Customer number Location
    101 IL
    101 NY
    101 PA
    102 TX
    102 CA
    Convert this to
    101 IL, NY, PA
    102 TX,CA
    Can someone please let me know if this is possible and how to make it work.
    Thanks you for the help in advance.

    You can do this by creating a DB function,
    Check this link
    Re: Horizontal value display
    Thanks,
    Vino

  • Convert multiple page PDF to single TIFF doc

    Is it possible to convert multiple page PDF to one TIFF file (with multiple pages).  I also have access to Acrobat 6, 9 and 10.

    Acrobat does not support writing multiple page TIFFs

  • How to pass multiple values to a single parameter in BW report URL

    Hi Experts,
    I am new to EP and learning .... i am stuck at one point where we need to pass multiple parameters to a BW report URL, this is the URL that we launch from BSP.... Suppose i have to pass different multiple values to a single parameter, how to do it....
    i m getting many answers to pass parameters to iviews, reports, but not specific to my case.. can u plz help me....
    Thanks in advance
    Priya Rai

    What is the prolem you are facing if you split the single date param as two parameters say startdate and enddate?
    If you pass as single string then you might have to split the same at reciever end.
    Are you trying any thing specific?

  • Display multiple records as sub-sections in the same report.

    I am using Crystal Reports (VS-2005).
    In a report, I have various sub-sections in the Details section. Each section represents a category and is connected with SQL command which uses LEFT OUTER JOIN.
    The first section is the main section and the subsequent sections are the child sections.
    Sometimes, a sub-section (other than the first main sub-section) picks multiple records of that category. In this case the report extends to multiple pages. Each report displays one record of this sub-section.
    I want to show the the same sub-section multiple times in the same report as opposed to multiple reports that are now automatically generated by Crystal Reports.
    How to handle this issue?

    This is a .NET programming forum related to Crystal Reports. Your question is best suited for our report design forum below. Also, when you post your question it will be helpful if you use report design terminology. We have elements like Report Header, Page Header, Groups, and Details sections. Just mentioning "sections" doesn't give us a good idea about what you are attempting to do.
    Check out the grouping options and see if it helps. You might need to create a formula to help you with your grouping though.
    If you like, I can move this to the design forum.
    [SAP Crystal Reports Design|SAP Crystal Reports;

  • Assign multiple records to a single graphic in Visio (Or SharePoint 2013 in Office 365)

    Hello,
    I would like to make a live seating chart for an event.  I am pulling data from a SharePoint 2013 list that has names and table numbers (and other stuff).  There will be 10 names per table.  Each name is a record, not each table number. 
    10 names will have the same table number.  I can only see where Visio lets me attach one record to a graphic.  I can automatically link Tbl# (in my list) to
    Table_No in the graphic but it will only pick up the first entry, not all 10.  Is there a way to tell Visio to look at the list, and where
    Tbl# equals Table_No attach the first and last name from all 10 records to the graphic?  I want it to be dynamic so when they edit the list, the tables change accordingly.
    Maybe there is an app for that in SharePoint?  I am working on Office 365 SharePoint.
    Thank you for any assistance.
    Richard Twigg

    Hi rtwigg,
    seems this is one of visio graphics limitation regarding the external data.
    visio graphics, may only support for one row.
    you may consider this idea :
    "It is a good idea to separate your rows into visual units so that you have everything you need and nothing else in a single row. To link a shape to a data row, simply drag the row from the external data window and drop it on the shape. A default data
    graphic should immediately appear next to the shape displaying some data from the row. From here you are able to customize the graphic to fit your needs"
    by means, you may need to use the visio client.
    http://blogs.msdn.com/b/visio/archive/2010/02/05/no-code-mashups-with-visio-services-and-web-part-connections.aspx
    http://msdn.microsoft.com/en-us/library/ff408345.aspx
    http://msdn.microsoft.com/en-us/library/ff394649.aspx
    http://blogs.msdn.com/b/visio/archive/2010/02/21/the-visio-services-javascript-mashup-api.aspx
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Maybe you are looking for