Created purchase order based in drafts
I need help, I want to create purchase order based in drafts.
Has somebody any sample in SDK??
Thanks.
Hi Santiago,
Please see your Help Filesprovided with the SDK:
DI-API > Reference > Overview > Objects > Documents. Below on that page you'll find a nice link to the sample below. Replace the <i>vDrafts.DocObjectCode = oInvoices</i> with order and you're set.
Hope it helps,
Rowdy
<b>Code (VB from the Help File)</b>
Sub AddInvoice_Click()
Dim RetVal As Long
Dim ErrCode As Long
Dim ErrMsg As String
'Create the Documents object
Dim vDrafts As SAPbobsCOM.Documents
Set vDrafts = vCmp.GetBusinessObject(oDrafts)
'Set values to the fields
vDrafts.DocObjectCode = oInvoices
vDrafts.CardCode = "BP234"
vDrafts.HandWritten = tNO
vDrafts.DocDate = "21/8/2003"
vDrafts.DocTotal = 264.6
'Invoice Lines - Set values to the first line
vDrafts.Lines.ItemCode = "A00023"
vDrafts.Lines.ItemDescription = "Banana"
vDrafts.Lines.Quantity = 50
'Invoice Lines - Set values to the second line
vDrafts.Lines.Add
vDrafts.Lines.ItemCode = " A00033"
vDrafts.Lines.ItemDescription = "Orange"
vDrafts.Lines.Quantity = 1
'Add the Invoice
RetVal = vDrafts.Add
'Check the result
If RetVal <> 0 Then
vCmp.GetLastError ErrCode, ErrMsg
MsgBox ErrCode & " " & ErrMsg
End If
End Sub
Similar Messages
-
Designing a BADI to create purchase order based on purchase requistion
Hi..
i ve to design a badi such tat whenever an order is placed it shld create a purchase order based on the purchase requsition..
its like a user exit thru a BADI.
theres somethg called a shoppg cart ... thru tat when we enter.... it creates a purchase requisition and without purchase order.... delivers itHi,
U can use the BAPI 'BAPI_PO_CREATE1' to create the purchase requisition. -
Create Purchase Order based on Sales Order through DI
Hi All,
As per my requirment i need to create PO based on Sales Order by Using DI object.
By using the UI i am able to create a PO. i.e,. in the Sales Order Form , in logistic tab when the purchase check box is checked and when the SO is added there is a work around form poped up where we give the vendor information and create PO.
Code:
objPurchaseOrder = objSBOAPI.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
objPurchaseOrder.CardCode = "V1010"
objPurchaseOrder.CardName = "Far East Imports"
objPurchaseOrder.DocDate = "02/24/05"
objPurchaseOrder.DocDueDate = "02/24/05"
objPurchaseOrder.Lines.BaseType = "17"
objPurchaseOrder.Lines.BaseLine = "0"
objPurchaseOrder.Lines.BaseEntry = "35"
objPurchaseOrder.Add()
Error Description : Base Doc Type donot match with target Doc type
PLease help me
Thanks and Regards
Sandeephi,
try removing the double quotes for basetype, baseline, baseentry.
if it doesn't solve the problem
make sure that you are assigning the docentry only but not the docnum of the sales order to the purchase order lines' baseentry.
rgds,laks. -
Purchase orders based on sales orders.
Hello Experts!
I am using MRP in order to create purchase orders based on my sales orders, thats the easy part. My problem is that i need to create a report matching the sales orders with the corresponding purchased orders created through the MRP wizard.
Where can i find such a link between POR1 and RDR1? is there a way I can obtain such report?
Thanks in advance.
Best Regards.
Javier.Hi Rakesh, thanks for your reply. Well i was trying to use the POR1.BaseType and POR1.BaseEntry in order to match them with RDR1.ObjType and RDR1.DocEntry, but POR1.BaseType and POR1.BaseEntry have NULL as their value.
I thought creating orders using MRP was supossed to set the corresponding values to those fields. Is there any other way i can link a purchase order created via the MRP wizard to the base sales order?.
Best regards. -
Purchase order based on Sales order
Hi,
I try to create Purchase order based on Sales order.
The error message :
"Base document card and target document card do not match"
My code:
oPurOrder.Lines.BaseEntry=oSalesOrder.DocEntry
oPurOrder.Lines.BaseLine=oSalesOrder.Lines.Linenum
oPurOrder.Lines.BaseType=17
Could you help me please ?
Tks.
LaetitiaHi,
Looking at your code I will check how you fill the fields in the oPurOrder object because the code you copied is only for the document lines and the error refers to the document itself (maybe you forgot to assign the cardcode property).
If you are basing the document, a good and reliable method is to export the base to a xml file and load the target using this file. This way you garantee that all the info of the document is copied. After that you could use your code to update the info you want to change the same way you pasted it in your post.
Hope it helps,
-M -
User based authorization to create Purchase Orders out of Purchase Req.?
Hello,
I have the following requiment for my client:
User based authorization to create Purchase Orders out of Purchase Req.?
I am told the same can be achieved using same standard menu path in IMG/Customizing.
Please advise with the menu path and detials, Usefull answers will be rewarded.
ThanksUsing OMET Function Authorization, you can restrict users to create Purchase orders without Purchase Reqn.
Using OMET trxn code Create one Function Authorixation Called pr and in General Parameters tab Select the Field Selection and in Possible reference Objects Tab Mark the With ref to Prs check box and save.
Next, you've got to associate via SU01
Click Parameters, insert a new parameter id EFB to the authorization code.
Type in Parameters value you want e.g. XX
You have to assign the control for ALL the SAP buyers via thier SAP users id.
Logoff and login again. Then try to create a Purchase Order without a reference.
From Next time whenever you try to create with out referring PR it will not allow you to Save PO.
Regards,
Ashok -
Workflow issue when create Purchase Order automaticlly based on Sales Order
dear experts,
I got a problem when create purchase order automatically once the Sales Order created, the field ERNAE of the Purchase Order creatd is WF-BATCH, but we want this field to be the user log in the system, like John. Smith
it seems this is a configuration issue, but i am not familar with workflow, do you experts have any solutions?
thank you in advance.
Hongtaothank you for you reply my friend.
yes, i mean the PO creator.
I just create a SO in VA01, then change the Schedule line category from CN to CP, then SAVE, then Confirm the Delivery Proposal. after all this, the PO will be created automatically by Workflow. Because when I display the PO via ME23N, it displays [Standard PO XXXXX created by Workflow-System] on the top of the screen.
But i do not know which workflow is trigered to create the PO. and i tried SWEL like you said, there is no record listed.
do you have any other suggestions? thank you so much, friend. -
How to create purchase order using SharePoint Custom List
Hi All,
Can you please provide some example or link to create Purchase Order using SharePoint List / SharePoint Designer.
ThanksHi,
It would be difficult to achieve what you want with the OOTB features of only one list.
Per my understanding, there would be two main functionalities in the solution you want:
1. Calculate and display the “Balance Qty” dynamically based on the values of “Order Qty” and “Deliver Qty”;
2. Trace the “Deliver Date” and “Deliver Qty” as per “Purchase No”;
As a workaround, I would suggest you create two lists as below:
1. List “Orders”: Saving the upcoming orders per “Purchase No”, one “Order Qty” related to one unique “Purchase No”.
Columns in this list:
Purchase No(Number);
Order Date(Date);
Order Qty(Number);
2. List “Deliveries”: Recording each delivery, one “Deliver Qty” to one unique existing “Purchase No” in list “Orders”.
Columns in this list:
Purchase No(Lookup “Purchase No” in list “Orders”);
Order Date(Additional Lookup column along with “Purchase No”);
Order Qty(Additional Lookup column along with “Purchase No”);
Deliver Date(Date);
Deliver Qty(Number);
Balance Qty(Number);
More information about
Lookup column in SharePoint List:
http://msdn.microsoft.com/en-us/library/office/ff728095(v=office.14).aspx
http://zimmergren.net/technical/sp-2010-how-to-relational-lists-in-sharepoint-2010
In the “Deliveries” list, we can trace each “Deliver Qty” and “Deliver Date” easily by filtering the “Purchase No” column in the list view page.
For the dynamic values in “Balance Qty” column, Event Receiver with custom code would be needed as we will need to query the “Order Qty” in “Orders” list and all the
existing “Deliver Qty” value per “Purchase No” in “Deliveries” list.
An idea about
how to implement a Purchase Order system in this blog would be helpful:
http://ethan-deng.blogspot.jp/2013/03/purchase-order-management-system.html
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
Purchase order based on Purchase requisition
Hello,
Can someone tell me how can create a Purchase Order based on Purchase Requisition in transaction ME21N. In ME21 it is all right but in ME21N where is the option?
Best Regards
João FernandesHello Joao,
When you open purchase order creation transaction (ME21N), you will find button "Document overview" click on that, it will open one column on the left side of the screen, click on colurful tree icon and it will display dropdown list from here select the Purchase requisition. This will take you to report for purchase requisiton so give your criteria and execute. You will get all open purchase requisition so just double click (or drag it to cart) on any purchase requisition it will copy in purchase order screen.
or simply, input the purchase requisition number at item level.
Hope this helps.
Regards
Arif Mansuri -
Splitting Purchase Order based on Loading Group.
Hi,
My client is a fashion retailer. They have two Loading Groups, General Merchendise that comes in cartons and Hung garments that com hung on hangers.
PO`s are created for every Vendor by Follow-on processing of allocation or by replenishment run.
It is desired to split our Purchase Orders based on loading group. So that there is a separate PO for General Merchendise and Hung Garments. These can then be handled separately during GR and furthur processing.
Would like to know how to configure this.
Thanks
BarryYou need to Define Two PO document types one for General Merchendise and other for Hung garments
and use BADI ME_PROCESS_PO_CUST and incorporate the Logic that
for PO Type General Merchendise the Loading Group of Hung garments Not allowed and Similarly
for PO type Hung garments the Loading group of General Merchendise not allowed .. -
During creating Purchase order
Hi alll ,
My Problem is while creating purchase order through purchase requisition
How to remove the tick mark against invoice reciept i.e (repos) and gr based i.e ( weber )
programatically .
Regards
Deepakhi,
if you are working in ECC version you can easily resolve your porblem by implementing implecit enhancement.
the above specifed user exit is not called exactely.
implement two implecit enhancement in the following include program for resolving your problem
1.Go to inlcude program LMEGUICI5. in that we have one method implementaion. Here implement implecit enhancement at the beginning of the method like below.
METHOD transport_to_dynp.
ENHANCEMENT 50 ZREMOVE_FLAG. "active version
clear: mepo1317_pbo-repos,
mepo1317_pbo-webre,
mepo1317_pbo-erekz.
ENDENHANCEMENT.
mepo1317 = mepo1317_pbo.
ENDMETHOD.
2. Go to include program: MM06EFPO_POT_ETDRK and implement another implecit enhancement at the beginning of the following subroutine.
FORM pot_etdrk.
ENHANCEMENT 100 ZREMOVE_POT. "active version
loop at pot.
CLEAR: pot-repos,
pot-webre,
pot-erekz.
MODIFY pot.
ENDLOOP.
ENDENHANCEMENT.
endform.
If you need any information please let me know.
Regards,
Peranandam -
Selection of BOM for a purchase order based on Vendor
Hello Gurus,
We have one material which when ordered from two different vendors should have different components. To make this simple and easy for person creating Purchase Order how should it be implemented?
How should we create BOM that it automatically picks up the right components when a Vendor is chosen in the Purchase Order? We don't want to create two different materials and different BOMs under it. As it is for same product. Please give guidance on this.
Thanks
Regards
Sreepati HariHi Hari,
Read the below SAP documentation for the mode of selection of BOM:
- Selection by order quantity, the system chooses the alternative BOM into whose lot size range the order quantity falls. The lot size range and area of validity of the BOM apply.
- Selection by explosion date, the system chooses the alternative BOM into whose area of validity the date falls according to the setting BOM via dates.
- Selection by production version, the system chooses the alternative BOM defined in the valid production version. The lot size range and area of validity of the production version apply.
- Selection only by production version, the system chooses the alternative BOM defined in the valid production version. The lot size range and area of validity of the production version apply.
If no production version is found, no production orders or process orders can be created.
So based on the above you can clearly understand that it is not possible to have BOM's tied to the Vendor. What you can do as a work around is, i.e. before creating the sub-contracting PO :
1. Change the lot size to ensure the BOM you want gets picked
2. Change the validity dates
3. Change the status of the BOM in header, i.e. make the BOM which you do not want as Inactive
4. As mentioned by you, have different materials & BOM for them.
Hope the above helps.
Regards,
Vivek -
Incorrect sort order of rows in Purchase Order based on Sales Order
Hello Experts.
I have this problem on SAP B1 8.81 PL 04:
I create a Purchase Order based on a Sales Order with 10 item rows, ticking the purchase order box in the logistic tab.
The sort order of rows is different between PO and SO.
I need the same order of SO on PO.
Is there something I can do or it's a problem of this patch?
I saw the Sap Note nr. 824822 but it's related to SAP B1 version 2004 A...
Regards
Silvia Reggiani
Edited by: Silvia Reggiani on Oct 11, 2011 12:26 PMHi,
Are you able to reproduce the issue in the DEMO Database on the 8.81 PL04?
Also, have you checked the issue in the latest patch of the 8.81?
Kind Regards,
Jitin
SAP Business One Forum Team -
How to hide some buttons like CREATE PURCHASE ORDER, COPY, EDIT from POWL?
In SRM 7 ECS we need to hide some buttons like CREATE PURCHASE ORDER, COPY, EDIT from POWL"s. We can do some manipulation via security but we need to make a few buttons invisible without security. Appreciate any advice. Thanks.
Hi Ashwanin
To make read only
Below are the steps to Hide the buttons in POWL table
1. if you want to Gray out the Buttons
IMG > SRM SERVER> Cross Application Basic Settings --> Extensions and Field Control. There you will find a node to control Actions. based on the object type choose your option and make it as read only
To Make invisible
1.If you want to make invisible the button .
IMG > SRM SERVER> Cross Application Basic Settings --> Powl and Advance Search - > Adjust powl layout ,search criteria and push button (OR) t-code : /SAPSRM/POWL_CUST
2.choose the POWL type for the POWl table
3.click on Action node , you will find all the acction assigned for the POWL table ,delete the entry which you want to make invsible and save it
4 .Now run the report POWL_D01 and provide powl type in the selection criteria and deleate the catche quries
Regards
chinnaiya P
Edited by: chinnaiya pandiyan on Jun 27, 2011 3:12 PM -
DI: Create Purchase Order from Multiple Sales Order - Lines
Hi all,
I am trying to group multiple lines from multiple Sales orders concerning One given Vendor/Supplier so as to generate One Purchase order for this Vendor/Supplier
oSalesOrder = (Documents)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.oOrders);
oPurchaseOrder = (Documents)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.oPurchaseOrders);
oPurchaseOrder.CardCode = 'Vendor1'
oSalesOrder.getByKey("13");
oSalesOrder.Lines.SetCurrentLine("4");
oPurchaseOrder.Lines.BaseEntry = oSalesOrder.DocEntry;
oPurchaseOrder.Lines.BaseLine = oSalesOrder.Lines.LineNum;
oPurchaseOrder.Lines.BaseType = (int)BoObjectTypes.oOrders;
oPurchaseOrder.Lines.Add();
oSalesOrder.getByKey("14");
oSalesOrder.Lines.SetCurrentLine("2");
oPurchaseOrder.Lines.BaseEntry = oSalesOrder.DocEntry;
oPurchaseOrder.Lines.BaseLine = oSalesOrder.Lines.LineNum;
oPurchaseOrder.Lines.BaseType = (int)BoObjectTypes.oOrders;
if (oPurchaseOrder.Add()!=0)
MessageBox(B1Connections.diCompany.GetLastErrorDescription());
I get the following Error: <i>Base Document Card and Target Document Card do not match</i>.
What more Should I do to avoid This?
Regards,
Emmanuel.Hi Emmanuel,
As far as I know you cannot create a purchase order based on a sales order using the DI API. I know in SBO you can do this, but I don't think using the SDK. The reason why it's giving you the message "Base Document Card and Target Document Card do not match" is because one is a vendor and one is a customer.
Hope it helps,
Adele
Maybe you are looking for
-
How to delete the old ios6 in itunes ?
the ios7 downloaded into the music app. I need to delete ios6 in itunes and move the update to itunes. how can I do that?
-
Interactive PDF Form in Landscaped Page; Problems with Additional Pages
Please see the attached screenshot. I created a form (in Word) which has 10 pages of the exact same fields except for the side number (the 10 pages number from 1 to 200) which numbers each line to be filled out by the end user. I have created each fi
-
Report Painter : Local currency is having decimal points for chile
Hi Friends, I have a report painter in which the amount for the the countries which are not having the decimal places like chile and Japan are displying with the decimal places, when i changed the base key figure as the transaction currency instead o
-
Hello Everyone, Am trying to configure system and user discovery but when i click path i get the error below, Please advise Current security context is not associated with an Active Directory domain or forest. System.DirectoryServices.ActiveDirectory
-
How to exclude the file during tar
hi, i hav directory called 'kesdlmsweb.war' in that i hav many sub directory and file.now i want to tar the whole 'kesdlmsweb.war' excluding one directory in that 'kesdlmsweb.war' the name of that directory to be excluded is 'courseimports'.so can an