08-11-2005 9:24 AM
hi!
i am looking for bapi to create transfer requirement?
thanks
regards
yifat
08-11-2005 10:59 AM
Hi,
There is a function module for this:
FORM create_tr USING p_l_squit
CHANGING p_subrc
p_tanum.
*clear the variable which will store transfer order numner
CLEAR p_tanum.
CALL FUNCTION 'L_TO_CREATE_TR'
EXPORTING
i_lgnum = ltbk-lgnum
i_tbnum = ltbk-tbnum
i_squit = p_l_squit
i_tbeli = p_l_squit
i_bname = sy-uname
i_commit_work = c_x
IMPORTING
e_tanum = p_tanum
EXCEPTIONS
foreign_lock = 1
qm_relevant = 2
tr_completed = 3
xfeld_wrong = 4
ldest_wrong = 5
drukz_wrong = 6
tr_wrong = 7
squit_forbidden = 8
no_to_created = 9
update_without_commit = 10
no_authority = 11
preallocated_stock = 12
partial_transfer_req_forbidden = 13
error_message = 99
OTHERS = 14.
Assign sy-subrc
p_subrc = sy-subrc.
ENDFORM.
regards
Aveek