10-25-2007 4:00 PM
Hi-
I have problem doing post Goods issue for the Delivery....I was using WS_DELIVERY_UPDATE_2 but I don't see any error and also nothing is updating when I look at VL03N...
We are trying to do Goods issue for the Delivery using Catch Weight Material...
I appreciate if anyone can answer to my question...I will assgin reward points!!!
Thanks,
Sony
10-25-2007 4:02 PM
10-25-2007 4:04 PM
HI ,
Are you making the COMMIT flag in the function module to X. I think you have to make that X to make it work.
Lincon
10-25-2007 4:14 PM
Lincon-
I did that...Can you please send me the sample code if you have...Even I used BAPI BAPI_OUTB_DELIVERY_CONFIRM_DEC to post goods issue...It is working for normal Material but it is not working for Catch Weight Material...
Thanks For Reply...
10-25-2007 4:43 PM
Hi-
CAn anyone help me to findout to post goods issue for the delivery using Catch Weight Material?
I will assgin reward points!!!
Thanks,
Sony
10-25-2007 4:52 PM
Hello Sony,
No need to mention about reward points ,if you get answer then you can assign points.
First create post goods issue manually if you are able to do manually then you will able to post goods issue using programtically.
Try to go VL02n -> enter delivery number here -> click on post goods issue -> if you get sucess message then you can use Function module.
Check the below program :
DATA: d_delivery LIKE wiso_dlvhd-deliv_numb.
DATA: d_return LIKE bapireturn1.
DATA: d_success TYPE c.
DATA: d_message(200) TYPE c.
DATA: l_vbeln LIKE likp-vbeln,
l_vbkok LIKE vbkok,
l_prott LIKE prott OCCURS 0 WITH HEADER LINE,
ef_error_any_0 TYPE c,
ef_error_in_item_deletion_0 TYPE c,
ef_error_in_pod_update_0 TYPE c,
ef_error_in_interface_0 TYPE c,
ef_error_in_goods_issue_0 TYPE c,
ef_error_in_final_check_0 TYPE c.
CLEAR: d_return,
l_prott,
l_vbeln,
l_vbkok.
REFRESH l_prott.
CLEAR: ef_error_in_item_deletion_0 ,
ef_error_in_pod_update_0 ,
ef_error_in_interface_0 ,
ef_error_in_goods_issue_0 ,
ef_error_in_final_check_0 .
carry out goods issue
l_vbeln = d_delivery. " Give the delivery number
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
SET UPDATE TASK LOCAL.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = l_vbkok
synchron = ' '
no_messages_update = ' '
update_picking = 'X'
commit = 'X'
delivery = l_vbeln
nicht_sperren = 'X'
if_error_messages_send_0 = space
IMPORTING
ef_error_any_0 = ef_error_any_0
ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
ef_error_in_pod_update_0 = ef_error_in_pod_update_0
ef_error_in_interface_0 = ef_error_in_interface_0
ef_error_in_goods_issue_0 = ef_error_in_goods_issue_0
ef_error_in_final_check_0 = ef_error_in_final_check_0
TABLES
prot = l_prott
EXCEPTIONS
error_message = 1
OTHERS = 2.
comitt work and wait.
Thanks
Seshu
10-25-2007 5:31 PM
Thanks Sesu...
Can you please let me know what are the values to be passed at the item level?
Thanks,
Sony
10-25-2007 5:36 PM
Just you need to pass delivery number,internall it checks all line items and if any line item has any issue then post goods issue will not happen.
That is why i said that create post goods issue manually first and then use program.
Just refer my program in previous reply.
Good luck
Thanks
Seshu
01-10-2023 8:18 PM
FORM post_delivery USING lv_ebeln TYPE char10
CHANGING ch_error TYPE flag.
DATA: vbkok LIKE vbkok,
prot LIKE prott OCCURS 0 WITH HEADER LINE.
DATA: lin TYPE p.
vbkok-vbeln_vl = lv_ebeln.
vbkok-wabuc = 'X'.
CLEAR prot.
REFRESH prot.
CALL FUNCTION 'HU_PACKING_REFRESH'.
CALL FUNCTION 'LE_DELIVERY_REFRESH_BUFFER' "v_n_841001
EXPORTING
if_vbeln = lv_ebeln
EXCEPTIONS
no_key_specified = 1
OTHERS = 2. "^_n_841001
*.......Post delivery,update document flow....................
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = vbkok
delivery = lv_ebeln
commit = 'X'
TABLES
prot = prot
EXCEPTIONS
error_message = 99.
IF sy-subrc <> 0.
MESSAGE s000(zmm) WITH 'Something went wrong!' DISPLAY LIKE 'E'.
ch_error = 'X'.
ENDIF.
ENDFORM.