Create item at runtime

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...
Thanks

Hi 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

Similar Messages

  • How can I dynamically create all kinds of items in runtime?

    sir:
    I always want to create items dynamically with forms50 in
    runtimes,But I found that items ,eg:text item,list item were
    be created in design time,it make me limited,I hope to control
    item freely,how can I do?
    null

    You can't.
    You should use another tool like JAVA or C.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gang lee ([email protected]):
    sir:
    I always want to create items dynamically with forms50 in
    runtimes,But I found that items ,eg:text item,list item were
    be created in design time,it make me limited,I hope to control
    item freely,how can I do?<HR></BLOCKQUOTE>
    null

  • How to change the "name of column" property of an text item in runtime?

    How to change the "name of column" property of an text item in runtime?
    I look the properties of items in help and found nothing about this!
    It's possible?

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

  • How to create variables at runtime

    Hi,
    I need to know how can i create variables at runtime.
    or is their anything like array that we create in 'C' if yes . how can i define its size at runtime.
    Thanks,
    Dev.

    In forms, either record groups or pl/sql tables of records give similar functionality to an array. You have full programatic control of either but with completely different syntax. Record groups integrate well with certain forms built-ins and features (eg LOVs and Tree items). PL/sql tables integrate well with other pl/sql such as stored procedures. Unlike an array, a pl/sql table may be SPARSE (index numbers need not be sequential), and UNBOUNDED (no need to declare the number of rows).

  • 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 page

    I 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....

  • Creating items in executions mode

    can i create items or camps in execution in forms

    The simple answer is no.
    But you can have items allready defined but with visible property off, and in runtime change their visibility and even their position.
    null

  • How can I create a Forms9i Runtime for client distribution

    Currently we have an application developed in Forms 5.0.6.8.0 our Database has been upgraded to 9i DB. The application is working fine with this combination but we want to upgrade Forms in order to get Oracle Support. We just get the Developer Suite 9i package and we're trying to test our application with this software.
    How can I create the client runtime for Forms 9i?
    My application will work with Win 95 and 98?
    Thanks.

    Oracle9i Forms is web-only. Forms 6i is the last release of Forms to have client/server and character mode.
    You can test Forms from the Builder by installing iDS. To deploy Forms using iAS follow the documentation. It's all there in the deployment guide.
    iAS and Forms doco can be found on OTN.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • 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 Alshaibani

    Hi,
    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.
    Thanks

    Hi 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

  • 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 jain

    Hi 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.
    Regards

    Hi,
    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.Ishikawa

    HI,
    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,
    Pradeep

    Hi,
    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

  • 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,
    Donald

    Hi,
    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.

Maybe you are looking for

  • DVI to s-video TV display

    what I want to do: I want to be able to use my tv as a second display to watch movies on etc. What I have: Macbook pro 15in with a DVI Out, DVI to s-video/ composite adapter. RF modulator for the tv as it is an old tv with only coaxel in, the RF modu

  • WBS Element Budget Exceeded.

    Hi All, During creation of Excise Invoice in T.Code J1IIN we get an error (MSG NO. BP603) WBS Element Budget Exceeded. Ideally the same should not as we are posting the income & not the cost. Please Guide. Regards,

  • Multiple Infotype operation in simulation mode

    Hi All, We have a requirement to first delete a infotype record and then add another record in simulation mode or to add multiple new record in simulation. Can you please let me know how to implement this functionality. Thanks in advance. Srikanta

  • E-Recruitment . Reuisition  history

    Hi , I am having doubt in the E-recruiting .I am creating Requisition and at the time of Relasing the requisition we have suppressed the workflow and updating the status of the Requisition as Released  in the infotype  5125 . My doubt is when i am ch

  • Where do I find my check list to download playlists from my computer to my iPod?

    I have downloaded new music to my iTunes on my MacBook Pro; I have not found where I can choose my playlists in my iTunes Music Library - take old play lists off and add new ones I have downloaded to iTunes - to synch to my iPod Nano.  I can choose m