Import quote sales order with 'Pending Internal Approval' status.
Hi,
I’m trying to import a quote sales order using the oracle Order Import request, the order was imported with status 'Draft'.
Is there any way to import the quote sales order with 'Pending Internal Approval'?
or any API to change the Quote Status from 'Draft' to 'Pending Internal Approval'?
Thank You In Advance.
Ali
No in standard, there is no such TCodes. You have to develop a zee report considering the tables VBBE (for open order quantity) and MARD (storage location wise stocks)
thanks
G. Lakshmipathi
Similar Messages
-
Problem in importing Sales Order with udf in the rows
Dear All,
I am having problem in importing Sales Order with udf in the rows. I mean it is getting imported but the udf values in the rows is not getting updated. But the udf values in the header is getting updated. I am using SAP 8.8 Pl 10.
Can anyone guide me what to do in this scenario?
Regards,
GarySo , Login to DTW .
with the Desired Database and Login Credentials.
Goto - > Templates - > Customized Templates
Select The Object .
Right Click on the object needed and choose Create Template for the Structure .
Then use this template for import .
Hope it helps
Thanks
Ashish Ranjan -
Pending sales order with open quantity
Hai gurus
Please help me with any table or t.code to find pending sales order with open quantity
With regardsDear,
Please use transaction code V.02 to view all the incomplete sales order.
If you have any concerns please revert back the same to me.
Amjath -
Does DTW import of Sales Order allow same item with multiple prices?
Hi Forum,
I am seeing that importing Sales order with same item but having multiple prices; is importing it with the top most line item price. What am I missing? It is supposed to have two lines with same item but different prices.
I am doing more tests also. Thanks.Hi,
Have you included linenum in the file? If you have two lines with same item, you need it entered.
Thanks,
Gordon -
Creation of sales order with reference to Quotation using BAPI
Hi All,
I am using BAPI "BAPI_SALESORDER_CREATEFROMDAT2" for creating sales order. Can you please tell how can I create a sales order with reference to a Quotation.Vinit,
In your header structure, set like this:
hdr-REF_DOC = i_order-vbeln. "assign quotation # to sales order
hdr-REFDOC_CAT = 'B'. "assign Quotation to VBTYP_N.
For each line item, set as follows:
Assigning ref doc to create line item entries in VBFA.
itm-REF_DOC = i_order-vbeln. "quote number
itm-REF_DOC_IT = i_vbap-posnr. "quote line item #
itm-REF_DOC_CA = 'B'.
data: ret_text type BAPIRET2.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = hdr
convert = 'X'
IMPORTING
SALESDOCUMENT = salesdoc
TABLES
return = ret_tbl
ORDER_ITEMS_IN = itm
ORDER_PARTNERS = prtnr
ORDER_ITEMS_inx = itmx
ORDER_CONDITIONS_IN = conds
ORDER_CONDITIONS_INX = condsx
order_schedules_in = schd_lin.
Don't forget those points. -
Create a sales order with reference to another one. (BAPI)
Hi everybody,
I'm trying to create a new sales order with reference to another one (That's important because of the documents flow).
I'm using 'BAPI_SALESORDER_CREATEFROMDAT2' but I couldn´t do it yet. I've read some ideas about this kind of creation in this forum; but I still haven´t found the solution yet.
Some ideas about the BAPI parameters I nedd to complete?
Thanks in advance!!Hi,
Go through this one
*& Report ZSD_R_SALESORDER
report zsd_r_salesorder1 line-size 132 message-id zmmbapi .
*& Created By : shailaja
*& Created on : 13.10.2007
*& Requested By : vardhman
*& Description of program :
Internal table definition *
data: gt_order_header_in like bapisdhead occurs 0 with header line,
gt_return like bapireturn1 occurs 0 with header line, " Return Messages
gt_order_items_in like bapiitemin occurs 0 with header line, " Item Data
gt_salesdocument like bapivbeln-vbeln , "Number of Generated Document
gt_order_partners like bapiparnr occurs 0 with header line, "Document Partner
gt_return1 like bapiret2 occurs 0 with header line.
Data definition *
types: begin of ty_gt_ft_sales ,
partn_numb(10) type n ,"Customer Number 1
partn_role(2) ,"Partner function
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
material(18), "MATERIAL
targetquantity(020),"Target quantity
reqqty(020), "Req quantity
reqdate(010), "req date
*REQ_DATE_H(010),
ref_1(012), "Ref
unload_pt(025),
*PARTN_ROLE(2) ,"Partner function
*PARTN_NUMB(10) ,"Customer Number 1
end of ty_gt_ft_sales,
begin of ty_header ,
partn_numb(10) ,"Customer Number 1
partn_role(2) ,"Partner function
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
unload_pt(025),
req_date_h(010),
end of ty_header,
begin of ty_item,
material(18), "MATERIAL
targetquantity(020),"Target quantity
reqqty(020), "Req quantity
reqdate(010), "req date
ref_1(012), "Ref
*UNLOAD(025),
end of ty_item.
data : msg(240) type c, " Return Message
e_rec(8) type c, " Error Records Counter
rec_no(8) type c, " Records Number Indicator
s_rec(8) type c, " Successful Records Counter
t_rec(8) type c, " Total Records Counter
v_matnr like mara-matnr,
v_parvw type parvw.
data : gt_ft_sales type standard table of ty_gt_ft_sales with header line.
data : wa_gt_ft_sales type ty_gt_ft_sales,
wa_order_items_in like gt_order_items_in,
wa_gt_ft_sales1 type ty_gt_ft_sales,
wa_header type ty_header,
salesdocument like bapivbeln-vbeln.
selection block for EXCEL UPLOAD FILE
selection-screen begin of block b1 with frame title text-000.
parameters file type ibipparms-path obligatory.
selection-screen end of block b1.
*<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
at selection-screen on value-request for file .
perform getname.
form getname.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
importing
file_name = file.
endform.
*TOP-OF-PAGE.
top-of-page.
skip 3.
format color col_heading inverse on.
write 40 text-001.
format color col_heading inverse off.
skip 1.
format color col_negative inverse on.
write :/ text-002, 13 sy-mandt , 104 text-003, 121 sy-uname,
/ text-004, 13 sy-datum , 104 text-005, 121 sy-uzeit.
format color col_negative inverse off.
skip 3.
*START-OF-SELECTION.
start-of-selection.
perform get_data.
perform bapi.
*end-of-page.
perform result.
form result.
t_rec = e_rec + s_rec.
skip 3.
format color col_total inverse on.
write: /38 text-007, t_rec.
format color col_total inverse off.
format color col_negative inverse on.
write: /38 text-008, e_rec.
format color col_negative inverse off.
format color col_total inverse on.
write: /38 text-009, s_rec.
format color col_total inverse off.
endform.
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
call function 'WS_UPLOAD' "#EC *
exporting
filename = file
filetype = 'DAT'
tables
data_tab = gt_ft_sales
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
others = 11.
if sy-subrc 0 .
message e000.
endif.
endform. " get_data
*& Form BAPI
form bapi .
loop at gt_ft_sales into wa_gt_ft_sales.
wa_gt_ft_sales1 = wa_gt_ft_sales.
at new partn_numb.
wa_header-doc_type = wa_gt_ft_sales1-doc_type..
wa_header-sales_org = wa_gt_ft_sales1-sales_org . "'0001'
wa_header-distr_chan = wa_gt_ft_sales1-distr_chan. "'01'
wa_header-division = wa_gt_ft_sales1-division. " '01'
wa_header-purch_no = wa_gt_ft_sales1-purch_no.
wa_header-req_date_h = wa_gt_ft_sales1-reqdate.
call function 'CONVERSION_EXIT_PARVW_INPUT'
exporting
input = wa_gt_ft_sales1-partn_role
importing
output = v_parvw.
wa_header-partn_role = v_parvw.
wa_header-partn_numb = wa_gt_ft_sales1-partn_numb.
wa_header-unload_pt = wa_gt_ft_sales1-unload_pt.
move-corresponding wa_header to gt_order_partners.
move-corresponding wa_header to gt_order_header_in.
append gt_order_header_in.
append gt_order_partners.
endat.
call function 'CONVERSION_EXIT_CCMAT_INPUT'
exporting
input = wa_gt_ft_sales1-material
importing
output = v_matnr.
gt_order_items_in-material = v_matnr .
gt_order_items_in-target_qty = wa_gt_ft_sales1-targetquantity . "'1000'
gt_order_items_in-req_qty = wa_gt_ft_sales1-reqqty.
gt_order_items_in-req_date = wa_gt_ft_sales1-reqdate.
*GT_ORDER_ITEMS_IN-BILL_DATE = wa_GT_FT_SALES1-REQDATE.
gt_order_items_in-ref_1 = wa_gt_ft_sales1-ref_1.
append gt_order_items_in.
clear : wa_gt_ft_sales1,wa_header.
at end of partn_numb.
call function 'BAPI_SALESORDER_CREATEFROMDAT1'
exporting
order_header_in = gt_order_header_in
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = 'X'
importing
salesdocument = salesdocument
SOLD_TO_PARTY =
SHIP_TO_PARTY =
BILLING_PARTY =
return = gt_return
tables
order_items_in = gt_order_items_in
order_partners = gt_order_partners.
ORDER_ITEMS_OUT =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CCARD =
ORDER_CFGS_BLOB =
ORDER_SCHEDULE_EX =
if gt_return-type eq 'E' .
e_rec = e_rec + 1.
read table gt_return with key id = 'V1'.
format color col_negative inverse on.
rec_no = e_rec + s_rec.
concatenate text-006 rec_no ':'
gt_return-message into msg separated by space .
condense msg.
write: / msg.
format color col_negative inverse off.
elseif gt_return-number = '000'.
s_rec = s_rec + 1.
format color col_positive inverse on.
msg = 'SUCCESS'.
condense msg.
write: / msg .
format color col_positive inverse off.
write :/ salesdocument, 'Has been created'.
perform commit_mm.
endif.
clear: gt_return[], msg.
endat.
endloop.
endform. " SLALE_UPLOAD_DATA
*& Form COMMIT_MM
text
--> p1 text
<-- p2 text
form commit_mm .
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = gt_return1.
clear: gt_order_items_inhttp://].\"GT_ORDER_CONDITIONS_IN[.
endform. " COMMIT_MM
inthis pass re_doc field in header...
Edited by: Naresh kumar -
Problem adding sales order with freight since 8.8 pl 20 (and 8.81 pl 0)
Dear All,
Since the upgrade to 8.8 patch 20 I have a problem with adding a sales orders with freight (expensecode 1 does exist!) through the XML import of (the same problem with 8.81 pl 0).
This is the XML:
<BOM>
<BO>
<Documents>
<row>
<DocType>dDocument_Items</DocType>
<DocDate>20110328</DocDate>
<DocDueDate>20110328</DocDueDate>
<CardCode>INT_C_PenS</CardCode>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>10000024</ItemCode>
<ItemDescription>Afvalbak CONSTRUCTO 50</ItemDescription>
<Quantity>4.00</Quantity>
<ShipDate>20110328</ShipDate>
<DiscountPercent>20.00</DiscountPercent>
<UnitPrice>528.00</UnitPrice>
<LineStatus>bost_Open</LineStatus>
<LineType>dlt_Regular</LineType>
</row>
</Document_Lines>
<DocumentsAdditionalExpenses>
<row>
<ExpenseCode>1</ExpenseCode>
<LineTotal>64.00</LineTotal>
</row>
</DocumentsAdditionalExpenses>
</BO>
</BOM>
When the DocumentsAdditionalExpeses part is deleted then there is no problem.
The error with the DocumentsAdditionalExpeses is 'Internal error accured'.
Can anyone confirm that this not is working through XML import (DTW works) or is there a solution?
Thanks and best regards,
Wim KleinsmanHi,
Try this one.
<BOM>
<BO>
<Documents>
<row>
<DocType>dDocument_Items</DocType>
<DocDate>20110328</DocDate>
<DocDueDate>20110328</DocDueDate>
<CardCode>INT_C_PenS</CardCode>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>10000024</ItemCode>
<ItemDescription>Afvalbak CONSTRUCTO 50</ItemDescription>
<Quantity>4.00</Quantity>
<ShipDate>20110328</ShipDate>
<DiscountPercent>20.00</DiscountPercent>
<UnitPrice>528.00</UnitPrice>
<LineStatus>bost_Open</LineStatus>
<LineType>dlt_Regular</LineType>
<ExpenseCode>1</ExpenseCode>
<LineTotal>64.00</LineTotal>
</row>
</BO>
</BOM>
Regards,
Siva -
Sales order with 2 different series
hello everyone,
can anyone help me out in my following query:
I have a sales order with 2 different series: Design and Marketing
i am creating a sales order with design series and sending it for approval and once approved i am adding it ,similarly i iam creating sales order with marketing series.
Now is it possible unless and until i don't add my sales order with design series, system don't allow me to add sales order with marketing series.
Regards,
MeghanaHello
try It In SP_transaction Notification
if @object_type = '112' and @transaction_type = N'A'
begin
IF EXISTS (select * from ODRF WHERE DocStatus = 'O' or ObjType = '17' OR Series in( Select Series from ODRF where DocEntry = @list_of_cols_val_tab_del) AND DOCENTRY = @list_of_cols_val_tab_del )
begin
set @error = 1
set @error_message = 'You Can create SO because another Document in pending'
end
end----
Edited by: Manvendra Singh Niranjan on May 7, 2011 7:29 PM -
Link Sale Order with Delivery through DTW
Hi All
While importing Deliveries through DTW, is it possible to Link a Sale Order with Delivery?
If it is possible then can any one tell me the procedure.
Thanks in Advance
Chakrapani BandaruIn the template for the document lines, you will find fields for base entry, base type and base line . Fill these with the object type for sales orders, the line number and the doc entry (not doc num) of the relevant linked document
-
Best Way to Import Open Sales Orders
Dear Experts,
Which is the best possible way to export and import open sales orders from one DB to an another both being (SAP B1 2007)
Regards,
AdityaHi,
The only othe way to acheive this would be with SDK really. I've heard of people doing things like this in the past where the volume of data was so much that it was worthwhile to write some code, but to be honest if you're relatively proficient in DTW then you can have done the job by the time you've conned a programmer into writing it for you!
Good luck!
Julian -
Error while creating sales order with ref to contract
while creating sales order, with refernce to contract system is giving a message
Configuration not possible for material : Reason 3 --> Help
Message no. V1360
and the message is as follwed can any one explain
Diagnosis
This may have been caused by one of the following:
1. The configuration profile for the material allows or requires the bill of materials to be exploded during order processing. However, a plant has not been specified in the item.
2. The configuration profile of the material allows or requires the bill of materials to be exploded during order processing, but the order quantity in the item must be greater than 0.
3. A configuration profile has not been maintained
or
A configuration is not permitted for the material
or
4. The configuration profile of the material allows or requires the bill ofmaterials to be exploded during order processing. However, the system could not determine a date because important data is missing from the item (see incompletion log).Hi
I think you have both Variant configuration and BOM.
Pls ensure the following.
1. BOM masterdata is maintained for the variants
2. Variant configuration is configured correctly
Configuration profile is created for the material
Knowledge base object and run time version are available
3. Maintain materials as not relevant for delivery or dont give delivery quantity as 0
Once you are sure that these are in proper shape, you can start creating order. The problem wont come.
Reward points if it helps you. -
Changing Price Conditions in Sales Order with SD_SALESDOCUMENT_CHANGE
Hello there!
I need to change the value of a price condition in a sale order ;I'm using the f.m. SD_SALESDOCUMENT_CHANGE.
It doesnt' work as I want, 'cause it creates an other price conditions instead of just changing the price value of the actual one.
Waiting for your tips,
thanks.
This is how my code looks like:
PARAMETER: p_vbeln LIKE vbak-vbeln.
data: st_order_header_inx TYPE bapisdhd1x,
st_conditions LIKE bapicond,
st_conditionsx LIKE bapicondx,
tb_conditions TYPE TABLE OF bapicond,
tb_conditionsx TYPE TABLE OF bapicondx,
tb_return TYPE TABLE OF bapiret2.
st_order_header_inx-updateflag = 'U'.
st_conditions-itm_number = '0010'.
st_conditions-cond_type = 'PR00'.
st_conditions-cond_updat = 'X'.
st_conditions-cond_value = '100'. "Value I want to enter
APPEND st_conditions TO tb_conditions.
st_conditionsx-itm_number = '0010'.
st_conditionsx-cond_type = 'PR00'.
st_conditionsx-updateflag = 'U'.
st_conditionsx-cond_value = 'X'.
APPEND ls_conditionsx TO tb_conditionsx.
CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_inx = st_order_header_inx
TABLES
return = tb_return
conditions_in = tb_conditions
conditions_inx = tb_conditionsx .Get the conditions records first from the Sales Order with BAPI BAPISDORDER_GETDETAILEDLIST
CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
EXPORTING
i_bapi_view = lw_bapi_view
TABLES
sales_documents = lt_order
order_conditions_out = lt_conditions_out.
Then populate the conditions internal table with the data that you get from the previous code
move-corresponding lw_conditions_out to lw_order_conditions_in.
lw_order_conditions_in-cond_value = '100' " the value that you want to modify
APPEND lw_order_conditions_in TO lt_order_conditions_in.
CLEAR lw_order_conditions_inx.
lw_order_conditions_inx-itm_number = lv_kposn.
lw_order_conditions_inx-cond_st_no = lw_conditions_out-cond_st_no.
lw_order_conditions_inx-cond_count = lw_conditions_out-cond_count.
lw_order_conditions_inx-cond_type = lw_conditions_out-cond_type.
lw_order_conditions_inx-updateflag = 'U'.
lw_order_conditions_inx-cond_value = lc_x.
APPEND lw_order_conditions_inx TO lt_order_conditions_inx.
You didn't populate the fields cond_st_no and -cond_count. Then just call BAPI SD_SALESDOCUMENT_CHANGE to change the Sales order.
Hope that helps.
Erwin -
Sales order with reference to quotation
How to use BAPI_SALESORDER_CREATEFROMDAT2 to create a sales order with reference to quotation? what parameters I need to fill in?
Hi,
I've also had this problem.
In the past when faces with this requirement I have used
BAPI_READ_SALES_DOCUMENT (Note: I am away from a system today so that may not be the EXACT name of the funciton module but it's close ) to read in the document data from the quote, then transfer that data to the input structures of BAPI_SALESORDER_CREATEFROMDAT2. Seems to work reasonably well although it doesn't offer much in the way of automatic error handling.
Hope this helps,
Regards,
Brent -
Sales order with reference to Service Notification
Hi Freinds,
I have to create a sales order with reference to Service notification (IW51). can someone sugggest me BAPI or Function module to perform this task.
Appriciate your help.
Best regards
Pravinno std bapi's as far as i know..when you hit create create repair order(in iw51) system calls QM06_RMA_ORDER_CREATE
..whick internally calls SD_ORDER_CREATE..may be this should give some pointers..
Regards
Siva -
BAPI: Create Sales order with reference to Quotation
Hi ...
I am using bapi BAPI_SALESOREDER_CREATEFROMDATA2 and
i want to create sales order with reference Quotation... All quotation data like Materials prices and conditions must be copied from reference quotaion which is allready created .....
..Thanks..
..AshishHello,
nice to see that this has already been solved.
But it actually doesnt work in my scenario. Do you have an example coding which will explain your solution.
Mine looks like this:
* Update Flag
ls_header_inx-updateflag = 'I'.
* Angebotskopf einlesen
SELECT SINGLE * FROM vbak INTO ls_vbak
WHERE vbeln = iv_vbeln
AND vbtyp = lc_vbtyp.
IF sy-subrc <> 0.
EXIT.
ENDIF.
* Auftragskopf setzen
ls_header_in-doc_type = ls_vbak-auart.
ls_header_in-sales_org = ls_vbak-vkorg.
ls_header_in-distr_chan = ls_vbak-vtweg.
ls_header_in-division = ls_vbak-spart.
ls_header_in-req_date_h = ls_vbak-VDATU.
ls_header_in-ref_doc = ls_vbak-vbeln.
ls_header_in-refdoc_cat = 'B'.
* Angebots-Partner einlesen (Nur AG und WE)
* Auftrag anlegen
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
order_header_in = ls_header_in
* order_header_inx = ls_header_inx
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* testrun = 'X'
* CONVERT = ' '
IMPORTING
salesdocument = ev_vbeln
TABLES
return = et_return
* order_items_in = lt_items_in
* order_items_inx = lt_items_inx
order_partners = lt_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 = .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Unfortunatly this just makes the reference to the quotation but does not takeover ALL data from header and pos level.
Thanks and regards
Markus Armbruster
Maybe you are looking for
-
Will it ever happen, or is my iPod Touch 2nd Gen now just a useless hunk of junk that won't work with modern apps, which all seem to need iOS5?
-
Hi Friends, We have a tricky requirement as follows: There is a third party system to which the error messages and alerts that are generated in SAP PI needs to be sent as text file or via SOAP. Whenever, Adapter Errors or Mapping Errors occur a log n
-
How to transfer balances from Gl to another GL ??
Hi all, How can we transfer open items balances from GL to another GL ?? When that need arises to the company ?? Thank you.. Suresh
-
User Exit - Include for delivery document?
Can anyone please tell me the user exit / include details that control creation / mofiication of outbound delivery document I need to figure out a solution to create a split delivery if the country of origin of material is different in the stock Say,
-
Raw 2.7 Not Showing up?
I have updated camera raw to 2.7, but in the "Raw Fine Tuning" it says "2.0" No options for 2.7. Is this correct? or am I missing something? I do see 1.0, 1.1, 2.0 Thx