on 12-18-2007 2:37 PM
Hi Forum
I need to pass an sql query as a url parameter I wrote the following code:
String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly");
applicationURL="?distACN="wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN()"&type="type"&query="strGreportQuery;
but got the following exception:
ecom.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=../../local/AgencyFee_SettlementSummaryReport/Ko_AgencyFee_PrinterFriendly?type=1&query=SELECT v.PAY_TO_ACN_NAME PAY_TO_ACN_NAME, v.DIST_ACN DIST_ACN, v.DIST_NAME DIST_NAME, v.AP_CHECK_NBR AP_CHECK_NBR, v.BATCH_NBR BATCH_NBR, TO_DATE(v.TRANS_DATE) TRANS_DATE, TO_DATE(v.AP_CHECK_DATE) SETTLE_DATE, Sum(v.QTY_DELIVERED) QTY_DELIVERED, Sum(v.TOTAL_AMT) TOTAL_AMT, Min(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_BEG, Max(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_END, (select sum(vr.qty_delivered) from VRF_ERR_DETL vr where vr.ccf_acn_nbr=v.dist_acn and to_char(vr.batch_nbr)=v.batch_nbr) TOTAL_ERR_REC From VRF_VOL_DETL v WHERE v.PAY_TO_ACN = 3182 AND v.AP_CHECK_NBR = 0 GROUP BY v.PAY_TO_ACN_NAME, v.DIST_ACN, v.DIST_NAME, v.AP_CHECK_NBR, v.BATCH_NBR, v.TRANS_DATE , v.AP_CHECK_DATE ORDER BY v.DIST_ACN, v.AP_CHECK_NBR, v.BATCH_NBR
Can someone help me out on this?
Thanks & Regards
Jaspreet Kaur
Hi,
Use URLEncoder.encode while creating the params
applicationURL="?distACN=" URLEncoder.encode(wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN())"&type="type"&query="URLEncoder.encode(strGreportQuery);
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi jaspreet,
you can try the following:
HashMap params = new HashMap();
params.put("distACN", wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN());
params.put("type","type");
params.put("query",strGreportQuery);
try {
String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly", params);
} catch (Exception ex) {
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
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.