‎2012 Oct 02 9:36 AM
Hi All,
I am using the FM L_TO_CREATE_MULTIPLE to create TO. The FM gives the error " Storage Bin not a fixed bin for material" for the storage bin being passed.Using the same data I am able to create TO in LT01 and this error is displayed only as warning message in LT01.
Given below is my code.
CLEAR $st_ltap.
$st_ltap-matnr = $st_output-matnr.
$st_ltap-werks = p_swerks.
$st_ltap-lgort = $st_output-sloc1.
$st_ltap-charg = $st_output-batch1.
$st_ltap-sobkz = $st_output-splstock.
$st_ltap-anfme = $st_output-menge.
$st_ltap-altme = $st_output-uom.
$st_ltap-squit = 'X'.
$st_ltap-nidru = 'X'.
$st_ltap-vltyp = '998'
$st_ltap-vlpla = $st_output-storagebin.
$st_ltap-nltyp = '101'.
$st_ltap-nlpla = 'AUFNAHME'.
APPEND $st_ltap TO $it_ltap.
AT END OF matnr.
CLEAR l_tonum.
CALL FUNCTION 'L_TO_CREATE_MULTIPLE'
EXPORTING
i_lgnum = p_slgnum
i_bwlvs = '999'
* I_BETYP = ' '
* I_BENUM = ' '
* I_LZNUM = ' '
i_nidru = 'X'
* I_DRUKZ = ' '
* I_NOSPL = ' '
* I_UPDATE_TASK = ' '
i_commit_work = 'X'
* I_BNAME = SY-UNAME
* I_KOMPL = 'X'
* I_SOLEX = 0
* I_PERNR = 0
* I_MINWM = ' '
* I_AUSFB = ' '
IMPORTING
e_tanum = l_tonum
TABLES
t_ltap_creat = $it_ltap
* T_LTAK =
* T_LTAP_VB =
EXCEPTIONS
no_to_created = 1
bwlvs_wrong = 2
betyp_wrong = 3
benum_missing = 4
betyp_missing = 5
foreign_lock = 6
vltyp_wrong = 7
vlpla_wrong = 8
vltyp_missing = 9
nltyp_wrong = 10
nlpla_wrong = 11
nltyp_missing = 12
rltyp_wrong = 13
rlpla_wrong = 14
rltyp_missing = 15
squit_forbidden = 16
manual_to_forbidden = 17
letyp_wrong = 18
vlpla_missing = 19
nlpla_missing = 20
sobkz_wrong = 21
sobkz_missing = 22
sonum_missing = 23
bestq_wrong = 24
lgber_wrong = 25
xfeld_wrong = 26
date_wrong = 27
drukz_wrong = 28
ldest_wrong = 29
update_without_commit = 30
no_authority = 31
material_not_found = 32
lenum_wrong = 33
matnr_missing = 34
werks_missing = 35
anfme_missing = 36
altme_missing = 37
lgort_wrong_or_missing = 38
OTHERS = 39.
IF sy-subrc <> 0.
* Implement suitable error handling here
$st_output_temp-error1 = 'X'.
$st_output_temp-messg1 = text-117.
ELSE.
$st_output_temp-tonum1 = l_tonum.
$st_output_temp-error1 = ' '.
$st_output_temp-messg1 = text-116.
ENDIF.
REFRESH $it_ltap[].
ENDAT.
Any pointers in solving this error is highly appreciated.
Is there any other FM I can use for the same? My requirement is to create a TO to move the material from storage type 998 to 101.
Thanks,
Saritha.
‎2012 Oct 02 10:45 AM
‎2014 Mar 12 5:27 AM
HI,
Can you plz share, how were you filling st_output ?
Regards,
Aayush Aggarwal