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

any function module available for...

Former Member
0 Likes
688

hi all,

i need a function module to do a goods receipt for the PO using

movement type 161,

movement ind B,

goodsmvt code '01'.

i couldnt able to post using BAPI_GOODSMVT_CREATE as iam getting

'NO GOODS RECEIPT POSSIBLE FOR PO XXXXXXXX XXXXX'.

So is there any function module other than bapi to do a goodsmvt with my requirements.

Thanks in advance,

Prem.

5 REPLIES 5
Read only

Former Member
0 Likes
650

Hi Prem,

You should use this BAPI only. there must be some wrong data you provided.

Just check with your functional and give the correct data and try.

Regards,

Atish

Read only

0 Likes
650

hi,

the code i use is,

loop at gt_final into gs_wa_final.

gt_item-move_type = '161'.

gt_item-entry_uom = gs_wa_final-meins.

gt_item-stge_loc = gs_wa_final-lgort.

gt_item-entry_qnt = gs_wa_final-menge.

gt_item-entry_uom_iso = gs_wa_final-meins.

gt_header-ref_doc_no = gs_wa_final-submi.

gt_item-base_uom = gs_wa_final-meins.

gt_header-doc_date = gv_last_date.

gt_header-pstng_date = sy-datum.

gt_item-ind_propose_quanx = 'X'.

gt_item-serialno_auto_numberassignment = 'X'.

gt_item-material = gs_wa_final-matnr.

gt_item-plant = gs_wa_final-werks.

gt_item-po_number = gs_wa_final-ebeln.

gt_item-po_item = gs_wa_final-ebelp.

gt_item-mvt_ind = 'B'.

append gt_item.

clear gt_item.

*call bapi goodsmvt create to do the gr

set update task local.

call function 'BAPI_GOODSMVT_CREATE'

exporting

goodsmvt_header = gt_header

goodsmvt_code = gt_bapigm_code

importing

goodsmvt_headret = gs_headret

tables

goodsmvt_item = gt_item

goodsmvt_serialnumber = gt_serialno

return = gt_return.

  • call bapi_transaction_commit to commit if success

if gt_return-type <> 'E'.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

else.

call function 'BAPI_TRANSACTION_ROLLBACK'.

endif.

After executing iam getting an error mess in gt_return[]

'NO GOODS RECEIPT POSSIBLE FOR PO XXXXXXXXXX XXXXX'

i cant understand y the function module is returning this error message,

can any one help me in this issue,

Thanks in adavance,

Prem.

Read only

0 Likes
650

Hi Prem,

Are you able to create GR using normal transaction for the same data?

Regards,

Atish

Read only

0 Likes
650

yes iam able to do a GR using MIGO alone & not with MB01.

Read only

0 Likes
650

check below link. It has sample progem for GR. Just compare and see what you might be missing.

http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm

Regards,

Atish