on 10-18-2013 10:22 PM
Hi,
I working on scenario where PI picks a Flat File through the sFTP adapter and split the records in the file and sends to ECC system. Here there are four different ECC systems where PI has to send the file. For Two SAP Systems it has to send as Idoc and another it has to send as Flat File. how do i need to proceed with this. We need to split the flat file and based on the record we need to SAP system.
Hi,
As per my scenario mentioned above PI picks the file from the (Carrier 3PL) sFTP server and split the file based on the delivery number.
I have to send the sender system (Carrier name) with the field in the idoc 'TEXT2'. I have created 15 sender business component as there are 15 carriers which send file. I little confused how do i need to give the Value mapping for the sending the carrier name with IDoc.
Note: There is no carrier name in the inbound file. We just have to send it whenever PI picks from a server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In my scenario PI has to split the file based on the delivery number ranges and send it to respective systems. Currently I have a requirement where I need to send the file to all the four receiver SAP systems if the delivery number ranges fall outside or if there is no delivery number previously it sends based on the delivery number.
what would be the best way to send based on the above condition.
Below is my message Mapping:
UDF used in Message Mapping for enhanced receivers:
public void Iterator(String[] Lower, String[] Higher, String[] VBELN, ResultList result, Container container) throws StreamTransformationException{
int i=0;
int j=0;
int k=0;
for ( i=0; i<VBELN.length;i++)
{
if ( Long.parseLong(VBELN[i]) >= Long.parseLong(Lower [j] ) &&
Long.parseLong(VBELN[i]) <= Long.parseLong(Higher [k]) )
{
result.addValue("true");
break;
}
}
if( VBELN.length == i)
{
result.addValue("false");
}
return;
UDF used in Message mapping for File to IDoc:
public void Item_Iterator(String[] VBELN, String[] Input, ResultList result, Container container) throws StreamTransformationException{
for (int i=0; i<VBELN.length;i++)
{
if (Long.parseLong(VBELN[i]) >= 80000000 &&
Long.parseLong(VBELN[i]) <= 83999999 )
{
result.addValue(Input[i]);
}
}
return;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
The above which mentioned is the code I am using in the mapping.
Five Mappings:
MM_POD_File_to_Csys_Idoc
MM_POD_File_to_Bsys_IDoc
MM_POD_File_to_Asys_File
MM_POD_File_to_Dsys_File
MM_POD_File_to_Receivers
Also How can we increase the size of an integer number since for one receiver system the delivery number ranges is as below.
|
Hi Harish,
Below is the UDF i am using for routing it to the receivers.
__________________________________
public void Iterator(String[] Lower, String[] Higher, String[] VBELN, ResultList result, Container container) throws StreamTransformationException{
int i=0;
int j=0;
int k=0;
for ( i=0; i<VBELN.length;i++)
{
if ( Long.parseLong(VBELN[i]) >= Long.parseLong(Lower [j] ) &&
Long.parseLong(VBELN[i]) <= Long.parseLong(Higher [k]) )
{
result.addValue("true");
break;
}
}
if( VBELN.length == i)
{
result.addValue("false");
}
return;
Hi Vijay,
The given code is not giving any syntax error. but i am bit confuse with the logic you want to implement with the code. If the delivery number is in the range you are passing true and comming out of the loop with the break statment.
So it mean you can not have more then one delivery no is the input file?
Please provide the full logic so we can try to help you.
regards,
Harish
Hi Harish,
The scenario is where PI picks a Flat File through the sFTP adapter and split the records in the file and sends to ECC system. Here there are four different ECC systems where PI has to send the file. For Two SAP Systems it has to send as Idoc and another it has to send as Flat File.
The Condition here is we need to split the file based on the delivery number ranges(a file can have multiple delivery numbers) and in case if the delivery number ranges falls outside the required range or if there is no delivery number on the file then we need to send the file to all the four SAP Systems.
Hi Harish,
Below is the format of the file and the delivery number comes in the first column. One file will have different delivery numbers and based on that we need to send to the respective receiver systems.
98350000|20111213|6330| SU|20111213|2058||000063365| 6336598350000009| | |
80678826|20111213|6330| SU|20111213|2058||000063365| 6336580678826002| | |
80678824|20111213|6330| SU|20111213|2058||000063365| 6336580678824008| | |
80678775|20111213|6330| SU|20111213|1957||000063365| 6336580678775003| | |
Hi Vijay,
As per your file one line will have one message. If you want to split it in mapping then remove the break statment from your code and test.
Other wise you can read the file record by record (use the option in sender channel) and you receive one message XML per delivery number, then you need to take care only the routing logic in receiver determination.
regards,
Harish
You can use enhanced Interface determination to decide the targets based on data coming out during mapping . Here you have to create 4 service interfaces for different target systems. Please use this link as a starting point... This is feasible even without bpm. Because your target systems (both idoc and file are async based - all are same mode) .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actually there are thirteen send carriers which send file to PI with same Flat file format. What condition/modules should i use sender channel put for splitting the file.
The delivery document number ranges to be used for splitting records in the inbound files are:
BPP Delivery Doc Number Ranges |
|
|
Internal | Range S | Range E |
23 | 95550000 | 109999999 |
Z3 | 2000000000 | 2000999999 |
|
|
|
IPP Doc Number Ranges |
|
|
Internal | Range S | Range E |
17 | 10000000 | 82999999 |
External | Range S | Range E |
18 | 85000000 | 88999999 |
Hi,
I am getting an error in Moni as below. not sure where exactly the error in mapping.
My scenario is like picking a flat file and splitting it into four based on delivery number ranges and sending it to different SAP systems. In the message mapping i used UDF_iterator. Can anyone suggest is there any other I can work on this scenario.
Note: I have to send as Idoc for two systems and as flat file for another two systems.
Error when determining the receiver: Problem while determining receivers using interface mapping: Runtime exception occurred during application mapping com/sap/xi/tf/_MM_POD_File_to_Receivers_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns1:Receivers/Receiver; root message: Ex~ Problem while determining receivers using interface mapping: Runtime exception occurred during application mapping com/sap/xi/tf/_MM_POD_File_to_Receivers_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns1:Receivers/Receiver; root message: Ex~ Runtime exception occurred during application mapping com/sap/xi/tf/_MM_POD_File_to_Receivers_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns1:Receivers/Receiver; root message: Ex~
Hi Vijay,
you got the error in MM_POD_File_to_Receivers mapping in receiver determination step.
Please run the payload in the mapping to troubleshoot the issue.from the error message it seems that "/ns1:Receivers/Receiver" is not genrated. Please insure that you have all the rules at receiver node and not at the service field.
Regards,
Harish
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.