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

Using a snippet of a function module source code to own program

Former Member
0 Likes
589

Hi all,

I need some help, currently I am using this FM COPF_OPC_ITEM_READ_MULTIPLE to read some data and that FM will give value and result. However, this FM can only use up to 15 items. I am trying to using it for more that 15 items, lets say about 100 to 1000 or more. In the source code of this FM I've found this:

CALL METHOD cl_opc_item=>read_value_multi

CHANGING

items = l_item_tab.

which is fine because i can populate "itemalias" and "plant" in the itab. However, I'm not sure how to populate or read the value and resulttext as what the FM did. I've tried to copy the FM define read_text, but failed and apparently got some dump.

Can anyone help?

Thanks.

Edited by: Qidran on Nov 1, 2011 7:59 AM

3 REPLIES 3
Read only

Former Member
0 Likes
544

Hi all,

I've managed to use the call method but my problem now is to read all data at the same time. Again, can anyone help me on this?

Thank you.

Read only

0 Likes
544

Hi Qidran,

I'm not sure for a solution to your exact problem, but, can hint you to try the following:

1. To copy a FM code or functionality, it is recommended you copy the entire Function Group.

2. All references to standard FM can remain with the changes in your Z code.

3. This will take care of the dumps and you should be able to execute your Z FM.

Hope this helps.

Regards,

Pranav.

Read only

0 Likes
544

Hi Pranav,

Thanks for the reply, I've managed to using th FM functionality already, as you said I've copied the whole prog and for the looping part I've loop an itab before and after the CALL METHOD.

Thanks.