Skip to Content
0
Former Member
May 11, 2014 at 10:17 PM

LSMW update vendor account just if the actual (old) is in the txt file

60 Views

I want to update the vendor account but just if it is the same I have in the txt file.

My txt file is the fllowing for example:

Vendor - Old Account - New Account

A2 A123 A321 A1 A133 B321 A3 A144 C321

So, for each vendor if the actual bank account number is (old account in the file) replace the actual (old account) with the new account.

In the CODE text for LSMW (check my attach) I have this:

IF FK02A-BANKN_01 = CTAS-BANKN. FK02A-BANKN_01 = CTAS-BANKNNUEVO. ENDIF.

Where:

FK02A-BANKN_01 is the FK02 text for vendor account

CTAS-BANKN is in my file and structure defined the OLD ACCOUNT

CTAS-BANKNUEVO in my file and structure defined the NEW ACCOUNT (the one should be now)

But it is not replacing, if i check converted data, this field is empty. So the if is not working. Ideas?

I changed it by

FK02A-BANKN_01 = CTAS-BANKN

or

FK02A-BANKN_01 = CTAS-BANKNNUEVO

and it works, but put the old or the new code of course, not doing the comparation with the old and replacing with the new.

Attachments

2.png (8.5 kB)
1.png (16.2 kB)