cancel
Showing results for 
Search instead for 
Did you mean: 

RFC lookup--Sequence num

former_member223432
Participant
0 Kudos

Hi Experts,

I am working on RFC lookup to fetch the Sequence number..and passing this to 3 different file systems...means, it should have 3 different sequence numbers and this should get incremented on a daily basis...

we need to maintain a table in ABAP stack of PI to hold the sequence numbers..can some one provide me some idea in building this? do i have to create 3 fields in the table to store this 3 different values.. and how do i increment its values on a daily basis?

fyi, we are using one single mapping, but sending the same data to 3 diferent files( each file will have its own sequence number)

please advise.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member223432
Participant
0 Kudos

this seems to be a weird scenarion...need your advise please.

I need the sequence number only when a file is  being generated...ex: if out of 3 files, only 2 is being generated, then these two should ONLY have the sequence number and 3rd one shoud keep the old number until its file is being triggered..if there is no file being generated for 3 days...it shoudl still keep the old number...batch job for this shouldnt create a new number..the file generation is dependant on the idoc field...single IDOC is creating this files.

Do you think this can be done at PI? there is a lot dependancy....idoc is from ECC, number range used in ABAP stack of PI...mapping in PI..so much of confusion..

please advise.

former_member184681
Active Contributor
0 Kudos

Hi,

Have a look at this blog by , it precisely matches your requirement:

All you need is three separate, independent number range objects, so you need to repeat the steps described three times.

Regards,

Greg

P.S. Don't hesitate to appreciate the blog if it helps you (like or rate or both ).


former_member223432
Participant
0 Kudos

Thanks Greg,

in this case, for every execuation of mapping..it will generate a new sequence number...but in my case, i need to maintain the SAME  sequence number for the entire day and only change at night(12am) to the next level and use the new one for the next day till 12am...so on.

likewise..i need to create 3 different sequence number for 3 diferent files...i am using only ONE mapping.

please advise

former_member184681
Active Contributor
0 Kudos

So you can extend the approach suggested by Shabarish. Create a custom DB table that will contain three dates - date when the number was last assigned, in each of the three categories.

Then, develop a function module that will:

1. Check if the date for the given target system is equal to current date (sy-datum).

2. If equal, get the current number (with FM NUMBER_GET_INFO, for instance).

3. If not equal (earlier), get a new number with FM NUMBER_GET_NEXT and set the date in table to current date.

Let me know if you have further questions.

Regards,

Greg

former_member223432
Participant
0 Kudos

Thank you so very much for the logic.

I have a doubt...why do we need 3 dates here?. we would be sending 3 files once to a single target system at a common time(8pm) on a daily basis..here the target is same..but we will be sending 3 different files(having 3 different seq to it).

please advise.

udo_martens
Active Contributor
0 Kudos

Hi,

we need to maintain a table in ABAP stack of PI to hold the sequence numbers..can some one provide me some idea in building this? do i have to create 3 fields in the table to store this 3 different values.. and how do i increment its values on a daily basis?

Sounds like very basic ABAP..

What is your problem?

Regards,

Udo

former_member223432
Participant
0 Kudos

Hi Udo,

i need to maintain the sequence number in table in ABAP stack of PI and use them in PI...3 different seq number for 3 files..how can i get this? i am not good in ABAP...should i just create a table with 3 fields for 3 sequence num here..and how do i increment its value on a daily basis at a particular time?

thanks

udo_martens
Active Contributor
0 Kudos

Hi,

yes, you need a table (SE11) with 3 fields. And of course you can just use UPDATE expression. You ll get help with F1 in SE80 (ABAP workbench for developing ABAP). The table is completely independ from other tables therefore you can use simple SQL to access. Ask in ABAP forum for detailed ABAP questions. You can execute a job (scheduled program) to increment on daily basis.

If you are new in ABAP then it will be may be difficult to access the table during runtime. This can be done with ABAP DOM, what is ABAP OO, little bit sophiticated ABAP.

And of course Gregor's/Shabarish solution is at least more elegant. But you would need ABAP anyway.

Regards,

Udo

former_member223432
Participant
0 Kudos

Any valuable suggestion please?

thanks