Program used in R/3 that creates the sales orders sent by CRM
Hello CRMers:
We are working with Sales orders in CRM that, via Middleware, replicate into R/3.
We need to add a Abap development in order to change the Sales orders Delivery block status when these orders are created in R/3.
The problem we have is that we don't know the Bapi or the program that creates Sales order in R/3 when it is sent by CRM.
Thanks in advance!
Laura
Hi Laura,
Did you consider SO doc type config in VOV8 to autoblock when created? Its standard only and doesn't require development work....
Actually, in VOV8 for the document type of the Sales Order in ECC (or R/3), you may add indicator A - Only automatic creation allowed, e.g. for rebate processing
for the field, Sales Document Block. So, when CRM creates the SO# and transmits to R/3, it will get blocked automatically....
Regards
Similar Messages
-
How to create the sales order using BAPI's ....?
Hi Guru's,
could you please provide how to create the sales order using BAPI's .....i need step by step process and please provide the details from scratch....basically i don't have basic knowledge on this....please provide required inputs ....:)
thanks in advance
Srinivas......Hi Guru's thanks for your inouts and your valuble time...
please find the program logic below...
*& Report ZAREPAS30
REPORT zarepas30.
DATA : gs_vbeln TYPE vbak-vbeln,
gs_order_header_in TYPE bapisdhd1,
gs_order_header_inx TYPE bapisdhd1x,
gt_order_items_in TYPE STANDARD TABLE OF bapisditm,
gwa_itab1 TYPE bapisditm,
gt_order_items_inx TYPE STANDARD TABLE OF bapisditmx,
gwa_itab2 TYPE bapisditmx,
gt_order_partners TYPE STANDARD TABLE OF bapiparnr,
gwa_itab3 TYPE bapiparnr,
gt_return TYPE STANDARD TABLE OF bapiret2,
gwa_itab4 TYPE bapiret2.
Sales document type
PARAMETERS: p_auart TYPE auart OBLIGATORY.
Sales organization
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
Distribution channel
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
Division.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
Requested Delivery Date
PARAMETERS: p_edatu TYPE edatu OBLIGATORY.
Sold-to
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
Ship-to
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
Material
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
Quantity.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
Plant
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
gs_order_header_in-doc_type = p_auart.
gs_order_header_inx-doc_type = 'X'.
Sales organization
gs_order_header_in-sales_org = p_vkorg.
gs_order_header_inx-sales_org = 'X'.
Distribution channel
gs_order_header_in-distr_chan = p_vtweg.
gs_order_header_inx-distr_chan = 'X'.
Division
gs_order_header_in-division = p_spart.
gs_order_header_inx-division = 'X'.
Reguested Delivery Date
gs_order_header_in-req_date_h = p_edatu.
gs_order_header_inx-req_date_h = 'X'.
gs_order_header_inx-updateflag = 'I'.
Partner data
Sold to
gwa_itab3-partn_role = 'AG'.
gwa_itab3-partn_numb = p_sold.
APPEND gwa_itab3 TO gt_order_partners .
ship to
gwa_itab3-partn_role = 'WE'.
gwa_itab3-partn_numb = p_ship.
APPEND gwa_itab3 TO gt_order_partners .
ITEM DATA
gwa_itab2-updateflag = 'I'.
Line item number.
gwa_itab1-itm_number = '000010'.
gwa_itab2-itm_number = 'X'.
Material
gwa_itab1-material = p_matnr.
gwa_itab2-material = 'X'.
Plant
gwa_itab1-plant = p_plant.
gwa_itab2-plant = 'X'.
Quantity
gwa_itab1-target_qty = p_menge.
gwa_itab2-target_qty = 'X'.
APPEND gwa_itab1 TO gt_order_items_in.
APPEND gwa_itab2 TO gt_order_items_inx.
Line item number.
gwa_itab1-itm_number = '000020'.
gwa_itab2-itm_number = 'X'.
Material
gwa_itab1-material = p_matnr.
gwa_itab2-material = 'X'.
Plant
gwa_itab1-plant = p_plant.
gwa_itab2-plant = 'X'.
Quantity
gwa_itab1-target_qty = p_menge.
gwa_itab2-target_qty = 'X'.
APPEND gwa_itab1 TO gt_order_items_in.
APPEND gwa_itab2 TO gt_order_items_inx.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = gs_order_header_in
ORDER_HEADER_INX = gs_order_header_inx
IMPORTING
SALESDOCUMENT = gs_vbeln
tables
RETURN = gt_return
ORDER_ITEMS_IN = gt_order_items_in
ORDER_ITEMS_INX = gt_order_items_inx
order_partners = gt_order_partners.
Check the return table.
LOOP AT gt_return into gwa_itab4 WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error occured while creating sales order '.
ELSE.
Commit the work.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'Document ', gs_vbeln, ' created'.
ENDIF. -
Error while creating the sales order using Proxy
Hi Folks,
I am trying to create a Sales Order using Proxy via BAPI "BAPI_SALESORDER_CREATEFROMDAT2" :
and i got this type of standard error message
<Message>FB call: insufficient parameters</Message>
few days back only i used the same bapi for creating the Sales Order and did it successfully...using the same parameters
I don't have any clue about this type error .
Kindly guide .
Regards,Hi Nikhil,
How refreshing the cache and restart the server will help ?
basically i am testing the scenario at R/3 end only by generating XML template in SPROXY.
My ECC 6.0 is on sp 12....I am not sure is it configuration related error or a bug ? as i have used the same code in ECC 6.0 with sp 09.
regards, -
How to create the sales order using excell sheet thru BAPI's?
Hi Guru's,
In my excell sheet i had 11 sales order details ..now i wanted to create the sales order's sing BAPI's...?
could please guide me step by step.....that would be greatly helpfull to me...
Thanks in advance
Srinivas....Hi,
follow below steps.
1. Get the excel data into internal table, Build a internal table whcih fields are in bapi same order
2. call the Bapi and pass the table data to the bapi
3. after calling the bapi, call the commit bapi.
then only it will careates.
Regards
Ganesh -
Material Listing Error while creating the sales order
Hi Guru's
I have mantained a material in the lisitng for A002 combiantion for SO/DC/Pric. ref. material
While creating the sales order is throwing an error as material is not listed so the transaction is not possible.
I have done the basic invetingation on the folowing aspects
1)checking the material in the listing
2)Validity periods
3)Material not blcoked
4)Mateial is extened for the respective sales org
Kindly help ASAP.
Thanks & Regards
TarakaramDear SAP SD 007
I can confidently tell that an enhancement or an user exit has been applied in your scenario
You have to check that
Normally when creating a sales order with respect or referring billing documents the qty will be in editable mode and it is standard problem
Your people has solved the standard problem by enhancement
Usually OR--LF-PGI----F2 (SAY THE QTY IS 25 UNITS)
Now you are creating returns order with reference to F2 in the return order type Re there is a standard issue that user can edit the qty to 30 from the original 25
To solve this only your people have used userexit
Line items and qty greyed out means definately there is some enhancement or user exit applied
You have to check that
Regards
Raja -
Error while creating the sales order with billing reference
hi alll
i am getting error while creating the sales order with billing reference.The line items are coming in grey.I am not able to change the items as well as the quantity field.Can u guide me
cheers
shalsa007........Dear SAP SD 007
I can confidently tell that an enhancement or an user exit has been applied in your scenario
You have to check that
Normally when creating a sales order with respect or referring billing documents the qty will be in editable mode and it is standard problem
Your people has solved the standard problem by enhancement
Usually OR--LF-PGI----F2 (SAY THE QTY IS 25 UNITS)
Now you are creating returns order with reference to F2 in the return order type Re there is a standard issue that user can edit the qty to 30 from the original 25
To solve this only your people have used userexit
Line items and qty greyed out means definately there is some enhancement or user exit applied
You have to check that
Regards
Raja -
Problem in when creating the sales order
Hi to All,
I am using the function module 'BAPI_SALESORDER_CREATEFROMDAT2' to create a sales order with quotation reference. When
I executing the program the return table shows following issues
1.Document 20000292 doesn't have document category but
2.Sales document was not changed
But , when i used to create the sales order manually( TC : VA01) with reference of '0020000292' it gives the sales order number.
so,kindly suggest me.
Thank youHi,
While using BAPI, you need to give some mandatory fields . So I think document catogary is missing in header structure.
Thanks,
Srikanth.A -
Address number of the person who created the sales order.
Hello Experts,
I am currently making a report in which it has to send the output of the script as a email attachment to the person who created the sales order. For this i am using a standard include RVADOPFO but here we need to pass the address number and person number gor getting the rest of the details. So where i can find the address of the person who created the sales order. (I am able to get the name throuhg VBDKA-ERNAM, but i need address number of that person)
Thanks & Regards,
Uday S.Hi Uday,
check
ADRC-NAME1 = VBAP-ERNAM
in ADRC you will get the address of the SO created person in the field ADDRNUMBER that you have to pass in the ADR6-ADDRNUMBER you will get the mail address in the field ADR6-SMTP_ADDR
hope it helps you
Thanks!
Edited by: Prasanth on Mar 12, 2009 3:15 PM -
To create the Sales Order based on PO IDOC.
Hi Experts,
The requirement is based on the generated PO IDoc, I have to create the Sales Order.
Say Ex: Consider the Client 130. Here I have changed the PO 4500017195 by giving the Medium as EDI in the messages and saved the PO.
As a result of that IDoc got generated at the port. Now using this IDoc I have to create the Sales Order in the same 130 client.
Thanks in Advance.now read the same IDOC..configure it for inbound process code in WE20...or you can create a report...call the created idoc using process code of SO...
regards,
madan -
Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in Oracle and yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.
Thanks for your advise.
However, I missed to mention that we have two set of users One is for Finished Goods and another for Spares.
Only Spares users need to be prevented from creating Direct/Manual Sales Orders in Oracle.
As you suggested, if this will be done at Form level, that may Disallow FG users also to create Manula Sales Orders which should not be the case.
Further, I tried to test one scenario through Processing Constraints but it did not work.
Application
OM
Validation Type
Entity
Temp
Short Name
TBL
Validation Semantics
Created By
Equal To
User(Myself)
Processing Cosntraint
Application
OM
Entity
Order Header
Constraint
Operation
User Action
Create
Not Allowed
Conditions
Group
Scope
Validation Entity
Record Set
Validation Template
101
Any
Order Header
Order
Above Created
Please advise. -
How to put the value in Header test while creating the sales order
Hi ,
I am creating the Sales order using the Idoc Orders05 .
I have to pass the value in the header text 1. the value is a transaction id which is a string value.
If anyone has an idea how to do this using the the Orders Idoc. it would be a great help
Thanks
NikhilIf you have access to idoc before calling the processing Function module, Adding header text segments E1EDKT1 and E1EDKT2 to the idoc will create the header text.
Regards
Sridhar -
Error in bappi creating the sales order
Hi Xi team,
i am creating a sales order via xi using the soap as sender adapter and rfc as receiving adpater. i am testing the scenatio using the altova xml spy. its writing the error as "Sales document type OR is not define". But i could create the sale order by executing the bappi directly with the same set of records successfully. and the records are created. Please tell me wat might be the reason for the error.
Thanks and Regards
KarthikeyanHello Karthik,
What is BAPI you are using for creating Sales Order ?
Try BAPI - 'BAPI_SALESORDER_CREATEFROMDAT2' to create a sales order .
If you run into trouble using this BAPI with certain document types you can use the underlying RFC-enabled function module SD_SALESDOCUMENT_CREATE.
Regards
Gangaprasad -
Error creating the sales order
Hi,
i am getting error saying ship to party 134 not defined for sales area when i am trying to create sales order
help needed plzz
thanks
sHi,
Sales area consists of 1 sales organisation, 1 distribution channel and 1 division. If out of these 3 any one unit changes then, the sales area also changes. When you create a customer you specify the sales area for that customer. Customer has basically 4 basic partner functions-SP, SH, BP & PY.
You are getting an error stating that the ship to party 134 not defined for sales area. First check whether your sold to party and ship to party are the same or not. If they are not same then, please check the sales area of the sold to party customer and the sales area of the ship to party customer. The sales area of both these customers should match with the sales area whcih you specify while creating the sales order.
Also check the distribution channel of the material, the sold to party customer and the ship to party customer. The distribution channel should be the same.
You have to assign the ship to party to the sold to party in XD02. Go to XD02, select your sold to party customer and select the sales area data. In sales area data go to 'partner functions' tab and assign the ship to party there. Enter the ship to party number.
Reward points if solution helps.
Regards,
Allabaqsh G. Patil -
ERROR WHILE CREATING THE SALES ORDER
Hi,
When creating the sales order i am entering "mode of transport"in TSW details and while trying to save it im getting a message saying "Express document "update was terminated"" recieved from the author "Rahul". If i dont enter the TSW detail while creating i am able to save the order and later in change mode i can enter the mode of transport.
When i check the inbox, it says "definately cannot transfer message to node SMTP due to connection error".
This is hapenning for only one user.
What could be the problem?
Regards,
Rahul.Hi Rahul,
I think you need to enter the mode of transport in external details where it will take for further processing. TSW is different process.
Thanks
Pravin -
How to determine via SQL who created the sales order
Hello I am trying to determine via SQL who created the Sales Order. I'm looking at the ADOC table but having a hard time determining which record points to the sales order creation.
Hi Jimmy,
Try this:
select
T0.[DocNum], T2.[DocDate], T2.[CardCode], T2.[CardName],
T1.U_NAME as [User Name], T2.UpdateDate as [Cancelled Date]
from
ORDR T0
inner join OUSR T1 on T0.UserSign = T1.UserID
inner join ADOC T2 on T0.DocNum = T2.DocNum
where
T2.LogInstanc = (select min(LogInstanc) from ADOC T3 where T3.ObjType = 17 and T3.DocNum = T0.DocNum and T3.CANCELED = 'Y')
and T2.CANCELED = 'Y'
and T2.ObjType = 17
group by
T0.DocNum, T2.DocDate, T2.CardCode, T2.CardName, T1.U_NAME, T2.UpdateDate
Kind Regards,
Owen
Maybe you are looking for
-
I need assistance. PLEASE. Help me for the love of God HELP.
I'm trying to update my 2gb Ipod nano with the updater. The program freezes when it trys to initialize it. I put it in Hard Disk mode and its the same thing. I need help.
-
Convert invoice to PDF format and send email automatically
Hello, We have a requirement weherin when a billing document is created in SD with transaction code VF01, the invoice should automatically get converted to PDF and mail should be sent to the customer's external email id. Please seggest how this can b
-
How do I make a mask in Photoshop Touch?
Is there a way to mask out parts of images in Photoshop Touch?
-
B2B-50079 Transport Error : Bad Message
Hi All, I have an SFTP outbound TPA which is used to transfer a PGP file from our internal system to TP vendor. So the transfer is as follows B2B(Internal System) -> WebServer(acts as proxy while connecting to third party server)-->ThirdParty. The us
-
Can a Ethernet to Thunderbolt adapter fail?
Have not been able to connect via ethernet to internet at multiple locations. I have exchanged the ethernet cables. I can connect with a USB to Thunderbolt adapter to internet. I can also connect wirelessly. The ethernet adapter seems to have stopped