>This is in a loop. I'm trying to indent with TABs according to the number of LoopLevel. What happens though is as it loops through, more tabs are added to the beginning than I want. In fact, I would like to strip out any tabs in the beginning when the looping is completed. It could be none, or it could be 20. Is there a way to do that? I only include this code because the actual loop contains a lot more code than is needed here.
>
>SELE X12Message
>SCAN
> Do bunches of stuff
> oResponse.EligReport = ;
> REPLICATE(CHR(9),X12Message.LoopLevel) + ;
> oResponse.EligReport + ALLTRIM(oDetails.Desc) + ': ' + ALLTRIM(oDetails.FieldVal) + CHR(13)
>ENDSCAN
>
You can use LTRIM().
ccTAB = CHR(9)
lcStr = ccTAB + ccTAB + "text"
? lcStr
? LTRIM(lcStr, ccTAB)
--sb--