2007 Sep 04 2:39 PM
hi all,
What are the parameters that i have to pass to this BAPI in order to change a material or serial number.
thanks
nayan
2007 Sep 04 2:42 PM
Hi,
FORM update_database.
DATA: tab_equi_error type table OF zzpm_bestell with header LINE,
wa TYPE zzpm_bestell,
lv_BAPI_ITOB type BAPI_ITOB,
lv_BAPI_ITOB_EQ_ONLY type BAPI_ITOB_EQ_ONLY,
lv_BAPI_ITOBX type BAPI_ITOBX,
lv_BAPI_ITOB_EQ_ONLYX type BAPI_ITOB_EQ_ONLYX,
lv_return like bapiret2,
eq type equnr.
PERFORM auswahl_zu_it.
* Update
* LOOP RK INTO tab_equi_choosen wa.
Free: lv_return,
lv_BAPI_ITOB,
lv_BAPI_ITOB_EQ_ONLY,
system-subrc.
SELECT SINGLE EQUI~EQUNR
INTO wa-equnr
FROM EQUI
WHERE EQUNR eq 000000000000010006. wa-equnr.
if system-subrc ne 0.
* If not 0 then the Equip is missing
BREAK POINT.
endif.
lv_BAPI_ITOB-manserno = 12345678. wa-serge. 131001/2006
lv_BAPI_ITOBX-manserno = X.
BREAK POINT.
CALL FUNCTION BAPI_EQUI_CHANGE
EXPORTING
equipment = wa-equnr
data_general = lv_BAPI_ITOB
data_generalx = lv_BAPI_ITOBX
data_specific = lv_BAPI_ITOB_EQ_ONLY
data_specificx = lv_BAPI_ITOB_EQ_ONLYX
VALID_DATE = SYSTEM DATE
VALID_TIME = SYSTEM-UZEIT
IMPORTING
* DATA_GENERAL_EXP = lv_BAPI_ITOB
* DATA_SPECIFIC_EXP = lv_BAPI_ITOB_EQ_ONLY
RETURN = lv_return
.
if lv_return-type = E.
write: /wa-equnr, lv_return-type, lv_return-message, lv_return-field.
endif.
BREAK POINT.
* FINAL LOOP.
END FORM. update_database
Regards
Sudheer
2007 Sep 04 2:42 PM
Hi,
FORM update_database.
DATA: tab_equi_error type table OF zzpm_bestell with header LINE,
wa TYPE zzpm_bestell,
lv_BAPI_ITOB type BAPI_ITOB,
lv_BAPI_ITOB_EQ_ONLY type BAPI_ITOB_EQ_ONLY,
lv_BAPI_ITOBX type BAPI_ITOBX,
lv_BAPI_ITOB_EQ_ONLYX type BAPI_ITOB_EQ_ONLYX,
lv_return like bapiret2,
eq type equnr.
PERFORM auswahl_zu_it.
* Update
* LOOP RK INTO tab_equi_choosen wa.
Free: lv_return,
lv_BAPI_ITOB,
lv_BAPI_ITOB_EQ_ONLY,
system-subrc.
SELECT SINGLE EQUI~EQUNR
INTO wa-equnr
FROM EQUI
WHERE EQUNR eq 000000000000010006. wa-equnr.
if system-subrc ne 0.
* If not 0 then the Equip is missing
BREAK POINT.
endif.
lv_BAPI_ITOB-manserno = 12345678. wa-serge. 131001/2006
lv_BAPI_ITOBX-manserno = X.
BREAK POINT.
CALL FUNCTION BAPI_EQUI_CHANGE
EXPORTING
equipment = wa-equnr
data_general = lv_BAPI_ITOB
data_generalx = lv_BAPI_ITOBX
data_specific = lv_BAPI_ITOB_EQ_ONLY
data_specificx = lv_BAPI_ITOB_EQ_ONLYX
VALID_DATE = SYSTEM DATE
VALID_TIME = SYSTEM-UZEIT
IMPORTING
* DATA_GENERAL_EXP = lv_BAPI_ITOB
* DATA_SPECIFIC_EXP = lv_BAPI_ITOB_EQ_ONLY
RETURN = lv_return
.
if lv_return-type = E.
write: /wa-equnr, lv_return-type, lv_return-message, lv_return-field.
endif.
BREAK POINT.
* FINAL LOOP.
END FORM. update_database
Regards
Sudheer
2007 Sep 04 3:26 PM
See the function documentation, get back if you have specific questions
FU BAPI_EQUI_CHANGE
____________________________________________________
Text
PM BAPI: Change Equipment
Functionality
This module is used for changing an existing piece of equipment.
Notes
General notes in BAPIs for processing individual technical objects:
A BAPI for creating or changing master data receives these notes using the parameter DATA_GENERAL (structure: BAPI_ITOB). Object-specific data is processed using the parameter DATA_SPECIFIC:
Functional locations: DATA_SPECIFIC (structure: BAPI_ITOB_FL_ONLY)
Equipment: DATA_SPECIFIC (structure: BAPI_ITOB_EQ_ONLY)
Each BAPI returns the processed data to the caller in the parameter DATA_GENERAL_EXP (structure: BAPI_ITOB) independently of the activity to be performed (Create/Change/Read). Object-specific data is returned to the caller using the parameter DATA_SPECIFIC_EXP:
Functional locations: DATA_SPECIFIC_EXP (structure: BAPI_ITOB_FL_ONLY)
Equipment: DATA_SPECIFIC_EXP (structure: BAPI_ITOB_EQ_ONLY)
The system returns any error messages in the parameter RETURN.
In Customizing (field selection) for master data dialogs, entries defined as mandatory are generally not checked by the BAPIs.
Special notes on the module BAPI_EQUI_CHANGE:
If the changed piece of equipment has sub-equipment, the module supports the standard transfer of inheritance-relevant data.
Parameters
EQUIPMENT
DATA_GENERAL
DATA_GENERALX
DATA_SPECIFIC
DATA_SPECIFICX
VALID_DATE
VALID_TIME
DATA_GENERAL_EXP
DATA_SPECIFIC_EXP
RETURN
Exceptions
Function Group
ITOB_BAPI_EQ
2007 Sep 04 3:33 PM
Hi nayan,
BAPI_MATERIAL_SAVEDATA - Create and Change Material Master Data
BAPI_MATERIAL_MAINTAINDATA_RT - Create and Change Material Master Data (Retail
Regards,
Kumar.