Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_OBJCL_CHANGE

Former Member
0 Likes
841

Hi,

I am facing a big problem while using BAPI_OBJCL_CHANGE for updation og characteristic VALUE for time.

According to function module documentation Numeric, time, and date characteristics are transferred to table AllocValuesNumNew in the BAPI.

But if I want to say update the value to 11:30:00 where do I pass this field to AllocValuesNumNew because there is no specific field for time in that structure.

The two fields we can use for updation of time fild in the structure are:

1) Value_From

2) Value_to

My code is given as below:

REPORT ZTPROBLEM.

Data: T_ALLOCVALUESCHARNEW type standard table of

BAPI1003_ALLOC_VALUES_CHAR,

TE_ALLOCVALUESCHARNEW type

BAPI1003_ALLOC_VALUES_CHAR,

T_ALLOCVALUESNUMNEW type standard table of

BAPI1003_ALLOC_VALUES_NUM,

TE_ALLOCVALUESNUMNEW type BAPI1003_ALLOC_VALUES_NUM,

T_ALLOCVALUESCURRNEW type standard table of

BAPI1003_ALLOC_VALUES_CURR,

T_RETURN type standard table of BAPIRET2,

TE_RETURN type BAPIRET2.

  • CHARACT is a component of BAPI1003_ALLOC_VALUES_CHAR

  • Structure.

TE_ALLOCVALUESNUMNEW-charact = 'Z_SLED_AREA1'.

append TE_ALLOCVALUESNUMNEW to T_ALLOCVALUESNUMNEW.

  • Value_Char is a component of

  • BAPI1003_ALLOC_VALUES_CHAR Structure.

TE_ALLOCVALUESNUMNEW-VALUE_FROM = '1.130000000000000E+05'.

append TE_ALLOCVALUESNUMNEW to T_ALLOCVALUESNUMNEW.

TE_ALLOCVALUESNUMNEW-VALUE_TO = '1.230000000000000E+05'.

append TE_ALLOCVALUESNUMNEW to T_ALLOCVALUESNUMNEW.

CALL FUNCTION 'BAPI_OBJCL_CHANGE'

EXPORTING

OBJECTKEY = '00000000000000079720100000000147'

OBJECTTABLE = 'MCHA'

CLASSNUM = 'Z_SLED_DEMO'

CLASSTYPE = '022'

  • STATUS = '1'

  • STANDARDCLASS =

  • CHANGENUMBER =

  • KEYDATE = SY-DATUM

  • NO_DEFAULT_VALUES = ' '

  • IMPORTING

  • CLASSIF_STATUS =

TABLES

ALLOCVALUESNUMNEW = T_ALLOCVALUESNUMNEW

ALLOCVALUESCHARNEW = T_ALLOCVALUESCHARNEW

ALLOCVALUESCURRNEW = T_ALLOCVALUESCURRNEW

RETURN = T_RETURN.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

.

Please tell me how do I append the time values in the internal table ?

1 REPLY 1
Read only

krzysztof_konitz4
Contributor
0 Likes
509

Hi,

Try to use FM BAPI_OBJCL_GETDETAIL to read characteristics for one of your existing objects which contain characteristic with date type.

You will see in which table and in which format this value will be stored.

Krzys