cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_CREATE

Former Member
0 Kudos

Hello Everyone,

I have been using "BAPI_PO_CREATE" for creating a purchase order from Webdynpro Java. If anyone else has used this for creating a PO before, you might be able to help me to resolve my problem. The problem is:-

Everything is wokring fine apart fromt the "Quantity" field. How can I give the quantity of various Line Items? Because, the Quantity field available in the BAPI is just summing up the quantity of all the Line Items and giving it as a sum to the ECC. Please help to resolve this issue. I would appreciate your help.

I have got the screenshots for the PO Creation and PO Display. Please have a look for more understanding of my problem.

WebDynpro "Purchase Order Creation" using BAPI_PO_CREATE

http://i25.tinypic.com/2yjx4sg.jpg

"Display Purchase Order" in ECC using Transaction "ME23"

http://i29.tinypic.com/1z4whp4.jpg

The Quantity entered in Webdynpro is 1 and 2 for Line item 10 and 20 respectively. But, in ME23 it is adding the quantity and showing it as "3".

Regards,

Gopal.

Edited by: Gopal on Jul 29, 2009 2:59 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gopal,

Create PO using ME21 tcode and check it is creating correct one or wrong,so that u can be sure where the problem is i.e, in ur project or in Bapi itself.

Regards,

srikanth

Former Member
0 Kudos

Hi Srikanth,

I have created a PO using ME21 and it is creating correct one. The only problem here is with identifying the correct "Quantity" field in the BAPI_PO_CREATE. Because, there is no "Quantity" field in the BAPI Structure apart for the "Scheduled Quantity" field that I am using.

The Quantity field in ME21 is using the structure "BSTMG". Where as, the BAPI doesn't consist of this Structure at all. I haven't got a clue what to do in this situation. Could you please give me some suggestion or help me in resolving this issue. I would appreciate your help.

Regards,

Gopal.

Former Member
0 Kudos

Hi Gopal,

U must use PO Item Quantity field along with Scheduled Quantity.I think at the time of maping u have missed the Quantity filed of Item table.Please check that once.

Regards,

srikanth

Former Member
0 Kudos

Hi Srikanth,

Thanks a lot for your reply.

U must use PO Item Quantity field along with Scheduled Quantity

Could you please explain me about this Srikanth. Because I dont really understand the way it is working. Because, the BAPI is inputting the Value of Scheduled Quantity in to the PO Quantity field automatically. And I cant see the PO Quantity values in ME23 when I am displaying the purchase order. Do you understand what I mean? Let me know if this is not clear.

Regards,

Gopal.

Former Member
0 Kudos

Hi Gopal,

Please try executing BAPI by passing the same values which you pass in webdynpro application. So that you can get better idea how BAPI is working and what are the fields you need to map either only Item level quantity or both item level and schedule level quantity.

Please check the BAPI "BAPI_PO_CREATE1" for this requirement.

Regards,

Srikanth

Former Member
0 Kudos

Hi Gopal,

Just check with functional person as what are the mandatory fields to be given as input for that BAPI. If every thing is clear then perform external debugging and ensure that right values are coming from webdynpro program to BAPI.

Regards

Raghu

Answers (0)