Application Development 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: 

problem in BAPI BAPI_REPMANCONF1_CREATE_MTS

Former Member
0 Kudos

Hi Expert,

I am suing BAPI BAPI_REPMANCONF1_CREATE_MTS.

I have given the input and i am not getting any errors.

i am getting the return value confirmation number also.

but if i check the material document number, material document number is not generated.

here my code.

LOOP AT IT_PLAF_STOCK_COPY.

x_bapi_rm_datgen-materialnr = it_plaf_stock_copy-matnr.

x_bapi_rm_datgen-prodplant = it_plaf_stock_copy-pwwrk.

x_bapi_rm_datgen-planplant = it_plaf_stock_copy-pwwrk.

x_bapi_rm_datgen-storageloc = it_plaf_stock_copy-lgort.

x_bapi_rm_datgen-prodversion = it_plaf_stock_copy-verid.

x_bapi_rm_datgen-postdate = p_budat.

x_bapi_rm_datgen-docdate = sy-datum.

x_bapi_rm_datgen-backflquant = it_plaf_stock_copy-gsmng.

x_bapi_rm_datgen-unitofmeasure = l1_meins.

x_BFLUSHFLAGS-BCKFLTYPE = 11.

x_BFLUSHFLAGS-COMPONENTS_TYPE = 1.

CALL FUNCTION 'BAPI_REPMANCONF1_CREATE_MTS'

EXPORTING

bflushflags = x_BFLUSHFLAGS

bflushdatagen = x_bapi_rm_datgen

BFLUSHDATAMTS = x_bflushdatamts

IMPORTING

CONFIRMATION = bfno

RETURN = e_ret.

if e_ret is initial.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

*EXPORTING

*wait = '1'.

endif.

ENDLOOP.

can any one please let me know what else parameter i need to pass to post the document.

3 REPLIES 3

Former Member
0 Kudos

Well, RETURN should never be empty; if it works, there should be some success messages. Have you debugged to see what's there?

Rob

Former Member
0 Kudos

I am getting success message as well as the confirmation number.

But if i check the material document number it is not generated material document number.

Can any one please tell whether i have missed any parameter or anything.

Thanks in advance.

Regards,

Zubera

Former Member
0 Kudos

if e_ret is initial.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
*EXPORTING
*wait = '1'.
endif.
ENDLOOP.

You missed my point. Because you have success messages in RETURN,

if e_ret is initial.

fails and the COMMIT is not done.

Rob