‎2007 Dec 31 7:40 AM
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
‎2007 Dec 31 10:20 AM
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.
‎2007 Dec 31 10:20 AM
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.
‎2007 Dec 31 12:16 PM
Hi,
We can't update sap standard table. you can use BDC to update the table.
L.Velu.