cancel
Showing results for 
Search instead for 
Did you mean: 

Dump in document flow updation manually

former_member594288
Participant

Hi,

I want to update a transfer order in the document flow for the outbound delivery. I wrote the below code but it is giving assertion failed dump. I debugged the code and it is checking vbfa-ruuid is not initial, here i am getting dump. i used the below code can you suggest me to the right direction.

I_DOCUMENT = '0080004060'.

ls_xvbfa-mandt = sy-mandt.

ls_xvbfa-vbelv = I_DOCUMENT. " "delievry

ls_xvbfa-posnv = '000010'.

ls_xvbfa-vbeln = '0000154166'. "transfer order

ls_xvbfa-posnn = '000001'.

ls_xvbfa-vbtyp_n = lc_w.

ls_xvbfa-vbtyp_v = lc_j.

ls_xvbfa-erdat = sy-datum.

ls_xvbfa-erzet = sy-uzeit.

ls_xvbfa-updkz = 'I'.

APPEND ls_xvbfa TO lt_xvbfa.

lv_type = 'H'.

CALL FUNCTION 'RV_DOCUMENT_FLOW_UPDATE_U'

EXPORTING

f_vbeln = i_document "delivery

i_status = lv_type

TABLES

fxvbfa = lt_xvbfa

fyvbfa = lt_yvbfa.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

Regards,

Ravi

former_member594288
Participant
0 Kudos

I declared lv_type with data element type only. Do we need to pass guid for the vbfa structure?

former_member1716
Active Contributor
0 Kudos
ravi_sdn,No its wrong, Even though you declared via data element the receiving parameter I_STATUS has a structure assigned to it.So it is mandatory you feed the right field with 'H'. Change that code.Also i would recommend the below approach, Pass on all the values directly to the FM through SE37 transaction and see what is the results you get.Regards!
former_member284740
Participant
0 Kudos

I'm on 7.4 and I_STATUS is not a structure. It's I_STATUS LIKE T180-TRTYP. So from my point of view it's not wrong.

VeselinaPeykova
Active Contributor
0 Kudos

Why do you need to update manually the document flow of the delivery?

If memory serves, you don't need to do this with L_TO_CREATE_DN(_MULTIPLE).

Accepted Solutions (0)

Answers (1)

Answers (1)

DominikTylczyn
Active Contributor

Hi Ravi, stop trying to create TO against outbound delivery with L_TO_CREATE_SINGLE function - see you other question: Dynamic storage bin issue while creating Transfer Order

That's the root cause of your problem: first you create a TO with a wrong function that doesn't update delivery document flow, then you try to fix that with a manual update of the flow.

Instead as advised already use L_TO_CREATE_DN function to create TOs against outbound delivery.

L_TO_CREATE_SINGLE works similar to LT01, whereas L_TO_CREATE_DN - similar to LT03. LT01 doesn't work with outbound deliveries hence your problems.

Dominik Tylczynski

VeselinaPeykova
Active Contributor

For the sake of completeness - L_TO_CREATE_SINGLE (or LT01) for deliveries makes sense mainly for cancellations where you cannot use LT0G.

For other scenarios - it is not recommended.

DominikTylczyn
Active Contributor
0 Kudos

veselina.peykova You are right, L_TO_CREATE_SINGLE might be used for delivery cancellations. However it will update neither document flow nor delivery status. Hence LT0G is preferable if it can be used.

Dominik Tylczynski