cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Coding "set_value"

Former Member
0 Kudos

Hello Guys,

i have a ittle problem with the method lo_context->set_value.

Here is my simple coding:

DATA:

lo_factory TYPE REF TO if_fdt_factory,

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:

lv_tag TYPE z_tag,

lv_laune TYPE z_laune,

lv_erg TYPE Z_RESULT_PRICE.

lv_tag = 3.

lv_laune = 2.

lo_factory = cl_fdt_factory=>get_instance( '005056AD00091EE191FFD9F91772D0FB' ).

lo_function = lo_factory->get_function( iv_id = '005056AD00091EE1928053E1B8C65139' ).

lo_context = lo_function->get_process_context( ).

lo_context->set_value( iv_name = 'TAG' ia_value = lv_tag ). ---> the problem is here

lo_context->set_value( iv_name = 'LAUNE' ia_value = lv_laune ).

lo_function->process( EXPORTING io_context = lo_context

IMPORTING eo_result = lo_result ).

lo_result->get_value( IMPORTING ea_value = lv_erg ).

write lv_erg.

---> I get the following exception:

Kategorie ABAP Programmierfehler

Laufzeitfehler UNCAUGHT_EXCEPTION

Ausnahme CX_FDT_INPUT

ABAP Programm CL_FDT_CONTEXT_ABSTRACT=======CP

Anwendungskomponente BC-SRV-BR

Datum und Zeit 31.01.2012 08:53:52

Auslösestelle der Ausnahme

Programm CL_FDT_CONTEXT_ABSTRACT=======CP

Include CL_FDT_CONTEXT_ABSTRACT=======CM003

Zeile 36

Modultyp (METHOD)

Modulname GET_DOBJ_DATA

I don't understand it, because the varaibles and the brfplus objects are binded to the same data-elements and both input-variables are not initial. so what's the problem ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

simple solution: catch exception -.-

Thanks