2006 May 31 10:53 PM
Hi all,
I try to perform an IM transfer with 323 movement from BAPI_GOODSMVT_CREATE.
It works with IM to IM storage location.
It doesn't work when IM target storage location is connected to WM warehouse number and schould create an inbound delivery :
the return code from the bapi is 0, there is no message in return table and no document number generated.
(same data in MB1B works witout any problem)
can you help me please ?
2006 May 31 11:00 PM
2006 May 31 11:00 PM
2006 Jun 01 4:56 AM
Hi !
I have done so a lot of times - with no problems....
Could yoe please post the code in with the parameters are set and the BAPI is called ?
Regards
Rainer
2006 Jun 01 9:36 AM
thanks for your answers !
I already try to find an OSS note (213 notes about this BAPI)...
the call to the bapi is not performed directly, i use an intermediate storage in a table "ZGOODSMVT" which i use for other movements without any problem (same fields than BAPI parameters).
(the 323 works when IM destination storage location is not connected to WM warehouse number).
here is the code from first prog :
here is the code from second prog :
SELECT * FROM zgoodsmvt APPENDING CORRESPONDING FIELDS OF TABLE t
WHERE type NE 'S'.
*----
-
*
*
LOOP AT t.
CLEAR : ti, tr, ir.
REFRESH: ti, tr.
FREE : ti, tr.
MOVE-CORRESPONDING: t TO w_goodsmvt_header, t TO w_goodsmvt_code.
*
MOVE-CORRESPONDING: t TO ti, t TO ir.
APPEND ti. " item
*
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = w_goodsmvt_header
goodsmvt_code = w_goodsmvt_code
testrun = ptestrun
IMPORTING
GOODSMVT_HEADRET =
materialdocument = w_materialdocument
matdocumentyear = w_matdocumentyear
TABLES
goodsmvt_item = ti
GOODSMVT_SERIALNUMBER =
return = tr.
*
IF sy-subrc NE 0. " tjr à 0, les erreurs sont ds TR
WRITE:/ text-250, sy-subrc.
ENDIF.
*
Thank you for your help,
regards
Eric
2006 Jun 01 9:39 AM
Hi !
Try
zgoodsmvt-gm_code = '06'
(change 04 to 06)
Be sure that ptestrun is initial.
Try a COMMIT WORK after the
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'.
The Bapi starts working if the application does a COMMIT.
Do you get back any value in w_materialdocument ?
Regards
Rainer
2006 Jun 02 2:41 PM
Hi !
06 doesn't work (not for transfer mvt)
ptestrun is initial and commit is ok (It works with IM to IM storage location)
i have no value in w_materialdocument...
thanks for your help Rainer !
Eric