cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the BRF+ function result data object of type table in ABAP

Former Member
0 Kudos

Hi,

I am calling a BRF+ function from Abap....If the result data object of the function is element then i am able to get the value back in ABAP...Suppose the result data object of the function is of table type,I couldnt retrieve the value....Can you please help me how to retrieve the table data object value of the function from abap....

Regards,

Dheepak.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Thanks carsten and Tiwari for your reply...

Tiwari,

I understand that if i know the data type of the result data object which i am going to get i can declare it my ABAP program and get the values....But i am developing a generic program which calls the various BRF+ functions based on the function id...So i am not aware what is the data type of the result data object....so is there a any way to handle this situation...Please advice...

.

Carsten,

I used the GET_DATA_OBJECT_STRUCTURE method of class CL_FDT_FUNCTION_PROCESS to get the data object structure...i am able to get whether it is an element or structure or internal table...

But is there any way to get the data type of the object...For example if it is going to be an element of type BELNR_D,is it possible to get the BELNR_D value in my program...Please advice...

Thanks,

Dheepak.

Former Member
0 Kudos

Ohh.so its case dynamic assignment of result data object...I didn't get it first time..

Data: lo_data_object type if_fdt_data_object,

lo_instance TYPE REF TO if_fdt_admin_data.

cl_fdt_factory=>get_instance_generic( EXPORTING iv_id = lv_result_id IMPORTING eo_instance = lo_instance ).

lo_data_object ?= lo_instance.

  • Check, whether data object of type E/S/T

lv_data_object_type = lo_data_object->get_data_object_type( ).

CASE lv_data_object_type.

WHEN if_fdt_constants=>gc_data_object_type_element.

lv_typename = lo_data_object->get_ddic_binding( ).

IF lv_typename EQ 'BELNR_D'.

"your logic to assign type

ENDIF.

.........

.........

.........

Hope it will help you..

regards, Tiwari

former_member445147
Participant
0 Kudos

Hi Rahul Tiwari

in your above code you getting instance (CL_FDT_APPLICATION)for the particular id

and you type casting lo_data_object which is (IF_FDT_DATA_OBJECT) but both are different interface ,

here will get type miss match right ,and it will throw the exception for the 

source type: "\CLASS=CL_FDT_APPLICATION"

target type: "\INTERFACE=IF_FDT_DATA_OBJECT"

how we ll over come this .

thanks

regards

Harish

Former Member
0 Kudos

Hi Dheepak,

There is not special or different code to get the value from Table Type result data object. It almost same except data declaration.

Did you try with simulation of function in BRF+ transaction. Is it working there? I guess you will know answer when you do simulation and see the possessing step by steps.

regards, Tiwari

carsten_ziegler
Active Contributor
0 Kudos

You best implement the BRFplus call statically with class CL_FDT_FUNCTION_PROCESS. In this class you can find a method to generate a variable for you that you can use to get the data. Maybe do a where used analysis on the methods to see patterns for implementation.

Do you have a NW 703 or a NW 731 available somewhere? In this version of BRFplus you can use the template code generator to give you all the code you need for your particular example.

former_member206479
Participant
0 Kudos

Hi Carsten,

I'm very new to BRFplus and i got assigned to work on BRFplus.

I able to create applications in BRFplus, but i don't know how to make programming to call BRFplus function inside our ABAP and in Web Dynpro.

Will you please help me out.

Regards,

Venkat

Former Member
0 Kudos

Hi Carsten,

I have created application which is getting called from SAP backend. I am also facing same issue. My BRF+ output structure contains three parameters and a table type. All three parameters get populated except table type. Could you please help me out. I have checked all bindings.

Just for information if i execute BRF application stand alone all values get populated including table type. Please reply asap.

Thanks ,

Ashutosh

Former Member
0 Kudos

To be sure, as Carsten suggested did you try with generated codes using report FDT_TEMPLATE_FUNCTION_PROCESS or Generate option in Function UI?

former_member227510
Participant
0 Kudos

Hi Carsten,

     Is it possible to do trace using CL_FDT_FUNCTION_PROCESS.


       Can you send me an example link for simulating a function (brf+ gui) using table type as input parameter and output parameter or any other combination where table type is the input parameter, if possible.

Regards,

Gopa