Sales Order - Error while changing using BAPI
Hi,
I would want to compare the system price and the expected price for a sales order and in case of any discrepancy, set a 'reason for rejection' code. I'm using the bapi 'BAPI_SALESORDER_CHANGE' to make changes to the sales order (setting the rejection code). This is working fine in cases where there is some value for both the prices but is throwing an error while the system price is null.
Is there any way to overcome this error and still set the rejection code or should we make any changes in the config to let the system allow to save changes when the system price is null.
Thanks in advance.
The message you mention - ZZ054 - seems to be a non-standard one - it may be generated by some of your user-exits. Check this in SE91-> "Where-used list" (standard system should allow saving the document in case of incimplete pricing - that's why you may have an exit which prevents this).
If so, you might modify your user-exits accordingly - to allow saving the document in cases defined by you.
Another approach (not sure if this will be a solution in this case but you may check): see parameter BEHAVE_WHEN_ERROR of fm BAPI_SALESORDER_CHANGE.
regards
Similar Messages
-
Getting error in while changing sales order which is created using BAPI
Hi All,
I have created the sales order using BAPI ( BAPI_SALESORDER_CREATEFROMDAT1 ) and i am successfully creating sales order using this BAPI. But while i want to change sales order iam changing Shipping Conditions in Header Data of sales order .its giving an error .can any know any thing about this.
Error mesage : No status object is available for SDI 300082407/10 (Order Number/Item Number)
In Header i am passing these values ...
wa_order_header_in-doc_type = vbak-auart.
wa_order_header_in-sales_org = vbak-vkorg.
wa_order_header_in-distr_chan = vbak-vtweg.
wa_order_header_in-division = vbak-spart.
Do i required to pass the below values ? in Header structure ( BAPISDHEAD1 ).
REFOBJECTTYPE
REFOBJECTKEY
REFDOCTYPE
Regards,
Sudhakar Reddy Arectified
-
Sales order for variant material using BAPI "BAPI_SALESORDER_CREATEFROMDAT2
Hi,
I am using BAPI "BAPI_SALESORDER_CREATEFROMDAT2" for creating salesorder for variant configuration material. I am able to create a salesorder when have only one variant material, However when i have more than one variant material getting errors. Can some one tell me how to fill the material data in the config tables provided in the BAPI.
Thanks.Hai Vinit
Check the following Code & also Check the following Standard Programs
L2032U12
LCRMAU01
LCRMAU11
LZOC1U01
MWWMJF32
RBUS2032
Structures for order header
DATA: l_order_header_in LIKE bapisdhd1,
l_order_header_inx LIKE bapisdhd1x,
Tables for order items
li_order_items_in TYPE STANDARD TABLE OF bapisditm,
li_order_items_inx TYPE STANDARD TABLE OF bapisditmx,
Order partners
li_order_partners TYPE STANDARD TABLE OF bapiparnr,
*Schedule lines
li_ORDER_SCHEDULES_IN TYPE STANDARD TABLE OF BAPISCHDL,
li_ORDER_SCHEDULES_INX TYPE STANDARD TABLE OF BAPISCHDLX,
*-condition type
li_ORDER_CONDITIONS_IN TYPE STANDARD TABLE OF BAPICOND,
li_ORDER_CONDITIONS_INX TYPE STANDARD TABLE OF BAPICONDX,
Return table from bapi call
li_return TYPE STANDARD TABLE OF bapiret2,
Sales document number
l_vbeln LIKE bapivbeln-vbeln,
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = l_order_header_in
order_header_inx = l_order_header_inx
testrun = 'X'
IMPORTING
salesdocument = l_vbeln
TABLES
return = li_return
order_items_in = li_order_items_in
order_items_inx = li_order_items_inx
order_partners = li_order_partners
ORDER_SCHEDULES_IN = li_ORDER_SCHEDULES_IN
ORDER_SCHEDULES_INX = li_ORDER_SCHEDULES_INX
ORDER_CONDITIONS_IN = li_ORDER_CONDITIONS_IN
ORDER_CONDITIONS_INX = li_ORDER_CONDITIONS_INX.
Thanks & Regards
Sreenivasulu P -
How to create a Sales Order with external number using BAPI
Hi People,
I am wonderning how to create Sales order using external number range by BAPI (SALESORDER_CREATEFROMDAT202).
I tried search but could not succeed in finding the solution.
Please share if anyone has some info.
Thanks in advance.
Regards,
PraveenAs per my understanding, the BAPI
SALESORDER_CREATEFROMDAT202
mentioned by you, is not BAPI. In fact, that is basic IDoc Type. For processing an Inbound IDoc, we use FM IDOC_INPUT_ORDERS.
If you want to create sales order other than IDoc, refer FM BAPI_SALESORDER_CREATEFROMDAT2. There you can provide external sales order no in SALESDOCUMENTIN. In addition to that check whether your sales doc type is relevant for external number range or not. If yes. then make sure you are providing external number according to the number range maintained.
If you still have any concerns, please revert back.
Thanks, JP -
Change of sales order address while changing the delivery address
Hi,
Problem: Changing delivery address in outbound delivery is changing the originating sales order address for one user while for a different user id the sales order and delivery has their different delivery addresses.
Scenario:
1. A new sale order is created and its address for ship to party is modified (to say A1)
2. Delivery for the sales order is created and the ship to party address is modified (to say A2).
While executing this scenario with two different users we are getting different result
For user 1, after step 2 both the sales order and delivery has shipping address as A2
whereas for user 2, sales order has address A1 and delivery document has address A2
How can this difference in behaviour be explained?Found the solution myself,
The standard behavior is being modified in the user exits V09A0001 ( Reference/duplicate decision making manual address). Also refer to note 97832 for detailed solution. -
COR2 (Change Process Order) Upload & Data Change Using BAPI OR RFC
Dear Experts,
I want to change the Transaction cor2(Change Process Order) material 1st line quantity, after that i have to upload records from line 2. I have all the data in itab. Will you people please have a suggestion to change and Upload data at the same time in a single program using some BAPI or RFC.
Which BAPI or RFC will be helpfull in this regards.
Thanks,
SohailI have done it through BDC recording, change on first line, then upload using bdc from 2nd line.
-
Error while changing useful life
Hi,
I was trying to change the Dep Key to 0000(No depreciation) with useful life of 39. I tried changing the useful life to 1 and 0 and I still could not make the change, I got the red message "Useful life exceeds allowable value". This assets have land lease.
Thank You,
MarkHi,
I have checked and their is a Z_lease table which has notice date specified to it. If I change notice date, then I am able to change master data. Now my question is do we need this lease table ? cause this is tied to asset default usefull life during implementation phase. At least tax books should not be tied to this lease table. Is their a process to tie/untie this table?
Thank You,
Mark -
Function module which uses both BAPI's for sales order create and change
Please name the function module which uses both BAPI's for sales order create and change.
BAPI_SALESORDER_CREATEFORMDAT2
BAPI_SALESORDERCHANGEYup.
you must write a piece of code for this.
with if else condition.first check if SO is exsist than use second FM to change it else create new SO from first FM.
logic somethig like this.
Amit. -
Error while changing CRM Sales Document in R/3
Hi All,
I have done the download of customizing, condition & business objects in CRM 4.0.
Now when I create a sales order in CRM, it gets replicated in R/3. I can see the order in tcode VA03.
But when I try changing the same sale order in R/3 using tcode VA02, I get the following error:
"Sales document &1 (5001169) is currently being processed (by user RFCUSER)"
Would appreciate help from the group.
Many thanks !Hi Krishna,
The middleware user is locking the order so the document has not distributed through the system properly.
Try looking at the inbound queue (transaction SMQ2) and outbound queue (SMQ1) for errors. Also look at the BDocs in error (SMW01).
When CRM sends an order to R/3 it waits for a confirmation to be returned, looks like the problem is here, maybe in your delta downloads not being set correctly.
Cheers
Andrew -
Creating Sales order texts while using BDC session method is not working
Hi All,
I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
I wanted to modify this BDC sesion to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
Please suggest if there is any way to create sales order using BDC.
Regards
SheebaHi Madhu,
'=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
Part of BDC program generated for cretaing sales order texts.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
Regards,
Sheeba -
When launching Lr i get the initial screen to come up followed by an "error while changing modules" pop up. I have uninstalled and re-downloaded, followed all the suggested trouble shooting fixes and still nothing. When the app starts it has the basic info boxes but without any options in them (i.e. no import button or any buttons at all for that matter).All my other creative cloud apps seem to be working fine but Lr won't. Please help
Ah, see, you said you had done it differently before.
> and I tried to add a toolbox button by navigating to AcroPDF.dll.
You'll need to reinstall Reader if the libraries aren't registered. You can't register them manually.
Perhaps if you posted some of your code (where it creates the objects, etc.) we might be able to give you some more advice. You're sure you aren't trying to use anything outside of the AxAcroPDFLib.AxAcroPDF class? -
Getting error while calling this BAPI:Field MATNR has been transferred inco
Hi,
I have a rquirement to upload material master data into sap for Plant 1251.(For plant 1251 we need to upload both Basi veiw and Extended View).
I am getting the following error while calling this BAPI.Field MATNR has been transferred inconsistently or is blank
the errror is :Field MATNR has been transferred inconsistently or is blank.
I have written the below logic in the program to upload material master data into SAP.
Please help me out to resolve this issue.
Thanks in advance.
Program logic which i have wriiten in the program is
LOOP AT it_rpt.
CLEAR lwa_return.
v_tabix = sy-tabix.
IF ( it_rpt-werks EQ p_werks AND
it_rpt-matnr IS INITIAL ).
retrieve internal number
PERFORM get_internal_number USING lc_mtart
lc_mbrsh
CHANGING it_rpt-matnr.
ENDIF.
IF NOT it_rpt-matnr IS INITIAL.
PERFORM convert_field_input CHANGING it_rpt-matnr.
ENDIF.
Header data
CLEAR lwa_headdata.
lwa_headdata-material = it_rpt-matnr.
lwa_headdata-ind_sector = lc_mbrsh.
lwa_headdata-matl_type = lc_mtart.
lwa_headdata-basic_view = 'X'.
IF NOT it_rpt-vkorg IS INITIAL.
lwa_headdata-sales_view = 'X'.
ENDIF.
lwa_headdata-purchase_view = 'X'.
lwa_headdata-mrp_view = 'X'.
lwa_headdata-storage_view = 'X'.
lwa_headdata-forecast_view = 'X'.
lwa_headdata-work_sched_view = 'X'.
lwa_headdata-account_view = 'X'.
lwa_headdata-cost_view = 'X'.
*Client data
CLEAR: lwa_clientdata, lwa_clientdatax.
IF it_rpt-werks EQ c_1251.
lwa_clientdata-matl_group = it_rpt-matkl.
lwa_clientdata-old_mat_no = it_rpt-bismt.
lwa_clientdata-base_uom = it_rpt-meins.
lwa_clientdata-manu_mat = it_rpt-mfrpn.
lwa_clientdata-mfr_no = it_rpt-mfrnr.
ENDIF.
lwa_clientdata-division = it_rpt-spart.
lwa_clientdata-unit_of_wt = lc_gewei.
lwa_clientdata-trans_grp = lc_tragr.
IF it_rpt-werks EQ c_1251.
lwa_clientdatax-matl_group = 'X'.
lwa_clientdatax-old_mat_no = 'X'.
lwa_clientdatax-base_uom = 'X'.
lwa_clientdatax-manu_mat = 'X'.
lwa_clientdatax-mfr_no = 'X'.
ENDIF.
lwa_clientdatax-unit_of_wt = 'X'.
lwa_clientdatax-trans_grp = 'X'.
lwa_clientdatax-division = 'X'.
Material Description
IF it_rpt-werks EQ c_1251.
lt_matdesc-langu = sy-langu.
lt_matdesc-matl_desc = it_rpt-maktx.
APPEND lt_matdesc.
ENDIF.
*Plant data
CLEAR lwa_plantdata.
lwa_plantdata-plant = it_rpt-werks.
lwa_plantdata-availcheck = lc_mtvfp.
lwa_plantdata-mrp_type = lc_dismm.
lwa_plantdata-mrp_group = lc_disgr.
lwa_plantdata-auto_p_ord = 'X'.
lwa_plantdata-proc_type = 'F'.
IF it_rpt-werks EQ c_1251.
it_rpt-prctr = lc_prctr. "1252
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-prctr = lc_prctr1. "1262
ENDIF.
lwa_plantdata-profit_ctr = it_rpt-prctr.
lwa_plantdata-period_ind = lc_perkz.
lwa_plantdata-max_stock = it_rpt-stawn.
lwa_plantdata-countryori = it_rpt-herkl.
lwa_plantdata-sloc_exprc = it_rpt-lgfsb.
CLEAR lwa_plantdatax.
lwa_plantdatax-plant = it_rpt-werks.
lwa_plantdatax-availcheck = 'X'.
lwa_plantdatax-mrp_type = 'X'.
lwa_plantdatax-mrp_group = 'X'.
lwa_plantdatax-auto_p_ord = 'X'.
lwa_plantdatax-proc_type = 'X'.
lwa_plantdatax-profit_ctr = 'X'.
lwa_plantdata-period_ind = 'X'.
lwa_plantdatax-max_stock = 'X'.
lwa_plantdatax-countryori = 'X'.
lwa_plantdatax-sloc_exprc = 'X'.
*Valuation data
CLEAR lwa_valuationdata.
lwa_valuationdata-val_area = it_rpt-werks.
lwa_valuationdata-price_ctrl = lc_vprsv.
lwa_valuationdata-price_unit = lc_peinh.
lwa_valuationdata-val_class = it_rpt-bklas.
CLEAR lwa_valuationdatax.
lwa_valuationdatax-val_area = it_rpt-werks.
lwa_valuationdatax-price_ctrl = 'X'.
lwa_valuationdatax-price_unit = 'X'.
lwa_valuationdatax-val_class = 'X'.
*Storage location
CLEAR lwa_storagelocation.
lwa_storagelocation-plant = it_rpt-werks.
lwa_storagelocation-stge_loc = it_rpt-lgort.
CLEAR lwa_storagelocationx.
lwa_storagelocationx-plant = it_rpt-werks.
lwa_storagelocationx-stge_loc = it_rpt-lgort.
*Tax Classifications
IF it_rpt-werks EQ c_1251.
it_rpt-tatyp = lc_tatyp. "u2018MWSTu2019
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-tatyp = lc_tatyp1. "u2018UTXJu2019
ENDIF.
lt_taxclass-tax_type_1 = it_rpt-tatyp.
lt_taxclass-taxclass_1 = lc_taxkm.
lt_taxclass-tax_ind = lc_taxim.
APPEND lt_taxclass.
*Sales data
CLEAR: lwa_salesdata, lwa_salesdatax.
IF it_rpt-werks EQ c_1251.
it_rpt-vkorg = lc_vkorg.
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-vkorg = lc_vkorg1.
ENDIF.
lwa_salesdata-sales_org = it_rpt-vkorg.
lwa_salesdata-distr_chan = lc_vtweg.
lwa_salesdata-cash_disc = lc_sktof.
lwa_salesdata-item_cat = lc_mtpos.
lwa_salesdatax-sales_org = it_rpt-vkorg.
lwa_salesdatax-distr_chan = lc_vtweg.
lwa_salesdatax-cash_disc = 'X'.
lwa_salesdatax-item_cat = 'X'.
*Forecast parameters
CLEAR: lwa_forecast, lwa_forecastx.
lwa_forecast-plant = it_rpt-werks.
lwa_forecast-fore_model = lc_prmod.
lwa_forecast-fore_pds = lc_anzpr.
lwa_forecast-hist_vals = lc_peran.
lwa_forecastx-plant = it_rpt-werks.
lwa_forecastx-fore_model = 'X'.
lwa_forecastx-fore_pds = 'X'.
lwa_forecastx-hist_vals = 'X'.
Purchasing long text
IF it_rpt-werks EQ c_1251.
IF it_rpt-tdline1 <> ' '.
lv_tdobject = 'MATERIAL'.
lv_tdid = 'BEST'.
lv_tdname = it_rpt-matnr.
PERFORM fill_longtext TABLES lt_longtext
USING lv_tdobject
lv_tdname
lv_tdid
sy-langu
it_rpt-tdline1.
ENDIF.
Basic long text
IF it_rpt-tdline2 <> ' '.
lv_tdobject = 'MATERIAL'.
lv_tdid = 'GRUN'.
lv_tdname = it_rpt-matnr.
PERFORM fill_longtext TABLES lt_longtext
USING lv_tdobject
lv_tdname
lv_tdid
sy-langu
it_rpt-tdline2.
ENDIF.
*Units of measure
CLEAR : lt_uom,lt_uomx.
lt_uom-alt_unit = it_rpt-meins.
lt_uom-alt_unit_iso = it_rpt-meins.
lt_uom-unit_of_wt = it_rpt-gewei.
APPEND lt_uom.
lt_uomx-alt_unit = it_rpt-meins.
lt_uomx-alt_unit_iso = it_rpt-meins.
lt_uomx-unit_of_wt = 'X'.
APPEND lt_uomx.
ENDIF.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = lwa_headdata
clientdata = lwa_clientdata
clientdatax = lwa_clientdatax
plantdata = lwa_plantdata
plantdatax = lwa_plantdatax
forecastparameters = lwa_forecast
forecastparametersx = lwa_forecastx
storagelocationdata = lwa_storagelocation
storagelocationdatax = lwa_storagelocationx
valuationdata = lwa_valuationdata
valuationdatax = lwa_valuationdatax
salesdata = lwa_salesdata
salesdatax = lwa_salesdatax
IMPORTING
return = lwa_return
TABLES
materialdescription = lt_matdesc
unitsofmeasure = lt_uom
unitsofmeasurex = lt_uomx
materiallongtext = lt_longtext
taxclassifications = lt_taxclass
returnmessages = it_messages.
Regards,
ReddyCan you check with below code .
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = it_rpt-matnr
IMPORTING
OUTPUT = it_rpt-matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Move it_rpt-matnr to lwa_headdata-material .
Regard's
Smruti -
How to unlock sales order number after changing its line item statuses.
hi all,
my requirement is i am changing the status of the double
clicked sales order which is showing in ALV grid display
before that i am locking that sales order using FM
CALL FUNCTION 'ENQUEUE_EVVBAKE' and for
changing the status i am using FM
CALL FUNCTION 'STATUS_CHANGE_EXTERN'
which doesnt have commit statement inside this FM so
i have explictly written this commit statement if this FM
gives SY-SUBRC = 0 but with this statement it unlock my
sales order because of the commit functionality.
also this FM is in loop for all line items for that sales order
please help me with that!!!!Hi,
I have created delivery against sales order.
While picking (during delivery PGI), I selected two batches to suffice the delivery qty. Please refer the example quoted below.
Sales order (SO1) - Material (Mat1) - qty (15 ea)
Delivery against sales order (Del1) - batch split: batch1 - 10 ea
batch2 - 5 ea
In table LIPS: when I enter delivery number as "Del1" and execute, I get 2 records:
del no. Item No. Material Qty Batch no Sales Order no Sales Order Item no
1. DEL1 10 Mat1 10 ea batch1 SO1 10
2. DEL1 20 Mat1 5 ea batch2 ______ ____
Thus in the 2nd record, the Sales order no.(LIPS-VGBEL) and sales order item no. (LIPS-VGPOS) does not get updated.
I have to develop a report to display the Sales Order number and sales order line item number for each batch of the Delivery for the same item number. Please guide me to know how I can get the same.
Hope this clarifies the issue faced.
Regards,
Ankush -
Message No V 0102 (Sales Order Error During Saving)
We are using SAP ECC 6 version and the client is related to Beverage Industry.
Problem:
The scenario is this that we created a Sales Order. In the Sales Order we have entered let say 20 items and the item have sub item as well. We are using BOM usage 5. Once the order is confirmed the user creates the Delivery Order but doesnt Post the Good Issue.
Now the requirement is that the user wants to change and delete some item in sales order.
For this first we amend the delivery order and then we change the sales order according the amendments made in Delivery Order.
In this scenario we also want to completely delete the Main item but as its default that the Bom item will be deleted with the main but we want to enter the sub item again in the order because its the process requirement.
Now when I make all the necessary changes in Delivery Order and Sales Order Respectively System saves the Delivery order with the changes values but gives an error message after Saving the Sales Order and doesnt update the Sales Order as well
Attached are the Screen Shot of Sales Order Error Screen.
Note: This Error comes randomlyRefer OSS 740280
-
URGENT: Error while creating a BAPI
Hi all !!
I am facing the below mentioned error while creating a BAPI , to be more specific , the error comes when i try adding a new method by using
Utilities > API method > add a method
on after adding a function modile name in there, when i click on the tick mark..
It shows an error as in :
BAPI &1 : BAPI function module &2 has no return parameter
Please help in resolving the same !!
Thanks & Regards
Gaurav Verma
Edited by: Gaurav Verma on Feb 13, 2008 11:52 AMHi,
cehck the below link how to create a bapi and add as method..
http://www.sapdev.co.uk/java/jco/bapi_jco.pdf
Regards,
Nagaraj
Maybe you are looking for
-
My ipod touch 4g keeps telling me that I have too many photos and videos and will not let me download apps. I have deleted all the photos and videos and some of my old apps but it keeps telling me the same message. I have tried to sync it with the
-
How to read messages in message pool from a java file
Hi All, I want to read a message that is defined in a message pool of a webdynpro component. This reading should be done from a java file present in the "src" folder. How can I get the handle to the IWDComponent? Or is there any other way? Or is ther
-
Error message when trying to share iCal via iCloud
I am trying to share my iCal via iCloud. When I type in addresses and hit the share button, I get an "error 400" message. Any ideas on a fix?
-
What is the expected behavior of IDM, if crashes during Workflow processing
hi, We have a Task to nightly export of all the IDM users. We noticed that if the server dies halfway through the process, the Task is not picked off from where it left. How do we deal with such situations. We wanted it to restart the export process
-
Account Determination Error When Posting Goods Issue Against Sales Order
Hello SAP Experts, We are currently experiencing a problem during goods issueance against sales order (VL02N). The system terminates the issueance and gives error: "Account XXXXXX requires an assignment to a CO object". We have tried maintaining the