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 SAP standard table

Former Member
0 Likes
1,451

Hi All,

I have the following requirement i need to upload the G/L Accounts and after uploading them there are a few custom fields(Indicators) on SKA1 table that i need to upload using a custom program. Does anyone knows how it can be done or any sample code will be really appreciated.

Thanks,

David.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,246

hi

if it's a complete independent event ie from uploading GL, then u can write a custom program and do the following:

1. get the data that u wanna update in an internal table and say:

modify dbtab from itab.

2. select queries and fill the final internal table which should be of same type as SKA1 and then modify as above.

3. look for some BADIS and at the save event try inserting values to that DB tab, but this is not recommended coz the first committ is not yet over and may lead to data inconsistency.

Reward Points if it helps

regards

Gunjan

Hi All,

I have the following requirement i need to upload the G/L Accounts and after uploading them there are a few custom fields(Indicators) on SKA1 table that i need to upload using a custom program. Does anyone knows how it can be done or any sample code will be really appreciated.

Thanks,

David.

7 REPLIES 7
Read only

Former Member
0 Likes
1,247

hi

if it's a complete independent event ie from uploading GL, then u can write a custom program and do the following:

1. get the data that u wanna update in an internal table and say:

modify dbtab from itab.

2. select queries and fill the final internal table which should be of same type as SKA1 and then modify as above.

3. look for some BADIS and at the save event try inserting values to that DB tab, but this is not recommended coz the first committ is not yet over and may lead to data inconsistency.

Reward Points if it helps

regards

Gunjan

Read only

0 Likes
1,246

Hi Gunajan,

I am getting a seperate file with only the G/L Accounts and these custom fields which are all indicators that take value Y or N. So do i have to still take the whole SKA1 table in my Internal table.Actually they have created a maintanence view for this custom fields within SKA1 ne idea how the view can be updated or modified??..

Thanks,

David.

Read only

0 Likes
1,246

okay....do one thing...

use function module ALSM_EXCEL_TO_INTERNAL_TABLE and trasfer the content to internal table ie GL account and then for these GL accounts write select query from table SKA1 and fetch all the values in an internal table t_ska1 (t_ska1 like SKA1 occurs 0 with header line) and now loop at this internal table modify the field to Y or N and then when u r done with this itab:

write:

update or modify dbtab from itab.

check for one or two test case in the test client

Reward points if it helps

Regards

Gunjan

Read only

0 Likes
1,246

Hi Gunjan,

There will be no values in the SKA1 table for those fields initially, we will have to upload it based on the G/L Account from the file. So do i have to still write ne select query.

Thanks,

David.

Read only

0 Likes
1,246

Hi David,

If ur proble is solved .plz close this thread to avaoid any future modifications to the same.

regards

Gunjan

Read only

0 Likes
1,246

Its not 100% solved, i will have to tes it and i have some doubts still..

Read only

0 Likes
1,246

Why can't you upload even custom fields while uploading GL Acounts?

Is your GL Account table and screen is not enhanced?

Regds

Manohar