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: 

Travel manager screen - User Data

Former Member
0 Kudos

I have created 1 new field (request dt) in the travel manager screen, appended a structure to PTK99 with this one field. Changed the layout and the flow logic of the screen and all seems to be working fine. Now i am working on a report which displays data from this appended structure ( one field only ) and another table which has person number and the trip number. My question is, since there is no person number or trip number in the structure PTK99, how do i know what 'request dt' belongs to what trip number. Can you please let me know. Do i need to add the trip number as part of the appended structure to PTK99?

Thanks in Advance!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can use the function module "HRTRV_IF_GET_TRIP" to get the trip information. The function takes the import parameters of employee and trip number. There is an exporting parameter that returns the structure PTK99.

Hope this helps,

Jerrod

13 REPLIES 13

Former Member
0 Kudos

You can use the function module "HRTRV_IF_GET_TRIP" to get the trip information. The function takes the import parameters of employee and trip number. There is an exporting parameter that returns the structure PTK99.

Hope this helps,

Jerrod

Former Member
0 Kudos

Thanks Jerrod!!

This solved my problem.

Sherry

Former Member
0 Kudos

Dear Sherry,

I need a help from you regarding the work that you have done in Travel Management, enhancing User Data Screen.

Can you pls explain me how to populate the PTK99 structure fields to "USER DATA" Screen(I m in 4.6c)

Thanks,

J. Sethu.

0 Kudos

Hi J.Sethu,

Inside MODULE D9999O_INIT , you need to insert the following code:

*start

read table user index 1.

ptk99 = user.

set cursor field 'PTK99-ZZFIELD1'.

*end

In the screen layout, you create an input/output field and name it : PTK99-ZZFIELD1.

if you have data in PTK99, it will pick that put it on the screen based on the same name i.e 'PTK99-ZZFIELD1'.

Also, the input module : module d9999i_init, should have the following code:

*start

user = ptk99.

if user[] is initial.

insert user index 1.

else.

modify user index 1.

endif.

*end

This should work.

0 Kudos

Hi Sherry,

Thanks very much for your quick reply, I also need one more information, While changing the screen 9999 please let me know whether you have applied any ACCESS KEY? Because iam also facing this problem, so iam struck up at this point where it request for an ACCESS KEY.

Thanks

J.Sethu

0 Kudos

Hi J,

Yes. For this screen you need to request an access key from SAP.

0 Kudos

Hi Sherry,

As Jerrod asked u to use "HRTRV_IF_GET_TRIP" Function Module to retrieve "User data" (PTK99) from the cluster.

I am also executing same Functional Module to get the data but its not exporting any values in that structure.

Can u pls guide me on these, where I am doing mistake...

Thanks,

Adwait Vekaria

0 Kudos

Hi Adwait,

I had some problem later with using the FM : HRTRV_IF_GET_TRIP so the following is what i am using for my report now.

You would need the personal number and the trip number. If you have those two, you can select the field perio and pdvrs from ptrv_perio.

Then you assign the following to te-key which will serve as a key to retrive info from cluster.

DATA: BEGIN OF te-key. "Key TE-Cluster

INCLUDE STRUCTURE ptp00.

DATA: END OF te-key.

te-key-pernr = p_pernr. "personal no.

te-key-reinr = wa_reinr. " trip number

te-key-perio = ptrv_perio-perio. "Number of trip period

te-key-pdvrs = ptrv_perio-pdvrs. "Seq number of period

IMPORT user

FROM DATABASE pcl1(te)

ID te-key.

LOOP AT user.

wa_it_travel-zzrequest_date = user-zzfield.

ENDLOOP.

Hope this helps...please let me know.

0 Kudos

Hi Sherry,

I was using the same code in my program but when I saw ur forums about HRTRV_IF_GET_TRIP these I thought of to take help form u, but anyway's thanks a lot for replying.

Can u pls tell me is there any BAdI available for TRIP on saving travel request along with PTK99(User Data) screen... and If not than which Exit we can use?

Thanks,

Adwait Vekaria

0 Kudos

Hi Sherry,

I am using FITR0003 Enhancement for user exit is these one is perfect or some other enhancement we need to use?

and u if u know any BAdI than I think that is what we need to do... right.

Thanks,

Adwait Vekaria.

0 Kudos

Hi Sheery,

How can we validate the data of FTPT_REQUEST (Outboud/Inbound Flight) while on pressing the Transfer button or while saving...

Thanks,

Adwait Vekaria.

0 Kudos

U should have rewarded Sherry for his earlier answers in order to get response from him

So please reward suitable answers.

Message was edited by: Samant Kumar

Former Member
0 Kudos

Hello Sheery,

Thanks for ur great great help,I want to reward for ur very userfull help but I m not able to do so b'cas of inactive topic.

Really sorry for delaying for reward point.