APP-Problem in creating payment order
Hi Gurus,
I have created payment proposal for vendors in F110. Now, when I am checking the payment proposal in FBZ0 all the vendor line items are marked in RED in the Type Column which i guess should be green.
Please let me know if it is ok or what could be the reason.
Thanks,
Tushar
CHECK THE PROPOSAL ERROR LOG OR ELSE YOU CAN CLICK ON THE LINE ITEMS AND EDIT FOR PAYMENT
Similar Messages
-
Problem on creating process order
Dear Team,
I have a problem on creating process order thru COR1 where the basic start date only accept and follows current date. Basic finished date, no problem. Previously, i can set the basic start date using previous date / date in the past (in the same current month). I'm using "Only capacity requirements" for scheduling type.
is there anywhere in the SAP config that i can check?
and why this problem occured?
ThanksDear Tallha,
Here is screenshoot of my process order. the basic finished date is automatically changed to current date. (date entered 1/5/2014)
Thanks -
Problem in creating Maintenance Order with multiple operations
Hello all,
I am facing problem while creating Maintenance Order with multiple operations and sub-operations. I am using BAPI : BAPI_ALM_ORDER_MAINTAIN.
For single operation it is working fine,but i am unable to create MO with multiple operations and sub-operations.
Please, provide me the inputs required,
I have used methods :
ORDER CREATE,
OPERATION CREATE
and SAVE.
Regards,
SiddharthaHi,
The FM you are using is a perfect one. This FM is bit tricky to use. You need to perfectly pass the Reference number field. which links various input table parameters of this FM.
Thanks & Regards,
Navneeth K. -
Problem while Creating Service order through Work Order
Hi Gurus,
I have a problem While creating Service order (me21n) through - Work order it contains service requisitions.
So that means they carry information such as G/L and work order number while entering the requistion no in PO Creation Screen (me21n) which automatically should be picked from the work order refference.
But problem here is the service items and all other are assigned to PO except the Account Assingnment tab which is GL Account and Work Order No and Cost center..
Can anyone explain me this?
Is this something that one can explain?
Regards,
Murugesh R
Rewards for value replies.Closed..
-
Problem while creating Service order
Hi Gurus,
I have a problem While creating Service order (me21n) through - Work order it contains service requisitions.
So that means they carry information such as G/L and work order number while entering the requistion no in PO Creation Screen (me21n) which automatically should be picked from the work order refference.
But problem here is the service items and all other are assigned to PO except the Account Assingnment tab which is GL Account and Work Order No and Cost center..
Can anyone explain me this?
Is this something that one can explain?
Regards,
Murugesh R
Rewards for value replies.Hi Murgesh,
If GL code is not getting bydefault from the system it is needed to be provided by the user.
If normally one GL is there or other than master data services if single GL is there u can set that in SPRO.
it is avalible in deafult settings in order node
If you are creating the order with refrence to PR then it will take account assignement as "F" system will pick up all the details from PM module. This is the integration of MM & PM module.
But if your PO is not w.r.t. PM orders PR then needs to be given manully.
Ramesh
Edited by: RameshChandra Soni on Jul 25, 2008 8:16 AM -
Problem in Creating Sales Order PL/SQL API
Hey,
I've to create a Sales Order 'n BPEL by using Apps Adapter. In Module Browser, I've chosen the OE_ORDER_PUB.PROCESS_HEADER and given the correct details.
I passed the new ORDER_NUMBER and HEADER_ID as blank. I'm getting the response RETURN_STATUS as 'S' ( I mean which is success) and it is not throwing any error message.
But while checking in the OE_ORDER_HEADERS_ALL table, I am not finding any created Sales Order record.
Please help.
-- Eric.Hi,
After giving some parameters, I am facing different problem as shown in below.
FND FND_AS_UNEXPECTED_ERROR N PKG_NAME OE_Delayed_Requests_PVT N PROCEDURE_NAME LOGREQUEST N ERROR_TEXT ORA-06502: PL/SQL: numeric or value error: NULL index table key value
This error I am getting as Response while executing from BPEL.
Please help.
-- Eric. -
Problem while creating sales order using BAPI
Hi all,
i am creating a sales order from the purchase order data.
when my client will send a PO in EDI format, my 3rd party edi tool will convert that edi formatted PO to text format. then i will upload that text formatted PO to my program then i will create a SO from those uploaded PO data using BAPI BAPI_SALESORDER_CREATEFROMDAT2.
but,no sales order is being created.& also i am not getting any return message.by debugging also, i am not getting the error.plz suggest where i am doing mistake.below is the coding.
DATA:
gfilename LIKE rlgrap-filename.
*--Internal tables
DATA: BEGIN OF i_item OCCURS 50. "Create Material Document Item
INCLUDE STRUCTURE BAPISDITM .
DATA: END OF i_item .
DATA: BEGIN OF i_partner OCCURS 20. "Return parameter
INCLUDE STRUCTURE BAPIPARNR.
DATA: END OF i_partner.
DATA: BEGIN OF i_schedule OCCURS 20. "Return parameter
INCLUDE STRUCTURE BAPISCHDL .
DATA: END OF i_schedule.
DATA: BEGIN OF i_cond OCCURS 20. "Return parameter
INCLUDE STRUCTURE BAPICOND .
DATA: END OF i_cond.
DATA: BEGIN OF i_part OCCURS 0, " Internal table for split data
part(20),
END OF i_part.
DATA: BEGIN OF i_return OCCURS 20. "Return parameter
INCLUDE STRUCTURE bapiret2.
DATA: END OF i_return.
*-- Work areas
DATA: BEGIN OF wa_header . "sales Document Header Data
INCLUDE STRUCTURE BAPISDHD1.
DATA: END OF wa_header .
*DATA: BEGIN OF wa_return . "Output Structure
INCLUDE STRUCTURE BAPIRET2.
*DATA: END OF wa_return .
DATA: begin of sorder.
INCLUDE STRUCTURE BAPIVBELN.
DATA: end of sorder.
data:begin of t_upload,
ebeln(10), "PO no(seagate)
aedat like sy-datum , "PO date
bsart(4) , "PO type
vdatu like sy-datum , "requested delivery date
kunnr(10) , "customer no-sold-to-party
kunak like vbak-kunnr, "bill-to-party
name1_s(20), "name1 of sold-to-party
name2_s(15), "name2 of sold-to-party
land1_s(3), "country
ort01_s(10), "city
regio_s(3), "region(state/province)
pstlz_s(10), "postal code
adrnr_s(10), "address
bstkd_e(10), "end customer purchase order
posex(6), "end customer PO line no(item no)
kdmat(18), "end customer material no(part no)
kunag(10), "ship-to-party
name1_c(20), "name1 of ship-to-party
name2_c(15), "name2 of ship-to-party
land1_c(3), "country
ort01_c(10), "city
regio_c(3), "region(state/province)
pstlz_c(10), "postal code
adrnr_c(10), "address
posnr(6), "item no(seagate PO line no)
pstyv(4), "item category
matnr(18), "material no(seagate 9 digit part no)
zmeng(13), "Target quantity in sales unit
vrkme like vbap-vrkme, "sales unit
meins(3), "UOM
posnr_tot like vbap-posnr,"Total no. of line items
werks(4), "plant
vstel like vbap-vstel, "shipping point
empst(10), "receiving point
shtyp(4), "shipment type
route(6), "route
vsbed(2), "shipping conds
rkfkf like vbap-rkfkf, "method of billing for co/ppc orders
zterm(4), "terms of payment key
inco1(3), "F.O.B inco term1
inco2(3), "F.O.B inco term2
end of t_upload.
Data: wa_upload like t_upload,
i_upload like standard table of t_upload.
Data:v_kunnr like kna1-kunnr,
v_posnr like vbap-posnr,
v_matnr like vbap-matnr,
v_zmeng like vbap-zmeng,
v_kunag like kna1-kunnr.
*---Constants
CONSTANTS: c_comma TYPE c VALUE ',', " For splitting data at commas
c_01(2) TYPE c VALUE '01', " For movement code in Bapi
c_b TYPE c VALUE 'B', " For mvt. Indicator in Bapi
c_creat(5) TYPE c VALUE 'CREAT', " For button text
c_clear(5) TYPE c VALUE 'CLEAR', " For clear button
c_mvmt(4) TYPE c VALUE 'MVMT',
c_ok(2) TYPE c VALUE 'OK',
c_error(5) TYPE c VALUE 'Error'.
*--SELECTION SCREEN DESIGN--
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
PARAMETERS:
p_auart LIKE vbak-auart, " order type
p_vkorg LIKE vbak-vkorg, " sales org
p_vtweg LIKE vbak-vtweg, " dist channel
p_spart LIKE vbak-spart, " division
p_vkgrp LIKE vbak-vkgrp, " sales group
p_vkbur LIKE vbak-vkbur, "sales office
p_file(256) default 'c:/saleorder.txt'. "File name
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN PUSHBUTTON 15(10) v_create USER-COMMAND creat.
SELECTION-SCREEN PUSHBUTTON 40(10) v_clear USER-COMMAND clear.
INITIALIZATION -
INITIALIZATION.
v_create = c_creat .
v_clear = c_clear.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM selectfile USING p_file.
*--AT SELECTION_SCREEN--
AT SELECTION-SCREEN .
IF sy-ucomm = c_clear.
PERFORM f_clear.
ELSE.
IF sy-ucomm <> c_mvmt.
**--- Validating the input data.
PERFORM f_check_inputs.
ELSEif sy-ucomm = c_creat.
*--- Validating the input data.
PERFORM f_check_inputs.
*-- Uploading the PO data.
PERFORM f_PO_upload.
*---checking the PO data
PERFORM f_check_upload_data.
*---create sales order from PO data
PERFORM f_Sales_order_create.
ENDIF.
FORM f_PO_upload.
gfilename = p_file.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = gfilename
filetype = 'DAT'
TABLES
data_tab = i_upload
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
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE i398(00) WITH '(WS_UPLOAD)'
' Errors occured with exception '
sy-subrc.
ENDIF.
ENDFORM. " f_PO_upload
*& Form selectfile
text
-->P_P_FILE text
FORM selectfile CHANGING value(filename) TYPE c.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = gfilename
def_path = 'C:\'
mask = ',*.txt.'
mode = 'O'
title = 'Select File Name'
IMPORTING
filename = filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
ENDFORM. " selectfile
FORM f_Sales_order_create.
PERFORM f_fill_header.
PERFORM f_fill_partner.
PERFORM f_fill_item.
PERFORM f_call_BAPI.
ENDFORM. " f_Sales_order_create
*& Form f_fill_header
text
--> p1 text
<-- p2 text
FORM f_fill_header.
move p_auart to wa_header-doc_type.
move p_vkorg to wa_header-sales_org.
move p_vtweg to wa_header-distr_chan.
move p_spart to wa_header-division.
move p_vkgrp to wa_header-sales_grp.
move p_vkbur to wa_header-sales_off.
Read table i_upload into wa_upload index 1.
move wa_upload-ebeln to wa_header-purch_no_c.
move wa_upload-aedat to wa_header-purch_date.
move wa_upload-bsart to wa_header-po_method.
move wa_upload-vdatu to wa_header-req_date_h.
move wa_upload-bstkd_e to wa_header-purch_no_s.
*move wa_upload-route to wa_header-route.
move wa_upload-vsbed to wa_header-ship_cond.
move wa_upload-empst to wa_header-rec_point.
move wa_upload-shtyp to wa_header-ship_type.
move wa_upload-zterm to wa_header-pmnttrms.
move wa_upload-inco1 to wa_header-incoterms1.
move wa_upload-inco2 to wa_header-incoterms2.
ENDFORM. " f_fill_header
*& Form f_fill_partner
text
--> p1 text
<-- p2 text
FORM f_fill_partner.
if not wa_upload-kunnr is initial.
select single kunnr from kna1 into v_kunnr
where kunnr = wa_upload-kunnr.
if sy-subrc <> 0.
Message E014 with 'customer does not exist'.
else.
move 'AG' to i_partner-partn_role.
move wa_upload-kunnr to i_partner-partn_numb.
move wa_upload-land1_s to i_partner-country.
move wa_upload-name1_s to i_partner-name.
move wa_upload-name2_s to i_partner-name_2.
move wa_upload-ort01_s to i_partner-city.
move wa_upload-regio_s to i_partner-region.
move wa_upload-pstlz_s to i_partner-postl_code.
move wa_upload-adrnr_s to i_partner-address.
append i_partner.
endif.
endif.
if not wa_upload-kunag is initial.
select single kunnr from kna1 into v_kunag
where kunnr = wa_upload-kunag.
if sy-subrc <> 0.
Message E015 with 'end customer does not exist'.
else.
move 'WE' to i_partner-partn_role.
move wa_upload-kunag to i_partner-partn_numb.
move wa_upload-land1_c to i_partner-country.
move wa_upload-name1_c to i_partner-name.
move wa_upload-name2_c to i_partner-name_2.
move wa_upload-ort01_c to i_partner-city.
move wa_upload-regio_c to i_partner-region.
move wa_upload-pstlz_c to i_partner-postl_code.
move wa_upload-adrnr_c to i_partner-address.
append i_partner.
endif.
endif.
ENDFORM. " f_fill_partner
*& Form f_fill_item
text
--> p1 text
<-- p2 text
FORM f_fill_item.
loop at i_upload into wa_upload.
if not wa_upload-matnr is initial.
select single maramatnr msegmenge into (v_matnr, v_zmeng) from
mara inner join mseg on maramatnr = msegmatnr
where mara~matnr = wa_upload-matnr.
if sy-subrc <> 0.
Message E016 with 'material no does not exist'.
elseif v_zmeng LT wa_upload-zmeng.
Message E017 with 'order quantity is greater than the quantity present'.
endif.
endif.
move wa_upload-posnr to i_item-itm_number.
move wa_upload-pstyv to i_item-item_categ.
move wa_upload-matnr to i_item-material.
move wa_upload-zmeng to i_item-target_qty.
move wa_upload-meins to i_item-target_qu.
move wa_upload-werks to i_item-plant.
*move wa_upload-meins to wa_vbap-meins.
*move wa_upload-posnr_tot to wa_vbap-posnr_tot.
move wa_upload-posex to i_item-po_itm_no.
move wa_upload-kdmat to i_item-cust_mat22.
move wa_upload-inco1 to i_item-incoterms1.
move wa_upload-inco2 to i_item-incoterms2.
move wa_upload-zterm to i_item-pmnttrms.
move wa_upload-empst to i_item-rec_point.
move wa_upload-shtyp to i_item-ship_type.
move wa_upload-route to i_item-route.
append i_item.
PERFORM f_fill_schedule_line.
PERFORM f_fill_conditions.
ENDLOOP.
ENDFORM. " f_fill_item
*& Form f_fill_schedule_line
text
--> p1 text
<-- p2 text
FORM f_fill_schedule_line.
move wa_upload-matnr to i_schedule-itm_number.
move sy-datum to i_schedule-req_date.
move wa_upload-zmeng to i_schedule-req_qty.
append i_schedule.
ENDFORM. " f_fill_schedule_line
*& Form f_fill_conditions
text
--> p1 text
<-- p2 text
FORM f_fill_conditions.
move wa_upload-matnr to i_cond-itm_number.
move sy-datum to i_cond-conpricdat.
append i_cond.
ENDFORM. " f_fill_conditions
*& Form f_clear
text
--> p1 text
<-- p2 text
FORM f_clear.
clear:p_auart,
p_vkorg,
p_vtweg,
p_spart,
p_vkgrp,
p_vkbur.
ENDFORM. " f_clear
*& Form f_call_BAPI
text
--> p1 text
<-- p2 text
FORM f_call_BAPI.
clear:i_item,i_partner,i_schedule.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = wa_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = sorder
TABLES
RETURN =
ORDER_ITEMS_IN = i_item
ORDER_ITEMS_INX =
ORDER_PARTNERS = i_partner
ORDER_SCHEDULES_IN = i_schedule
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN = i_cond.
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 not ( sorder-vbeln is initial ).
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
write: /'Order number:', sorder.
else.
loop at i_return.
write: / i_return-id, i_return-number, i_return-message(80).
endloop.
*write: /'Error'.
endif.
*loop at i_return.
*write: / i_return-id, i_return-number, i_return-message(80).
*endloop.
ENDFORM. " f_call_BAPIHI
Pricing will be carried basing on the pricing
procedure.
Case1: Prices will be carried out automatically if
necessary condition records are maintained for the
condition type.
For this you can go to Sales Order-> Item Conditions
In the screen you can click on command button Analysis,
which gives you the list of condition types associated
to the pricing procedure. By clicking on the condition
type you can know the action that has taken place.
Case2: Manually forcing prices for Items.
To do this, you have to populate ORDER_CONDITIONS_IN &
ORDER_CONDITIONS_INX. Also note to identify the item
numbers, you manually pass the item number for each item
in the sales order, use the same item number for
populating conditions.
Parameters required:
ORDER_CONDITIONS_IN:
ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
ORDER_CONDITIONS_INX:
ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
Hope the above info helps you. Do revert back if you
need more info.
Kind Regards
Eswar -
A problem about create sales order with reference to contract.
Hello,everyone,
when I create sales order va01,there is user exit in MV45AFZB to check the vbkd-bstkd,unique and fixed length.
but there is no such in contract creation va41.
when I create a contract and copy the data to sales order ,the check code is prevent me from copying
message error:the vbkd-bstkd check is wrong.
how to solve the problem, if I have to use the check in sales order.The Simple thing may be put a check at contract stage it self, then whatever data is in contract will copy in sales order. So you wont face this problem.
Thanks,
Raja -
Problem while creating sales order
Hi
We are facing a problem while creating a sales order in R/3. The sales order number is getting generated. But we are not able to view the same in the backend meaning it is not there in the database. Any inputs would be of help.
regs
SteveHi everybody,
I've got a problem with this too. I use the BAPI_SALESORDER_CREATEFROMDAT2 with BAPI_TRANSACTION_COMMIT and the webdynpro shows me the document number created in R3 with a Success message. But when I go to R3 and try to display the created sales order, it doesn't exists. So... Maybe I'm doing something wrong with the BAPI_TRANSACTION_COMMIT. ¿Can anybody help me with this?
The code I use is this:
When the user pushes the SAVE button in the WebDynpro, this code executes:
//@@begin onActionSave(ServerEvent)
wdThis.wdGetSOCreaCustController().executeBapi_Salesorder_Createfromdat2();
wdThis.wdGetSOCreaCustController().executeBapi_Transaction_Commit();
//@@end
In the custom Controller I've got the code for those executions:
public void executeBapi_Salesorder_Createfromdat2( )
//@@begin executeBapi_Salesorder_Createfromdat2()
try {
wdContext.currentBapi_Salesorder_Createfromdat2Element().modelObject().execute();
catch (Exception ex) {
wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
wdContext.nodeOutput().invalidate();
//@@end
public void executeBapi_Transaction_Commit( )
try {
wdContext.currentBapi_Transaction_CommitElement().modelObject().execute();
catch (Exception ex) {
wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
wdContext.nodeOutput().invalidate();
//@@end
¿Is something wrong? ¿Is something missing? -
Problem in Creating Sales Order From One DB to another DB
Hello All,
I am trying to create a Sales Order in another database from the current database based on the Purchase Order but while creating the sales order system is throwing an error " In "To Whse" enter valid values [ZAPp 0] "
My Code for Creating Sales Order in another DB are as follows :-
'==== Connect To another SAP Company ====='
'=====================================
Dim oCompany_DB As New SAPbobsCOM.Company
oCompany_DB.Server = "OSL_SERVER"
oCompany_DB.LicenseServer = "OSL_SERVER"
oCompany_DB.UseTrusted = False
oCompany_DB.CompanyDB = Database_Name
oCompany_DB.UserName = SAPUserName
oCompany_DB.Password = SAPPassword
oCompany_DB.DbUserName = DBUserName
oCompany_DB.DbPassword = DBPassword
oCompany_DB.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
lRetCode = oCompany_DB.Connect()
If lRetCode <> 0 Then
oCompany_DB.GetLastError(lErrCode, sErrMsg)
If (lErrCode <> -4006) Then
Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
End If
End If
'===== Creating the Sales Order ====='
'================================
Dim oOrder As SAPbobsCOM.Documents = oCompany_DB.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
Dim DocDueDate As String = oRecord.Fields.Item("DocDueDate").Value
oOrder.DocDueDate = DocDueDate
oOrder.CardCode = Customer
While Not oRecord.EoF
Dim ItemCode As String = oRecord.Fields.Item("ItemCode").Value
Dim WhsCode As String = oRecord.Fields.Item("WhsCode").Value
Dim Quantity As Double = oRecord.Fields.Item("Quantity").Value
Dim Price As Double = oRecord.Fields.Item("Price").Value
Dim Discnt As Double = oRecord.Fields.Item("DiscPrcnt").Value
Dim TaxCode As String = oRecord.Fields.Item("TaxCode").Value
oOrder.Lines.ItemCode = ItemCode
oOrder.Lines.WarehouseCode = WhsCode
oOrder.Lines.Quantity = Quantity
oOrder.Lines.Price = Price
oOrder.Lines.DiscountPercent = Discnt
oOrder.Lines.TaxCode = TaxCode
oOrder.Lines.Add()
oRecord.MoveNext()
End While
lRetCode = oOrder.Add
'=== Check For Error if any ===='
If lRetCode <> 0 Then
oCompany_DB.GetLastError(lErrCode, sErrMsg)
If (lErrCode <> -4006) Then
Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
End If
End If
oCompany_DB.Disconnect()
When i execute the above code company gets connected but sales order not getting added in another company.
Thanks,
AmitYou can not do it the alternate way Kevin suggests, direct DB inserts are prohibited by SAP and can corrupt your DB, particularly because unlike what most people think, all SAP documents affect more than just their own tables (e.g. the numbering table, the history tables).
Are you getting any error message, or is it returning 0?
If it is returning 0, then check is the document actually going to the newly created database or maybe somehow going to old one.
If it isn't returning 0, what is the error code and message.
Edit:
Also I do see an error in your code. As it stands, you are adding an empty line to the end of every order. This can cause problems for SAP.
Dim counter As Integer = 0
If counter <> 0 Then 'Not equals 0, forum hides lt & gt symbols.
oOrder.Lines.Add()
End If
counter = counter + 1
oOrder.Lines.ItemCode = ItemCode
oOrder.Lines.WarehouseCode = WhsCode
oOrder.Lines.Quantity = Quantity
oOrder.Lines.Price = Price
oOrder.Lines.DiscountPercent = Discnt
oOrder.Lines.TaxCode = TaxCode
Edited by: njmog1 on May 9, 2011 10:14 AM -
A bapi problem of create sales order
hello,experts,
when I want to try the function of bapi 'BAPI_SALESORDER_CREATEFROMDAT1', the return message is the following,
'Material 4070111 is not defined for sales org.4050, distr.chan.01, language ZH',actually,the sales org.4050 is defined for the material.
pls help me out.appreciated.
the content of the program:
REPORT ZWY_SALESORDER01.
--Data Declaration--
Data: st_BAPISDHEAD like BAPISDHEAD, " Sales Order Header Data
ta_BAPIITEMIN like BAPIITEMIN occurs 0 with header line, " Ln item
ta_BAPIPARTNR like BAPIPARTNR occurs 0 with header line, " Partner
d_BAPIRETURN1 like BAPIRETURN1, " Bapi return msg
d_vbeln like bapivbeln-VBELN. " Sales Order Number
*Please note in the following program, sold to party (SP) has been
*entered as 'AG' and ship to party (SH) as 'RG'.
*SP----
AG
*SH----
RG
*Order type 'OR' as 'TA'
*Please use TA instead of OR
*Also if you set the * CONVERT_PARVW_AUART = 'X' parameter to 'X' you
*can use sold to party as SP and ship to party as SH.
Move the data to create sales order in the repective parameters------*
move: '4OR' to st_BAPISDHEAD-DOC_TYPE, " Sales document type
'15493' to st_BAPISDHEAD-PURCH_NO_C,
'4050' to st_BAPISDHEAD-SALES_ORG,
'01' to st_BAPISDHEAD-DISTR_CHAN,
'00' to st_BAPISDHEAD-DIVISION,
'00010' to ta_BAPIITEMIN-ITM_NUMBER,
'4070111' to ta_BAPIITEMIN-MATERIAL,
'4000' to ta_BAPIITEMIN-PLANT,
'1' to ta_BAPIITEMIN-REQ_QTY,
'AG' to ta_BAPIPARTNR-PARTN_ROLE, " Sold to Party
'0000006648' to ta_BAPIPARTNR-PARTN_NUMB.
Append the internal tables-------------------------------------------*
append ta_BAPIPARTNR.
clear ta_BAPIPARTNR.
append ta_BAPIITEMIN.
clear ta_BAPIITEMIN.
Move ship to party---------------------------------------------------*
move: 'RG' to ta_BAPIPARTNR-PARTN_ROLE, " Ship to party
'0000006648' to ta_BAPIPARTNR-PARTN_NUMB.
Append the internal tables-------------------------------------------*
append ta_BAPIPARTNR.
clear ta_BAPIPARTNR.
break-point.
Call the Bapi to create the sales order
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
ORDER_HEADER_IN = st_BAPISDHEAD
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = ' '
IMPORTING
SALESDOCUMENT = d_vbeln
SOLD_TO_PARTY =
SHIP_TO_PARTY =
BILLING_PARTY =
RETURN = d_BAPIRETURN1
TABLES
ORDER_ITEMS_IN = ta_BAPIITEMIN
ORDER_PARTNERS = ta_BAPIPARTNR
ORDER_ITEMS_OUT =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CCARD =
ORDER_CFGS_BLOB =
ORDER_SCHEDULE_EX =
break-point.
if d_vbeln <> space.
write: 'Sales order No. ', d_vbeln.
endif.clear iohead.
ihead-doc_type = 'ordertype'.
ihead-sales_org = 'sales organisation'.
ihead-distr_chan = 'distribution ch'.
ihead-division = 'division'.
ihead-req_date_h = sy-datum.
ihead-ship_cond = 'shipping codition'.
ihead-incoterms1 = 'incoterms'.
ihead-pmnttrms = 'payment terms'.
ihead-purch_no_c = 'Purchase document'.
ihead-purch_date = 'purchase doc date.
ihead-accnt_asgn = 'account assignment'.
ihead-pymt_meth = 'payment method'.
clear ipartner. refresh ipartner.
ipartner-partn_role = 'AG'.
ipartner-partn_numb = 'sold to party'.
append ipartner.
clear ipartner.
ipartner-partn_role = 'WE'.
ipartner-partn_numb = 'ship to party'.
append ipartner.
refresh : iitem, ibapischdl, ibapicond.
clear : iitem, ibapischdl, ibapicond.
item-itm_number = '10'.
item-material = 'material'.
item-plant = 'plant'.
item-val_type = 'BLFG'.
append item.
ibapischdl-itm_number = '10'.
ibapischdl-req_date = sy-datum.
ibapischdl-req_qty = 'quantity'.
append ibapischdl.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
SALESDOCUMENT =
order_header_in = ihead
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT_PARVW_AUART = ' '
importing
salesdocument_ex = wvbeln
tables
return = ibapiret2
order_items_in = item
ORDER_ITEMS_INX = IBAPISDITMX
order_partners = ipartner
order_schedules_in = ibapischdl
ORDER_SCHEDULES_INX = ibapischdl
order_conditions_in = ibapicond
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 wvbeln ne space.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = wwait.
IMPORTING
RETURN =
sales document will be available in bapi return .
saravanan -
Problem in creating Sales Order
Hi All,
We have 3 Document types ZS01,ZS02 and ZS03 for creating <b>Sales Order</b>. We have written one program to create Sales Order for document type 'ZS01'.
Our requirement is ,we should allow to create sales order of doc.type ZS01 <b>thru that 'z' program only</b>,we should not use ZS01 type to create sales order via VA01.So, we have restricted sales order creation using 'ZS01' thr' VA01 by authorisation profile.So in my 'z' program i couldn't call VA01 to create sales order.So I tried using BAPI,it is giving me the error <b>"No maintenance authorization for document type ZS01".</b>
Please guide or suggest me some alternative method to create sales order.
Thanks & Regards,
Sudipto.Hi Sudipto,
There is no direct method of by passing a role, but u can try creating sales order thru FM BAPI_SALESORDER_CREATEFROMDAT2 with reference to a SO that is already created with ZSO1, or you might call the Z report program internally from ur program to create the SO.
Hope that helps
Anirban -
Problem with creating Process order confirmation using BAPI
Hello,
While creating Process Order confirmation using BAPI_PROCORDCONF_CREATE_TT, material document is getting created. But a line item is inserted in the table AFRU without material document number. When it is created manually using the transaction COR6, the table is getting updated with material doc in the line item. Can anyone let me know what other attributes to be passed in order the update the same?
Thanks in Advance.
Regards, Senthil G.Hello , I am working with the same Bapi, can you please send me the code to fill the parameters, if I find the same error like you, I will send you the solution if I correct that.
Thanks for your help.
[email protected]
Guatemala, Cempro ADATSA -
Pricing problem while creating sales order doc
Hi friends,
My requirement is to create sales order with ref to contract i am using 'BAPI_SALESORDER_CREATEFROMDAT2' , and I am extracting data from konv table to get price through condition record , but i am getting 4 messages
(S) SALES_HEADER_IN has been processed successfully
(E) Condition PR00 is not allowed as header condition
(W) The sales document is not yet complete: Edit data
(E) Sales document was not changed
and i am not getting pricing for created sales order document.
please help.
regards,
Sravani.solved
-
Problem while creating SALES ORDER (OR)
Hi All,
I am unable to create sales order (OR)
Error : Material is not defined for sales areaI have created MMR and CMR Properly.
Please help.
Thanks In Advance
Regards
AbhiHi Abhi,
I face similar issue as faced by you.
I went to additional data and changed the description and added the description in which I wanted it to be added but does not help. Am I missing the right place where to make the change?
I am pretty sure that it is a language issue.
I created a sales order, added a product, it worked fine.
Now, I copied this product to a new product, changed description and added it in same sales order it does not work.
Best Regards,
Neha
Maybe you are looking for
-
Hi All, JDeveloper version : 11.1.1.6 ADF My Requirement: My taskflow contains three pages(page1,page2 and page 3). In page page2 have a 'commandImageLink' button. When i click the Button the 'page2' should be open in 'New Browser Window'. Is it poss
-
hi all.i dropped my mp3 player last day and now wheni turn it on i just can see creative > MuVo2 FM > then it hangs.when i put my ear on my mp3 i hear another sound from it's hard dri've.i went to it's recovery mode but it has no result.(some options
-
hi, i am using normal alv edit report, in list 2 field date fields, this 2 fields are editable, how to get the date f4 help, pls give me solution thanks santha
-
Ok so i have a bit of a problem with FCE. I am trying to move clips around in the timeline. I can move them, but as soon as I stop moving the mouse the clip just gets dropped onto the timeline. any idea on how i can turn this function (or does it sou
-
Default Account Assignment (OKB9)
Hi Gurus, We are trying to post a document using txn MIRO. There is a tax on the material & the same gets calculated creating a separate line item. We have maintained the Cost Centre & Internal Order for the tax G/L account in OKB9. The cost centre g