i purchase order with multiple items

surisuri Member Posts: 123
q ) report which will create 1 purchase order for a vendor with multiple items

hi one and all
i have the question as shown above

i have two data items
purchase header
purchase line
processing only=yes
i have written the code in purchase header onafter the get record()

paysetup.GET;
IF "Purchase Header".FINDLAST THEN
"Purchase Header".INIT;
"Purchase Header"."No." :=nserie.GetNextNo(paysetup."Vendor Nos.",0D,TRUE);
"Purchase Header"."Document Type" :="Purchase Header"."Document Type"::Invoice;
"Purchase Header"."No." :=nserie.GetNextNo(paysetup."Order Nos.",0D,TRUE);
"Purchase Header"."Document Type" :="Purchase Header"."Document Type"::Order;
"Purchase Header"."Document Type" :="Purchase Header"."Document Type"::Quote;


"Purchase Header"."Buy-from Vendor No.":='189';
"Purchase Header".INSERT;

here it was throwing error,can any one suggest me the correct method.can any one can give better solution.
error: you cannot assign number greater then 106999 from the number series p-ord

thank you

Comments

  • lavanyaballurgilavanyaballurgi Member Posts: 235
    Its hard to find the the link between your requirement & your codes... You need a Purchase order with multiple lines and what should the line contain?
  • surisuri Member Posts: 123
    thanks for giving reply
    can any can give some suggestion,how can i solve this question
    thank you
  • lavanyaballurgilavanyaballurgi Member Posts: 235
    Sorry but I am not able to understand your requirement at all :shock:
  • surisuri Member Posts: 123
    thank you...
    this is my actual requirement
    1 . report which will create 1 purchase order for a vendor with multiple items
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    You need to create 1 Purchase Header only but you are creating unlimited purchase headers in your report which you dont know.

    No need to take any dataitems in report

    You can write code ijn OnPrereport.

    Create only 1 Purchase header.
    Create Purchase Line with 1 Item first. If it is working then You can think of creating multiple lines..
Sign In or Register to comment.