‎2013 Jan 22 10:33 AM
Hi All,
I am doing a Transfer Posting using movement type 305 by BAPI_GOODSMVT_CREATE.
The BAPI returns the material document number, but that material is not found in LTBK table to get the Transfer requirement.
The BAPI does not throw any error, but the material number is updated in table MKPF.
Searched many forums, but could not find a solution.
Appreciate your help in solving this issue.
Below is my code:
wa_header-pstng_date = sy-datum.
wa_header-doc_date = sy-datum.
wa_header-header_txt = 'ABC'.
wa_mvt_code-gm_code = '06'.
LOOP AT it_lips.
it_mvt_item-material = it_lips-matnr.
it_mvt_item-plant = it_lips-werks.
it_mvt_item-stge_loc = 'XXXX'.
it_mvt_item-move_type = '305'.
it_mvt_item-entry_qnt = it_lips-lfimg.
it_mvt_item-entry_uom_iso = it_lips-meins.
it_mvt_item-batch = it_lips-charg.
it_mvt_item-deliv_numb_to_search = it_lips-vbeln .
it_mvt_item-deliv_item_to_search = it_lips-posnr.
it_mvt_item-entry_uom = it_lips-vrkme.
it_mvt_item-mvt_ind = it_lips-kzbew.
APPEND it_mvt_item.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_header
goodsmvt_code = wa_mvt_code
IMPORTING
goodsmvt_headret = wa_head_ret
TABLES
goodsmvt_item = it_mvt_item
return = it_return.
IF it_return[] IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = it_commit.
ENDIF.
Thanks and Regards,
Vadivu
‎2013 Jan 22 1:16 PM
Hi,
As I understand, you are able to create a "Material Document" but the corresponding "Transfer requirement" is not getting created automatically.
Basically, For every "Goods movement type" ( IM Movement type) there will be a corresponding "Reference Movement type" ( WM Movement type). Also the automatic creation of "Tranfer requirement" for each Goods Movement Posting can be controlled Via SPRO.
Please check the Flag" TR Create Transf.Requirement" against the Movement type in SPRO.
SPRO Path:
Logistics Execution --> Warehouse Mangement --> Interfaces --> Inventory Management --> Define Movement types --> LE-WM Interface to Inventory Management.
‎2013 Jan 22 11:28 AM
Hi
Correct the below IF check for execution of FM BAPI_TRANSACTION_COMMIT. Database commit might not be happening with this check. I think it will not be initial when material docuement is created in the system as the it will be filled with some messages.
IF it_return[] IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = it_commit.
ENDIF.
Br...
Dwaraka
‎2013 Jan 22 12:31 PM
Hi Dwaraka,
Thanks a lot for your reply. BAPI_TRANSACTION_COMMIT is being called after BAPI_GOODSMVT_CREATE but still facing the issue.
IT_RETURN will be initial if the BAPI_GOODSMVT_CREATE runs successfully. So no problem with the IF condition.
‎2013 Jan 22 1:16 PM
Hi,
As I understand, you are able to create a "Material Document" but the corresponding "Transfer requirement" is not getting created automatically.
Basically, For every "Goods movement type" ( IM Movement type) there will be a corresponding "Reference Movement type" ( WM Movement type). Also the automatic creation of "Tranfer requirement" for each Goods Movement Posting can be controlled Via SPRO.
Please check the Flag" TR Create Transf.Requirement" against the Movement type in SPRO.
SPRO Path:
Logistics Execution --> Warehouse Mangement --> Interfaces --> Inventory Management --> Define Movement types --> LE-WM Interface to Inventory Management.
‎2013 Jan 22 1:37 PM
Hi Madhan,
Thanks a lot for your reply. I will check that. Also let me know if i have missed any parameters that fails to create Transfer requirement in table LTBK.
‎2013 Jan 22 1:44 PM
Hi Madhan,
In the SPRO configuration i found that the particular movement type is not found for the warehouse. Might be the cause for the issue. Kindly suggest.
‎2013 Jan 22 1:52 PM
Hi,
Yes, I think it is the cause. It was not configured because it may be that a transfer requirement is not Practically required for this Movement type. I am not sure..
‎2013 Jan 22 1:58 PM
Thank you Madhan for your support. That movement type needs to be added for our requirement. Will try executing once it is added. Think will work after that.
Thank you once again.
‎2013 Jan 23 6:31 AM
Hi All,
Now the Transfer requirement is being created. I just passed the below parameter additionally to the goodsmvt_item table. It worked.
serialno_auto_numberassignment = ''.
Thanks and Regards,
Vadivu