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: 

Table structure of Time Management Add-on

Former Member
0 Kudos

Hello everyone,

i have a relatively simple question. I am trying to figure out how the PTREQ* and PTARQ* tables are connected. What I dont understand yet is which of those tables (maybe PTREQ_HEADER or PTREQ_ATTABSDATA) is the leading table and how they are all logically connected.

Especially, when I have a certain personnel number how do I get all the corresponding data entries in the tables?

Does someone have an idea or maybe a papar from SAP regarding this topic?

The tables I mean:

PTREQ_ACTOR

PTREQ_ATTABSDATA

PTREQ_CKEY_MAPP

PTREQ_BATCH

PTREQ_HEADER

PTREQ_ITEM_TYPES

PTREQ_ITEMS

PTREQ_NOTICE

PTREQ_STATUS_CHK

PTREQ_STATUS_TRA

PTREQ_TYPE

PTREQ_XFEREVENTS

PTREQ_EFEREVNT_T

PTARQ_ATTS_INFO

PTARQ_DEDUCTION

PTARQ_EXTRA_INFO

Thanks in advance!

Marcus

7 REPLIES 7

venkat_o
Active Contributor
0 Kudos

Hi Marcus Kornek, <li> Go to SE11->give table name->click on DISPLAY <li>In the application toolbar , look for Graphic button ( CTRLSHIFTF11). It shows all the foreign key relations with one another. Thanks Venkat.O

Former Member
0 Kudos

Hi Venkat,

thanks for your reply. Unfortunately I do not have these tables on our SAP system, since they are part of an add-on for SAP portal which we do not have installed.

So I am really looking for some explanation on how these tables are related to one another!

Thank you!

Marcus

Former Member
0 Kudos

Hi,

PTREQ_HEADER and PTREQ_ATTABSDATA are connected by fields REQUEST_ID and ITEM_ID respectively.

PTREQ_HEADER -REQUEST_ID------>PTREQ_ATTABSDATA-ITEM_ID

Link condition between PTREQ_HEADER and PTARQ_ATTS_INFO:

PTREQ_HEADER -REQUEST_ID------>PTARQ_ATTS_INFO-ITEM_ID

Link condition between PTREQ_HEADER and PTARQ_DEDUCTION:

PTREQ_HEADER -REQUEST_ID------>PTARQ_DEDUCTION-REQUEST_ID

0 Kudos

Hi Neenu,

thank you for your quick response.

I am still not so convinced that the table fields REQUEST_ID and ITEM_ID contain the same data, since their data elements differ (TIM_REQ_ID and TIM_REQ_ITEM_ID respectively). I understand that both have data type CHAR32 so it is possible that what you said is correct. Are you 100% sure about the connection of these two tables (PTREQ_HEADER and PTREQ_ATTABSDATA)?

Can you also shed some light regarding table PTREQ_CKEY_MAPP? Unfortunately I did not find any information about that table.

Thank you in advance!

Marcus

0 Kudos

Hi,

PTREQ_CKEY_MAPP and PTREQ_HEADER are connected by fields CACHE_KEY and VERSION_NO respectively.

PTREQ_CKEY_MAPP-CACHE_KEY---->PTREQ_HEADER-VERSION_NO

0 Kudos

Hi Neenu,

could you also tell me to which package/add-on/module the tables PTREQ* and PTARQ* belong to, since we are trying to get the appropriate package/add-on/module for our SAP-System.

A colleague said it might belong to the Time Management add-on of the portal, but was not sure about it.

Thank you in advance,

Marcus

0 Kudos

Hi,

You can refer to program RPTARQDBVIEW to get extraction logic. Table link would be like this: PTREQ_ATTABSDATA -> PTREQ_ITEMS -> PTREQ_HEADER.

Extraction coding:

*Search the data of the selected date in attabsdata**

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

SELECT *

FROM ptreq_attabsdata

INTO CORRESPONDING FIELDS OF TABLE fnew_items_tab

WHERE (fdy_where).

LOOP AT fnew_items_tab INTO fwa_new_items.

SELECT SINGLE * FROM ptreq_items

INTO CORRESPONDING FIELDS

OF fwa_new_items

WHERE

item_ins = fwa_new_items-item_id.

MODIFY fnew_items_tab FROM fwa_new_items.

ENDLOOP.

*Loop to modify the gui_sel selction criteria**

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

gui_sel-sign = 'I'.

gui_sel-option = 'EQ'.

IF NOT fnew_items_tab IS INITIAL.

LOOP AT fnew_items_tab INTO fwa_new_items.

SELECT SINGLE request_id

FROM ptreq_header

INTO temp_request_id

WHERE item_list_id = fwa_new_items-item_list_id.

gui_sel-low = temp_request_id.

APPEND gui_sel TO fguid.

ENDLOOP.

ELSE.

gui_sel-low = '999NOT1FOUND1ERROR999'.

APPEND gui_sel TO fguid.

ENDIF.