2013 Sep 05 12:38 PM
Hi,
I am facing a problem when uploading an excel file with this BAPI : /AFS/BAPI_GOODSMVT_CREATE. An error occurs "Enter a sales order for special stock E". I don't know, it a configuration problem. There is no error when manually inputing the same datas through MB1C tcode.
gmcode = 05 - MB1C - Enter Other Goods Receipt
Fields in gmhead are posting date and document date
call function '/AFS/BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
* TESTRUN = ' '
importing
goodsmvt_headret = mthead
* MATERIALDOCUMENT =
* MATDOCUMENTYEAR =
tables
afs_goodsmvt_item = lt_itabfl
* GOODSMVT_SERIALNUMBER =
return = errmsg.
| Movement type | Stock Type | Document Date | Posting Date | SO # | li.no | Special Stock | Plant | Stor. Loc. | Material FG # | Size | Quantity | UoM | Remark |
| 561 | E | 05.09.2013 | 05.09.2013 | 40000039 | 10 | E | 3110 | RM01 | 20000344 | 36 C | 5 | SHORT SHIP | |
| 561 | E | 05.09.2013 | 05.09.2013 | 40000039 | 10 | E | 3110 | RM02 | 20000344 | 38 C | 5 | SISA PRODUKSI |
Thanks/Regards,
Charls.
Hi,
I am facing a problem when uploading an excel file with this BAPI : /AFS/BAPI_GOODSMVT_CREATE. An error occurs "Enter a sales order for special stock E". I don't know, it a configuration problem. There is no error when manually inputing the same datas through MB1C tcode.
gmcode = 05 - MB1C - Enter Other Goods Receipt
Fields in gmhead are posting date and document date
call function '/AFS/BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
* TESTRUN = ' '
importing
goodsmvt_headret = mthead
* MATERIALDOCUMENT =
* MATDOCUMENTYEAR =
tables
afs_goodsmvt_item = lt_itabfl
* GOODSMVT_SERIALNUMBER =
return = errmsg.
| Movement type | Stock Type | Document Date | Posting Date | SO # | li.no | Special Stock | Plant | Stor. Loc. | Material FG # | Size | Quantity | UoM | Remark |
| 561 | E | 05.09.2013 | 05.09.2013 | 40000039 | 10 | E | 3110 | RM01 | 20000344 | 36 C | 5 | SHORT SHIP | |
| 561 | E | 05.09.2013 | 05.09.2013 | 40000039 | 10 | E | 3110 | RM02 | 20000344 | 38 C | 5 | SISA PRODUKSI |
Thanks/Regards,
Charls.
2013 Sep 05 3:32 PM
Hi,
If you can debug this, then place a watchpoint on SY-MSGNO with the value of this message number.
Kind regards, Rob Dielemans
2013 Sep 05 5:19 PM
Hi Charls,
I assume that you are passing the Sales Order number to BAPI.
Based on the value you pasted here, please make sure that Sales order number 40000039 is passed with full length.. ie.. leading Zeros. 0040000039
ie. use conversion_alpha_input ... to get the valid sales order number
Regards,
Venkat
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |