Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

oo transaction with parameters

Former Member
0 Likes
767

Hi,

I would like to create a "OO transaction" for a public class method . The method is having an one import parameter. Is it possible to call OO transaction with the method argumnet.

Ex: class1->method1(arg1). is it possible to wrap this method with oo transaction . if so ,how can i call the transaction to pass value to the method.

Hi,

I would like to create a "OO transaction" for a public class method . The method is having an one import parameter. Is it possible to call OO transaction with the method argumnet.

Ex: class1->method1(arg1). is it possible to wrap this method with oo transaction . if so ,how can i call the transaction to pass value to the method.

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
549

Hello Jey

No, you cannot.

The only way is to use the same mechanism for "normal" transactions: SET/GET parameters. However, you cannot pass the GET value during the method call but have to retrieve it within your method.

Regards

Uwe

Read only

0 Likes
549

Hi UWE,

can you give me sample code ??

Thanks,

Jey

Read only

0 Likes
549

Hello Jey

Parameter ID 'BUK' is used to set the company code.

Thus, in your MAIN method (which is started by the OO-transaction) you could code at the beginning:


GET PARAMETER ID 'BUK' field me->md_company_code.  " instance attribute of your class

However, I would place this coding into the CONSTRUCTOR method of your class.

Regards,

Uwe