Skip to Content
0
Former Member
May 14, 2010 at 12:39 AM

BRFplus: DDIC Structure as Function Parameter results in Dump

193 Views

Hi all,

I want to use Data Dictionary structure VBAK as a (signature) parameter to a BRFplus Function.

I have created a Data Object VBAK bound to the DDIC structure VBAK, and defined it as a parameter to my Function.

In my code to call the BRF function, I have:

DATA:
  lo_context            TYPE REF TO if_fdt_context,
  lo_function           TYPE REF TO if_fdt_function.

DATA:
  ls_vbak               TYPE VBAK.

  ...
  lo_context  = lo_function->get_process_context( ).
  lo_context->set_value(
    EXPORTING
      iv_name = 'VBAK'
      ia_value = ls_vbak ).

The SET_VALUE method results in a runtime error (program dump) of type UC_OBJECTS_NOT_CONVERTIBLE description u201CData objects in Unicode programs cannot be convertedu201D.

On investigation this seems to be because certain fields are represented differently in BRF. For example, the DDIC field VBAK-ERDAT (type DATS) is stored in BRF as TIMEPOINT, which is itself a structure (type FDT_S_TIMEPOINT). Trying to move the date value to the timepoint value is not possible and results in the dump.

How do I get around this ? Or in practice is it not feasible to use DDIC structures containing dates, times and possibly numbers as function parameters ??

Running on SAP NW 7.0 EHP1 SP5.

Thanks,

Grogan