05-15-2007 7:30 AM
i have to update the editable field (arktx) of sales order of alv using bapi_salesorder_change. can any one tell me the flow and how to use it.
05-15-2007 7:35 AM
hi
after editing the value in list and after save
u capture that values in an internal table ...
then pass this internal table to bapi
05-15-2007 7:45 AM
Hi,
You can add the deatails to "ORDER_ITEM_IN" structure and update it.
Hope this solves your purpose.
Award points if it helps.
-Gaurang
05-15-2007 7:49 AM
Hi,
Check this ..
Have an button in the ALV output list so that the selected record is updated.
Folllow the steps....
1. In the FM ALV list call use
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = g_f_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
<b><b> i_callback_user_command = 'USER_COMMAND'</b></b>
2. write form
FORM user_command USING i_f_ucomm LIKE sy-ucomm
i_r_selfield TYPE slis_selfield.
CASE i_f_ucomm.
WHEN 'UPDATE'. " ( command given to the button )
here u use the FM bapi_salesorder_change
endform.
3. How to use bapi_salesorder_change
PARAMETER to be passed
1. SALESDOCUMENT = document number.
2. ORDER_HEADER_INX .....
ORDER_HEADER_INX-updateflag = 'U'.
3. ORDER_ITEM_IN
ORDER_ITEM_IN-ITM_NUMBER = POSNR
ORDER_ITEM_IN-SHORT_TEXT = ARKTX field ( modified one )
4. ORDER_ITEM_INX
ORDER_ITEM_INX- ITM_NUMBER = POSNR
ORDER_ITEM_INX-UPDATEFLAG = 'U'.
ORDER_ITEM_INX-SHORT_TEXT = 'X'.
-
Patil