Change Payment Terms for all open and future orders, for parent and children

Eric Lehti

VIP Member
On December 31 we want to change Payment Terms for one customer and its
many children.
Change terms to 'Net 30 days' for all existing open orders and all
future orders.


*=09
In the example below, F4211 records are always purged to Sales
History (F42119) during Sales Update (DREAM writer P42800 processing
option 16).
*=09
Export from F0150 "Address Organization Structure Master" all
the children belonging to this parent (WHERE MAPA8 =3D parentNbr) to work
file CHILD.
*=09
INSERT one row into CHILD table, SET MAAN8 =3D parentNbr. The
CHILD table is now ready for the next steps.
*=09
Determine from F0014 "Payment Terms" which code exists for 'Net
30 Days'. The value ' ' is "Net 30 Days".
*=09
To change payment terms for all future orders, run this SQL
statement:

update f0301 SET A5TRAR=3D' ' where A5AN8 in (select MAAN8
from CHILD)

*=09
To change payment terms on all existing open orders, run these
SQL statements:

update f4201 SET SHPTC =3D' ' where SHAN8 in (select MAAN8 from
CHILD)


update f4211 SET SDPTC =3D' ' where SDAN8 in (select MAAN8 from
CHILD)



The system is now ready for invoicing.
 
Back
Top