05-26-2006 11:27 PM
Hi!
I need to update the delivery block field of a sales order.
I am using 'BAPI_SALESDOCUMENT_CHANGE' and passing
delivery block also.
ls_order_header_in-dlv_block = lp_lifsk.
ls_order_header_inx-dlv_block = lp_lifsk.
Could you please let me know how to achieve it.
Thanks.
-Shreyas
PS: Helpful answers will be rewarded.
05-27-2006 12:11 AM
Hi,
Check whether u call this function module 'BAPI_TRANSACTION_COMMIT' and check whether u have set this flag ls_order_header_inx-updateflag = 'U'.
Adithan S.
05-27-2006 11:34 AM
Hello,
I see that you are using the same field (lp_lifsk) to fill both structures ( HeaderIn and HeaderInX ).
In fact dlv_block in HeaderInX is a CHAR1, and should be filled with an X if you want to update the field.
Don't forget to set the UpdateFlag in HeaderInx to 'U'.
Regards,
Ivo Martins
10-21-2008 2:35 PM
Hi
please check the following code ..hope it will help you
LOOP AT l_i_headr ASSIGNING <l_fs_headr>.
l_wa_order_in-dlv_block = space(the desired value which u want to update).
l_wa_header_inx-updateflag = l_c_update.
l_wa_header_inx-dlv_block = l_c_set.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = <l_fs_headr>-vbeln
order_header_in = l_wa_order_in
order_header_inx = l_wa_header_inx
TABLES
return = l_i_return.
Check for abort messages and error messages
LOOP AT l_i_return TRANSPORTING NO FIELDS WHERE type EQ l_c_abort OR
type EQ l_c_error.
Set the flag to indicate that there is an error.
l_v_error_flg = l_c_set.
ENDLOOP.
*Commit the changes in the database only if there are no errors
IF l_v_error_flg IS INITIAL.
*UPDATE the delivery block to space
Commit work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = space.
ELSE.
Roll back the changes if there are errors.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
ENDLOOP.
10-21-2008 2:36 PM
try
ls_order_header_inx-dlv_block = 'X'
ls_order_header_inx-Updateflag = 'U'.
10-15-2009 3:34 PM
Hi Experts,
I too have the same issue.
If it is resolved, please let me know the solution.
Thanks much in advance.
Best regards,
Naveen
10-15-2009 3:34 PM
Hi Experts,
I too have the same issue.
If it is resolved, please let me know the solution.
Thanks much in advance.
Best regards,
Naveen
10-15-2009 3:39 PM
Hi Experts,
I too have the same issue.
If it is resolved, please let me know the solution.
Thanks much in advance.
Best regards,
Naveen
10-15-2009 4:43 PM
Hi Experts,
I too have the same issue.
If it is resolved, please let me know the solution.
Thanks much in advance.
Best regards,
Naveen