PL/SQL API for Creating Sales Order
Hi,
I am new to Oracle SOA 11g.
I have done the Deleting Sales Order using PL/SQL API ( Oracle Apps Adapter ) [ API Name: OE_ORDER_PUB.DELETE_ORDER ] in SOA BPEL. While executing the BPEL, it is correctly deleting Sales Order in E Business Suite which is created in EBS User Interface. I don't face any problem while deleting the sales order.
Now, in same way, I have to create a new Sales Order using PL/SQL API in SOA-BPEL. I don't find any API's related to creating Sales Order in Order Management Suite (OM_PF) -->Order Management (ONT) --> Sales Order (ONT_SALES_ORDER) --> PL/SQL --> Process Order API (OE_ORDER_PUB) in Module Browser.
Please tell me which PL/SQL API to use to create new Sales Order in BPEL.
Thanks,
-- Gowtham
Edited by: user8223943 on Feb 16, 2012 7:38 AM
You may be on a different patch level. Can you ensure that you have applied all latest patches for your version?
See sample code at http://jyotioraapps.blogspot.com/2009/08/use-of-oeorderpubprocessorder-to-create.html
Hope this helps,
Sandeep Gandhi
Similar Messages
-
PL/SQL API for Creating Sales Order in E Business Suite from BPEL
Hi,
I am new to Oracle SOA 11g.
I have done the Deleting Sales Order using PL/SQL API ( Oracle Apps Adapter ) [ API Name: OE_ORDER_PUB.DELETE_ORDER ]. While executing the BPEL, it is correctly deleting Sales Order in E Business Suite which is created EBS User Interface. I don't face any problem while deleting the sales order.
Now, in same way, I have to create a new Sales Order using PL/SQL API. I don't find any API's related to creating Sales Order in Order Management Suite (OM_PF) -->Order Management (ONT) --> Sales Order (ONT_SALES_ORDER) --> PL/SQL --> Process Order API (OE_ORDER_PUB) in Module Browser.
Please tell me which PL/SQL API to use to create new Sales Order in BPEL.
Thanks,
-- GowthamYou may be on a different patch level. Can you ensure that you have applied all latest patches for your version?
See sample code at http://jyotioraapps.blogspot.com/2009/08/use-of-oeorderpubprocessorder-to-create.html
Hope this helps,
Sandeep Gandhi -
How to use of API for Cancel Sales Orders
Hi....
I want to use API for Cancel Sales Orders. Plz give me advice how we can cancel orders. I know that there is procedure provide in ORACLE APPs (i.e. OE_ORDER_PUB.process_order). But in this procedure i know the how to create and update sales order, but how to Cancel order with the use of this API.
Plz send me soultion as soon as possible. ITS VERY VERY URGENT BASE.
Thanks in Advance.Hi all,
We are importing Sales Orders on 11.5.9 using OE_Order_PUB.Process_Order API .We have supplied most of the mandatory fields and the same data works from the front end. When we use the API it throws a Ora 20001.
A snapshot of the error message.
SQL> exec pk_process_object.process_order('1o');
Message Count is :2
Message is RA-20001: User in Package OE_Header_Util Procedure Get_Order_Number
Message is :User-Defined Exception in Package OE_Header_Util Procedure
Pre_Write_Process
Return Status is ErrorU
PL/SQL procedure successfully completed.
-------------------------------------------------------------------------------------------- -
BAPI For CREATE SALES ORDER WITH REFERENCE TO ORDER
Hi ,
I want to develop a new RFC for 'Creating Sales Order' with reference to another sales order -
Is there any BAPI available for the same ? (Version 4.7) - I know its available for new create and change
but couldn't find for create with reference to Order ...
Thanks in advance ...
Regards
Rajesh.Hi,
You can use this FM "/SAPNEA/SMAPI_ORDER_CREATE". I haven;t tried this but you can still give it a try. Mention the Reference Order Type and other data in the header work area and pass it to the FM.
Reward if it's useful.
Thanks,
Anil -
Pricing determination for creating sales order using BAPI
Hi,
I am using BAPI_SALESORDER_CREATEFROMDAT2 for creating sales order. I am filling conditions structures
'BAPICOND' and 'BAPICONDX' .
fs_order_conditions_in-itm_number = '00010'.
fs_order_conditions_in-cond_type = 'ZNTP'.
fs_order_conditions_in-cond_value = zsalesinput-price.
fs_order_conditions_in-currency = 'INR'.
append fs_order_conditions_in to order_conditions_in.
fs_order_conditions_inx-itm_number = '00010'.
fs_order_conditions_inx-cond_type = 'ZNTP'.
fs_order_conditions_inx-cond_value = 'X'.
fs_order_conditions_inx-currency = 'X'.
fs_order_conditions_inx-updateflag = 'U'.
append fs_order_conditions_inx to order_conditions_inx.
I am filling the conditions table with above mentioned fields.
Sales order is getting created successfully but I am getting two condition records in the conditions tab of sales order, one which is filled using the BAPI and the other one which is automatically picked by the system. Please tell me how to restrict the one which is created automatically by the system.
Because I want the one which is created by BAPI only.
Helpful posts will be rewardedHello Manchu.
Basically, it is an SD customizing issue. During the creation of the Sales Order you cannot "restrict" any other condition type. The SD guys must customize the condition type to allow for zero value so that the sales order is successfully created without this conition type.
Regards,
George -
Web Service for "Creating Sales Order" by using BAPI
Hello All,
I am trying to create a WS for "Creating Sales Order". The corresponding BAPI that I am using for this purpose is BAPI_SALESORDER_CREATEFROMDAT1. I am able to create the Web Service and run the WSDL on WS Navigator.
But there is a problem whil executing the Web Service. In the interface of WS, we can only enter item level details of "Order Partner". So when I enter the details and click on Execute, it returns me an error message "Please enter Ship to Party and Sold to Party". I have already given these details.
Does any one have any idea of what is going wrong?
Regards,
AbhishekAs you suggested i have passed the suggested parameters in item level..But this time i was not ablet to create the SO also..earlier i am able to creat SO but not line item, But now ia m not able to creat salesdocuement also.
Return talbe filled with belwo messages.
S V4 233 SALES_HEADER_IN has been processed successfully
E V1 320 No item category available (Table T184 ZKB TEXT )
E V4 248 Error in SALES_ITEM_IN 000000
W V1 555 The sales document is not yet complete: Edit data
E V4 219 Sales document was not changed -
WebDynpro Application for Create Sales Order
Hi All,
Can any one help me to get the right documentation on How to create a WebDynpro Application for Create Sales Order, Calling BAPI.In NWDS, click Help-->Welcome...Netweaver Developer Studio. Under "Developing WebDynpro Applications" click the link to the chapter.
Go to....
SAP WebAS for Java Applications
Development Manual
Developing Web Application
Web Dynpro
Tutorials
Advanced Tutorials
Model Tutorials
Creating a Web Dynpro Appliation Accessing ABAP Functions.
This should get you started.
Regards,
Rich Heilman -
Minimum mandatry fields for Creating Sales Order
Hi All,
I am going to create sales order using <b>BAPI_SALESORDER_CREATEFROMDAT2</b> in the web dynpro for java,
I want to use minimum fields, so, what are the <b>minimum</b> fields for creating sales order ?.
if u have any documents or links realted to this please send me.
please help me out.
Thanks & regards,
Iqbal Ahmadchk it
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = l_order_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = l_salesdocument
TABLES
RETURN = it_return
ORDER_ITEMS_IN = it_order_items
ORDER_ITEMS_INX =
ORDER_PARTNERS = it_order_partners
ORDER_SCHEDULES_IN = it_order_schdl
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN = it_order_conditions
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES
How to create sales order using bapi( test purpose)
Create Sales Order using BAPI
creating sales order using bapi -
How to use Bapi for creating sales order
Dear All,
I am facing problem in creating Sales orders using BAPI.
Actually I am getting one file as an input and after validating the contents in the file i am preparing an internal table which has 6 fields - Customer number,PO Number,Material Number,Quantity,Price,Unit of measure.
Now my doubt is that while using BAPI_SALESORDER_CREATEFROMDAT2 , I am not getting how to pass PO Number and Customer number.
Please Help.
Regards,
ShwetaHi shweta upadhyay
I have gone through you are post i have done some coding for creating sales order using bapi , I think it is helpful for you.
*& Report YOBJ_BAPI_SALESORDER
*& REPORT : CREATING SALES ORDER USING STANDARD BAPI
*& AUTHOR : S.PAVAN KUMAR INUMARTHY
REPORT YOBJ_BAPI_SALESORDER.
DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
*APPENDING VALUES FOR HEADER.
ORDER_HEADER_IN-DOC_TYPE = 'TA'.
ORDER_HEADER_IN-SALES_ORG = '1000'.
ORDER_HEADER_IN-DISTR_CHAN = '10'.
ORDER_HEADER_IN-DIVISION = '00'.
ORDER_HEADER_IN-SALES_GRP = '130'.
ORDER_HEADER_IN-SALES_OFF = '1030'.
APPEND ORDER_HEADER_IN.
*APPENDING VALUES FOR ITEM
ORDER_ITEMS_IN-MATERIAL = 'M-13'.
ORDER_ITEMS_IN-PLANT = '1000'.
ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
ORDER_ITEMS_IN-DIVISION = '07'.
ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
ORDER_ITEMS_IN-VOLUME = '0.780'.
ORDER_ITEMS_IN-VOLUNIT = 'M3'.
APPEND ORDER_ITEMS_IN.
*APPENDING VALUES FOR PARTNER
ORDER_PARTNERS-PARTN_ROLE = 'AG'.
ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
ORDER_PARTNERS-COUNTRY = 'DE'.
ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
APPEND ORDER_PARTNERS.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
ORDER_ITEMS_IN = ORDER_ITEMS_IN
* ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.
WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
This will be very helpful for you .
this one is the correct answer I have tried it and I am posting it for you.
Message was edited by: pavan inumarthy -
Transaction for creating sales order
Hi guys could any one tell me what is the T.CODE for creating the sales order
Va01 - Create Sales Order
VA02 - Change Sales Order
VA03 - Display Sales Order
Regards,
Rich Heilman -
BAPI FOR CREATING SALES ORDER WITH REFFERENCE TO QUOTATION
Hi All,
I am creating sales order with refference to quotation by using bapi "BAPI_SALESORDER_CREATEFROMDATA".Able to create sales order but its not refferencing qutation.Is there any other bapi for this scenario.Please guide me.
Regards,
SureshHi ,
Thank you for giving reply I tried by using bapi BAPI_SALESORDER_CREATEFROMDAT2 after execution it giving sales order number but when I am trying to see that sales order system is giving error message as document is not exist.
Please guide me.
Suresh -
BAPI_SALESORDER_CREATEFROMDAT2 for creating sales orders with configurable
Hi All,
I want to create sales order with a material which in turn triggers a configurable network order.
I am using the following BAPI : BAPI_SALESORDER_CREATEFROMDAT2.
After reading the "[Variant Configuration (LO-VC)|http://help.sap.com/printdocu/core/print46c/en/data/pdf/lovc/lovc.pdf]" documentation, I thought I had to populate the
following tables ORDER_CFGS_REF, ORDER_CFGS_INST and ORDER_CFGS_VALUE.
The call function return no errors and the sale order is well created. However, I have no values in the network.
If I created a sale order in VA01, a network is created with value. So the customizing is good.
Do you have any idea how to populate this tables ? Sample code will be very helpful.
We found in this forum a lot of sample code about configurable material, with obj_type populate with MARAu2019. But no example with configurable network.
Actually I complete these tables like this :
" E1CUCFG
ls_order_cfgs_ref-posex = '000010'.
* ls_order_cfgs_ref-config_id = '000010'.
ls_order_cfgs_ref-config_id = '000001'.
ls_order_cfgs_ref-root_id = '00000001'.
ls_order_cfgs_ref-complete = 'T'.
ls_order_cfgs_ref-consistent = 'T'.
* ls_order_cfgs_ref-cbase_id = '4ECADFC4BE9F03A6E10080000AC4AB76'.
* ls_order_cfgs_ref-cbase_id_type = 'G'.
APPEND ls_order_cfgs_ref TO lt_order_cfgs_ref.
" E1CUINS
ls_order_cfgs_inst-config_id = '000001'.
ls_order_cfgs_inst-inst_id = '00000001'.
ls_order_cfgs_inst-obj_type = 'PLKONET'. u201C(in replacement of MARA)
ls_order_cfgs_inst-class_type = '300'. u201C(or 020).
ls_order_cfgs_inst-obj_key = '01000000801'.
APPEND ls_order_cfgs_inst TO lt_order_cfgs_inst.
" E1CUVAL
ls_order_cfgs_value-config_id = '000001'.
ls_order_cfgs_value-inst_id = '00000001'.
ls_order_cfgs_value-charc = 'XXXX'. u201C(corresponding to Flag DTA)
ls_order_cfgs_value-charc_txt = 'Flag DTA'.
ls_order_cfgs_value-value = '0'.
APPEND ls_order_cfgs_value TO lt_order_cfgs_value.
Thanks,Have a look to OSS-Message 567348. There is sample coding for using BAPI_SALESORDER_CHANGE, but the parameters should be the same to yout BAPI
Best regards
Torsten Manhardt -
Hi, can anyone give me any <a href="http://theblogwhichsaysall.blogspot.com">hint</a>
Hi,
You can also create the sales order using standard BAPI:
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
Hope this may be usefull.
Regards,
Prashant -
SQL Queries for open sales orders with no invoice.
Hello all!
Is there a way to make a query to find out if there are any uninvoiced sales orders older than 5 days? I am having difficulty figuring out how the invoice is linked to the sales order.
I am more familiar with excel than SQL but I'm guessing it will be similar to the following:
SELECT * FROM ORDR WHERE today's date - posting date>5 AND (not sure what to check here for the invoice having been created)
**Note: my syntax is of course not exactly correct, this is just to give you an idea of what I'm looking for
Has anyone had to do this before or know how it would be done? It would be very useful for me.
Thanks!
MikeHi Mike
The document link is built on row level so the RDR1 should be used instead of ORDR to server your propose.
You could use this query to get all the lines do not link to a invoice.
*targettype 13 refers to target document invoice
select t0.docentry,t0.docdate,t0.linenum,t0.itemcode,t0.quantity,t0.price,t0.linetotal
from rdr1 t0 join ordr t1 on t0.docentry= t1.docentry
where t0.trgetentry is null and t0.DocDate < dateadd("d",-5, getdate()) and t1.docstatus = 'O'
or just use this query instead to find those lines do not link to any document
select t0.docentry,t0.docdate,t0.linenum,t0.itemcode,t0.quantity,t0.price,t0.linetotal
from rdr1 t0 join ordr t1 on t0.docentry= t1.docentry
where t0.targettype !='13' and t0.DocDate < dateadd("d",-5, getdate()) and t1.docstatus = 'O'
Please modify the code according to your needs.
Regards,
Syn Qin
SAP Business One Forums Team
Edited by: Syn Qin on Aug 11, 2008 5:20 AM -
Using BAPI_ACTIVITYCRM_CREATEMULTI for creating sales order in CRM
Hello Experts,
I am creating a sales order using BAPI_ACTIVITYCRM_CREATEMULTI, But I am getting the following errors:
1. Reference Object Type (ORGMAN) not allowed
2. Reference Object Type (PARTNER) not allowed
3. Incomplete interface data - No reference specified
4. Item was not found
Can you please help me with the mandatory fields, that has to be filled in the BAPI, and do I need to use Commit BAPI after this BAPI.
Please I am in critical postion,
Now I am able to create a sales order there is no data it like the partner number and Item.May be I am missing some important fileds.
Please help.
Thanks,
Suma
Edited by: Suma B on Aug 8, 2008 1:05 PMHi,
I am passing data using SE37 T-Code.
I was told by the fucntioal guys that GUID will be generated by CRM, so we dont need to send that as an input.
Still facing the same error...
These are my input fields:
REF_HANDLE
REF_GUID
R
OBJECTNAME
LOGICAL_KEY
FIELDNAME
C
|
0000000000
ORDERADM_H
PROCESS_TYPE
0000000000
ORDERADM_H
POSTING_DATE
0000000000
ACTIVITY_H
CATEGORY
0000000000
ACTIVITY_H
PRIORITY
0000000000
ACTIVITY_H
DIRECTION
0000000000
PARTNER
000000000022XXXXXXX
REF_PARTNER_FCT
0000000000
PARTNER
000000000022XXXXXXX
REF_PARTNER_NO
0000000000
PARTNER
000000000022XXXXXXX
PARTNER_FCT
0000000000
PARTNER
000000000022XXXXXXX
PARTNER_NO
0000000000
ORGMAN
DIS_CHANNEL
0000000000
ORGMAN
DIVISION
0000000000
ORGMAN
SALES_ORG
0000000000
ORDERADM_I
PRODUCT
0000000001
B
SCHEDLIN
00000000000000000000000000000000
QUANTITY
|
This is error log:
T
ID
NUM
MESSAGE
LOG_NO
LOG_MS
MESSAGE_V1
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
PARAMETER
ROW
FIELD
SYSTEM
|
W
CRM_ORDER
004
Referenced object type (ORGMAN) not allowed
$000001
000001
ORGMAN
ORDER
0
CR5CLNT100
W
CRM_ORDER
004
Referenced object type (PARTNER) not allowed
$000001
000002
PARTNER
ORDER
0
CR5CLNT100
W
CRM_ORDER
005
Incomplete interface data - No reference specified
$000001
000003
ORDER
0
CR5CLNT100
E
CRM_ORDERADM_I
006
Item was not found.
$000001
000004
ORDER
0
CR5CLNT100
E
CRM_ORDER
005
Incomplete interface data - No reference specified
$000001
000005
ORDER
0
CR5CLNT100
S
CRM_MESSAGES
005
A log has been generated for single document
$000001
000006
MESSAGES
0
CR5CLNT100
E
COM_PARTNER
119
Enter Sold-To Party
$000002
000001
Sold-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Ship-To Party
$000002
000002
Ship-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Bill-To Party
$000002
000003
Bill-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Payer
$000002
000004
Payer
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Sold-To Party
00000000000000047612
000001
Sold-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Ship-To Party
00000000000000047612
000002
Ship-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Bill-To Party
00000000000000047612
000003
Bill-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Payer
00000000000000047612
000004
Payer
PARTNER
0
PARTNER_NO
CR5CLNT100
|
Thanks,
Suma
Maybe you are looking for
-
I believe there is a bug (or perhaps is just my ignorance about unix OSs'). It has happened to me twice now since I got my IMac last year. The thing is that I love the way my IMac Looks and I always try to customize the looks and to trick a little bi
-
Creating user defined table in SBO-COMMON
Hello experts, I'd like to create a user defined table in SBO-COMMON. I'll tell you why: I have successfully created a SAP B1 addon which adds freight costs to an order if the total amount is under a certain threshold. We have 2 administrations runni
-
Printing Envelopes Other Than #10 with HP LaserJet 4240 Envelope Feeder
I'm trying to use an HP LaserJet 4240 and an HP 75-sheet Envelope Feeder to print envelopes from FileMaker Pro. HP's specifications for the envelope feeder note that it accepts "various sizes of envelopes." However, we are unable to specify any size
-
I downloaded steam and every time i try to launch it it crashes. what can i do?
I downloaded steam to my iMac and every time i load it it crashes and i get the option to reopen it, when i do i happens again. i have tried 30 times and to no avail, restarted twice and turned of and on 3 times makes no difference. does anyone no wh
-
ERec : Send Education Infotype from Employee Profile to eRecrecruiting
Hello, We are planning to use the Employee profile WebDynpro Application HRTMC_EMPLOYEE_PROFILE for employees to maintain their background data like education and experience. We are using eRecruiting tool since a long time and we plan to migrate Educ