Hello experts,
I am trying to updates sales order header and item extensions using BAPI-> BAPI_SALESORDER_CREATEFROMDAT2 and table: extensionin.
I have appended all required structures already for VBAK and VBAP: The fields in VBAK has 4 text, 2 drop downs and few check boxes. e.g.: ZZPRO_NAME length 60, ZZPRO_END length 60. ZZCOMDOC_SUB length 60 and checkboxes ZZCOO length 1 etc. and it’s corresponding X structure with char1 is also defined. And same in VBAP.
My code is like below:
gs_extensionin TYPE bapiparex,
it_extensionin LIKE bapiparex OCCURS 0 WITH HEADER LINE,
wa_bape_vbak TYPE bape_vbak,
wa_bape_vbakx TYPE bape_vbakx,
wa_bape_vbak-zzpro_name = zzpro_name.
wa_bape_vbak-zzpro_end = zzpro_end.
wa_bape_vbak-zzld_clause = zzld_clause.
wa_bape_vbakx-zzpro_name = 'X'.
wa_bape_vbakx-zzpro_end = 'X'.
wa_bape_vbakx-zzld_clause = 'X'.
gs_extensionin-structure = 'BAPE_VBAK'.
gs_extensionin-valuepart1 = wa_bape_vbak.
APPEND gs_extensionin TO it_extensionin.
gs_extensionin-structure = 'BAPE_VBAKX'.
gs_extensionin-valuepart1 = wa_bape_vbakx.
APPEND gs_extensionin TO it_extensionin.
Then it_extensionin is passed to BAPI. However, it’s only updating first two fields of extension and not all fields. The item level fields are not at all updating. I am writing them in a loop.
Is there any example which shows header and item level data update with multiple extension customized field?
I already saw other threads and also checked BAPI doc.
Any help appreciated,
Thanks,
Regards,
PD