01-28-2008 2:18 PM
hi,
Could any body plz explain me how to do this
A new field could be added to custom table zmm_dscs and total up any po line item which is purchased for material group
74055(ekpo_matkl)
Reward u if useful
anybody plz respond
Edited by: sukruthi raj on Jan 28, 2008 3:51 PM
01-28-2008 3:03 PM
Hi,
You can add a field to the ztable and write a program to sum all the similar records for material group and modify the ztable.
Thanks,
Vamshi.
01-28-2008 3:03 PM
Hi,
You can add a field to the ztable and write a program to sum all the similar records for material group and modify the ztable.
Thanks,
Vamshi.
01-28-2008 3:16 PM
hi vamshi,
Actually the ztable zmm_dscs doesn't contain matkl it is ekpo .I added the field netpr to the table ztable
since it is an empty how i have retrieve date into the field i added Plz reply.
could any body explain how to fill the netpr field that i added in ztable
the price(netpr) has to get based on(puchase order) ebeln.
because for the material group matkl there are many prices (netpr)
Edited by: sukruthi raj on Jan 28, 2008 4:29 PM
Edited by: sukruthi raj on Jan 28, 2008 4:50 PM
01-28-2008 4:06 PM
Hi,
Your ztable does not have any data. So you want to populate it based on the po line item calculating netpr for each material group.
write a program as follows
Select the data from EKPO based on the selection criteria.
based upon the po # and the material group, calculate the total for the netpr field.
after the calculation is done for the records, insert the values into the ztable.
or if the Ztable already has records other than the new field added(Blank netpr), modify the ztable for the new netpr field.
Thanks,
Vamshi.
01-28-2008 4:28 PM
the ztable has already fields other than netpr,
Could u plz give me the select query to poupulate the netpr field and how to modify the ztable .Plz reply me
i wrote the query to populate the field as
select netpr into corresponding fields of table i_netpr
from ekpo where matkl eq '74055'
but it is taking more time Plz suggest
Edited by: sukruthi raj on Jan 28, 2008 5:29 PM
any body plz respond
Edited by: sukruthi raj on Jan 28, 2008 5:52 PM
01-28-2008 6:09 PM
01-28-2008 6:38 PM
First thing U need to check how the other fields in the table are filled ..
If there are very less items they fill manually also..
If there is a program to update the fields check the select statements used to update if any of the fields are getting updated frm the same table .. just add your field to the existing code
Into corresponding fields might cause the performance..
01-29-2008 12:47 AM
hi abaper,
Actually they are updating the zmm_dscs
loop at i_zmm_dscs into wa_zmm_dscs.
select single * from zmm_dscs where kostl = wa_zmm_dscs-kostl
and zz_dteca = wa_zmm_dscs-zz_dteca.
if sy-subrc = 0. "update the record.
update zmm_dscs set: zz_proos = wa_zmm_dscs-zz_proos
zz_proms = wa_zmm_dscs-zz_proms
zz_procs = wa_zmm_dscs-zz_procs
zz_cdate = wa_zmm_dscs-zz_cdate
zz_ctime = wa_zmm_dscs-zz_ctime
where kostl = wa_zmm_dscs-kostl
and zz_dteca = wa_zmm_dscs-zz_dteca.
else. "insert the record
insert into zmm_dscs values wa_zmm_dscs.
endif.
clear: wa_zmm_dscs.
endloop.
but still in the zmm_dscs i have to fill the netpr field for totalling the line items how to fill the netpr field
and how to display that