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: 

LE_SHP_DELIVERY_PROC - delivery create block failing ( CT_LOG not working properly).

Former Member
0 Kudos
707

I am using the BADI 'LE_SHP_DELIVERY_PROC' to restrict the PO to create delivery. I have used the method FILL_DELIVERY_ITEM. There after all the condition checking  I have populated the table CT_LOG with error message.

It is showing the error message in the log properly, but its creating the delivery also. Can you please help on this?

8 REPLIES 8

Former Member
0 Kudos
210

shouldnt u be using the method DELIVERY_FINAL_CHECK Method  to block the delivery ?

0 Kudos
210

I have checked in the method 'DELIVERY_FINAL_CHECK' and 'SAVE_DOCUMENT_PREPARE', populated the corresponding log table and executed VL34. In both the cases, the log is showing the error message, but the delivery is getiing created.

0 Kudos
210

i hope u are updating ct_finchdel table....can u post ur code ?

0 Kudos
210

method IF_EX_LE_SHP_DELIVERY_PROC~DELIVERY_FINAL_CHECK.

data : wa_log type FINCHDEL.


check sy-uname.

* < Conditions check>

          wa_log-msgty = 'E'.           " Message Type
          wa_log-msgid = 'Z_B_M'.    " Custom Message Class
          wa_log-msgno = '000'.         " Message Number
          wa_log-msgv1 =  'Delivery blocked -test'.

*          append the hased table.
          insert wa_log into table ct_finchdel.

          clear wa_log.


endmethod.

=========

Then I am executing the tcode VL34 with a set of PO to create delivery.

0 Kudos
210

cacn you try passing  values in

wa_log-vbeln = it_xlikp-vbeln (this is a table just pass into a work area and pass to this)

  and wa_log-pruefung = '99'

0 Kudos
210

Thanks a lottttttttt. Its working properly.

0 Kudos
210

Was those two parameters were the sole  reason ???  Please post if it was due to something else and close the thread

Thanks

0 Kudos
210

Yes, only those two parameters were missing. Once those fields were populated along with the rest...its working fine.