Setview?

suvidhasuvidha Member Posts: 117
Hi,
Whats Wrong in below code?

StrOrderLineDetails.SETVIEW('SORTING(StrOrderLineDetails.Calculation Order) ORDER(Ascending)');

It gets compiled but When run it gives " ')' missing!!!"

Comments

  • BeliasBelias Member Posts: 2,998
    StrOrderLineDetails.SETVIEW('SORTING(StrOrderLineDetails."Calculation Order") ORDER(Ascending)');
    
    Quotemarks foe calculation order i think...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • suvidhasuvidha Member Posts: 117
    Nope same ERROR!!!!
  • krikikriki Member, Moderator Posts: 9,110
    Probably you don't need to put the tablename before the field.

    I tried a GETVIEW and I got this output:
    SORTING(Field10) WHERE(Field10=1(88885))
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • suvidhasuvidha Member Posts: 117
    Yeah it works without the Table name but in my case,
    I have few filters on the table n after that if i call the func without table name the out put will not have the filtered value!!!
  • krikikriki Member, Moderator Posts: 9,110
    I tried it and it works. Can you post all your code so we can check it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • XypherXypher Member Posts: 297
    IMO..
    StrOrderLineDetails.SETCURRENTKEY("Calculation Order");
    StrOrderLineDetails.ASCENDING(TRUE);
    

    edit:
    Hmm, I assume SETVIEW doesn't retain previous filters so you'll have to add a StrOrderLineDetails.RESET; at the top.


    Why is it you want to achieve this with SETVIEW? Because you don't want to do it in 3 lines? :D
Sign In or Register to comment.