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: 

PO service is not created using BAPI_PO_CREATE FM

Former Member
0 Kudos

Hi,

CALL FUNCTION 'BAPI_PO_CREATE'

EXPORTING

po_header = wa_header

po_header_add_data = wa_hdr_add

header_add_data_relevant = wa_hdr_flg

IMPORTING

purchaseorder = v_po

TABLES

po_items = i_line

po_item_schedules = i_sch

po_item_account_assignment = i_po_acc

po_services = i_po_ser

po_srv_accass_values = i_po_srv

po_services_text = i_po_sertxt

return = i_return

poaddrdelivery = i_del_addr.

TheIT_RETURN returned me the below 2 lines.

1. Sum of percentages >200.0< exceeds 100 %

2. Document contains no items

Regards

Deepthi.

5 REPLIES 5

Former Member
0 Kudos

Could you kindly check if you are passing the line item number properly.

0 Kudos

Hi,

I have checked the line item...in all i have passed he line item value as 000010.

cheers,

Deepthi.

Former Member
0 Kudos

Hi,

i think there is something wrong with your data (200% > 100%??).

Look into the data. If you cannot find the mistake, please show how you fill the data.

Regards, Dieter

0 Kudos

Hi,

wa_header-DOC_DATE = 20080901

wa_header-DOC_TYPE = 'Z0RD'.

wa_header-CO_CODE = '3082'.

wa_header-PURCH_ORG = 'P000'.

wa_header-PUR_GROUP = '052'..

wa_header-VENDOR = '0005021295'.

wa_header-CREATED_BY = sy-uname.

wa_header-ZZEXPTYPE = '9015'.

wa_hdr_add-PMNTTRMS = 'Z004'.

wa_hdr_add-CURRENCY = 'USD'.

wa_hdr_add-REF_1 = 'CONVERSION'.

wa_hdr_add-OUR_REF = '5172APN'.

wa_hdr_flg = 'X'.

w_line-PO_ITEM = '00010'.

w_line-ITEM_CAT = '9'.

w_line-ACCTASSCAT = 'N'.

w_line-MAT_GRP = '088'.

w_line-SHORT_TEXT = 'Alarm System Installation'.

w_line-DISTRIB = space.

w_line-PLANT = '3082'.

w_line-UNIT = 'AU'.

w_line-NET_PRICE = '2000.0000'.

w_line-PCKG_NO = '0000000010'.

w_line-TRACKINGNO = '10'.

w_line-TAX_CODE = 'I0'.

append w_line to i_line.

w_sch-PO_ITEM = '00010'.

w_sch-SERIAL_NO = '01'.

w_sch-DELIV_DATE = '20100901'.

w_sch-QUANTITY = '2000.000'.

w_sch-CREATE_IND = 'X'.

append w_sch to i_sch.

w_po_acc-PO_ITEM = '00010'.

w_po_acc-SERIAL_NO = '01'.

w_po_acc-w_po_acc-w_po_acc-QUANTITY = ' 2000.000'.

w_po_acc-DISTR_PERC = '0.0'.

w_po_acc-G_L_ACCT = '0000622025'.

w_po_acc-CO_AREA = 'FC01'.

w_po_acc-NETWORK = '000004003658'.

w_po_acc-ACTIVITY = '0210'.

append w_po_acc to i_po_acc.

w_po_ser-PCKG_NO = '0000000010'.

w_po_ser-LINE_NO = '0000000001'.

w_po_ser-w_po_ser-SUBPCKG_NO = '0000000010'.

w_po_ser-QUANTITY = '2000.00'.

w_po_ser-BASE_UOM = 'LE'.

w_po_ser-GR_PRICE = '1.00'.

w_po_ser-SHORT_TEXT = 'Alarm System Installation'.

w_po_ser-distrib = space.

w_po_ser-TAX_CODE = 'I0'.

w_po_ser-MATL_GROUP = '001'.

append w_po_ser to i_po_ser.

w_po_srv-PCKG_NO = '0000000010'.

w_po_srv-LINE_NO = '0000000001'.

w_po_srv-PERCENTAGE = '100.0'.

w_po_srv-SERIAL_NO = '01'.

w_po_srv-QUANTITY = '1.00'.

append w_po_src to i_po_srv

w_po_sertxt-PCKG_NO = '0000000010'.

w_po_sertxt-LINE_NO = '0000000001'.

w_po_sertxt-TEXT_LINE = 'CONVERSION'.

append w_po_sertxt to i_po_sertxt.

w_del_addr-po_item = '00010'.

w_del_addr-addr_no = '0000068279'.

append w_del_addr to i_del_addr.

data: v_po TYPE ebeln,

i_return TYPE STANDARD TABLE OF bapireturn.

CALL FUNCTION 'BAPI_PO_CREATE'

EXPORTING

po_header = wa_header

po_header_add_data = wa_hdr_add

header_add_data_relevant = wa_hdr_flg

IMPORTING

purchaseorder = v_po

TABLES

po_items = i_line

po_item_schedules = i_sch

po_item_account_assignment = i_po_acc

po_services = i_po_ser

po_srv_accass_values = i_po_srv

po_services_text = i_po_sertxt

return = i_return

poaddrdelivery = i_del_addr.

Regards,

Deepthi.

Former Member
0 Kudos

There is problem with BAPI_PO_CREATE instead please use BAPI_PO_CREATE1 which works perfectly in all scenarios.