Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

please provide info about IBase?

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

what is an ibase? uses? purpose?

5 REPLIES 5

Former Member
0 Kudos

Hi,

Hi

Installed Base Management

Definition

Installed Base Management in mySAP CRM enables the representation of objects installed at your customer’s (for example, devices, machines, software and so on) for which a service is offered. It can also be used to manage objects used internally.

Installed Base Management is available for the SAP GUI, the People-Centric UI, the Mobile Client and Internet Customer Self-Service (ICSS).

Use

In business processes, an installed base can be referred to as a general unit or as an individual element (component).

The set of installed objects at the customer’s can be used, for example:

· To determine the exact object for which a problem has been reported

· To determine in detail what the transaction (for example, visit by field service representative, repair by a service employee) refers to

· By the service employee as information about which object is affected and the parts it consists of

· For documenting changes made to objects

In addition to this direct use of the installed base data in the context of individual service processes with the customer, it also represents the base for additional evaluations, such as:

· Activities covered by service contracts

· Statistics

How ibase used in CRM ?

Installed Base Management is integrated in service processes, service contracts and the Interaction Center

The following link gives an overview of Ibases:

http://help.sap.com/saphelp_crm50/helpdata/en/bb/00eb39b600272ee10000000a11402f/frameset.htm

Reward points

Regards

Former Member
0 Kudos

Hello,

I have created a program to create IBase using the XI interface.

I am attaching the program with related forms.

Please note that I read the information from a text file delimited by tab. You can get in whatever information you want from the text files.

As an example you can paste the following lines in a file and save it and use it.

*******************************************************

IBASE1 <Enter your product ID here>

IBASE1 <Enter your product ID here>

*******************************************************

THe code begins here

*******************************************************

REPORT zupload_ibase_xif

NO STANDARD PAGE HEADING LINE-SIZE 255.

*structure for creating the IBASE

DATA: it_ibase_xif TYPE crmxif_ibase_t.

DATA: wa_ibase_xif TYPE crmxif_ibase.

DATA: wa_status TYPE crmxif_ibase_status.

DATA: wa_ibase_component_xif TYPE crmxif_ibase_component.

DATA: wa_ibase_component_xif_text TYPE crmxif_ibase_component_text.

DATA: wa_crmxif_ibase_extra TYPE crmxif_ibase_extra.

DATA: desc(40).

DATA: guid TYPE guid_32.

DATA: it_return TYPE bapiretm.

DATA: wa_return LIKE LINE OF it_return.

DATA: current_date_time TYPE timestamp.

DATA: wa_objmesg TYPE bapiretc.

DATA: wa_crmxif_ibase_structure TYPE crmxif_ibase_structure.

DATA: root_component TYPE ib_recno_32.

DATA: p_counter TYPE i.

DATA: t_file TYPE STANDARD TABLE OF file_table.

DATA: wa_filename LIKE file_table.

DATA: l_filename TYPE string.

DATA: sort_string(6) TYPE n.

*IBASE CATEGORY

*STRUCTURE FOR THE IBASE CATEGORY

DATA: BEGIN OF wa_ibase_category,

ibtyp(040),

END OF wa_ibase_category.

DATA product_guid TYPE comt_product_guid.

*STRUCTURE FOR THE IBASE DATA

DATA: BEGIN OF wa_ibase_data,

ibtyp(040),

product_id(040),

status(004),

product_guid(32),

product_desc(040),

END OF wa_ibase_data.

*INTERNAL TABLE TO HOLD THE IBASE CATEGORY DATA

DATA: it_ibase_category LIKE TABLE OF wa_ibase_category.

*INTERNAL TABLE TO HOLD THE IBASE DATA

DATA: it_ibase_data LIKE TABLE OF wa_ibase_data.

DATA: pos1 TYPE i,

pos2 TYPE i.

----


  • SELECT-OPTIONS and PARAMETERS *

----


PARAMETERS: ibase_c(2) LOWER CASE DEFAULT

'Z1' OBLIGATORY.

PARAMETERS: p_infil2 LIKE rterm-file DEFAULT 'C:\COMLOG.txt' OBLIGATORY.

----


  • INITIALIZATION *

----


INITIALIZATION.

----


  • At SELECTION-SCREEN *

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infil2.

PERFORM get_file_name.

----


  • TOP-OF-PAGE *

----


----


  • START-OF-SELECTION *

----


START-OF-SELECTION.

PERFORM get_data_file.

IF it_ibase_data IS INITIAL.

FORMAT COLOR COL_NEGATIVE.

WRITE : / 'No data available for processing.'. "#EC NOTEXT

