How to use BRF plus application in abap programs (Report or Module pool)

Hi All,
I have created an BRF plus application through FDT_WORKBENCH to calculate bonus of the employee with the help of SDN tutorial.
Now my concern is that how can i use this application in my report.
I have also read in the tutorial that we can create BRF plus application through ABAP coding but my question is, if i created an application through FDT_WORKBENCH then how can i use it in my ABAP report.
Thanks a lot in advance.
Regards,
Sheelesh

Hi,
CALLING BRF+ FROM ABAP REPORT PROGRAM :
I think the program may be helpful for you guys.
*CALLING THE BRF+ FROM ABAP REPORT PROGRAM :
REPORT Z_BRFPLUS_REPORT_01.
PARAMETERS : P_SEL TYPE STRING .
TYPES : BEGIN OF TYPE_PRICE ,
        NUMBER TYPE DECFLOAT16 ,
        CURRENCY TYPE STRING ,
        END OF TYPE_PRICE .
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 .
DATA : LO_MESSAGE TYPE REF TO CX_FDT .
FIELD-SYMBOLS : <FS_PRODUCT> TYPE IF_FDT_TYPES=>S_MESSAGE .
DATA : PRODUCT TYPE STRING ,
       LS_PRICE TYPE TYPE_PRICE .
CLEAR LS_PRICE .
PRODUCT = P_SEL .
TRY .
* GET THE BRF PLUS FUNCTION .
  LO_FUNCTION ?= CL_FDT_FACTORY=>IF_FDT_FACTORY~GET_INSTANCE( )->GET_FUNCTION('0050569E629D1ED39DD2090294D9A5BD' ) .
* SET THE BRFPLUS FUNCTION CONTEXT .
  LO_CONTEXT = LO_FUNCTION->GET_PROCESS_CONTEXT( ) .
  LO_CONTEXT->SET_VALUE( IV_NAME = 'PRODUCT' IA_VALUE = PRODUCT ) .
* PROCESS THE BRF PLUS FUNCTION .
  LO_FUNCTION->PROCESS(
               EXPORTING
                 IO_CONTEXT = LO_CONTEXT
               IMPORTING
                 EO_RESULT = LO_RESULT   ) .
* RETRIEVE THE BRF PLUS FUNCTION RESULT .
  LO_RESULT->GET_VALUE(
                IMPORTING
                  EA_VALUE = LS_PRICE ) .
WRITE : LS_PRICE-NUMBER ,
        / LS_PRICE-CURRENCY .
CATCH CX_FDT INTO LO_MESSAGE .
ENDTRY .
Thanks & Regards,
Joyjit Biswas

