Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8578

BAPI_IE4N_INSTALL problem

$
0
0

Hi Experts,

 

I need help with my customized program.

I'm using 'BAPI_IE4N_INSTALL' and I'm having these return error:

     KI:222     Cost center 1000/131746 does not exist on 08/11/2014.

     IEN153     I:IEN:153 1000 131746 08/11/2014

 

I have tried to use same data using IE4N and when I checked it the ffg error does not show.

 

Below is my code for the bapi.

 

DATA: gt_data_goodsmvt LIKE bapi_ie4n_goods_movement OCCURS 0 WITH HEADER LINE,

       gt_itob_install LIKE bapi_itob_eq_install_ext OCCURS 0 WITH HEADER LINE,

       gt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.


DATA: gv_matnr LIKE equi-matnr,

       gv_iloan LIKE iloa-iloan.

 

SELECT SINGLE matnr

   INTO gv_matnr

   FROM equi

   WHERE equnr EQ p_tire.

 

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

      EXPORTING

        INPUT = p_tire

      IMPORTING

        OUTPUT = p_tire.

 

gt_data_goodsmvt-move_type = 'ZAC'.

gt_data_goodsmvt-pstng_date = sy-datum.

gt_data_goodsmvt-doc_date = sy-datum.

gt_data_goodsmvt-costcenter = p_loc.

gt_data_goodsmvt-header_txt = p_head.

gt_data_goodsmvt-ref_doc_no = p_matdoc.

 

SELECT SINGLE b_werk

   INTO gt_data_goodsmvt-plant

   FROM eqbs

   WHERE equnr EQ p_tire.

 

SELECT SINGLE b_lager

   INTO gt_data_goodsmvt-stge_loc

   FROM eqbs

   WHERE equnr EQ p_tire.

 

 

APPEND gt_data_goodsmvt. "CLEAR gt_data_goodsmvt.

 

 

CLEAR gv_iloan.

SELECT SINGLE iloan

   INTO gv_iloan

   FROM equz

   WHERE equnr EQ p_sup.

   IF sy-subrc EQ 0.

     SELECT SINGLE tplnr

       INTO gt_itob_install-funcloc

       FROM iloa

       WHERE iloan EQ gv_iloan.

   ENDIF.

 

gt_itob_install-supequi = p_sup.

gt_itob_install-inst_date = sy-datum.

gt_itob_install-inst_time = sy-timlo.

APPEND gt_itob_install. "CLEAR gt_itob_install.

 

   CALL FUNCTION 'BAPI_IE4N_INSTALL' "Equipment Installation with Goods Movement, Notification, and CCM

   EXPORTING

    i_equipment = p_tire              " bapi_itob_parms-equipment  Equipment Number

    i_material = gv_matnr               " bapi_itob_eq_only-material  Material Number

    i_serialnumber = p_tire           " bapi_itob_eq_only-serialno  Serial Number

*   i_forced_install = SPACE    " bapiflag-bapiflag  Forced Installation

     is_data_install = gt_itob_install        " bapi_itob_eq_install_ext  Installation Data

    is_data_goods_movement = gt_data_goodsmvt   " bapi_ie4n_goods_movement  BAPI for IE4N: Goods Movement Data

*   is_data_notification =      " bapi_ie4n_notification  Notification Data for Equipment Installation/Dismantling with Goods Movement

*   i_simulation =              " bapiflag-bapiflag  Simulation Mode

*   i_no_material_movement =    " bapiflag-bapiflag  CCM: Material Movement (`X': No Mvmt, ' ': with Mvmt)

*   i_no_mpl_local_check =      " bapiflag-bapiflag  MPL Flag: '  ' - Execute MPL Check; 'X' - No Check

*   i_material_evg =            " bapimgvmatnr  BAPI Structure for Transfer of External Material No, Ver.,

   TABLES

*   it_longtext =               " bapi2080_notfulltxti  Notification Long Text

*   extension_in =              " bapiparex     Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT

     return = gt_return                   " bapiret2      Return Parameter(s)

     "  BAPI_IE4N_INSTALL


Viewing all articles
Browse latest Browse all 8578

Trending Articles



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