on 03-08-2012 5:00 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.