PURTRS: Intervening in the specific field management

This entry point located in the SUBPTX processing (purchase entry transaction management) generates a "PURTRS" action.

This action aims at giving the possibility to intervene in the specific field management at the display level as well as the entry level.

All the purchase entry transactions are concerned by this entry point, that is to say the requests for quote, the purchase requests, the classic orders, the open contract orders and the invoices.

Context and operating mode

Transaction

There is a transaction in progress for the INICRE, CREATION, INIMOD and MODIF actions.

There is not transaction in progress for the RAZCRE, LIENS and APRES_MODIF actions.

Log file

There is no open log file.

Different call cases

The call is carried out when managing the entry transaction setup:

-          for requests for quotes

-          for purchase requests

-          for subcontract orders

-          for standard orders

-          for open contract orders

-          for receipts

-          for supplier returns

-          for invoices

and this for the following actions for GOBJET:

-          RAZCRE  in creation mode, initialization of the screen fields

-          INICRE  before writing the recording, loading of the file fields

-          CREATION  after writing the recording, intervention in the field parameters before the entry screen generation

-          LIENS  after each recording read, interventions in the screen fields after each recording read

-          INIMOD  before the re-write of the record, loading of the file fields

-          MODIF  after rewriting the recording, intervention in the fields parameters before the entry screen generation

-          APRES_MODIF  after entering each field, intervention on the screen fields

-          EXEBOUT  after clicking a button at the bottom of the screen. Only the "Validation" button is of interest, in this case the REP variable is set to "1" (caution, this is an alphanumeric number).

Content of the PURTRS table

The data contained in the PURTRS table concerns the storage of the purchase module entry setup that can be modified by transaction.

A specific standard must be complied with. To each field added to a screen must correspond the creation of data in the PURTRS table.

The data added can be of 4 different types :

 

 Data type

 Screen

 PURTRS table

 Menu

 Values

 A

 Header not available for entry

 AAAA

 AAAAFLG

 1

 1 = no / 2 = yes  (Display)

 B

 Header available for entry

 BBBB

 BBBBCOD

 35

 1 = enter / 2 = display / 3 = hidden

 C

 Line not available for entry

 CCCC

 CCCCFLG

 CCCCSCR

 1

 99

 1 = no / 2 = yes  (Display)

 1 = record+grid / 2 = record / 3 = grid

 D

 Line available for entry

 DDDD

 DDDDCOD

 DDDDSCR

 35

 99

 1 = enter / 2 = display / 3 = hidden

 1 = record+grid / 2 = record / 3 = grid

Available masks

 Transactions

 Entry screens

Add data

 Setup screens

Types of added data

 Requests for quote

 PQH0 Header

 Yes

 PTA1

 A - B

 PQH1 Product tab

 Yes

 PTA1

 C - D

 PQH2 Supplier tab

 No

 

 

 Purchase requests

 PSH0 header

 No

 PTD0 Header

 

 PSH1 Lines tab

 Yes

 PTD1 Parameters 1

 C

 PTD2 Parameters 2

 D

 Orders

 POH0 Header

 No

 PTC0 Header

 

 POH1 Management

 Yes

 PTC1 Parameters tab

 A

 PTC2 Header tab

 B

 POH2 Lines

 Yes

 PTC1 Parameters tab

 C

 PTC3 Line 1 tab

 D

 PTX4 Line 2 tab

 

 POH3 Total

 Yes

 PTC1 Parameters tab

 A

 PTC2 Header tab

 B

 Buyer plan

 POI1 Header and lines

 Yes

 PTC1 Parameters tab

 A - C

 PTC2 Header tab

 B

 PTC3 Line 1 tab

 D

 Contracts

 POC0 Header

 No

 PTT0 Header

 

 POC1 Management

 Yes

 PTT1 Parameters tab

 A

 PTT2 Header tab

 B

 POC2 Product

 Yes

 PTT1 Parameters tab

 A - C

 PTT3 Line 1 tab

 B - D

 PTX4 Line 2 tab

 

 POC3 Total

 Yes

 PTT1 Parameters tab

 A

 PTT2 Header tab

 B

 Invoices

 PIH0 Header

 No

 PTF0 Header

 

 PIH1 Management

 Yes

 PTF1 Parameters

 A

 PTF2 Header

 B

 PIH3 Lines

 Yes

 PTF1 Parameters

 C

 PTF3 Line

 D

 PIH4 Control

 Yes

 PTF1 Parameters

 A - C

 PTF3 Line

 B - D

