Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update LFA1

Former Member
0 Likes
5,041

hi friends,

i have to update LFA1 table with VAT numbers and TAX codes. Input file will contain Account group(KTOKK),country key(LAND1),Vendor(LIFNR),VAT no(STCEG) and TAX code (STCD1).

my final internal table will contain all these fields

i want to write and update statement on LFA1

UPDATE LFA1 from table ITAB.

but if i write this KTOKK and LAND1 fields will also get effected in LFA1 as LIFNR is the only key field,i want only VAT and TAX codes to get effected.

i dont want to write update in loop , pls suggest any solution , i am on 4.6c

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,227

Tra to use MASS transaction not an ABAP.

BR, Jacek

Tra to use MASS transaction not an ABAP.

BR, Jacek

5 REPLIES 5
Read only

Former Member
0 Likes
3,227

Hi,

First select all the fields from LFA1 for your list of vendor and update the fields that you wanted to in the internal table. Finally use Update statement with internal table.

Hope this helps.

Regards,

Nagaraju Chidurupalli

Read only

Former Member
0 Likes
3,228

Tra to use MASS transaction not an ABAP.

BR, Jacek

Read only

Former Member
0 Likes
3,227

C,

Do NOT do direct updates to a core table like LFA1 !!

Use a BAPI or "heaven-forbid" a BDC to do this...

You ALWAYS want to stay within SAP data model... if you perform direct updates on a core table, you run a high risk of breaking the database's referential integrity.

In short... if you update LFA1 directly... you should also update your resume.

Read only

Former Member
0 Likes
3,227

You can probably use standard SAP program RFBIKR00 for this. The documentation says that you can use it to change vendors, but I have not tried it.

Rob

Read only

Former Member
0 Likes
3,227

Hi

Can you help me, how is possible update vendor data using net. connector with RFC function (or some another way to update vendors data from 3th party program). Up to now I read only data from LFA1 using net. connector (using RFC function RFC_READ_TABLE) and now I need update vendor data (e.g. NAME1, NAME2, ADRNR etc. from LFA1)

Our SAP system contains very much duplicate record (many LIFNR has the same STCD2, STCEG etc. but different NAME1 who contains typist's error or something like this. 6000 vendors has 1700 duplicates and incomplete record). Our Administrator don't know how set up SAP so that impossible create duplicite vendors! Because our system SAP contains very, very, very much elementary error, this system is not helpfull for our company.

Thank you