LEAVE PROGRAM.

ENDIF.

it_ibase_category = it_ibase_data.

SORT it_ibase_data BY ibtyp product_id.

SORT it_ibase_category BY ibtyp.

DELETE ADJACENT DUPLICATES FROM it_ibase_category COMPARING ibtyp.

*POPULATING THE PRODUCT DESCRIPTION

LOOP AT it_ibase_data INTO wa_ibase_data.

CLEAR wa_ibase_data-product_guid.

SELECT SINGLE product_guid INTO product_guid "#EC *

FROM comm_product

WHERE product_id = wa_ibase_data-product_id.

IF sy-subrc = 0.

wa_ibase_data-product_guid = product_guid.

SELECT SINGLE short_text INTO wa_ibase_data-product_desc

FROM comm_prshtext

WHERE product_guid = wa_ibase_data-product_guid

and LANGU = sy-langu.

MODIFY it_ibase_data FROM wa_ibase_data.

ENDIF.

ENDLOOP.

*SORTING THE INTERNAL TABLES

SORT it_ibase_data BY ibtyp product_desc.

CLEAR it_ibase_xif.

*CREATE THE IBASE

LOOP AT it_ibase_category INTO wa_ibase_category.

CLEAR wa_ibase_xif.

CLEAR root_component.

CLEAR current_date_time.

CONVERT DATE sy-datum TIME sy-uzeit INTO TIME STAMP current_date_time TIME ZONE sy-zonlo .

*generate the guid

CLEAR guid.

CALL FUNCTION 'GUID_CREATE'

IMPORTING

ev_guid_32 = guid.

*********************************************************************************************

  • Header Sturcture *

*********************************************************************************************

*populate the header structure

wa_ibase_xif-ibase_guid = guid .

wa_ibase_xif-object_guid = guid.

wa_ibase_xif-object_task = 'I'.

wa_ibase_xif-ibase_type = ibase_c.

wa_ibase_xif-file_id = '01'.

wa_ibase_xif-descr_language_iso = 'EN'.

wa_ibase_xif-internal_state = '1'.

wa_ibase_xif-validation_type = '2'.

wa_ibase_xif-created_by = sy-uname.

wa_ibase_xif-created_at = current_date_time.

*populate the input fields for header structure

wa_ibase_xif-input_fields-ibase_guid = 'X'.

wa_ibase_xif-input_fields-ibase_type = 'X'.

wa_ibase_xif-input_fields-file_id = 'X'.

wa_ibase_xif-input_fields-descr_language_iso = 'X'.

wa_ibase_xif-input_fields-internal_state = 'X'.

wa_ibase_xif-input_fields-validation_type = 'X'.

wa_ibase_xif-input_fields-created_by = 'X'.

wa_ibase_xif-input_fields-created_at = 'X'.

*********************************************************************************************

  • Header Text Sturcture *

*********************************************************************************************

wa_ibase_xif-text-data-object_task = 'I'.

wa_ibase_xif-text-data-descr_language_iso = 'EN'.

CONCATENATE text-t01 wa_ibase_category-ibtyp INTO wa_ibase_xif-text-data-ibase_description SEPARATED BY space.

wa_ibase_xif-text-datax = 'X'.

wa_ibase_xif-text-data-input_fields-ibase_text_guid = 'X'.

wa_ibase_xif-text-data-input_fields-descr_language_iso = 'X'.

wa_ibase_xif-text-data-input_fields-ibase_description = 'X'.

*********************************************************************************************

  • STATUS Sturcture *

*********************************************************************************************

wa_status-status = 'E0002'.

wa_status-user_stat_proc = 'ZIBASE'.

wa_status-active = 'X'.

*populate the input fields.

wa_status-input_fields-status = 'X'.

wa_status-input_fields-user_stat_proc = 'X'.

wa_status-input_fields-active = 'X'.

APPEND wa_status TO wa_ibase_xif-status-data.

wa_ibase_xif-status-datax = 'X'.

*********************************************************************************************

  • Components *

*********************************************************************************************

sort_string = 1.

*CREATING THE COMPONENTS AND ENTERING THE IBASE DESCRIPTION

LOOP AT it_ibase_data INTO wa_ibase_data

WHERE ibtyp = wa_ibase_category-ibtyp .

CLEAR wa_ibase_component_xif.

wa_ibase_xif-component_store_indicator = 'X'.

*GENERATE GUID

CLEAR guid.

CALL FUNCTION 'GUID_CREATE'

IMPORTING

ev_guid_32 = guid.

IF root_component IS INITIAL.

root_component = guid.

ENDIF.

