Você está na página 1de 2

*----------------------------------------------------------------------*

* INCLUDE ZXM02U05
*
*----------------------------------------------------------------------*
*"---------------------------------------------------------------------*"*"Lokale Schnittstelle:
*" IMPORTING
*"
REFERENCE(IM_REQ_ITEM) TYPE REF TO IF_PURCHASE_REQUISITION_ITEM
*"
REFERENCE(IM_DATA_NEW) TYPE MEREQ_ITEM
*"
REFERENCE(IM_DATA_OLD) TYPE MEREQ_ITEM
*"
REFERENCE(IM_DATA_PERSISTENT) TYPE MEREQ_ITEM
*"
REFERENCE(IM_FULL_CHECK) TYPE SY-CALLD
*"
REFERENCE(IM_ITEM_HAS_ERRORS) TYPE SY-CALLD
*" EXPORTING
*"
REFERENCE(EX_MESSAGES) TYPE MEREQ_T_BAPIRET2
*"
REFERENCE(EX_RECHECK_ITEM) TYPE SY-CALLD
*"---------------------------------------------------------------------DATA
DATA
DATA
DATA

v_kostl
i_ebkn_new
i_eban
e_eban

LIKE
LIKE
LIKE
LIKE

ceban-kostl.
ebkn.
eban.
eban.

GET PARAMETER ID 'KOSTL' FIELD v_kostl.


CLEAR i_ebkn_new.
i_ebkn_new-kostl = v_kostl.
IF im_data_new-knttp EQ space.
MOVE-CORRESPONDING im_data_new TO i_eban.
CALL FUNCTION 'ME_REL_STRATEGIE_EBAN'
EXPORTING
i_eban_new = i_eban
i_ebkn_new = i_ebkn_new
i_xclass = 'X'
IMPORTING
e_eban
= e_eban.
IF e_eban-frggr = ' ' OR e_eban-frgst = ' ' OR e_eban-frgkz = ' '.
MESSAGE e011(pc) WITH
'O item no se enquadrou em nenhuma estratgia !'.
ENDIF.
ELSE.
IF i_ebkn_new-kostl NE SPACE and im_data_new-preis NE 0.
MOVE-CORRESPONDING im_data_new TO i_eban.
CALL FUNCTION 'ME_REL_STRATEGIE_EBAN'
EXPORTING
i_eban_new = i_eban
i_ebkn_new = i_ebkn_new
i_xclass = 'X'
IMPORTING
e_eban
= e_eban.
IF e_eban-frggr = ' ' OR e_eban-frgst = ' ' OR e_eban-frgkz = ' '.
MESSAGE e011(pc) WITH

'O item no se enquadrou em nenhuma estratgia !'.


ENDIF.
ENDIF.
ENDIF.