2012 Nov 19 2:13 PM
Hi guys,
Is there any bapi that helps me read valuationdata for more than 1 material at a time?
I want to get the price and the valuation class for about 500 materials at a time.
2012 Nov 19 2:39 PM
I dont think there is any BAPI which suits your need. may be you need to do it in LOOP ENDLOOP
2012 Nov 19 2:41 PM
That's what I did and it doesn't help me because it takes about 2 seconds/material... and I have more than 81.000
2012 Nov 19 2:45 PM
There isn't something like in RFC_READ_TABLE where you can add more fields or options?
Set RfcCallTransaction = Functions.Add("RFC_READ_TABLE")
Set strExport1 = RfcCallTransaction.exports("QUERY_TABLE")
Set strExport2 = RfcCallTransaction.exports("DELIMITER")
Set tbloptions = RfcCallTransaction.tables("OPTIONS")
Set tblData = RfcCallTransaction.tables("DATA")
Set tblFields = RfcCallTransaction.tables("FIELDS")
strExport1.Value = "MARD"
strExport2.Value = ";"
tbloptions.Appendrow
tbloptions(1, "TEXT") = "WERKS EQ '0001' AND LABST NE '0'"
tbloptions.Appendrow
tbloptions(2, "TEXT") = "OR UMLME NE '0' OR EINME NE '0'"
tbloptions.Appendrow
tbloptions(3, "TEXT") = "OR SPEME NE '0' OR RETME NE '0'"
tblFields.Appendrow
tblFields(1, "FIELDNAME") = "MATNR"
tblFields.Appendrow
tblFields(2, "FIELDNAME") = "LGORT"
tblFields.Appendrow
tblFields(3, "FIELDNAME") = "LABST"
tblFields.Appendrow
tblFields(4, "FIELDNAME") = "UMLME"
tblFields.Appendrow
tblFields(5, "FIELDNAME") = "INSME"
tblFields.Appendrow
tblFields(6, "FIELDNAME") = "EINME"
tblFields.Appendrow
tblFields(7, "FIELDNAME") = "SPEME"
tblFields.Appendrow
tblFields(8, "FIELDNAME") = "RETME"
There isn't something similar that works with BAPI_MATERIAL_GET_ALL?
2012 Nov 19 2:48 PM
Did you tried selecting direclty from databse table MBEW using for all entries on your materials table?
2012 Nov 19 2:49 PM
I don't have access to MBEW... that's why I was using bapi_material_get_all.
2012 Nov 19 2:53 PM
May be you can ask to create a small custom function module to solve your purpose.
2012 Nov 19 2:39 PM
or can I pass multiple materials at once to bapi_material_get_all?
2012 Nov 20 8:55 AM
So there is no way to check the valuation data for more than 1 material at a time?
2012 Nov 20 9:21 AM
Hello Andrei,
I think You Could write a Wrapper Function module in Which you would call a bapi inside a loop and get your thing done.
You can try for MATERIAL_READ_MABW or check with MATERIAL_READ*
MATERIAL_PRE_READ_MBEW
Hope this helps,
Anup