on 11-11-2009 6:30 AM
Hi Experts,
I have a 1:n multimapping where I have a mapping condition such that
If the field is empty ith should throw an error.
At the same time the n-1 records should be processed...
The UDF i have used is
if (a == "")
throw new RuntimeException();
else
return a;
As of now the entire interface fails ...
Any idea on what I should do???
Hi Ravindra,
We had a requirement like this earlier we followed this approach:
1. Used multimapping to differentiate valid and invalid records.
2. And place all the invalid record as a separate file in separate folder
3. Created a mail scenario to pick the file and send to the appropriate person
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suraj,
I have a csv file to rfc scenario..and to make multiple calls to bapi ....
as i use extended interface determination..im unable to use conditional determination...
In receiver determination..If i put the condition ..as soon as a condition is valid for one record..all records get processed...
any ideas on how to proceed for this???
Hi Ravindra,
>>as i use extended interface determination..im unable to use conditional determination...
and in thsi you are converting only valid records to bapi right??In addition to this add one more interface determination and collect all invalid records.. and use a receiver agreement and communication channel to write all these invalid records as a file...
Also in receiver communication channel choose the option to ignore if empty files.. so if any invalid records are there it will be written as a file.. else no file will be generated
Regards
Suraj
Since you are using 1:n mapping, I think you can build this logic in mapping for the rootnode of BAPI. Check the condition for field for each record and create BAPI message only when the condition satisfies.( To do this map the first node after Messages,Message1in target structure with the condition using 'if without else' fn and the remove contexts)
So if u have n records and one of them fails the condition then n-1 BAPI's calls will executed. To get notification about the failed record create one more MT for target. In mapping go to 'Messages' tab and select this along with original target MT. The occurance of both target MT's should be 0..unbounded. Now build the logic such a way that the failed record satisfies condition for second MT. So this message will be triggered only for failed records.
Now you can get notified by this message to your email using mail adapter.
So out of n records, n-1 will converted into BAPI calls and 1 be sent as mail to inform the failed record.
Edited by: nagarjuna _s on Nov 11, 2009 9:35 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
He ravi,
Ig you thow an exception,then you interface will fail when the condition true and you will see red flag in moni,its not a adviceble to use throw exception in UDF.
Check the condition mapping its self without using UDF.Why you are using runtime exception??
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
When you want stop the process there is no value for one filed,
1)its not possible to exit the flow ,you need to complete it,otherwise if you throw an exception using UDF as i mentioned it will show as red flag and interface fail.
2)Send a mail to corresponding person if there is no data for one feld,and complete the interface like this.
what you want to do if there is no data fro one filed,just exit without any alert??
Regards,
Raj
Hi Ravi,
What i understood your requirement is suppose if you have 100 records in one file you are sending as a individual BAPIs messages ,if there is no value for certain filed you need to stop the process and with alert email.
my solution for this read one record at a time from CSV,set record set per message value in sender file adapter is 1,it reads one record at a time,then check the condition in mapping,use enhanced receiver determination to check the condition.
Create one service for sending an email,use mail adapter,one bussines system for RFC.
if your condition fails(no value)then cal service to send an email,if condition succes then sal bussiness system in and develope interface mapping for the same.
You need to check the every record ,i think you can use my approach,any clarifications needed let me know.
Regards,
raj
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.