Skip to Content
avatar image
Former Member

Integration of BRFPlus genrate code Template

Hi guys,

I have the following scenario:

I want to get the value of a quote by processing a decisiontable in BRFPlus. For the Integration in the Abap code I used the generate code Template.

The Table gets the ID of the quote as Input and as Output i should get a structure with the quote, their name, and the valid dates.

What I adapted is the following:

Here I inserted the input parameter.

 la_zfra_e_quote = 14.

And here i put the Outputstructure:

 IMPORTING ea_result = lt_quote

As Output I get just 0 what cannot be true because the output in the decisiontable should be 10.

 BEGIN OF lt_quote,

    lv_quote TYPE num,
    lv_text  type string,
    lv_from TYPE sy-datum,
    lv_till TYPE sy-datum,
 END OF lt_quote,

 lv_timestamp     TYPE timestamp,
 lt_name_value    TYPE abap_parmbind_tab,
 ls_name_value    TYPE abap_parmbind,
 lr_data          TYPE REF TO data,
 lx_fdt           TYPE REF TO cx_fdt,
 la_zfra_e_quote  TYPE if_fdt_types=>element_text.

 FIELD-SYMBOLS <la_any> TYPE any.

*Constants Declaration

 lv_function_id    TYPE if_fdt_types=>id VALUE '00145E6D10161ED6AB8355C04BC36F0F'.

*Get Quote

  ls_name_value-name = 'ZFRA_E_QUOTE'.
  la_zfra_e_quote = 14.
  GET REFERENCE OF la_zfra_e_quote INTO lr_data.
  ls_name_value-value = lr_data.
  INSERT ls_name_value INTO TABLE lt_name_value.


     EXPORTING iv_function_id      = lv_function_id
               iv_data_object      = '_V_RESULT'
               iv_timestamp        = lv_timestamp
               iv_trace_generation = abap_false

      IMPORTING er_data             = lr_data ).

   ASSIGN lr_data->* TO <la_any>.


 cl_fdt_function_process=>process( EXPORTING iv_function_id = lv_function_id
                                             iv_timestamp   = lv_timestamp

                                  IMPORTING ea_result      = lt_quote

                                 CHANGING  ct_name_value  = lt_name_value ).

  CATCH cx_fdt INTO lx_fdt.

WRITE lt_quote-lv_quote.

Add comment
10|10000 characters needed characters exceeded

  • Hi Bjoern,

    on the first glance, the code looks okay. What is a bit strange is the GET_DATA_OBJECT_REFERENCE call that is not used anywhere in the code.

    To get the source of the issue: Did you try to run the BRFplus function in simulation mode in BRFplus and if yes did you get the right results?

    Did you execute the simulation in interpretation as well as in generation mode (and both runs delivered the same result)?

    Best regards,


  • Get RSS Feed

0 Answers