cancel
Showing results for 
Search instead for 
Did you mean: 

Loading vendor data using LSMW transaction XK02

Former Member
0 Kudos

I have loaded vendors and now have an update to add and am going to use a recording via LSMW to do this and need to find the vendor number automatically from the field ALTKN (this being the old vendor number that I already have on the file.

can anyone give me an example of the abap code that would be needed to allow the LSMW to find the new vendor number that was created on the initial load.

Thanks for any help in advance

Jim

Accepted Solutions (0)

Answers (1)

Answers (1)

mihailo_sundic
Active Contributor
0 Kudos

Declaration:

data: zlifnr like lfb1-lifnr.

Select statement:

select single lifnr into zlifnr from lfb1 where lfb1~altkn EQ importstr-altkn.
(importstr is your structure to hold the incoming data)

Now you can use zlifnr as a current vendor number.

Regards,
Mihailo