cancel
Showing results for 
Search instead for 
Did you mean: 

Can we validate ACTIVITY_TYPE from screen input in TP04 (TRIP)

Former Member
0 Kudos

I am using user exit FITR0003 to validate user data.

It works for most of my requirements but I can't seem to get access to the value the user entered in the field ACTIVITY_TYPE.

I have searched all structures from the exit. The field BEREI (in structure TRIP_HEADER) does not contain the value (I thought it would).

Since we want to force the user to enter a value, I can't find a field for this value in the user-exit. I thought there would be a field in the structure TRIP_HEADER which would reflect the screen entry.

Is there a way for me to find out which value the user has entered in this field?

Thanks in advance,

Alain Cyr.

Accepted Solutions (1)

Accepted Solutions (1)

kannan_rajagopalan
Contributor
0 Kudos

Hi,

Try structure HEAD_PERIO. you will find the component BEREI there. Check this component also KZTKT.

Best Regards,

Raj

Former Member
0 Kudos

Hi Raj,

The structure you mention HEAD_PERIO does not exist, neither does HEAD_PERIOD. TRIP_PERIOD exists but does not contain these 2 fields.

The fields BEREI and KZTKT exist in structure TRIP_HEADER and have no value even if trip was previously saved with a value.

kannan_rajagopalan
Contributor
0 Kudos

Hi,

Can you check PTRV_HEAD table, this would have necessary details that you require.

Best Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Table FTPT_HEAD has the entry for the trip but these 2 fields are empty.

The table FTPT_REQ_HEAD also has the entry for the trip but with the old values.

I need the new values, ie: the values I am trying to save.

Regs,

Alain.

Former Member
0 Kudos

Oops...

By FTPT_HEAD, I meant to say PTRV_HEAD.

Regs,

Alain.

kannan_rajagopalan
Contributor
0 Kudos

Hi,

Not sure of the solution for your query.

The last option for this is to set a break point on action of save send for approval and debug where the values are stored.

Best Regards,

Raj

Former Member
0 Kudos

Hi Raj,

If you read the thread, you can see I already tried this...

Alain Cyr wrote: Hi Sal, The field becomes BEREI when saved and is in table FTPT_REQ_HEAD. If it was previously saved, I can query this field in the table while in exit FITR0003. That's where I find the old value. But if this value was changed, I cannot find it anywhere. I tried all the structures and tables available in the user-exit, also tried looping at SCREEN to get a screen field with the value but nothing was found. I thought TRIP_HEADER-BEREI would have a value, at least the old one but no value is showing (Yes I do make sure that I am not passing an empty key as value, old = 'K', new = 'T' in this case). I am starting to think there is something other than programming involved here but I don't know much about the config as we have functional analysts here and they say everything is according to SAP rules.

I will open an OSS Note since I see no solution to this.

Thanks anyways,

Alain Cyr.

Former Member
0 Kudos

Sal has mentioned too.

I think the BEREI enterprise-specific trip type is for each expense line item, and should be available in PTK03-BERFR (BELEG - Travel Expense Specifications According To Individual Receipt) or PTK05-BEREI (ZIEL - Stopover) or PTK10-BEREI (KMVER -Leg of Trip)

Former Member
0 Kudos

Hi Fred,

Like I said before all the tables and structures in the object have been checked while in the user-exit FITR0003. None contain either the old value or the new value (which is not blank in neither case).

I even went through looping at SCREEN for any field I would find but to no avail.

I opened a note with SAP this morning so I'll post the results from this when I get it.

Thanks anyways,

Alain Cyr.

Former Member
0 Kudos

Hi Alain,

You can use the code below:


FIELD-SYMBOLS : <activity> TYPE any.

ASSIGN ('(SAPMFITP)4100_ACTIVITY_TYPE') TO <activity>.

if <activity> eq space.
  CONTINUE_WITH_UPDATE = 'N'.
  MESSAGE 'Please enter the activity type' TYPE 'E'.
endif.

regards,

Serkan

Former Member
0 Kudos

Works!!! Finally...

Thanks a lot to everyone that helped.

Alain Cyr.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Are you looking for enterprise specific trip type or activity type? Activity type is field KZTKT, its in the trip_header and ziel tables. Also, keep in mind that depending on the config, the user can select a value of the activity type but the key for that value is blank. So try debugging it with different trip type options to make sure you are not missing it because of the blank value.

Hope this helps.

Sal

Former Member
0 Kudos

Hi Sal,

The field becomes BEREI when saved and is in table FTPT_REQ_HEAD.

If it was previously saved, I can query this field in the table while in exit FITR0003. That's where I find the old value. But if this value was changed, I cannot find it anywhere. I tried all the structures and tables available in the user-exit, also tried looping at SCREEN to get a screen field with the value but nothing was found.

I thought TRIP_HEADER-BEREI would have a value, at least the old one but no value is showing (Yes I do make sure that I am not passing an empty key as value, old = 'K', new = 'T' in this case).

I am starting to think there is something other than programming involved here but I don't know much about the config as we have functional analysts here and they say everything is according to SAP rules.

Thanks anyways,

Alain Cyr.