on 2017 Sep 08 1:47 PM
Hello all,
I've created a BRF+ application that fetches a record from Database through a dblookup table and stores it in Sal_table(which is a table created from data object).Now i want to retrieve this data in my ABAP Program.I'm confused about how to retrieve this table into my ABAP program's Internal table.
Thanks for your help. 🙂
Hi Silent Viewer,
I was facing kind of the same problem. My business requirement was to trigger an application message and give either an error or a warning to the user in the transaction to request a decision.
For the purpose of triggering a message the action “log message” is available in BRFplus. This action results in an application log entry.
If however the requirement is to show a message to the user in the application and to request a decision (i.e. warning message or information message) the action “log message” will not be sufficient.
In this particular case the requirement can be fulfilled by creating an expression in form of a decision table. The result of the decision table can be defined as a structure containing elements like a message ID, message number and message type from the decision table.
The same structure can be defined as the result data object in the BRFplus function. After the implementation of the BRFplus code template in the ABAP code the BRFplus function will return the structure as <la_any>. In the application ABAP code the returned structure can be utilized for message processing in the application.
In my particular example I had the challenge to decide whether to show a warning message or an error message depending on the user group of the user running the application.
Therefore I first used a database lookup action to get the actual user group from the database. Then I used a Boolean expression to determine if the user should see the message type “warning (W)” or “error (E)” depending on the identified user group.
For the purpose of message processing I created a new message via SE91.
I think that you should be able to use the result from the BRFplus function returned to the ABAP code as <la_any> for working with it during the runtime of your ABAP program.
Hopefully this helps.
Best regards,
Carsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
i want to some clarifiacations that data object means
create data lo_data type standard table of vbak.
field_symbols:<lt_table> type standard table.
assign lo_data->* to <lt_table>.
like above code u can get data into ur abap program internal table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Krishna Murthy What exactly I'm doing here is that I fetch data from a SE11 table based on specific values and I get a table (data object not a decision table). Now how do i get this table and its record into my ABAP code.I tried get_data_object method but it does not have a exporting parameter which is used to get the object itself.Any help?
PARAMETERS:P_tier type i,
P_level type string.
DATA: lo_fuction TYPE REF TO if_fdt_function,
lo_context TYPE REF TO if_fdt_context,
lo_result TYPE REF TO if_fdt_result,
lo_message TYPE REF TO cx_fdt,
lv_salary type int4.
Types:BEGIN OF zsalarydemo,
tier type i,
level type string,
salary type int4,
END OF zsalarydemo.
Data: lt_tab type STANDARD TABLE OF zsalarydemo,
wa type zsalarydemo.
START-OF-SELECTION.
TRY .
" Get BRFplus function
lo_fuction ?= cl_fdt_factory=>if_fdt_factory~get_instance( )->get_function( '005056B17AC31ED7A58B7FB3A4BF9DD5' ).
" Set the BRFplus function context ( input variables )
lo_context = lo_fuction->get_process_context( ).
lo_context->set_value( iv_name = 'TIER' ia_value = p_tier ).
lo_context->set_value( iv_name = 'LEVEL' ia_value = p_level ).
" Process the BRFplus function
lo_fuction->process( EXPORTING io_context = lo_context
IMPORTING eo_result = lo_result ).
"Retrieve the BRFplus function result
lo_result->get_value( IMPORTING ea_value = lt_tab ).
CATCH cx_fdt INTO lo_message.
ENDTRY.
write:/ 'Tier: ', 10(10) p_tier color 1, / 'Level: ',10(10) p_level color 1,/'Salary: ',10(10) wa-salary color 1 .
"I need to export table from brf+ and import it here.
please correct my guess.
table 'lt_tab' should be export to ur abap report and
there u want import. right?
for i will suggest two ways. use any one of below ways
way1: in above report that table 'lt_tab' can be send to application server AL11
using some coding technics like open dataset.
after u export this table to application server and another ur abap report
u write code for reading table from application server.
which is one way to export and import to table.
may be it takes some time.
way2: use shared memory object technic.
u can search in scn and study the how to use shared memory.
u can easy get solution.
User | Count |
---|---|
68 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.