Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

P/L No Classification Status Issue Description Activity Role Associate Supplier Done Supplier Delivery Scheduled Unit
0:1-0

Title : Purchase Quantities

Toolbars

call historiko()
call status()
call BrowseFilter()
call CreateSheet()
call PrintGrid()
call BrowseFilter()
call PrintGrid()
call CreateSheet()
call CloseForm(False)

Buttons

Fields


 (.PLNO)
 (.CLASSIFICATION)
 (.STATUS)
 (.ISSUEDESCR)
 (.ACTIVITY)
 (.RNAME)
 (.UNAME)
 (.BTITLE)
 (.DONE_FLAG)
 (.COMMENT)
 (.SCHEDULED_FLAG)
 (.UCODE)
 (.PLNO)
 (.CLASSIFICATION)
 (.STATUS)
 (.ISSUEDESCR)
 (.ACTIVITY)
 (.RNAME)
 (.UNAME)
 (.BTITLE)
 (.DONE_FLAG)
 (.COMMENT)
 (.SCHEDULED_FLAG)
 (.UCODE)


AutoScript

lib

proc Form_Start()

     f = TopForm()

     mode = __params[4]

     call SetCaption("Punchitem Activities")
end

proc Panels_Start()

     mode = __params[4]
     if (mode = "") then
        mode = "ALL_MODE"
     endif

     if (mode = "ALL_MODE") then

        start_sql "DATA" "KOSMOS"
         SELECT AU_PUNCHITEM.PLNO, AU_PUNCHITEM.CLASSIFICATION, AU_PUNCHITEM.STATUS,
         AU_PUNCHITEM.ISSUEDESCR, AU_STEP.AU_STEP, AU_STEP.UNAME, AU_STEP.RNAME, AU_STEP.COMM, AU_STEP.ACTIVITY
         FROM AU_STEP INNER JOIN AU_PUNCHITEM ON AU_STEP.AU_PROCESS = AU_PUNCHITEM.AU_PROCESS
         WHERE ((AU_STEP.FINISHED = 0) OR (AU_STEP.FINISHED IS NULL))
        end_sql
        q = QueryByName("DATA")

     endif
     if (mode = "USER_MODE") then

        start_sql "DATA" "KOSMOS"
         SELECT AU_PUNCHITEM.PLNO, AU_PUNCHITEM.CLASSIFICATION, AU_PUNCHITEM.STATUS, AU_PUNCHITEM.ISSUEDESCR,
         AU_STEP.AU_STEP, AU_STEP.UNAME, AU_STEP.RNAME, AU_STEP.COMM, AU_STEP.ACTIVITY
         FROM (((AU_STEP INNER JOIN AU_PUNCHITEM ON AU_STEP.AU_PROCESS = AU_PUNCHITEM.AU_PROCESS)
         LEFT JOIN AU_POS ON AU_STEP.RNAME = AU_POS.POS_D) LEFT JOIN AU_ORGAN ON AU_POS.AU_POS = AU_ORGAN.AU_POS)
         LEFT JOIN AU_USER ON AU_ORGAN.ORGAN = AU_USER.AU_USER
         WHERE ((AU_STEP.UNAME = :U) OR (AU_USER.UNAME = :U))
         AND ((AU_STEP.FINISHED = 0) OR (AU_STEP.FINISHED IS NULL))
         end_sql
         q = QueryByName("DATA")
         user = GetUserName()
         call TSetParam(q;"U";user)

     endif
     call TPrepare(q)

end

{======================================= historiko =======================================}

proc historiko()

     process = TGetFld(q,"AU_PROCESS")
     call OpenFormTop("ptBrowse";"AU_PROOD.FM";"QRY.DATA",process)

end

{===================================== status ============================================}

proc status()

     process = TGetFld(q,"AU_PROCESS")
     call OpenFormTop("ptBrowse";"AU_PROC_CLIST1.FM";"QRY.DATA",process)

end

proc Lst_DblClick()

     step_id = TGetFld(q,"AU_STEP")
     step_code = TGetFld(q,"STEP_CODE")
     if (step_id > 0) then
        call OnOpenForm_NestPager("ZONE_FIRSTEMTPY",mform)
        call OpenBPMStep("assignee",step_id,step_code)
     endif
end