‎2011 Sep 23 9:07 AM
Hi,
I have used BAPI_MATERIAL_SAVEDATA to update ZZ-fields it was succesfull when adding one ZZ-field, I mean by accessing first ZZ-field in the structure.
However if there are multiple ZZ-fields, what are the changes in ??
The code is: ZZVRCR length 10 CHAR & ZZANSWER length 3 CHAR
ls_headdata-basic_view = 'X'.
ls_headdata-MATL_TYPE = LS_MARA-MTART.
ls_bapi_te_mara-material = ls_headdata-material.
ls_bapi_te_mara-ZZVRCR = '1234567890'.
ls_bapi_te_mara-ZZANSWER = 'ZKD'.
ls_bapi_te_marax-material = ls_headdata-material.
ls_bapi_te_marax-ZZVRCR = 'X'.
ls_bapi_te_marax-ZZANSWER = 'X'.
ls_extensionin-structure = 'BAPI_TE_MARA'.
ls_extensionin-valuepart1+0(18) = ls_bapi_te_mara-material.
ls_extensionin-valuepart1+18(10) = ls_bapi_te_mara.
ls_extensionin-valuepart1+28(3) = ls_bapi_te_mara-ZZANSWER.
APPEND ls_extensionin TO lt_extensionin.
ls_extensioninx-structure = 'BAPI_TE_MARAX'.
ls_extensioninx-valuepart1+0(18) = ls_bapi_te_mara-material.
ls_extensioninx-valuepart1+18(10) = ls_bapi_te_marax-ZZVRCR.
ls_extensioninx-valuepart1+28(3) = ls_bapi_te_marax-ZZANSWER.
APPEND ls_extensioninx TO lt_extensioninx.
‎2011 Sep 23 11:05 AM
Hi,
I think you have a problem with structure BAPI_TE_MARAX. All the ZZ fields you have appended to that structure should use data element BAPIUPDATE (length 1). Please correct that and then correct the piece of code where you fill LT_EXTENSION and LT_EXTENSIONX:
ls_extensionin-structure = 'BAPI_TE_MARA'.
ls_extensionin-valuepart1 = ls_bapi_te_mara.
APPEND ls_extensionin TO lt_extensionin.
ls_extensioninx-structure = 'BAPI_TE_MARAX'.
ls_extensioninx-valuepart1 = ls_bapi_te_marax.
APPEND ls_extensioninx TO lt_extensioninx.
Edited by: Arseni Gallardo on Sep 23, 2011 12:05 PM
‎2011 Sep 23 11:17 AM
Hello,
In addition to the changes made in the code need to maintain the fields in OMSR(t-code).
BR,
Suhas
‎2011 Sep 23 11:40 AM
Hi Kevin,
There is a need of small customization.SPRO, Logistics General,Material Master-,Field Selection-,Assign Fields
1) Click on NEW 2) ( MARA-fields) fill the field Maint.status with ' '.Here you have the field and select the group with group number.Check and post if there is any issue.
Regards,
Madhu.