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

bapi- for mb1b(transfer posting

Former Member
0 Likes
1,157

hi,

im using bapi_goodsmvt_create for mb1b(transfer posting).

im passing header and item data to bapi_goodsmvt_create,

but the document is not getting generated. ihave checked the code in debugging mode. data flow is perfect. still im not getting result (document created).

all i need to know is whether im using the right bapi and passing necessary values... below is my code...

loop at itab.

it_header-PSTNG_DATE = itab-pdate.

it_header-DOC_DATE = itab-ddate.

APPEND it_header.

it_item-MATERIAL = itab-matnr.

it_item-PLANT = itab-plant.

it_item-STGE_LOC = itab-stloc.

it_item-MOVE_TYPE = itab-mtype.

it_item-ENTRY_QNT = itab-quant.

it_item-MOVE_PLANT = itab-rplan.

it_item-MOVE_STLOC = itab-rsloc.

endloop.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = it_header

goodsmvt_code = '04'

  • TESTRUN = ' '

  • GOODSMVT_REF_EWM =

IMPORTING

  • GOODSMVT_HEADRET =

MATERIALDOCUMENT = doc1

  • MATDOCUMENTYEAR =

tables

goodsmvt_item = it_item

  • GOODSMVT_SERIALNUMBER =

return = return

  • GOODSMVT_SERV_PART_DATA =

  • EXTENSIONIN =

.

write: doc1.

&----


*& SAVE 0R COMMIT

&----


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

points will be rewarded

regards

mano

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
492

Hi,

First see the documentation of the BAPI

See the sample code for the bapi 'BAPI_GOODSMVT_CREATE'

https://forums.sdn.sap.com/click.jspa?searchID=12061014&messageID=1383395

Regards

Kiran Sure

1 REPLY 1
Read only

Former Member
0 Likes
493

Hi,

First see the documentation of the BAPI

See the sample code for the bapi 'BAPI_GOODSMVT_CREATE'

https://forums.sdn.sap.com/click.jspa?searchID=12061014&messageID=1383395

Regards

Kiran Sure