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_SHIPMENT_CHANGE - change addditonal custom fields

NataliaGlants
Explorer
0 Likes
2,310

Hello BAPI Guru's,

I use the BAPI_SHIPMENT_CHANGE to change some fields in Shipment header.

All normal requirements are working good.

We have extended table VTTK with couple of Z-fields and We want to update this fields also.

By default this BAPI will not update these new custom fields as they are not existing in the BAPI interface (structure BAPISHIPMENTHEADER).

Thanks a lot !

Regards,

Natalia.

1 REPLY 1
Read only

mvoros
Active Contributor
0 Likes
1,083

Hi,

it does not look good. Usually, BAPIs have table with name EXTENSION which can be used to pass values to custom fields ([example|http://help.sap.com/saphelp_nw04/helpdata/en/6b/3f6d2b6d0711d396a50004ac96334b/frameset.htm]). This BAPI does not have it. BTW it hasn't been released officially.

So it looks like only option is to enhance/modify SAP code. It should be possible to use enhancement framework for this. You could enhance BAPI structures or just create a new optional parameter where you will pass all your extra fields and then use suitable enhancement points to populate internal structures. It might work. BAPI_SHIPMENT_CHANGE calls SD_SHIPMENT_PROCESS_EXT_CHANGE. So maybe you can write your own wrapper instead of BAPI_SHIPMENT_CHANGE and enhance SD_SHIPMENT_PROCESS_EXT_CHANGE only. Here I would check routine set_header_change_data. You can easily test it. Just put a break point here, modify your custom fields (variable cs_header-data) and see if they will change after processing BAPI.

Cheers