07-05-2011 5:29 AM
Dear Experts,
I have to reverse the GR and I am using BAPI -> BAPI_GOODSMVT_CREATE and passing below information but I am getting error message as 'Goods movement not possible with mvmt type 102'. Could any one please tell me what would be the possible reasons to get this error and how can I fix this.
goodsmvt_header-PSTNG_DATE = 20110705
goodsmvt_header-DOC_DATE = 20110705
goodsmvt_code-GM_CODE = 06
goodsmvt_item-PLANT = 1400
goodsmvt_item-MOVE_TYPE = 102 <<< Reversal movement type
goodsmvt_item-ENTRY_QNT = 02
goodsmvt_item-ENTRY_UOM = SET
goodsmvt_item-PO_NUMBER = W299999508
goodsmvt_item-PO_ITEM = 0010
goodsmvt_item-MVT_IND = B
goodsmvt_item-XSTOB = ''. << space to use reversal types
Thanks in Advance
Venkat
07-05-2011 5:48 AM
Hello
1. You forgot the quotes.
2. goodsmvt_item-XSTOB = 'X'. <- reversal type
3. Try to use FM BAPI_GOODSMVT_CANCEL for reverse.
07-05-2011 7:52 AM
Hi Dzed Maroz,
For complete reverse of GR I can use 'BAPI_GOODSMVT_CANCEL' and it is working fine but in my case I need to maintain some information in the fields 'Bill of lading' and 'Unloading Point' and also some times needs to reverse partial GR therefore I am using 'BAPI_GOODSMVT_CREATE' but I am getting this error message 'Goods movement not possible with mvmt type 102'
and as u said if I use GOODSMVT_ITEM-XSTOB = 'X' then I will get error message as ''Goods movement not possible with mvmt type 101'
Thank you,
Venkat
07-05-2011 8:49 AM
Try
GOODSMVT_ITEM-MOVE_TYPE = '101'. " not '102'
GOODSMVT_ITEM-XSTOB = 'X' .
Also check GM_CODE which should be allowed with movement type ([Note 520813 - FAQ: BAPIs for goods movements|https://service.sap.com/sap/support/notes/520813] - look for allowed transactions per tcode in T158B - try '01')
Regards,
Raymond
07-05-2011 10:18 AM
I am using this to reverse GR so Mvt type should be '102' and XSTOB should be blank.
07-05-2011 8:15 PM
Use goods movement code 01 & check it. Everything else looks fine.
08-05-2011 10:58 PM
I want to use BAPI_GOODSMVT_CANCEL FM . I am providing material document number and year . Now it is not displaying the new reversed material document number. The return structure also blank . Why it is not displaying any output.what else input parameter i should provide to reverse the document .
09-14-2011 9:14 AM
Hi Please provide Material Document, Document Year and Posting date as shown below
MATDOCUMENTYEAR = DOC_YEAR.
GOODSMVT_PSTNG_DATE = POSTING_DATE.
MATERIALDOCUMENT = MAT_DOC
CALL FUNCTION 'BAPI_GOODSMVT_CANCEL'
EXPORTING
MATERIALDOCUMENT = MATERIALDOCUMENT
MATDOCUMENTYEAR = MATDOCUMENTYEAR
GOODSMVT_PSTNG_DATE = GOODSMVT_PSTNG_DATE
GOODSMVT_PR_UNAME =
IMPORTING
GOODSMVT_HEADRET = WA_GOODSMVT_HEADRET
TABLES
RETURN = IT_RETURN
GOODSMVT_MATDOCITEM =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
07-05-2011 7:43 AM
As already written , try BAPI_GOODSMVT_CANCEL, also read [How To Goods Movements with BAPI|http://wiki.sdn.sap.com/wiki/display/ERPSCM/HowToGoodsMovementswith+BAPI] in sdn wiki.
Regards,
Raymond
07-05-2011 8:37 AM
Is the mevement type 102 enabled in the particular standard transaction ( Assigned to the gm code 06 ). Please check the same entries providing in the standard transaction.
09-21-2015 8:53 AM
Hi
use always 2 FM.
BAPI_GOODSMVT_CREATE
BAPI_TRANSACTION_COMMIT.
Remember about authorisation for material movements.
structures
GOODSMVT_HEADER
PSTNG_DATE | DOC_DATE | PR_UNAME | HEADER_TXT |
21.09.2015 | 21.09.2015 | UNAME | Text of mat doc. |
GOODSMVT_CODE - depands on transaction
Go to OMJJ first and check allowed tcodec for material movement then choose proper one.
GM | |
01 | MB01 |
02 | MB31 |
03 | MB1A |
04 | MB1B |
05 | MB1C |
06 | MB11 |
07 | MB04 |
GOODSMVT_ITEM
MATERIAL | PLAN | STGE | BATCH | MOV | ENTRY_QNT |
123218 | XXXX | YYYY | 12345 | 102 | 33 |