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: 

want to create bdc for mm03 for planned price field...

former_member193357
Participant
0 Kudos

<b>I want to create BDC for MM03 select views - Cost Estimate 2 for Planned price 3 and for FERT and plant G003 products only.</b>So my code is as follows:

In Planned price field i want net value from VAPMA (but latest Document date only) for that matnr and plant.

MY input is MATNR (in range).

*checking for FERT.

select * from mara into corresponding fields of table it_mara

where matnr in matnr

and mtart = 'FERT'.

If sy-subrc ne 0.

message e000(zp) with 'Enter Finished Product'.

endif.

*checking for Plant G003.

select * from marc into corresponding fields of table it_marc

for all entries in it_mara

where matnr = it_mara-matnr

and werks = 'G003'.

select * from vapma client specified into corresponding fields of table it_vapma

for all entries in it_marc

where mandt = sy-mandt

and matnr = it_marc-matnr

and werks = 'G003'.

*To get latest Document date for that matnr and plant

sort it_vapma descending by AUDAT.

delete adjacent duplicates from it_vapma comparing matnr.

select * from vbap client specified into corresponding fields of table it_vbap

for all entries in it_vapma

where mandt = sy-mandt

and VBELN = it_vapma-vbeln

and POSNR = it_vapma-POSNR

and PSTYV = 'TAN'.

<b>MY PROBLEM IS THAT IT WILL TAKE LOT OF TIME TO RUN THIS BDC IS THERE ANY FUNCTION MODULE OR ANY OTHER WAY TO DO THIS.</b>

Pls reply .......

(Rewards Points)......

Regards.

1 REPLY 1

Former Member
0 Kudos

Hi,

Have you tried BAPI_MATERIAL_SAVEDATA.

Regards,

Atish