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

Function module for updating the values in table VTTK

Former Member
0 Likes
6,033

Hi,

I am working on a report in which I need to update the value of field tdlnr of table vttk for a particular shipment number. I need to do this using functional module and I am not been able to find one. If anyone knows answer to this plz help.

Thanks in advance,

Priyanka.

1 ACCEPTED SOLUTION
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
3,137

Try using BAPI_SHIPMENT_CHANGE.

It seems that you'll need to populate the field HEADERDATA-SERVICE_AGENT_ID (structure BAPISHIPMENTHEADER) with the value that has to be assigned to the VTTK-TDLNR field and the field HEADERDATAACTION-SERVICE_AGENT_ID = 'C' (for Change). Naturally, the field SHIPMENT_NUM should have the shipment number (VTTK-TKNUM) in both structures.

Good luck!

Hi,

I am working on a report in which I need to update the value of field tdlnr of table vttk for a particular shipment number. I need to do this using functional module and I am not been able to find one. If anyone knows answer to this plz help.

Thanks in advance,

Priyanka.

7 REPLIES 7
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
3,138

Try using BAPI_SHIPMENT_CHANGE.

It seems that you'll need to populate the field HEADERDATA-SERVICE_AGENT_ID (structure BAPISHIPMENTHEADER) with the value that has to be assigned to the VTTK-TDLNR field and the field HEADERDATAACTION-SERVICE_AGENT_ID = 'C' (for Change). Naturally, the field SHIPMENT_NUM should have the shipment number (VTTK-TKNUM) in both structures.

Good luck!

Read only

0 Likes
3,137

Hi Jelena,

Thanks for your reply.

I did what you had suggested me to do but I don't know what to enter for return in function module BAPI_SHIPMENT_CHANGE.

Waiting for your reply.

Regards,

Priyanka.

Read only

0 Likes
3,137

U should not give any input to return parameter.

Return parameter will return message whether ur values have been updated or not.

Its used to track the message.

Read only

0 Likes
3,137

As noted above, RETURN table must be supplied empty, it is for BAPI to return the messages back to the calling program. You simply need to define an internal table, pass it to BAPI as is and then analyze this table after the BAPI call. For example:

DATA: BEGIN OF it_return OCCURS 0.
        INCLUDE STRUCTURE bapiret2.
DATA: END OF it_return.

CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
<...>
  TABLES
<...>
    return = it_return.

LOOP AT it_return.
  MESSAGE
       ID      it_return-id
       TYPE    it_return-type
       NUMBER  it_return-number
   WITH
               it_return-message_v1
               it_return-message_v2
               it_return-message_v3
               it_return-message_v4.
ENDLOOP.

Hope this helps.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
3,137

Duplicate - deleted

Message was edited by:

Jelena Perfiljeva

Read only

Former Member
0 Likes
3,137

Hi Priyanka,

Welcome to SDN.

Please check this function modules.

RV_SHIPMENT_UPDATE

RV_SHIPMENT_UPDATE_DB

Hope this will help.

Regards,

Ferry Lianto

Read only

0 Likes
3,137

Hi Ferry,

You had suggested that I use RV_SHIPMENT_UPDATE in my report

for changing the value of forwarding agent field of a particular shipment # in table VTTK . Cud u plz tell me how to use this function. Also I had read that this function for updating dates. Does it mean that it cannot be used for updating any other field other than one for date in table VTTK?

Regards,

Priyanka.