Issue BAPI_PO_CREATE1
Hi,
I am creating Purchase order using the BAPI , BAPI_PO_CREATE1, but the problem is that, when I am passing new Net_price in ITEM and 'X' in ITEMX for the same, the Po is created but the price I passed is not there it is adopted from OLD. What Parameter I have to pass so that my Po is created with new price.
thanks
bobby
Hello,
You have to populate internal tables pocond and pocondx with values for itm_number,cond_st_no,cond_count,cond_value,cond_type, currency and change_id. Then call BAPI_PO_CREATE1.
Thanks,
Venu
Similar Messages
-
Stock Transfer Order: Delivery date issue BAPI_PO_CREATE1
Hi,
I am creating STO using Inbound Delivery data from BAPI_PO_CREATE1
inbound shipping date is 30 may 2014.
Passing below data
HeaderData:
doc_type = 'UB'. "STO
suppl_plnt = '101'
doc_date = inbound shipping date.
comp_code = '1000'
purch_org = '20'
pur_group = '200'
Headerx Data:
doc_type = X
suppl_plnt = X
doc_date = X.
comp_code = X
purch_org = X
pur_group = x
Item Data:
Po_item = tabix of loop
Material = material from Inbound delivery item
plant = '101'
strge_loc = W.
Qunatity = from Inbound item only.
ItemX Data:
Po_item = X
Material = X
plant = 'x
strge_loc = X.
Qunatity = X.
Schedule Line Data:
po_item = tabix of loop
schedule_line = '001'
delivery_date = shipping date
del_datcat_ext = 'D'.
Quantity = quantity from Inbound item.
call function 'bapi_po_create1'.
exporting
poheader = header data
poheaderx = headerx data
importing
exppurchaseorder = po
table
return = return
poitem = item data
poitemx = itemx data
poschedule = schedule data
poschedulex = schedulex data.
when i am creating STO with above method STO is getting created and all data in it also correct but delivery date is 20th june 2014
instead of 30 may 2014.
it is coming as there is planned delivery time that is 21 so it is showing 20th june 2014.
but i need this value as 30th may 2014 only.
please help me on that.
thanks in advance.
Regards,
GauravHello,
You have to populate internal tables pocond and pocondx with values for itm_number,cond_st_no,cond_count,cond_value,cond_type, currency and change_id. Then call BAPI_PO_CREATE1.
Thanks,
Venu -
BAPI_PO_CREATE1 use in a loop - net price issue
Hi,
I'm using BAPI_PO_CREATE1 within a loop to create a PO with multiple items - grouped by vendor, plant and delivery date. After each BAPI call I use BAPI_TRANSACTION_COMMIT with WAIT = 'X', further I track the results from BAPIRETURN into some kind of log. All my structures and internal tables used in the bapi interface are cleared/freed after each call in order not to have inconsistent data. I'm passing only 1 condition 'PBXX' with net price. I'm passing 2 records in the condition table - 1st with CHANGE_ID = 'D', and second one with CHANGE_ID = 'I'. Further, I set (no_price_from_po = 'X') and (memory_uncomplete = 'X')
At the tests I used the same material vendor and plant in all items and only delivery date is different in order to create few orders one after another. Even price is changed for each item.
First of my PO within a loop is created as expected - with correct price value, even if the combination material/plant is passed twise and the resulted PO have 2 items.
The issue I have is comming out at the next PO-s (2nd, 3th..) - the system returns error message:
E-218 Net price must be greater than 0
I stuck right here. Tried quite a lot of different screnarios without success. Further tried even different vendor/material/plant for the second PO. Checked also the forum posts before to consider to write this one - haven't found anything relevant which might be of any help.
Any ideas what is wrong?
Thanks in advance.
Regards,
Ivaylo MutafchievHi,
in fact my price values were not so small - 2.15, 1.55, 2.45, etc... but nothing less than 1.00. Nevertheless, you pointed me to the right direction - to search OSS for the answer. OSS Note 571860:
https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=571860
helps me to find out what I missed in my scenario: I didn't set ITEM-NET_PRICE at all, just via condition table. Now, when I added the following:
item-net_price = some_price. itemx-net_price = 'X'.
item-po_price = '2'. itemx-po_price = 'X'. " <-- in fact, PO is created even without this line
all of my POs are created with correct prices from the input.
Problem solved.
Thanks!
Ivaylo -
Issue in BAPI_PO_CREATE1 in extension structure while populting data
Hi,
Getting issue when populating data in custome field through bapi_po_create1.
Requiredment
Need to populate different different shipment type number in every line item ,but when i am using below code it only populating
last shipment type number in every line item while creation of STO.
Please see the below code for populating data in custome field
CLEAR wa_extensionin.
MOVE 'BAPI_TE_MEPOITEM' TO wa_extensionin-structure.
wa_bapi_te_mepoitem-po_item = wa_itab-item.
* wa_bapi_te_mepoitem-zdummy = c_x.
wa_bapi_te_mepoitem-zvsart = wa_itab-shp_type.
CONCATENATE wa_bapi_te_mepoitem-po_item
'X00000000000000000000000000000' wa_bapi_te_mepoitem-zvsart
INTO wa_extensionin-valuepart1.
APPEND wa_extensionin TO ltab_extensionin.
CLEAR wa_extensionin.
MOVE 'BAPI_TE_MEPOITEMX' TO wa_extensionin-structure.
wa_bapi_te_mepoitemx-po_item = wa_itab-item.
wa_bapi_te_mepoitemx-zvsart = 'X'.
CONCATENATE wa_bapi_te_mepoitemx-po_item
'0000000000' wa_bapi_te_mepoitem-zvsart
INTO wa_extensionin-valuepart1.
APPEND wa_extensionin TO ltab_extensionin.
please some one help me how to solve it.
Regards,
SibaTry with this piece of code:
DATA:
wa_bapi_te_mepoitem LIKE bapi_te_mepoitem,
wa_bapi_te_mepoitemX LIKE bapi_te_mepoitemx.
wa_bapi_te_mepoitem-po_item = wa_itab-item.
wa_bapi_te_mepoitem-zvsart = wa_itab-shp_type
wa_extensionin-structure = 'BAPI_TE_MEPOITEM'.
wa_extensionin-valuepart1 = wa_bapi_te_mepoitem.
APPEND wa_extensionin TO ltab_extensionin.
wa_bapi_te_mepoitemX-po_item = wa_itab-item.
wa_bapi_te_mepoitemX-zvsart = 'X'
wa_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
wa_extensionin-valuepart1 = wa_bapi_te_mepoitemX.
APPEND wa_extensionin TO ltab_extensionin.
Regards,
Felipe -
BAPI_PO_CREATE1 and PO output issue
All,
I am having the following issue.
We use BI Integrated Planning to drive our purchasing. I have developed code within an extractor that will create PO's in ERP based on BI cube data.
I use BAPI_PO_CREATE1 to create the PO in ERP. As background I created tables to match the BAPI_PO_CREATE1 structures in the BI system and then created a z function module to pass data from BI to ERP and then call the SAP Standard BAPI_PO_CREATE1.
My issue is as follows:
I can send across the relevant BI user and this sets the PO creator to be the correct user. However the output associated with the PO is being set as the BWREMOTE user. As a result the email output from the PO is picking the BWREMOTE user as the person sending the email (can see it in SCOT) and not the actual user.
Is there a way to ensure that the PO message (Output) creator can be modified and set to the correct user and not be the BWREMOTE user?
Thanks in advance
EddieI don't have any value from POITEM-NET_PRICE....
In my program i have:
WO_POHEADER-COMP_CODE = '1376'.
WO_POHEADER-DOC_TYPE = 'ZPCO'.
WO_POHEADER-VENDOR = '0000900600'.
WO_POHEADER-PURCH_ORG = 'N200'.
WO_POHEADER-PUR_GROUP = '010'.
WO_POHEADERX-COMP_CODE = '1376'.
WO_POHEADERX-DOC_TYPE = 'ZPCO'.
WO_POHEADERX-VENDOR = '0000900600'.
WO_POHEADERX-PURCH_ORG = 'N200'.
WO_POHEADERX-PUR_GROUP = '010'.
WO_POITEM-po_item = '00010'.
WO_POITEM-material = '000000000040900031'.
WO_POITEM-PLANT = 'N200'.
WO_POITEM-QUANTITY = '5.000'.
WO_POITEM-ACCTASSCAT = 'X'.
WO_POITEM-ITEM_CAT = '5'.
append WO_POITEM.
WO_POITEMX-po_item = '00010'.
WO_POITEMX-material = '000000000040900031'.
WO_POITEMX-PLANT = 'N200'.
WO_POITEMX-QUANTITY = '5.000'.
WO_POITEMX-ACCTASSCAT = 'X'.
WO_POITEMX-ITEM_CAT = '5'.
append WO_POITEMX.
And please note that i am running this with TEST_RUN flagged. When is not flagged i get the new PO number created, so i think i am doing everything ok.. My problem is how to get the Net Price in simulation...
Thanks
BR
Message was edited by:
pati mio -
Issue With BAPI_PO_CHANGE and BAPI_PO_CREATE1
Hi All,
I am facing a strange issue while using the bapis Bapi_po_chnage and Bapi_po_create1.
I am deleting STOs using BAPI_PO_CHANGE, calling it in a loop for each sto and commiting or rollback using bapi_transaction_commit with wait = x incase of no errors in return table or using bapi_transaction_rollback incase of errors in return.
Now the issue is after the first commit is executed when i'm next time calling the BAPI i have the messages of previous STO too accumulated in the return,
I am clearing all the tables and work areas being passed to the bapi each time.
Also i'm creating new STOs in an entirely different subroutine using BAPI_PO_CREATE1 but its return table too is accumulating all the return messages of BAPI_PO_CHANGE too.
Has anyone faced a similar kind of issue?
Please guide.
Thanks in advance.
Regrads,
KartikI tried the similar scenario with BAPI_PO_CHANGE, after refreshing the RETURN INTERNAL table before each call, which worked perfectly ( ECC 5.0).
-
Issue when uploading Purchase Order for Services (LSMW and BAPI_PO_CREATE1)
Hi,
I`m getting the error message "In case of account assignment, please enter acc. assignment data for item" when trying to updoad a Service Purchase Order via LSMW using BAPI_PO_CREATE1.
I'm using two files, one for header and item data and the other one to service lines. Even the account assignment is maintained the error persists. What am I doing wrong?
Regards,
EvertonHi
Check If you are giving the Account Assignment Number correct.
I mean....for a value...to be recognized by the BAPI, the number should be exactly same as it is stored in DATABASE.
For example: the number stored in database is 0000123...and you enter 123..in the program, then BAPI would fail to recognise the number. The value should be exactly as the field length.
Regards,
Vishwa. -
Multiple Account Assignment issue with BAPI_PO_CREATE1 for service POs
Whle creating service PO through BAPI_PO_CREATE1, The account assignments at the service line items were not being added correctly at the item level, instead they are getting split further wrt tax jurisdiction. This is occuring when an item have multiple service line items with mutltiple account assignments.
The sample code is below, and the all the internal tables and structure were related to BAPI_PO_CREATE1. Tried with BADI ME_TAX_FROM_ADDRESS and User Exit enhancement SAPL2012, which were not helpful for this particular scenario.
Item Details
W_BAPI_ITEM-PO_ITEM = 1.
W_BAPI_ITEMX-PO_ITEM = 1.
W_BAPI_ITEM-ITEM_CAT = D.
W_BAPI_ITEMX-ITEM_CAT = 'X'.
W_BAPI_ITEM-ACCTASSCAT = K.
W_BAPI_ITEMX-ACCTASSCAT = 'X'.
W_BAPI_ITEM-PLANT = USMP. Tax Jurisdiction code 3604931001
W_BAPI_ITEMX-PLANT = 'X'.
W_BAPI_ITEM-MATL_GROUP = IT37.
W_BAPI_ITEMX-MATL_GROUP = 'X'.
W_BAPI_ITEM-QUANTITY = 1.
W_BAPI_ITEMX-QUANTITY = 'X'.
W_BAPI_ITEM-PRICE_UNIT = 1.
W_BAPI_ITEMX-PRICE_UNIT = 'X'.
W_BAPI_ITEM-PO_UNIT = LE.
W_BAPI_ITEMX-PO_UNIT = 'X'.
W_BAPI_ITEM-NET_PRICE = 100.
W_BAPI_ITEMX-NET_PRICE = 'X'.
W_BAPI_ITEM-PCKG_NO = 3456.
W_BAPI_ITEMX-PCKG_NO = 'X'.
W_BAPI_ITEM-PREQ_NAME = RTPTS02.
W_BAPI_ITEMX-PREQ_NAME = 'X'.
APPEND W_BAPI_ITEM TO IT_BAPI_ITEM.
APPEND W_BAPI_ITEMX TO IT_BAPI_ITEMX.
Delivery address details - Tax Jurisdiction 3305923401
W_BAPI_ADDRDEL-PO_ITEM = 1.
W_BAPI_ADDRDEL-NAME = COR.
W_BAPI_ADDRDEL-NAME_2 = Chairman.
W_BAPI_ADDRDEL-BUILD_LONG = 1001R
W_BAPI_ADDRDEL-CITY = plainview.
W_BAPI_ADDRDEL-STREET = old country road.
W_BAPI_ADDRDEL-POSTL_COD1 = 11803.
W_BAPI_ADDRDEL-COUNTRY = US.
W_BAPI_ADDRDEL-REGION = NY.
APPEND W_BAPI_ADDRDEL TO IT_BAPI_ADDRDEL.
First Account Assignment - 3310300441
W_BAPI_POACNT-SERIAL_NO = 1.
W_BAPI_POACNTX-SERIAL_NO = 1.
W_BAPI_POACNTX-SERIAL_NOX = 'X'.
W_BAPI_POACNT-CREAT_DATE = 11/03/2010.
W_BAPI_POACNTX-CREAT_DATE = 'X'.
W_BAPI_POACNT-QUANTITY = 0.75.
W_BAPI_POACNTX-QUANTITY = 'X'.
W_BAPI_POACNT-DISTR_PERC = 75.
W_BAPI_POACNTX-DISTR_PERC = 'X'.
W_BAPI_POACNT-NET_VALUE = 75 .
W_BAPI_POACNTX-NET_VALUE = 'X'.
W_BAPI_POACNT-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEMX = 'X'.
W_BAPI_POACNT-GL_ACCOUNT = 641099.
W_BAPI_POACNTX-GL_ACCOUNT = 'X'.
W_BAPI_POACNT-COSTCENTER = 10010394.
W_BAPI_POACNTX-COSTCENTER = 'X'.
W_BAPI_POACNT-CO_AREA = 1234.
W_BAPI_POACNTX-CO_AREA = 'X'.
APPEND W_BAPI_POACNT TO IT_BAPI_POACNT.
APPEND W_BAPI_POACNTX TO IT_BAPI_POACNTX.
Second Account Assignment
W_BAPI_POACNT-SERIAL_NO = 2.
W_BAPI_POACNTX-SERIAL_NO = 2.
W_BAPI_POACNTX-SERIAL_NOX = 'X'.
W_BAPI_POACNT-CREAT_DATE = 11/03/2010.
W_BAPI_POACNTX-CREAT_DATE = 'X'.
W_BAPI_POACNT-QUANTITY = 0.25.
W_BAPI_POACNTX-QUANTITY = 'X'.
W_BAPI_POACNT-DISTR_PERC = 25.
W_BAPI_POACNTX-DISTR_PERC = 'X'.
W_BAPI_POACNT-NET_VALUE = 25 .
W_BAPI_POACNTX-NET_VALUE = 'X'.
W_BAPI_POACNT-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEMX = 'X'.
W_BAPI_POACNT-GL_ACCOUNT = 641099.
W_BAPI_POACNTX-GL_ACCOUNT = 'X'.
W_BAPI_POACNT-COSTCENTER = 10010393.
W_BAPI_POACNTX-COSTCENTER = 'X'.
W_BAPI_POACNT-CO_AREA = 1234.
W_BAPI_POACNTX-CO_AREA = 'X'.
APPEND W_BAPI_POACNT TO IT_BAPI_POACNT.
APPEND W_BAPI_POACNTX TO IT_BAPI_POACNTX.
Service Item detials
W_BAPI_SERVICE-OUTL_IND = 'X'.
W_BAPI_SERVICE-SUBPCKG_NO = 3457.
W_BAPI_SERVICE-LINE_NO = 1.
W_BAPI_SERVICE-PCKG_NO = 3456.
W_BAPI_SERVICE-EXT_LINE = 0000000000.
W_BAPI_SERVICE-QUANTITY = 0.
W_BAPI_SERVICE-BASE_UOM = 0.
W_BAPI_SERVICE-PRICE_UNIT = 0.
W_BAPI_SERVICE-GR_PRICE = 0.
W_BAPI_SERVICE-SHORT_TEXT = 0.
W_BAPI_SERVICE-MATL_GROUP = 0.
W_BAPI_SERVICE-DISTRIB = 0.
APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
W_BAPI_SERVICE-OUTL_IND = 'X'.
W_BAPI_SERVICE-LINE_NO = 2.
W_BAPI_SERVICE-PCKG_NO = 3457.
W_BAPI_SERVICE-EXT_LINE = 0000000010.
W_BAPI_SERVICE-QUANTITY = 10.
W_BAPI_SERVICE-BASE_UOM = STD.
W_BAPI_SERVICE-PRICE_UNIT = 0.
W_BAPI_SERVICE-GR_PRICE = 5.
W_BAPI_SERVICE-SHORT_TEXT = Cabling Services1.
W_BAPI_SERVICE-MATL_GROUP = IT37.
W_BAPI_SERVICE-DISTRIB = 2.
APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
W_BAPI_SERVICE-OUTL_IND = 'X'.
W_BAPI_SERVICE-LINE_NO = 3.
W_BAPI_SERVICE-PCKG_NO = 3457.
W_BAPI_SERVICE-EXT_LINE = 0000000020.
W_BAPI_SERVICE-QUANTITY = 10.
W_BAPI_SERVICE-BASE_UOM = STD.
W_BAPI_SERVICE-PRICE_UNIT = 0.
W_BAPI_SERVICE-GR_PRICE = 5.
W_BAPI_SERVICE-SHORT_TEXT = Cabling Services2.
W_BAPI_SERVICE-MATL_GROUP = IT37.
W_BAPI_SERVICE-DISTRIB = 2.
APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
Service Account assignment details
W_ACC_SERVICE-PCKG_NO = 3457.
W_ACC_SERVICE-LINE_NO = 2.
W_ACC_SERVICE-SERNO_LINE = 1.
W_ACC_SERVICE-SERIAL_NO = 1. "Account Assignment Link
W_ACC_SERVICE-NET_VALUE = .
W_ACC_SERVICE-QUANTITY = 50 .
W_ACC_SERVICE-PERCENTAGE = 100 .
APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
W_ACC_SERVICE-PCKG_NO = 3457.
W_ACC_SERVICE-LINE_NO = 3.
W_ACC_SERVICE-SERNO_LINE = 1.
W_ACC_SERVICE-SERIAL_NO = 1. "Account Assignment Link
W_ACC_SERVICE-NET_VALUE = .
W_ACC_SERVICE-QUANTITY = 50 .
W_ACC_SERVICE-PERCENTAGE = 50 .
APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
W_ACC_SERVICE-PCKG_NO = 3457.
W_ACC_SERVICE-LINE_NO = 3.
W_ACC_SERVICE-SERNO_LINE = 1.
W_ACC_SERVICE-SERIAL_NO = 2. "Account Assignment Link
W_ACC_SERVICE-NET_VALUE = .
W_ACC_SERVICE-QUANTITY = 50 .
W_ACC_SERVICE-PERCENTAGE = 50 .
APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
EKKN table entries:
When created thru ME21N with the same set of data,which is expected
ZEKKN MENGE NETWR SAKTO KOSTL
01 0.750 75.00 0000641099 0010010394
02 0.250 25.00 0000641099 0010010393
But through BAPI_PO_CREATE1, the below split is being done with respect to Tax Jurisdiction code.
01 0.500 50.00 0000641099 0010010394
02 0.250 25.00 0000641099 0010010394
03 0.250 25.00 0000641099 0010010393
Please advice the solution.
PS: there were different tax jurisdiction codes were being determined.
Plant, Cost Center and Delivery Address.Hi,
To commit BAPI or to run it properly , you need to fulfill all required data for BAPI.
You can go to BAPI documentation to check for mandetory parameters and also check with Function consultant for more data and confifuration/
Reward if useful! -
PO created via BAPI_PO_CREATE1 with status 'On HOLD' issue
Dear experts,
We are using BAPI_PO_CREATE1 to create a service
purchase order, PO is created successfully but it is on Hold.
So, we must save this PO via ME22N manually again.
In EKKO, this on hold PO has the field MEMORY set to "X",
MEMORYTYPE set to "H".
We checked the include 'L2012F47', found a BADI:
CL_EXM_IM_ME_BAPI_PO_CUST
Example Implementation for BAdI ME_BAPI_PO_CUST.
METHOD:
IF_EX_ME_BAPI_PO_CREATE_02~INBOUND
METHOD if_ex_me_bapi_po_create_02~inbound.
* distinguish between BAPI_PO_CREATE1 and
BAPI_PO_CHANGE
IF im_aktyp EQ cl_mmpur_constants=>hin.
"BAPI_PO_CREATE1
IF NOT ch_poheader-vendor IS INITIAL.
* hold PO without error====>WHY???
ch_memory_complete = cl_mmpur_constants=>yes.
* do not perform application authority check
ch_no_authority = cl_mmpur_constants=>yes.
ENDIF.
ELSEIF im_aktyp EQ cl_mmpur_constants=>ver.
"BAPI_PO_CHANGE
* clear version management data
CLEAR ch_versions.
ENDIF.
ENDMETHOD.
The question is if we pass a vendor to this BAPI,
the created purchase order will be hold due to the code
above will set the ch_memory_complete to 'X'.
Which means the purchase order will be created but
on hold.
Could you give us a hint on why purchase order will be
hold while a vendor is passed in the BAPI?
Thanks for your kindly help.
Best Regards,
Eason LingHi Mallinath,
We didn't set MEMORY_COMPLETE when calling the BAPI_PO_CREATE1, which means in BAPI_PO_CREATE1 the MEMORY_COMPLETE is ' ', according to NOTE 354771, the purchase order will be saved instead of being held. What's more, our service purchase order is a correct and complete one.
Documentation for the fields:
MEMORY_COMPLETE:
You can use this parameter to control whether a CORRECT and complete purchase order is held or
saved.
If the value of this parameter is 'X', then the purchase order is held.
If the value of this parameter is ' ', then the purchase order is saved.<<<<<<<<
MEMORY_UNCOMPLETE:
You can use this parameter to define whether an INCORRECT or incomplete purchase order is to be held.
If the value of the parameter is 'X', then the purchase order is held.
If the value of the parameter is ' ', then the purchase order NOT is created.
As what i described previously, even we set MEMORY_COMPLETE to ' ' when calling the BAPI_PO_CREATE1,these codes listed below will also set MEMORY_COMPLETE to 'X'.
IF NOT ch_poheader-vendor IS INITIAL.
* hold PO without error
ch_memory_complete = cl_mmpur_constants=>yes.
* do not perform application authority check
ch_no_authority = cl_mmpur_constants=>yes.
ENDIF.
Then in INCLUDE 'L2012F26', line 233(listed below), the code logic will determine if the Purchase order be held or saved.
* docu:
* docu: check document
* check if memory flag can be set
lcl_memory=>process( "Park&Hold
EXPORTING im_po = ch_po
im_memory_complete = ch_memory_complete<<<<<<<<<<
im_memory_uncomplete = ch_memory_uncomplete
IMPORTING ex_save = lf_save
ex_memory = lf_memory
ex_memorytype = lf_memorytype
CHANGING ch_park_complete = ch_park_complete
ch_park_uncomplete = ch_park_uncomplete ).
All above is a standard logic, if we maintained a vendor for this purchase order, the order will be held. But if we don't assgin a vendor to this purchase order, when calling the BAPI, an error message will pop-up...
Am i right?
Best regards,
Eason -
BAPI_PO_CREATE1 pricing date issue
Hi
I am creating the PO using BAPI_PO_CREATE1 but its picking pricing date as delevery date.
from POSCHEDULE.
Can anybody guide in this regards. what parameter are supposed to pass for the getting pricing date.
Regards
SagarHi Eric,
Thanks for your reply.
In the BAPI we are passing
poheader = ls_poheader_bapi
poheaderx = ls_poheaderx
testrun = iv_testrun
no_authority = lc_check
no_price_from_po = lc_check
IMPORTING
exppurchaseorder = lv_exppurchaseorder
expheader = ls_expheader
TABLES
return = lt_return
poitem = lt_poitem_bapi
poitemx = lt_poitemx
poschedule = lt_poschd_bapi
poschedulex = lt_poschdx
poaccount = lt_poacc_bapi
poaccountx = lt_poaccx
pocondheader = lt_pocondheader
pocondheaderx = lt_pocondheaderx
pocond = lt_pocond_bapi
pocondx = lt_pocondx
polimits = lt_poesh_bapi
pocontractlimits = lt_poesuc_bapi
poservices = lt_poser_bapi
posrvaccessvalues = lt_poserac_bapi
poservicestext = lt_postext_bapi
potextheader = lt_pohtext_bapi
potextitem = lt_poitext_bapi.
here in this case its not picking the pricing date.
Regards
Sagar -
Reg: Issue in BAPI_PO_CREATE1
hi,
i created a screen and made it as mandatory in me21n and its working fine. My problem is, when i use BAPI_PO_CREATE1, those fields are not there and throwing error msg. Can i append those field in the BAPI? If i do so, will it required any coding to be written inside BAPI to update those values ?
please help.
Thanks in advance,
aswin.hi,
maybe try this:
1. switch off mandatory z-field via BADI ME_PROCESS_PO_CUST during process your BAPI_PO_CREATE1
2.after create PO via BAPI update "manually" by z-program
your z-fields...
best regards,darek -
Re: BAPI_PO_CREATE1 issue.
Hi experts,
I am using BAPI_PO_CREATE1 to create PO, while creating the PO if there is no asset then i need to create the asset also.
But am not able to find the asset class(ANLA-ANLKL) in BAPI(BAPI_PO_CREATE1).
If the asset class is there in this BAPI can u please tell where exactly i can find the asset class.
Thanks & regards
Sirishyou may use this FM BAPI_FIXEDASSET_CREATE1 to create the asset no and it seems not possible creating thro' BAPI_PO_CREATE1. So before calling the bapi_po_create, you create the asset no with the above FM and consult your functional consultant for the mandatory inputs to pass into the FM for creating the asset no.
-
Issue on condition value after creating PO using bapi_po_create1
Hi ,
I am passing condition value as 45.55 to Create PO using bapi_po_create1,
but after Creating PO, But Condition Value reflecting ME23N as 4,555.00.
Kindly Provide any solution if you haveHi ,
I am passing condition value as 45.55 to Create PO using bapi_po_create1,
but after Creating PO, But Condition Value reflecting ME23N as 4,555.00.
Kindly Provide any solution if you have -
Issue in condition table passing in BAPI BAPI_PO_CREATE1 when uploading PO
hi everyone,
I am trying to upload PO data (header, item, conditions)from file. Some of my main code as follows:
i have pasted the code for assigning values to condition table and passing in bapi..once i execute the bapi in debug mode..PO not created, no values in condition tables. rest of the table values are fine..
W_BAPIMEPOCOND-ITM_NUMBER = '000001'.
W_BAPIMEPOCOND-COND_ST_NO = '001'.
W_BAPIMEPOCOND-COND_TYPE = 'PB00'.
W_BAPIMEPOCOND-COND_VALUE = '1000'.
W_BAPIMEPOCOND-CURRENCY = 'KES'.
APPEND W_BAPIMEPOCOND TO I_BAPIMEPOCOND.
CLEAR W_BAPIMEPOCOND.
W_BAPIMEPOCOND-ITM_NUMBER = '000001'.
W_BAPIMEPOCOND-COND_ST_NO = '000'.
W_BAPIMEPOCONDX-COND_TYPE = 'X'.
W_BAPIMEPOCONDX-COND_VALUE = 'X'.
W_BAPIMEPOCONDX-CURRENCY = 'X'.
APPEND W_BAPIMEPOCONDX TO I_BAPIMEPOCONDX.
CLEAR W_BAPIMEPOCONDX.
ENDLOOP.
LOOP AT I_BAPIMEPOHEADER INTO W_BAPIMEPOHEADER.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = W_BAPIMEPOHEADER
POHEADERX = W_BAPIMEPOHEADERx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
PARK_COMPLETE =
PARK_UNCOMPLETE =
IMPORTING
EXPPURCHASEORDER = EXPPURCHASEORDER
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = RETURN
POITEM = I_BAPIMEPOITEM
POITEMX = I_BAPIMEPOITEMX
POADDRDELIVERY =
POSCHEDULE = I_BAPIMEPOSCHEDULE
POSCHEDULEX = I_BAPIMEPOSCHEDULEX
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND = I_BAPIMEPOCOND
POCONDX = I_BAPIMEPOCONDX
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
POCOMPONENTS =
POCOMPONENTSX =
POSHIPPING =
POSHIPPINGX =
POSHIPPINGEXP =
SERIALNUMBER =
SERIALNUMBERX =
INVPLANHEADER =
INVPLANHEADERX =
INVPLANITEM =
INVPLANITEMX =
NFMETALLITMS =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Thanks in advance!!Hi Balaji,
I suppose it's a simple copy paste error. Refer the code higlighted below:
W_BAPIMEPOCOND-ITM_NUMBER = '000001'.
W_BAPIMEPOCOND-COND_ST_NO = '001'.
W_BAPIMEPOCOND-COND_TYPE = 'PB00'.
W_BAPIMEPOCOND-COND_VALUE = '1000'.
W_BAPIMEPOCOND-CURRENCY = 'KES'.
APPEND W_BAPIMEPOCOND TO I_BAPIMEPOCOND.
CLEAR W_BAPIMEPOCOND.
W_BAPIMEPOCONDX-ITM_NUMBER = '000001'.
W_BAPIMEPOCONDX-COND_ST_NO = '000'.
W_BAPIMEPOCONDX-COND_TYPE = 'X'.
W_BAPIMEPOCONDX-COND_VALUE = 'X'.
W_BAPIMEPOCONDX-CURRENCY = 'X'.
Regards,
Pranav.
Edited by: Pranav Mandelia on Sep 30, 2011 1:52 PM -
Error while Creating a PO using BAPI_PO_CREATE1
Hi Friends,
The following issue that I have observed and as explained below is one of the weirdest scenarios that I have seen while working with SAP. Hence, kindly help me with possible errors from my end. I am working on ECC 6.0.
Requirement: To automatically create a PO.
Option used: I have used a BAPI: u2018BAPI_PO_CREATE1u2019
Scenario: When I execute the BAPI u2018BAPI_PO_CREATE1u2019 directly in sequence with u2018BAPI_TRANSACTION_COMMITu2019, the PO gets created successfully. The data entered as input is:
POHEADER-COMP_CODE
POHEADER-DOC_TYPE
POHEADER-PMNTTRMS
POITEM-PO_ITEM
POITEM-QUANTITY
POITEM-TAX_CODE
POITEM-TAXJURCODE
POITEM-RFQ_NO
POITEM-RFQ_ITEM
POITEM-PREQ_NO
POITEM-PREQ_ITEM
POITEM-PREQ_NAME
POSCHEDULE-PO_ITEM
POSCHEDULE-SCHED_LINE
POSCHEDULE-QUANTITY
POSCHEDULE-PREQ_NO
POSCHEDULE-PREQ_ITEM
Problem: I need to pass data to the BAPI through code, so I called the BAPI u2018BAPI_PO_CREATE1u2019 and u2018BAPI_TRANSACTION_COMMITu2019 in a test function module as well as report. I passed the same data as mentioned above i.e. while creating the PO by passing data to the BAPI directly.
But the BAPI returns an error BAPI header data still faulty, enter plant, Pur. Org., Pur. Grp., etc.
I tried by passing all the available data for the header and then for the items, but finally, I still get an error that the item is from a different order account and just cannot create a PO.
The Test FM code is as shown below:
DATA : PYMNT_TERMS TYPE YOAF_SEC_MASTER-TER_PYMNT.
DATA : ITEM_NO(4) .
DATA : CURRENCY TYPE LFM1-WAERS.
DATA : POHEAD TYPE BAPIMEPOHEADER.
DATA : POHEADX TYPE BAPIMEPOHEADERX.
DATA : EXP_HEAD TYPE BAPIMEPOHEADER.
DATA : POITEM TYPE TABLE OF BAPIMEPOITEM WITH HEADER LINE.
DATA : POITEMX TYPE TABLE OF BAPIMEPOITEMX WITH HEADER LINE.
DATA : POSCHED TYPE TABLE OF BAPIMEPOSCHEDULE WITH HEADER LINE.
DATA : POSCHEDX TYPE TABLE OF BAPIMEPOSCHEDULX WITH HEADER LINE.
DATA : EX_PO_NUMBER TYPE BAPIMEPOHEADER-PO_NUMBER.
CONSTANTS : C_X VALUE 'X'.
POHEAD-COMP_CODE = 'P110'.
POHEAD-DOC_TYPE = DOC_TYPE.
POHEAD-PMNTTRMS = 'P10'.
POHEADX-COMP_CODE = C_X.
POHEADX-DOC_TYPE = C_X.
POHEADX-PMNTTRMS = C_X.
POITEM-PO_ITEM = '00001'.
POITEM-QUANTITY = '1.000'.
POITEM-TAX_CODE = 'D2'.
POITEM-TAXJURCODE = 'MH01'.
POITEM-RFQ_NO = '2300009491'.
POITEM-RFQ_ITEM = '00001'.
POITEM-PREQ_NO = '200003583'.
POITEM-PREQ_ITEM = '00001'.
POITEM-PREQ_NAME = 'SACHIN'.
APPEND POITEM.
POITEMX-PO_ITEM = '00001'.
POITEMX-PO_ITEMX = C_X.
POITEMX-QUANTITY = C_X .
POITEMX-TAX_CODE = C_X .
POITEMX-TAXJURCODE = C_X .
POITEM-RFQ_NO = C_X.
POITEM-RFQ_ITEM = C_X.
POITEM-PREQ_NO = C_X.
POITEM-PREQ_ITEM = C_X.
POITEMX-PREQ_NAME = C_X.
APPEND POITEMX.
POSCHED-PO_ITEM = '00001'.
POSCHED-SCHED_LINE = '0001'.
POSCHED-QUANTITY = '1.000'.
POSCHED-PREQ_NO = '1200003583'.
POSCHED-PREQ_ITEM = '00001'.
APPEND POSCHED.
POSCHEDX-PO_ITEM = '1'.
POSCHEDX-SCHED_LINE = '0001'.
POSCHEDX-PO_ITEMX = C_X.
POSCHEDX-SCHED_LINEX = C_X.
POSCHEDX-QUANTITY = C_X.
POSCHEDX-PREQ_NO = C_X.
POSCHEDX-PREQ_ITEM = C_X.
APPEND POSCHEDX.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = POHEAD
POHEADERX = POHEADX
IMPORTING
EXPPURCHASEORDER = EX_PO_NUMBER
EXPHEADER = EXP_HEAD
EXPPOEXPIMPHEADER =
TABLES
RETURN = RETURN_ERROR
POITEM = POITEM
POITEMX = POITEMX
POADDRDELIVERY =
POSCHEDULE = POSCHED
POSCHEDULEX = POSCHEDX
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN_ERROR.Hi,
As mentioned that this error was one of the wierdest SAP issues I have faced, it was due to the silliest copy paste errors on my behalf. I completely overlooked the POITEMX naming.
For 4 values of RFQ_NO, RFQ_ITEM, PREQ_NO, PREQ_ITEM, I didnt have the 'X' for POITEMX and kept on looking for errors for days.
BAPI_PO_CREATE1 works with min. possible inputs successfully.
Thanks to all!
Maybe you are looking for
-
Dynamic Header help in PDF Portfolio
Need some help please, to create and load a Dynamic Header when creating a PDF Portfolio in LiveCycle ES2. Have input parameter of a [name] and an [image file] to place in the Header. Process flowing out of Assembler (PDF Generator). Currently oth
-
I cannot remove embedded barcode from the image. Due to saving compression.
Hi guys, I recreate a thread to prevent confusing on my previous one. Please only reply to this thread thanks. Ok, for a start I will give some general description about the application I made. I had some problem with the image being compressed while
-
Display data in log file using PL/SQL procedure
Just as srw.message is used in Oracle RDF Reports to display data in log file in Oracle Apps, similarly how it is possible to display data in log file using PL/SQL procedure? Please also mention the syntax too.
-
Inexpensive component video capture
Is there anything out there which will inexpensively capture HDTV over component video or HDMI to Mac? Thanks
-
Email notifications in mac OS X v10.7 Lion
Since I have updated to Lion, I do not get notified on new email a have received. The red bubble (number of new email) does not appear in the dock and sound isn't played. Im note quite sure but a think that it had worked on the first day, however, no