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: 

BAPI of Handling Units

Former Member
0 Kudos
338

Hi,

Good day.

I need the following BAPI for Handling Units:

(1) One that will create an HU under a certain Shipment

(2) In the said Shipment, Pack HUs into an HU

These functionalities are similar to that of VT02N.

Please advise if you know the BAPIs that perform the said functionalities. And if possible, kindly provide sample codes.

Thank you very much!

Best regards.

Brando

1 ACCEPTED SOLUTION

Former Member
0 Kudos
254

Hi,

I am using BAPIs to perform the following steps:-

1) Create HU (BAPI_HU_CREATE)

2) Add a single product (and its serial number) to the HU

Code:

pack1 = hu_key.

item-hu_item_type = '1'.

item-pack_qty = '1'.

item-material = p_matnr.

item-plant = p_werks.

item-stge_loc = p_sloc.

item-no_of_serial_numbers = '1'.

SERIALNO-SERIALNO = p_serial.

append SERIALNO.

call function 'BAPI_HU_PACK'

exporting

hukey = pack1

itemproposal = item

importing

huitem = hu_item

huheader = hu_head

tables

serialnumbers = serialno

return = ret.

BAPI_HU_PACK

8 REPLIES 8

Former Member
0 Kudos
255

Hi,

I am using BAPIs to perform the following steps:-

1) Create HU (BAPI_HU_CREATE)

2) Add a single product (and its serial number) to the HU

Code:

pack1 = hu_key.

item-hu_item_type = '1'.

item-pack_qty = '1'.

item-material = p_matnr.

item-plant = p_werks.

item-stge_loc = p_sloc.

item-no_of_serial_numbers = '1'.

SERIALNO-SERIALNO = p_serial.

append SERIALNO.

call function 'BAPI_HU_PACK'

exporting

hukey = pack1

itemproposal = item

importing

huitem = hu_item

huheader = hu_head

tables

serialnumbers = serialno

return = ret.

BAPI_HU_PACK

Former Member
0 Kudos
254

CALL FUNCTION 'SERIAL_INTTAB_REFRESH'

EXPORTING

OBJECTS_STATUS_REFRESH = 'S'

0 Kudos
254

I see, do you happen to know how to assign the HU created to a shipment?

0 Kudos
254

hi,

do you guys think it's best to do a BDC for VT02N instead of using a BAPI? Kindly advise. thanks.

0 Kudos
254

Can anyone still help me with this?

0 Kudos
254

bump

0 Kudos
254

Hi Brando,

have you fixed your problem?

I have the same issue and I'd be pleased if you could help me.

Antonio.

0 Kudos
254

Hi antonio,

Sorry for the late reply.

Anyway, Yeah, I did it the hard way though. I used BDC on Table Control.