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

urgent BAPI_GOODSMVT_CREATE gm_code = 04 error

Former Member
0 Likes
1,311

Hi,

is there mandatory parameter ?

i got error "

TYPE = E , ID = M7 , NUM = 076

MESSAGE

"Special stock 1000 Q X-03002-1-10 MAT01 of this material does not exist"

but, no problem with same data by t-code mb1b, only error in using bapi .

as error, i checked avaiable stock based on project inventory(X-03002-1-10) and was available to transfer .

st_goodsmvt_header-pstng_date = gt_list-budat.

st_goodsmvt_header-doc_date = gt_list-budat.

st_goodsmvt_code-gm_code = '04'. "

refresh: it_goodsmvt_item, it_goodsmvt_serialnumber, it_return.

clear: it_goodsmvt_item, it_goodsmvt_serialnumber, it_return.

it_goodsmvt_item-move_type = '311'.

it_goodsmvt_item-material = gt_list-matnr.

it_goodsmvt_item-plant = gt_list-werks.

it_goodsmvt_item-stge_loc = gt_list-lgort.

it_goodsmvt_item-spec_stock = gt_list-sobkz.

it_goodsmvt_item-move_mat = gt_list-matnr.

it_goodsmvt_item-move_plant = gt_list-werks.

it_goodsmvt_item-move_stloc = gt_list-tolgort.

it_goodsmvt_item-entry_qnt = gt_list-menge.

it_goodsmvt_item-entry_uom = gt_list-meins.

it_goodsmvt_item-wbs_elem = gt_list-wbselm. "X-03002-1-10

it_goodsmvt_item-val_wbs_elem = gt_list-wbselm.

append it_goodsmvt_item.

clear : g_materialdocument, g_matdocumentyear.

call function 'BAPI_GOODSMVT_CREATE'

exporting

goodsmvt_header = st_goodsmvt_header

goodsmvt_code = st_goodsmvt_code

importing

goodsmvt_headret = st_goodsmvt_headret

materialdocument = g_materialdocument

matdocumentyear = g_matdocumentyear

tables

goodsmvt_item = it_goodsmvt_item

return = it_return.

clear g_goodsmvt_doc.

if not st_goodsmvt_headret is initial.

g_goodsmvt_doc = st_goodsmvt_headret-mat_doc.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

p_result = 'S'.

else.

read table it_return index 1.

p_result = 'E'.

endif.

Edited by: venjamin on Jun 19, 2008 6:20 AM

4 REPLIES 4
Read only

valter_oliveira
Active Contributor
0 Likes
836

Hello.

Is it a special stock material? Check variable gt_list-sobkz.

Regards,

Valter Oliveira.

Read only

0 Likes
836

i checked all data.. sobkz = Q.

is additional prameter there?

Read only

0 Likes
836

Hello.

Confirm in table MSSQ if you have that kind of stock for that material and werks.

Hope this helps.

Regards.

Valter Oliveira.

Read only

JanStallkamp
Advisor
Advisor
0 Likes
836

Hi.

Please have a look into the [rules of engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] of all SDN forums. Threads not following the rules will be deleted. See Michael Schwandt's [blog about strict moderation|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/10047] [original link is broken] [original link is broken] [original link is broken]; for details. As these strict moderation policy is quite new I will not delete this thread but lock it.

Best regards,

Jan Stallkamp