cancel
Showing results for 
Search instead for 
Did you mean: 

UDF -Golobal variables to store the data

Former Member
0 Kudos

Hi,

We are sending order information to source system (SAP).

Here i need to chk in message mapping : if it is the

first time we received that order into SAP or not.

As per the expert suggestion its better to use global variable and store the order no and compare it the next time it comes.

Let me know the UDF code.

Thanks

MMV

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

As far as I can tell, I don't think the information in the global container is persisted so if for some reason your Java engine is restarted, this information will be lost.

I think you should use BPM to make a request to the SAP system to determine whether it has alrady been sent and then proceed with your normal processing.

Another option is to use a simple BPM to do your scenario (without making a call to SAP) and maintain your information in a multiline container and use that container to do the check. Remember, all scenarios should then go through a single instance of the BPM. This way the information will be persisted.

Regards,

Yaghya

Former Member
0 Kudos

HI,

Refer below blog

/people/miguel.jorge/blog/2006/10/10/interesting-use-of-global-variables

Here you can maintain the Global variable and then in 1st mapping assign the value for it as had shown in UDF code in blog and then innext mapping check the value of global variable.

BUT...as per your suggestion I doubt how you will maintain multiple order information in Global variables.

Better to go for Either DB / RFC Lookup here you can maintain the table and can check from it whether the Order information is previously send or not

For db/rfc lukup refer to:

Lookup’s in XI made simpler : DB lukup

/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

RFC Mapping Lookups

/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

Thanks

Swarup