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: 

Total up PO

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

Hi,

vamsi or any body plz respond

0 Kudos

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..

0 Kudos

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