Wednesday, July 26, 2017

query.findQueryFilter to find parameter

In controller class:

protected container preRunValidate()
{
    container ret;
    QueryRun                queryRun;
    int cnt,i;
    Query                   query = this.getFirstQuery();
    QueryBuildRange range;
    QueryBuildDataSource    qbds;
    str filter = "";
   
    ret = super();

    qbds = query.dataSourceTable(tablenum(SFA_MembershipTrans));
    queryRun = new QueryRun(query);
 
    if(query.findQueryFilter(qbds,"PaymMode"))      
    {
        ret = [SrsReportPreRunState::Error, "Payment mode is not able to filter in this report"];
    }
   
    if(query.findQueryFilter(qbds,"AmountCur"))      
    {
        ret = [SrsReportPreRunState::Error, "Amount Currency is not able to filter in this report"];
    }
   
    if(query.findQueryFilter(qbds,"AmountMST"))      
    {
        ret = [SrsReportPreRunState::Error, "Amount is not able to filter in this report"];
    }
   
    return ret;
}

2 comments:

Camelliacanan said...

wow really superb you had posted one nice information through this. Definitely it will be useful for many people. So please keep update like this.

SAP HR Training in Chennai

SAP SD Training in Chennai

SAP Basis Training in Chennai

UIUX said...

IF any one interested UIUX design classes]
https://www.uiuxdesignschool.in/