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

Creating SU #

Former Member
0 Likes
616

Hello All,

my requirement is to create a SU# . I am using the following code and getting errors in return.

Please suggest where I am going wrong, is there any other function module with which I can create SU# (Storage Unit #)

Error messages :

1. )HU functions outside of the delivery only

2.)3872000 does not have packaging material

Code :

DATA: L_HEADER LIKE BAPIHUHDRPROPOSAL.

DATA: L_HEADER2 LIKE BAPIHUHEADER.

DATA: L_HEADER3 LIKE BAPIHUITMSERIALNO OCCURS 0 WITH HEADER LINE..

DATA: L_HEADER4 LIKE BAPIHUITEM OCCURS 0 WITH HEADER LINE.

DATA: L_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

DATA L_LENUM_ORG LIKE LTAP_CREAT-NLENR.

L_HEADER-PLANT = 'JDB'.

L_HEADER-STGE_LOC = '0050'.

L_HEADER-PACK_MAT = '000000000003872000'.

*L_HEADER-HU_STATUS_INIT = 'B'.

*L_HEADER-HU_EXID = '00000000000600003255'.

CALL FUNCTION 'BAPI_HU_CREATE'

EXPORTING

HEADERPROPOSAL = L_HEADER

IMPORTING

HUHEADER = L_HEADER2

  • HUKEY =

TABLES

  • ITEMSPROPOSAL =

ITEMSSERIALNO = L_HEADER3

RETURN = L_RETURN

HUITEM = L_HEADER4.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
491

This is also a config issue. to confirm you can try using t-code manually HU02 you will get the same error.

Contact your functional person.

1 REPLY 1
Read only

Former Member
0 Likes
492

This is also a config issue. to confirm you can try using t-code manually HU02 you will get the same error.

Contact your functional person.