*********************************************************************************************

  • Component Sturcture *

*********************************************************************************************

wa_ibase_component_xif-object_task = 'I'.

wa_ibase_component_xif-component_guid = guid.

wa_ibase_component_xif-object_guid = wa_ibase_component_xif-component_guid.

wa_ibase_component_xif-object_allocation = guid.

wa_ibase_component_xif-object_type = '0001'.

wa_ibase_component_xif-product_id = wa_ibase_data-product_id.

wa_ibase_component_xif-changed_by = sy-uname.

wa_ibase_component_xif-changed_at = current_date_time.

wa_ibase_component_xif-valid_from = current_date_time.

wa_ibase_component_xif-valid_to = '99991231235959'.

wa_ibase_component_xif-descr_language_iso = 'EN'.

wa_ibase_component_xif-sorter = sort_string.

wa_ibase_component_xif-created_by = sy-uname.

wa_ibase_component_xif-created_at = current_date_time.

wa_ibase_component_xif-input_fields-component_guid = 'X'.

wa_ibase_component_xif-input_fields-object_guid = 'X'.

wa_ibase_component_xif-input_fields-object_allocation = 'X'.

wa_ibase_component_xif-input_fields-object_type = 'X'.

wa_ibase_component_xif-input_fields-product_id = 'X'.

wa_ibase_component_xif-input_fields-changed_by = 'X'.

wa_ibase_component_xif-input_fields-changed_at = 'X'.

wa_ibase_component_xif-input_fields-valid_from = 'X'.

wa_ibase_component_xif-input_fields-valid_to = 'X'.

wa_ibase_component_xif-input_fields-descr_language_iso = 'X'.

wa_ibase_component_xif-input_fields-sorter = 'X'.

wa_ibase_component_xif-input_fields-created_by = 'X'.

wa_ibase_component_xif-input_fields-created_at = 'X'.

CLEAR desc.

FIND '/' IN wa_ibase_data-product_desc MATCH OFFSET pos1.

FIND '//' IN wa_ibase_data-product_desc MATCH OFFSET pos2.

pos2 = pos2 + 1.

CONCATENATE wa_ibase_data-product_desc0(pos1) wa_ibase_data-product_descpos2 INTO desc.

  • CONCATENATE 'PRDT - ' wa_ibase_data-product_desc INTO desc.

*********************************************************************************************

  • Component Text Sturcture *

*********************************************************************************************

CLEAR wa_ibase_component_xif_text.

wa_ibase_component_xif_text-object_task = 'I'.

wa_ibase_component_xif_text-valid_from = current_date_time.

wa_ibase_component_xif_text-valid_to = '99991231235959'.

wa_ibase_component_xif_text-descr_language_iso = 'EN'.

wa_ibase_component_xif_text-description = desc.

wa_ibase_component_xif_text-created_by = sy-uname.

wa_ibase_component_xif_text-created_at = current_date_time.

wa_ibase_component_xif_text-input_fields-valid_from = 'X'.

wa_ibase_component_xif_text-input_fields-valid_to = 'X'.

wa_ibase_component_xif_text-input_fields-descr_language_iso = 'X'.

wa_ibase_component_xif_text-input_fields-description = 'X'.

wa_ibase_component_xif_text-input_fields-created_by = 'X'.

wa_ibase_component_xif_text-input_fields-created_at = 'X'.

wa_ibase_component_xif-text-datax = 'X'.

APPEND wa_ibase_component_xif_text TO wa_ibase_component_xif-text-data.

*********************************************************************************************

  • Component Extra Sturcture *

*********************************************************************************************

CLEAR wa_crmxif_ibase_extra.

wa_crmxif_ibase_extra-object_task = 'I'.

wa_crmxif_ibase_extra-valid_from = current_date_time.

wa_crmxif_ibase_extra-valid_to = '99991231235959'.

wa_crmxif_ibase_extra-device_id = desc.

wa_crmxif_ibase_extra-created_by = sy-uname.

wa_crmxif_ibase_extra-created_at = current_date_time.

wa_crmxif_ibase_extra-input_fields-valid_from = 'X'.

wa_crmxif_ibase_extra-input_fields-valid_to = 'X'.

wa_crmxif_ibase_extra-input_fields-device_id = 'X'.

wa_crmxif_ibase_extra-input_fields-created_by = 'X'.

wa_crmxif_ibase_extra-input_fields-created_at = 'X'.

wa_ibase_component_xif-special-datax = 'X'.

APPEND wa_crmxif_ibase_extra TO wa_ibase_component_xif-special-data.

*********************************************************************************************

  • Ibase Sturcture *

