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: 

Having problems creating handling units in Delivery with BAPI_HU_CREATE

Former Member
0 Kudos

I want to create handling unit from VL02N user exit itself. But the BAPI call is giving me error

"HU functions outside of the delivery only via unique number assignment"

This is my code in the delivery user exit. I have also tried by setting only the 1st 2 or 4 values out the ones given below but still same message

l_header-pack_mat = '800'.

l_header-hu_exid_type = 'E'.

l_header-ext_id_hu_2 = 'TEST'.

l_header-content = 'kkkk'.

l_header-TOTAL_WGHT = '99.999'.

l_header-TARE_WGHT = '99.999'.

l_header-UNIT_OF_WT = 'KG'.

l_header-TOTAL_VOL = '13.456'.

l_header-TARE_VOL = '13.456'.

l_header-VOLUMEUNIT = 'CCM'.

CALL FUNCTION 'BAPI_HU_CREATE'

EXPORTING

headerproposal = l_header

IMPORTING

huheader = l_huhead

hukey = l_hukey

TABLES

  • ITEMSPROPOSAL = IT_PROP

  • ITEMSSERIALNO =

return = l_it_ret

  • huitem = it_item

1 REPLY 1

former_member181962
Active Contributor
0 Kudos

also pass some value to HU_EXID.

l_header-HU_EXID = '1234'.

Regards,

ravi