Application Development and Automation 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: 
Read only

Trip User Data Problem

Former Member
0 Likes
2,708

Hi,

We have a peculiar problem with TRIP USER DATA user exit.

We added 2 fields to TRIP USER DATA screen and they are getting displayed as expected.

We also had done the needed coding in SCREEN 9999 in SAPMPT56T program.

And we tested it and the USER EXIT is working perfect.

But recently the same user exit is not working for few trips. Like the USER EXIT is working fine for remaining employee Trips, but this is not working fine for very few trips.

I dont understand why there is a problem only for few employees.

Any idea?

Regards,

<b><i>Raja Sekhar</i></b>

27 REPLIES 27
Read only

Former Member
0 Likes
2,611

Hi,

1.Check it out the conditions for any specific user or any clinet.

2. Check out parameters in fmodule dynp_values_read

for programname and dynpro if u use this fm.

I want the coding to upload the BAPI which inserts the data into the tp01. Please send me the code.

rgds

p.kp

Read only

0 Likes
2,611

Well,

There is no condition that is specific to user or client.

Well, there is an internal table USER in the program <b>SAPMP56T</b> which gets data from the Cluster. Means, whatever data which you enter in UDATA Screen gets stored in this cluster.

In few cases, my USER DATA values are not getting stored in the clusters itself. Persistence is not there for few trips only. Remaining trips is working absolutely fine.

We are not using using the Function module DYNP_VALUES_READ in this context.

And I dont have the coding for BAPI Upload for TP01 Insertion.Sorry yaar.

Regards,

<b><i>Raja Sekhar</i></b>

Read only

0 Likes
2,611

HI,

Test it by using message information whether the values are coming correct or not.

rgds

p.kp

Read only

0 Likes
2,611

Hi,

I dont get you. Can you tell us what this MESSAGE information means?I kept a BREAK-POINT in that USER EXIT and finding the contents of USER Internal Table. I dont find any value.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

Former Member
0 Likes
2,611

What do u mean when you say it is not working. Is it not going into user exit at all? In that case u need to check the condition under which the exist is firing. If it is hitting the user exit but not doing as per your requirement then it has to be problem in the code or the data which is being presented to the user exit.

Read only

0 Likes
2,611

Hi Abhijit,

Well, the control is going to my USER EXIT. And in fact I dont find any mistake with my coding. If it has a problem, it must have given an error during the CREATION of other trips right.

See, there is an Internal table <b>USER</b> which has the stored USER DATA VALUES which retrieves data from CLUSTER TABLE automatically. For most of my cases, this USER internal table had some data. Except for a very few cases. I dont understand why this USER internal table is not getting populated in very few cases.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

Former Member
0 Likes
2,611

As u have already found that this internal table is not getting filled for some users, I think u need to debug now the program and identify the condition where it is probably deleting entries from the table or not retriving data from the database.

Read only

0 Likes
2,611

Yes abhijit,

I will debug it now and try to find out the problem with those trips.

Thanks for the timely reply.

Regards,

Raja Sekhar

Read only

Former Member
0 Likes
2,611

Hi.

I need a clarification.

I need to add two customer defined fields in TRIP.

When trying to change SCREEN 9999, it asks for the access key. Is this how it works or am i going wrong somewhere ?

Regards

Divya

Read only

0 Likes
2,611

Hi Divya,

Please find the following documentation.

Screen Modifications: Adjustment of "User Data" Screen

-


Use

The screen User Data, Screen 9999 is permanently anchored to the menu in the Travel Expense Manager, however you must still activate it using transaction FITVFELD. After it has been activated, you can find it in the Travel Manager screen under Extras -> User Data. It is designed for entering self-defined data. For example it can be used to execute the following additional functions:

- Entering KM balance at the start of a trip.

Entering the departure location

The data required for the functions must be defined in structure PTK99 first. The structure PTK99 defines table USER, the table that stores the data in the database.

Screen 9999 is not for programming your own call screen 9999 or set screen 9999 calls.

Activities

The required activities are described here in the form of an example:

You want to enter the kilometer balance at the start of a trip. Table USER has already been defined (using structure PTK99) in the data description for a trip (Cluster TE). The reading and writing of this

table has also already been set up.

You need to complete the following activities:

1. Choose Tools -> ABAP Workbench -> Development -> Dictionary(Transaction SE11).

a) Create the domain ZZ_KM with type DEC and a length of 6, and activate it.

b) Create the data element ZZ_KM with domain ZZ_KM, and activate this as well.

c) Extend the structure PTK99 to include field ZZ_KM from domain ZZ_KM and activate it.

2. Choose Tools -> ABAP Workbench -> Development -> Interface -> Screen Painter (Transaction SE51).

a) Call up program SAPMP56T and screen 9999.

b) in the Layout Editor create the entry field PTK99-ZZ_KM with the field description, for example Kilometer/Miles Balance.

c) In Flow Logic, fill the PBO-Modul D9999O_INIT;

Data transfer table User (TE-Cluster) -> PTK99 (Screen field):

<i>module d9999o_init output.

...

*{ INSERT

read table user index 1.

ptk99 = user.

set cursor field 'PTK99-ZZ_KM'.

*} INSERT

endmodule.</i>

d) Fill the PAI-Modul D9999I_INIT;

