Quantcast
Channel: SCN : Popular Discussions - SAP Business Rules Management
Viewing all articles
Browse latest Browse all 1717

MOVE_CAST_ERROR when BRFplus application is called in ABAP program

$
0
0

Hi,

When I called my brfplus application in to an abap program Iam getting MOVE_CAST_ERROR dump in the line highlighted, please help

 

REPORT  Z_TESTING_BRF.

   DATA: LO_ADMIN_DATA TYPEREFTO IF_FDT_ADMIN_DATA,
         LO_FUNCTION TYPEREFTO IF_FDT_FUNCTION,
         LO_CONTEXT TYPEREFTO IF_FDT_CONTEXT,
         LO_RESULT TYPEREFTO IF_FDT_RESULT,
         LX_FDT TYPEREFTO CX_FDT,
         lv_discount type if_fdt_types=>element_number.

CL_FDT_FACTORY=>GET_INSTANCE_GENERIC( EXPORTING IV_ID = '001E0BD7385C1EE2899E40EC332EC2C4'
   IMPORTING EO_INSTANCE = LO_ADMIN_DATA ).

BREAK-POINT.
LO_FUNCTION ?= LO_ADMIN_DATA.
LO_CONTEXT ?= LO_FUNCTION->GET_PROCESS_CONTEXT( ).
LO_CONTEXT->SET_VALUE( IV_NAME = 'CUSTOMER' IA_VALUE = 'guru' ).
LO_CONTEXT->SET_VALUE( IV_NAME = 'S_DATE' IA_VALUE = 'guru' ).
LO_CONTEXT->SET_VALUE( IV_NAME = 'S_CARR_ID' IA_VALUE = 'guru' ).
LO_CONTEXT->SET_VALUE( IV_NAME = 'S_FROM_CIT' IA_VALUE = 'guru' ).
LO_CONTEXT->SET_VALUE( IV_NAME = 'S_TO_CITY' IA_VALUE = 'guru' ).
TRY.
     LO_FUNCTION->PROCESS( EXPORTING IO_CONTEXT = LO_CONTEXT IMPORTING EO_RESULT = LO_RESULT ).
     LO_RESULT->GET_VALUE( IMPORTING EA_VALUE = lv_discount ).
*     WRITE: 'The price of', PRODUCT, 'is', (6) PRICE-NUMBER DECIMALS 2, PRICE-CURRENCY NO-GAP, '.'.
   CATCH CX_FDT INTO LX_FDT.

     endtry.

 

 

 

 

dump is below

 

Category           ABAP Programming Error
Runtime Errors     MOVE_CAST_ERROR
Except.            CX_SY_MOVE_CAST_ERROR
ABAP Program       Z_TESTING_BRF

Application Component  Not Assigned

Date and Time      02.11.2012 21:16:24

 

 

 

Short text

Dynamic type conflict when assigning references

Error analysis

    An exception occurred that is explained in detail below.

    The exception, which is assigned to class 'CX_SY_MOVE_CAST_ERROR', was not

     caught and

    therefore caused a runtime error.

    The reason for the exception is:

    It was tried to assign a reference to a rereference variable using the

    'CAST' operation ('?=' or 'MOVE ?TO').

    However, the current content of the source variable does not fit into

    the target variable.

 

    source type: "\CLASS=CL_FDT_APPLICATION"

    target type: "\INTERFACE=IF_FDT_FUNCTION"


Viewing all articles
Browse latest Browse all 1717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>