cancel
Showing results for 
Search instead for 
Did you mean: 

Travel Expense Form Display

former_member190818
Active Contributor
0 Kudos

Hi,

I need to execute the travel expense form PTRV_EXPENSE_FORM in PDF. I want all the interface parameters that we need to pass to the FM.

Can you please tell me if there is any FM available to get all the information for travel when we pass trip number and employee number ?

In portal, I'm able to see Display Form button and when I click on that, it displays all the form in PDF. I need to execute from my code. Can anyone give me suggestion on this ?

Regards,

JMB

Accepted Solutions (0)

Answers (1)

Answers (1)

christine_evans
Active Contributor
0 Kudos

Try BAPI_TRIP_GET_DETAILS to get the trip information.

former_member190818
Active Contributor
0 Kudos

Hi Christine,

I've tried using that FM. It doesnt give me all the details which needs to pass to the interface of the form.

Regards,

JMB

christine_evans
Active Contributor
0 Kudos

Your other options then are to select from the TRIP tables directly eg

* Get trip data for the selected records.  Approved claims only.
  SELECT *
  INTO TABLE gt_trips
  FROM ( ptrv_head  AS a
         INNER JOIN
         ptrv_perio AS b ON b~pernr = a~pernr AND
                            b~reinr = a~reinr
         INNER JOIN
         ptrv_shdr  AS c ON c~pernr = a~pernr AND
                            c~reinr = a~reinr  )
  FOR ALL ENTRIES IN gt_scos
  WHERE a~pernr = gt_scos-pernr
  AND a~reinr = gt_scos-reinr
  AND b~antrg = c_approved.

You can also get information from payroll clusters eg

*Need this stuff to get the macro to read the TE cluster
INCLUDE rprdeftt.

DATA BEGIN OF COMMON PART cluster_definition.
  INCLUDE rprstr00.    "internal structures for TE-Transparent-Tables
  INCLUDE rpc1te00.    "PCL1-Data Travel Exp. DDIC Cluster TE
  INCLUDE mp56tt99.    "PCL1 Data User-table USER
DATA END OF COMMON PART.

    CONCATENATE gs_trips-head-pernr gs_trips-head-reinr
                gs_trips-perio-perio gs_trips-perio-pdvrs
    INTO te-key.
    rp-imp-c1-te.