‎2010 Oct 19 10:37 AM
Dear all,
I want to use BAPI_GOODSMVT_CREATE for Reservation reference
Pls show me how to do?
Following is my way, but it donot work:
DATA: GOODSMVT_HEADER TYPE BAPI2017_GM_HEAD_01,
GOODSMVT_CODE TYPE BAPI2017_GM_CODE,
GOODSMVT_ITEM TYPE TABLE OF BAPI2017_GM_ITEM_CREATE WITH HEADER LINE,
RETURN TYPE BAPIRET2 OCCURS 10.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = '669'
IMPORTING
OUTPUT = GOODSMVT_HEADER-REF_DOC_NO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = '669'
IMPORTING
OUTPUT = GOODSMVT_ITEM-RESERV_NO.
GOODSMVT_CODE-GM_CODE = '05'.
GOODSMVT_ITEM-PLANT = 'ap02'.
GOODSMVT_ITEM-STGE_LOC = 'A1L1'.
GOODSMVT_ITEM-VAL_TYPE = 'N40'.
GOODSMVT_ITEM-NO_MORE_GR = 'X'.
GOODSMVT_ITEM-WITHDRAWN = 'X'.
*GOODSMVT_ITEM-RESERV_NO = '669'.
GOODSMVT_ITEM-RES_ITEM = '1'.
GOODSMVT_ITEM-MVT_IND = 'X'.
GOODSMVT_ITEM-MOVE_TYPE = '301'.
APPEND GOODSMVT_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GOODSMVT_HEADER
GOODSMVT_CODE = GOODSMVT_CODE
TABLES
GOODSMVT_ITEM = GOODSMVT_ITEM
RETURN = RETURN .Problem is Goods movement not possible with mvmt type 301. But i'm sure about the movement are using.
RGDS,
Quanglv
Moderator Message: Please post the questions in the right forum and please enclose your code in ...Your code... tags for easy readability.
Edited by: kishan P on Oct 19, 2010 3:46 PM
‎2010 Oct 19 11:06 AM
Hi Quang,
For movement with reference to the reservation, material, plant and movement type should not be populated.
Refer to the documentation for more info.
Hope it helps.
Sujay
‎2010 Oct 19 1:37 PM
Hi,
While hardcoding values, we always populate in capital letters.
GOODSMVT_ITEM-PLANT = 'ap02'.
can u populate plant in capital letters and check how it works.
Regards.
‎2010 Nov 02 8:30 AM