Skip to Content
0
Former Member
Dec 29, 2008 at 10:48 AM

problem with BAPI_CHARACT_CREATE for uploading Unit of Measure Value

142 Views

Hi,

I am unable to upload 'Unit of Measure' Value using BAPI_CHARACT_CREATE for TCode CT04.

DATA : CHARACTDETAIL LIKE BAPICHARACTDETAIL.

DATA: BEGIN OF ITAB OCCURS 0,

CHARACT_NAME LIKE CHARACTDETAIL-CHARACT_NAME,

DESCRIPTION LIKE CHARACTDESCR-DESCRIPTION,

CHARACT_GROUP LIKE BAPICHARACTDETAIL-CHARACT_GROUP,

STATUS LIKE CHARACTDETAIL-STATUS,

DATA_TYPE LIKE CHARACTDETAIL-DATA_TYPE,

UOM LIKE CHARACTDETAIL-UNIT_OF_MEASUREMENT,

VALUE_ASSIGNMENT LIKE CHARACTDETAIL-VALUE_ASSIGNMENT,

LENGTH LIKE CHARACTDETAIL-LENGTH,

DECIMALS LIKE CHARACTDETAIL-DECIMALS,

CLASS_TYPE LIKE BAPICHARACTRESTRICTIONS-CLASS_TYPE,

END OF ITAB.

LOOP AT ITAB.

CHARACTDETAIL-CHARACT_NAME = ITAB-CHARACT_NAME.

CHARACTDETAIL-DATA_TYPE = ITAB-DATA_TYPE. "'CHAR'.

CHARACTDETAIL-LENGTH = ITAB-LENGTH. "10.

CHARACTDETAIL-STATUS = ITAB-STATUS.

CHARACTDETAIL-UNIT_OF_MEASUREMENT = ITAB-UOM.

CHARACTDETAIL-UNIT_OF_MEASUREMENT_ISO = ITAB-UOM.

CHARACTDETAIL-VALUE_ASSIGNMENT = ITAB-VALUE_ASSIGNMENT.

ENDLOOP.

CALL FUNCTION 'BAPI_CHARACT_CREATE'

EXPORTING

CHARACTDETAIL = CHARACTDETAIL

CHANGENUMBER = CHANGENUMBER

  • KEYDATE = SY-DATUM

TABLES

CHARACTDESCR = CHARACTDESCR

  • CHARACTVALUESNUM =

CHARACTVALUESCHAR = CHARACTVALUESCHAR

CHARACTRESTRICTIONS = CHARACTRESTRICTIONS

RETURN = RETURN .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

When i check in CT04 Tcode its taking all the values except 'Unit of Measure'. To which variable i have to pass to pick the value? Please help in resolving this issue?

Thanks

K Srinivas