Data transfer PTK99 (Screen field) -> Table USER (TE-Cluster):

<i>module d9999i_init.

*{ INSERT

user = ptk99.

if user[] is initial.

insert user index 1.

else.

modify user index 1.

endif.

*} INSERT</i>

e) Activate the user data for all of the trip schema required(Transaction FITVFELD) and define the description for your user data. The transaction now appears on the User Data tab with the contents as defined by you.

Further notes

For more general information about modifications, see the SAP Library under Basis -> ABAP Workbench -> BC - Changing the SAP Standard -> Modifications.

Basically, the new data must be transfered into internal table USER. Only in this case the new data will be updated in Cluster TE.Therefore, check the modules 'MODULE D9999O_INIT' (in PBO) and

'MODULE D9999I_INIT' (in PAI) in the flow logic of screen 9999 (transaction SE51, program SAPMP56T)

In PBO (MODULE D9999O_INIT) you should transfer the data of table USER into the new dynpro fields. In PAI (MODULE D9999I_INIT) you should transfer the new dynpro fields into internal table USER. Please note

that the internal table USER has the structure PTK99 too.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Hi.

Thanks for the input.

Now i have created new field in the screen 9999 and done the necessary coding.

However , the new User tab appears in Travel Expense Manager. When i click on this tab , i get the following error ..

"Screen SAPMP56T 9999 must be an include screen (screen error) "

Also, I require this field in Travel Manager screen. ( Travel request creation). This field needs to be displayed as a part of the itenary.

Your inputs will be highly appreciated.

Thanks

Divya

Read only

0 Likes
2,611

Hi,

I hope your functional guy must have to activate the USER DATA Option for getting the <b>UDATA</b> button in <i>Travel Request</i> transaction in the <b>SCHEMA</b> Definition using <b><i>FITVFELD</i></b> transaction.It's a part of FUNCTIONAL CONFIGURATION.If your functional guy needs any input,I am ready to help in these regards.

And coming to your problem.

Did you get to create your fields in the <b>PTK99</b> structure first?

And did you include those fields in the SCREEN 9999?

And did you activate the SCREEN 9999?

Please let us know so that I can help you out accordingly.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

We have checked the User Data using FITVFELD transaction for all trip schemas and given an arbitary description in Name field.

Also i have appended a structure to PTK99 which consists of the additional field and the screen has been activated too.

The tab in getting displayed in Trip Expense Manager screen. But when i click on it...i get the error...that i had mentioned in the prev mail.

Thanks

Divya

Read only

0 Likes
2,611

Hi Divya,

Please refer this NOTE 327771.

Hope this NOTE should clear your problem.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Thanks Raja Sekhar for the input. However , the problem is not yet resolved.

Can you please tell me the various steps involved in activating the user screen through the transaction FITVFELD . Just wanted to cross check with whatever has been done.

Thanks in advance.

Regards

Divya

Read only

0 Likes
2,611

Hi Divya,

Can you check my above reply for Step-by-Step solution.

I hope that should do?

BTW,Did you apply that NOTE(<b>327771</b>).If you do that,I hope the problem must be cleared.

Regards,

<b>Raja Sekhar</b><i></i>

Read only

0 Likes
2,611

Hi Divya,

Coming to <b>FITVFELD</b> User Data Activation. Here are the Steps which we should follow.

1) We are using the <i>TRIP PROVISION VARIANT 99</i>.

2) Under this we have several Schemas. In each Schema, We had enabled the <b>USER DATA</b> provision with proper description.

That should do, I hope.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Hi

We need to upload the trip details into SAP from an external web application.

While we can use BAPI_TRIP_CREATE_FROM_DATA to create the trip details , is there any way of updating the User field that we have created ?

Regards

Divya

Read only

0 Likes
2,611

Hi Divya,

Why dont you go by BDC ?

Because, as per my knowledge,there is no standard way of uploading the USERDATA.

Better, you post the same question as a seperate question in SDN ABAP Forum.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Hi

There is this Function Module 'FITP_CREATE_TRIP_FROM_REQUEST' that can be used to create a trip. Even the User data gets updated.

Thanks

Divya

Read only

0 Likes
2,611

Hi Divya,

While changing the screen 9999 please let me know wheather you have applied any ACCESS KEY? Because iam also facing the same problem, so iam struck up at this point where it request for an ACCESS KEY.

Thanks

J.Sethu

Read only

0 Likes
2,611

Yes Sethu,

I think you got to get the access key.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Hi Raja shekar,

Thanks for your reply, please tell me the user exit which was used while saving the travel request.

along with PTK99 screen 9999.

Thanks and Regards

J.Sethu

Read only

0 Likes
2,611

Hi Sekhar,

Can u pls help me how should I validate the Flight Outbound/Inbound data while on saving the Trip data???

Thanks,

Adwait Vekaria.

Read only

0 Likes
2,611

Hi Adwait Vekaria,

Well, why dont you try <b>FITR0005</b> Enhancement...

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Hi Sethu,

I think you got to try with <i><b>FITR0005</b></i> Enhancement...

Regards,

<i><b>Raja Sekhar</b></i>

Read only

0 Likes
2,611

Hi,

I have also got the similar requrement of adding custom fields in TRIP(Create Travel Request).Can you please give me the steps u have followed in adding the custom fields.