MAJPNHEND: Execution of a process after the validation of a return

This entry point is located in the TRTACHRET1 processing for return validation and generates a "MAJPNHEND" action.

The aim of this action is to provide the possibility to execute a program after the validation of a supplier return, for example to generate an export to an external software package.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

The EP is called after each validated return.

Available variables and masks

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

WRETOUR

Validated return number

WTRT

Processing code

1 = The processing is called from the validation button of the return management

2 = The processing is called from the return validation function

The following file class is loaded: [F:PNH]

The variables and classes given above must not be modified.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current return is loaded, etc).

Table

Significant content

Table title

PRETURN

Yes

Purchase return headers

PRETURND

Purchase return lines

ITMMASTER

Products

ITMBPS

Products - Suppliers

FACILITY

Sites

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

PRECEIPT

Purchase receipt headers

PRECEIPTD

Purchase receipt lines

PORDER

Purchase order headers

PORDERQ

Purchase order quantity lines

PORDERP

Purchase order price lines

PORDERC

Contract product lines

PPRICLINK

For price list search

BPSUPPLIER

Suppliers

BPARTNER

A/P - A/R Accounting

BPSUPPMVT

Supplier transactions

STOCK

Stock

STOLOT

Lot numbers

STOJOU

Stock journal

STOSER

Serial numbers

STOALL

Allocations

TABCOEFF

Coefficients

TABUNIT

Units of measure

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Miscellaneous remarks

The return validation has been executed if GOK=1 and [F :PNH]CFMFLG=2

MAJVALRET: Additional updates upon confirmation of a return line

This entry point is located in the TRTACHRET1 processing for return validation and generates a "MAJVALRET" action.

The aim of this action is to provide the possibility to perform additional updates during the validation of a return line. A possible update would be, for example, the re-creation of a sub-contract order line with the creation of its operation.

Context and operating mode

Transaction

There is one transaction in progress. Can be aborted by setting GOK to 0.

Log file

There is an open log file.

Different call cases

The EP is called for each validated return line.

Available variables and masks

The following variables are loaded at the time of the call to the "MAJVALRET" action.

WTRT

Processing code

1 = The processing is called from the validation button of the return management

2 = The processing is called from the return validation function

NUMRET

Return number being processed

LINRET

Return line being processed

MAJFLG

Flag for the updates performed for order reintegration

1 = None, no order reintegration

2 = Reintegration in order on the same order line

3 = Reintegration in order on a new line for the same order

4 = Reintegration on a line of a new order

The following file classes are loaded: [F:PNH], [F:PND], [F:ITM]

The variables and classes given above must not be modified.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current return is loaded, etc).

Table

Significant content

Table title

PRETURN

Yes

Purchase return headers

PRETURND

Yes

Purchase return lines

ITMMASTER

Yes

Products

ITMBPS

Products - Suppliers

FACILITY

Sites

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

PRECEIPT

Purchase receipt headers

PRECEIPTD

Purchase receipt lines

PORDER

Purchase order headers

PORDERQ

Purchase order quantity lines

PORDERP

Purchase order price lines

PORDERC

Contract product lines

PPRICLINK

For price list search

BPSUPPLIER

Suppliers

BPARTNER

A/P - A/R Accounting

BPSUPPMVT

Supplier transactions

STOCK

Stock

STOLOT

Lot numbers

STOJOU

Stock journal

STOSER

Serial numbers

STOALL

Allocations

TABCOEFF

Coefficients

TABUNIT

Units of measure

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Miscellaneous remarks

When calling the entry point:

·               You are within a For Next loop, PRETURND [PND] file

·               The return line has been re-written.

· If the product is not a subcontracting product, and if this is requested during the entry of the return, the order reintegration is performed.