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

help needed for : BAPI_GOODSMVT_CREATE

Former Member
0 Likes
633

Hi All,

I am using BAPI_GOODSMVT_CREATE for MB11. Facing some problem like when i am using SE37 to post document i am able to post it. But when i coded same values in my test program, i am unable to post.

It is giving Error like : Enter storage Location.

In my scenario i needs to Post MB11 without storage location. when i used se37 i am able to post. for same values via program i am unable to post.

Did i missed anything ??

Thanks,

Naresh

6 REPLIES 6
Read only

Former Member
0 Likes
585

can you please confirm what are the parameres that you are passing here.

Read only

0 Likes
585

Hi ,

Here is the code

ls_gdsmt_header-pstng_date = '20090303'.

ls_gdsmt_header-doc_date = '20090303'.

ls_gdsmt_header-header_txt = 'hEADE TEXT'.

ls_gdsmt_code-gm_code = '06'.

ls_gdsmt_item-move_type = '561'.

ls_gdsmt_item-material = '000000000052002271'.

ls_gdsmt_item-plant = '4541'.

ls_gdsmt_item-stge_loc = 'J001'.

ls_gdsmt_item-batch = 'ZTEST001'.

ls_gdsmt_item-stck_type = 'O'.

ls_gdsmt_item-vendor = '0544000001'.

ls_gdsmt_item-entry_qnt = '100'.

APPEND ls_gdsmt_item TO lt_gdsmt_item.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = ls_gdsmt_header

goodsmvt_code = ls_gdsmt_code

testrun = 'X'

IMPORTING

goodsmvt_headret = l_gdsmt_headret

materialdocument = l_retmatdoc

TABLES

goodsmvt_item = lt_gdsmt_item

goodsmvt_serialnumber = lt_goodsmvt_serialnumber

return = lt_return.

Read only

0 Likes
585

Dear Naresh,

With reference to your coding.

if you want to post without storage location, then you can comment it that line & post it, it will allow you to post.

Regards,

Amit G.

Read only

0 Likes
585

Hi Amith,

If i comment that line i am unable to post, giving error like : Enter storage location. My actual requirement is without Storage location i needs to post, as i said above. I am able to post using same data in SE37 and MB11 without storage location .

Can anybody ?

Thanks,

NK.

Read only

Former Member
0 Likes
585

Hi,

itab-move_type = pcitab-mvt_type.

itab-mvt_ind = 'B'.

itab-plant = pcitab-plant.

itab-material = pcitab-material.

itab-entry_qnt = pcitab-qty.

itab-move_stloc = pcitab-recv_loc.

itab-stge_loc = pcitab-issue_loc.

itab-po_number = pcitab-pur_doc.

itab-po_item = pcitab-po_item.

concatenate pcitab-del_no pcitab-del_item into itab-item_text.

itab-move_reas = pcitab-scrap_reason.

append itab.

call function 'BAPI_GOODSMVT_CREATE'

exporting

goodsmvt_header = gmhead

goodsmvt_code = gmcode

  • TESTRUN = ' '

  • IMPORTING

goodsmvt_headret = mthead

  • MATERIALDOCUMENT =

  • MATDOCUMENTYEAR =

tables

goodsmvt_item = itab

  • GOODSMVT_SERIALNUMBER =

return = errmsg

.

Thanks & Regards,

Sateesh.

Read only

0 Likes
585

Hi All,

Solved my self. Problem in passing data.

Thanks,

NK.