Not able to create sales orders.
Dear Friends,
am new to SAP-PS. I have following query.
- Hide quoted text -
m creating an Demo Project for help.sap.com. for - Engineer to Order(ETO) of Trubine - Link is http://help.sap.com/saphelp_46c/helpdata/en/a3/c23cdaa62d11d3b544006094b90caa/frameset.htm
i m into order processing and i want to create an Sales Order (VA01).
I have followed all steps as mentioned in example.
i.e.
Call up the transaction as follows: Menu Path
Logistics
® Sales and Distribution ® Sales ® Order ® Create
Transaction Code
VA01
Enter the following data: Field
Data
Order type
PS1 (PS order)
Sales organization
1000
Distribution channel
10
Division
00
Choose .
Enter the following data: Field
Data
Sold-to party
1600
Purch. order no.
Any number
Req. deliv.date
Today's date + 1.5 years
Material
T-20000
Order quantity
1
Choose . In the dialog box, choose .
Select the sales items and choose .
Choose the Account assignment tab page.
Enter the following data: Field
Data
WBS Element
T-10056 ( Created Project in CJ20N)
The request for quotation is assigned to the billing element for the turbine project.
Choose the Conditions tab page.
Overwrite the amount for condition PR00 as follows: Field
Data
CnTy
PR00
Amount
1.760.000
You agreed this price with the customer on the basis of the quotation.
Choose .
At this Step when i want to SAVE the project i am getting an dialog box Create Network: Project Allocation (Plz see an attach image).
I have tried with all project nos but i am not able to save the project and get the sale order no .
Can anyone try this example tell me how to get an Order no. and why it's happening
Your help is apprciated.
regards,
Atul R. Rajmane
Hi,
If you enter a WBS element in the sales order, you need to mention a network element form the WBS.
Prase
Similar Messages
-
Not able to create sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
Hi Experts,
I am not able to create sales order . I am using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
to create sales order .I am passing external sales order number to the parameter
SALESDOCUMENTIN.
I am getting following error.
"524 |Only quantity 1 EA is allowed (Item 00001"
Here EA is UOM(Unit of measurement).
Below is the sample program through which i am trying to create the sales order.
*& Report ZSDC_SALES_TEST
report zsdc_sales_test.
*DATA: wa_bapi_header TYPE bapisdhd1.
Include Name - ZSDC_SALES_ORD_UPLOAD_TOP
Program Name - ZSDC_SALES_ORD_UPLOAD_1393
Program Title - Include for Data Declaration and selection screen
Created by - Lalitha W
Created on - 18-Nov-2008
Object ID - SD_C_1393_SALES_ORDER_UPLOAD
Request Id - SD3K905579
Description - This is a common INCLUDE for data declarations and
*selection screen details.
HISTORY
Date |Developer |Req by | Description |Reference ID
| | | |
| | | |
TYPE-POOLS
*TYPE-POOLS: truxs, abap, slis.
TABLES
*TABLES: t100.
TYPES
types:begin of ty_header,
auart(4) type c, " Sales Order Type
vkorg(4) type c, " Sales Organization
vtweg(2) type c, " Distrubution Channel
spart(2) type c, " Division
kunnr_1(10) type c, " Sold to Party
kunnr_2(10) type c, " Ship to Party
augru(3) type c, " Order Reason
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
ketdat(10) type c, " Required Delivery Date
zterm(4) type c, " Payment Terms
inco1(3) type c, " Inco Terms -1
inco2(28) type c, " Inco Terms -2
prsdt(10) type c, " pricing date
waerk(5) type c, " Document Currency
vkbur(4) type c, " Sales Office
vkgrp(3) type c, " Sales group
pltyp(2) type c, " Price List type
kdgrp(2) type c, " Customer Group
bstkd_e(35) type c, " Ship-to-party PO number
submi(10) type c, " Collective Number
bname(35) type c, " Name
ihrez(12) type c, " Your Reference
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
partner_1(25) TYPE c, " Partner(Bill To Party Number)
partner_2(25) TYPE c, " Partner(Payer Number)
partner_3(25) TYPE c, " Partner(Sales Responsible Number)
partner_4(25) TYPE c, " Partner(Order admin)
partner_5(25) TYPE c, " Partner(Contact person)
partner_1(10) type c, " Partner(Bill To Party Number)
partner_2(10) type c, " Partner(Payer Number)
partner_3(10) type c, " Partner(Sales Responsible Number)
partner_4(10) type c, " Partner(Order admin)
partner_5(10) type c, " Partner(Contact person)
tdspras_1(2) type c,
text_1(500) type c, " Text Before Items Z012
tdspras_2(2) type c,
text_2(500) type c, " Invocie Up Z034
tdspras_3(2) type c,
text_3(500) type c, " Invocie Down Z035
tdspras_4(2) type c,
text_4(500) type c, " Customer Reference Continue Z018
tdspras_5(2) type c,
text_5(500) type c, " Dispatch Marks/ Order Z019
tdspras_6(2) type c,
text_6(500) type c, " Ordered By Z003
tdspras_7(2) type c,
text_7(500) type c, " Sales Parameters Z002
kvgr1(3) type c, " Industry
kvgr2(3) type c, " customer BU
end of ty_header.
types: begin of ty_item,
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
bstkd_e(35) type c, " Ship-to-party PO number
posnr(6) type c, " POSTION NUMBER
matnr(18) type c, " Material Number
kwmeng(18) type c, " Order Quantity
pstyv(4) type c, " Sales doc. item categ
kursk(18) type c, " EXCHANGE RATE****
ffprf(8) type c, " DIP PROFILE
werks(4) type c, " Delivering Plant
vstel(4) type c, " SHIPPING POINT
lgort(4) type c, " STORAGE LOCATION
route(6) type c, " Route
kurrf(18) type c, " EXCHANGE RATE-FI
ntgew(18) type c, " Net Weight
brgew(18) type c, " Gross Weight
gewei(3) type c, " Weight Unit
prctr(10) type c, " profit center
abgrs(6) type c, " RESULT ANALYSIS KEY
kalsm_k(4) type c, " COSTING SHEET
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
text_1(500) type c, " material Text 0001
tdspras_1(1) type c,
text_2(500) type c, " Pr Text 9001
tdspras_2(1) type c,
end of ty_item.
types: begin of ty_schedule_line,
bstkd(35) type c, "PO number
bstdk(10) type c, "PO date
bstkd_e(35) type c, "Ship-to-party PO number
posnr(6) type c, "sales doc.Item
etdat(10) type c, "Schedule line date
wmeng(2) type c, "Order Quantity
end of ty_schedule_line.
types: begin of ty_err ,
auart(4) type c, " Sales Order Type
vkorg(4) type c, " Sales Organization
vtweg(2) type c, " Distrubution Channel
spart(2) type c, " Division
kunnr_1(10) type c, " Sold to Party
kunnr_2(10) type c, " Ship to Party
augru(3) type c, " Order Reason
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
ketdat(10) type c, " Required Delivery Date
zterm(4) type c, " Payment Terms
inco1(3) type c, " Inco Terms -1
inco2(28) type c, " Inco Terms -2
prsdt(10) type c, " pricing date
waerk(5) type c, " Document Currency
vkbur(2) type c, " Sales Office
vkgrp(3) type c, " Sales group
pltyp(2) type c, " Price List type
kdgrp(2) type c, " Customer Group
bstkd_e(35) type c, " Ship-to-party PO number
submi(10) type c, " Collective Number
bname(35) type c, " Name
ihrez(12) type c, " Your Reference
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
partner_1(25) type c, " Partner(Bill To Party Number)
partner_2(25) type c, " Partner(Payer Number)
partner_3(25) type c, " Partner(Sales Responsible Number)
partner_4(25) type c, " Partner(Order admin)
partner_5(25) type c, " Partner(Contact person)
tdspras_1(2) type c,
text_1(500) type c, " Text Before Items Z012
tdspras_2(2) type c,
text_2(500) type c, " Invocie Up Z034
tdspras_3(2) type c,
text_3(500) type c, " Invocie Down Z035
tdspras_4(2) type c,
text_4(500) type c, " Customer Reference Continue Z018
tdspras_5(2) type c,
text_5(500) type c, " Dispatch Marks/ Order Z019
tdspras_6(2) type c,
text_6(500) type c, " Ordered By Z003
tdspras_7(2) type c,
text_7(500) type c, " Sales Parameters Z002
kvgr1(3) type c, " Industry
kvgr2(3) type c, " customer BU
message(600) type c,
end of ty_err.
types: begin of ty_t685a,
kschl type kschl,
krech type krech,
end of ty_t685a.
INTERNAL TABLES
***header
data: g_krech_1(4) type c, " Calculation type for condition
g_krech_2(4) type c, " Calculation type for condition
g_krech_3(4) type c. " Calculation type for condition
g_krech_4(4) TYPE c, " Calculation type for condition
g_krech_5(4) TYPE c, " Calculation type for condition
g_krech_6(4) TYPE c, " Calculation type for condition
g_krech_7(4) TYPE c, " Calculation type for condition
g_krech_8(4) TYPE c, " Calculation type for condition
g_krech_9(4) TYPE c, " Calculation type for condition
g_krech_10(4) TYPE c, " Calculation type for condition
g_krech_11(4) TYPE c, " Calculation type for condition
g_krech_12(4) TYPE c, " Calculation type for condition
g_krech_13(4) TYPE c, " Calculation type for condition
g_krech_14(4) TYPE c, " Calculation type for condition
g_krech_15(4) TYPE c, " Calculation type for condition
g_krech_16(4) TYPE c, " Calculation type for condition
g_krech_17(4) TYPE c, " Calculation type for condition
g_krech_18(4) TYPE c, " Calculation type for condition
g_krech_19(4) TYPE c, " Calculation type for condition
g_krech_20(4) TYPE c. " Calculation type for condition
Items
data: g_krech_item_1(4) type c, " Calculation type for condition
g_krech_item_2(4) type c, " Calculation type for condition
g_krech_item_3(4) type c. " Calculation type for condition
g_krech_item_4(4) TYPE c, " Calculation type for condition
g_krech_item_5(4) TYPE c, " Calculation type for condition
g_krech_item_6(4) TYPE c, " Calculation type for condition
g_krech_item_7(4) TYPE c, " Calculation type for condition
g_krech_item_8(4) TYPE c, " Calculation type for condition
g_krech_item_9(4) TYPE c, " Calculation type for condition
g_krech_item_10(4) TYPE c, " Calculation type for condition
g_krech_item_11(4) TYPE c, " Calculation type for condition
g_krech_item_12(4) TYPE c, " Calculation type for condition
g_krech_item_13(4) TYPE c, " Calculation type for condition
g_krech_item_14(4) TYPE c, " Calculation type for condition
g_krech_item_15(4) TYPE c, " Calculation type for condition
g_krech_item_16(4) TYPE c. " Calculation type for condition
data: it_t685a type standard table of ty_t685a.
data: wa_bapi_header type bapisdhd1,
wa_bapi_headerx TYPE bapisdhd1x,
it_bapi_item type table of bapisditm,
it_bapi_itemx TYPE TABLE OF bapisditmx,
it_bapi_cond type table of bapicond,
it_bapi_condx TYPE TABLE OF bapicondx,
it_bapi_partner type table of bapiparnr,
it_bapi_shdl type table of bapischdl,
it_bapi_shdlx TYPE TABLE OF bapischdlx,
it_bapi_order_text type TABLE OF BAPISDTEXT,
it_bapireturn type table of bapiret2.
data: wa_bapi_item like line of it_bapi_item,
wa_bapi_itemx LIKE LINE OF it_bapi_itemx,
wa_bapi_cond like line of it_bapi_cond,
wa_bapi_condx LIKE LINE OF it_bapi_condx,
wa_bapi_partner like line of it_bapi_partner,
wa_bapi_shdl like line of it_bapi_shdl,
wa_bapi_shdlx LIKE LINE OF it_bapi_shdlx,
wa_bapi_order_text like LINE OF it_bapi_order_text,
wa_bapireturn like line of it_bapireturn.
*DATA: zmode(1) VALUE 'N'.
data: it_header type standard table of ty_header.
*DATA: it_temp_header TYPE STANDARD TABLE OF ty_header.
data: it_item type standard table of ty_item.
*DATA: it_temp_item TYPE STANDARD TABLE OF ty_item.
data: it_err type standard table of ty_err.
data: it_fline1 type standard table of tline,
wa_fline1 type tline.
data: it_thead1 type thead.
data: it_fline2 type standard table of tline,
wa_fline2 type tline.
data: it_thead2 type thead.
data: it_fline3 type standard table of tline,
wa_fline3 type tline.
data: it_thead3 type thead.
data: it_fline4 type standard table of tline,
wa_fline4 type tline.
data: it_thead4 type thead.
data: it_fline5 type standard table of tline,
wa_fline5 type tline.
data: it_thead5 type thead.
data: wa_header like line of it_header,
wa_item like line of it_item,
wa_err type ty_err,
wa_bill LIKE LINE OF it_bill,
wa_bill1 LIKE LINE OF it_bill,
wa_iterr like line of it_err,
wa_t685a like line of it_t685a.
wa_bill_item TYPE ty_bill_item.
data: it_schedule_line type standard table of ty_schedule_line,
wa_schedule_line type ty_schedule_line.
data: sales_order_no type bapivbeln-vbeln.
data: ext_sales_order_no type bapivbeln-vbeln.
Variable to be used to separate the fields which are concatenated by a
runtime character
*DATA: g_tabchar(1) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*DATA: wa_truxs_t_text_data TYPE truxs_t_text_data.
*DATA: g_filename TYPE string,
g_path TYPE string,
g_fullpath TYPE string,
g_user_action TYPE i,
g_file_encoding TYPE abap_encoding.
*DATA : g_text(8192),
data : g_mstring1(100) type c,
g_mstring2(100) type c,
g_mstring3(100) type c,
g_mstring4(100) type c,
g_mstring5(100) type c.
data: g_count1 type ebelp,
g_str_count1(6) type c.
data: g_count type ebelp,
g_str_count(6) type c.
*DATA: f_subrc LIKE sy-subrc,
f_subrc1 LIKE sy-subrc,
f_error(500) TYPE c,
item1(27) TYPE c,
item2(27) TYPE c,
item3(27) TYPE c,
item4(27) TYPE c,
i TYPE ekpo-ebelp.
*DATA: g_billplan_header TYPE c,
g_billplan_item TYPE c.
data : g_external_so type vbak-vbeln. "SO
SELECTION-SCREEN
selection-screen begin of block frame1 with frame title text-001 .
parameters:p_file1 type rlgrap-filename, "OBLIGATORY, "Header data.
p_file2 type rlgrap-filename, "OBLIGATORY, "Item Data.
p_file3 type rlgrap-filename, "Schedule line.
p_file4 type rlgrap-filename ."OBLIGATORY. "Error file.
selection-screen end of block frame1.
start-of-selection.
wa_bapi_header-doc_type = 'Z0MX'. "order type
wa_bapi_header-sales_org = '0130'."sales org
wa_bapi_header-distr_chan = '13'. "distr channel
wa_bapi_header-division = '13'. "division
Old code from copied program
wa_bapi_header-purch_no_s = wa_header-kunnr_2. " Ship to party
New code as required in Finland project
We are using to Header ->Order Tab -> Ship to Party -> Purchase order no (BSTKD_E) to store Old legacy SO number
wa_bapi_header-purch_no_s = 'MX100443'. "External SO i.e Old legacey SO number
wa_bapi_header-ref_1_s = '0000666666'. "Sold to party
wa_bapi_header-ord_reason = wa_header-augru.
wa_bapi_header-purch_no_c = 'ddr1234'. " PO number
wa_bapi_header-purch_date = sy-datum. " PO date
wa_bapi_header-req_date_h = sy-datum. " Required Delivery Date
wa_bapi_header-pmnttrms = '01'. " Payment Terms
wa_bapi_header-incoterms1 = wa_header-inco1.
wa_bapi_header-incoterms2 = wa_header-inco2.
wa_bapi_header-price_date = wa_header-prsdt. " Pricing date
wa_bapi_header-currency = wa_header-waerk. " Document Currency
wa_bapi_header-sales_grp = wa_header-vkgrp. " Sales group
wa_bapi_header-price_list = wa_header-pltyp. " Price list type
wa_bapi_header-cust_group = wa_header-kdgrp. " Cust Group
wa_bapi_header-ship_type = wa_header-vsart. " Shipping Type
wa_bapi_header-purch_no_s = wa_header-bstkd_e. " Ship-to-party po number
wa_bapi_header-collect_no = wa_header-submi. " Collective No.
wa_bapi_header-name = wa_header-bname. " Name
wa_bapi_header-ref_1 = wa_header-ihrez. " Your Reference
wa_bapi_header-cust_grp1 = wa_header-kvgr1. " Industry
wa_bapi_header-cust_grp2 = wa_header-kvgr2. " Customer BU
*ENDFORM. " f_header
IF wa_header-partner_1 IS NOT INITIAL.
wa_bapi_partner-partn_role = 'AG'.
wa_bapi_partner-partn_numb = '0000666666'.
wa_bapi_partner-itm_number = '000000'.
append wa_bapi_partner to it_bapi_partner.
clear wa_bapi_partner.
ENDIF.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_header-partner_2
importing
output = wa_header-partner_2.
IF wa_header-partner_2 IS NOT INITIAL.
wa_bapi_partner-partn_role = 'WE'.
wa_bapi_partner-partn_numb = '0000666666'.
wa_bapi_partner-itm_number = '000000'.
append wa_bapi_partner to it_bapi_partner.
clear wa_bapi_partner.
ENDIF.
perform f_item.
data : order_items_inx type table of bapisditmx with header line.
order_items_inx-material = 'X'. "
order_items_inx-target_qty = 'X'. "
order_items_inx-comp_quant = 'X'. "
order_items_inx-trgqty_den = 'X'.
order_items_inx-rnddlv_qty = 'X'.
order_items_inx-updateflag = 'I'.
order_items_inx-target_qu = 'X'.
order_items_inx-plant = 'X'. "
append order_items_inx.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
salesdocumentin = 'MX11111152'
order_header_in = wa_bapi_header
order_header_inx = wa_bapi_headerx
importing
salesdocument = sales_order_no
tables
return = it_bapireturn
order_items_in = it_bapi_item
order_items_inx = order_items_inx
order_partners = it_bapi_partner
order_conditions_in = it_bapi_cond.
if sy-subrc is initial.
commit work.
endif.
*& Form f_item
text
form f_item .
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_item-posnr
importing
output = wa_item-posnr.
wa_item-posnr = '000010'.
IF sy-subrc EQ 0. "IS INITIAL.
move wa_item-posnr to g_str_count."commented out by shakti
ENDIF.
wa_bapi_item-itm_number = wa_item-posnr. " Line item
WA_BAPI_ITEM-PO_ITM_NO = WA_ITEM-EBELP.
wa_bapi_item-division = wa_item-spart.
wa_bapi_item-purch_no_c = 'ddr1234'. " po number
wa_bapi_item-purch_date = sy-datum. " po date
wa_bapi_item-purch_no_s = 'MX11111112'. " Ship-to-party po number
wa_item-matnr = 'MAXIMO_SERVICE'.
call function 'CONVERSION_EXIT_MATN1_INPUT'
exporting
input = wa_item-matnr
importing
output = wa_item-matnr
exceptions
length_error = 1
others = 2.
if sy-subrc is initial.
wa_bapi_item-material = wa_item-matnr. "material
endif.
wa_bapi_item-target_qty = '1'. " Order qty
wa_bapi_item-comp_quant = '1'.
wa_bapi_item-target_qu = 'EA'.
wa_bapi_item-fixed_quan = '1'.
wa_bapi_item-comp_quant = wa_item-kwmeng.
wa_bapi_item-trgqty_den = '1'.
wa_bapi_item-rnddlv_qty = wa_item-kwmeng.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_item-ps_psp_pnr
IMPORTING
output = wa_item-ps_psp_pnr.
IF sy-subrc = 0.
wa_bapi_item-wbs_elem = wa_item-ps_psp_pnr.
ENDIF.
wa_bapi_item-item_categ = 'ZMAX'.
wa_bapi_item-ex_rate_fi = wa_item-kurrf.
wa_bapi_item-dli_profil = wa_item-ffprf. " Dynamic item processor profile
wa_bapi_item-route = wa_item-route. " route
wa_bapi_item-exchg_rate = wa_item-kursk.
wa_bapi_item-plant = '2090'. " Plant
wa_bapi_item-ship_point = 'FN11'. " Shipping point
wa_bapi_item-store_loc = wa_item-lgort. " stg loc
REPLACE ALL OCCURRENCES OF ',' IN wa_item-ntgew WITH '.'.
REPLACE ALL OCCURRENCES OF ',' IN wa_item-brgew WITH '.'.
wa_bapi_item-net_weight = wa_item-ntgew. "
wa_bapi_item-gross_wght = wa_item-brgew. "
call function 'CONVERSION_EXIT_CUNIT_INPUT'
exporting
input = wa_item-gewei
language = sy-langu
importing
output = wa_item-gewei.
EXCEPTIONS
unit_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
wa_bapi_item-untof_wght = 'KG'. " weight unit
replace all occurrences of ',' in wa_item-kursk with '.'.
replace all occurrences of ',' in wa_item-kurrf with '.'.
wa_bapi_item-profit_ctr = wa_item-prctr. " Profit center
wa_bapi_item-resanalkey = wa_item-abgrs. " RESULT ANALYSIS KEY
wa_bapi_item-cstg_sheet = wa_item-kalsm_k. " COSTING SHEET
append wa_bapi_item to it_bapi_item.
endform. " f_item
Thanks & regards,
Chetansee the following to create sales order:-
*& Report ZSALESORDER
*&DEVELOPED BY JANI KRUPA 4.10.2008
REPORT ZSALESORDER.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d .
SELECTION-SCREEN END OF LINE.
Complete Deliver
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
DATA: lt_schedules_ink TYPE STANDARD TABLE OF bapisdhead1
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
v_text10 = 'Complete delivery'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
*Complete delivery
header-COMPL_DLV = p_autlf.
header-COMPL_DLV = 'X'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
item category
itemx-ITEM_CATEG = 'X'.
APPEND item.
APPEND itemx.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000020'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Fill schedule lines
lt_schedules_in-itm_number = '000020'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000020'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF. -
Not able to create sales order.
Guru's,
I unable to create the sales order.
After entering sold to,material and qty and plant system is giving error Template material processing is deactivated
Murali suggested to implement the note 1094540.
But I am facing this problum in one box. remaining boxes working fine with out implementing the above note.
Please let me know from configuration side we can do any settings .
HIGHLY REWARDED
THANKS IN ADVANCE.
Its very urgent.Guru's,
I unable to create the sales order.
After entering sold to,material and qty and plant system is giving error Template material processing is deactivated
Murali suggested to implement the note 1094540.
But I am facing this problum in one box. remaining boxes working fine with out implementing the above note.
Please let me know from configuration side we can do any settings .
HIGHLY REWARDED
THANKS IN ADVANCE.
Its very urgent. -
Not able to create purchase orders
Hi Experts,
I am not able to create purchase order , it is not allowing me to save , I I am giving purchase requisition number in Po and trying to crete po .When i give purchase requistion number all the revelant data is copied and when i click on item level tab of delivery address following error occurs : Address doesn't exist T001W 2000 00010. Then the entire PO is cancelled. not able to save going out of po screen
Please give me your valuable advice so that it can help me in resolving this issue
Please do the need ful
Regards
AyubHi
We had to change the name text of he plant from ABCD COMPANY TO ABCD COMPANY PRIVATE LTD so , we had change and in both name 1:ABCD COMPANY PRIVATE LTD and NAme 2: ABCD COMPANY PRIVATE LTD
but in print out it the plant name appearing twice we decided to to erase name 1 that is we left blank and gave name 2:ABCD COMPANY PRIVATE LTD
But while creatimg Po from req ad the clicking item level adress tab eror pops up , and if i click on error tick mark it will take you out from Po screen
Regards
Ayub -
PARTNER PROCESSING OBJECT BUS2032 NOT FOUND WHILE CREATING SALES ORDER
Hi All,
I am not able to create a sales order it gives a Error "PARTNER PROCESSING OBJECT BUS2032 not found". Can any one inform me what could be a problem. Thanks in advance.Yes, The Partner function SP is active.
We had a work around.
When the sales order was saved, being in Partner function Tab we got the error message. However when we returned to the Overview and saved the Order, we were through with the same. But, Iam not sure how could this happen. -
hi gurus,,,
my order type --or
item category group - norm
item category --tan
and i have two customers ...,, 10 and 11
, three materials ...m10, m11, m12.
when i try to create the order with the combination of 10 and m10 ,the system come up with error massage " No item category available (Table T184 OR 0001 CSEL TAN)" ...
and i am able to create remaining all combination
cust no material no status
10 m10 not possible to create order( error"-No item category available (Table T184 OR 0001 CSEL TAN0))
10 m11 possible
10 m12 possible
10 m13 possible
11 m10 possible
11 m11 possible
11 m12 possible
11 m13 possible
can u give me the solutionhi
if u have created ur own doc type without referring to std doc type then u have to carry out all customising related to doc type define/assign,item catg define/assign,sched lincat define/assign.in spro.
if u have created referring to sap std doc type with copy all data then system by default does all these .
In other words
Check if the combination of your sales order type and item category type exist.
In customizing you need to set up which item category types can be linked to the sales order types. -
I am not able to reproduce sales order
Hi Experts,
when you tried to create new sales order and execute the program
and change the order details with rejection status and again running the program
the things are working fine.
but I am not able to reproduce.
Now, weu2019re going to reject line item 10 and 40 as per user process.
Then, unmark the Provision Flag in Additional Data B tab so that the job will process the order again and
add the 2nd developer. After rejecting and changing the provision flag mark, save the order changes.
So, when we check on the order, line item 50 should be present. Checking on the order,
item 50 wasnu2019t created and line item 40 quantity changed from 3 to 5.
Please help.
Thanksclosed the issue.
-
Error : 'Tax Jurisdiction is not determined' while creating sales order
Hi,
I'm creating a sales order using the BAPI : BAPI_SALESORDER_CREATEFROMDAT1.
I'm passing the following values in ORDER_HEADER_IN parameter:
doc_type,sales_org,distr_chan,division,po_method,sales_off,req_date_h,data_type,purch_no,purch_date,price_date.
I'm passing the following values in SD_ORDER_PARTNERS:
partn_role,partn_numb,name,langu,region,country.
The following fields are passed in SD_ORDER_ITEMS:
material,req_qty,sales_unit,store_loc (space is passed for st.loc),req_date,po_method,req_date,plant.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
order_header_in = sd_order_header
IMPORTING
return = return1
salesdocument = order_number
sold_to_party = sd_sold_to_party
ship_to_party = sd_ship_to_party
billing_party = sd_billing_party
TABLES
order_items_in = sd_order_items_in
order_partners = sd_order_partners
order_items_out = sd_order_items_out.
The system returns a message in RETURN1 saying that : 'Tax jurisdiction is not determined'.
Please let me know if I'm missing something.
Thanks,
Narsingh.Do you want to use the customer master address for the ship-to? Does the ship-to on the customer master haver a tax jurisdiction determined? Did you change the values in region/country from what they are on the customer master which would cause the tax jurisdiction determined on the customer master to be re-determined and thus rejected? You don't need to send address values in the partner table if you intend to use the customer master values...
-
Query not working while creating Sales Order... Need suggestions
Dear All,
My client requirement involves creation of Sales Orders both as standalone as well as based on Quotations, depending on the case. Now there is a UDF created in the Item Master Data called "U_Unit" which should be populated in another UDF (U_BPQty) in the Sales Order and Sales Quotation which can be changed at the transaction level.
The requirement is if the Sales Order is created based on Quotation, the system should take the value from 'U_BPQty" of "Sales Quotation" and populate in the Sales Order. if the Sales Order is created as stand-alone, it should take the value from U_Unit field of the Item Master Data. I wrote the following query for that purpose and using it as a FMS but its not working.
Can you suggest me where I am going wrong?
Declare @Base varchar
Declare @Item varchar
Declare @Draw varchar
Declare @BaseQty varchar
Set @Base = (Select Case When $[$38.44.0] is Null then 0 when $[$38.44.0] is not Null then $[$38.44.0] end)
Set @Item = ($[$38.1.0])
Set @Draw = (SELECT T0.U_BPQty from QUT1 T0 INNER JOIN OQUT T1 ON T0.DocEntry = T1.DocEntry INNER JOIN RDR1 T2 ON T2.BaseRef = T1.DocNum WHERE T0.ItemCode = @Item)
Set @BaseQty = (SELECT T0.U_Unit from OITM T0 WHERE T0.ItemCode = $[$38.1.0])
Select Case when (@Base = 0) then @BaseQty when (@Base <> 0) then @Draw end
Thanks and regards,
Bharath SHi Bharath.......
As you said if SQ not there and SO is directly punched then it should Pick up U_Unit else if SQ has target of SO then U_BP then your query working fine.
But if SQ not there and Del is directly punched instead of SO then it should Pick up U_Unit else if SQ has target of Delivery and not SO then U_BP. Is it?
In such case its not working?
If yes then use this query.......
declare @basedoc as nvarchar
set @basedoc=$[DLN1.BaseType.0]
If @basedoc<1
Begin
Select T0.U_Unit from OITM T0 Where T0.ItemCode=$[DLN1.ItemCode.0]
End
If @basedoc>1
Begin
Select T0.U_BPQty From QUT1 T0 where T0.docentry=$[DLN1.BaseEntry.0] and T0.ItemCode=$[DLN1.ItemCode.0]
End
Else use this......
declare @basedoc as nvarchar
set @basedoc=$[DLN1.BaseType.0]
If @basedoc<1
Begin
Select T0.U_Unit from OITM T0 Where T0.ItemCode=$[DLN1.ItemCode.0]
End
If @basedoc>1
Begin
Select T0.U_BPQty From RDR1 T0 where T0.docentry=$[$38.45.0] and T0.ItemCode=$[DLN1.ItemCode.0]
End
Regards,
Rahul -
Not able to create transfer order..
Hi all,
When i am trying to create Transfer order,it gives an error"No items that are to be picked were found".
I have maintained all the settings regarding item categories and delivery item categories.
i am using Lean ware house management,What I feel is that there is some error in ware house settings.Please suggest..
Roopakhi,
i think you have 2 or more line item in sales order, the delivery date for one or two item will be in the past,so when you create delivery the item which is in the past delivey date will not get copied to delivery.
check all item is there in the delivery document,if no check the mising item delivery date, create the delivery based on that delivery data.
update the thread
regards
senya -
Hi gurus,
Iam working on IDES ECC 6.0.
when iam using a make to order material in sales order and when iam saving sales order it is not allowing me to save and message says, OPEN_FORM IS MISSING and throwing me out without saving sales order.
But when i use other normal stock material iam able to save the sales order.
This is happening only for make to order materials.
Can someone please throw some light on this.
Thanks gurus,
Naga.Check this thread
[START_FORM is invalid, OPEN_FORM is missing|START_FORM is invalid, OPEN_FORM is missing]
thanks
G. Lakshmipathi -
Not able to create plnd order in prod view
Hi,
When I try to create an order using product view, it gives me an error message,
'Invalid product-location combination (pegging area), A product-location combination exists in the APO database but not in liveCache'
Can someone help me with getting apo data into LC?
ThanksHi Vardev,
Try the following optilons.
1) Use transaction /SAPAPO/RRP_NETCH and create pegging areas for the location product and then try
2) Check both the location and product are in active integration model
3) If it did not work, carry out a CIF run for the location product run and then try
4) Check both the location and product are assigned to active model 000
5) Check master data in R/3 (material master)
I think step 1 should resolve your problem.
Please confirm
Regards
R. Senthil Mareeswaran. -
Error "Item 000010 does not exist" while creating sales order in VA01
Dear All,
As per customer requirement we are trying to validate shipping data( item level) and unloading point( item level) by customer enhancement.
Enhancement: V45A0003
Function Module: EXIT_SAPMV45A_003
INCLUDE: ZXVVAU05
Inside include we have written validation code that if user enters any wrong value for shipping data or unloading data
system will throw error message accordingly.
It is working fine and we are getting error message if wrong shipping data or unloading data is entered.
But after the error message is displayed if we try to save the sales order again system throws a STOP message as a POPUP
saying "Item 000010 does not exist".
Now,if we enter proper shipping data or unloading data and try to save the salesorder it is throwing error "Item 000010 does not exist"..
Please let me know your valuable input on this.
Regards
Arindam
Edited by: Arindam Ganguly on Mar 11, 2010 1:55 PMIt sounds like your error routine has prevented the insertion of the data in VBAP or XVBAP internal tables. Therefore, upon return to the screen and SAVE, SAP is examining the VBAP or XVBAP table, comparing to the 'I' index table probably, and finding that there is supposed to be an item 10, but it's not in the necessary table(s). This may be resulting because your internal tables are now inconsistent.
Look at where your inserted error coding is occurring...you may want to move that to the SAVE_DOCUMENT_PREPARE routine in MV45AFZZ, so that everything will have been built, and a final check of the content will stop the sales order save until the data is corrected.
Edited by: Breakpoint on Mar 11, 2010 3:29 PM -
CMIR data not copied while creating sales order from BAPI
hi all,
we are using BAPI to crate sales order.
but when we create SO manually, few fields at item level are derived automatically from CMIR...
Can we achieve same behavior through bapi also...
regards,
taranamHi Suraj,
So, You mean we need to derive COPA derivations for Copy by reference of a Sales Order,
If so could you please let me know how to do it.
Regards,
sg -
Not able to Book Sales Order.
Hi,
I ahve entered the order information. When i am trying to Book it, I am getting the below error:The Booking Activity has errored out, please contact your System Administrator.
Can anyone help me with a solution for this.
Regards,
Sravan.Hi,
What is the application release?
Click on Tools > Workflow Status, can you find more details about the error?
Review the following documents and see if it helps.
Note: 470967.1 - Book Exception Error ORA-20001: OE_Order_WF.Book_Order and ORA-06508
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=470967.1
Note: 374545.1 - Cannot Book Order: Error Ora-6502: Character Buffer Too Small
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=374545.1
Note: 431677.1 - Booking Fails: Invalid Package 'Oe_Credit_Check_Order_Pvt'
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=431677.1
Regards,
Hussein
Maybe you are looking for
-
Also, I did a backup on iTunes before the upgrade but after the upgrade completed, it performed a backup that overwrote the last one I did. At least I think it did, there is only one backup showing up in the MobileSync-Backup folder on my computer.
-
The file is in an unrecognized format
http://files.me.com/xebeche/p1k7yg The original non-edited picture imports normally without issue. The above image was edited. It was taken with a Nikon D300 and manipulated with Photoshop CS3. I converted the photograph to grayscale, cropped, adjust
-
I am using a PowerBook G4, and with iPhoto '08 I still notice poor quality when running a slideshow. It switches the resolution to 800x600, runs the show, then switches back. At 800x600, the photos look fuzzy, and they have a black border. They look
-
I have tried using Roxio, Limewire, Windows Media Player and Real Player to download videos from the internet to my Blackberry Pearl however it plays as audio. How do I fix this problem so that I can watch videos on my phone?
-
Rich Tree Table Drop duplicate Row Keys (from different Rich Tables)
Hello. My scenario looks like this: Two tables (lets say productTable, and taskTable) as drag sources. One Tree Table ( that should have the productTable items as a parent node, and the childNodes would be taskTable items), as a drop target.. In my t