‎2008 Dec 10 1:04 PM
hi experts,
i need to update material master using BAPI BAPI_MATERIAL_SAVEDATA..i need to populate custom fields also.so i am using bapi extesnions. i have added my custom fields to MARA through append structure. but now i want to add my fields into bapi_te_mara. but it was asking access key.
how to add fields to bapi textension.
please give me some ideas
Thanks
Sai
‎2008 Dec 10 1:06 PM
‎2008 Dec 10 1:09 PM
‎2008 Dec 10 1:16 PM
Hi,
y can't use EXIT_SAPLMGMU_001.
For creating the custom fields add populating the custom fields.
Thanks,
‎2008 Dec 10 5:22 PM
you need to append structure in bapi_te_mara & bapi_te_marax .
field names should be same in all three structures.
also need to make entry in T130F table.
‎2008 Dec 11 3:01 AM
hi vivek,
can u please explain me what entry i need to maintain in table t130f.
Thanks
sai
‎2008 Dec 11 3:12 AM
hi,
use BAPI_MATERIAL_SAVEDATA in to modify , First of all I add new fields to structure BAPI_TE_MARA (append ZABAPI_TE_MARA) as char fields.
then addthese fields to structure BAPI_TE_MARA (append ZABAPI_TE_MARAX) as char(1). And activated both appends.
..
DATA: head_data LIKE bapimathead,
return LIKE bapiret2,
extensionin LIKE bapiparex OCCURS 0 WITH HEADER LINE,
extensioninx LIKE bapiparexx OCCURS 0 WITH HEADER LINE.
(....)
headdata-material = wa_p-matnr.
headdata-basic_view = 'X'.
extensionin-structure = 'BAPI_TE_MARA'.
extensionin-valuepart1+0(18) = wa_p-matnr. "field u want to add.
extensioninx-structure = 'BAPI_TE_MARAX'.
extensioninx-valuepart1+0(18) = wa_p-matnr.
extensioninx-valuepart1+29(1) = 'X'.
APPEND extensionin.
APPEND extensioninx.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
head_data = head_data
IMPORTING
return = return
TABLES
extensionin = extensionin
extensioninx = extensioninx.
are you using this function after calling BAPI use
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
return = return.
also check this link
thanks
‎2009 Oct 12 8:10 AM