REPORT zre_cont_cust_update.
parameters: p_CCODE LIKE BAPI_RE_CONTRACT_KEY-COMP_CODE,
p_CNO LIKE BAPI_RE_CONTRACT_KEY-CONTRACT_NUMBER.
DATA: lt_extension_in TYPE TABLE OF bapiparex,
ls_extension_in TYPE bapiparex,
ls_ci_data TYPE RECN_CONTRACT_CI.
* Fill Values For User Fields
ls_ci_data-ZZOFFST = '1001'.
ls_ci_data-ZZCNACTVT = '1001'.
*ls_ci_data-ZZCNACTST = ''.
ls_ci_data-ZZCNLEASST = '1001'.
ls_ci_data-ZZCLASS = 'ADV'.
* Prepare BAPI-Parameter
ls_extension_in-structure = 'CI_DATA'.
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = ls_ci_data
IMPORTING
ex_container = ls_extension_in-valuepart1
EXCEPTIONS
illegal_parameter_type = 1
others = 2.
APPEND ls_extension_in TO lt_extension_in.
data: " EXTENSION_IN type table of BAPIPAREX,
RETURN type table of BAPIRET2.
CALL FUNCTION 'BAPI_RE_CN_CHANGE'
EXPORTING
compcode = p_CCODE
contractnumber = p_CNO
* CONTRACT =
tables
EXTENSION_IN = lt_extension_in
return = RETURN
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
No comments:
Post a Comment