Similar Messages

  • How to pass table data to brf plus application through abap program

    Dear All,
    i have a question related to BRF Plus management through abap program.
    In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
                                           Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
    in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
    And my question is
    1) How to pass fields to BRF Plus application from abap program.
    2)How to pass Table data to BRF Plus application from abap program.
    3)How to pass Structure data to BRF Plus application from abap program.
    4)How to get the result data from BRF Plus application to my abap program.
    And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
    How do i get the code automatically when calling the function in brf plus application.
    Regards
    venkata.

    Hi Prabhu,
    Since it is a Custom Fm i cant see it in my system.
    Look if u want to bring data in internal table then there could be two ways::
    1) your FM should contain itab in CHANGING option , so that u can have internal table of same type and pass through FM,
    2) read values one by one and append to internal table.
    Thanks
    Rohit G

  • How to use Class "CL_GUI_CHART_ENGINE" in a abap program ?

    Hi Guys,
    I want to display data in my internal table in the form of a Graph using class "cl_gui_chart_engine".
    I had a look at sample program given by SAP - GRAPHICS_GUI_CE_DEMO but need some help to understand how can we use our own data to be displayed in the graph ? Basically what I am looking for is that where we need to do the changes in creation of XML file so that we can pass our own data ?
    ( perform create_data_demo using l_ixml_data_doc)
    Could you please help me with some sample code or pseudocode ?
    Thanks
    Ashwa

    Thanks Kai,
    I had already done the same thing and got the required output.
    Populate X-Axis ( Categories )
      LOOP AT ITAB.
    Populate Categories
        l_element = p_ixml_doc->create_simple_element(
                  name = 'C' parent = l_categories ).
        l_element->if_ixml_node~set_value( itab-value).
      ENDLOOP.
    Populate Y-Axis ( Values )
      LOOP AT VALUE_TAB.
       l_element = p_ixml_doc->create_simple_element(
                 name = 'S' parent = l_series ).
        l_element->if_ixml_node~set_value( value_tab-value).
      ENDLOOP.
    I am now trying to find the ways to change the default layout of the graph. I guess it should be done in "perform create_custom_demo using l_ixml_custom_doc." . I want that my graph should be displayed as lines instead of bar's.
    Once I achieve this I will share my findings along with sample code with the community.
    I wish I could get some documentation on class "cl_gui_chart_engine" and interfaces like "if_ixml_document".
    Thanks
    Ashwani

  • How to Pass table-structure-fields data to BRF PLUS Application

    Dear Eperts,
    i have a question related to BRF Plus management through abap program.
    In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
                                           Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
    in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
    And my question is
    1) How to pass fields to BRF Plus application from abap program.
    2)How to pass Table data to BRF Plus application from abap program.
    3)How to pass Structure data to BRF Plus application from abap program.
    4)How to get the result data from BRF Plus application to my abap program.
    And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
    How do i get the code automatically when calling the function in brf plus application.
    Regards
    venkata.

    Hi Venkat,
            As said by Jocelyn Dart, you need to go through BRF+ tutorials.
    -->You can see a on of the tutorial from the below link
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/50879cee-f9b5-2e10-039e-b2d6c4b10e6b

  • How to use non sap application in sap.......?

    hi,
            anyone has any idea how to use non sap application  like java class in sap through abap programming. please let me know ...
    thanks in advance.
    saurin shah.

    Hi,
    DATA: COMMAND TYPE STRING VALUE 'C:\j2sdk1.4.2_08\bin\java',
    DIR TYPE STRING VALUE D:\eclipse\workspace',
    PARAMETER TYPE STRING VALUE 'Helloworld'. "here the name of your java program
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
    EXPORTING
    APPLICATION = COMMAND
    PARAMETER = PARAMETER
    DEFAULT_DIRECTORY = DIR
    MAXIMIZED =
    MINIMIZED = 'X' "If you need the DOS window to be minimized
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    BAD_PARAMETER = 3
    FILE_NOT_FOUND = 4
    PATH_NOT_FOUND = 5
    FILE_EXTENSION_UNKNOWN = 6
    ERROR_EXECUTE_FAILED = 7
    OTHERS = 8.
    check this link
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Regards,
    Satish

  • How to use Try Catch Block in ABAP Like JAVA

    Hi Experts,
       I am using BAPI to post MIGO in one of my application. If the MIGO is successfully gets posted then BAPI returns no message, but if there is some error in posting then it returns an error message. Now I want to print that error message in catch block by calling method RAISE_ERROR_MESSAGE. How to use try catch block in ABAP. Please suggest with example.
    Thanks and Regards.
    Vaibhav Tiwari.

    Hi Vaibhav
    You may not catch exceptions returned by function module using try endtry block.
    It works well with the exception returned by methods.
    In case of function modules or BAPI what u can do is to check sy-subrc returned and give message accordingly. If it returns a structure like bapireturn then display message returned.
    in case of exception returned by a method,  do it like this...
    data: excep type cx_root.
    data: v_str type string.
    try.
    *any method call or division by zero (for ex)
    catch cx_root into excep.
    endtry.
    if  excep is not initial.
    CALL METHOD   excep->if_message~get_text
      receiving
        RESULT = v_str.
    endif.
    *display the value returned in v_str on screen

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • How to use the SQVI in HR-ABAP

    Dear Guru,
    How to use Quick Viewer in HR ABAP,
    kindly give some sample materials for this .
    else provide some soluytion for this .
    Regards,
    Mathankumar.A

    I don't think there is any difference when comes to HR ABAP. so you can proceed the way you do incase of normal tables. the only difference here is you will see Infotypes  instead of Tables.

  • BRF plus with WebDynpro ABAP

    Hi Experts,
    Please suggest some documents or  blogs on BRF plus in Webdynpro ABAP.  Also are there any prerequisites before starting with BRF plus.
    Thanks and Regards
    Pranav

    Hello Everyone,
    Here is one of the link I found
    /docs/DOC-8824#section6 [original link is broken]
    Any suggestions or new links are welcome
    Thanks and Regards
    Pranav

  • How to avoid time out error in abap program

    How to avoid time out error in abap program
    based on performance wise i want please help

    Timeout occurs when a statement exceeds its time limit.To avoid this we need to tune the statements.
    I can give give you few tips for tune a select stament.
    1.The order of the feilds in the select statement should be same as the order of fields in the database table.
    2.It is always advisible to use the key fields when you are using the where clause.
    3. Sort the internal table while using the for all entreis statements.
    4.Use index in where clause if necessary.
    5.When you have a read statement user binary search but before this a sort statement should be there.
    6. Check your program with the Tcode ST05 and check which statement takes much time based on that tune that.

  • How to improve the performance of the abap program

    hi all,
    I have created an abap program. And it taking long time since the number of records are more. And can anyone let me know how to improve the performance of my abap program.
    Using se30 and st05 transaction.
    can anyone help me out step by step
    regds
    haritha

    Hi Haritha,
    ->Run Any program using SE30 (performance analysis)
    Note: Click on the Tips & Tricks button from SE30 to get performance improving tips.
    Using this you can improve the performance by analyzing your code part by part.
    ->To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    ->To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    ->Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    ->Avoid for all entries in JOINS
    ->Try to avoid joins and use FOR ALL ENTRIES.
    ->Try to restrict the joins to 1 level only ie only for tables
    ->Avoid using Select *.
    ->Avoid having multiple Selects from the same table in the same object.
    ->Try to minimize the number of variables to save memory.
    ->The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    ->Avoid creation of index as far as possible
    ->Avoid operators like <>, > , < & like % in where clause conditions
    ->Avoid select/select single statements in loops.
    ->Try to use 'binary search' in READ internal table. -->Ensure table is sorted before using BINARY SEARCH.
    ->Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    ->Avoid using ORDER BY in selects
    ->Avoid Nested Selects
    ->Avoid Nested Loops of Internal Tables
    ->Try to use FIELD SYMBOLS.
    ->Try to avoid into Corresponding Fields of
    ->Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    edited by,
    Naveenan

  • How to read a word in a abap program for syntax check

    program for finding keywords:
    into a given program name in selection screen.
    e.g Parameters Keyword in YXABC propgram.
    How to find a word in a abap program for syntax check

    Hi!
    Read table TNAPR for the program names.
    Then use the READ REPORT  statement for it and load the program into an internal table.
    Then loop at the table.
    Regards
    Tamá

  • How to translate the key words in ABAp program from lower case to upper cas

    How to translate the key words in ABAp program from lower case to upper case?

    Hi Kittu,
    You need to set the Pretty Printer settings to achieve key words in ABAP program from lower case to upper case.
    Utilities -> Settings -> Pretty Printer (tab) -> Select third radio button.
    Thats all.
    <b>Reward points if this helps.
    Manish</b>

  • What is the use of "#ec *  in a abap program

    Hi,
    i want to know that is the use of "#ec *  in an abap program.
    i heard that it is used to supress the warning messages which we get when we do extended syntax check.
    fist of all i want to know is it true r false and if its true then i want to know more about it.
    regards,
    maqsood

    Hi
    Yes it's true.
    If you put "#ec * at the end of a abap code row, you can suppress the warnining messages of extended program check.
    Every kind of warning has own sign, you find out them while running extended check.
    It's a way to clear the useless messages.
    For example, you have created an include where you have defined several routines you have to use in several programs, but every program don't use all routines of that include, or you dynamically call those routines, so if you run the extend check for a certain program you can get a warning like that:
    FORM PLUTO not called directly
    Now you can't delete the routine from the include, because it can be used by other program, but you can hide that message by "#ec CALLED:
    FORM <MY_FORM>. "#EC CALLED
    ENDFORM.
    Max

  • I m a insurance agent how to use my company product sales illustration program

    How to use my company product sales illustration program ?

    Who knows? XD
    You haven't mentioned anything about the program.
    Why don't you ask your company for training? (if it is an inhouse developed program).
    Otherwise, go to the website for the program. Use GooGle!

Maybe you are looking for