cancel
Showing results for 
Search instead for 
Did you mean: 

SolMan: Tables and FMs for reading ticket information.

Former Member
0 Kudos

Hello All,

In SAP Solution Manager I would like to develop an Abap program to get information about the tickets in status "new" and some related information as:

- Ticket/Incident number

- Header description

- Text/body description

- Attached files

Is there the possibility to use some FM or it is necessary to implement a specific query on joined tables? In this last case in which tables I can find the information?

Thanks in advance for your kind support.

Regards,

Giovanni

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Victor,
Good analysis and solution, thanks a lot for your help on this!

Regards,

Giovanni

Answers (1)

Answers (1)

Hi, Giovanni,

The CRM data structures are quite complex. But the key tables for your scenario are CRMD_ORDERADM_H (ticket header), CRM_JEST (ticket statuses), TJ30T (status texts).

https://wiki.scn.sap.com/wiki/display/CRM/CRM+Tables

The following SQL statement is an example to select all the tickets with status 'New', in client '001', ticket type 'SMIN' and provide you the GUID of the ticket, ID, description and creation date

select            
crmd_orderadm_h.GUID,              
crmd_orderadm_h.object_id as OBJECT_ID,
crmd_orderadm_h.description as DESCRIPTION,              
crmd_orderadm_h.created_at as CREATED_AT,              
tj30t.TXT30 as STATUS
             
from SAPABAP1.crmd_orderadm_h
            
inner join SAPABAP1.crm_jest on crm_jest.objnr = crmd_orderadm_h.guid and crm_jest.inact = ' '            
inner join SAPABAP1.tj30t on tj30t.estat = crm_jest.stat and tj30t.stsma = 'SMIN0001' and tj30t.spras = 'E' and tj30t.mandt = '001'

where tj30t.txt30 LIKE '%New%' and crmd_orderadm_h.process_type ='SMIN'

After selection you can use methods GET_TEXTS and GET_ATTACHMENTS of class CL_AGS_CRM_1O_API to read the long descriptions and attachments in a loop providing the GUIDs of the tickets (easier method)

Also you can try to utilise the CRM_ORDER_READ to get all the information about all documents in one selection. (harder but preferable from performance point of view)

Best regards,

Victor