Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys.
I have a doubt about the applymap,
There is a way to apply applymap in the Select.
I currently have 2 tables.
One that has a registration date and another does not. I want to enter the registration date to table 2, through the key field BELNR but in Select and do a Where in table two, so that the data is added daily.
TABLE1:
SELECT
CPUDT
BELNR, // DocumentNo //******************************LLAVE*****************************************//
GJAHR, // Fiscal Yr
VERSN, // Version
FROM COBK WHERE VRGNG='COIN' AND CPUDT>'$(vFecMaxCOBK)';
TABLE2:
SELECT BUZEI, // Post. row
KOKRS, // CO Area
BELNR, // DocumentNo //******************************LLAVE****************************************//
PERIO, // Period
GJAHR, // Fiscal Yr
PRODPER // Prod.Month
FROM COEP WHERE KOKRS='1000' AND WRTTP='04' AND VERSN='000' AND LEDNR='00';
Greetings.
Please post sample data and explain a bit more.
because i done see registration date in any of these two tables
no you can not use applymap in a select statement.
You will have to use a resident load of table2..
Map_CPUDATE:
Mapping Load
CPUDT,
BELNR
Resident TABLE1;
TABLE2_New:
Noconcatenate load
BUZEI, // Post. row
KOKRS, // CO Area
BELNR, // DocumentNo //******************************LLAVE****************************************//
PERIO, // Period
GJAHR, // Fiscal Yr
PRODPER ,
APPLYMAP('Map_CPUDATE',BELNR,'NA') AS NewDate
Resident TABLE2
WHERE APPLYMAP('Map_CPUDATE',BELNR,'NA')>'$(today())'
;
Drop table TABLE2;