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_MATERIAL_SAVEDATA

Former Member
0 Likes
629

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.

3 REPLIES 3
Read only

arseni_gallardo
Active Participant
0 Likes
575

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

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
575

Hello,

In addition to the changes made in the code need to maintain the fields in OMSR(t-code).

BR,

Suhas

Read only

madhu_vadlamani
Active Contributor
0 Likes
575

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.