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: 

Query with the BAPI 'BAPI_PO_CREATE1'

former_member200345
Contributor
0 Kudos

Hi,

I am in the process of creating a ABAP program to post purchase orders in SAP. For that I am using the BAPI BAPI_PO_CREATE1 to create purchase orders.

I am passing the header and item information through an excel file to this program. The input file also contains the net price of the line item, but the net price which is being passed through the file is not considered. System is taking the net price from purchse info record.

Is there any provision in the BAPI 'BAPI_PO_CREATE1' to update the net price manually instead of purchse info record.

Thank you.

Regards,

Vijaymadhur.

3 REPLIES 3

Former Member
0 Kudos

Hello


NO_PRICE_FROM_PO = 'X'.

Former Member
0 Kudos

in the bapi mentioned there is a structure under tables

poitemx

as shown below

lt_po_items-net_price = v_konp-kbetr.

append lt_po_items.

LT_ITEMS_IND-NET_PRICE = 'X'.

append lt_items_ind.

call function 'BAPI_PO_CREATE1'

destination lv_dest

exporting

poheader = ls_poheader

poheaderx = ls_header_ind

importing

exppurchaseorder = lv_po_num

  • EXPHEADER =

tables

poitem = lt_po_items

poitemx = lt_items_ind

poschedule = lt_schedule

poschedulex = lt_schedulex

poaccount = lt_poaccount

POACCOUNTX = LT_POACCOUNTX

return = lt_return

exceptions

others = 1.

christine_evans
Active Contributor
0 Kudos

I think it depends on how the order type has been set up to deal with net price in config. When I create orders using that BAPI the net price takes the value I pass it. Try creating an order using the same order type in ME21N and see what happens. And then you'll probably need to talk to your functional people about it.