‎2007 Jan 30 6:46 AM
My requirement is:
i have a report which displays sales order, material no and rejection code in a row.
Now if i select a row and click on the user button (which i created it) the rejection should be empty ( get modified as blank in the database tables ) that is the material for that sales order should get unrejected.
Could anyone pls help me how to achieve the same thru this BAPI.
the internal table from which i display this report is itab.
thanks
John
‎2007 Jan 30 6:48 AM
Hi,
Since you have a user button, set a function code to that which will act as the user-command for that button.
In that PAI event you can capture that line details (for eg: in a at line-selection event) and modify the database table.
You dont require any BAPI FM for this.
Regards
Subramanian
‎2007 Jan 30 6:48 AM
Hi,
Since you have a user button, set a function code to that which will act as the user-command for that button.
In that PAI event you can capture that line details (for eg: in a at line-selection event) and modify the database table.
You dont require any BAPI FM for this.
Regards
Subramanian
‎2007 Jan 30 6:52 AM
‎2007 Jan 30 6:59 AM
You can use BAPI BAPI_SALESORDER_CHANGE for modifying sales order. But, first, you have to try out this BAPI with appropriate parameters and check whether it is updating as per your requirement. Then you have to use it in your report program to update it based on selection and then use interactive report technique to update list.
‎2007 Jan 30 7:02 AM
It is for sure that i need to use this BAPI
and i have devloped an interactive report
now my issues is i need to make amandments using this bapi in database tables
which i mentioned my first thread
‎2007 Jan 30 7:06 AM
That's what i said that you pass relevant details to this BAPI by filling all tables/parameters etc based on your line selection. Best thing is to try out this BAPI in SE37 and check required parameters.
‎2007 Jan 30 8:42 AM
Hi,
I did the below coding but still after doing that it is not getting updated into database tables. Pls tell me if any error
LOOP AT it_final INTO wa_final.
i_header-updateflag = 'U'.
i_item-itm_number = wa_final-vbeln.
i_item-reason_rej = '02'.
APPEND i_item.
clear i_item.
i_item_x-itm_number = wa_final-vbeln.
i_item_x-updateflag = 'U'.
i_item_x-reason_rej = 'X'.
APPEND i_item_x.
clear i_item_x.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = wa_final-vbeln
order_header_inx = i_header
TABLES
return = i_return
order_item_in = i_item
order_item_inx = i_item_x.
endloop.
‎2007 Jan 30 8:52 AM
I hope you are passing Item number in i_item-itm_number and not wa_final-vbeln which you have written. Also, check for mandatory parameters.
Once, SO is updated you need to refresh your list with new information.
‎2007 Jan 30 9:30 AM
Hi john,
This BAPi does not perform database Commit. So, You need to use the
BAPI_TRANSACTION_COMMIT function module to make the changes in the database.
Hope this should solve your purpose.
Regards,
Durga.