Available variables

The following variables are loaded when calling the "PURTRS" action.

PACTION

GOBJET action at the origin of the call (RAZCRE, INICRE, CREATION, LIENS, INIMOD, MODIF, APRES_MODIF, EXEBOUT).

PVERSION

Numeric value of the X3 version number used (e.g. GVERSION=1.2.4  PVERSION=124).

 FJL

Transaction type currently being managed (PTA=request for quotes, PTD=purchase request, PTC=standard orders, PTT=contracts, PTF=invoices).

 MFROM

Code of the entry screen (PQH0, PQH1, PSH1, POH1, POH2, POH3, POI1, POC0, POC1, POC2, POC3, PIH0, PIH1, PIH2, PIH3 and PIH4)

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context.

Table

Significant content

Table Title

PURTRS

Yes

Purchase entry transaction

Miscellaneous remarks

The AWINDOW, AWINPAR, AMSK, AMSKZON, AMSKACT tables, as well as all the tables required for the management of the screen generation and processings are open but must not be modified in the entry point.

Use example of the entry point

#########################################################################

# Variables that can be used by the PURTRS entry point                     #

#                                                                       #

#    PACTION    : Action GOBJET at the origin of the call                  #

#    PVERSION   : Numeric value of the X3 version number           #

#    FJL        : Type of transaction in progress                          #

#    MFROM      : Code for the entry screen                             #

#                                                                       #

#########################################################################

$ACTION

Case ACTION

  When "PURTRS"

    Case FJL

      When "PTA"                    : # Request for quote transaction

      When "PTD"                    : # Purchase request transaction

      When "PTC": Gosub PURTRS_PTC : # Order transaction

      When "PTT"                    : # Contract order transaction

      When "PTF"                    : # Invoice transaction

    Endcase

  When Default:

Endcase

Return

 

#---------------------------------------------------------#

# Setup management of the specific fields in the orders  #

# ------------------------------------------------------- #

# AAAA field not available for entry in the Management tab        #

#            defined in display on the POH1 base screen   #

# BBBB available for entry in the Total tab         #

#            defined in entry mode on the POH3 base screen   #

# CCCC field not available for entry in the Lines tab         #

#            defined in display in the base screen POH2   #

# DDDD field available for entry in the Lines tab        #

#            defined in entry mode on the POH2 base screen   #

#---------------------------------------------------------#

 

$PURTRS_PTC

Case PACTION

  When "RAZCRE"

    [M:PTC1]AAAAFLG=1

    [M:PTC2]BBBBCOD=1

    [M:PTC1]CCCCFLG=1 : [M:PTC1]CCCCSCR=1 : Grizo [M:PTC1]CCCCSCR

    [M:PTC3]DDDDCOD=1 : [M:PTC3]DDDDSCR=1 : Actzo [M:PTC3]DDDDDCR

  When "LIENS"

    If [M:PTC1]AAAAFLG=0 [M:PTC1]AAAAFLG=1 : Endif

    If [M:PTC2]BBBBCOD=0 [M:PTC2]BBBBCOD=1 : Endif

    If [M:PTC1]CCCCFLG=0 [M:PTC1]CCCCFLG=1 : [M:PTC1]CCCCSCR=1 : Endif

    If [M:PTC3]DDDDCOD=0 [M:PTC3]DDDDCOD=1 : [M:PTC1]DDDDSCR=1 : Endif

    If [M:PTC1]CCCCFLG=1 Grizo [M:PTC1]CCCCSCR Else Actzo [M:PTC1]CCCCSCR: Endif

    If [M:PTC3]DDDDCOD=3 Grizo [M:PTC3]DDDDSCR Else Actzo [M:PTC3]DDDDSCR: Endif

  When "INICRE"

  When "INIMOD"

  When "CREATION", "MODIF"

    Case MFROM

      When "POH1"

        If [M:PTC1]AAAAFLG=1

          TZONE(IZON)="AAAA" : TMOD(IZON)=3: IZON+=1

        Endif

      When "POH3"

        If [M:PTC2]BBBBCOD>1

          TZONE(IZON)="BBBB" : TMOD(IZON)=[M:PTC2]BBBBCOD: IZON+=1

        Endif

      When "POH2"

        If [M:PTC1]CCCCFLG=1

          TZONE(IZON)="CCCC" : TMOD(IZON)=3: IZON+=1

        Endif

        If [M:PTC1]CCCCSCR>1

          TZONE(IZON)="CCCC" : TMOD(IZON)=9: TINT(IZON)=num$([M:PTC1]CCCCSCR): IZON+=1

        Endif

        If [M:PTC3]DDDDCOD>1

          TZONE(IZON)="DDDD" : TMOD(IZON)=[M:PTC2]DDDDCOD: IZON+=1

        Endif

        If [M:PTC3]DDDDSCR>1

          TZONE(IZON)="DDDD" : TMOD(IZON)=9: TINT(IZON)=num$([M:PTC3]DDDDSCR): IZON+=1

        Endif

    Endcase

  When "APRES_MODIF"

    If PVERSION<130

      Case zoncou

        When "CCCCFLG"

          If val(zc)=1

            [M:PTC1]CCCCSCR=1

            If !GIMPORT Affzo [M:PTC1]CCCCSCR : Grizo [M:PTC1]CCCCSCR: Endif

          Elsif !GIMPORT

            Actzo [M:PTC1]CCCCSCR

          Endif

        When "DDDDCOD"

          If val(zc)=3

            [M:PTC3]DDDDSCR=1

            If !GIMPORT Affzo [M:PTC3]DDDDSCR : Grizo [M:PTC3]DDDDSCR : Endif

          Elsif !GIMPORT

            Actzo [M:PTC3]DDDDSCR

          Endif

      Endcase

    Else

      Case COUZON

        When "CCCCFLG"

          If val(CZ)=1

            [M:PTC1]CCCCSCR=1

            If !GIMPORT Affzo [M:PTC1]CCCCSCR : Grizo [M:PTC1]CCCCSCR: Endif

          Elsif !GIMPORT

            Actzo [M:PTC1]CCCCSCR

          Endif

        When "DDDDCOD"

          If val(CZ)=3

            [M:PTC3]DDDDSCR=1

            If !GIMPORT Affzo [M:PTC3]DDDDSCR : Grizo [M:PTC3]DDDDSCR : Endif

          Elsif !GIMPORT

            Actzo [M:PTC3]DDDDSCR

          Endif

      Endcase

    Endif

Endcase

Return

 

PURTRSWIN: Intervention on the generated invoices

This entry point concerns the purchase entry transaction management. It is common to the transactions for requests for quotes, purchase requests, orders, open orders, receipts, returns and invoices.

It is used to modify the window generated by the transaction, for example to delete a specific tab.

This entry point is located in the SUBPTX processing.

Context and operating mode

Transaction

There is one transaction in progress. The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.

Log file

There is no open log file.

Different call cases

 It is called in the CREATION,  MODIF,  and ANNULE actions in the processings :

- SUBPTA: Transactions for Requests for quote

- SUBPTD: Transactions for Purchase requests

- SUBPTE: Transactions for Subcontract orders

- SUBPTC: Transactions for Orders

- SUBPTT: Transactions for Open orders

- SUBPTR: Transactions Receipt

- SUBPTN: Transactions Supplier returns

 - SUBPTF: Transactions Purchase invoices

Available masks

Transaction

Entry screens

 

Setup screens

 

 

 

Requests for quote

PQH1: Request for quote screen

PTA0: Header screen

 

 

PTA1: Parameters 1 tab

 

 

PTA2: Parameters 2 tab

 

 

 

Purchase requests

PSH0: Header screen

PTD0: Header screen

 

PSH1: Lines tab

PTD1: Parameters 1 tab

 

 

PTD2: Parameters 2 tab

 

 

 

 Subcontract orders

SCO0: Header screen

PTE0: Header screen

 

SCO1: Product management tab

PTE1: Tab Parameters

 

SCO2: Materials tab

PTE2: Documents tab

 

SCO3: Service tab

PTE3: Entry tab

 

 

 

Orders

POH0: Header screen

PTC0: Header screen

 

POH1: Management tab

PTC1: Parameters tab

 

POH2: Lines tab

PTC2: Header tab

 

POH3: Total tab

PTC3: Line 1 tab

 

POI1: Buyer plan screen

PTC4: Line 2 tab

 

 

PTX4: Line 3 tab

 

 

 

Open orders

POC0: Header screen

PTT0: Header screen

 

POC1: Management tab

PTT1: Parameters tab

 

POC2: Product tab

PTT2: Header tab

 

POC3: Total tab

PTT3: Line 1 tab

 

 

PTX4: Line 2 tab

 

 

 

Receipts

PTH1: Receipts screen

PTR0: Header screen

 

 

PTR1: Tab Parameters

 

 

PTR2: Line 1 tab

 

 

PTR3: Line 2 tab

 

 

STOETR2: Stock tab

 

 

 

Returns

PNH1: Returns screen

PTN0: Header screen

 

 

PTN1: Parameters tab

 

 

PTN2: Line 1 tab

 

 

PTN3: Line 2 tab

 

 

PTN4: Line 3 tab

 

 

 

Invoices

PIH0: Header screen

PTF0: Header screen

 

PIH1: Management tab

PTF1: Tab Parameters

 

PIH3: Line tab

PTF2: Header tab

 

PIH4: Control tab

PTF3: Line tab

Available variables

The following variables are available to define the processing to carry out:

[F :AWI]                          The [F :AWI] class is loaded and can be modified if required to intervene on the generated window.

[F :PTR]PTRTYP         Transaction type

[F :PTR]PTRNUM        Transaction code

WINREF                        Name of the reference window

                                      ="O"+Name of the OBJect ("PQH", "PSH", "POH", "POC", "PTH", "PNH", "PIH", "SCO")

NOMWIN                       Name of the window generated for this transaction

                                       ="WO"+Name of the OBJect+Transaction code 

Transaction type

Description

Object

WINREF

NOMWIN

1

Request for quote

PQH

OPQH

"WOPQH" + [F:PTR]PTRNUM

2

Purchase requests

PSH

OPSH

"WOPSH" + [F:PTR]PTRNUM

3

Orders

POH

OPOH

"WOPOH" + [F:PTR]PTRNUM

5

Open orders

POC

OPOC

"WOPOC" + [F:PTR]PTRNUM

6

Receipts

PTH

OPTH

"WOPTH" + [F:PTR]PTRNUM

7

Returns

PNH

OPNH

"WOPNH" + [F:PTR]PTRNUM

8

Invoices

PIH

OPIH

"WOPIH" + [F:PTR]PTRNUM

9

Subcontract orders

 SCO

OSCO

"WOSCO" + [F:PTR]PTRNUM

Open tables 

 Table

Processing

Significant content

Table Title

PURTRS

SUBPTA

SUBPTD

SUBPTE

SUBPTC

SUBPTT

SUBPTR

SUBPTN

SUBPTF

 Yes

Purchase entry transaction

AWINDOW

 

Yes

Window dictionary

The AWINDOW, AWINPAR, AWINBRO, AWINBOUT, AMSK, AMSKPAR, AMSKZON tables, as well as all tge tables required for the management of the screen generation and processes are open.

 

PURTRSAWB: Intervention on the browsers of the generated windows

This entry point concerns the purchase entry transaction management. It is common to the transactions for request for quotes, purchase requests, subcontract orders, open orders, receipts, returns and invoices.

It is used to modify the browsers of the window generated by the transaction.

This entry point is located in the SUBPTX processing.

Context and operating mode

Transaction

There is one transaction in progress. The GOK variable is used and tested. It is equal to 1. It can be set to 0 if the transaction is to be abandoned.

Log file

There is no open log file.

Different call cases

 It is called in the CREATION,  MODIF,  and ANNULE actions in the processes :

- SUBPTA: Transactions for Requests for quote

- SUBPTD: Transactions for Purchase requests

- SUBPTE: Transactions for Subcontract orders

- SUBPTC: Transactions for Orders

- SUBPTT: Transactions for Open orders

- SUBPTR: Transactions Receipt

- SUBPTN: Transactions Supplier returns

 - SUBPTF: Transactions Purchase invoices

Available masks

Transaction

Entry screens

 

Setup screens

 

 

 

Requests for quote

PQH1: Request for quote screen

PTA0: Header screen

 

 

PTA1: Parameters 1 tab

 

 

PTA2: Parameters 2 tab

 

 

 

Purchase requests

PSH0: Header screen

PTD0: Header screen

 

PSH1: Lines tab

PTD1: Parameters 1 tab

 

 

PTD2: Parameters 2 tab

 

 

 

 Subcontract orders

SCO0: Header screen

PTE0: Header screen

 

SCO1: Product management tab

PTE1: Parameters tab

 

SCO2: Materials tab

PTE2: Documents tab

 

SCO3: Service tab

PTE3: Entry tab

 

 

 

Orders

POH0: Header screen

PTC0: Header screen

 

POH1: Management tab

PTC1: Parameters tab

 

POH2: Lines tab

PTC2: Header tab

 

POH3: Total tab

PTC3: Line 1 tab

 

POI1: Buyer plan screen

PTC4: Line 2 tab

 

 

PTX4: Line 3 tab

 

 

 

Open orders

POC0: Header screen

PTT0: Header screen

 

POC1: Management tab

PTT1: Parameters tab

 

POC2: Product tab

PTT2: Header tab

 

POC3: Total tab

PTT3: Line 1 tab

 

 

PTX4: Line 2 tab

 

 

 

Receipts

PTH1: Receipts screen

PTR0: Header screen

 

 

PTR1: Parameters tab

 

 

PTR2: Line 1 tab

 

 

PTR3: Line 2 tab

 

 

STOETR2: Stock tab

 

 

 

Returns

PNH1: Returns screen

PTN0: Header screen

 

 

PTN1: Tab Parameters

 

 

PTN2: Line 1 tab

 

 

PTN3: Line 2 tab

 

 

PTN4: Line 3 tab

 

 

 

Invoices

PIH0: Header screen

PTF0: Header screen

 

PIH1: Management tab

PTF1: Parameters tab

 

PIH3: Line tab

PTF2: Header tab

 

PIH4: Control tab

PTF3: Line tab

Available variables

The following variables are available to define the process to be carried out :

[F :AWB]                          The [F :AWB] class is loaded and can be modified if required to intervene on the browser of the generated window.

[F :PTR]PTRTYP         Transaction type

[F :PTR]PTRNUM        Transaction code

WINREF                        Name of the reference window

                                      ="O"+Name of the OBJect ("PQH", "PSH", "POH", "POC", "PTH", "PNH", "PIH", "SCO")

NOMWIN                       Name of the window generated for this transaction

                                       ="WO"+Name of the OBJect+Transaction code 

Transaction type

Description

Object

WINREF

NOMWIN

1

Request for quote

PQH

OPQH

"WOPQH" + [F:PTR]PTRNUM

2

Purchase requests

PSH

OPSH

"WOPSH" + [F:PTR]PTRNUM

3

Orders

POH

OPOH

"WOPOH" + [F:PTR]PTRNUM

5

Open orders

POC

OPOC

"WOPOC" + [F:PTR]PTRNUM

6

Receipts

PTH

OPTH

"WOPTH" + [F:PTR]PTRNUM

7

Returns

PNH

OPNH

"WOPNH" + [F:PTR]PTRNUM

8

Invoices

PIH

OPIH

"WOPIH" + [F:PTR]PTRNUM

9

Subcontract orders

 SCO

OSCO

"WOSCO" + [F:PTR]PTRNUM

Open tables 

 Table

Processing

Significant content

Table Title

PURTRS

SUBPTA

SUBPTD

SUBPTE

SUBPTC

SUBPTT

SUBPTR

SUBPTN

SUBPTF

 Yes

Purchase entry transaction

AWINDOW

 

Yes

Window dictionary

The AWINDOW, AWINPAR, AWINBRO, AWINBOUT, AMSK, AMSKPAR, AMSKZON tables, as well as all tge tables required for the management of the screen generation and processes are open.