on 07-30-2008 5:49 AM
Hi all
I am new to sap XI, i am doing a file to idoc scenario,
how to map default value( for eg 0001) to an item field and keep on incrementing it by the occurence of no items in my file structure?
Full points are guaranteed .
Regards
Bhasker.
Hi
You can write a UDF
declare and Initialize your counter globally, and if you need to map this value to an item field then you map it using a constant.
int cnt = 0001;
and in your udf pass your item field as your input and check the value of your input if its a blank, if its not equal to a blank then increament the counter.
if(!item.equals(""))
{
cnt = cnt + 1;
{
Hope this is helpfull
Thanks
Saiyog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
here a is the input field on which basis you want the occurencerences of your output field.
int i;
int b = 001;
for(i=0; i< a.length; i++)
{
result.addValue(String.valueOf(b));
b = b+1;
}
inputfield--
>outputfield
regards
Kasturika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U can simply use counter function in Arithimatic function category.
Also u can write simple UDF for that.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
could you please elaborate your problem more .
Regard's
Chetan Ahuja
Edited by: Chetan Ahuja on Jul 30, 2008 7:04 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Any default value can be mapped by using the constants in the graphical mapping.
Is your requirement is to count the no of occurance of a field i.e. item and map it to the target field..?
If so use this mapping..
items(Source) -
-
remove contexts(node function) -
-
count (Statistic function) -
-
item field(target)
Thanks
SaNv...
Edited by: Sãnthosh Kûmãr V on Jul 30, 2008 10:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.