on 10-19-2016 11:18 AM
Please let me know any one knows the javascript to exclude this blank ID
*MAPPING
ID=*STR(A_)+ID
ACCTYPE=*NEWCOL(EXP)
BW_A_ID=*STR(ID)
CO_AREA=*STR(9020)
DT_COSTELEMENTGROUP=*IF(ID(1:4)=*STR(9020) then ID; *STR())
DT_COSTELEMENT=*IF(ID(1:4)=*STR(9020) then *STR(); ID)
*CONVERSION
ID=F_ACCOUNT_MSTR_CONV.xls!CONVERSION
DT_COSTELEMENTGROUP=F_ACCOUNT_MSTR_CONV.xls!DT_ACCTGRP
DT_COSTELEMENT=F_ACCOUNT_MSTR_CONV.xls!DT_COSTELEMENT
Conversion file at present :
CONVERSION:
*IF(%external%=A_9020* then js:%external%.replace(/^(A_9020)?(.+)$/, "A_$2"))
DT_ACCGRP:
*IF(%external%=9020* then js:%external%.replace(/^(9020)?(.+)$/, "$2"))
Hi All ,
I have updated transformation files *mapping section (Last two lines).
It skips the blank ID, no warnings at all and I have double checked the master data in BPC and it is working fine now.
Could you please explain this code for me?
Thanks,
Satish
*MAPPING (New)
ID=*STR(A_)+ID
ACCTYPE=*NEWCOL(EXP)
BW_A_ID=*STR(ID)
CO_AREA=*STR(9020)
DT_COSTELEMENTGROUP=*IF(ID=*STR( ) then *STR( ); ID(1:4)=*STR(9020) then ID; *STR( ))
DT_COSTELEMENT=*IF(ID=*STR( ) then *STR( ); ID(1:4)=*STR(9020) then *STR(); ID)
Old *MAPPING (Old)
ID=*STR(A_)+ID
ACCTYPE=*NEWCOL(EXP)
BW_A_ID=*STR(ID)
CO_AREA=*STR(9020)
DT_COSTELEMENTGROUP=*IF(ID(1:4)=*STR(9020) then ID; *STR())
DT_COSTELEMENT=*IF(ID(1:4)=*STR(9020) then *STR(); ID)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try conversion file with JavaScript
In transformation use:
DT_COSTELEMENTGROUP=ID
In the conversion use:
* js:/^9020/.test(%external%.toString()) ? %external% : ''
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please read here
Explanation:
In the original line:
DT_COSTELEMENT=*IF(ID(1:4)=*STR(9020) then *STR(); ID)
You are trying to get first 4 characters from ID and with empty ID it will generate error!
With
DT_COSTELEMENTGROUP=*IF(ID=*STR( ) then *STR( ); ID(1:4)=*STR(9020) then ID; *STR( ))
you first check for empty and only after - get first characters.
By the way it will still generate error if you get the ID with 1,2 or 3 characters
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JP,
I have tried A_ *SKIP and also created a dummy member
ID=*IF(ID=*STR() THEN *STR(A_TEST);*STR(A_) + ID) then tried A_TEST *SKIP but still getting warning.
Many thanks,
Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OR..in conversion file try with this
A_ *SKIP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
But why do you want to use java script for ignoring blank??? why not through transformation?
Regards,
JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.