Fixed Values and Value Mapping

Hi Experts,
     I hav a doubt regarding these to funnctions in Messege mapping. In both teh functions , we can change a value coming from Load to some thing else.
Like
A=1
B=2
C=8.
The difference i hav noted is the in case of fixed values, we can assign the valsues in the messege mapping itself, and in case  of value mapping it is assigned in the value mapping table  in integartion directory, and thsi can be seen through  Runtime Workbench in Cache Monitering. . Apart from that there seems to be no big significat difference in the application .
Pls correct me , if I ma missing out something.
Pls tell me if both hav the same functionality, why were these 2 functions made , any 1 of them, preferably Value Mappimg Function could hav been enough.
Regards,
Arnab.

Hi
Fixed value mapping is Message mapping Specific
But Value mapping allows u to create a Schema and group .
Value mapping functionality will be well understood in large integration where many mapping programs using same conversions.
Maintain advantage is maintance is easy with value mapping because if any chnages in value , just ID change is enogh no need to go mapping but this is not with fixed value
For instance if u r using Fixed value in 50 mapping programs u need to change in all
But if u r using Value mapping just one ID
Which one u prefer
all based upon u r landscape for mapping
Srini

Similar Messages

  • Where we use Conversions? like Fixed Value and Value mapping? and use of th

    where we use Conversions? like Fixed Value and Value mapping?
    and what is the use of that....

    Hi
    Have a Look at this
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    Value mapping is used to map different representations of an object to each other.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    You can do value mapping both in IR and ID
    IR: Message Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    ID: Tools --> Value Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/content.htm
    Value mapping replication: For uploading data from tables, excel sheet etc. into XI
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    Value mapping
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Thanks

  • Where we use Conversions like Fixed Value and Value mapping?

    where we use Conversions? like Fixed Value and Value mapping?

    Mostly say when u have a scenario like converting a value in the source to a another in
    target. Say in source it might me KM but in target u might need Kilometers and u hav multiple entries like this.
    Ref:
    http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
    https://www.sdn.sap.com/irj/sdn/xi-elearning

  • Limiting entry in a JTextField to numeric value and "%" value

    Hi,
    I want to allow the user to enter numeric value and % value
    How can I limit the user to make such a entry in JTextField

    Use the code given below to make your textfield accept only numeric values. You can modify itto include % values too.
    textField.setDocument( new TextFieldVerifier() );     
    class TextFieldVerifier extends PlainDocument {
    public void insertString( int offset, String str, AttributeSet attSet ) throws BadLocationException {           
    boolean valid = false;          
    if ( str == null ) {
    return;
    String old = getText( 0, getLength() );
    /* insert the new string at the given offset, into the old string */     
    String newStr = old.substring( 0, offset ) + str + old.substring( offset );
    try {
    /* check if the new string is a valid integer */
    Integer.parseInt( newStr );               
    valid = true;
    } catch ( NumberFormatException ne ) {          
    /* invalid, if not an integer */
    valid = false;
    Toolkit.getDefaultToolkit().beep();           
    if ( valid ) {
    super.insertString( offset, str, attSet );
    }

  • Initial value and value in the database

    Hello world ,
    i want to add initial value with value in the database depend on the date
    for example i have initial value for 30/09/2009
    i and to all it with value in the database in 31/12/2009
    take a look what i did
    PROCEDURE pkd_prem IS
    cursor gr_pkd_prem is select
    SUM(DECODE(mark,'01',FM_mark,TM_mark) A,
    SUM(DECODE(FMS,'01',LS,NS) b
    from fr_treaty_profile ftp, fr_monthly_summary
    where
    (ftp.tpr_cgp_id = fr_monthly_summary.fms_cgp_id )
    AND (ftp.tpr_cmp_id = fr_monthly_summary.fms_cmp_id )
    AND (ftp.tpr_treaty_origin = fr_monthly_summary.fms_treaty_origin )
    AND (ftp.tpr_uw_year = fr_monthly_summary.fms_uw_year )
    AND (ftp.tpr_class = fr_monthly_summary.fms_class )
    AND (ftp.tpr_type = fr_monthly_summary.fms_type )
    AND (ftp.tpr_serial = fr_monthly_summary.fms_serial )
    AND
    (fr_monthly_summary.fms_treaty_origin=:BLK1.EO_ORIGIN) AND
    (fr_monthly_summary.fms_uw_year=:BLK1.EO_UW_YEAR) AND
    (fr_monthly_summary.fms_class=:BLK1.EO_CLASS) AND
    (fr_monthly_summary.fms_treaty_type=:BLK1.EO_TYPE) AND
    ( fr_monthly_summary.fms_treaty_serial=:BLK1.EO_SERIAL)
    AND (FMS_TYPE ='P')
    AND FMS_SERIAL = '01'
    AND (FMS_OFC_ID !='X')
    and (FMS_YEAR =substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),7,4))
    and (FMS_PERIOD between substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2)-2 and substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2)) ;
    ---Initial value
    cursor base is select EO_GR_BKD_PREM from FR_EN
    where
    EO_TREATY_ORIGIN=:BLK1.EO_ORIGIN AND
    EO_UW_YEAR=:BLK1.EO_UW_YEAR AND
    EO_CLASS=:BLK1.EO_CLASS AND
    EO_TREATY_TYPE=:BLK1.EO_TYPE AND
    EO_TREATY_SERIAL=:BLK1.EO_SERIAL AND
    EO_YEAR=:BLK1.EO_YEAR;
    A number(18,3);
    B number(18,3);
    v_base number(18,3);
    BEGIN
    open base;
    open gr_pkd_prem;
    fetch gr_pkd_prem into a,b;
    fetch base into v_base;
    :BLK1.EO_GR_BKD_PREM :=nvl(a,0)+ nvl(b,0)+ nvl(v_base,0);
    close gr_pkd_prem;
    close base;
    END;
    the proceudre is correct and the values come as i want
    but here
    FMS_PERIOD between substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2)-2 and substr(to_char(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY'),4,2))
    suppose i will add from 6 to 9
    the value will come down to add with base value
    but next time i want from 10 to 12
    it will add value 10 to 12 with the base for just period 10 to 12
    i want to keep adding
    if i start from 6 to 9
    then shoud be
    add the value of 6 to 9 to 10 to 12
    but

    look ..
    i created a form and let's say there is one field called Base ..
    and i inert value on that field and saved .
    then
    i created cursor to fetch value from another table
    that value which i fetched from another table must add to past value
    take this scenario
    i started with value 6
    then i fetch by cursor value from 1/1/2010 to 31/3/2010 and that value = 33
    first action
    6+33
    then
    i fecth by using cursor from 1/6/2010 to 30/9/2010 and that value = 2
    the result of first action must add with the last value which is 2
    (6+33) from first action plus(+) 2 and display the result on the secreen

  • Difference of FixValues and Value Mapping in Message Mapping

    Hi
    I would like to know the exact difference between the "FixValues" and Value Mapping. And the Scenarios of usage.
    If i use Value Mappings, value mappings more for fixed values or can they be used for business data that will change ?
    If the flow is from "Non SAP to SAP System" then if i maintain the "Value Mapping Tables" in Message Mapping, Do i need to maintain the same Value Mapping tables on SAP System. If this is the case, it will be over head of maintaining on both sides.
    More thankful if you clarify my doudt.
    Regards
    Shailaja

    Hi,
    your question is best explained in the following link(PDF).
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    Its given in the 75th page.
    >>If the flow is from "Non SAP to SAP System" then if i maintain the "Value Mapping Tables" in Message Mapping, Do i need to maintain the same Value Mapping tables on SAP System.
    I think this is not needed.its not needed to maintain value mapping tables in SAP system.
    hope this helps.
    regards,
    P.Venkat

  • Horizontal Mapping and Flat mapping with Metadata Value Indicator

    Hi
    I have an abstract class B which itself extends another abstract class A.
    There is no table for A. The fields in A are mapped to B. I believe this
    is called "horizontal mapping"
    C and D inherit off B. There's a also a table named B (mapped to class B),
    but none for C or D. Instances of C and D are recorded in table B. I
    believe this is called "flat mapping"
    B has a field foo whose possible values are 'fred' and 'wilma'.
    If foo='fred', then the record is of type C
    If foo='wilma', then the record is of type D
    I believe this is called "class indicator" of type metadata.
    To express this, I have package.jdo which says
    <class name="A"/>
    <class name="B" persistence-capable-superclass="A"/>
    <class name="C" persistence-capable-superclass="B"/>
    <class name="D" persistence-capable-superclass="B"/>
    In B.mapping, I have
    <mapping>
    <package name="domain">
    <class name="B">
    <jdbc-class-map type="horizontal"/>
    <jdbc-class-ind type="metadata-value" column="foo"/>
    </class>
    </package>
    </mapping>
    B.java has a private String foo.
    In C.mapping, I have
    <mapping>
    <package name="domain">
    <class name="C">
    <jdbc-class-map type="flat"/>
    <jdbc-class-ind-value value="fred"/>
    field mappings for C
    </class>
    </package>
    </mapping>
    and similarly in D for value='wilma'
    My questions are...
    1. Is this kind of mapping supported by kodo?
    2. If so, is this configuration correct? I guess not, since I don't
    specify the table name anywhere. Where should it go?
    3. If I remove the "class indicator" mapping and run a simple test I get
    kodo.util.FatalUserException: There is no superclass mapping for mapping
    for "class domain.D".
         at
    kodo.jdbc.meta.FlatClassMapping.assertParentMapping(FlatClassMapping.java:49)
         at kodo.jdbc.meta.FlatClassMapping.getTable(FlatClassMapping.java:85)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:87)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:160)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:443)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:949)
    4. If I run a simple test with the horizontal, flat and class-indicator
    mappings, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: The "class-column"
    attribute/extension for the class indicator on type
    "domain.B.<class-indicator>" is missing or names a column that does not
    exist.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:135)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:121)
         at
    kodo.jdbc.meta.ColumnClassIndicator.fromMappingInfo(ColumnClassIndicator.java:95)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvider.java:135)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:378)
    What am I doing wrong?
    Thanks in advance
    Srini

    I solved this problem by removing the identifier field from the
    class/mapping (kodo support).
    Thanks
    Srini
    Stephen Kim wrote:
    Do you have two fields mapped to the same column? Did you make sure you
    set everything which maps to the column?
    Srinivasan Ranganathan wrote:
    I found what was wrong with this, fixed it and got a different (more
    sensible) error. To correct this mapping, I specified B's mapping type as
    "base" and gave its table and pk names. Also, I moved the common field
    mappings to B.mapping so C.mapping and D.mapping only have fields that are
    specific to each.
    Now when I run a simple test, I get
    testC:
    kodo.util.FatalUserException: Attempt to set column "B.FOO" to two
    different values: (java.lang.Object)"java.lang.Object@2f608ac2",
    (java.lang.String)"fred" This can occur when you fail to set both sides of
    a two-sided relation between objects, or when you map different fields to
    the same column, but you do not keep the values of these fields in synch.
         at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java(Compiled Code))
         at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java(Compiled Code))
         at
    kodo.jdbc.meta.ColumnClassIndicator.insert(ColumnClassIndicator.java:143)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:216)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:219)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:108)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:73)
    testD:
    kodo.util.FatalUserException: Attempt to set column "B.FOO" to two
    different values: (java.lang.Object)"java.lang.Object@2f608ac2",
    (java.lang.String)"wilma" This can occur when you fail to set both sides
    of a two-sided relation between objects, or when you map different fields
    to the same column, but you do not keep the values of these fields in
    synch.
         at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java(Compiled Code))
         at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java(Compiled Code))
         at
    kodo.jdbc.meta.ColumnClassIndicator.insert(ColumnClassIndicator.java:143)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:216)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:219)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:108)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:73)
    I've checked for the two possible errors to the best of my knowledge. Any
    input to resolve this issue is appreciated.
    Thanks in advance
    Srini
    Srinivasan Ranganathan wrote:
    Hi
    I have an abstract class B which itself extends another abstract class A.
    There is no table for A. The fields in A are mapped to B. I believe this
    is called "horizontal mapping"
    C and D inherit off B. There's a also a table named B (mapped to class B),
    but none for C or D. Instances of C and D are recorded in table B. I
    believe this is called "flat mapping"
    B has a field foo whose possible values are 'fred' and 'wilma'.
    If foo='fred', then the record is of type C
    If foo='wilma', then the record is of type D
    I believe this is called "class indicator" of type metadata.
    To express this, I have package.jdo which says
    <class name="A"/>
    <class name="B" persistence-capable-superclass="A"/>
    <class name="C" persistence-capable-superclass="B"/>
    <class name="D" persistence-capable-superclass="B"/>
    In B.mapping, I have
    <mapping>
    <package name="domain">
    <class name="B">
    <jdbc-class-map type="horizontal"/>
    <jdbc-class-ind type="metadata-value" column="foo"/>
    </class>
    </package>
    </mapping>
    B.java has a private String foo.
    In C.mapping, I have
    <mapping>
    <package name="domain">
    <class name="C">
    <jdbc-class-map type="flat"/>
    <jdbc-class-ind-value value="fred"/>
    field mappings for C
    </class>
    </package>
    </mapping>
    and similarly in D for value='wilma'
    My questions are...
    1. Is this kind of mapping supported by kodo?
    2. If so, is this configuration correct? I guess not, since I don't
    specify the table name anywhere. Where should it go?
    3. If I remove the "class indicator" mapping and run a simple test I get
    kodo.util.FatalUserException: There is no superclass mapping for mapping
    for "class domain.D".
         at
    kodo.jdbc.meta.FlatClassMapping.assertParentMapping(FlatClassMapping.java:49)
         at kodo.jdbc.meta.FlatClassMapping.getTable(FlatClassMapping.java:85)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:87)
    >>
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:160)
    >>
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:443)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:949)
    >>
    >>
    >>
    >>
    4. If I run a simple test with the horizontal, flat and class-indicator
    mappings, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: The "class-column"
    attribute/extension for the class indicator on type
    "domain.B.<class-indicator>" is missing or names a column that does not
    exist.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:135)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:121)
         at
    kodo.jdbc.meta.ColumnClassIndicator.fromMappingInfo(ColumnClassIndicator.java:95)
    >>
         at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvider.java:135)
    >>
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:378)
    >>
    >>
    >>
    What am I doing wrong?
    Thanks in advance
    Srini
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Please Help::How to display a Map with LIsts as Keys and Values using JSTL

    Hi,
    I need some assistance on how to display a Map in JSP using struts or core JSTL. I have a HashMap which has a List of keys and each key maps to a value of an ArrayList.i.e I have an ArrayList of taxCodes and each taxCode maps to a value of taxDetails which is an ArrayList of details for for that particular taxCode. I have some trouble to display each taxCode then display taxDetails for each taxCode. Here is my code below:
    OrderDetails.java
    package orderitems;
    import java.sql.*;
    import java.util.*;
    public class OrderDetails {
        private LineOder lineOrder;
        private Map lineItems;
        //returns an item number, key_item, from its unique keys
        public int getItemNumber(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            int itmNum = 0;
             * key_item a unique number for an item.
             * key_year,key_office,key_client,key_company unique keys
             * for each order where this key_item is taken
             * from.
            String select = "SELECT key_item FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + key_item +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                if(rst.next()){
                    itmNum = Integer.parseInt(rst.getString("key_item"));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itmNum;
        //get a list of item number(item codes)
        public List getAllItemNumbers(String key_year,
                String key_office,String key_client,String key_company){
            List itemNumbers = new ArrayList();
            LineItem itemNumber = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    itemNumber = new LineItem();
                    itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
                    itemNumbers.add(itemNumber);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemNumbers;
        //get a list of tax codes
        public List getAllTaxCodes(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            ItemTax taxCode;
            List taxCodes = new ArrayList();
            int itemNum = getItemNumber(key_item, key_year,
                    key_office,key_client,key_company);
            String select = "SELECT key_tax_code FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    taxCode = new ItemTax();
                    taxCode.setKey_tax_code(rst.getString("key_tax_code"));
                    taxCodes.add(taxCode);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return taxCodes;
        /////This methode returns a Map which am trying to display in JSP
        //use tax code to get tax details
        public Map getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
                System.out.println();
                System.out.println("*********CONSOLE OUTPUT*************");//display on console
                Set set = itemTaxDetails.keySet();
                Iterator iter = set.iterator();
                System.out.println("Key\t\tValue\r\n");
                while (iter.hasNext()) {
                    Object taxCode=iter.next();
                    Object details=itemTaxDetails.get(taxCode);
                    System.out.println(taxCode +"\t" + details);
                System.out.println("************************************");
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemTaxDetails;
        //details of an item with all its taxes
        public List getAllItemDetails(String key_year,
                String key_office,String key_client,String key_company){
            List lineItems = new ArrayList();
            List itemNumbers = new ArrayList();
            Map taxDetails = new HashMap();
            LineItem item = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //A list of all item numbers in the declaration
            itemNumbers = getAllItemNumbers(key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
                    LineItem itemNum = (LineItem)itemIter.next();
                    int itemNumber = itemNum.getKey_item();
                    String select = "SELECT item_description,item_mass," +
                            "item_cost" +
                            " FROM " + Constants.WEB_TABLE +
                            " WHERE key_year = '"+key_year+"'" +
                            " AND key_office = '"+key_office+ "'"+
                            " AND key_client = '"+key_client+ "'"+
                            " AND key_company = '"+key_company+ "'"+
                            " AND key_item = " + itemNumber;
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        item = new LineItem();
                        item.setItem_description(rst.getString("item_description"));
                        item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
                        item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
                        //////other details records ommited//////////////////////////
                        /* A HashMap of all itemTaxeCodes as its keys and an
                         * ArrayList of itemTaxedetails as its values
                        taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
                                item.getKey_client(),item.getKey_company(),item.getKey_item());
                        //item tax details
                        item.setItmTaxes(taxDetails);
                        //list of items with tax details
                        lineItems.add(item);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineItems;
        public Set getOrders(String key_year,String key_office,
                String key_client,String key_company){
            List lineItems = new ArrayList();
            Set lineOrders = new HashSet();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            LineOder lineOrder = null;
            String select = "SELECT * FROM " + Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    lineOrder = new LineOder();
                    lineOrder.setKey_year(rst.getString("key_year"));
                    lineOrder.setKey_office(rst.getString("key_office"));
                    lineOrder.setKey_client(rst.getString("key_client"));
                    lineOrder.setKey_company(rst.getString("key_company"));
                    ////list of items with all their details
                    lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
                            lineOrder.getKey_client(),lineOrder.getKey_company());
                    //setting item details
                    lineOrder.setItems(lineItems);
                    //a list of order with all details
                    lineOrders.add(lineOrder);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineOrders;
    Controller.java
    package orderitems;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Controller extends HttpServlet {
        private Map taxDetails = new HashMap();
        private OrderDetails orderDetails = null;
        protected void processRequest(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            String key_year = "2007";
            String key_office = "VZX00";
            String key_company = "DG20";
            String key_client =  "ZI001";
            int key_item = 1;
            String nextView = "/taxdetails_list.jsp";
            orderDetails = new OrderDetails();
            taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
                    key_company,key_client,key_item);
            //Store the collection objects into HTTP Request
            request.setAttribute("taxDetails", taxDetails);
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher(nextView);
            reqstDisp.forward(request,response);
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Simple Tax Detail Diaplay ::</title>
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <jsp:useBean id="taxDetails" class="java.util.HashMap" scope="request"/>
            <table>
                <c:forEach items="${taxDetails}" var="hMap">
                    <tr>
                        <td><c:out value="${hMap.key}" /></td>
                        <!--td><%--c:out value="${hMap.value}" /--%></td-->
                    </tr>
                </c:forEach>
            </table>
        </body>
    </html>am displaying taxCodes(in this case i have VAT and ICD) fine but cant figure out how to display a list of value for each taxCode.Here is the output am getting
    both in my JSP and on the console:
    *******************************CONSOLE OUTPUT****************************
    Key          Value
    ICD     [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    VAT [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    Edited by: aiEx on Oct 8, 2007 6:54 AM

    hi evnafets,
    yes i need a nested for loop.I have tried your advice but my bean properties are not found.Am getting this error:
    javax.servlet.ServletException: Unable to find a value for "key_item" in object of class "java.lang.String" using operator "."
    I have tried this as stated earlier in the post:I have tried to make the method getItemTaxDetails return a List and get the returned list value as taxDetails. I then tested to display this list on JSP and its displaying fine.
    public List getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            //return itemTaxDetails;
            return taxDetails;
        }And my JSP
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <table>
                <c:forEach var="curRecord" items="${taxDetails}" varStatus="rowCounter">
                        <c:choose>
                            <c:when test="${rowCounter.count % 2 == 0}">
                                <c:set var="rowStyle" scope="page" value="odd" />
                            </c:when>
                            <c:otherwise>
                                <c:set var="rowStyle" scope="page" value="even" />
                            </c:otherwise>
                        </c:choose>
                        <tr class="${rowStyle}">
                            <td>${curRecord.key_item}</td>
                            <td>${curRecord.tax_value}</td>
                            <td>${curRecord.tax_limit_val}</td>
                        </tr>
                    </c:forEach>
            </table>
        </body>
    </html>I can't see where am going wrong even with your advice.Please help.
    Thnx.

  • How to set to-mode to Fixed Value and give a date in RSDV transaction

    Hi
             I am working in BI7.0 environment. I am deploying HR Reporting Project. I need to load data to HR Info Cube 0PAPA_C02, to do this I need to maintain validity slice (RSDV transaction) for the Info Cube. After first load I need to set "to-mode-'Fixed Value'" and give a date such as 31.12.9999.
            Can anyone please let me know the steps on how to set- to mode to Fixed Value in RSDV.
    Thanks

    Here's the basic steps to follow:
    1) Go to tcode RSDV, enter the InfoCube name (0PAPA_C02) and Execute.
    2) If there is data already in the InfoCube you will get a validity table with default validty dates from 0CALDAY.
    3) Click on the Display/Change button so that you're in change mode and edit the validity date to be 31.12.9999.
    4) In the To-Mode column, set the value to 'F' for fixed.
    5) Put the fixed date value (31.12.9999 in your example) in Fixed to time.
    6) Click on Save.

  • When I try to use the Submit Form button on the Interactive PDF I created (IN Design CS6) I get this message. "There is no value in form field 'Program.' Please put in it before proceeding. What can I do to fix this and make the Submit button work?

    When I try to use the Submit Form button on the Interactive PDF I created (In Design CS6), I get this message:
    There is no value in form field "Program." Please put in it before proceeding.
    How can I fix this and make the Submit Form button work?

    Are you running modified software on your phone?  This error seems to be common if the firmware has been modified and you're trying to restore the phone again. 

  • Mapping node name and value

    Hi,
    I have source strcture as
    ID
    Code
    Dept
    City
    My target structure is
    Name
    Value
    After mapping i need my target xml file to be
    <Object>
    <Name>ID</Name>
    <Value>001</Value>
    <Name>Code</Name>
    <Value>XYZ</Value>
    <Name>Dept</Name>
    <Value>SAP</Value>
    <Name>City</Name>
    <Value>NY</Value>
    </Object>
    Any input?

    let me explain my scenario more clearly...
    My source message is Idoc whose structure is as follows
    IDOC        1..1
    - E1AFKOL   1..1
       Dept
       Code
    -- E1AFKOL  0..99999
    E1AFVOL 0..99999
    E1RESBL 0..99999
          Charg
    Now my otarget strcuture is
    ObjectCollection 1..1
    -Object          0..99999
    --Field          0..99999
       Name
       Value
    Now what i want is, for each occurance of Segment E1AFVOL, Object node should get repeated and for each occurance of segment E1RESBL (child of segment E1AFVOL) 'Field' node should be repeated.
    e.g. Input is
    IDOC        1..1
    - E1AFKOL   1..1
       Dept     SAP
       Code     001 
    -- E1AFKOL  0..99999
    E1AFVOL 0..99999
    E1RESBL 0..99999
          Charg  A1
    E1RESBL 0..99999
          Charg  A2
    E1AFVOL 0..99999
    E1RESBL 0..99999
          Charg  A1
    Therefor output would be
    ObjectCollection
    -<Object>        
    --<Field>        
       Name  CHARG
       Value A1
       Name  Dept
       Value SAP
       Name  Code
       Value 001
    --</Field>
    --<Field>        
       Name  CHARG
       Value A2
       Name  Dept
       Value SAP
       Name  Code
       Value 001
    --</Field>
    -</Object>
    -<Object>        
    --<Field>        
       Name  CHARG
       Value A1
       Name  Dept
       Value SAP
       Name  Code
       Value 001
    --</Field>  
    -</Object>
    i am not sure if this can be achieved by graphical mapping.
    If not please explain me how XKST mapping would be used in this case?

  • Standard T-code of Fix Asset report which shows Quanity and Value

    Hi friends,
    Is it any T-code in SAP which shows Fix Asset with quality and value.
    regards
    Hemant Maurya

    Hi,
    All standard SAP asset reports show values for Eg.S_ALR_87011990. To display quantity you may create a sort variant with quantity as one of the fields through S_ALR_87009120. You can then run the above report i.e. S_ALR_87011990 with this sort variant to display quantities also along with values.
    regards,
    Swati

  • Entering Source and Target Values in Value Mapping

    Hi,
    Is there any auomative way of entering source and target values in Value Mapping or FixValues instead of manually entering the values.
    I have around 400 values to be entered on both sides.....just thinking of an easy way to do it....
    Thanks for suggestions.
    Regards,
    Bharani

    Hi,
    Use value mapping replication
    chk this link as to what SAP docs say on value mapping replication
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    Value Mapping replication - Value Mapping replication
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    ValueMapping using the Graphical Mapping Tool
    The specified item was not found.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    Regards,
    Swathi

  • LSMW: What are Fixed Values and Translations for?

    Hi,
    I'm working with LSMW and I don't know what are Fixed Values and Translations for? They are on the "Maintain Fixed Values, Translations, User-Defined Routines" step.
    Thanks in advance,
    Gerard

    this is the step,we can process the reusable rules of a project.
    <b>Fixed value:</b> Here you can specify length, type, flag for lowercase/uppercase and value in addition to the description.
    this is nothing but CONSTANTS in your report programs.
    <b>Translation:</b> Here you can enter information on the source field and the target field.
    for example, your input file language value will be 2 characters and we need to send only 1 for LANG in SAP.
    so here we have to do the translation of 2chars to 1 char.
    so, we will give these set of values in this step.
    Message was edited by: Srikanth Kidambi

  • Map Drop down to Context node with value and ID

    I want to map a drop down to dynamic data.  I have a table that is populated at runtime after a BAPI call.  The structure is the same as if you used a simple type. i.e. Value and ID.

    Hi Gordon,
    Try out this
    ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("MonthName");
    //Set allowed values for this data type
    IModifiableSimpleValueSet values=myType.getSVServices().getModifiableSimpleValueSet();
    values.put("0","January");
    values.put("1","February");
    values.put("2","March");
    values.put("3","April");
    values.put("4","May");
    values.put("5","June");
    values.put("6","July");
    values.put("7","August");
    values.put("8","September");
    values.put("9","October");
    values.put("10","November");
    values.put("11","December");
    where MonthName is a value attribute of type string.
    Regards
    Sid

Maybe you are looking for