Skip to Content

Hash tables in PO

Hello,

i have a requirement to create a hash table concept in PO (singleStack 75) database table. so i will get input as 10 records and each record will have 5 fields and i want to concatenate and send that 5 fields as a string to the hash table in Database to check whether that is existing record or new. if new i have to insert that to hash table. if exist then i will not send that record to target.

So can you please help on, how to create hash table to database and how to do lookup that table from Message mapping (either by UDF ./Java code).

input (5 fields)-->concatenate-->UDF for HASH total--> look up to DB (if exist ignore, if record not exist craete that in hash table)

tried below code in UDF..but not working, can you please convert below code to UDF

import java.security.*;

import java.math.*;

public class MD5 {

public static void main(String args[]) throws Exception{

String s="This is a test";

MessageDigest m=MessageDigest.getInstance("MD5");

m.update(s.getBytes(),0,s.length());

System.out.println("MD5: "+newBigInteger(1,m.digest()).toString(16));

}

}

i verified blogs and most of them are ABAP based .

Best Regards,yQ

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 23, 2018 at 08:13 PM

    Hello Team,

    please convert above code to UDF working format.

    Can you please suggest on hash table in SAP PO, is it suggestible to have a hash table in SAP PO database to do lookup.

    we have a millions of records to insert and do lookup.

    Best Regards,yQ.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.