BAPI_PO_CREATE1 Service Positions and Conditions with reference to P. Req.
Hello together,
i have the following problem. I used the BAPI BAPI_PO_CREATE1 to create Purchase Orders with reference to a purchase requsition. I have 2 different types of purchase requsitions. One with normal items and one with services.
So for both the creation of the purchase order works but if i add Conditions on Serivce Item Level to the purchase requsition they are not transfered to the purchase order.
To eliminate misunderstandings in a purchase order there are 3 diffent typs of conditions possible. First on header Level of the purchase order which can easly be filled with BAPI. The second on item level of the purchase order with can also easily be filled with BAPI and the last on service level which i doesn't found in BAPI. May be someone has an idea how to fill these conditions.
Here is my code:
header-doc_date = wa_eban-erdat.
value = 10.
Set COMP_CODE
select single bwkey from t001w into lv_bwkey
where werks = wa_eban-werks.
select single bukrs from t001k into header-comp_code
where bwkey = lv_bwkey.
header-doc_type = wa_eban-bsart.
header-vendor = wa_eban-flief.
header-created_by = sy-uname.
header-purch_org = wa_eban-ekorg.
header-pur_group = wa_eban-ekgrp.
header-langu = sy-langu.
header-status = 'B'.
header-indx = header-indx + 1.
append header.
headerx-doc_type = 'X'.
headerx-comp_code = 'X'.
headerx-vendor = 'X'.
headerx-purch_org = 'X'.
headerx-created_by = 'X'.
headerx-pur_group = 'X'.
headerx-created_by = 'X'.
headerx-langu = 'X'.
headerx-status = 'X'.
headerx-indx = header-indx.
append headerx.
*!-- Populating the BAPI for PO Item data
poitems-po_item = value.
poitems-material = wa_eban-matnr.
poitems-stge_loc = wa_eban-lgort.
poitems-plant = wa_eban-werks.
poitems-item_cat = wa_eban-pstyp.
poitems-po_unit = wa_eban-meins.
poitems-quantity = wa_eban-menge - wa_eban-bsmng.
poitems-preq_no = wa_eban-banfn.
poitems-preq_item = wa_eban-bnfpo.
poitems-tax_code = wa_eban-yy_mwskz.
poitems-indx = header-indx.
poitemsx-po_item = value.
poitemsx-material = 'X'.
poitemsx-stge_loc = 'X'.
poitemsx-plant = 'X'.
poitemsx-item_cat = 'X'.
poitemsx-preq_no = 'X'.
poitemsx-preq_item = 'X'.
poitemsx-po_unit = 'X'.
poitemsx-quantity = 'X'.
poitemsx-tax_code = 'X'.
poitemsx-indx = header-indx.
Create Construction with Services
if wa_eban-bsart eq 'ZXXXX.
poitemsx-pckg_no = 'X'.
poitems-pckg_no = wa_eban-packno.
endif.
append poitems.
append poitemsx.
*!-- Populating the BAPI for PO Item Schedule data
scd-po_item = value.
scd-sched_line = value1.
scd-delivery_date = wa_eban-lfdat.
scd-quantity = wa_eban-menge - wa_eban-bsmng.
scd-indx = header-indx.
append scd.
scdx-po_item = value.
scdx-sched_line = value1.
scdx-delivery_date = 'X'.
scdx-quantity = 'X'.
scdx-indx = header-indx.
append scdx.
*!-- Populating the BAPI for PO Item data for Accounting
account-po_item = value.
account-quantity = wa_eban-menge - wa_eban-bsmng.
account-indx = header-indx.
accountx-po_item = value.
accountx-quantity = 'X'.
accountx-indx = header-indx.
Create Construction with Services
if wa_eban-bsart eq 'ZXXX.
account-costcenter = wa_ebkn-kostl.
account-gl_account = wa_ebkn-sakto.
account-orderid = wa_ebkn-aufnr.
select single posid from prps into account-wbs_element where pspnr = wa_ebkn-ps_psp_pnr .
account-serial_no = wa_ebkn-zebkn.
accountx-costcenter = 'X'.
accountx-gl_account = 'X'.
accountx-orderid = 'X'.
accountx-wbs_element = 'X'.
accountx-serial_no = 'X'.
endif.
append account.
append accountx.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/rfc%2bpurchase%2border%2bcreation%2bfm%2bfrom%2bariba
cheers
Aveek
Similar Messages
-
Prob with Adaptive Web Service Model and Response with reference of itself
Hi guys,
I am facing a problem with the Adaptive WebService Model. I have a WebService which is working properly in a Servlet and also in the web service navigator,
The webService has a method let´s say create(objectDTO). The structure of objectDTO is like this:
propertieA
propertieB
propertieC
propertieChildObjectDTO
So I can pass a list of objectDTOs to the webService. If i import the webService the structure in the model looks fine, but if i want to map it to any context, only the properties A-C are mapped. propertieChildObjectDTO is not mapped.
Has anyone a clue on how to solve this problem ? I just tried to add and initialize the propertieChildObjectDTO manually but I got a NullPointerException.
I would appreciate your help.
Happy new year guys
Regards
FloGuys......
seems like i can´t reach my requirement with Adaptive Web Service Model:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/faq%252b-%252bmodels%252b-%252badaptive%252bweb%252bservice
Now I want to make it by hand. How can I import the regarding EJB ?
Thanks !
Flo -
How to link Sales Order with Service Contract and then with Install Base?
Hi Friends,
1) I would like to know the integeration process from sales order to Service Contract and then with Install Base.
2) I couldn't see anything enabled in Service Tab in Order Lines, its grayed out. Is there any set up/profile option to get it enabled?
3) How can we create AR invoice from Service Contract?
Please let me know if anyone has idea on this.
Thanks in Adavance,
VaraDear Sid,
Thanks for your promt response.
Let me explain you what I did.
1) I have booked a Bill Only sales order which has one order line, mentioned it as Service Item and provided the same details in Service Tab in Order lines. Now Line status is "Fulfilled"
2) Then Submitted Workflow Back Ground Process for OM Order Lines and it has created an AR Invoice and closed the line
3) And then submitted "Service Contracts Order Capture Integration Program" from SErvice Contracts Responsibility and it completed normal.
4) Now I went in to Launch Contracts Window and queried with the sales order but couldn't see any contract created
5) Then I went in to Reprocess Order Window and found this order shows an error message as "Referenced Product not present in the Installed Base", then I tried to reprocessed it, but the same error message again.
Here I have few doubts:
1) Are the AR invoice and Service Contract Billing Invoices same?
2) In above scenario AR Invoice has been created, I would like to do the billing from SErvice Contracts and need to create an Invoice in AR? how can I do that?
because as you explained in one of my questions earlier, A Single Invoice can be created for the whole duration of the contract. I want to do that and trying for the same.
3) Regarding the above error message, how can I resolve it and create the service contract against that Order?
Thank you so much for your helpful answers.
Regards,
Vara -
Can I use the BAPI_PO_CREATE1 to create a PO with reference to a PR?
Hi experts.
I have a big question. I have been spend many hours in this site to find an answer about if I can use the BAPI_PO_CREATE1, to create a Purchase Order with reference to a Purchase Requisition. I could n ot find nothing about this.
Can somebody tell me if can I use it?
There are some threads that say "It is posible", but I would like to know the Structure name and the field name where I have to put the Purchase Requisition in the BAPI to create my PO.
I hope that somebody can help me.
Thanks a lot!!
Best Regards.
Jesus Martinez
ABAP Developer
Comala, Colima, MexicoI know this is an ancient topic, but in order to have all the necessary info together: (for everyone's future reference)
How to create a PO with reference to a Purchase requisition which is properly released and assigned:
Bapi_po_create1
POHeader: document type (also POHEADERX)
POItem : item number, plant, storage location, PR number, PR item (also POItemx)
and that should be all! it would be useful if SAP clarified that in their documentation because this is a very common scenario... -
Terms and Conditions with a Service Contracts
Hello,
I like to use the Sales Contracts (11.5.10) templates that I created for Sales Quote and Service Contracts. There is a great layout template (XML) for Quoting. I could not find any documentation on how to attach T*Cs to a Service Contract output.
Any help in this direction will be appreciated.Yes, I did. I had to insert a page break for this. Here is how I have done this
<fo:block break-before="page" >
</fo:block>
Thanks,
Sharmila -
Keychain services API and dealing with Keychains other than the default
Hello,
So I've been doing some C work with the Keychain services API. But I can't figure out how to set the Keychain for a function to something other than the default, which is set by passing NULL.
For example,
status = SecKeychainAddGenericPassword (
*NULL, // default keychain*
10, // length of service name
"SurfWriter", // service name
10, // length of account name
"MyUserAcct", // account name
passwordLength, // length of password
password, // pointer to password data
NULL // the item reference
This function is defined here:
http://developer.apple.com/documentation/Security/Reference/keychainservices/Ref erence/reference.html#//apple_ref/c/func/SecKeychainAddGenericPassword
and the data type for the Keychain is here:
http://developer.apple.com/documentation/Security/Reference/keychainservices/Ref erence/reference.html#//appleref/doc/cref/SecKeychainRef
But neither helps me at all for being able to edit a keychain that isn't the default Keychain.
I appreciate any help, thanks.
Message was edited by: Smerkyhttp://developer.apple.com/documentation/Security/Reference/keychainservices/Ref erence/reference.html#//apple_ref/c/func/SecKeychainOpen
-
BAPI_SALESORDER_CHANGE add new line and conditions with a condition value
Hi,
I am using BAPI_SALESORDER_CHANGE to add new lines to a credit memo. All works fine except that I can not seem to put a condition value on the new lines. The condition is created but with a value of 0. I can popluate the condition amount field, KBETR but not KWERT. BAPICONDX seems to only have the COND_VALUE field in it and not CONDVALUE as in BAPICOND. Does anyone have any idea how to do this? In the code below I just want to change the material on the first line of the credit memo and not add the condition. Then add new lines with the the condition.
lw_order_header_inx-updateflag = 'U'.
LOOP AT i_accru INTO wa_accru.
lv_count = lv_count + 1.
lv_posnr = lv_count * 10.
* Order Items
lw_order_item_inx-itm_number = lv_posnr.
lw_order_item_inx-material = 'X'.
IF lv_count = 1.
lw_order_item_inx-updateflag = 'U'.
ELSE.
lw_order_item_inx-updateflag = 'I'.
ENDIF.
APPEND lw_order_item_inx TO lt_order_item_inx.
lw_order_item_in-itm_number = lv_posnr.
lw_order_item_in-material = wa_accru-vakey.
APPEND lw_order_item_in TO lt_order_item_in.
* Conditions
IF lv_count <> 1.
lw_conditions_inx-itm_number = lv_posnr.
lw_conditions_inx-cond_st_no = '905'.
lw_conditions_inx-cond_count = '01'.
lw_conditions_inx-cond_type = 'ZHIE'.
lw_conditions_inx-currency = 'X'.
lw_conditions_inx-updateflag = 'I'.
APPEND lw_conditions_inx TO lt_conditions_inx.
lw_conditions_in-itm_number = lv_posnr.
lw_conditions_in-cond_st_no = '905' .
lw_conditions_in-cond_count = '01'.
lw_conditions_in-cond_type = 'ZHIE'.
lw_conditions_in-condvalue = wa_accru-accru.
lw_conditions_in-currency = 'GBP'.
APPEND lw_conditions_in TO lt_conditions_in.
ENDIF.
ENDLOOP.
* Change the credit memo
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = lv_vbeln
order_header_in = lw_order_header_in
order_header_inx = lw_order_header_inx
* SIMULATION =
* BEHAVE_WHEN_ERROR = ' '
* INT_NUMBER_ASSIGNMENT = ' '
* LOGIC_SWITCH =
* NO_STATUS_BUF_INIT = ' '
TABLES
return = lt_return
order_item_in = lt_order_item_in
order_item_inx = lt_order_item_inx
* PARTNERS =
* PARTNERCHANGES =
* PARTNERADDRESSES =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* SCHEDULE_LINES =
* SCHEDULE_LINESX =
* ORDER_TEXT =
* ORDER_KEYS =
conditions_in = lt_conditions_in
conditions_inx = lt_conditions_inx
* EXTENSIONIN =
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.Hi Rob,
Have you managed to solve this issue. If so, could you please share the solution.
I am also facing similar problem.
Thanks for your help.
Anoop -
How to Measure Position and Velocity with a Single Counter with myrio
Hi Everyone , I need your help .
I got myrio a few days ago for my project which is a electric vehicle drived by wireless mode so first problem faces me that I have encoder and it give me counts (decreasing or icreasing) which I can't convert it to veolcity any one may help , I will be grateful ???????????????????Hey Hesham92,
As you mentioned the myRIO encoder counts pulses. These pulses will typically come from some type of encode such as a quadrature encoder.
Look at your encoder datasheet and it should explain how it works (which mode it uses) and the resolution (ie rotation per pulse). If the encoder is attached to a wheel you can use some simple math to determine how many cm the wheel moves per encoder pulse.
Let us know if you have questions about this (please also post more info about your setup such as the encoder, what it's attached to and what you need to measure).
Thanks!
-Sam K
LabVIEW Hacker
Join / Follow the LabVIEW Hacker Group on google+ -
Service PO Commitment with reference to statistical IO is not get reduced.
PO is created with Account assigned to Internal Order stastically and Cost center as real cost object. Wih PO creation we check commitment in system
According to standard SAP, at creation of PO, system creates commitment & while doing GR/IR, system should reduce PO commitment and increase actual by that amount. Service PO is created for amount 239200 USD with Account Assigned Category K, Item category D, Account assigned to Cost Center & Statistical Orders (9 orders by approximate 11% ) So, initially there is commitment of 26000 USD on each service order. However from March 2009 onward business has done GR and IR for this PO approximate 50000 USD but nor commitment have reduced neither any commitment line item were posted in system.
As a result of it, business actual budget is fully consumed by (Commitment + Actual) and while doing IR budget deficient errors is received.
Here main problem is, non reduction of Service PO commitment while doing GR and IR.
Tried below approch so far.
CoAr / Order type Comitment acitive, Costcenter updates commitment and GL is valid on delivery date. Service PO order unit is JOB and commitment reduction is based on value match with PO details.
In order to test really probelm is with Commitment updation or reporting. I checked COOI and COSP with reference to object no.
but there is only one posting in line item of original PO amount and at total level there are two posting one is origiona one and seocind is with zero amount. but in both total line item for one of the peiod quantity is incomplete even after clicking Final Invoice.
Even after final Invoice ticked thre is not commitment line item gets posted in system. Even I run RKANBU01 program.
This is quite strange, if some one can give me other suggestion to proceed further.
With Regards
Nitin P.Hi Nitin,
When in the purchasing document, the indicator goods receipt
non-valuated is NOT set, the commitments will take into account the
information from the GOODS RECEIPT booked against the purchasing
document in order to reduce the commitments. In this case
the commitment can be reduced fully by setting the final delivery
indicator in the PO item (EKPO-ELIKZ).
When the indicator for non-valuated goods receipt is set, then system
will use the invoice information in order to reduce the commitments.
In this case EKPO-EREKZ can reduce the commitment to 0.
For positions that are using quantity-based commitments (Customizing ->
General settings -> Check unit of measurement), the commitments will be
reduced based on the quantity invoiced and not in the value. In transaction CUNI, the unit of measurements used at PO ITEM
level must be set to value based commitment.
For the commitments reduction the base value used is always the local
amount. The commitments will be reduced according with the actual posted
amount in local currency and in order to reduce the committed value in
the foreign currency, system converts the actual amount in local
currency using the exchange rate from the purchasing document.
In transaction OKKP, the commitment management indicator must be
active for the given controlling area in the current fiscal year.
Cost centers: In transaction KS02, in register "Control", the
commitment update indicator must NOT be set.
Check also the attached notes carefully in order to solve
your problem:
735404 Delivery completed indicator, final entry sheet indicator
634298 FAQ: Commitment update in the service
772206 Commitment Update in Service Purchase Orders
639523 Commitments reduction behavior for Purchasing documents
534993 Short instructions RKANBU01
459509 FAQ: Commitments in purchasing
433597 Commitment update for services or invoicing plan
339264 IR plan:commts reductn for invoicing plan (net doc)
303610 Invoicing plan: commitments only reduced for period
204376 Commitments - valuated GR with value-based commitmt
165823 Incompl.reduct.PO commts in Cash Mgmt/Forecast
152571 Composite SAP note: Missing or incorrect commitments
Regards,
Edit -
Function module for Create service order with reference to sales doc (RAS )
Hi All,
I have to create a service order (type SM03) with reference to sales document (doc type RAS, in other way it is called as repair order).
I have used function module 'ALM_ME_ORDER_CREATE' && 'CO_ZV_ORDER_POST' to create service order and its working fine but problem is that i am not able to create linking between repair order and service order.
Can anyone suggest me function module, BAPI to create service order with reference as sales document (RAS) so that all related details of sales document will automatically reflect to service order..
SumitTry this function module BAPI_ORDER_MAINTAIN. Just search with BAPI_ORDER* in SE37 you will get some more functions.
Regards
Kathirvel -
BAPI to create notification service with reference to sales order
Hi,
My need is to create a service notification TC IW51 with reference to sales order (credit memo request).
is there a bapi to do this or i must do a bdc?
please help.
A+
Ihsen ABROUGI have custom screen fields on notification service!
i think a bdc is better. -
How do i cancel all of my services? fed up with BT...
Hey
As you might be able to tell, I am totally fed up with BT, the Broadband is stupidly slow only 1meg, customer service is poor, and bt vision doesnt even work without constant errors (V04).
Now BT have the cheek to increase our monthly costs by 70 pence a month and raise the call charges!
I am now stuck in a contract (12 months for the Option 3 BB & Evening & Weekend phone) and 6 months for BT Vision Gold.
I've spent many hours on the phone being bounced from pillar to post by the asians and the uk based ''reps'' are not much better, BT seem to insist on sending an engineer with no flexibility on times as we all work when the slots are!
Surely there must be a clause in the contract that allows me to cancel the services without paying £376!!! to cancel the poor service.
Not sure whether term 50 and term 52 of the residential terms and conditions would allow us to get rid of BT?
http://www.productsandservices.bt.com/consumerProducts/dynamicmodules/pagecontentfooter/pageContentF...
I can get a better package from Smallworld (Ultimate TV, Sky Sports, Sky Movies, ESPN, 50meg Broadband, Evening and Weekend calls) for only £70 a month! They offer better customer service aswell.
Thank youHi.
if they have changed the terms of your contract ie: increased prices etc, then this would give you the right to cancel trhat part of your contract that is affected.
You must inform them within (I believe) 10 days from being imformed of the change in terms and conditions.
[edit] As its only the phone side that would be affected, how you go about BB and Vision I am not sure. maybe some one will post some advice on that.
[edit] Changing the terms (notification)
Sometimes, we will need to change the charges or the terms and conditions of a service covered by this agreement. We will publish details of all changes online at www.bt.com.
We will also let you know about a price increase or a change to the terms and conditions that we believe is likely to cause you material disadvantage at least one month before it happens. We will let you know about other price changes and changes to the terms and conditions with your next available bill or by an alternative method if this is simpler.
Sometimes we may need to make changes to our charges or the terms and conditions of a service which are outside of our control – for example to meet legal, regulatory or financial requirements. If we need to make changes for these reasons, we will let you know as soon as we can, but we will not have to meet the timescales detailed in paragraph 50, and you will not be able to end any affected service early without charge.
If we make a change to the price or the terms and conditions of a service which is to your material disadvantage, you will not have to pay a charge if you decide to end that service early, unless the Tariff Guide says otherwise. However, once we have told you about such a change, you must let us know that you want to end that service within 10 days. This agreement will continue to apply to any other services that are not affected by any changes that we make.
toekneem
http://www.no2nuisancecalls.net
(EASBF) -
Help Bapi Purchase order with reference to purchase requisition no
Hi,
i used BAPI_PO_CREATE1 for creating purchase order with reference to Purchase requisition number but im getting these error
please help me to solve this
1 E BAPI 001 No instance of object type PurchaseOrder has been created. External reference:
2 E MEPO 001 Purchase order item 00010 still contains faulty schedule lines
3 E 06 054 Doc. type/item cat. NB/S (requisition) <-> NB/ (purch. order)
4 E 8W 162 No schedule line exists for schedule line number 0010000030 00010 0000.
Thanks & Regards,
Azhar
Message was edited by:
AzharHi Azar,
I am also getting the same messages, did you get resolve the issue. -
Have created PO with reference to a PR that is not fully released
Dear SAP Experts,
We are encountering an issue during creation of PO. We can create a PO with reference to a PR that is not fully released. The PR has not been fully released in the past.
1. PR was created and was released upto web approval (PR is currently not fully approved)
2. PO was created with reference to the PR that is not fully approved and also with reference to an RFQ. The PO was created even if the PR was not fully approved.
We tried to simulated the steps above in development server and PO cannot be created because of the error 'Purchase requisition 168151, item 00110, not released for ordering'. However, in production, the PO was created and the PO created was fully released already.
Any inputs as to why this happened? Your help will be highly appreciated.
Jessica Cruz
Software dev. analyst
Smart Communications, IncHi Jessica,
While creating the PO you might have entered the PR No. in PO Item overviewbut it might have happened knowingly or unknowingly the PR No. is deleted from Delivery Schedule tab at Item details of the PO either during PO creatin or PO change mode.
Generally system updates the PR status by validating the PR No. in delivery schedule tab of the PO.
Though the PR No. is reflecting at PO Item overview,.as there is no PR No. in delivery schedule tab it is not checking wether the PR is released or not.
Bye
Sridhar Thota -
STO with reference to Purchase requisition
Dear SAP gurus,
Can I create a STO with reference to purchase requisition from Sales order.
Below is the scenario:
In Export sales, we have created dock location as plant. First a sales order to be created with third party item to generate purchase requisition.
Now with reference to purchase requisistion, I want to create a STO.
Can this be possible....
regards,
PPHi,
Did something similar on a 4.0a system years ago, maybe this will help.
My notes say:
PO create, stock transfer order
enter order type (ours was customized version - probably so that the copy rules from PR - PO were set correctly)
Create with reference to P.Req.
on the pop-up box remove the 'U' (think that was the key bit)
continue
select item, copy +details
Save, STO created
Regards,
Maybe you are looking for
-
Bug in production Server !!!
HI all, There is a bug in production server. Error message i am getting is :- "There is an IDoc in the Warehouse outbox that did not arrive in the ALE inbox of the source system." It is a master data that gets loaded in ODS. I have checked in PSA but
-
Exclamation folder nothing works, PLEASE HELP!!!!!
I restored my 4th gen 20g ipod yesterday afternoon and now all i get is the exclamation folder. i have tried resetting, nothing. tried connecting to computer, nothing. CAN ANYONE OUT THERE HELP ME PLEASE?!?
-
Does the Conficker worm affect Macs sharing a network with a PC?
I asked this on Yahoo! Answers, but I am not sure. I want to receive an answer from a reliable Macintosh user. My sister and I share the same network to access the internet, but she is a PC owner while I run a Mac. Will I be affected by this worm?
-
OMBPlus example to bind package function to premapping_process operator
Does anyone have a script snippet showing how to bind a function within a package to a premapping_process operator ? I got this far before the script ref let me down : OMBALTER MAPPING 'MY_MAP' \ ADD PREMAPPING_PROCESS OPERATOR 'FACT_TRANS_PMO' \ BOU
-
Dear All, I am having a proc where I am inserting some rocords and updating some. There will be some records which could not be done either because of length. I want to insert them into bad or log file. How can I do it? Thanks.