cancel
Showing results for 
Search instead for 
Did you mean: 

How to use BAPI_INSPLOT_SETUSAGEDECISION to do just only stock transfer

Former Member
0 Kudos

I have requirement to do stock transfer from UI to Unrestricted use status but don't need to do usage decision.

After checking, this BAPI has UD_STOCK_POSTING field to do inventory posting, but seem like it doesn't support

to do stock transfer just some part of quantity to be posted. (No fields to input)

But after testing, it cound not do stock transfer successfully, eventhough field UD_STOCK_POSTING was flaged already.

Would you please me check what is wrong in my source code? Appreciated in your help/suggest.

  • Prepare internal table

I_NUMBER = 50000000223.

T_UD_DATA-INSPLOT = 50000000223.

T_UD_DATA-UD_PLANT = '0V07'.

T_UD_DATA-UD_RECORDED_BY_USER = 'TAPINYA'.

T_UD_DATA-UD_RECORDED_ON_DATE = sy-datum.

T_UD_DATA-UD_RECORDED_AT_TIME = sy-uzeit.

T_UD_DATA-UD_STOCK_POSTING = 'X'.

APPEND T_UD_DATA.

  • Call BAPI function

CALL FUNCTION 'BAPI_INSPLOT_SETUSAGEDECISION'

EXPORTING

NUMBER = I_NUMBER

UD_DATA = T_UD_DATA

IMPORTING

UD_RETURN_DATA = T_UD_RETURN_DATA

STOCK_DATA = T_STOCK_DATA

RETURN = T_RETURN

TABLES

SYSTEM_STATUS = T_SYSTEM

USER_STATUS = T_USER.

  • Commit BAPI transaction

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

In sum up,

- What's wrong for using this BAPI?

- Is it possible to just do stock transfer, no need to do usage decision.

- Is it possible to specify the number of stock to be posted (In unrestricted use field)

or this BAPI just supports to do transfer all stocks in each time?

- Due to ECC6, if you don't post the complete quantity of the inspection lot.

In transaction, you have to assign serial number to be transfered as well.

Therefore, this BAPI also supports this situation? or please advice me if you have any experiences or idea.

Thank you very much.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

You can set a usage decision to 'Accept' the stock and the move the stock to the unrestricted use.

Alternatively you can do manual posting of stock.

Regards,

Arun