on 04-15-2009 10:30 PM
Hi guys,
I'm traying to use L_TO_CREATE_MULTIPLE but I get the next error: MANUAL_TO_FORBIDDEN, can anyone help me, please?
This is the code that I'm using for:
DATA: i_ltap_cr TYPE STANDARD TABLE OF ltap_creat WITH HEADER LINE,
w_tanum TYPE ltak-tanum,
i_ltap_vb TYPE STANDARD TABLE OF ltap_vb WITH HEADER LINE.
Set variables for Transfer Order Creation (material part)
i_ltap_cr-matnr = 'SF196LEMQ'.
i_ltap_cr-werks = 'F397'.
i_ltap_cr-lgort = '0001'.
i_ltap_cr-bestq = ' '.
i_ltap_cr-letyp = '01'.
i_ltap_cr-anfme = '1'.
i_ltap_cr-altme = 'EA'.
i_ltap_cr-vltyp = '001'.
i_ltap_cr-vlpla = 'M051'.
i_ltap_cr-vlqnr = '1'.
i_ltap_cr-nlqnr = '1'.
i_ltap_cr-nltyp = '001'.
i_ltap_cr-nlpla = 'M086'.
*i_ltap_cr-nlenr = wa_zekko_le-llenr.
i_ltap_cr-squit = 'X'."This means automatically confirm
APPEND i_ltap_cr.
Now the Stillage must be added.
i_ltap_cr-matnr = 'SF196LEMQ'.
i_ltap_cr-werks = 'F397'.
i_ltap_cr-lgort = '0001'.
i_ltap_cr-bestq = ' '.
i_ltap_cr-letyp = '01'.
i_ltap_cr-anfme = '1'.
i_ltap_cr-altme = 'EA'.
i_ltap_cr-vltyp = '001'.
i_ltap_cr-vlpla = 'M051'.
i_ltap_cr-vlqnr = '1'.
i_ltap_cr-nlqnr = '1'.
i_ltap_cr-nltyp = '001'.
i_ltap_cr-nlpla = 'M086'.
*i_ltap_cr-nlenr = wa_zekko_le-llenr.
i_ltap_cr-squit = 'X'."This means automatically confirm
APPEND i_ltap_cr.
Call FM to create Transfer Order (which also creates basic SU)
CALL FUNCTION 'L_TO_CREATE_MULTIPLE'
EXPORTING
i_lgnum = 'CBG'
i_bwlvs = '317'
i_benum = '2099'
i_bname = sy-uname
IMPORTING
e_tanum = w_tanum
TABLES
t_ltap_creat = i_ltap_cr
t_ltap_vb = i_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 NE 0 OR w_tanum IS INITIAL.
MESSAGE e999 WITH 'Failed to create transfer order'.
ROLLBACK WORK.
ENDIF.
Regards...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.