Skip to Content
0
Former Member
Oct 19, 2010 at 09:37 AM

BAPI_GOODSMVT_CREATE for Reservation reference

593 Views

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