cancel
Showing results for 
Search instead for 
Did you mean: 

Wait time to post each IDoc

Former Member
0 Kudos

Hi Experts,

My scenario is File to IDoc with CSV as incoming file with multiple rows where each row data should be posted as an IDoc where I could achieve this and could post it to receiver SAP but now client requested to post each IDoc with wait time of say 60 sec and I tried it using below UDF.

public String timeDelay(String var1, Container container) throws StreamTransformationException{

{

try

{  Thread.sleep(50000);

}

catch (InterruptedException ie){}

return var1;

} }

But the above UDF is not working in terms of posting each IDoc with delay time of 50 sec here whereas the IDocs are posted at the same time rather with time gap.Kindly suggest.

Thanks,

Nithin.

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor
0 Kudos

Nitin,

Try this approach :

  • In your FCC parameters make "Record Set Per Message" = 1 .
  • Enable EOIO in your sender channel and give some queue name.
  • Use that UDF in the mapping.

However i haven't tried this just let me know how it reacts !

Br,

Manoj

Former Member
0 Kudos

Hi Manoj,

I already tried as Raghu suggested but I am trying to split the CSV with n number of rows in to n number of XML files.

Thanks,

Nithin.

manoj_khavatkopp
Active Contributor
0 Kudos

u tried the approach which i suggested ? what was the outcome ?

Former Member
0 Kudos

Hi Manoj, Experts,

I tried that & the IDocs are getting posted to R3 with time delay set but the issue now is some times the IDocs are going to "yellow" with status 75 which means in IDoc in processing status so that next IDoc which arrives to R3 gets failed i.e., with status 51. Kindly guide.

Thanks,

Nithin.

manoj_khavatkopp
Active Contributor
Former Member
0 Kudos

Hi Manoj,

IDocs are going to 75 status which in turn makes the succeeding IDocs to run in to error 51 status [The sales order xxxxx is currently being processed by user 'abc' ] . So this IDocs which are in 75 status stops processing of succeeding IDocs to go to 51 status.

Can we reprocess the IDocs which are in status 75 immediately with out any delay following the note?

Thanks,

Nithin.

former_member182412
Active Contributor
0 Kudos

Hi Nithin,

Change the partner profile from Trigger Immediately to background program.

schedule the report RBDAPP01 to process the IDocs every 15 minutes. This way you can avoid locking issue.

Regards,

Praveen.

Answers (1)

Answers (1)

former_member182412
Active Contributor
0 Kudos

Hi Nithin,

If you want to process the IDocs one by one why dont you use Queue Processing option in IDOC receiver channel then all the IDocs will be processed one by one, please let me know if you are not looking for this.

Regards,

Praveen.

Former Member
0 Kudos

Hi Praveen,

Thank you for your reply.I have already enabled Queue processing option but they need a time delay of 60 sec or more between each IDoc processed time.

Thanks,

Nithin.

former_member186851
Active Contributor
0 Kudos

Hello Nithin,

I had the same issue then sorted out using a bypass scenario,

Placed the file in temp folder and then processed each idoc one by one and placed in target directory.

You can try using bpm as well with the help of wait step.

Former Member
0 Kudos

Hi Raghu,

Thanks for response,can you elaborate on bypass scenario to achieve this?

-Nithin.

former_member186851
Active Contributor
0 Kudos

Nithin,

Pick the Idoc place it an temp folder, You can recordset per structure to separate each records.

Then use another file channel to pick and place the file in the target directory

Two scenarios:

Idoc-File(temp folder)

File-File(Target directory).

You can delay the processing in the second scenario sender file channel as well.

Former Member
0 Kudos

Hi Raghu,

My scenario is File to IDoc here. Suppose if there are 3 rows in excel file then each row should be posted as single IDoc and I could post it but each IDoc should be posted with wait time like 60 sec.

Now as per your suggestion 1st step : File to File where an csv with multiple rows should be splitted in to multiple XML files in receiver file folder with delay time of 2 mins say and,

In 2nd step: File to IDoc where each file that got generated based on each row of CSV should be picked up by sender file channel and each file should be posted as an IDoc to ECC.

The challenge here is how to split CSV file with n number of rows to n number of XML files with each XML file having field names same as heading in CSV file. Please suggest.

Thanks,

Nithin.

former_member186851
Active Contributor
0 Kudos

Nithin,

In the first flow why don't you convert the Excel to XML.

In the second you can split as per your requirement since the XML is in PI. And post the IDOC.

Former Member
0 Kudos

Hi Raghu,

I am converting CSV to XML and generating one XML file with all the records but please guide on the way to split single XML with multiple records and post each XML with one record each.I mean how to get XML file with only one record each on receiver side.Please find below XML structure.

Here the field names under Record are column names in CSV file. Pls find below the actual input file.

Thanks,

Nithin.

former_member186851
Active Contributor
0 Kudos

Hello Nithin,

You can do this split in the mapping of the second flow or while picking use recordset per structure to get each record separately.