on 11-06-2007 2:35 PM
Hi,
I am getting an SAP-XML file where in I have the source structure as
ORGANISATION (0 to unbounded)
-> TAG001(1-1)
-> TAG002 (1-1)
-> TAG019(0 to unbounded)
under TAG019 I have a filed called legacy system ID and under TAG002 I have a field called Customer Name.
Now I am creating IDOC's only when my Legacy system ID under TAG019 is "1" for every occurance of ORGANISATION.
and then populating the Customer name to Name1 segment of Debmas06 Idoc.
This is working fine.
But when I have multiple Organisations and multiple TAG019's and in which if I have legacy system Id as 2 once and 1 in the second occurance of the TAG019 in orgnaisation then this customer number is not being poplutated.
Do I need to write any UDF for this?
Please suggest.
Rgds,
Kumar
yes u need to write an udf ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Write a UDF.
Pass the two values TAG019 and TAG002 to UDF.
Now what you do is repeate the for loop as many times as the TAG019 is occurring and under the for loop write the result as TAG002.
So what is does is,suppose TAG019 is repeating 4 times then it will give you the TAG002 out put 4 times.
Thanks and Regards,
Chirag Gohil.
Hi Chirag,
I have changed a bit in the code (I have added int )
for (int i=0;i< TAG019.length;i++)
{
result.addValue(TAG002);
}
But when executed Iam getting an error as
Source code has syntax error: /usr/sap/XD1/DVEBMGS81/j2ee/cluster/server0/./temp/classpath_resolver/Mapcfad03f08d1e11dc84bc0018714e8238/source/com/sap/xi/tf/_IDD088_SCV_to_SAP_LOC_ORG_MM_.java:1399: addValue(java.lang.String) in com.sap.aii.mappingtool.tf3.rt.ResultList cannot be applied to (java.lang.String[]) result.addValue(TAG002); ^ 1 error
can you please let me know what could be the reason for this..
Rgds,
Kumar
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.