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: 

BAPI_PO_CREATE1 - Get information from material master

Former Member
0 Kudos
584

Hi Experts,

Could you please help me? I'm a functional consultant and I'm evaluating the requirements for a development.

My doubt is regarding the function BAPI_PO_CREATE1, used to create purchase orders.

I would like to know what point exactly of the function BAPI_PO_CREATE1 retrieves information from material master. I mean how can I identify the function that the BAPI_PO_CREATE1 calls or line in the program used to check data from the material master to retrive information like description, material group, etc.

Best regards,

Rafael

1 ACCEPTED SOLUTION

Former Member
0 Kudos
184

Thank you guys for the answers.

After some testing I identified that in MIRO the system checks the field from material master again.

So this development would not work anyway. I'll try to find another solution.

Thank you for the comments but this thread is closed.

6 REPLIES 6

former_member185054
Active Participant
0 Kudos
184

hi Rafael,

    

     You need to pass the material master data into line item of bapi_po_create1.

for example in line item of bapi_po_create1 short text, you need to pass the description,

like wise for material group you need to pass to MATL_GROUP,

kindly check the structure BAPIMEPOITEM.

This functional module wont retreive data from master, you need to maually fetch data from tables and need to populate in item table of the bapi.

With regards,

sampath kumar.

Former Member
0 Kudos
184

Hi,

SAP has provided very good documentation for BAPI_PO_CREATE1. Go to trans SE37 with this bapi name.

Regards

Former Member
0 Kudos
184

Hi Sampath, thank you for your comment. Akthar, the first thing I did was check the documentation for this function module.

Let me explain better the issue.

The field material usage (MBEW-MTUSE) in Accounting 2 view defines what the usage of the material is. The possible values for this field are:

0             Resale

1             Industrialisation

2             Consumption

3             Asset

In Brazil, this field influences how SAP calculates the taxes in procurement processes.

There are materials that are purchases as resale but sometimes are purchases for consumption. In the PO it is not possible to open this field to the buyer define if the material usage is 0 - Resale or 2 - Consumption.

One possible standard solution is the usage of split valuation, which allows have multiple Accounting and Costing views for the same material in the same plant. But it makes the business process more complex since it is necessary to tell the system the ‘Valuation type’ in each movement you execute with the material and for the company I’m working it is not a viable option.

What I have in mind is:

For materials purchased as 0 – Resale the user will buy using the standard transaction to create the PO.

When it is necessary to buy this resale material as 2 – Consumption, the user would use a new Z transaction to create the PO and the program manipulates the material usage field.

I already identified the field MATL_USAGE (in POITEM and POITEMX) in the BAPI_PO_CREATE1, but the function module ignores this field filled manually during the execution of the BAPI in SE37. Instead, the system retrieves this information from material master.

So what I would like to know is if it is possible to identify in BAPI_PO_CREATE1 where it gets information from material master, so it would be possible to create a copy of the function module (ZBAPI_PO_CREATE1) and manipulate this field.

JL23
Active Contributor
0 Kudos
184

The F1 field help to the material usage field (which is probably a country version specific field as it is not open in my standard ERP system) says that the usage of different  indicators requires split valuation.

which means on the other hand that it does not really make sense to have just a single valuation view with a usage 0 resales in a material master but to create a PO with a usage of consumption.

former_member185054
Active Participant
0 Kudos
184

hi Rafael,


yes i think the only way is to use split valuation.

iam from india, here we are not using material usage and material orgin. kindly post this issue in MM


else,

try with lsmw or  BDC hope this problem wont come.



Regrads,

sampath kumar


Former Member
0 Kudos
185

Thank you guys for the answers.

After some testing I identified that in MIRO the system checks the field from material master again.

So this development would not work anyway. I'll try to find another solution.

Thank you for the comments but this thread is closed.