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

Generalised program for updating table thry ALV

former_member194669
Active Contributor
0 Likes
1,440

Hi,

We have in production server there are some 1200 custom tables. We have requriement to create Table maintenance for all these tables.

My requirement is instead of creating table maintenance for all these tables, can you people have any generalised program to update these thru ALV .

please paste the code .

Thanks

aRs

Hi,

We have in production server there are some 1200 custom tables. We have requriement to create Table maintenance for all these tables.

My requirement is instead of creating table maintenance for all these tables, can you people have any generalised program to update these thru ALV .

please paste the code .

Thanks

aRs

8 REPLIES 8
Read only

Former Member
0 Likes
1,204

Hello,

Instead of creating Table Maintenance for 1500 Tables, Write a program with select-options program name and in the program call the FM 'VIEW_MAINTENANCE_CALL'.

Hope my suggestion will fulfil your requirement.

Reward Points, If helpful.

Kannu.

Read only

former_member194669
Active Contributor
0 Likes
1,204

Kannu,

Thanks for your reply.

If you want to call table using VIEW_MAINTENANCE_CALL, then also we need to generate Table maintenace for tables.

I like to avoid this , by creating a generalised program as Table Name as input and display in ALV ( with edit options) and save the table entries into table.

If somebody come across this situation please paste the code

Thanks

aRs

Read only

Former Member
0 Likes
1,204

Hi,

You can try using the Function module STC1_FULLSCREEN_TABLE_CONTROL

In that pass the table name in the parameter TABNAME

Thanks,

Naren

Read only

Former Member
0 Likes
1,204

Hi,

I will try creating this program..Question is ..Is just updating records is fine or you want to insert records also..

Thanks,

Naren

Read only

former_member194669
Active Contributor
0 Likes
1,204

Hi Naren,

Here some of the tables have T tables associated with them. In the case i could NOT able to use this function module STC1_FULLSCREEN_TABLE_CONTROL. Using this function module we can pass only one table at a time

I think i have to write a dynamic ALV using OOps have to write.

Thanks

aRs

Message was edited by:

aRs

Read only

Former Member
0 Likes
1,204

Hi,

Yes...You can write an ALV program with the following steps..

1) Create a dynamic internal table for the input table

2) Get all the records from the table..Make the fields open for input..

3) When the save button is pressed...save the values to the database..

Thanks,

Naren

Read only

Former Member
0 Likes
1,204

Hi,

You can use the Function module SE16N_INTERFACE..The sample code worked for me..

PARAMETERS: P_TABLE TYPE DD02L-TABNAME.

DATA: T_OUTPUT LIKE SE16N_OUTPUT OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.

SELECT FIELDNAME FROM DD03L INTO TABLE T_OUTPUT

WHERE TABNAME = P_TABLE.

IF SY-SUBRC <> 0.

MESSAGE S208(00) WITH 'Table not found'.

LEAVE LIST-PROCESSING.

ENDIF.

CALL FUNCTION 'SE16N_INTERFACE'

EXPORTING

i_tab = p_table

I_EDIT = 'X'

TABLES

IT_OUTPUT_FIELDS = T_OUTPUT

EXCEPTIONS

NO_VALUES = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Thanks,

Naren

Read only

Former Member
0 Likes
1,204

Hi,

Please try this and let me know..

Thanks,

Naren