cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a particular record from BRF+ table in ABAP

Former Member
0 Kudos

hi all,

I have a requirement where a particular record has to be read based on certain value for a set of columns from BRFplus Decision table to Delete/Update. I tried many methods of CL_FDT* but could not find any right one.

Could anyone please help me?

Thanks,

Deepika

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

any easy solution for this issue?

tarunkumar
Active Participant
0 Kudos

Hi Deepika,

I'm not very sure what you are trying to achieve but If you are using BRF+ under conditions in TM then I would propose it's better to use BOPF service manager to read/write changes. There are classes ( e.g. /SCMTMS/CL_COND_OL) which handles BRF+ data using conditions.

/SCMTMS/CONDITION_DEFINITION is the BO for BRF+ conditions.

Thanks & Regards,

Tarun Kumar

Former Member
0 Kudos

Hi Tarun,

I would like to retrieve Condition Table data based on values. some thing like a WHERE CLAUSE and delete that record which matches from the table.

I checked the class you mentioned, all the methods are related to the Header information, none of them gives me the Table data.

Coudl you please let me know if any method is available to retrive particular table data based on search key.

Thanks,

Deepika

Former Member
0 Kudos

Hi Tarun,

I donot see the Condtions BO in BOPF_EWB tcode. Could you please tell me in which transaction, i can find this BO?

Former Member
0 Kudos

please try transaction BOBF to find the condition BO, and hope there is some action that will help.

Former Member
0 Kudos

what do you mean "Condition table data"? can you figure out what is it in the system? is it a decision table data you maintain in the BRFplus?

Former Member
0 Kudos

Hi Dawson,

What i meant by Condition table data is, the rows we maintain in the Condition Decision Table.

I am able to retrieve whole table data using GET_TABLE_DATA method of CL_FDT_DECISION_TABLE, but the issue is the values are stored in many nested internal tables. i will have to break all the tables one by one and for many columns.

we are expecting the volume to be some thousands of data.

tarunkumar
Active Participant
0 Kudos

to chek BO you can use /bobf/conf_ui tcode.

Former Member
0 Kudos

Hi Tarun,

I checked the BO, nothing helps as all the related methods are of the Header data. How many DAD's are avaible, its definition and all.. No data

Former Member
0 Kudos

Hi Deepika,

I think currently I don't know the solution but actually the decision table columns are dependent on the input data object and the result data object, so I think this is dynamic from standard, and probably there is no such a table with meaningful columns returned. Can you manipulate the return table of get_table_data method and move the data to the an internal table with meaningful columns? because you know what the field is in specific column.

BR, Dawson

Former Member
0 Kudos

Thanks Dawson. I need to check multiple nested internal tables. will find outhow best i can transfer it to one internal table and check the value.

Thanks,

Deepika

Clark_Huang
Advisor
Advisor
0 Kudos

Hi Deepika,

There is one solution from my side.

1. Include the Decision table in a BRF+ function.

2. Set the input and result of the function.

3. Call the function in the ABAP.

4. Get the record from result.

Please find the call function logic in ABAP as below.

Data:

        lo_admin_data         TYPE REF TO if_fdt_admin_data,

        lo_function           TYPE REF TO if_fdt_function,

        lo_context            TYPE REF TO if_fdt_context,

        lo_result             TYPE REF TO if_fdt_result.

cl_fdt_factory=>get_instance_generic( EXPORTING iv_id = "functon id in general tab"

                                                      IMPORTING eo_instance = lo_admin_data ).

lo_function ?= lo_admin_data.

*Set input parameter

lo_context ?= lo_function->get_process_context( ).

lo_context->set_value( iv_name = "parameter name"    ia_value ="parameter value" ).

lo_function->process( EXPORTING io_context = lo_context

                                          IMPORTING eo_result = lo_result ).

lo_result->get_value( IMPORTING ea_value = "Result" ).

Best Regards

Clark Huang

Former Member
0 Kudos

HI Clark,

Thanks for your reply.

Have a question, in the procedure above, i need to column by column right? can i retrieve the data based on set of columns value?

Also can you help me how to delete a row? when i delete the row, empty row still remains.. i donot want to retain any empty rows.

thanks,

Deepika

Former Member
0 Kudos

Hi Deepika,

I am not clear about your question, so could you please provide more info?

What do you want to do in ABAP with your BRFplus?

BR, Dawson

Former Member
0 Kudos

Hi Dawson,

Thanks for your reply.

The requirement is to create Condition table with set of columns and result column as true or false.

And with set of column values, i need to read if the records exists and Delete that record.

The Get_table_data method of CL_FDT_DECISION_TABLE gives me in a format which i need break all the sub internal tables one by one and there is no direct read record by values.

So can you help me if you know the solution?

Thanks,

Deepika

Former Member
0 Kudos

so you mean you want to get the data maintained in brfplus decision table and read it with the set of column values and if there is one record found, then delete the record in that decision table? why do you want to do this? can you explain why?

Former Member
0 Kudos

yes. You are right.

the reason we do this is we get data for the decision table from 3rd party tool. Its daily load and that tool holds the record of origin. if any changes occurs in the record, we receive 2 records where one
(older image data) to be deleted and newer record with updated data. hence wanted to know which record to be deleted.

Former Member
0 Kudos

let me draw a conclusion from my understanding:

firstly, what you want to do is to delete some record in the brfplus decision table from your abap program, but you don't know how to get the decision table data as a normal internal table with columns as they are displayed in the brfplus UI, am I right?

then, I guess, in the abap program, you have two records retrieved from that tool and you want to use the old image to read the "internal table" which you want and if it is found, you delete the corresponding record maintained in the decision table and insert the new image into the decision table, right?

correct me if I am wrong.

Former Member
0 Kudos

yes. you are correct.

and the read is based on 4-5 column values.

Former Member
0 Kudos

Hi Dawson,

Do you have any solution for me?

Thanks,

Deepika