2008 Apr 22 8:22 AM
Dear friends,
I have to update standard table EKPO. in EKPO i have to update field NETPR. I have value in one varible. I have purchasing document number, Item number and material number also.
How to do this. Please let me know.
Thanks in advance
Regards,
Ajay
Dear friends,
I have to update standard table EKPO. in EKPO i have to update field NETPR. I have value in one varible. I have purchasing document number, Item number and material number also.
How to do this. Please let me know.
Thanks in advance
Regards,
Ajay
2008 Apr 22 9:23 AM
hi,
Do you have access for standard table.
if not Write a small program to update netpr value
using update statement addition with set.
2008 Apr 22 9:26 AM
Hello Ajay-
Follow the below steps to update standard table EKPO.
Pull the particular using select statement.
data:i_vbap type table of vbap,
w_vbap type vbap.
select * from vbap into table i_vbap
where matnr eq ** and
posnr eq *** and.........
if only 1 record
Read i_vbap into w_vbap index 1.
if sy-subrc eq 0.
vbap-netpr = v_netpr. *** the value in variable
vbap-matnr = w_ivbap-matnr.
vbap-......follow the sequence.
MODIFY vbap FROM w_vbap.
****if multiple records.
Loop at i_vbap into w_vbap.
vbap-netpr = v_netpr. *** the value in variable
vbap-matnr = w_ivbap-matnr.
vbap-......follow the sequence.
MODIFY vbap FROM w_vbap.
endloop.
Cheers,
~Srini....
2008 Apr 22 9:35 AM
Dear Srini,
that logic updates only EKPO table, not all related tables. I hope there will be function module for that to change.
Please suggest.
Thanks,
Ajay
2008 Apr 22 9:35 AM
Hi,
Select the values from datbase table based on the PO No and the Line item no into a internal table which have the same structure as the database table which you are updating.
Change the value of the NETPR and updatate it. Please note that the structure of the internal table is same as the database table.
regards
Sourabh