Create item hierarchies
I want to create item hierarchies
Example :
I have 3 folders
-JOBS(id,job_title,hour)
-SEX(id,id_sex_job,code_sex)
-STAT(id,id_stat_jobs,code_stat)
JOBS and SEX are joined (JOBS.id = SEX.id_sex_job)
JOBS and STAT are joined (JOBS.id = STAT.id_age_job)
But SEX and STAT are not joined.
I want to create this hierarchie
JOBS.jobtitle__SEX.code_sex__STAT.code_stat.
I have tried but i obtaint an error message which say me the join not find.
Although the joins you have mentioned below look fine as you could write a query and get your results. However for what you are doing, Discoverer expects a join between Sex and Stat tables. It would not have any way to create a parent child relation ship between SEX and STAT because there is no join.
One suggestion is that you create a Custom folder which a denormalized view of all the three tables, so all the columns of the 3 tables are in one folder and then you could just create a hierarchy based on that folder.
Regards
Manav
Similar Messages
-
Discoverer creating workbook with item hierarchies that I don't want.
In Discoverer PLUS 10g (OracleBI Discoverer version 10.1.2.55.26):
I create a worbook, but when I drag item, they bring item hierarchies, but I didn't create item hierarchies.
It seems when I drag all the items for the business area it's fine, but when I drag out a item, all others items are items hierarchies after that. Next I drag the last item, afters that, all items are normal, they are not item hierarchies.
In DiscovererADMIN, we did not created item hierachies who could bring itemhierachies in a worbook.
This problem is present one spécific database, I tested the problem in a other database but didn't appear.
Do you know whats happening?
Thank youHI Rod,
My problem is that we don't have any hierarchies set up in the EUL and we see item hierarchy in workbook, it's impossible because we did create hierarchies.
I created a workbook with a Bussiness Area named person, for example. This Bussiness Area got a total of 10 items and the datatype of each item is different, we have number, varchar2 and date. When I drag all the 10 items in the worksheet, the items are not hierachies, but when I drag out a item, all the others items are hierarchies, suddenly. And when I put back the last item, all the items are not hierarchies. I already said that we didn't create hierachies for that Bussiness Area or any others Busness area in the EUL.
We don't know how we can have items hierachy in a workbook when we didn't create them in the EUL.
I hope you will understand more what I try to explain.
Thanks for your time.
Edited by: JayM on 2012-10-31 09:38
Edited by: JayM on 2012-10-31 09:40 -
Hi,
I am using Discover3.1 for the 1st time.
I have created the joins accross the tables...
Now i want to create item hierarchies.
Pl. advice me what is the criteria for this. Like how shd i decide to create a hierarchy for each item. What kind of strategy shd i look for.
thnx in advance.Others might disagree with me, but the way Discoverer currently works (3i and 3.1.42), the best thing to do is to create a separate Business Area which contains complex folders for your Hierarchies.
The reason for doing this is that if you have multiple joins against a folder with a Hierarchy, that Hierarchy is available to all of those joins. Sometimes, this is not appropriate. For Instance, if your query is intended to only drill through Material Transactions but joins exist that connect your Material Transaction folder to Material Demand and the Material Demand also has a Hierarchy, both Hierarchies are accessible in your query. Sometimes this may be appropriate, many times it is not.
The Complex Folders avoid this as long as the Complex Folder is never joined to other Folders with Hierarchies. The Complex Folders allow you to use all of the joins you have created, so there is no extra work there. The only extra work is in creating the Complex Folders. As you work with your user's, you find that the vast majority of queries really don't need drill capability. -
Material Item Hierarchies in SRM 7.0
Dear Experts,
we are on PPS 3.0, SRM 7.0, Extended Classic scenario and using the MM-SUS scenario for sending POs from SRM to SUS via ECC and PI.
The issue we are facing is the message mapping errors in PI, when the PO from SRM contains a material item hierarchy with free text subline items that do not have quantity, price or delivery date defined.
A free text item does not have any information defined, but XI expects the fields like quantity, Price, delivery date etc and hence the error.
The process flow is an item hierachy PO is created in SRM, replicated to ECC successfully and a Idoc is sent successfully to PI. The failure occurs in PI on its way to SUS.
Did any one face this issue with free text subline items in Item hierarchies and what is the resolution.
Thanks in advance,
ScottHI
This speaks about the status of the Cart. This means that the Status of the Cart is AWAITING APPROVAL...I dont know which document you have gone through but procedure for adding a Custom Field in SRM 7.0 is:
1. Create a Custom field in the Database in SRM. Preferrably add the field in an include and extend thta include to the table in SE11.
2. Go to Portal Login of SRM and right click the part of the screen where you want to add the custom field. Click on More Field Help. The popup will give you the name of WebDynpro Applicaiton which controls that area.
3. Login to SRM via GUI and display the webdynpro application using SE80. Enhance the Webdynpro application.
4. Add the custom field to the Context of the WebDynpro Application View. You will be selecting the field from the database table while adding the custom field to the context
5. Add the field at the specified place in Layout Tab of the WebDynpro View,
6. Create a binding between the Layout Field and the Context
7. Activate the changes.... you will see the field in Portal login of SRM....
For more details , refer to the Webdynpro help of the application...
Regards
Virender Singh -
Hi,
I'm using forms6i.
Is it possible create an item at runtime??
If Yes, please guide me to create a Hierarchical Tree at runtime...
ThanksHi Divya,
My requirement is something like this.
I have a hierarchical tree with some nodes.
When i click any of the nodes , then the some query will be executed based on the selected node and those details i need to display again as a tree.You can display those details as child nodes under the selected node, or when this node is selected populate another tree with the details as per your requirements.
Similarly from that second tree if i again select a node, another tree should appear. The trees should be created based on whether the query(based on the selected node) returns some result.Again similar to the above, under the selected nodes display the details as child nodes for the selected node or create one more tree and populte the details
What I think is when one tree can handle all the sub nodes for each tree then why is the need for so many trees?
If its your requirement to display nodes separately you can clear the same tree and populate the tree again depending upon the nodes selected.
Additionally you can have buttons to move back to move to previous nodes of tree. You will need to store the selected node values so that you can populate the child nodes properly if required.
Best Regards
Arif Khadas -
Creating a Hierarchical Tree in Forma 6i
Hi Gurus,
We are using forms 6i and oracle 9i. In oracle forms i have one control block and another control block. When we click on one column repname ,the other control block displays the
corresponding info for the sales rep name. eg. Lets say i pick John the salesrep in the other
control block it displays its code,geography region etc.
I want to create a hierarchical tree in the other block where it is displaying the salesrep info.
So i want when i click on the sales rep name(the other control block measure)
then it should the code,geography region etc in the form of hierarchical tree in the other control
block. If the sales rep name is not clicked then the control block having the salesrep info should be hidden.
I would appreciate your help.
Thanks,
PSOplace your treeitem in the layout. The treeitem has to the only item in the block and property "Single record" has to be true.
To populate your tree with data you can either
- use a query to populate a treeitem have a look at this thread Tree Menu
- use the Ftree.Add_Tree_Node built-in and program your own logic. -
The item Hierarchical Context Menu does not support pre-calculation
Hello,
Trying to download pre-calculated web templates via RepAgent, using the Hierarchical Context Menu feature within the template (populated via control query with Hierarchy) the system returned the following message upon file download:
"The item Hierarchical Context Menu does not support pre-calculation"
As a result the Hierarchical Context Menu is not displayed on the downloaded html-files. Navigation not possible.
Could not find any constraints documented in the online help, at this point.
Question: is there something missing on our setup or is this really out of scope for precalculation with navigation?
Any other experiences on that or shall we open OSS-message?
Best regards,
Markus
(We are on BW3.1)Hi,
we have the same problem. Does anybody have any hint or workaround? Is there a solution for this in 3.5 or any upcoming version.
Any input is appreciated.
Thanks,
Stefan -
Workflow does not start automatically on create item (yet another time)
The topic has been discussed broadly throughout different forums, but I didn't find the solution to my issue yet and hope you can help me out with ideas to sidestep the difficulties created by Microsoft.
I have one list 1 in Site Collection A, and one list 2 in Site Collection B (PWA site collection). I need to copy an item from list 1 to list 2 with some values. I use a "Call http web service" action to accomplish
that as I need to copy informatin cross site collections.
The "Call webservice" is in an App Step, because the user creating an item in list 1 does not have permissions on list 2. Thus, my item is created "by workflow" (not "by System Account") in list 2. Now I need a second
workflow to start on list 2 which will create a project in Project Server.
As I am working across 2 site collections, I can not use a SharePoint 2010 workflow with impersonation step for list 1 as the "Call a webservice" action is not available for SP2010 workflows and "Copy item" only works in the same site.
In Nintex I can impersonate the web service call - is this also somehow possible for SPD2013 workflows? Or is there any other possibility to get over this silly restriction of workflows not starting automatically on System account created items? Someway
perhaps to tweak the App Step in impersonating with another user account?
Any help appreciated!
I really can't understand, that this common requirement is still not solved by Microsoft :-( I found more threads on the topic than I can count, so this seems to happen quite often... at least they should finally offer a proper way of doing some kind
of impersonation with the calls so we have a chance to change the creating user account.Hi,
As I understand, you would like to use workflow to copy list items cross site collection.
So far it is not supported with OOB workflow option, here is an codeplex workaround:
https://spdactivities.codeplex.com/wikipage?title=Copy%20List%20Item%20Extended%20Activity
Please check if it can be help.
Regards,
Rebecca Tu
TechNet Community Support -
This script is not checking the existing of the new created item
Dear Friends
I have This script is not checking the existing of the new created item I am using this script in side WHEN-BUTTON-PRESSED trigger
I am using oracle Forms [32 Bit] Version 6.0.8.11.3 (Production)
My script as the following :
BEGIN
BEGIN
SELECT ITEM_CODE INTO :GLOBAL.DUMMY
FROM IM_INVENTORY
WHERE ITEM_CLASS = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.ITEM_CLASS)))
AND ITEM_TYPE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.ITEM_TYPE)))
AND ITEM_LENGTH = :IM_NEW_ITEMS.ITEM_LENGTH
AND ITEM_WIDTH = :IM_NEW_ITEMS.ITEM_WIDTH
AND ITEM_HIGHT1 = :IM_NEW_ITEMS.ITEM_HIGHT1
AND ITEM_HIGHT2 = :IM_NEW_ITEMS.ITEM_HIGHT2
AND COLOR_CODE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.COLOR_CODE)))
AND SHAPE_CODE = TO_NUMBER(RTRIM(LTRIM(:IM_NEW_ITEMS.SHAPE_CODE)));
-- get_err_message(87);
SHOW_MESSAGE('This Item Already Exist !!!');
RAISE FORM_TRIGGER_FAILURE;
EXCEPTION
WHEN NO_DATA_FOUND THEN
show_message('here');
INSERT INTO IM_INVENTORY
(ITEM_CODE,ITEM_NAME_A,ITEM_NAME_E,STOCK_ITEM,ITEM_CLASS,ITEM_TYPE,SUPP_CODE,ITEM_LENGTH,ITEM_WIDTH,
ITEM_HIGHT1,ITEM_HIGHT2,COLOR_CODE,SHAPE_CODE,ITEM_SIZE_TYPE,VOLUME,CON_FACTOR,ITEM_PRICE1,
ITEM_DISCOUNT,MIN_QTY,MAX_QTY,COSTING_METHOD,ITEM_COST,STANDARD_COST,WEIGHT,ITEM_PRICE2,ITEM_PRICE3,
OPENING_COST,LAST_PUR_COST,QTY_FOR_PRICE2,QTY_FOR_PRICE3,ITEM_PRICE_METHOD,USER_ID,USER_DATE)
VALUES(:IM_NEW_ITEMS.ITEM_CODE,:GLOBAL.LOC_VAR_A,:GLOBAL.LOC_VAR_E,'1',:IM_NEW_ITEMS.ITEM_CLASS,:IM_NEW_ITEMS.ITEM_TYPE,'0',
:IM_NEW_ITEMS.ITEM_LENGTH,:IM_NEW_ITEMS.ITEM_WIDTH,:IM_NEW_ITEMS.ITEM_HIGHT1,:IM_NEW_ITEMS.ITEM_HIGHT2,
NVL(:IM_NEW_ITEMS.COLOR_CODE,0),NVL(:IM_NEW_ITEMS.SHAPE_CODE,0),1,NVL(:IM_NEW_ITEMS.VOLUME,0),1,:GLOBAL.ITEM_PRICE1,0.00,0.00,0.00,'1',0.00,0.00,
0.00,:GLOBAL.ITEM_PRICE1,:GLOBAL.ITEM_PRICE1,0.000,0.000,0.000,0.000,1,:IM_NEW_ITEMS.USER_ID,:IM_NEW_ITEMS.USER_DATE);
standard.commit; -- NEW COMMITED
clear_message; -- NEW COMMITED
WHEN FORM_TRIGGER_FAILURE THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
WHEN OTHERS THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
END;
END;
Waiting for your valuable answer .
Best regards
Jamil AlshaibaniHi,
I have written the script also with constants values but still it is not going to
SHOW_MESSAGE('This Item Already Exist !!!');
and the script is written as the following :
BEGIN
SELECT 1 INTO :GLOBAL.DUMMY
FROM IM_INVENTORY
WHERE ITEM_CLASS ='110'
AND ITEM_TYPE ='110105'
AND ITEM_LENGTH = 1
AND ITEM_WIDTH = 1
AND ITEM_HIGHT1 = 1
AND ITEM_HIGHT2 = 0
AND COLOR_CODE = '3001'
AND SHAPE_CODE = '201' ;
SHOW_MESSAGE('1- This Item Already Exist !!!');
RAISE FORM_TRIGGER_FAILURE;
EXCEPTION
WHEN NO_DATA_FOUND THEN
show_message('here');
INSERT INTO IM_INVENTORY
(ITEM_CODE,ITEM_NAME_A,ITEM_NAME_E,STOCK_ITEM,ITEM_CLASS,ITEM_TYPE,SUPP_CODE,ITEM_LENGTH,ITEM_WIDTH,
ITEM_HIGHT1,ITEM_HIGHT2,COLOR_CODE,SHAPE_CODE,ITEM_SIZE_TYPE,VOLUME,CON_FACTOR,ITEM_PRICE1,
ITEM_DISCOUNT,MIN_QTY,MAX_QTY,COSTING_METHOD,ITEM_COST,STANDARD_COST,WEIGHT,ITEM_PRICE2,ITEM_PRICE3,
OPENING_COST,LAST_PUR_COST,QTY_FOR_PRICE2,QTY_FOR_PRICE3,ITEM_PRICE_METHOD,USER_ID,USER_DATE)
VALUES(:IM_NEW_ITEMS.ITEM_CODE,:GLOBAL.LOC_VAR_A,:GLOBAL.LOC_VAR_E,'1',:IM_NEW_ITEMS.ITEM_CLASS,:IM_NEW_ITEMS.ITEM_TYPE,'0',
:IM_NEW_ITEMS.ITEM_LENGTH,:IM_NEW_ITEMS.ITEM_WIDTH,:IM_NEW_ITEMS.ITEM_HIGHT1,:IM_NEW_ITEMS.ITEM_HIGHT2,
NVL(:IM_NEW_ITEMS.COLOR_CODE,0),NVL(:IM_NEW_ITEMS.SHAPE_CODE,0),1,NVL(:IM_NEW_ITEMS.VOLUME,0),1,:GLOBAL.ITEM_PRICE1,0.00,0.00,0.00,'1',0.00,0.00,
0.00,:GLOBAL.ITEM_PRICE1,:GLOBAL.ITEM_PRICE1,0.000,0.000,0.000,0.000,1,:IM_NEW_ITEMS.USER_ID,:IM_NEW_ITEMS.USER_DATE);
standard.commit; -- NEW COMMITED
clear_message; -- NEW COMMITED
WHEN FORM_TRIGGER_FAILURE THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
WHEN OTHERS THEN
SHOW_MESSAGE('Error : '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE ;
END;
Best regards
Jamil -
Question about "Create Item" page
Im working on trying to Insert a new item into a Self-Service Web Applications page.
As part of my research, I have been looking at this doc:
Oracle® Application Framework
Personalization Guide
Release 11i
Part No. B25439-02
From:
http://download.oracle.com/docs/cd/B25516_18/current/acrobat/115fwkpg.pdf
The document does not seem to go into much detail about how to Insert an item on a page. I also checked the "OA Component Reference" document.
I checked the online help via "Create Item Page" - e.g.
http://oursite/pls/PSAT/fndgfm/fnd_help.get/US/FND/CUST_PERSADMIN_CREATEITEM.HTM
Again, that doesn't give a lot of information.
As part of my testing / research, I would like to add a new Item to a page, and have the value of the item to be taken from an existing SQL Query.
For example, in iProcurement, when viewing a Requisition Details, e.g. via this page:
http://oursite/OA_HTML/OA.jsp?page=/oracle/apps/icx/por/reqmgmt/webui/ReqDetailsPG&reqHeaderId={!!BX6R96mkQOcfNZ60BeTaJQ}&retainAM=Y&addBreadCrumb=Y&_ti=245778094&PersonalizationParam=PersonalizationParamAdmin&oapc=12&oas=mYF7zP1VI7xoAWcUQHTEkQ..
I would like to add in the "NOTE_TO_AUTHORIZER" field from the "po.po_requisition_headers_all" table.
From looking at the "About this Page" link, I can see there is a View Object called "oracle.apps.icx.por.reqmgmt.server.ReqHeaderVO".
This ViewObject contains an Attribute called "NoteToAuthorizer" with a Type of "java.lang.String".
When I go to the "Create Item" page, and choose and Item Style of "Message Styled Text" there seems to be no way to say which database field you want to include.
From looking at a previous customisation that a developer did, I can see you can pull in an Attribute via the "View Attribute" field, and link in the VO via the "View Instance" field.
When inserting database values into a Self-Service page, can we only insert Attributes, and not any of the other regular fields from View Objects?
Apologies for the rambling essay.
Any advice much appreciated.
ThanksHi Jimr,
In OAF sql queries are represented by View Objects and columns of query will be represented by View Attribute.
For every column in query there will be corresponding view attribute name, so while adding any item on self service page which represents data from database you need to specify view instance name and view attribute name, which will specify which column and from which query it will show the data.
*"When I go to the "Create Item" page, I can't work out how to tell Oracle that the Item I want to create should be the "NoteToAuthorizer" field from the "ReqHeaderVO" ViewObject."* so ReqHeaderVO1 will be the instance(by default OAF generates instance like this) and "NoteToAuthorizer" can be mentioned in View Attribute name property.
Let me know if you need further clarification.
Regards,
Reetesh Sharma -
How do you create Marketing hierarchies in your company?
Hello,
What procedure you follow to create Marketing plans, elements and campaigns in your company? Is it not painful to create each element manually with so many fields. And this activity usually is repeated every fiscal.
Want to get ideas on the best possible way to create Marketing hierarchies. We are looking for some functionality like upload from Excel . Can somebody comment if this is possible with 7.0?
We received reply from SAP that MS project integration is no more possible with SAP CRM Marketing. So this option is ruled out.
Best Regards,
Shaikhi, in our project, we develop some RFC interface, and when external BPM process finish their workflow, it will call the RFC, then create TP in CRM to execute.
In my opinion, so many content is not suitable to user to input in CRM UI. And the CRM UI is not friendly enough to user.
But to create a TP in backgroud is also a difficult task, you will meet some problem like how to fill the BPS plan of TP in background, how to generate the fund usage correctly in background. We have spend a log of time to solve them, fortunately we compalished. So this way can be achieve, but it need effort. Please aware this, and do your judgement. -
Newly created item through personalization not visible
Hi All,
I have added on new item , in a page,
Howerver when I clicked apply on that item , once I define the required properties of the item.
I am getting this error
"Attachment item "%ITEM" has been created successfully, however, it does not have an Entity Map associated with it. To avoid a runtime error, please either create an Entity Map for this attachment item, or delete attachment item "%ITEM"."
I am not able to locate that item , anywhere * either in personalzied page nor in application pageI have gone to personalize page -> selected LOVRN -> create item ->
level - Site
Item Type - MessageLOVInput
Prompt - some custom prompt
Id - some custom id
External LOV- given exisitng seeded path for LOV with region name in the last
apply .
Then the error appeared as
Attachment item "%ITEM" has been created successfully, however, it does not have an Entity Map associated with it. To avoid a runtime error, please either create an Entity Map for this attachment item, or delete attachment item "%ITEM". appeared
After the above steps complete. I have again gone to personalization ->complete view . But I am not able to locate the item created in above mentioned steps.
One thing to note, I have tried creating new item , however everytime I am getting the above error after clicking on apply. In one occasion I have given incomplete path in the external LOV field mentioned above.(i.e. I forgot to mention the region Name )
Please help.... -
Crm_order_maintain . create items.
hi all.
i have to update order using fm crm_order_maintian.
i am able to update header but when i c order using crm_order_read there is no item data now i have to craete items of header.
please suggest how to create items in order using crm_order_maintain....
Message was edited by:
gaurav jainHi Gaurav,
The following the code i used to add a product( Item ) to Service order.
Service Contract Updating while Sales Order Creation
FUNCTION zzomotc_sc_update.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_GUID) TYPE CRMT_OBJECT_GUID
*" CHANGING
*" VALUE(CV_OWN_MESSAGE) TYPE CRMT_BOOLEAN OPTIONAL
***& Constants *
CONSTANTS: c_stparty TYPE comt_partner_fct VALUE '00000001'. "Sold-To-Party
*& Internal Tables Declaration *
DATA:i_orderadm_h TYPE crmt_orderadm_h_wrkt,
i_orderadm_i TYPE crmt_orderadm_i_wrkt,
i_orderadmsc_i TYPE crmt_orderadm_i_wrkt,
i_itemdet TYPE crmt_orderadm_i_comt,
i_product_i TYPE crmt_product_i_wrkt,
i_sales TYPE crmt_sales_wrkt,
i_orgman TYPE crmt_orgman_wrkt,
i_shipping TYPE crmt_shipping_wrkt,
i_schedlin TYPE crmt_schedlin_wrkt,
i_partner TYPE crmt_partner_external_wrkt,
i_guid_header TYPE crmt_object_guid_tab,
i_status TYPE crmt_status_wrkt,
i_text TYPE crmt_text_wrkt,
i_billing TYPE crmt_billing_wrkt,
i_service_contracts TYPE TABLE OF crmt_portal_resultlist,
i_customer_h TYPE crmt_customer_h_wrkt,
i_customer_i TYPE crmt_customer_i_wrkt,
i_input_fields TYPE crmt_input_field_tab,
i_sales_sc TYPE crmt_sales_comt,
i_field_names TYPE crmt_input_field_names_tab,
i_guid_save TYPE crmt_object_guid_tab.
*& Local structure/Work Area Declaration *
DATA:st_sales TYPE crmt_sales_wrk,
st_shipping TYPE crmt_shipping_wrk,
st_orderadm_i TYPE crmt_orderadm_i_wrk,
st_orderadmsc_i TYPE crmt_orderadm_i_wrk,
st_orderadmsc1_i TYPE crmt_orderadm_i_wrk,
st_partner TYPE crmt_partner_external_wrk,
st_billing TYPE crmt_billing_wrk,
st_customer_i TYPE crmt_customer_i_wrk,
st_service TYPE crmt_portal_resultlist,
st_input_fields TYPE crmt_input_field,
st_field_names TYPE crmt_input_field_names,
st_itemdet TYPE crmt_orderadm_i_com.
*& local Variables Declaration *
DATA: l_guid TYPE crmt_object_guid,
l_flag TYPE c VALUE ' ',
l_partner_fct TYPE crmt_portal_service_search-partner_fct,
l_partner_no TYPE crmt_portal_service_search-bu_partner.
CHECK iv_guid IS NOT INITIAL.
COLLECT iv_guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_h = i_orderadm_h
et_orderadm_i = i_orderadm_i
et_product_i = i_product_i
et_customer_h = i_customer_h
et_customer_i = i_customer_i
et_sales = i_sales
et_orgman = i_orgman
et_shipping = i_shipping
et_billing = i_billing
et_schedlin = i_schedlin
et_partner = i_partner
et_text = i_text
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
IF sy-subrc <> 0.
** SO Order doesn't exists
ENDIF.
***Get partner function as sold-to-party
DELETE ADJACENT DUPLICATES FROM i_partner.
READ TABLE i_partner WITH KEY partner_fct = c_stparty INTO st_partner.
LOOP AT i_orderadm_i INTO st_orderadm_i.
IF ( st_orderadm_i-itm_type EQ 'ZTAP' ) OR ( st_orderadm_i-itm_type EQ 'ZWVN' ) OR
( st_orderadm_i-itm_type EQ 'ZCPP' ) OR ( st_orderadm_i-itm_type EQ 'YWVN' ).
** Search a valid Service contract based on customer i.e.sold-to-party and product combination
l_partner_fct = c_stparty.
l_partner_no = st_partner-partner_no.
CALL FUNCTION 'CRM_SERVICE_CONTRACTS_SEARCH'
EXPORTING
partner_function = l_partner_fct
partner_number = l_partner_no
* product_id = st_orderadm_i-ordered_prod
* to = sy-datum
TABLES
service_contract_list = i_service_contracts.
IF i_service_contracts[] IS NOT INITIAL.
LOOP AT i_service_contracts INTO st_service WHERE date_end GE sy-datum.
REFRESH i_guid_header.
COLLECT st_service-guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_i = i_orderadmsc_i
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
READ TABLE i_orderadmsc_i INTO st_orderadmsc_i
WITH KEY ordered_prod = st_orderadm_i-ordered_prod.
IF sy-subrc EQ 0.
l_flag = 'X'.
l_guid = st_service-guid.
EXIT.
ENDIF.
ENDLOOP.
**** Deactivate the line item of existing service contract and add new service item to this contract
IF l_flag EQ 'X'.
REFRESH : i_guid_header, i_orderadm_h, i_orderadmsc_i.
COLLECT l_guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_h = i_orderadm_h
et_orderadm_i = i_orderadmsc_i
* et_pricing_i = i_pricing_i
et_status = i_status
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
READ TABLE i_orderadmsc_i INTO st_orderadmsc_i INDEX sy-tabix.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'ORDERADM_I'.
st_field_names-fieldname = 'MODE'.
APPEND st_field_names TO i_field_names.
st_field_names-fieldname = 'ORDERED_PROD'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'PRODUCT_I'.
st_field_names-fieldname = 'PROCESS_QTY_UNIT'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'SCHEDLIN'.
st_field_names-fieldname = 'QUANTITY'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
MOVE-CORRESPONDING st_orderadmsc_i TO st_itemdet.
* st_orderadmsc1_i-header = st_orderadmsc_i-header.
* st_orderadmsc1_i-ordered_prod = st_orderadm_i-ordered_prod.
APPEND st_itemdet TO i_itemdet.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
* EXPORTING
** it_pricing_i = i_pricing_i
* it_product_i = i_product_i
* it_schedlin_i = i_schedlin_i
CHANGING
ct_orderadm_i = i_itemdet
ct_input_fields = i_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc EQ 0.
COLLECT l_guid INTO i_guid_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = i_guid_save
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
REFRESH i_guid_save.
l_flag = 'X'.
ENDIF.
ELSE.
REFRESH: i_guid_header, i_orderadmsc_i.
READ TABLE i_service_contracts INTO st_service INDEX 1.
COLLECT st_service-guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_h = i_orderadm_h
et_orderadm_i = i_orderadmsc_i
* et_pricing_i = i_pricing_i
et_status = i_status
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
READ TABLE i_orderadmsc_i INTO st_orderadmsc_i INDEX sy-tabix.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'ORDERADM_I'.
st_field_names-fieldname = 'MODE'.
APPEND st_field_names TO i_field_names.
st_field_names-fieldname = 'ORDERED_PROD'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'PRODUCT_I'.
st_field_names-fieldname = 'PROCESS_QTY_UNIT'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'SCHEDLIN'.
st_field_names-fieldname = 'QUANTITY'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_orderadmsc1_i-header = st_orderadmsc_i-header.
st_orderadmsc1_i-ordered_prod = st_orderadm_i-ordered_prod.
APPEND st_orderadmsc1_i TO i_orderadmsc_i.
MOVE-CORRESPONDING st_orderadmsc1_i TO st_itemdet.
APPEND st_itemdet TO i_itemdet.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
* EXPORTING
** it_pricing_i = i_pricing_i
* it_product_i = i_product_i
* it_schedlin_i = i_schedlin_i
CHANGING
ct_orderadm_i = i_itemdet
ct_input_fields = i_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc EQ 0.
COLLECT st_service-guid INTO i_guid_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = i_guid_save
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
REFRESH i_guid_save.
l_flag = 'X'.
ENDIF.
ENDIF.
ELSE.
*** Create a new service contract for it and add line item to it.
DATA: st_servicec_h TYPE crmt_iservice_baskethead_il,
st_servicec_i TYPE crmt_srv_webreq_item_il ,
st_screate_h TYPE crmt_orderadm_h_com,
st_screate_i TYPE crmt_orderadm_i_com.
READ TABLE i_partner INTO st_partner WITH KEY partner_fct = '00000001'.
st_servicec_h-handle = '00001'.
st_servicec_h-ref_handle = '00001'.
st_servicec_h-process_type = 'ZSC'.
st_servicec_h-description = 'Service Contract'.
st_servicec_h-descr_language = 'E'.
st_servicec_i-handle = '00002'.
st_servicec_i-ref_handle = '00001'.
* st_servicec_i-ITM_TYPE =
st_servicec_i-ordered_prod = st_orderadm_i-ordered_prod.
* st_servicec_i-ORDER_QTY =
* st_servicec_i-QTY_UNIT =
CALL FUNCTION 'CRM_SERVICE_ORDER_CREATE'
EXPORTING
is_service_baskethead = st_servicec_h
is_service_basketitem = st_servicec_i
iv_service_productguid = st_orderadm_i-product
iv_partner_ag = st_partner-partner_no
iv_partn_fct_ag = '00000001'
IMPORTING
es_orderadm_h = st_screate_h
es_orderadm_i = st_screate_i
EXCEPTIONS
error_occured = 1
OTHERS = 2.
IF sy-subrc EQ 0.
COLLECT st_screate_h-guid INTO i_guid_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = i_guid_save
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
REFRESH i_guid_save.
l_flag = 'X'.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION.
Actually, this FM was created for updating the service contract while creation of sales order with serivce product as its line item. It search for valid SC for sold-to-Party and checks for the products if not there adds the same product as line item to SC. If SC not avaliable , Creates SC and adds the same product
Hope it will help you.
Regards,
Arjun
<b>Pl. Reward points</b> -
How to create item wise invoice with reference to sales order.
Hi ,
Please let me know how to create item wise invoice with reference to sales order.
Ex : Sales order has 2 line items .
When creating invoice system should create two invoices for each line items.
I have tried with copy control but I am not able to do it.
Please advise.
RegardsHi,
Please let us know your exact requirement. Whether you want it to be fixed like only one line item to be billed every time ot it to be based on selection you do every time.
As per my understanding it should not be fixed and in that case it should like as follows,
In VF01 you will select Del. document/S.O. number and click on selection list and will take you to next screen as mention below,
and select desire line item to be billed and click on copy and will take you to billing screen.
Regards,
Ajit K Singh -
Create items by vendor and customer on Foreign Currency Valuation
When we execute Foreign Currency Valuation, we would like to create items in a document by vendor and customer.
Can we handle it a 'Corp.group-vendors' flag(Evaluate Accounts According to Group Definition) ?
Can you help with this issue please?
Thanks,
Sato.IshikawaHI,
With the report SAPF100, you will be able to valuate foreign currencies
from customer and vendor accounts.
It is not possible to post a foreign currency valuation directly to a
vendor or customer account. This is only possible for g/l accounts.
You can refer to the following workarounds:
From the technical point of view you can use FB01 to post such a posting
You have to enter a exchange rate manually in the first screen. In this
case this exchange rate is used instead of the exhange rate of table
TCURR (transaction OB08).
You have to choose a exchange rate which transfer the amount in local
currency to 0,00 in foreign currency.Another possibility is to use
RFBIBL00 in transfer type direct input for FB01.An amount of 0 in
foreign currency should work.
The system is designed not to post documents with 0 amount in foreign
currency to vendors/customers.
Reg
Madhu M
Maybe you are looking for
-
Can we have a new cleint for PI system ?
Can we have a new client for PI systems , though we hold an exisiting client ( say 001) in all the environments i.e Dev , QA and Prd ? If so , what are the risks and is it worth the risk ? Please suggest .
-
Some change in iOS I suppose makes it so events entered in my iPhone 3GS will no longer populate my Outlook 2010 calendar when I sync the devices through iTunes. It used to be that events entered in each place would populate the other locationg when
-
How do you change the "read more ..." in the Blog page to something else?
I'd like to change the "read more ..." in the Blog page to say something more relevant to my site. How can this be done? I searched the forums and found an earlier response to this question, but I don't quite understand it: Find index.xml.gz file (op
-
Hey all, We use Novell Groupwise for exchange. One of the people at our organization has been having issues since he got the phone. Apparently, several events from his calendar are being deleted in the span of a minute on occasion. When I go in hi
-
Best way to use PersistenceManagers in Web Applications
Beacuse each PersistenceManager manages it's own cache , and I would like to benefit from this cache is it a good practice to keep in each user's session a PersistenceManager instance? By keeping this cache , wouldn't be a problem when many users acc