cancel
Showing results for 
Search instead for 
Did you mean: 

Different Trip number range for Different Trip Schemas

surajarafath
Contributor
0 Kudos

Hi All,

We need to assign different Trip Numbers for different Trip Schemas we have.

How can we achieve that? Please Suggest,

I also looked at BADI TRIP_WEB_NUMBER , Interface IF_EX_TRIP_WEB_NUMBER

but not implemented.

Currently we have only one range for trip number based on company code

Nr From To

01 1000000000 to 1999999999

I also look at exit MP56TFEX, FORM ex_get_number but not sure...

Please help thanksz

Accepted Solutions (1)

Accepted Solutions (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi,

for User-Exit MP56TFEX, Form ex_get_number, you could implement coding like this:

IF PTP02-SCHEM = '<schema_you_want_to_check>'.
   nr_range_nr = '<nr_range_accordingly>'.
ELSEIF.
  .... etc.
ENDIF.

For BAdI TRIP_WEB_NUMBER make an implementation and implement method IF_EX_TRIP_WEB_NUMBER~USER_EXIT_NUMBER_INTERNAL. The problem here is, the system does not provide the schema this time, because usually nr_ranges are only dependent on the personal area... I guess you would have to create additional coding to get the information you need to make a check for the schema.

Hope it helps a bit,

regards, Lukas

surajarafath
Contributor
0 Kudos

Hi Lukas,

Thank You so much for clear understanding of my problem.

Yes i do exactly got what you say,

In form ex_get_number, I can code like...

CASE : 'SCHEMA'.

WHEN 'SCHEMA1'.

NR_NUMBER_NR = '01'.

...

,....

But in BADI also i have export parameter NR_NUMBER, i can do that if i have schema there. You are right,

But we are using only EP to create a claim/Trip, so there is no way i can use the USER_EXIT..

I should only use BADI..

My question again is Can we somehow get schema in BADI or any other better way..

Thank you so much for ur help

Lukas_Weigelt
Active Contributor
0 Kudos

I'm afraid this will scarcely be possible. The BadI-Framework does not import the entire head-data of the request form. The one thing I personally find irritating, is that DATE gets populated from HEAD_DATA, but only from the date field. Whereas the structure HEAD_DATA itself contains the entire information of the head data but isn't available in runtime ... I Don't understand why SAP developed it this way...

So in my opinion this is not or only very tediously possible to realize (if it is possible, I don't know how).

Sorry I don't have better news. Maybe Sally has an idea.

Cheers, Lukas

surajarafath
Contributor
0 Kudos

Oh that means we got problem.. Thank you for your help.

I keep this thread open and active, May be some one will be there to help...

I will also try with BADI, if any improvement i post here.

surajarafath
Contributor
0 Kudos

Hi Lukas,

Finally i got the way to read the SCHEMA inside the BADI,

I got help through Forum, Please refer the link below ,

[Implementing BADI TRIP_WEB_NUMBER, problem reading a field |;

I also share my code which might useful for others,

DATA lv_name_head(30) VALUE '(SAPLPTRA_DB)WA_HEAD'.
  FIELD-SYMBOLS: <e_head> TYPE ANY.
  ASSIGN (lv_name_head) TO <e_head>.
  IF sy-subrc NE 0.
    EXIT.
  ENDIF.

Then we can get schema in <e_head>-schme

Thanks & Regards,

SUJI

surajarafath
Contributor
0 Kudos

HI Lukas,

I have one more doubt, after that i will make this thread answered, give points and close it.

The method which i am doing to have different Trip numbers for Trip Schemas. Will this good?

I mean whether any inconsistency will occur later.

Please reply and Thanks.

Lukas_Weigelt
Active Contributor
0 Kudos

Hey Suji,

that's pretty cool stuff. I didn't know you can access data from the callstack like this; learnt something new )

Thanks for sharing your solution!

Cheers, Lukas

surajarafath
Contributor
0 Kudos

Hey Lukas,

Thanks to SDN!!

Really there are many good peoples here to help.

I am very much appreciated by my client side for this solution.

I am very new to SAP (just 2 months of Experience + 10Months Academy Knowledge).

Thanks for your help also.

Answers (2)

Answers (2)

surajarafath
Contributor
0 Kudos

My Question has been answered well. And i posted my solution for further helps to others regarding this issues.

Former Member
0 Kudos

Hi,

You can use create internally a new functional module to default the trip number ranges.

Regards,

LNB

Edited by: Lakshminarasimhan Bhattacharya on Nov 10, 2011 12:43 PM