cancel
Showing results for 
Search instead for 
Did you mean: 

Travel Management

Former Member
0 Kudos

Hi All,

Can someone tell me how to get the dates of the trip creation. I do get the Changed at date as well as time using PTRV_HEAD table.

Actually i have to create a report to display all the timelines ie.

1. Date and time when claim started.

2. Days to authorize Trip.

3. Days to receive invoice after trip completion.

4. Days to process claim.

5. Days to pay from submission.

Any help will be appreciated a lot.

Regards

Varun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

check these

FTPT_REQ_HEAD

FTPT_REQUEST

FTPT_REQ_HEAD

PTRV_HEAD

thanks

Former Member
0 Kudos

Thanks for your response. Yes I have checked all these.

Problem is:-

1. These tables get updated when I update the travel request and then it shows the updated date and time.

2. what I want is the original date and time when the travel request was created.

Former Member
0 Kudos

I checked all tables but this is not possible with standard.

I'm planning to use User Exit now and save it in custom tables.

Varun

christine_evans
Active Contributor
0 Kudos

You can get more information about travel claims eg approver details by reading the TE cluster. There are lots of other structures sent back as well as AEND and one of them might give you some of the information you need. If you're using workflow, you can also read the workflow log to get details such as creation date.

DATA: ls_aend TYPE ptk11.
  LOOP AT gt_trips INTO gs_trips.
    CONCATENATE gs_trips-head-pernr gs_trips-head-reinr
                gs_trips-perio-perio gs_trips-perio-pdvrs
    INTO te-key.
    rp-imp-c1-te.

    CHECK rp-imp-te-subrc EQ 0.

* Attempt to find the approval date by reading the trip 
* history
* We want the first record where ANTRG = 
* approved flag.
    DELETE aend WHERE antrg <> c_approved
                OR ueblg = c_paid.
    SORT aend BY datum uzeit.
    CLEAR ls_aend.
    READ TABLE aend INTO ls_aend INDEX 1.
    gs_trips-approved_date = ls_aend-datum.
    gs_trips-approver_id = ls_aend-uname.
    gs_trips-approved_time = ls_aend-uzeit.

    MODIFY gt_trips FROM gs_trips.
  ENDLOOP.

Former Member
0 Kudos

One more detail I want to know . How can we get the Create attachment date when we create a travel request in TRIP.

Thanks

christine_evans
Active Contributor
0 Kudos

We don't seem to have the option to create attachments on our TRIP screen. If you run ST05 trace in another session while creating an attachment and study the trace file afterwards, you might get more information. about what it is doing.

Former Member
0 Kudos

If you look on the top right hand corner of the screen of travel expense creation report there is a option to create attachment. So the attachment date is what I'm looking at and not the Travel Expense Creation Report date. I tried the trace also with no favourable results. also checked User Exits.

Now I'm trying through function module.

Varun

christine_evans
Active Contributor
0 Kudos

>

> If you look on the top right hand corner of the screen of travel expense creation report there is a option to create attachment. So the attachment date is what I'm looking at and not the Travel Expense Creation Report date. I tried the trace also with no favourable results. also checked User Exits.

>

> Now I'm trying through function module.

>

> Varun

Not on our screens there isn't. But then these screens are highly configurable. Do you mean a GOS attachment? If so, something like this might help.

CLEAR gt_object.
  gs_object-objkey = gs_header-doc_reference.
  gs_object-objtype = 'ZZBUSCPJ'.
  APPEND gs_object TO gt_object.

  IF g_my_object IS INITIAL.
     CREATE OBJECT g_my_object
        EXPORTING
           is_object        = gs_object
           ip_no_commit     = 'R'
        EXCEPTIONS
           object_invalid   = 1
           others           = 2.
  ENDIF.

  CALL METHOD G_MY_OBJECT->START_SERVICE_DIRECT
    EXPORTING
       IP_SERVICE = 'VIEW_ATTA'
       IS_OBJECT = gs_object
    EXCEPTIONS
       NO_OBJECT = 1
       OBJECT_INVALID = 2
       EXECUTION_FAILED = 3
       OTHERS = 4.

  IF sy-subrc <> 0.
     MESSAGE 'No attachments found.' TYPE 'I'.
  ENDIF.

Former Member
0 Kudos

yes exaclty the GOS attachment. i want not to display the attachment but to get the details of it.

details i want is the date on which the document was attached.

I don't know which function should i use.

I think we are on track.

CLEAR gt_object.

gs_object-objkey = gs_header-doc_reference.

gs_object-objtype = 'ZZBUSCPJ'.

APPEND gs_object TO gt_object.

IF g_my_object IS INITIAL.

CREATE OBJECT g_my_object

EXPORTING

is_object = gs_object

ip_no_commit = 'R'

EXCEPTIONS

object_invalid = 1

others = 2.

ENDIF.

CALL METHOD G_MY_OBJECT->START_SERVICE_DIRECT

EXPORTING

IP_SERVICE = 'VIEW_ATTA'

IS_OBJECT = gs_object

EXCEPTIONS

NO_OBJECT = 1

OBJECT_INVALID = 2

EXECUTION_FAILED = 3

OTHERS = 4.

IF sy-subrc 0.

MESSAGE 'No attachments found.' TYPE 'I'.

ENDIF.

christine_evans
Active Contributor
0 Kudos

All the services that you can use with this method are listed in table SGOSATTR - something like service SO_SENDHIST might be helpful.

Former Member
0 Kudos

yes i think no need to create any object.

this function module does the trick of getting the attachment date.

BDS_GOS_CONNECTIONS_GET

varun

Former Member
0 Kudos

Hi

just a small question. how can you import data from te cluster. i mean programatically.

one example i have got is this.

*define rp-imp-c1-te.*
*import te-version to ote-version*
*statu*
*beleg*
*exbel*
*abzug*
*ziel*
*zweck*
*konti*
*vsch*
*kmver*
*paufa*
*uebpa*
*beler*
*vpfps*
*vpfpa*
*rot*
*ruw*
*aend*
*kostr*
*kostz*
*kostb*
*kostk*
*v0split*
*editor "YKYK002848*
*user*
*from database pcl1(te)*
*id te-key.*
*rp-imp-te-subrc = sy-subrc.*
*end-of-definition.*

Can you suggest.

thanks

varun

Edited by: Varun Mathur on Feb 14, 2009 12:47 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

i think solution has been found. thanks for the replies.

former_member184619
Active Contributor
0 Kudos

Hi Varun,

Check this... It might be of some help:

http://help.sap.com/saphelp_nw04/helpdata/en/4b/5ba0713a6d4a419a617cc3644aa75c/content.htm

Post your question here :

Sachin

Edited by: Sachin Dhingra on Jan 7, 2009 1:49 PM

GauthamV
Active Contributor
0 Kudos

hi,

check this table.

FTPT_PLAN