Skip to Content
author's profile photo Former Member
Former Member

Adding Counter value in Header level in daily basis

Hi Experts,

I am sending transactional data from ECC to Third party using file.Here we are sending initial load files and incremental files.by differentiating these two file have to check the flag field.if flag filed value is coming as YES it is initial load and if it is NO then it should be incremental file.here customer asking add counter value as header for incremental files in daily basis. Per day we should get multiple incremental files at the time we should add '1' as header and next row we will populate the actual data. it keep on increasing the count value for header if incremental data is coming. please find the below example,

EX:

1. DAY 1 we have to generate 5 incremental files, for all 5 files header value should be '1

'file1:

1

1000|AAA

'file2:

1

1001|BBB

.

.

.

'file5:

1

1001|FFF

2. DAY 2 we have to generate 5 incremental files, for all 5 files header value should be '2'

'file1:

2

1000|AAA

'file2:

2

1001|BBB

.

.

.

'file5:

2

1001|FFF

Per day wise it has increase the header counter value like 1,2,3,........keep on increase daily basis.

here my scenario should be Proxy to file(FCC).

Appreciate your help.

Best Regards,

Sanjay.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jun 06, 2014 at 10:13 PM

    Hi Sanjay,

    Can you get the run date from ECC in the proxy structure. If yes, then the solution can be worked out.

    Ambrish

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Sanjay,

      This is what I can think off at the moment without the run date.

      For this solution, we need to store the value of sequence number. It can be a table or a property file.

      Lets assume it is a table.

      When you get the flag as Y for the initial load, you go and check the table if date exists already. If not, then you populate the current date and assign number 1 to the entry. This will happen for the initial load. When an incremental load happens, you go with current date and refer this table, if it matches, get the sequence number and populate in the data. So the incremental load will pick the value 1 on the first day's run

      Your query is not clear if initial load will happen again the next day.I assume it is not going to happen daily which looks logical to me.

      Now on the interface run the next day.

      When an incremental load happens, you go with current date and compare with date in the table.it will not match, then update the number as n+1 and read the number and populate in the target side.

      Simple!

      Now coming back to how you can implement this solution. It can be done by an RFC call. The table can reside on ABAP stack of PI or ECC.

      Hope it helps!

      Ambrish

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2014 at 05:48 AM

    Hi,

    Best way to handle it using RFC,d/b look up,file look up (not preferable)

    We can also handle it by java code(UDF) as below .

    for example from today you are making interface to run in PROD .

    1)set today's date as reference and populate (difference b/w today's date and 9/06/2014 ) +1 value as counter value .

    But there is a constraint here for example

    Today Interface ran ,counter =1

    Tomorrow Interface ran counter =2

    Day after Tomorrow Interface not ran

    4th day Interface ran ,counter =4 ...

    Make sure your client is OK with the above logic .If he is not then go for RFC or d/b look up.

    Regards

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.