Skip to Content
author's profile photo Former Member
Former Member

problem in BAPI BAPI_REPMANCONF1_CREATE_MTS

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2011 at 07:36 PM

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

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2011 at 06:37 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2011 at 02:09 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.