2008 Jul 23 3:18 PM
Hi Gurus,
I am trying to update the custom field in accounting view, I am using BAPI_MATERIAL_SAVEDATA for this purpose. But apparantly, it is not working as desired. In last i am getting these value in returnmessages tab.
Trying to create: 00396 ____ ____ 0110 __________ ____ __ ___ ___
The material cannot be maintained since no maintainable data transferred
Trying to change: 00396 ____ ____ 0110 __________ ____ __ ___ ___
No changes made
Here is my code
ds_valuedata-VAL_AREA = t_final-bwkey.
ds_valuedata-VAL_TYPE = t_final-bwtar.
ds_valuedata-zzpromo = t_final-zzpromo. <<<<<<<< THIS FIELD I NEED TO UPDATE
ds_valuedatax-VAL_AREA = t_final-bwkey.
ds_valuedatax-VAL_TYPE = t_final-bwtar.
ds_valuedatax-zzpromo = 'X'.
ls_extensionin-structure = 'BAPI_TE_MBEW'.
ls_extensionin-valuepart1 = ds_valuedata.
APPEND ls_extensionin TO lt_extensionin.
ls_extensioninx-structure = 'BAPI_TE_MBEWX'.
ls_extensioninx-valuepart1 = ds_valuedatax.
APPEND ls_extensioninx TO lt_extensioninx.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = ds_headdata
IMPORTING
return = ds_bapiret2
TABLES
returnmessages = lt_returnmessages
extensionin = lt_extensionin
extensioninx = lt_extensioninx.
Please help me as i am badly stuck with this problem.
2008 Jul 23 3:21 PM