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

module pool-updating values in standard table when value changed

Former Member
0 Likes
483

hai all,

i had to create an output list with fields from different tables.

i did this by creating a structure and called tat structure for table control.

now i need to display al the fields in output list, change certain values and update them in the standard tables.

can someone help me

with regards-

Sunitha.S

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
442

Hi,

You have to define an intenal table of type of the structure you defined.

Select values from various table using inner join.

populate values to the table control from the internal table in the PBO like.

LOOP AT it_emp INTO wa_empl WITH CONTROL tc_emp.

MODULE tc_insert.

ENDLOOP.

inside MODULE tc_insert;

MOVE-CORRESPONDING wa_empl TO z03empmaster.

and in PAI:

LOOP.

MODULE selectedvalue.

ENDLOOP.

and in selected value;

MOVE-CORRESPONDING z03empmaster TO wa_empl.

MODIFY it_emp FROM wa_empl INDEX tc_emp-current_line

TRANSPORTING emp_id emp_name dept dob doj grade sel.

this is just a sample code and you can customize it according to your need.

You can update the db table from this internal table. It will be having the changed values if you change any fields.

Plz reward if useful.

Regards,

Renjith Michael.

2 REPLIES 2
Read only

Former Member
0 Likes
443

Hi,

You have to define an intenal table of type of the structure you defined.

Select values from various table using inner join.

populate values to the table control from the internal table in the PBO like.

LOOP AT it_emp INTO wa_empl WITH CONTROL tc_emp.

MODULE tc_insert.

ENDLOOP.

inside MODULE tc_insert;

MOVE-CORRESPONDING wa_empl TO z03empmaster.

and in PAI:

LOOP.

MODULE selectedvalue.

ENDLOOP.

and in selected value;

MOVE-CORRESPONDING z03empmaster TO wa_empl.

MODIFY it_emp FROM wa_empl INDEX tc_emp-current_line

TRANSPORTING emp_id emp_name dept dob doj grade sel.

this is just a sample code and you can customize it according to your need.

You can update the db table from this internal table. It will be having the changed values if you change any fields.

Plz reward if useful.

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
442

Hi,

We can't update sap standard table. you can use BDC to update the table.

L.Velu.