AP_IMPORT
Description
This action is called for each record in each table declared in the 1st tab of the template. This action takes place when class [F] has been loaded to the fields declared in the template. At this stage, it contains the record to be imported. It will then be used for entry simulation, therefore it will be switched to class [M] for all the enterable fields. Class [M] will then be switched to the final class [F].
Action called from the process generated by the WWIxxxxxxx import.
Import OBJect
Simple, Grid, Combined
This action is also called during an import for which there is no OBJect.
Use
For instance, it can be used to:
complete the class [F] of the record to be imported
Some variables useful in this action:
[L]TRTMSK: generated process of screen
[L]IMPFIC : abbreviation of the current table
[L]SEPNUM: embedding level of the current table (from 1 to 8)
Example
In the sales or purchase price list import, the entry screens are generated based on the setup of each price list code. This is the reason why in this AP_IMPORT action, the open screen is closed and the screen corresponding to the price list code is opened. The process code linked to the screen is modified.
$AP_IMPORT
If GNBIMP=0 | RUPT
If [L]TRTMSK <> "W0WB1"+num$([F]PLI)+"1"
[L]TRTMSK="W0WB1"+num$([F]PLI)+"1"
GFLTPLI=[F]PLI: GFLAG=[F]PLI
Close Mask [SPLW]: Local Mask ="WB1"+num$([F]PLI)+"1" [SPLW]
Read [F:SPC]SPC0=[F]PLI
Endif
Endif
Return
$AP_IMPORT
Local Integer I1
Case IMPFIC
When "SOH"
If G_GIMP6
I1=instr(1,GIMP(6),"~")
If I1 [F:SOH]BPCORD=left$(GIMP(6),I1-1) Else [F:SOH]BPCORD=GIMP(6) Endif
Endif
When Default
Endcase
Return
In the sales order import, the case may arise when a field containing the customer number followed by the "~" character, followed by other data, needs to be imported. To load the customer number on class [F], the following AP_IMPORT action is used: