Create items programmatically !
Hello ...
I made ViewObject programmatically, and I try to make dynamic JSP page for this ViewObject, So I don't have fixed ViewObject with specified attributes to build my JSP page items using these attributes.
I'm using JDeveloper 11.1 with ADF technology, OS Windows XP, WebLogic Serve 10.3, JDK 1.6
1- Can I create web page item (af:inputText for example) at runtime using managed beans and how ?
2- Can I create JSP web page at run time ?
Thanks Chan,
I made the steps like your code, but I got Null pointer exception at "getChildren.add()" method.
this is the error message :
]] Root cause of ServletException.
javax.el.ELException: java.lang.NullPointerException
at javax.el.BeanELResolver.setValue(BeanELResolver.java:345)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:283)
at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:101)
at com.sun.el.parser.AstValue.setValue(AstValue.java:140)
at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
Truncated. see log file for complete stacktrace
java.lang.NullPointerException
at view.backing.Untitled1.addComponents(Untitled1.java:88)
at view.backing.Untitled1.setPanelBorderLayout1(Untitled1.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Truncated. see log file for complete stacktrace
Similar Messages
-
Creating Items Programmatically?
Hi,
What's the easiest way to create items programmatically? Our goal is to push new items (and later business partners & sales orders) into SAP without wasting valuable staff time on this kind of tedious stuff.
I'm assuming it's not the obvious answer of simply INSERT'ing into the relevant tables (OITM etc)
Do we need to buy the SDK to do what I'm asking?
If someone can give me a pointer in the right direction, I'd really appreciate it!
Many thanks,
William.Hi there,
I don't really undersand your question. If it is for data take on purposes, you can use DTW. You can use SDK if you need to stuff "automatically". You can write a Windows service that runs in the background, using SDK or an Add-on that will execute in the normal ways.
Hope this helps.
Kind regards -
How to create button programmatically and assign trigger for it and add code
is that possible ?
How can I create item a button for example programmatically (at run time)
and create trigger (when-button-pressed) programmatically and write a code
in the trigger body as well programmatically.
thankxHello David
I used the way list and go button which is more safer than creating buttons because
you can populate the list on fly.
| dropdown list \/
| go button |
PROCEDURE populate_user_function_list IS
rg_list_id RECORDGROUP;
ret_code NUMBER;
BEGIN
rg_list_id := FIND_GROUP('RG_LIST');
IF NOT ID_NULL(rg_list_id) THEN
DELETE_GROUP(rg_list_id);
END IF;
rg_list_id := CREATE_GROUP_FROM_QUERY('RG_LIST','SELECT FUNCTION_ID, FUNCTION_ID FROM SMS_ROLE_FUNCTION WHERE SMS_ROLE_FUNCTION.DB_ROLE ='||''''||:GLOBAL.USER_ROLE||''''||' ORDER BY SEQUENCE_NO');
ret_code := POPULATE_GROUP(rg_list_id);
--Populate record group.
IF ret_code <> 0 THEN
bell;
MESSAGE('Record Group could not be populated');
RAISE FORM_TRIGGER_FAILURE;
END IF;
POPULATE_LIST('DYNAMIC_BLK.USER_FUNCTION','RG_LIST');
DELETE_GROUP(rg_list_id);
END;
--this is the button to go the user selection
begin
if :DYNAMIC_BLK.USER_FUNCTION is not null then
--go to selected form
call_form(:DYNAMIC_BLK.USER_FUNCTION,NO_HIDE,DO_REPLACE,NO_QUERY_ONLY,NO_SHARE_LIBRARY_DATA);
else
bell;
message('Please select a function');
end if;
end; -
Sharepoint list not letting edit/add items programmatically
Hello,
I have a SP List which I need to update and edit items programmatically (I'm using InfoPath).
I coded the solution, tested in many others lists and the code does work. But when I test using the list I actually need to use it just doesn't let me to do any operation. I wonder if there is any configuration that might be set which doesn't allow
people to programmatically change the list.
Some points:
- This list was created in another SP site and has been exported as template to another. Is that possible that anything could be occurred during the export operation?.
- I have created an InfoPath form template to add a new item to this list, If I need to add/update an item manually I can do this without any problems.
-I checked the fields that cannot be blank and I'm filling all of them, so I don't think that's the problem.
Thanks in advance.Hi,
I suggest you debug your code, then provide error messages for further troubleshooting.
Or you can provide your code for us to reproduce the issue.
Best Regards
Dennis Guo
TechNet Community Support -
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 -
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 -
Unable to create item under a region
Hi All,
I wanted to create a item under one region in a seeded page. When I went to Personalize page, next to the region where I need to create the item, I don't see the "Create Item" button. But for the other regions I see that button. Any ideas what could be done to enable this?
Regards,
PradeepHi,
It could be a dynamic region itself or a region extended.
If its a dynamic region, you will have to do Controller extension to extend it.
-Idris -
FM for Create ASN programmatically in SNC (Supplier Network Collaboration)
Hello,
I am working in SNC (Supplier Network Collaboration) with version SAP SCM 7.0. I wanted to create ASN programmatically.
Can anyone tell me the ways possible to create ASN programmatically using purchasing information?
Thanks & Regards,
NitinHI Jens,
In our forum, we discussed topic about BizTalk & SAP Integration before, hope it helps you.BizTalk
& SAP Integration
Best regards,
Angie
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Add restriction while create item by "Old Purchase Orders and Templates"
We are consider to add restriction while create shopping cart item by "Old Purchase Orders and Templates". After implement such restriction, create item by copying old shopping cart item is not allow for particular matereial group number.
Is there any BADI can be used in our case? If there is no, could modify HTML template the only solution?
Regards,
DonaldHi,
If the restriction is for certain group of people,then you have 2 options:
1.Make the link invisible for those group of people by implementing the BADI BBP_SC_MODIFY_UI.In the BADI,first check the user attributes like particular role and based on that make the link invisible.
2. Assign certain role to the group of users who should not see the link "Old Purchase order and templates".You can hide this link in the MENU by removing this from the lits of trasctions in that particular role.In PFCG,go in that role and then under MENU tab,remove the entry for "OLD PURCHASE ORDER AND TEMPLATES".
BR,
Disha.
Do reward points for useful answers. -
Can we create items dynamically in forms 6i??
Dear All,
Is it possible to create items,i.e. Text items,display items etc. dynamically?
Suppose I select Table name EMP,then it must get all columns from database and place it on form.Now I change table name from EMP to DEPT,now it should get all columns for dept table and place it on same form removing all EMP table colums.I should not have to call another form,i.e. it should be strictly done through single form.
Thanks in advanceYou can make a form with 10 or more items (depends on the maximum number of the columns you have) and place them in a non base table block. Then you populate the block with a cursor and if you press a button you can populate the same block with another cursor making visible only the columns you need.
Hope it helps you,
Fabrizio
Maybe you are looking for
-
My credit card was charged the $35 restocking fee but the manager in the store never returned the handset, I took my credit card statement showing the date and store information, when I contact acted Verizon Corporate office, I was told after 3 month
-
Photoshop Elements 11 download problem
I cannot reload Photoshop and Premier Elements 11 (after pc wipe clean) as it asks me to close dynamiclinkmanager.exe. I cannot find a file to close or delete only a folder with nothing to use. What do I do please?
-
Renaming a file in Preview for Mavericks
When I try to rename a file in preview (File -> Rename) and I start typing the input box just gets overwritten I can't see the file name anymore: Start: Bug: Bug 2: Also the only way to get it to work is this new "Tags" drop down with the arrow, but
-
I am using FTAM version 9.0 (OSI 9.0, x.25 9.1) on Solaris 8. Working with responder FTAM on Nokia DX220 (a PSTN switch). The FTAM remote database settings are : APT 1 3 9999 1 7 AEQ 1 PSEL (hex) 0201 SSEL (hex) 0201 TSEL (hex) 0201 I have to put one
-
Itunes 11.03.42 doesnt show artwork and playlist of a podcast
Hi! I have a very anoying problem since i update my itunes to this version, because i used to download Tiesto Podcast, and there was an option to see the artwork and the list of songs to change from one to another in the podcast when i prees the cove