on 08-24-2011 8:16 PM
Hi All,
Can any Body Please tell me the BAPI or a FM for the transaction which perform operations like LT06 does.
I did found L_TO_CREATE_POSTING_CHANGE for my requirement. But What are all the parameters that I need to pass.
1) My requirement is When I perform Block or Unblocking Batch. I.e., I do MB1B with Movement Types 344 and 343 respectively
a Material Document Number will be generated . lets Say 1234567890
2) Now I go to LT06 and enter Material Document Number which is generated i.e., 1234567890 and Year 2011 and hit Enter
After that I click on Quant Lists Button at the Bottom of the Transaction LT06 by selecting Some records in Storage Types
Now It will take up to a New Screen and asks for input quantity. then Save.
This complete operation should be done by a BAPI or FM. What I mean to say is I dont have any other data other than Materil Document Number and Year. Please tell me a BAPI or a FM for this.
Please help. <removed by moderator>
Edited by: Thomas Zloch on Aug 24, 2011 10:35 PM
hi venkat,
DATA: l_ubnum TYPE ubnum,
l_tanum TYPE tanum.
DATA: i_lqua TYPE STANDARD TABLE OF lqua INITIAL SIZE 0
WITH HEADER LINE.
DATA: l_tanum TYPE tanum,
l_i_lubqu TYPE STANDARD TABLE OF lubqu INITIAL SIZE 0,
rec_lubqu TYPE lubqu.
* Get posting change number details
SELECT ubnum INTO l_ubnum
FROM lubu
UP TO 1 ROWS
WHERE mblnr = v_docno
AND mjahr = v_docyr.
ENDSELECT.
rec_lubqu-lqnum = i_lqua-lqnum.
rec_lubqu-menge = i_lqua-verme.
APPEND rec_lubqu TO l_i_lubqu.
WAIT UP TO 5 SECONDS.
* Function module to Post the material document
CALL FUNCTION 'L_TO_CREATE_POSTING_CHANGE'
EXPORTING
i_lgnum = i_lqua-lgnum
i_ubnum = l_ubnum
i_squit = c_x
i_nidru = c_x
i_update_task = space
i_commit_work = c_x
i_bname = sy-uname
IMPORTING
e_tanum = l_tanum
TABLES
t_lubqu = l_i_lubqu
EXCEPTIONS
foreign_lock = 1
tp_completed = 2
xfeld_wrong = 3
ldest_wrong = 4
drukz_wrong = 5
tp_wrong = 6
squit_forbidden = 7
no_to_created = 8
update_without_commit = 9
no_authority = 10
i_ubnum_or_i_lubu = 11
bwlvs_wrong = 12
material_not_found = 13
manual_to_forbidden = 14
bestq_wrong = 15
sobkz_missing = 16
sobkz_wrong = 17
meins_wrong = 18
conversion_not_found = 19
no_quants = 20
t_lubqu_required = 21
le_bulk_quant_not_selectable = 22
quant_not_selectable = 23
quantnumber_initial = 24
kzuap_or_bin_location = 25
date_wrong = 26
nltyp_missing = 27
nlpla_missing = 28
lgber_wrong = 29
lenum_wrong = 30
menge_wrong = 31
menge_to_big = 32
open_tr_kzuap = 33
lock_exists = 34
double_quant = 35
quantity_wrong = 36
error_message = 99
OTHERS = 37.
regards,
kool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koolspy.
Thanks for the quick update I really appreciate for the help.
I got a question. Do we really need to pass this
rec_lubqu-lqnum = i_lqua-lqnum.
rec_lubqu-menge = i_lqua-verme.
APPEND rec_lubqu TO l_i_lubqu.
In the TABLES Parameters of the Function Module
TABLES
t_lubqu = l_i_lubqu
Because I dont want to change the Available quants in the Quants List. If we dont tables TABLES parameters what happens thn..
Thanks.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.