Adding item data in Product tab for sales contract (crm_order_maintain)
Hi, can I use crm_order_maintain to add line items under the product tab for a sales contract while creating or modifying an order. Is there any sample code to add the line items, I could look at. I tried calling this FM from my custom tab and then called CRM_ORDER_SAVE but that did not add the line item. I guess I need to call it from the order_save badi and then call the crm_order_save FM as well from within the BADI. If someone could send me some sample code then I can double check if I am missing something.Am I on the right track to be using this FM for adding a line item under the product tab for the sales contract? Please help. thanks
Hi, I've encountered the same problem while I was creating a Sub-Contract from a Master Contract.
In my case the solution was:
first create the Sub-Contract,
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CHANGING
ct_orderadm_h = i_ctorderadm_h
ct_input_fields = i_ctinput_fields
ct_doc_flow = i_ctdoc_flow
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE i_ctorderadm_h INTO wa_ctorderadm_h INDEX 1.
APPEND wa_ctorderadm_h-guid TO i_objects_to_save.
in wa_ctorderadm_h-guid now we have the guid of the newly created Sub-Contract.
SELECT SINGLE it_type_to
INTO v_it_type_to " --> target item type
FROM crmc_it_copy_ma
WHERE it_type_from = wa_out_orderadm_i-itm_type.
Prepare tables
wa_ctorderadm_i-header =
wa_out_orderadm_i-header. "Retrieved from CRM_ORDER_READ
wa_ctorderadm_i-handle = '0000000001'.
wa_ctorderadm_i-number_int = '0000000001'.
wa_ctorderadm_i-product = wa_out_orderadm_i-product.
wa_ctorderadm_i-ordered_prod =
wa_out_orderadm_i-ordered_prod.
wa_ctorderadm_i-description = wa_out_orderadm_i-description.
wa_ctorderadm_i-itm_type = v_it_type_to.
wa_ctorderadm_i-order_date = sy-datum.
wa_ctorderadm_i-itm_language = sy-langu.
wa_ctorderadm_i-mode = c_a. "c_a = 'A'
wa_ctorderadm_i-header = wa_ctorderadm_h-guid.
APPEND wa_ctorderadm_i TO i_ctorderadm_i.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-objectname = 'ORDERADM_I'.
REFRESH i_input_field_names.
wa_input_field_names-fieldname = 'DESCRIPTION'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'HEADER'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'ITM_TYPE'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'MODE'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'NUMBER_INT'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'ORDERED_PROD'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'ORDER_DATE'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_field_names-fieldname = 'PRODUCT'.
APPEND wa_input_field_names TO i_input_field_names.
wa_input_fields-field_names = i_input_field_names.
APPEND wa_input_fields TO i_ctinput_fields.
After that I've called function 'CRM_ORDER_MAINTAIN', to copy the Items from the Master Contract.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_sales = i_sales
it_schedlin_i = i_schedlin_i
CHANGING
ct_orderadm_i = i_ctorderadm_i
ct_input_fields = i_ctinput_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
Maybe if you're not working with Contracts, the procedure is not properly correct.
I suggest to put a break-point into crm_order_maintain and try to add the Item manually.
If you reproduce exactly the standard, I'm shure it will work.
Lorenzo
Similar Messages
-
PO - Item Data - Delivery Schedule Tab - Delivered qty, issued qty, GR qty
Hi Frens,
In a Purchase Order, under Item data < delivery schedule tab, we have delivered quantity, issued quantity and GR quantity fields.
Is there any TABLE to find out these quantities against PO.
Thanks and Regards,
CK Vikas>
CK Vikas wrote:
> Hi Raj, You mean EKBE?
Yes EKBE is the right table for your requirement. -
i have an app update on my phone through the app store, but i dont have that app and when i hit update it says the item is no longer available for sale,, but i cannot get rid of the little 1 at the corner of the app store app,, how can i get rid of it,, i have iphone 5
You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
Important: The app you need to remove is not necessarily the one named in the App Store notice. For example, if the App Store says you need to update "Twitter," the hacked app may be "Angry Birds" or something else entirely. Don't make any assumptions about which app you're looking for. To find it, you have to carry out a systematic search.
Triple-click anywhere in the line of text below on this page to select it:
kMDItemAppStoreHasReceipt=1
Copy the selected text to the Clipboard (command-C).
In the Finder, press the key combination command-F to open a search window, or select
File ▹ Find
from the menu bar. In the search window, select
Search: This Mac
from the row of tokens below the toolbar. Below that is a popup menu initially showing Kind. From that menu, select Other...
A sheet will drop down. In that sheet, select Raw Query and click OK or press return.
Now there will be a text box to the right of popup menu. Click in that box and paste (command-V).
The search window will show all the App Store products you've installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
At least one of the items listed in the search window is not among your purchases in the App Store. Move each such item to the Trash. You may be prompted for your administrator password. Empty the Trash.
Log out and log back in. Test. -
Product valuation for Sales order with itemizations
Hi experts,
I'm trying to find a data source which extracts Product valuation for sales order, and which is important, with itemizations. This is for the KMAT material. I tried 0CO_ACT_* and 0CO_PC_PCP_* but found no proper one.
The closest one is 0CO_PC_PCP_03 but which only extracts normal material instead of KMAT.
Points will awarded.
B'R
AaronI found it.
0CO_PC_01
Cost Object Controlling: Plan/Actual Data -
NEED BAPI FOR SALES CONTRACT CREATION AND EXTRACTION FOR Trans- PA41& PA43
Hi All,
I need the BAPI for T-code PA41 and PA43 for sales contract.
i would like to extract all the contract details for Contract data contains Table VEDA. And need to create contract.
Any body please help me out...
Please give me code if any one have how to do mapping ..
Thank you,
Vishnu.Hi Vichu,
Please search on SCN.
Regards
Abhii -
Partner function for sales contract
Hi
I have to extract Sales related data from SAP R/3 to BW.
Facing issue if someone just changes partner function for Sales contract as they are not captured in any of the standard extractors.
If there is change in partner function for Sales order then it gets captured in 11 vascl but if its for contract then it doesnt get capture.
Any solution ?
Regards,
monikaHi ! Ivy
I guess there is a option.
Try this out. Use the menu path IMG> Sales & Distribution> Sales> Lists> Set updating of partner index
In the resulting screen, click on 'New Entries' make entries 0 - for sales orders and 4 - for contracts as transaction group. Under the column 'partner function' ener the partner function for which you want the report and save your entries.
Now when you go for executing your report, click on the push button 'Partner functions' ( Say in VA05) , you will have the option for selecting the new partner functions , select and execute your report.
Provide your feedback.
Regards,
PATHIK -
Hello,
I need to know if we have any standard LSMW for sales contract(Transaction VA41).
Also I can see if 0090(Sales documents) - standard method suits for this requirement ? But I could not see the WBS element field inside this structures.
Please let me know if we can use standard or Recording has to be done ?
Thanks
SenthilHi Suraj,
using transaction SO13: create Contract VA41.
with regards,
Mamta Kumari -
Using BAPIs for sales contracts
Hi,
I'm having this situation that I have to upload sales contracts into SAP from flat files. We planned to use BAPIs for this purpose. Is it a good option. Can anyone suggest better ideas. If BAPI is a good option, has anyone used standard BAPIs for sales contracts updation in SAP System. If yes, can you guide me through the process.Hi,
You can start off with a program with:
Get the filename of the convert file
IMPORT /SAPDMC/LSMEMORY FROM MEMORY ID '/SAPDMC/LSMW'.
V_PROJECT = /SAPDMC/LSMEMORY-PROJECT. " Project
V_SUBPROJ = /SAPDMC/LSMEMORY-SUBPROJ. " Subproject
V_OBJECT = /SAPDMC/LSMEMORY-OBJECT. " Object
IF V_PROJECT IS INITIAL.
V_PROJECT = 'XXXX_LOC'.
ENDIF.
IF V_SUBPROJ IS INITIAL.
V_SUBPROJ = 'SD'.
ENDIF.
IF V_OBJECT IS INITIAL.
V_OBJECT = 'XXXX_VA41'.
ENDIF.
Function will return path of converted file by LSMW object
CALL FUNCTION '/SAPDMC/LSM_FILE_INFO_GET'
EXPORTING
PROJECT = V_PROJECT " /sapdmc/lsmemory-project
SUBPROJ = V_SUBPROJ " /sapdmc/lsmemory-subproj
OBJECT = V_OBJECT " /sapdmc/lsmemory-object
X_ONLY_USED_FILES = 'X'
IMPORTING
FILE_CONV = V_DSNAME " Path of converted file
EXCEPTIONS
NO_SUCH_OBJECT = 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.
I am not much of an LSMW expert so wont be able to comment much.
regards
Aveek -
How to supress tab for Sales Order item (VA01)
Hi,
Please suggest the ways to suppress tab (example "Country") which appears at Sales Order item for some countries.
Thanks,
Edited by: Dipesh Kothari on Oct 6, 2009 8:34 PMHi
If you want to suppress the tab which is appearing at sales order line item then using t.code SHD0 and give the t.code VA01 and business object as BUS2032 and then select the line item data and then you can suppress the fields as per your requirement
Kindly let us know why you want to suppress the fields ?
Regards
Srinath -
Add new tab for sales transaction
Hi,
I want to add a new tab in sales transaction for bank detail, the data of this tab should be get from BP master data, and save to crmd_order transaction table.
what method should I implement?
thanks
GangHi Gang,
Use EEWB to enhance the order. The fields shall be added to CRMD_CUSTOMER_H table.
<a href="http://help.sap.com/saphelp_crm50/helpdata/en/43/04bede807721ece10000000a155369/frameset.htm">EEWB</a>
for populating these fields based on BP master data, use BADI COM_PARTNER_BADI method COM_PARTNER_MERGE.
This BADI gets called when you enter partners (sold-to-party). In the mentioned badi method, read bank details from BP master and set this to your Z-fiedlss using FM CRM_CUSTOMER_H_MAINTAIN_OW.
Hope this helps.
Regards
Kaushal -
Production order for sales order
Hello friends
I need information about if there is a way limiting the created production orders for a sales order.
Let me explain what my problem is:
For a sales order item with quantity 100, I can create unlimited production order with higher quantities and this cause problems.
Users may create unnecessary production orders and this caused reproduction of an order item.
In standart, is/are there any customizings/configurations (and how I can active this/these control(s)) or user exits to control which sales order item is converted to production order?
Thanks in advance.Nurullah,
Users do not convert Sales orders into Production orders. They may convert planned orders into production orders. They may also create Production orders outright.
Anyhow, your requirement can obviously be met ONLY in an MTO environment. There is an enhancement PPCO0001 which can probably be tortured into meeting your requirement.
In most companies, planners are made responsible for properly planning their products. Most planners I know routinely review MD06 to see if there are any production orders that should be cancelled/deleted.
Rgds,
DB49 -
Planned material price in case of production order for sales order (MTO)
Hi,
In case of production orders created for sales order, the planned price for a component (BOM) material gets picked as per following:-
1. If there is no entry in EBEW for the component (that is, there is no previous GR for the component) for that sales order, then plan price is picked up on the basis of planned costing variant.
2. In case there is an entry for the component in EBEW (there has been a previous GR for the component with reference to the sale order) then the plan price for the component is taken from the EBEW table (first GR price) and system ignores the costing variant.
The above is as per my observation. Please validate if this is correct or not.
The requirement is that even if there has been a previous GR for the component (there is an existing entry in EBEW) the system should take the plan price on the basis of costing variant and not from the EBEW table.
How can this be achieved? Is there a user exit that can force the system to read the costing variant before looking into the EBEW table?
BR
AbhiHi Ajay,
Yes i had considered it but I'm not sure If it will help.
Because the main problem here is that system is ignoring the costing variant itself and instead picking the price from EBEW table. So changing the costing variant (validation variant) may not help.
Moreover i don't want to valuate with my own strategy. I want the plan price to be equal to standard price of material from material master. Basically MBEW instead of EBEW.
Any clues?
BR
Abhi -
Inspection lot with stock tab for sale return from customer.
Dear,
In our organization there are two scenarios,
1) Make to order- Strategy group -20
2) Make to stock- Strategy group -10
I have maintained 05 inspection types in QM view for sale return inspection from customer.
1) In make to order scenario Inspection lot created with inspection stock tab which is OK.
2) But in make stock scenario no inspection lot is generated.
Remember I donu2019t want inspection lot without inspection stock tab as per insp. type-06
So please suggest me, what can I do for getting inspection lot with stock tab for make to stock scenario.
Regards
Shabbir KureshiHi
QCC0>Quality inspection>Inspection lot creation>Inspection for shipping>Assign Inspection Lot Origin to Delivery Type-->aganist delivery type Enter 05 inspection lot origine
Also in OMJJ check whether QM in active for mnt type 651
Regards
Sujit -
Production order for sales order - wrong plant
this was accidental and is there a way to prevent?
sales order 123 exists for plant 100
someone in plant 200 created a legitmate RWMO (rework) production order for plant 200, but entered sales order 123. he only needed the production order in 200 for various parts not related to sales order 123 or plant 100.
is there a way to prevent this from happening?
sales order plant and production order plant should always match.yes, but telling people to follow directions does not prevent typos/mistakes.
i'll try to make it clearer. is there an authorization object to prevent someone in plant 200 sales org 2000 from creating a PrdOrd for their plant (200) with a sales order that is for sales org 1000? plant 200 prdords should only be for sales org 2000 sales orders. this would be the true way to avoid the mistake. -
Multiple production orders for sales order line item
hello Guru's
In our case Requirements are created in 2 ways
Case 1:
1) Sales Orders are created at Plant level with schedule line category CP
2) Sales Orders are created at Depot level
In the above mentioned 2 cases the requirements are taken as inputs and the process is carried at plant level
Step 1: Automated MDO3.
Sales Orders are created if there is short fall of the Quantity at the Depot and Plant Sales Orders are raised against the plant for which the requirements are generated and MRP run is carried out at Single Item single level.
Step 2:
For the results of the step1 are then transferred and Production orders are created for the planned Orders.
The issues is whenever there is change in confirmed quantity or change in confirmed date the requirements are considered again as inputs and the multiple production orders are getting generated for the single requirement
Actually we dont want this to have multiple production orders
regardsHi,
Can you let us know the strategy group used for this material ? If i understood the query correctly, each time there is a change in the sales order (i.e. increase in qty), there is a triggering of new planned orders to meet that demand.
Regards,
Vivek
Maybe you are looking for
-
How do I get google talk to accept my password when using imessage?
I have both a MacBook Air and Pro using iOS X - Maverick. For the longest I have not been able to use iMessage with Google Talk. I need to be on Google Talk for work and decided to set it up. I set it up, but when I shut it down and then re-open i
-
Is it possible to input itunes into DVI/HDCP input from imac with Apple mini display port? Or is there another way?
-
Image Capture sends error message when importing photos from my camera
I tried to import photos from my Fuji FinePix JX600 using Iphoto. Received an error notice and was unable to import. Tried Image Capture and it imported 220 of 407 pictures and then sent an error notice. Very frustrated. It's a new camera and I never
-
Why is no upgrade to 76mb available for me?
Hi Surely if the upgrade to BT's network is software, there should be some level of increase over my current 22mb on option 2. Even if it's only a few meg? When I run the checker I get: "As a BT Infinity customer you are already getting the best spee
-
Any idea why my macbook pro won't allow me to save anything?
I have plenty of free space- when I click 'Save As' in Illustrator the save window pops up but then disappears again in a second before I am able to save it. The same thing is also happening in Safari browser. Very odd as it has only just started doi