Mapping query in SAP PI

Hi Experts,
I have a mapping query in SAP PI. Actually I am mapping the source and target fields, now the problem is.
The sender filed is subnode of the main node, and I have mapped the two main nodes in the sender and receiver together.
Now, whether the sender main node comes all the subnode values will come or do we need to do something else for it.
Both the sender and target main nodes and subnodes can have multiple repetations.
I think One to One mapping wont do in this case. What needs to be done please help??
Thanks and regards,
Aniruddha

Hi Vijay,
Thanks a lot.I will try this out. Can you help me in another mapping problem, the req. is that i need to map the source and the target.
The condition basically is :
If no value in LIFEX use VBELN to map to a single target field.
But I wont use UDF in this case.
Please help.
Regards,
Aniruddha

Similar Messages

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • Error in while running a query in SAP B1

    Hi All,
    I am creating one Q-PLD so i have to run the following query. Query is working fine in SQL Server
    But while running with SAP B1 showing error 'Cant convert into varchar to small int'
    Query is
    Select (select M1.[GroupName] from OCRG M1 where M1.[GroupCode] = T2.[GroupCode]) As 'State',
    T0.[CardCode] AS 'Customer Code',T0.[CardName] AS 'Customer Name',T4.[U_SchNo] As 'Scheme Ref No',
    T1.[U_Itmgrp] AS 'Item Group',T1.[U_TAdvAmt] AS 'Actual Adv',T0.[DocDate] As 'Doc Date',
    T0.[DocNum] AS 'Invoice No.',T1.[U_QtyKgs] AS 'Qty In KG',T1.[U_CAdvRate] AS 'Advance Rate',
    T1.[U_DedAdvA] AS 'Actual Adv. Adj.',T1.[U_BalAdvA]- T1.[U_DedAdvA] As 'Balance'
    from [dbo].[OINV] T0  INNER JOIN [dbo].[INV1] T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN [dbo].[OCRD] T2 ON T0.CardCode = T2.CardCode
    INNER JOIN [dbo].[OCRG] T3 ON T2.GroupCode = T3.GroupCode
    LEFT OUTER JOIN [dbo].[@CUSTAMT] T4 ON T0.[CardCode] = T4.[U_Custcode]
    And T1.[U_Itmgrp] = T4.[U_Itemgrp]
    Where T0.[DocDate] between '[%0]' And '[%1]' And
    T0.[CardCode] between '[%2]' And '[%3]'
    And T1.[U_Itmgrp]  between '[%4]'  And '[%5]'   ' This line i am getting error
         ' If i this line will remove error will disappear or i will pass parameter directly like 'ItemGrop1'
    And T3.[GroupName] between '[%6]' And '[%7]'
    By
    Firos C

    Hello Firos,
    Now, first I assume that the t1.[U_Itmgrp] refers to the [ItmsGrpCod] in the OITM.
    I have tested this simple query in SAP Business One (Query Generator) as your query uses user defined fields I do not have in any database here.
    If this is the case you need the number associated with the item group name. This is the 'ItmsGrpCod' and you can find it in table OITB, therefore I would suggest to add this table to the query and search for the ItmsGrpNam that is the one that appear in the Item Master Data. E.g.:
    SELECT T0.[ItemCode] FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod WHERE T1.[ItmsGrpNam] = 'server'
    If this is the wrong assumption please consider CAST, but in this case you would need something similar to this:
    CAST ([U_PriceKG.NUMBER ]AS NUMERIC(19,6))
    Hope this helps, but if it doesn't can you please tell me what kind of values you have in U_Itmgrp and if it is written by the user or there is a formatted search?
    Thank you for your information.
    Marcella Rivi
    SAP Business One Forums Team

  • Select query in SAP SCRIPT

    Dear Experts,
    In printing of MB23n , I need to print STR_SUPPL1 and STR_SUPPL2 from ARDC table. I already have ADDRNUMBER.
    We are using SAP SCRIPT.
    Please guide me how to insert the following query in SAP SCRIPT.
    tables: lfa1, adrc.
    data: begin of it_test occurs 0 ,
    str_suppl1 like adrc-str_suppl1,
    str_suppl2 like adrc-str_suppl2,
    end of it_test.
    select str_suppl1 str_suppl2 into corresponding fields of table it_test from adrc addrnumber = lfa1-adrnr.
    Please hekp me to solve the issue.
    Thanks in advance.
    Regards
    Ankur

    Hi,
    In Script - Page Window -
         PERFORM <form name> IN PROGRAM <Program Name>
         USING &VBDKR-VBELN_VL&
         USING &VBDKR-VBELN_VAUF&
         CHANGING &ADDR_LINE1&
         CHANGING &ADDR_LINE2&
         CHANGING &ADDR_LINE3&
         CHANGING &ADDR_LINE4&
         CHANGING &ADDR_LINE5&
         ENDPERFORM
                         &ADDr_line1&&ADDR_LINE3& &ADDr_line2&
         &ADDR_LINE4&
         PROTECT
         &ADDR_LINE5&
         ENDPROTECT
    In SE38 - Create Prog as Subroutine pool --> Write a Form with same name
    SELECT SINGLE adrnr INTO twlad-adrnr FROM twlad WHERE werks = lips-werks AND
                                                              lgort = lips-lgort.
        IF sy-subrc = 0.
          CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
            EXPORTING
              address_type            = '1'
              address_number          = twlad-adrnr
            IMPORTING
              address_printform_table = lt_address.

  • Query in SAP don't shows more than 2 decimals

    Hi!
    I'm trying to create a query that shows the Currency for each operation by day, in this case are the payments, the operations. But the problem is that my query get all the payments when the paymeny is by local currency and foreign currency, i mean when is dollars and when is pesos, so even when the payments are in pesos whe need to get the currency of the dollar at these day, so my query get the currency from the table of the currencies when is in pesos and when is in dollars it get the currency from the payments table, so this is my query.
    Reporte de Pagos
    /SELECT FROM OINV T1/
    DECLARE @FECHA AS DATETIME
    /* WHERE */
    SET @FECHA = /* T1.DocDate */ [%0]
    /SELECT FROM OINV T2/
    DECLARE @FECHA2 AS DATETIME
    /* WHERE */
    SET @FECHA2 = /* T2.DocDate */ [%1]
    SELECT DISTINCT T0.[DocNum],T1.[DocEntry],T2.[NumAtCard],T0.[CheckAcct],T0.[DocType],T0.[Canceled],T0.[CardName],T0.[DocDate],
    CASE
    WHEN T0.[DocCurr] = 'USD' THEN T0.[DocTotalFC]
    WHEN T0.[DocCurr] = 'MXP' THEN T0.[DocTotal]
    END AS 'Total'
    CASE
    WHEN T0.[DocRate] = 0 THEN (SELECT CAST(T3.[Rate] AS float) FROM ORTT T3 WHERE T3.[RateDate] = T0.[DocDate])
    WHEN T0.[DocRate] <> 0 THEN CAST(T0.[DocRate] AS float)
    END AS 'T.C.'
    ,T0.[DocCurr],
    (SELECT T4.[SlpName] FROM  OSLP T4 WHERE T4.[SlpCode] = T2.[SlpCode]) AS 'Vendedor'
    FROM ORCT T0 
    INNER JOIN RCT2 T1 ON T0.DocNum = T1.DocNum
    INNER JOIN OINV T2 ON T1.[DocEntry] = T2.[DocEntry]
    WHERE T0.[DocDate] >= @FECHA
    AND T0.[DocDate] <= @FECHA2
    The real problem is that with this, the query just bring me 2 decimals in the currency and i need at least 4 decimal, i don't know what happen because if i run the query in the SQL Management Studio the decimals are correct it brings me more than 4 decimals, but when i run the same query inside SAP Query Manager it brings me just 2 decimals.
    How can i fix that?
    Hope you help me.
    Thanks in advance
    Regards!
    Xavier

    Xavier,
    This is because the decimal place setting in General Settings > Display tab is 2 decimals.  Similar question has been raised a few times on this Forum and I will send you the link when I find it.
    In the meanwhile the hint is to use CAST function.
    Link for the thread  Rounding in Query Generator
    Suda

  • Query in sap

    hi
    is there any application
    in which we can run query as we do in sql
    like if i want to fetch records from two tables as
    select a, b , c from tablea and table b
    where something like that
    can we directly execute any query in sap?
    plz help me with step by step solution

    hi
    go thru the following tutorial on ABAP Query
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_FunctionalAreas_WithoutLogicalDB.asp
    <b>reward points for useful ans</b>
    Regards
    Aarti

  • What are mapping rules in sap xi/pi  ?

    hi experts
    what are mapping rules in sap xi/pi  ? how we can use this rules for special charters mapping .

    >
    praveen.tecnics wrote:
    > hi experts
    >
    > what are mapping rules in sap xi/pi  ? how we can use this rules for special charters mapping .
    to map special characters you need to use an element called CDATA in your mapping
    a special character causes an error....as XI wont be able to read it (as it is not in a proper XML format)...so to parse this character through XI without causing an eror use the CDATA....just make a search on SDN and you will find the proper use of it....
    For your info: http://www.w3schools.com/XML/xml_cdata.asp
    Regards,
    Abhishek.
    Edited by: abhishek salvi on May 20, 2009 8:52 AM

  • WIKI: Mapping Concepts in SAP XI

    Hi all,
    I have posted a WIKI for the mapping concepts in SAP XI, where you could find the details of various blogs and other links regarding the mapping concepts in SAP XI.
    Please refer this link:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/mappingConceptsinSAPXI
    Regards,
    Nithiyanandam

    Hi,
    check this links
    Comparing Performance of Mapping Programs
    Message mapping
    Message Mapping Simplified - Part I
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    New functions in the Graphical Mapping Tool XI 3.0 SP13
    File Content Conversion for Multi Hierarchical Structure
    Message Splitting Using the Graphical Mapping Tool
    Number formatting to handle LARGE Numbers
    Optimizing Lookup's in XI
    Minimize memory usage during Message Mapping when replicating an element
    Mapping Context Changes in XI
    /people/jeyakumar.muthu2/blog/2005/12/19/data-mining-using-apriori-algorithm-in-xi-150-part-ii
    /people/jeyakumar.muthu2/blog/2005/11/23/data-mining-using-apriori-algorithm-in-xi-150-part-i
    /people/jeyakumar.muthu2/blog/2005/12/30/data-mining-using-apriori-algorithm-in-xi-150-part-iii
    Java Mapping to handle flat files in SAP XI
    xpath functions in xslt mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm---java mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50ce0433-4309-2b10-4bb4-d421e78463f7 -
    java mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5  -
    value mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    ABAP MAPPING
    The specified item was not found.
    How to call XI ABAP Mapping via RFC
    Different types of Mapping in XI
    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
    - The specified item was not found.
    Testing ABAP Mapping
    XSLT
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    xpath functions in xslt mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    regards
    srinivas

  • Dynamic scrap mapping in to SAP

    Hai All,
    I am having scenario like this... for finished product based on the order qty system should take different assembly srap percentage like. For order qty 0 to 100 it is 10%  , From 100 to 200 it is 20% , from above 200 it is 15% like this. Is there a way to map this in SAP.

    Dear
    Did you try to maintain the Assmbly scrpe % in MRP1 view ??
    Maintain the same and create the Production Order .It will automatically increase the Order Qty and you can find scrap portion and percenatge in CO02.
    If you have already created PO  and now maintaing Assmbly scarpe  at MRP1 for FG , then call the Read PP master date before Goods Issu happend againt the PO (Status should nto be GMPS )
    Refer : Production Order Scrap flow
    Regards
    JH

  • Query IN SAP B1

    Hello All,
    Please help how I can create consumptiom query in sap B1 , I need to create with fields:
    1. Catalog number
    2. Description
    3. Stock hand (up to day)
    4. A single cost
    5. Sum of stock (single cost * stock)
    6. consumption per month
    7. Stock years (stock/consumption (average)12 month)
    8. group mane
    9. sum of open purchase order
    10. sum of open order
    Please Help
    Best Regards
    Diana

    Dear,
    Create Self defined Logistic Information System,
    Regards,
    kapil

  • We are interested to know how/where to check query runtimes for any Query in SAP BW?

    We are interested to know how/where to check query runtimes for any Query in SAP BW?
    Is there any table or program to get the query run time details per query for a particular day.

    Hello Sravan,
    Bex statics tables would be 'RSDDSTATHEADER','RSDDSTATINFO' & 'RSDDSTATEVDATA'. all these can found in one view 'RSDDSTAT_OLAP'.
    above can give historical statistic.
    For current Query statics : T-code RSRT, and select debug mode select display statistics and then execute.
    Once you get the output press F3(one step back), there you can see statics of the query for that particular execution.
    Thanks,
    Mallikarjuna

  • How to find Tables behind a Custom Query in SAP

    Hi Gurus,
    Can anyone please help me find tables behind a custom query in SAP.
    Regards
    As

    Hi
    Check the name of the programm assigned to transaction, it should be like this:
    AQZZ<user group>=======<query name>======
    or
    AQIC<user group>=======<query name>======
    It depends of the query area is global or cross-client
    So run SQ01, select the quey area, select the quey group and so your query: now you can see the infoset and then you see it by SQ02 transaction
    Max

  • How to search roles by Query in SAP BW?

    how to search roles by Query in SAP BW?

    Use SUIM with option roles with Auth object and put S_RS_COMP or S_RS_COMP1 here u can put the query for which u want role.

  • Advantages of BW Query in SAP Portal when compared to WEB BEx Analyzer

    Hi
    What are the advantages of having a BW Query in SAP Portal when compared to WEB BEx Analyzer
    I had to presention to higher managers of having a SAPPortal for BW report that WEB BEx Analyzer
    can any one please update me with few points (10-20) that will be useful for my presentation
    screen to geethikakrishna->gmail
    Thanks in advance

    Hi Krishna ,
    I think you should highlight the portal role in presentation
    Now a days all organizations using sap portal as their user interface. We can login portal once and we can get all the information from bw,crm...sap systems and non sap systems.
    so no need to login each and every system individually.
    The portal offers a single point of access to SAP and non-SAP information sources, enterprise applications, information repositories, databases and services in and outside your organization—all integrated into a single user experience. It provides you the tools to manage this knowledge, to analyze and interrelate it, and to share and collaborate on the basis of it.
    With its role-based content, and personalization features, the portal enables users—from employees and customers to partners and suppliers—to focus exclusively on data relevant to daily decision-making processes
    For all information on portals refer to help.sap.com->documentation->netweaver->Netweaver2004->English
    IN people integration you will find information on portals
    http://help.sap.com/saphelp_nw04/helpdata/en/19/4554426dd13555e10000000a1550b0/frameset.htm
    check below threads for some information
    easiest way to publish
    Easiest way to post existing BW queries onto portal
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/92dceb49fd25e5e10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9d/24ff4009b8f223e10000000a155106/frameset.htm
    Execution of BW Reports Through Enterprise Portal
    Best Practices for BI Report publishing on Portal - BI 7
    Use of BI's Enterprise Portal
    The web application designer offers rich functionality for creating dashboards. In SAP NetWeaver BI 2004s (aka 7.0), when you publish a template it is automatically created as an iView for the portal.
    SAP NetWeaver 2004s BI - Define your Publishing Strategy Part 1
    Koti Reddy

  • Cannot save query in SAP 2007 Patch 11

    Hi,
    I urgently need assistance here.
    We have created a query in SAP B1 2007 Patch 11.  However, when we save the query, we received the following error.
    'To generate this document, first define the numbering series in the Adminsitration module'.
    To make it slight completed, we copy some queries from another company using Copy Express.
    Your advice is highly appreciated.

    Dear,
       Please give the link to download PL15
    Thanks in advance
    Gauraw

Maybe you are looking for