UPDSTOSRD: Update of the specific/custom files after the modification of the sto

This entry point acts during the modification of the stock movements for a return line.

It is used to take control after all the updates in order to update the specific/custom tables and fields.

It is called in the return management, in return modification, during the use of right click "Receipt modification" available from a return line having been the object of a return to stock.

Context and operating method

Transaction

There is one transaction in progress. This is the stock movement and return update transaction.

To cancel the transaction if there is a problem, the GOK variable must be set to 0.

Log file

There is no open log file.

Call context

The PE is located at the level of the receipt modification window, after having entered the modification and used the "Save" button.

It is called in the ENR action of the SAISTOENTM action.

It is located in the stock movement update transaction. The update of the stock has been carried out as well as the update of the original document (return line and return header).

Available variables and masks

The [M :SRH1] screen is on line and loaded with the return data and with the new values arising from the stock modifications.

The LLIGDOC and NOL variables contain the index of the return line that is being processed in the return line grid.

The LQTYSTU table contains the STK quantity entered in the receipt modifications window. It corresponds to the new return quantity in STK.

The LCOEF variable contains the conversion coefficient used in the window. If there are several stock movement lines, it is only entered if the coefficient is unique for all the lines.

The LPCU variable contains the unit used in the window. If there are several stock movement lines, it is only entered if the unit is the same on all the lines.

The update of the stock has been carried out as well as the updates the return line and the header. The [F :SRD] and [F :SRH] classes are therefore updated.

It should be noted that all the movements for the line have been deleted, the return line has also been deleted in the grid of the lines [M :SRH1] and in [F :SRD]. If there is only this line on the return, the return has been deleted in [F :SRH].

The corresponding updates are also carried out : Update the shipment or the supplier return if the requirement existed, update of the statistics and customer movements.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...

Table

Significant content

Table Title

SDELIVERY

Yes

Shipment header

SDELIVERYD

Yes

Shipment line

SRETURN

Yes

Return header

SRETURND

Yes

Return detail

SORDER

No

Order headers

SORDERQ

No

Order line quantities

SORDERP

No

Order line prices

BPARTNER

No

BP

BPCUSTOMER

No

Customers

BPDLVCUST

No

Ship-to customers

ITMMASTER

No

Products

ITMSALES 

No

Products - Sales

ITMBPC

No

Products - Customers

ITMBPS

No

Products-Suppliers

ITMMVT

No

Product - Movements

ITMCATEG

No

Product categories

ITMFACILIT

No

Products-site

TABSTORUL

No

Stock management rules

TABUNIT

No

Unit of measure table

TABSTASTO

No

Stock statuses table

STOCK

No

Stock

STOJOU

No

Stock journal

STOLOT

No

Lots

STOSER

No

Serial numbers

STOALL

No

Allocations

STOCOST

No

FIFO stock costs

STOLOC

No

Locations

TABLOCTYP

No

Location type table

PRETURN

Yes

Supplier return header

PRETURND

Yes

Supplier return detail

PRECEIPTD

No

Supplier receipts

PORDERQ

No

Supplier order detail