*********************************************************************************************

CLEAR wa_crmxif_ibase_structure.

wa_crmxif_ibase_structure-object_task = 'I'.

wa_crmxif_ibase_structure-object_guid = wa_ibase_component_xif-component_guid.

wa_crmxif_ibase_structure-root_object_guid = root_component.

wa_crmxif_ibase_structure-valid_from = current_date_time.

wa_crmxif_ibase_structure-valid_to = '99991231235959'.

wa_crmxif_ibase_structure-created_by = sy-uname.

wa_crmxif_ibase_structure-created_at = current_date_time.

wa_crmxif_ibase_structure-input_fields-object_guid = 'X'.

wa_crmxif_ibase_structure-input_fields-parent_object_guid = 'X'.

wa_crmxif_ibase_structure-input_fields-valid_from = 'X'.

wa_crmxif_ibase_structure-input_fields-valid_to = 'X'.

wa_crmxif_ibase_structure-input_fields-created_by = 'X'.

wa_crmxif_ibase_structure-input_fields-created_at = 'X'.

wa_ibase_xif-structure-datax = 'X'.

APPEND wa_crmxif_ibase_structure TO wa_ibase_xif-structure-data.

wa_ibase_xif-component-datax = 'X'.

APPEND wa_ibase_component_xif TO wa_ibase_xif-component-data.

sort_string = sort_string + 1.

ENDLOOP.

APPEND wa_ibase_xif TO it_ibase_xif.

ENDLOOP.

*********************************************************************************************

  • Call the function to save the IBASE *

*********************************************************************************************

CALL FUNCTION 'CRMXIF_IBASE_SAVE'

EXPORTING

data = it_ibase_xif

IMPORTING

return = it_return.

*commit work.

COMMIT WORK.

WAIT UP TO 4 SECONDS.

*Output Error

LOOP AT it_return INTO wa_return.

LOOP AT wa_return-object_msg INTO wa_objmesg

WHERE type = 'E' OR type = 'A'.

FORMAT COLOR COL_NEGATIVE.

WRITE : / wa_objmesg.

ENDLOOP.

ENDLOOP.

*Output IBase Numbers

FORMAT COLOR COL_TOTAL.

WRITE : / ' The following IBase have been created'. "#EC NOTEXT

DATA:l_guid_32 TYPE guid_32,

l_guid_22 TYPE guid_22,

l_ibase_id TYPE ib_ibase.

LOOP AT it_return INTO wa_return.

LOOP AT wa_return-object_msg INTO wa_objmesg

WHERE message_v1 = 'CRMXIF_IBASE'

AND message_v2 = 'IBASE_GUID'.

l_guid_32 = wa_objmesg-message_v4.

IF NOT l_guid_32 IS INITIAL.

CALL METHOD cl_ibase_service=>cl_convert_guid_32_22

EXPORTING

i_guid = l_guid_32

RECEIVING

r_guid = l_guid_22.

IF NOT l_guid_22 IS INITIAL.

SELECT SINGLE ibase "#EC *

FROM ibib

INTO l_ibase_id

WHERE ib_guid = l_guid_22.

IF sy-subrc = 0.

FORMAT COLOR COL_POSITIVE.

WRITE: / l_ibase_id.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

ENDLOOP.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

&----


*& Form get_file_name

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM get_file_name .

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

default_filename = 'C:\COMLOG.txt'

CHANGING

file_table = t_file

rc = p_counter

EXCEPTIONS

file_open_dialog_failed = 1

cntl_error = 2

error_no_gui = 3

not_supported_by_gui = 4

OTHERS = 5.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE t_file INTO wa_filename INDEX 1.

l_filename = wa_filename-filename.

p_infil2 = l_filename.

ENDFORM. " get_file_name

&----


*& Form get_data_file

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM get_data_file .

l_filename = p_infil2.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = l_filename

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = it_ibase_data

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

IF sy-subrc <> 0.

FORMAT COLOR COL_NEGATIVE.

WRITE : / 'Error Reading the File.'. "#EC NOTEXT

LEAVE PROGRAM.

ENDIF.

ENDFORM. " get_data_file

*******************************************************

Finally if this does solve your problem then do award the appropriate points.

Thanks and regards,

Abhay SIngh.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello abhay

u told tht u have read the text file, wht if we want to read an email from outlook and to transfer it to solution manager?

Former Member
0 Kudos

Hi,

Check the below link:

http://help.sap.com/saphelp_nw04/helpdata/en/f5/215440e3e36f13e10000000a1550b0/content.htm

Regards,

Abhay.

<b>rewards point</b>