Application Development 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: 

BADI_LE_SHIPMENT creating Partner function record?

Former Member
0 Kudos

Hi All,

When creating a shipment from VT01N I am trying to update the partner function field values

PARTNER TYPE (PARVW) and PARTNER under the Partner tab from BADI - BADI_LE_SHIPMENT in SAVE method.

So I am passing

ls_new_vbpa-kunnr = partner

ls_new_vbpa-parvw = partner type

and updating/entering new record with these values to into CHA_SHIPMENTS_AT_SAVE-NEW_VBPA.

But some reason BADI is not updating values in the table (not creating record in table VTPA)

Can anyone tell me the reason? Thanks for your time.

Thanks.

1 REPLY 1

Former Member
0 Kudos

Hi Murali, the solution is when you fill the data in the structure cha_shipments_at_save-new_vbpa[].


Make sure to fill the field UPDKZ  with an 'I' or 'U' before appending the information.

                                                             "insert or update flag

w_vbpa-mandt = sy-mandt.            " Client

w_vbpa-vbeln = fp_w_vttk-tknum. " Shipment

w_vbpa-parvw = l_c_char_sp.       " Partner

w_vbpa-lifnr = fp_w_vttk-tdlnr.      " Fordwaring Agent      (in my case)

w_vbpa-updkz = l_c_i.                 " Insert entry in table.


APPEND w_vbpa TO cha_shipments_at_save-new_vbpa[].


Best regards.

Nicolas.