Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_GOODSMVT_CREATE for Reservation reference

Former Member
0 Likes
2,936

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

3 REPLIES 3
Read only

Former Member
0 Likes
1,512

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

Read only

Former Member
0 Likes
1,512

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.

Read only

Former Member
0 Likes
1,512

Let GOODSMVT_CODE-GM_CODE be '04'.