2010 Nov 11 11:10 PM
Hi Experts,
I'm tryng to use the FM BAPI_GOODSMVT_CREATE to enter transfer posting via MB1B.
If I take all the quantity of material g_tc01_wa-matnr in MCHB-CLABS, and I can't get post the movement.
However, if I take a quantity less than in MCHB-CLABS, the BAPI works perfectly. But my will is post a movement with entire quantity.
I attached the SC below.
If any tip is found, tell me <<removed by moderator>>.
wa_header-pstng_date = zpp_st_tc01-budat.
wa_header-doc_date = zpp_st_tc01-bldat.
wa_header-pr_uname = sy-uname.
wa_header-ver_gr_gi_slip = 2.
wa_header-ver_gr_gi_slipx = 'X'.
LOOP AT g_tc01_itab INTO g_tc01_wa.
ti_item-material = g_tc01_wa-matnr.
ti_item-plant = zpp_st_tc01-werks.
ti_item-stge_loc = g_tc01_wa-lgort.
ti_item-batch = g_tc01_wa-charg.
ti_item-move_type = zpp_st_tc01-bwart. "309
ti_item-entry_qnt = g_tc01_wa-erfmg.
ti_item-entry_uom = g_tc01_wa-erfme.
ti_item-move_mat = g_tc01_wa-matn2.
ti_item-move_plant = zpp_st_tc01-werks.
ti_item-move_stloc = zpp_st_tc01-umlgo.
ti_item-move_batch = g_tc01_wa-charg.
APPEND ti_item.
CLEAR ti_item.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_header
goodsmvt_code = lv_tcode "MB1B
IMPORTING
materialdocument = lv_matdoc
TABLES
goodsmvt_item = ti_item
return = ti_return.
Thanks in advance and best Regards
JORGE R.
Moderator Message: Moved to right forum. Removed ASAP words and added code tags. Please take care of these yourself in the future.
Edited by: kishan P on Nov 12, 2010 9:31 AM
2010 Nov 12 3:54 AM
Hi ,
In your FM
Import Parameter . --->
goodsmvt_code = lv_tcode "MB1B
Should be
lv_tcode = '01'. not the T code , Movement type will handle the Transaction internally .
Please update the progress.
Thx ,
Dilum
2010 Nov 12 7:13 PM
Hi,
The MB1B tag is only to referrence the use of this Tcode. Previously, I've seeked in table T158G for the relevant code for MB1B.
No problem with this.
Thanks a lot for your answer, but my problem remains unsolved.
JORGE R.
2010 Nov 12 1:23 PM
Hi,
Can you also check the in field MVT_IND(Movement Indicator) is passing. You have to check the below codes for the posting.
Goods movement w/o reference
B Goods movement for purchase order
F Goods movement for production order
L Goods movement for delivery note
K Goods movement for kanban requirement (WM - internal only)
O Subsequent adjustment of "material-provided" consumption
W Subsequent adjustment of proportion/product unit material
Regards
Bhavesh
2010 Dec 06 2:37 PM
Can anyone help me with this thread?
Thanks
JORGE ROJAS
2010 Dec 07 6:54 PM
what error do you get?
have you tried the same manually in MB1B transaction?
2010 Dec 07 8:00 PM
Hi experts,
For accounting determination issues, I have to delete/block this post.
Once problems are solved, I'll try to test the Tx.
Thanks so much to all of you.
Jorge Rojas