Application Development 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: 

BAPI to Update the Characteristic values of Network components of WBS element in CJ20N

hemanth_kumar46
Explorer
0 Kudos

network in CJ20N

Hi Experts,

I am creating WBS BOM (CS71) using CSAI_BOM_CREATE Function Module , once BOM created i am trasferring the WBS BOM to project Network using CN33, upto this everything is working smooth after transffered WBS BOM , i need update the characteristic values of material components under project network in CJ20N , for this i used BAPI_OBJCL_CHANGE followed by BAPI_TRANSACTION_COMMIT to update the characteristic values by passing RESB-CUOBJ. BAPI is showing Assignment saved , but the values are not reflecting in characteristic.

Please suggest BAPI or FM .

Quick reply is highly appreciated

Thanks,

Hemanth

2 REPLIES 2

FredericGirod
Active Contributor
0 Kudos

First, please post the part of your code using the [CODE] layout button

Did you try to use the ST05 to check what data you have updated & Compare with the user transaction to check what data need to be updated ?

0 Kudos
ALLOCVALUESCHARNEW-CHARACT = CHARACT.
ALLOCVALUESCHARNEW-VALUE_CHAR = VALUE.
APPEND ALLOCVALUESCHARNEW TO IT_ALLOCVALUESCHARNEW.

CALL FUNCTION 'BAPI_OBJCL_CHANGE'
  EXPORTING
    OBJECTKEY          = OBJECTKEY
    OBJECTTABLE        = 'RESB'
    CLASSNUM           = 'ZTEST'
    CLASSTYPE          = '300'
*   STATUS             = '1'
*   STANDARDCLASS      =
*   CHANGENUMBER       =
    KEYDATE            = SY-DATUM
*   NO_DEFAULT_VALUES  = ' '
*   KEEP_SAME_DEFAULTS = ' '
*   OBJECTKEY_LONG     =
  IMPORTING
    CLASSIF_STATUS     = CLASSIF_STATUS
  TABLES
    ALLOCVALUESNUMNEW  = IT_ALLOCVALUESNUMNEW
    ALLOCVALUESCHARNEW = IT_ALLOCVALUESCHARNEW
    ALLOCVALUESCURRNEW = IT_ALLOCVALUESCURRNEW
    RETURN             = IT_RETURN.

READ TABLE IT_RETURN INTO RETURN WITH KEY TYPE = 'S'.
IF SY-SUBRC = 0.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.