How  Hash tables can be used  in PI mapping

Hi Experts,
I'm don't have any idea how we store the values in hash tables and how to implement them in mapping.
In my scenario I have two fields matnum and quantity.if matnum is not null ,then we have to check whether the matnum exists in hash table and also check whether the hash table is empty or not.
How we can do this in graphical message mapping? 
how to store the variable matnum in a table?
If global variables are used, how to implement in mapping.how we call the keys from hash table ?

Divya,
We have a similiar requirement for getting different values. Below param1 may you be matnum,param2 is quantity
What you need to do is first declare global varaible(A), fill hash table as below(B) and retrieve(C) based on index. You can tweak code based on your requirement
(A) Declare global variable(last icon in message mapping tool bar)
     String globlalString[] = new String[10];
(B) Fill Hash Table
import java.util.Hashtable;
public void saveparam1(String[] param1,String[] param2,ResultList result,Container container){
Hashtable htparam1 = new Hashtable();
int Indx = 0;
for (int i = 0 ;i < param1.length ; i++) {
  String strparam1 = param1<i>.trim();
  if (strparam1.length() > 0) {
    Object obj = htparam1.get(strparam1);
    if (obj == null){
      globlalString[Indx++] = strparam1 ;
      htparam1.put(strparam1,strparam1);
if (Indx < globalString.length) {
  for (int i = 0;  i < param2.length ; i++) {
    String strparam2 = param2<i>.trim();
    if (strparam2.length() > 0) {
      Object obj = htparam1.get(strparam2);
      if (obj == null){
        globalString[Indx++] = strparam2 ;
        htparam1.put(strparam2,strparam2);
result.addValue(globalString[0]); // for first value
(C) for subsequent reading/accessing
//pass constant whatever number is required to this function
String retValue = "";
  int indx = Integer.parseInt(index);
  indx = indx - 1;
  if ((indx >= 0) && (indx < globalString.length)){
   retValue = globalString[indx];
return retValue;
Hope this helps!

Similar Messages

  • How Oracle tables can be used to display Chinese/Japanese characters

    If anyone knows how to display Chinese/Japanese characters from Oracle tables please reply this email. Thanks.
    Regards,
    Preston

    hi
    ->Also please let me know how the Oracle Lite is licenced if I have 300 odd users of this offline applications
    you should speak to your local oracle rep about that, for us for example they gave a pretty cheap packet for olite 10gr3+ 11g repository
    ->need to use only database part of Oracle Lite and not mobile server.
    you cant do that. mobile server is the application server that handles the synchronization process from the server side. when a client tries to sync he actually connects to the mobile server and asks for the database changes , the mobile server know what the client must get so he packs it and give it to him
    ->you can ofc make lightweight .net apps using olite. we make olite apps even for wince handhelds. so yes ofcourse you can. olite had a win32 client also.
    ->can it run from usb.
    ok here to be honest ive never tried that myself, looks kinda weird as a requirement to be honest but i dont see why it shouldnt run. if you set up the paths correctly you shouldnt have a problem i think.
    ->offline application will have more or less similar data entry forms and storage structure
    yes ofcourse , if i have 3 tables in server i can choose to have 2(or all ) of them on the client too. i can even separate which client gets what. for instance if client a sells houses in new york he will get only the house table rows for new york. if another sells for chicago he will get those instead and etc.
    ->all client apps are offline and sync periodically (when you choose) to the server

  • BAPI_PO_CREATE1 use of potextitem in tables can i use this to populate text

    hi
    i nedd to know BAPI_PO_CREATE1 use of potextitem in tables can i use this to populate text at item level
    as my requirment is to populate the item text at item level in me23n tcode
    so how to use this pls suggest and how to acheive it?
    under me23n tab text at item level bottommost section item text i need to populate
    regards
    Nishant

    Hi,
    in fact my price values were not so small - 2.15, 1.55, 2.45, etc... but nothing less than 1.00. Nevertheless, you pointed me to the right direction - to search OSS for the answer. OSS Note 571860:
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=571860
    helps me to find out what I missed in my scenario: I didn't set ITEM-NET_PRICE at all, just via condition table. Now, when I added the following:
    item-net_price = some_price. itemx-net_price = 'X'.
    item-po_price = '2'. itemx-po_price = 'X'.   " <-- in fact, PO is created even without this line
    all of my POs are created with correct prices from the input.
    Problem solved.
    Thanks!
    Ivaylo

  • How many columns can be used in the SELECT Statment

    Hi all,
    How many columns can be used in the SELECT statement?
    Ex: SELECT x1,x2,....xn FROM <table_name>;
    Thanks,
    GowriShankar.N

    Let me join ;-)
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for Linux: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    SQL> DECLARE
      2  l_sql varchar2(32000);
      3  begin
      4  l_sql := 'CREATE TABLE T(';
      5  for i in 1..999 loop
      6  l_sql := l_sql ||'C'||i||' NUMBER,
      7  ';
      8  end loop;
      9  l_sql := l_sql||'C1000 NUMBER)';
    10  EXECUTE IMMEDIATE l_sql;
    11  end;
    12  /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from cols where table_name = 'T';
      COUNT(*)
          1000
    SQL> insert into t(c1) values(1);
    1 row created.
    SQL> select *
      2  from t t1,t t2;
            C1         C2         C3         C4         C5         C6         C7         C8         C9       
    ...   snipped
    C991        C992       C993       C994       C995       C996       C997       C998       C999         C1         C2         C3       C4         C5         C6         C7         C8         C9        C10       
    ...   snipped
    C990       C991       C992       C993    C994        C995       C996       C997       C998       C999
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------          1
                                                                                                                                        1
    SQL>
    SQL> select count(*) from (
      2  select * from t t1,t t2)
      3  ;
    select * from t t1,t t2)
    ERROR at line 2:
    ORA-01792: maximum number of columns in a table or view is 1000Obviously, inline view is obliged the same restrictions as a view, but select list is not constrained.
    Best regards
    Maxim

  • How Many Times Can I Use The Same Serial Number For Adobe Creative Suite 4?

    I have design standard and was told I can use the same serial number on multiple computers. How many time can I use it? And say I install it on the maximum number of computers, but get a new computer, can I uninstall it on one of the old computers and use it on the new one? And can I use the programs on both computers simultaneously or do I have to use them one at a time?

    Fred Tech wrote:
    Broadly speaking, it depends on the type of license you have.
    Specifically, if you have a single license then officially, you should only install it once on one computer.
    Practically, (unless it has changed with CS4) you maybe able to install it on more then one computer, BUT can only run one instance of the software at a time. You can not run more then one instance of the software concurrently; i.e. you can't run Dreamweaver on Computer 1 and Photoshop on Computer 2. That would be two instances, and is not permitted.
    This is my understanding. I am happy to be corrected if I am wrong
    Fred
    Sorry Fred you are wrong.
    If you have a single license you can install it on as many computers as you like. you can only activate the suite on two computers at anyone time. Work and Home or as many of us do it Desktop and Laptop. You can not use the computers simultaneously. You only have 20 activation/deactivations so use them wisely. Student versions only have one activation. You can not break up the suite installs the suite is considered one application.

  • How many Ipods can you use with one Itunes account?

    How many iPods can you use/sync with one iTunes account?

    PT wrote:
    Macistotle wrote:
    Unless you have DRM still haunting your tunes ... Then you can only use those songs on 5 devices. Otherwise, connect as many as you like (as stated above).
    No, you can sync your DRM tracks to an unlimited number of iPods (but only authorized to play on 5 different computers/user accounts)
    Patrick
    So I can sync two iPods to my iTunes account and sync the same digital copy movies that come with some o' my DVDs to both ipods? Do movies make a difference really, DRM-Wise? Thanks in advance.

  • When I buy Logic 9 from the appstore. On how many Macs can i use it?

    When I buy Logic 9 from the appstore. On how many Macs can i use it? Can I install it twice with the same serial number?

    On all your personal Macs.

  • How many computers can i use with creative cloud?

    how many computers can i use with creative cloud?

    Two.
    From the Creative Cloud FAQ here http://www.adobe.com/products/creativecloud/faq.html under the section Purchasing and getting started:
    On how many computers can I install the software I download from Creative Cloud?
    You can install the desktop applications available in Creative Cloud on your primary computer and one backup computer, as long as they are not running at the same time. You will have access to both the Mac OS and Windows versions, so if you have a Mac at home and a PC at work, for instance, you can install your applications on both. See the product license agreements page for more information.

  • How many computers can i use my subscription of Muse on?

    how many computers can i use my subscription of Muse on?

    With a single subscription of Muse, you can run Muse on two individual Machines.

  • Offline updates mechanism: how many times can you use it before corrupting the image(wim)?

    Hi,
    As title mentions: "how many times can you use sccm 2012 offline updates for the wim file before corrupting the image(wim)"?
    J.
    Jan Hoedt

    In my experience the offline servicing feature is only OK and too unreliable for production.
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • With the online package of PS/LR, how many machines can I use this on?

    With the online package of PS/LR, how many machines can I use this on? Can I have it at work and home?

    2 Computer License http://forums.adobe.com/thread/977272

  • How many times can you use the serial number to download the cd

    help how many times can we use the serial number to download the cd photoshop elements 11

    Download Photoshop Elements products | 13, 12, 11, 10
    Mylenium

  • How many times can u use an app?

    hey! i have purchased many ipad apps
    im about to get a second ipad and i want the apps on both using just the one purchase of them (one account)
    my question is how many times can u use an ipad app with one purchase? i kknow with music it says 5 copies but how many with apps?

    Do you and your wife share the same itunes account or do you each have one? If you share the same one - say both you and she log in as [email protected] into itunes, then every device you sync up with itunes will share the same apps - provided they're compatible.
    For example, I had an ipod touch for over a year then got the ipad, all my touch apps transferred to my ipad when i set it up. I could then go in and delete the ones I didn't want on the ipad. And if I were to also get an iPhone, I could sync any existing apps that I have bought that are compatible with the iphone to it.
    Theoretically, if i had 20 ipads for a classroom, I could use one itunes account and put the exact same apps on all 20 of them.

  • How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?

    How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?

    If you purchased AppleCare + within 30 days of getting your iPhone 5 you are allowed 2 instances of breakage replacement with a $49 deductible. If you do not have AppleCare + accidental breakage is not covered under you warranty, you can do an out-of-warranty replacement for $229.

  • How many devices can you use on an airport express wirelessly?

    How many devices can you use on an airport express wirelessly? Does it matter how many devices you have?

    The Express supports up to ten clients.

Maybe you are looking for

  • Problem with printing more than one page (ghostscript broken?)

    Hello, since one of the last package updates I have problems with printing more than one page. The print problems occurs as well with pdf files as well with printing websites. I use an actual KDE system with commercial turboprint printer driver. The

  • How do I disable the volume clicking sound?

    I have been trying to disable the super-annoying sound that is played every time you change the volume using the Volume Up/Down keys (F11 and F12 on my MacBook Pro) I am running Windows 7 Pro SP1 with BootCamp v3.3 on a 32-bit Intel Core Duo P7550 2.

  • Multiple monitor -- where application displayed after loading?

    I have a question. After installing Mavericks I have one very annoying problem with multiple displays. When I open an application (e.g. Outlook), I prefer it opens in the second monitor. Before that, if you drag it to the second monitor it remembers

  • Replace a line on XML file

    If I have a XML file, like:   <?xml version="1.0" ?> - <Fibonacci_Numbers>   <fibonacci>1</fibonacci>   <fibonacci>1</fibonacci>   <fibonacci>2</fibonacci>   <fibonacci>3</fibonacci>   <fibonacci>5</fibonacci>   <fibonacci>8</fibonacci>   <fibonacci>

  • What is meant by resource constrained devices

    what is meant by resource constrained devices