‎2008 Feb 29 6:52 AM
Hi Friends,
I have a sales order no, here i want to change delivery block(Header)and make them space. here i am passing salesorder no and passing DLV_BLOCK = space and using
UPDATEFLAG = 'U'. but also it is not changing that record.
can any one help me its urgent.
Please find my code
t_BAPISDH1-COLLECT_NO = i_list-vbeln.
t_BAPISDH1-DLV_BLOCK = space.
APPEND t_BAPISDH1.
CLEAR t_BAPISDH1.
t_bapisdh1x-UPDATEFLAG = 'X'.
APPEND t_bapisdh1x .
CLEAR t_bapisdh1x.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = i_list-vbeln
order_header_in = t_BAPISDH1
order_header_inx = t_bapisdh1x
TABLES
return = t_bapiret2
schedule_lines = t_bapischdl
schedule_linesx = t_bapischdlx
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Or else i want to change this code.
Regards,
DVNS
‎2008 Feb 29 7:03 AM
you also have to pass DLV_BLOCK = 'X' in ORDER_HEADER_INX parameter.
t_BAPISDH1-COLLECT_NO = i_list-vbeln.
t_BAPISDH1-DLV_BLOCK = space.
APPEND t_BAPISDH1.
CLEAR t_BAPISDH1.
t_bapisdh1x-UPDATEFLAG = 'X'.
t_bapisdh1x-DLV_BLOCK = 'X'.
APPEND t_bapisdh1x .
CLEAR t_bapisdh1x.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = i_list-vbeln
order_header_in = t_BAPISDH1
order_header_inx = t_bapisdh1x
TABLES
return = t_bapiret2
schedule_lines = t_bapischdl
schedule_linesx = t_bapischdlx
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Edited by: Abhishek Sarkar on Feb 29, 2008 8:03 AM
‎2008 Feb 29 7:03 AM
Hi,
You have not populated one field. Hence it was not changing the record. The change has been highlighted: (t_bapisdh1x-DLV_BLOCK = 'X' - INX for dlv_block has to be set to X)
t_BAPISDH1-COLLECT_NO = i_list-vbeln.
t_BAPISDH1-DLV_BLOCK = space.
APPEND t_BAPISDH1.
CLEAR t_BAPISDH1.
t_bapisdh1x-UPDATEFLAG = 'X'.
t_bapisdh1x-DLV_BLOCK = 'X'.
APPEND t_bapisdh1x .
CLEAR t_bapisdh1x.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = i_list-vbeln
order_header_in = t_BAPISDH1
order_header_inx = t_bapisdh1x
TABLES
return = t_bapiret2
schedule_lines = t_bapischdl
schedule_linesx = t_bapischdlx
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Thanks
Vijay
‎2008 Feb 29 7:16 AM
Hi Friends,
Tks for your replay.
but also that sales document no is not updating
Kindly help m e friends,
Regards,
DVNS
‎2008 Feb 29 7:20 AM
Hi
Can you tell the contents of the bapi return table t_bapiret2 on execution (find this in debugging mode).
Thanks
Vijay
‎2008 Feb 29 7:34 AM
Hi Vijay,
Return parameter is showing
Field header_inx-updateflag is not an input field
Can you please help me.
Regards,
DVNS
‎2008 Apr 09 4:17 AM
hi,
i'm able to update the header block to blank with the following.
*update header level delivery block
v_head1x-DLV_BLOCK = 'X'.
v_head1x-updateflag = 'U'.
v_head-DLV_BLOCK = w_so-vlifsk.
only thing is i'm not able to update those header block which is blank to other value.