Query in mapping gl to conditions

hiii experts, i have got a query like .. there are few condtions like JEXP,JECT,JAIX.( accounting key assigned exd)... now the client says there few wrong gl assigned to these condtions ... the maintained vk11 with key combination customer/material... i checked obcn and obyc.. but didnt find these accounting key... sooo now go sucked where the gl are assigned ... are they assigned as per mat group to valuation class. if yes how can view which gl is assigned to which gl group??

For account determination in CIN, follow following path in SPRO:
Where, Excise transaction type(ETT) DLFC is for SALES.
FYI, tax account determination takes place in OB40.
If you search SCN, you will get many related information.
Thanks, JP

Similar Messages

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • Unable to find Searchable Item in Query Criteria Map

    Hi ,
    Am try to personalize Advacned Search Region to Include new search Criteria in R12 iSupplier Portal->Home->Orders Tab->Advanced search.
    Am trying to create new search field in the Add another row field through personalization.
    I have created new row criteria,when am trying to create Query Criteria Map,Am unable to list the Searchable Item as it is Drop down list.
    This causing unable to query the records based on the newly created row criteria item.
    Please advise.
    Thansk<Sarath.

    Hi Jobnish,
    There is no code in this requirement.
    There is no error...Issue is unable to query data based on newly create criteria row in Advanced search.
    I can give you navigation:
    iSupplier Portal->Home->Orders Tab->Press advanced search Region
    Click on the Personalize Page(I hope you know how to enable the personalize link using profile option).
    In SupplierRN ->Advanced Search Criteria and creating custom item Criteria Row..
    We need to map this field in Advanced Query Mapping.
    However the issue is the Am unbale find the Searchable item (which is created in Criteria Row) in the drop downlist.
    I can provide screen-shot if you need.
    Thanks,Sarath.

  • Query in mapping process....

    can i do the query in mapping process 4 dimensions or cubes??? using which pallete??? n how 2 use it with my own queries???
    thx guyz....

    Perhaps if you rewrite your question in something that resembles English you may get an answer.

  • Query for MAP Calculation - Price Control ind V and S

    SAP Guru's
    Query regarding MAP Calculation Logic
    Scenario:
    *I have one material xyz
    1. It is split valuated material,
    2. Two valuation types with diff price control indicators
    3. Batch Management is also activated on this material.*
    Follwoing is the Material Master Accounting1 View :
    Vauation Type     Price Control     Total Value     Qty     MAP                  Batch     
         ZA1          V                     610835.00             37     16509.05(V)          01
         ZB1          S                     0                  1     20000.00(S)          02
    but when we are running MM03 w/o Valuation Type Accounting 1 View
    is showing MAP as 16074.60 i.e. 610835.00/38
    Diff. Reports Output------>
    MB5L - List of Stock Values: Balances --> Output
    ValArea          Total Stock          Total Value
    A101               1                          0
    A101               37                          610835.00
    Net-->               38                  610835.00
    MB52 - Display Warehouse Stocks
    Check Box - Display Batch Stocks
    Condition1: When Display Batch Stocks is selected on main screen of MB52
    Mat.     Palnt      Sloc      Unrestricted     Stck in Transit          Total Value
    xyz     A101     0010      0                    30                       482238.00
    XYZ     A101     0010      7                    0                       115563.00
    xyz     A101     0010      1                    0                        0
    This is not correct result as Total Values is 597801.00 only      
    Condition2: When Display Batch Stocks is not selected on main screen of MB52
    Mat.     Palnt     Sloc     Unrestricted     Stck in Transit          Total Value
    xyz     A101     0010         0                  30                       482238.00
    XYZ     A101     0010         8                   0                       128597.00
    This is correct result as Total Values is 610835 .00 only
    So my query on above issue is :
    1. How System is including 1 Qty of Std Price Control for MAP calculation?
    As per my understanding MAP is only for Price Control V indicator Materials Stock
    2. Whats the difference between these two report output from MM03 Accounting
       view?
    Thanks

    hi Animesh,
    For Split Valuated Material at header level Price control is always "V" i.e. Moving average price reagrdless of the Price control you have given for different valuation types.
    Due to this you are getting these kind of results. Please visit the following link for more information
    http:///saphelp/EN/8f/d1de34e4cb2300e10000009b38f83b/frameset.htm
    Check it and revert back.
    Regards,
    Jay
    Edited by: SAP_MM on Dec 4, 2008 10:19 AM

  • SQL Query in mapping to load warehouse table

    Hi experts,
    I hope you can help me to solve my problem. I already searched here in forum how we can add a query in a mapping but still not found an answer.
    In my warehouse I have a time dimension table which has a unique dimension key and all date information. In my source database I have a table for sales information. In that sales table I have a field called date. This date will be in format dd.mm.yyyy.
    I also have a sales table in my warehouse what is nearly a copy of the source sales table. I have only one more field in this warehouse sales table called "time_dim_key". That field should get the dimension key of the warehouse time dimension table depending to the date out of the sales table from source.
    To do that I'm thinking about a mapping what includes:
    - the source sales table
    - the warehouse dimension time table
    - the warehouse sales table
    The normal fields I can directly map from source sales table to warehouse sales table.
    But the "time_dim_key" field of warehouse sales table should get filled like:
    select dimension_key from warehouse_time_dim_table where day_date = source_sales_table.date
    Unfortunately I don't know how I include a query to get the correct date out of that source sales table in the mapping to fill the warehouse sales table.
    I hope somebody can help me to solve that issue.
    Thanks a lot!
    Regards,
    David

    take joiner from the pallete
    and create two groups
    1.warehouse_time_dim_table
    2.source_sales_table
    then in join condition write
    warehouse_time_dim_table.day_date = source_sales_table.date
    That will solve the purpose.
    Cheers
    Nawneet

  • Mapping issue for condition must be  satisfied

    Hi All,
             I am using IDOC ORDERS05 for my interface IDOC to FILE,
    in which i have partner fuction as PARVW , in which i have to AG and LF
    i must must pouplate data if the from the IDOC PARTN if the  PARVW is AG to the VENDORCODE in my target
    i must must pouplate data if the from the IDOC PARTN if the  PARVW is LF to the BUYER in my target
    please help how to do it and what condition i must use for this '
    Thanking you
    Sridhar

    Hi,
    Since you are mapping them on the target side you can use your IDOC variables in multiple palces if you are mapping graphically.
    i.e. 1. VENDOR -> if PARVW is equal to AG then PARTN to VENDORCODE
         2. BUYER -> if PARVW is equal to LF then PARTN to BUYER
    Make sure you set the context for both PARVW & PARTN to its upper level parent & not the immediate level.
    for eg:
         IDOC
               ---E2EDKA1
                       ---PARVW
                      |
                       ---PARTN
    set it to IDOC & not E2EDKA1. if you still have doubts on context you can put your query  back...
    Thanks,
    venkatesh

  • Date Validation-SQL Query or Mapping

    Dear Friends,
    I'm using sender JDBC adapter and fetching data.
    Let say the table structure is Name,ID,Datetime.
    I want to select the query and the resultset must be in the following fomat
    I want to check the validation that if Datetime value is 2 weeks greater than current date return YES, else return NO
    Is the above condition possible while selecting from the database itself?
    If we can't achieve it using query, then I've to go for Mapping. Can you guys tell me the logic to implement the same.
    <Rows>
    <Name>J</Name>
    <ID>126376</ID>
    <DateTime>YES</DateTime>
    </Rows>
    <Rows>
    <Name>P</Name>
    <ID>126372</ID>
    <DateTime>YES</DateTime>
    </Rows>
    <Rows>
    <Name>S</Name>
    <ID>126334</ID>
    <DateTime>NO</DateTime>
    </Rows>
    If the above requirement is not clear, please let me know.
    Thanks for all of  your valuable time!!!
    Best regards,
    raj.

    Satish & Matias,
    Thanks a lot for ur valuable time and help.
    @Matias I tried to query with the SQL , but I failed since its throwing exception always.
    @Satish: I wrote UDF and achieved the same.
    <b>Code:</b>
    //Sample input date: 2005-06-16 14:33:21.0
    int year=Integer.parseInt(time.substring(0,4));
    int month=Integer.parseInt(time.substring(5,7))-1 ;
    int date=Integer.parseInt(time.substring(8,10));
    int hour=Integer.parseInt(time.substring(11,13));
    int min=Integer.parseInt(time.substring(14,16));
    int sec=Integer.parseInt(time.substring(17,19));
    Calendar c1 = Calendar.getInstance();
    Calendar c2 = Calendar.getInstance();
    c1.set(year,month,date,hour,min,sec);
    c1.add(Calendar.DAY_OF_MONTH,14);
    if(c2.before(c1))
    return "NO";
    else
    return "YES";
    Thanks friends!!!
    Best regards,
    raj.

  • SQL Query for mapping a set of batches to a class rooms group

    Hi All,
    I am using Oracle 11g Release 2 database.
    I have the following data set:
    ClassRooms
    ClassId ClassName                    Capacity     Group
    1 Babbage/Software Engg Lab          24          1
    2     Basement - PG Block               63          1
    3     Classroom 1                    56          1
    4     Classroom 10                    24          1
    5     Classroom 11                    24          1
    6     Classroom 12                    35          1
    7     Classroom 13                    42          1
    8     Classroom 14                    42          1
    9     Classroom 15                    42          1
    10     Classroom 2                    35          1
    11     Classroom 3                    35          1
    12     Classroom 4                     35          1
    13     Classroom 5                    35          1
    14     Classroom 6                    25          1
    15     Classroom 7                    25          1
    16     Classroom 8                    24          1
    17     Classroom 9                    24          1
    18     Control Sys Lab                    24          1
    19     Dig & Embd Sys Lab               20          1
    20     DSP & Comm Lab                    20          1
    21     Electromechanical System Lab     28          1
    22     Farabi/Web Tech Lab               36          1
    23     Gen Purpose Lab                    40          1
    24     Shirazi/DB Tech Lab               36          1
    25     Adv Elect Lab                    30          2
    26     Classroom 16                    42          2
    27     Classroom 17                    49          2
    28     Classroom 18                    56          2
    29     Classroom 19                    42          2
    30     Classroom 20                    49          2
    31     Classroom 21                    35          3
    32     Classroom 22                    35          3
    33     MDA Lab                         20          3
    DegreeBatches
    BatchId      BatchName Strength
    1          BIT-11          79          
    2          BIT-12          28          
    3          BS(CS)-1          35          
    4          BS(CS)-2          78          
    5          BE(SE)-1          69          
    6          BE(SE)-2          84          
    7          BE(SE)-3          64          
    8          BICSE-7          84          
    9          BICSE-8          43          
    10          BEE-1          112          
    11          BEE-2          151          
    12          BEE-3          157          
    13          BEE-4          157          
    I want to map a degree batch combination to a class rooms group in such away that they fully utilize maximum capacity of the class rooms within a group (Ideal case) or as close to it as possible. Can it be done with a SQL query?
    Any response will be highly appreciated.
    SQL Scripts to generate the required tables and populate data is below:
    CREATE TABLE ClassRooms (ClassId NUMBER, ClassName     VARCHAR2(50), Capacity NUMBER, Group NUMBER);
    INSERT INTO ClassRooms VALUES(1,'Babbage/Software Engg Lab',24,1);
    INSERT INTO ClassRooms VALUES(2,'Basement - PG Block',63,1);
    INSERT INTO ClassRooms VALUES(3,'Classroom 1',56,1);
    INSERT INTO ClassRooms VALUES(4,'Classroom 10',24,1);
    INSERT INTO ClassRooms VALUES(5,'Classroom 11',24,1);
    INSERT INTO ClassRooms VALUES(6,'Classroom 12',35,1);
    INSERT INTO ClassRooms VALUES(7,'Classroom 13',42,1);
    INSERT INTO ClassRooms VALUES(8,'Classroom 14',42,1);
    INSERT INTO ClassRooms VALUES(9,'Classroom 15',42,1);
    INSERT INTO ClassRooms VALUES(10,'Classroom 2',35,1);
    INSERT INTO ClassRooms VALUES(11,'Classroom 3',35,1);
    INSERT INTO ClassRooms VALUES(12,'Classroom 4',35,1);
    INSERT INTO ClassRooms VALUES(13,'Classroom 5',35,1);
    INSERT INTO ClassRooms VALUES(14,'Classroom 6',25,1);
    INSERT INTO ClassRooms VALUES(15,'Classroom 7',25,1);
    INSERT INTO ClassRooms VALUES(16,'Classroom 8',24,1);
    INSERT INTO ClassRooms VALUES(17,'Classroom 9',24,1);
    INSERT INTO ClassRooms VALUES(18,'Control Sys Lab',24,1);
    INSERT INTO ClassRooms VALUES(19,'Dig & Embd Sys Lab',20,1);
    INSERT INTO ClassRooms VALUES(20,'DSP & Comm Lab',20,1);
    INSERT INTO ClassRooms VALUES(21,'Electromechanical System Lab',28,1);
    INSERT INTO ClassRooms VALUES(22,'Farabi/Web Tech Lab',36,1);
    INSERT INTO ClassRooms VALUES(23,'Gen Purpose Lab',40,1);
    INSERT INTO ClassRooms VALUES(24,'Shirazi/DB Tech Lab',36,1);
    INSERT INTO ClassRooms VALUES(25,'Adv Elect Lab',30,2);
    INSERT INTO ClassRooms VALUES(26,'Classroom 16',42,2);
    INSERT INTO ClassRooms VALUES(27,'Classroom 17',49,2);
    INSERT INTO ClassRooms VALUES(28,'Classroom 18',56,2);
    INSERT INTO ClassRooms VALUES(29,'Classroom 19',42,2);
    INSERT INTO ClassRooms VALUES(30,'Classroom 20',49,2);
    INSERT INTO ClassRooms VALUES(31,'Classroom 21',35,3);
    INSERT INTO ClassRooms VALUES(32,'Classroom 22',35,3);
    INSERT INTO ClassRooms VALUES(33,'MDA Lab',20,3);
    CREATE TABLE DegreeBatches (BatchId NUMBER, BatchName VARCHAR2(50), Strength NUMBER);
    INSERT INTO DegreeBatches VALUES(1,'BIT-11',79);          
    INSERT INTO DegreeBatches VALUES(2,'BIT-12',28);          
    INSERT INTO DegreeBatches VALUES(3,'BS(CS)-1',35);          
    INSERT INTO DegreeBatches VALUES(4,'BS(CS)-2',78);          
    INSERT INTO DegreeBatches VALUES(5,'BE(SE)-1',69);          
    INSERT INTO DegreeBatches VALUES(6,'BE(SE)-2',84);          
    INSERT INTO DegreeBatches VALUES(7,'BE(SE)-3',64);          
    INSERT INTO DegreeBatches VALUES(8,'BICSE-7',84);          
    INSERT INTO DegreeBatches VALUES(9,'BICSE-8',43);          
    INSERT INTO DegreeBatches VALUES(10,'BEE-1',112);          
    INSERT INTO DegreeBatches VALUES(11,'BEE-2',151);     
    INSERT INTO DegreeBatches VALUES(12,'BEE-3',157);     
    INSERT INTO DegreeBatches VALUES(13,'BEE-4',157);     
    Best Regards
    Bilal
    Edited by: Bilal on 27-Dec-2012 09:52
    Edited by: Bilal on 27-Dec-2012 10:07

    Bilal, thanks for the nice problem! Another possibility for duplicate checking is to write a small PL/SQL function returning 1 if a duplicate id is found, then equate it to 0: 'Duplicate_Token_Found (p_str_main VARCHAR2, p_str_trial VARCHAR2) RETURN NUMBER'. This would parse the second string and might use p_str_main LIKE '%,' || l_id || ',%' for each id. Anyway the full query (without that) is given below:
    Solution with names
    SQL> WITH rsf_itm (con_id, max_weight, nxt_id, lev, tot_weight, tot_profit, path, root_id, lev_1_id) AS (
      2  SELECT c.id,
      3         c.max_weight,
      4         i.id,
      5         0,
      6         i.item_weight,
      7         i.item_profit,
      8         ',' || i.id || ',',
      9         i.id,
    10         0
    11    FROM items i
    12   CROSS JOIN containers c
    13   UNION ALL
    14  SELECT r.con_id,
    15         r.max_weight,
    16         i.id,
    17         r.lev + 1,
    18         r.tot_weight + i.item_weight,
    19         r.tot_profit + i.item_profit,
    20         r.path || i.id || ',',
    21         r.root_id,
    22         CASE WHEN r.lev = 0 THEN i.id ELSE r.nxt_id END
    23    FROM rsf_itm r
    24    JOIN items i
    25      ON i.id > r.nxt_id
    26     AND r.tot_weight + i.item_weight <= r.max_weight
    27   ORDER BY 1, 2
    28  ) SEARCH DEPTH FIRST BY nxt_id SET line_no
    29  , rsf_con (nxt_con_id, nxt_line_no, con_path, itm_path, tot_weight, tot_profit, lev) AS (
    30  SELECT con_id,
    31         line_no,
    32         To_Char(con_id),
    33         ':' || con_id || '-' || (lev + 1) || ':' || path,
    34         tot_weight,
    35         tot_profit,
    36         0
    37    FROM rsf_itm
    38   UNION ALL
    39  SELECT r_i.con_id,
    40         r_i.line_no,
    41         r_c.con_path || ',' || r_i.con_id,
    42         r_c.itm_path ||  ':' || r_i.con_id || '-' || (r_i.lev + 1) || ':' || r_i.path,
    43         r_c.tot_weight + r_i.tot_weight,
    44         r_c.tot_profit + r_i.tot_profit,
    45         r_c.lev + 1
    46    FROM rsf_con r_c
    47    JOIN rsf_itm r_i
    48      ON r_i.con_id > r_c.nxt_con_id
    49   WHERE r_c.itm_path NOT LIKE '%,' || r_i.root_id || ',%'
    50     AND r_c.itm_path NOT LIKE '%,' || r_i.lev_1_id || ',%'
    51     AND r_c.itm_path NOT LIKE '%,' || r_i.nxt_id || ',%'
    52  )
    53  , paths_ranked AS (
    54  SELECT itm_path || ':' itm_path, tot_weight, tot_profit, lev + 1 n_cons,
    55         Rank () OVER (ORDER BY tot_profit DESC) rnk,
    56         Row_Number () OVER (ORDER BY tot_profit DESC) sol_id
    57    FROM rsf_con
    58  ), best_paths AS (
    59  SELECT itm_path, tot_weight, tot_profit, n_cons, sol_id
    60    FROM paths_ranked
    61   WHERE rnk = 1
    62  ), row_gen AS (
    63  SELECT LEVEL lev
    64    FROM DUAL
    65  CONNECT BY LEVEL <= (SELECT Count(*) FROM items)
    66  ), con_v AS (
    67  SELECT  b.itm_path, r.lev con_ind, b.sol_id, b.tot_weight, b.tot_profit,
    68          Substr (b.itm_path, Instr (b.itm_path, ':', 1, 2*r.lev - 1) + 1,
    69            Instr (b.itm_path, ':', 1, 2*r.lev) - Instr (b.itm_path, ':', 1, 2*r.lev - 1) - 1)
    70             con_nit_id,
    71          Substr (b.itm_path, Instr (b.itm_path, ':', 1, 2*r.lev) + 1,
    72            Instr (b.itm_path, ':', 1, 2*r.lev + 1) - Instr (b.itm_path, ':', 1, 2*r.lev) - 1)
    73             itm_str
    74    FROM best_paths b
    75    JOIN row_gen r
    76      ON r.lev <= b.n_cons
    77  ), con_split AS (
    78  SELECT itm_path, con_ind, sol_id, tot_weight, tot_profit,
    79         Substr (con_nit_id, 1, Instr (con_nit_id, '-', 1) - 1) con_id,
    80         Substr (con_nit_id, Instr (con_nit_id, '-', 1) + 1) n_items,
    81         itm_str
    82    FROM con_v
    83  ), itm_v AS (
    84  SELECT  c.itm_path, c.con_ind, c.sol_id, c.con_id, c.tot_weight, c.tot_profit,
    85          Substr (c.itm_str, Instr (c.itm_str, ',', 1, r.lev) + 1,
    86            Instr (c.itm_str, ',', 1, r.lev + 1) - Instr (c.itm_str, ',', 1, r.lev) - 1)
    87             itm_id
    88    FROM con_split c
    89    JOIN row_gen r
    90      ON r.lev <= c.n_items
    91  )
    92  SELECT v.sol_id,
    93         v.tot_weight s_wt, v.tot_profit s_pr, c.id c_id, c.name c_name, c.max_weight m_wt,
    94         Sum (i.item_weight) OVER (PARTITION BY v.sol_id, c.id) c_wt,
    95         i.id i_id, i.name i_name, i.item_weight i_wt, i.item_profit i_pr
    96    FROM itm_v v
    97    JOIN containers c
    98      ON c.id = To_Number (v.con_id)
    99    JOIN items i
    100      ON i.id = To_Number (v.itm_id)
    101   ORDER BY sol_id, con_id, itm_id
    102  /
        SOL_ID S_WT S_PR  C_ID C_NAME          M_WT C_WT  I_ID I_NAME     I_WT I_PR
             1  255  255     1 SEECS UG Block   100  100     1 BIT-10       35   35
                                                             2 BIT-11       40   40
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   70     4 BSCS-3       40   40
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   85     3 BSCS-2       35   35
                                                             5 BEE-4        50   50
             2  255  255     1 SEECS UG Block   100   95     4 BSCS-3       40   40
                                                             6 BICSE-7      25   25
                                                             7 BESE-3       30   30
                             2 IAEC Building     70   70     1 BIT-10       35   35
                                                             3 BSCS-2       35   35
                             3 RIMMS Building    90   90     2 BIT-11       40   40
                                                             5 BEE-4        50   50
             3  255  255     1 SEECS UG Block   100  100     3 BSCS-2       35   35
                                                             4 BSCS-3       40   40
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   65     1 BIT-10       35   35
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   90     2 BIT-11       40   40
                                                             5 BEE-4        50   50
             4  255  255     1 SEECS UG Block   100  100     3 BSCS-2       35   35
                                                             4 BSCS-3       40   40
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   70     2 BIT-11       40   40
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   85     1 BIT-10       35   35
                                                             5 BEE-4        50   50
             5  255  255     1 SEECS UG Block   100   95     2 BIT-11       40   40
                                                             6 BICSE-7      25   25
                                                             7 BESE-3       30   30
                             2 IAEC Building     70   70     1 BIT-10       35   35
                                                             3 BSCS-2       35   35
                             3 RIMMS Building    90   90     4 BSCS-3       40   40
                                                             5 BEE-4        50   50
             6  255  255     1 SEECS UG Block   100  100     2 BIT-11       40   40
                                                             3 BSCS-2       35   35
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   65     1 BIT-10       35   35
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   90     4 BSCS-3       40   40
                                                             5 BEE-4        50   50
             7  255  255     1 SEECS UG Block   100  100     2 BIT-11       40   40
                                                             3 BSCS-2       35   35
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   70     4 BSCS-3       40   40
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   85     1 BIT-10       35   35
                                                             5 BEE-4        50   50
             8  255  255     1 SEECS UG Block   100  100     1 BIT-10       35   35
                                                             4 BSCS-3       40   40
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   70     2 BIT-11       40   40
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   85     3 BSCS-2       35   35
                                                             5 BEE-4        50   50
             9  255  255     1 SEECS UG Block   100  100     1 BIT-10       35   35
                                                             4 BSCS-3       40   40
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   65     3 BSCS-2       35   35
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   90     2 BIT-11       40   40
                                                             5 BEE-4        50   50
            10  255  255     1 SEECS UG Block   100  100     1 BIT-10       35   35
                                                             3 BSCS-2       35   35
                                                             7 BESE-3       30   30
                             2 IAEC Building     70   65     2 BIT-11       40   40
                                                             6 BICSE-7      25   25
                             3 RIMMS Building    90   90     4 BSCS-3       40   40
                                                             5 BEE-4        50   50
            11  255  255     1 SEECS UG Block   100  100     1 BIT-10       35   35
                                                             3 BSCS-2       35   35
                                                             7 BESE-3       30   30
                             2 IAEC Building     70   65     4 BSCS-3       40   40
                                                             6 BICSE-7      25   25
                             3 RIMMS Building    90   90     2 BIT-11       40   40
                                                             5 BEE-4        50   50
            12  255  255     1 SEECS UG Block   100   95     1 BIT-10       35   35
                                                             3 BSCS-2       35   35
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   70     2 BIT-11       40   40
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   90     4 BSCS-3       40   40
                                                             5 BEE-4        50   50
            13  255  255     1 SEECS UG Block   100   95     1 BIT-10       35   35
                                                             3 BSCS-2       35   35
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   70     4 BSCS-3       40   40
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   90     2 BIT-11       40   40
                                                             5 BEE-4        50   50
            14  255  255     1 SEECS UG Block   100  100     1 BIT-10       35   35
                                                             2 BIT-11       40   40
                                                             6 BICSE-7      25   25
                             2 IAEC Building     70   65     3 BSCS-2       35   35
                                                             7 BESE-3       30   30
                             3 RIMMS Building    90   90     4 BSCS-3       40   40
                                                             5 BEE-4        50   50
    98 rows selected.
    Elapsed: 00:00:01.42Edited by: BrendanP on 20-Jan-2013 11:25
    I found the regex needed to deduplicate:
    AND RegExp_Instr (r_c.itm_path || r_i.path, ',(\d+),.*?,\1,') = 0

  • Error In Query Level export with  multiple conditions

    When i am running the following Query for Export with i am getting the result.
    C:\Documents and Settings\ITL>exp scott/tiger@orcl tables=(emp) QUERY='"WHERE deptno > 10 and sal !=2850"' LOG=log011.log FILE=exp.dmp
    Export: Release 10.2.0.1.0 - Production on Wed Jan 30 10:01:27 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table EMP 10 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    Export terminated successfully with warnings.
    But When I run with The following condition then it shows the following error...
    C:\Documents and Settings\ITL>exp scott/tiger@orcl tables=(emp) QUERY='"WHERE deptno > 10 and job!='CLERK' "' LOG=log011.log FILE=Exp01.dmp
    LRM-00111: no closing quote for value ' LOG=log01'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully
    C:\Documents and Settings\ITL>exp scott/tiger@orcl tables=(emp) QUERY="WHERE deptno > 10 and job!='CLERK'" LOG=log5.log FILE=exp01.dmp
    LRM-00112: multiple values not allowed for parameter 'query'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully
    Please suggest a solution for it.

    966523 wrote:
    Padma.... wrote:
    Hi,
    The single quotes used for CLERK are causing the issue most probably.
    C:\Documents and Settings\ITL>exp scott/tiger@orcl tables=(emp) QUERY='"WHERE deptno > 10 and job!='CLERK' "' LOG=log011.log FILE=Exp01.dmp
    try replacing with this
    C:\Documents and Settings\ITL>exp scott/tiger@orcl tables=(emp) QUERY='"WHERE deptno > 10 and job!=''CLERK'' "' LOG=log011.log FILE=Exp01.dmp
    Two single quotes(not double quotes) in the place of one single quote for CLERK.
    Thanks
    Padma...Thanks A Lot...if/when you place all inside control file, then you do not have to worry about such complications

  • Abap mapping for content conditions routing in a flat-flat scenario

    Dear Experts.
    I have a flat-flat file scenario. Based on the content of the input file, I need to route data to the receiver.The source flat file will have several IDOC details.
    Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "XYZ" and FIELD2 of the same IDOC = "PQR", then this  IDOC's details has to be passed to the receiver.
    I have tried to implement the above condition at interface determination in graphical mapping.
    In the graphical mapping,  the problem is:
    Assuming there are 3 idocs in the input file.
    FIELD1 of IDOC[1] = 'XYZ' and FIELD2 of IDOC[1] = 'PQR'
    FIELD1 of IDOC[2] = 'LMN' and FIELD2 of IDOC[2] = 'RST'
    FIELD1 of IDOC[3] = 'ABC' and FIELD2 of IDOC[3] = 'DEF' .
    Now, if none of the IDOCs in the input file satisfy my requirement,the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is getting called.
    And I need to check this condition IDOC wise. Both the conditions has to be satisfied in the same IDOC.
    The question is very similar to the one posted by SHOBHA HB. (Topic:Receiver determination(or Interface determination) and conditional routing )
    but, due to complexities in the graphical mapping,  we have decided to go for the ABAP mapping instead.
    Kindly help, by mentioning the steps I should follow for this interface, the logic basically. I already have paths to some basic ABAP mapping documents from SDN, so, kindly refrain from posting general URLS for definition or history of ABAP mapping.
    IF you could guide me on this interface, It would be really helpful.
    regards,
    giri raj

    Hi,
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    This document will help you to create ABAP Mapping .
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    How to Use ABAP Mapping in Exchange Infrastructure 3.0 (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    SAP Network Blog: How to call XI ABAP Mapping via RFC
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    SAP Network Blog: Testing ABAP Mapping
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    An ad-on
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    Regards

  • Mapping nodes on condition

    Hello experts
    I am stuck at a specific mapping requirement and i need your help to get me out of it. I am stuck with contexts . I tried using UDFs to manipulate contexts . But my mapping fails in one particular case which is strange and i don't know how to fix it. the exmple below is the case when it fails.
    my input file is : it has structure   Data_Record ( unbounded)
                                                                 Line_feed_Item ( unbounded)
    (Data_Record)
          (Line_Feed_Item)
             (ss3pw_td002)250(/ss3pw_td002)
             (ss3pw_td003)0034319197(/ss3pw_td003)
             (ss3pw_td004)p1(/ss3pw_td004)
             (ss3pw_td006)m1(/ss3pw_td006)
             (ss3pw_td007)+10(/ss3pw_td007)
             (ss3pw_td009)ZUN(/ss3pw_td009)
             (ss3pw_td011)5021(/ss3pw_td011)
             (ss3pw_td012)5021(/ss3pw_td012)
             (ss3pw_td013)1000(/ss3pw_td013)
             (ss3pw_td014)b1(/ss3pw_td014)
             (ss3pw_td015)20100630(/ss3pw_td015)
             (ss3pw_td016)UN(/ss3pw_td016)
             (ss3pw_td017)UN(/ss3pw_td017)
             (ss3pw_td018/)
             (ss3pw_td019)387125620008967527(/ss3pw_td019)
             (ss3pw_td020/)
             (ss3pw_td022)20090930(/ss3pw_td022)
             (ss3pw_td025/)
          (/Line_Feed_Item)
          (Line_Feed_Item)
             (ss3pw_td002)250(/ss3pw_td002)
             (ss3pw_td003)0034319197(/ss3pw_td003)
             (ss3pw_td004)p1(/ss3pw_td004)
             (ss3pw_td006)m1(/ss3pw_td006)
             (ss3pw_td007)+10(/ss3pw_td007)
             (ss3pw_td009)ZUN(/ss3pw_td009)
             (ss3pw_td011)5021(/ss3pw_td011)
             (ss3pw_td012)5021(/ss3pw_td012)
             (ss3pw_td013)1000(/ss3pw_td013)
             (ss3pw_td014)b1(/ss3pw_td014)
             (ss3pw_td015)20100630(/ss3pw_td015)
             (ss3pw_td016)UN(/ss3pw_td016)
             (ss3pw_td017)UN(/ss3pw_td017)
             (ss3pw_td018/)
             (ss3pw_td019)387125620008967531(/ss3pw_td019)
             (ss3pw_td020/)
             (ss3pw_td022)20090930(/ss3pw_td022)
             (ss3pw_td025/)
          (/Line_Feed_Item)
       (/Data_Record)
       (Data_Record)
          (Line_Feed_Item)
             (ss3pw_td001)52(/ss3pw_td001)
             (ss3pw_td002)250(/ss3pw_td002)
             (ss3pw_td003)0034319197(/ss3pw_td003)
             (ss3pw_td004)p2(/ss3pw_td004)
             (ss3pw_td006)m2(/ss3pw_td006)
             (ss3pw_td007)+10(/ss3pw_td007)
             (ss3pw_td009)ZUN(/ss3pw_td009)
             (ss3pw_td011)5021(/ss3pw_td011)
             (ss3pw_td012)5021(/ss3pw_td012)
             (ss3pw_td013)1000(/ss3pw_td013)
             (ss3pw_td014)b3(/ss3pw_td014)
             (ss3pw_td015)20100630(/ss3pw_td015)
             (ss3pw_td016)UN(/ss3pw_td016)
             (ss3pw_td017)UN(/ss3pw_td017)
             (ss3pw_td018/)
             (ss3pw_td019)pallet3(/ss3pw_td019)
             (ss3pw_td020/)
             (ss3pw_td022)20090930(/ss3pw_td022)
             (ss3pw_td025/)
          (/Line_Feed_Item)
          (Line_Feed_Item)
             (ss3pw_td002)250(/ss3pw_td002)
             (ss3pw_td003)0034319197(/ss3pw_td003)
             (ss3pw_td004)p3(/ss3pw_td004)
             (ss3pw_td006)m3(/ss3pw_td006)
             (ss3pw_td007)+10(/ss3pw_td007)
             (ss3pw_td009)ZUN(/ss3pw_td009)
             (ss3pw_td011)5021(/ss3pw_td011)
             (ss3pw_td012)5021(/ss3pw_td012)
             (ss3pw_td013)1000(/ss3pw_td013)
             (ss3pw_td014)b3(/ss3pw_td014)
             (ss3pw_td015)20100630(/ss3pw_td015)
             (ss3pw_td016)UN(/ss3pw_td016)
             (ss3pw_td017)UN(/ss3pw_td017)
             (ss3pw_td018/)
             (ss3pw_td019)pallet4(/ss3pw_td019)
             (ss3pw_td020/)
             (ss3pw_td022)20090930(/ss3pw_td022)
             (ss3pw_td025/)
          (/Line_Feed_Item)
       (/Data_Record)
    My target is Idoc:  Idoc (unbounded)  )))))Data_Record
                                      E1MBXYH ( 1 ) )))))))Constant
                                             E1MBXYI ( 9999)
                                                  Z1ITEM (999)
    My mapping condition is if fileds ss3pw_td06 & ss3pw_td14 are same then   E1MBXYI  is created only once.
                                                                                    if ss3pw_td06 & ss3pw_td14 are same then Zitem nodes belong to the same E1MBXYI
    To achieve this i created two UDFs to create context and supress context.
    The mapping i have done is as follows
                     constant ))))))))))E1MBXYH ( 1 )
                ss3pw_td06(concat)ss3pw_td14   )))UDF1)))))))E1MBXYI
              ss3pw_td06(concat)ss3pw_td14   )))UDF2)))))))Zitem
    UDF1 to supress & create only one E1MBXYI ( string[] a)
    String toCompare = a[0];
    result.addValue(a[0]);
    for (int i = 1; i ( a.length; i++)
         if (a<i>.equals(toCompare))
              result.addSuppress();
         else {
              toCompare = a<i>;
              result.addValue(a<i>);
    UDF2 to create context change & create Zitem in same  E1MBXYI  ( string[] a)
    String toCompare = a[0];
    int sameValCounter = 0;
    for (int i = 0; i ( a.length; i++)
         if (a<i>.equals(toCompare)) {
              result.addValue(a<i>);
              sameValCounter++;
         else {
              for (int z = 0; z ( sameValCounter; z++) {
                   result.addContextChange();
              result.addValue(a<i>);          
              toCompare = a<i>;
              sameValCounter = 1;
    The problem is in my result in the second Idoc occurance , Zitem node ignores a context change from the queue and makes a blank Zitem filed for the last E1MBXYI .
    I cannot expalin this . Does any of you have an idea how to fix this ? Your help is greatly appriciated.
    - (IDOC BEGIN="1")
    - (E1MBXYH SEGMENT="1")
    - (E1MBXYI SEGMENT="1")
    - (Z1ITEM SEGMENT="1")
      (POSNR)0000p1(/POSNR)
      (Z2PQC)UN(/Z2PQC)
      (Z2PALSSCC)387125620008967527(/Z2PALSSCC)
      (Z2PALQTY)10(/Z2PALQTY)
      (Z2REFNUM /)
      (Z2REASCD /)
      (/Z1ITEM)
    - (Z1ITEM SEGMENT="1")
      (POSNR)0000p1(/POSNR)
      (Z2PQC)UN(/Z2PQC)
      (Z2PALSSCC)387125620008967531(/Z2PALSSCC)
      (Z2PALQTY)10(/Z2PALQTY)
      (Z2REFNUM /)
      (Z2REASCD /)
      (/Z1ITEM)
      (/E1MBXYI)
      (/E1MBXYH)
      (/IDOC)
    - (IDOC BEGIN="1")
    - (E1MBXYH SEGMENT="1")
    - (E1MBXYI SEGMENT="1")
    - (Z1ITEM SEGMENT="1")
      (POSNR)0000p3(/POSNR)
      (Z2PQC)UN(/Z2PQC)
      (Z2PALSSCC)pallet4(/Z2PALSSCC)
      (Z2PALQTY)10(/Z2PALQTY)
      (Z2REFNUM /)
      (Z2REASCD /)
      (/Z1ITEM)
      (/E1MBXYI)
      (E1MBXYI SEGMENT="1" /)
      (/E1MBXYH)
      (/IDOC)
    Thank you
    Edited by: sudheer kamepalli on Dec 5, 2009 9:49 AM
    Edited by: sudheer kamepalli on Dec 5, 2009 9:57 AM
    Edited by: sudheer kamepalli on Dec 5, 2009 9:58 AM

    Hi ,
    Before posting the thread check the format,...its not understandable.
    Regards,
    Raj

  • Select query with variable no of conditions

    Hi,
    I want to write a select query such that the conditions mentioned under WHERE clause can be variable .like :
    Select * from TABLE where F1 = var1 and F2 = var2 and F3 = var3.
    Now on the basis of some conditons the equations in where clause should be used.Say condition is variable value >6.
    Now in this case ,if
    var1 =7 var2 =3 var3 = 8 then the query shud behave like
    select * from TABLE where F1 = var1 and F3 = var3
    if :
    var1 =3 var2 = 4 var3 =3 the :
    select * from TABLE
    But only one query is to be wrote that satisfies all of these
    thanx
    Edited by: aachal on Feb 4, 2011 11:36 AM

    Hi Aachal,
    Use Dynamic select statement.
    Ex:
    data : lv_wherecond type string.
    Select * from TABLE where ( lv_wherecond ).
    Before Select stmt, code as follows.
    if var1 > 6.
           if lv_wherecond is initial.
              F1 = var1.
           else.
              concatenate lv_wherecond ' and F1 = var1'  into lv_wherecond.
           endif.
    elseif var 2 > 6.
            if lv_wherecond is initial.
               F2 = var2
            else.
               concatenate lv_wherecond ' and F2 = var2'  into lv_wherecond.
           endif.
    elseif var3 > 6.
          same as above ..
    endif.
    Hope it helps..
    Regards,
    Sravan Guduru.

  • Incorrect query result with Top N condition and two structures

    Hi,
    I have created a query on a FI-GL infocube with the characteristic 0BUS_AREA in rows and two structures in columns. The first structure has two items / selections (each item is a selection of several GL accounts). The second structure has two items (the first one contains the key figure 0BALANCE for the current period and the second item is a formula that calculates the absolute value of the first item. The first item is hidden). The (simplified) result looks like this (sorry, not very pretty!):
    Business Area Clients Clients fae
    Business Area1 10 15
    Business Area2 20 7
    Business Area 3 15 8
    Overall result 45 30
    I then added one condition using the Top N operator. The condition is defined for all the elements of the structures. When I execute the query, I sometimes obtained an incorrect number of Top N records selected. The problem seems to occur when N is greater than the number of available Business Areas for an element of the structure.
    For example, if N = 8 and data only exists for 5 Business Areas for the structure element Clients, I may end up with 10 Business Areas for the second structure element Clients fae when I only expect 9 (i.e. the top 8 Clients fae + 1 of the Top 8 Clients for which there is no data under Clients fae).
    Has anybody encoutered that kind of problem ?
    Many thanks.
    François.

    Pascal,this is a known behavior with conditions.When you apply condition it just hide the extra rows and it does not impact the result row.So your result row actually shows the value irrespective of the condition you apply.
    Now with the help of local functions like calculate result as summation you can show the correct sum after applying the condition but when you try to use that result in some calculation then it takes the original value thereby discarding the calculated value.
    Same is happening in your case as well.Its taking the original value i.e 350 and not the calculated sum after condition i.e 270.
    Hope this helps.
    Regards,
    AL

  • Execute query in mapping and map the result to next field in target

    Hi Guys,
    Doing file to jdbc Scenario.
    source:
    root:
      row
           sf1
    target:
    root:
        row
           target1
           target2
    I have requirement as:
    I have to map sf1 to target1 ( I do not have any problema in it)
    target2 field must populate basing upon query which results. this should run with the input parameter sf1. If the query results then update target2 else update with MESSAGE_DONE.

    Hi Swarna,
    What kind of query do you mean? In certain cases, it might be worthwhile to consider ABAP mapping, which seems to be the easiest way to do some sequential steps, especially for such a simple message structures.
    Hope this helps,
    Grzegorz

Maybe you are looking for

  • I am covered by Apple Care, but i have a dent on the corner of my Mac Book Screen. How much does this cost?

    There is a dent in the top left corner, and the screen is a little cracked. I've had my macbook for almost a year and a half. I am covered by the Apple Care Program, not sure how much this costs to fix, or if it's automatically covered... Please help

  • Running ABAP Program in Background

    Hi, I need to write a program which could run in background mode based on some condition. For example, I have two radio buttons, Excel and Spool. If I select Excel the program should run normally in foreground mode. If I select spool the program shou

  • AIR JavaScript - Drag and drop to OS

    I searched here for an example of how to drag-and-drop from the AIR application to the OS with JavaScript, not Flex or Flash. I only need to know where the element has been dropped in order to start a download. I only found an example for Flex. I rea

  • Publish Cordova App

    Hello, I have made an app and I am trying to publish it in the Windows Phone Dev Center. Now after many hours I'm stuck with the error: "The package identity associated with this update doesn't match what's in the uploaded package: "DoMoControl". The

  • After Effects duration one frame?

    I imported a PSD to After Effects as a composition recently, but it gave the composition a duration of one frame. Now I can stretch it, but not actually change the duration. I can only stretch it to a maximum of like 6 seconds because that gives it a