11-28-2013 8:00 AM
Hi,
There are some customised fields in the table VTTS.
I need to modify some fields data of the table VTTS ( standard fields + customised fields).
Please suggest some BAPI which can modify the fields.
11-28-2013 8:11 AM
Hi Shweta,
This is the requirement for updating shipment stages. Here we generally use BAPI_SHIPMENT_CHANGE, but as your requirement is to update custom field this is not suitable.
For custom fields update, we have to have EXTENSIONIN and EXTENSIONINX structure or the updation of custom fields.
On debugging BAPI_SHIPMENT_CHANGE I got that it is calling SD_SHIPMENT_PROCESS_EXT_CHANG. So may be you have to create your ZBAPI and enhance this FM. Modify the fields here and it should work.
Hope it helps...
Regards,
Sumit
11-28-2013 8:18 AM
Hi Sumit,
Thanks..for the reply.
Do I need to add my customised fields in this FM SD_SHIPMENT_PROCESS_EXT_CHANG? Can u please advice how to proceed on this?
11-28-2013 8:28 AM
Instead of enhancing function modules I would say change the standard fields with the regular BAPI and if successful just update the custom fields directly in the table.
That's what I would do... even if probably not the most elegant approach.
Regards,
Bruno
11-28-2013 8:37 AM
11-28-2013 8:38 AM
Where would you pass the custom fields on that one Nabheet?
Regards,
Bruno
EDIT: Oops, just saw it
That way you can just as easily use function module SD_SHIPMENT_CREATE to create a shipment I believe!
11-28-2013 8:42 AM
Hi, I tried
RV_SHIPMENT_UPDATE . There are many tables which are mandotory to pass while using this.
I have data for VTTK and VTTS only in my internal tables
11-28-2013 8:45 AM
Hi Bruno, I need to just update the shipment stages data and my customised fields are not available here.
11-28-2013 8:46 AM
Hi Bruno
I normally prefer to use release function module. But many a times we are struck and dont have any other option so that time we are forced to use these not released FM..
I guess rather than updating custom fields directly it is still a better way. what do you think?
Nabheet
11-28-2013 10:07 AM
Hi Shweta,
Have you tried using FM RV_SHIPMENT_READ before hand to get the mandatory information for the update FM?
Regards,
Bruno
11-28-2013 10:13 AM
Hi Nabheet,
I think that is a good and fair question with no definitive answer (in my humble opinion).
When it comes to custom fields (and custom fields only) I would be too afraid to change them through direct updates... and it might be even preferable doing the update directly than using a non-released function module.
For SAP standard tables/fields I would be very VERY careful (or not do it at all) to use direct update or non-released function modules.
Regards,
Bruno
11-28-2013 8:41 AM
Yes Shweta,
There is a subroutine "SET_HEADER_CHANGE_DATA", where you can put the break-point.
see what all values you get here. I am sure you can modify your custom fields here.
Thanks,
Sumit
11-28-2013 10:59 AM
Hi,
When updating standard fields for stages using BAPI_SHIPMENT_CHANGE, the header is getting updated but the stages are not getting updated.
I am using the below code..Pls advice
stagebapi-service_agent = stages-tdlnr.
stagebapi-special_process_id = stages-sdabw.
stagechg-service_agent = 'C'.
stagechg-special_process_id = 'C'.
APPEND stagebapi TO stagebapi.
APPEND stagechg TO stagechg.
CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
EXPORTING
headerdata = headerbapi
headerdataaction = change
TABLES
stagedata = stagebapi
stagedataaction = stagechg
return = return.
11-28-2013 12:08 PM
Populate ITEMONSTAGE and ITEMONSTAGEACTION.
It will update.
Thanks,
Sumit
11-29-2013 10:35 AM
Hi Sumit,
I tried populating ITEMONSTAGE and ITEMONSTAGEACTION.
Do we need to pass delivery number also in this. if yes then what to pass in action table for delivery.
If we leave it blank then it gives error.
If you have tried this out, Can u pls provide the code for this with what needs to be passed to tables.