Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8212

Value Incorrect Problem

$
0
0

Dear Experts,

 

 

objform = objAddOn.objApplication.Forms.Item(formuid)

            orec1 = Nothing

            orec1 = objAddOn.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

            str1 = "select distinct T1.Code,T0.U_acctcode  from [@A] T0 inner join [@B] T1 on T0.U_code =T1.Code                     and T1.Code <> 'Gross' group by T1.Code,T0.U_acctcode"

            orec1.DoQuery(str1)

            counter = 0

            counter = counter + orec1.RecordCount

            orec10 = Nothing

            orec10 = objAddOn.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

            Str10 = "select U_Lcode ,U_Location  from [@C] where Docentry = '" & docentry & "'"

            orec10.DoQuery(Str10)

            If orec10.RecordCount > 0 Then

                Lcode = orec10.Fields.Item(0).Value

                Lname = orec10.Fields.Item(1).Value

            End If

            For j = 1 To orec1.RecordCount

                orec2 = Nothing

                orec2 = objAddOn.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

 

              str2 = "select sum(T1.U_" + orec1.Fields.Item(0).Value.ToString + ") from [@D] T0 inner join [@E T1 on T0.Docentry=T1.Docentry where                     T0.Docentry='" & docentry & "'"

                orec2.DoQuery(str2)

              

 

In str1 i am getting code as 'BASIC1' and same value is coming in str2 by marked query. But i want to make it as 'BASIC' in str2.

 

I used SUBSTRING but not succeeded. How to do it....

 

 

With Regards


Viewing all articles
Browse latest Browse all 8212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>