Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Please help me out . I have written the code as below: just an sample code.
In my first tab, i am using a binary load, and in that QVW my table name is ABCD.
In my second tab doing some transformations taking the resident of ABCD, below is the code:
temp1:
Load *,
Applymap('T1',CC) as Test1,
if(P1= 'No', IF(ApplyMap('T2',CC)<=R1,'ICC','SAP'),If(ApplyMap('T3',CC)<=R1,'ICC','SAP')) as Live,
if((T4='MR1M' and LEFT(P1,1)<>3)OR (P2='BAPI_OCR'AND P1='BAPI_OCR'),'Automatic','NotAutomatic') as Autoposted
Resident ABCD;
drop table ABCD;
Store temp1 into temp1.qvd(qvd);
Temp2:
NoConcatenate
Load P1,
Test1,
Live,
Autoposted
Resident temp1 ;
drop table temp1;
My problem here is :
in temp2 table i have added all the column names from temp1 table. Now i have to add a new logic to Live field whcih i have mentioned in temp1 table.
The logic is : when Autoposted = Automatic and P1 = BAPI_OCR' and P2 = BAPI_OCR' then my Live field should show "ICC" otherwise "SAP".
if i add this logic in temp1 autoposted i am deriving with som logic so i am unable to use Autposted field.
Please help me out to include the logic.
i need the new logic in temp2 table.
But you have already written the transformation on Live Column in Temp 1 like this:
if(P1= 'No', IF(ApplyMap('T2',CC)<=R1,'ICC','SAP'),If(ApplyMap('T3',CC)<=R1,'ICC','SAP')) as Live,
so do you not want this transformation to apply and would like to overwrite Live with new logic?
yes, u r correct. i need the logic to be same in temp1 and top of this i need to add the logic . But if i add in temp1 the new logic, i need to have Autoposted field which i am calculating Autposted in temp1.
So i cant write the logic in temp1.
In this case you have to use a precedent load in temp1 but original Live not make sense because it will be replaced.
I've replace the label as tmp_Live to not loose these field.
temp1: Load *, If ( Autoposted ='Automatic' and P1 = 'BAPI_OCR' and P2 = 'BAPI_OCR','ICC','SAP') as Live; Load *, Applymap('T1',CC) as Test1, if(P1= 'No', IF(ApplyMap('T2',CC)<=R1,'ICC','SAP'),If(ApplyMap('T3',CC)<=R1,'ICC','SAP')) as tmp_Live, if((T4='MR1M' and LEFT(P1,1)<>3)OR (P2='BAPI_OCR'AND P1='BAPI_OCR'),'Automatic','NotAutomatic') as Autoposted Resident ABCD; drop table ABCD; Store temp1 into temp1.qvd(qvd);
The below code is not working as Autoposted field is not found. we cant do preceding load on this. Is there anyway to solve this issue.