‎2007 Dec 13 10:11 AM
Hello,
i want to use bapi_charact_change but i don't know how. i would like you to give me an example or some help. thank you.
‎2007 Dec 13 12:16 PM
<b>bapi_charact_change</b>
<b> Text</b>
BAPI for Characteristics - Change
<b>
Functionality</b>
This BAPI changes a characteristic, if the characteristic exists. If the characteristic does not exist, the BAPI creates the characteristic.
The following fields must contain data: o Charact_name (characteristic name) o Data_type (data type) o Length (number of characters) o Decimals (number of decimal places) o Status (status) in structure CharactDetail o Description (description) in structure CharactDescription o Either field Language_Int (internal language format, 1 character) or Language_ISO (external language format, 2 characters) ISO format overrides internal format. If there is more than one entry for the same language, the last is relevant.
o According to data type, the values must be entered in the relevantvalues table: numeric, time, and date values in CharactValuesNum, character and boolean values in CharactValuesChar, and currency values in CharactValuesCurr.
The value descriptions are in table CharactValuesDescr, regardless of data type. Check tables are entered in table CharactReferences and restrictions to class types are in table CharactRestrictions.
If the BAPI runs successfully, table RETURN contains no messages of type
'E'.
<u>Caution</u>
The BAPI transfers all information as new, replacing the old information completely. This means that a blank field means "delete entry", not "no change".
This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
<u> Parameters</u>
CHARACTNAME CHANGENUMBER KEYDATE CHARACTDETAILNEW CHARACTDESCRNEW CHARACTVALUESNUMNEW CHARACTVALUESCHARNEW CHARACTVALUESCURRNEW CHARACTVALUESDESCRNEW CHARACTREFERENCESNEW CHARACTRESTRICTIONSNEW RETURN
Exceptions Function Group CTBP
The imported tables contain info of a charact, which can
be changed or created. The BAPI checks which operation
is requested and executes this one.
First the old info is got wich includes an existence check.
If the charact isn't existing yet, a creation flag is set, other-
wise the charact is to be changed. In this case the old and new
tables are compared. New lines are added to the old table.
Changed lines are updated in the old table. Deleted lines are
deleted from the old table and writ to a seperate deletion table.
These tables have to be converted to the format of the maintainance
module. The converted deletion tables are appended to the old
tables with a deletion flag set. With this info the charact is
changed. In case of creation only the creation BAPI is called
with the obtained info.
Initialization
Initialize log.
Authority check
Get old data of charact (existence check included)
Set creation flag if charact doesn't exist
Prepare modification on charact
Update old by new tables in case of change
build tables containing records to be deleted
Execute requested modification on charact
Change charact
Get log messages for change/deletion
Put log messages to return table.
Can also check the link:
Regards,
Rajesh
<b>Please reward points if found useful.</b>
‎2007 Dec 13 12:16 PM
<b>bapi_charact_change</b>
<b> Text</b>
BAPI for Characteristics - Change
<b>
Functionality</b>
This BAPI changes a characteristic, if the characteristic exists. If the characteristic does not exist, the BAPI creates the characteristic.
The following fields must contain data: o Charact_name (characteristic name) o Data_type (data type) o Length (number of characters) o Decimals (number of decimal places) o Status (status) in structure CharactDetail o Description (description) in structure CharactDescription o Either field Language_Int (internal language format, 1 character) or Language_ISO (external language format, 2 characters) ISO format overrides internal format. If there is more than one entry for the same language, the last is relevant.
o According to data type, the values must be entered in the relevantvalues table: numeric, time, and date values in CharactValuesNum, character and boolean values in CharactValuesChar, and currency values in CharactValuesCurr.
The value descriptions are in table CharactValuesDescr, regardless of data type. Check tables are entered in table CharactReferences and restrictions to class types are in table CharactRestrictions.
If the BAPI runs successfully, table RETURN contains no messages of type
'E'.
<u>Caution</u>
The BAPI transfers all information as new, replacing the old information completely. This means that a blank field means "delete entry", not "no change".
This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
<u> Parameters</u>
CHARACTNAME CHANGENUMBER KEYDATE CHARACTDETAILNEW CHARACTDESCRNEW CHARACTVALUESNUMNEW CHARACTVALUESCHARNEW CHARACTVALUESCURRNEW CHARACTVALUESDESCRNEW CHARACTREFERENCESNEW CHARACTRESTRICTIONSNEW RETURN
Exceptions Function Group CTBP
The imported tables contain info of a charact, which can
be changed or created. The BAPI checks which operation
is requested and executes this one.
First the old info is got wich includes an existence check.
If the charact isn't existing yet, a creation flag is set, other-
wise the charact is to be changed. In this case the old and new
tables are compared. New lines are added to the old table.
Changed lines are updated in the old table. Deleted lines are
deleted from the old table and writ to a seperate deletion table.
These tables have to be converted to the format of the maintainance
module. The converted deletion tables are appended to the old
tables with a deletion flag set. With this info the charact is
changed. In case of creation only the creation BAPI is called
with the obtained info.
Initialization
Initialize log.
Authority check
Get old data of charact (existence check included)
Set creation flag if charact doesn't exist
Prepare modification on charact
Update old by new tables in case of change
build tables containing records to be deleted
Execute requested modification on charact
Change charact
Get log messages for change/deletion
Put log messages to return table.
Can also check the link:
Regards,
Rajesh
<b>Please reward points if found useful.</b>