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: 

regarding bapi_salesorder_change

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

santhosh_patil
Contributor
0 Kudos

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