‎2006 Nov 15 6:56 PM
I am creating a customised screen in SAP using a table control. On pressing ENTER key, the data entered in the table control is deleted.
How can I solve this issue and to default data into other columns when certain information is entered.
How is this data copied to code.
Thank you in advance
‎2006 Nov 15 7:00 PM
Hi,
Create a module UPDATE_DATA and use to update the internal table for the table control..
Ex.,
Process the table control
LOOP AT ITAB.
Module to update data.
MODULE update_data.
ENDLOOP.
MODULE UPDATE_DATA.
Check the table.
MODIFY ITAB FROM SCREEN_STRUCTURE
INDEX tc-current_line.
TC WILL BE YOUR TABLE CONTROL NAME.
If the return is not sucessful..Append a record.
IF sy-subrc <> 0.
APPEND SCREEN_STRUCTURE TO ITAB.
ENDIF.
ENDMODULE..
Thanks,
Naren
‎2006 Nov 15 7:00 PM
Hi,
Create a module UPDATE_DATA and use to update the internal table for the table control..
Ex.,
Process the table control
LOOP AT ITAB.
Module to update data.
MODULE update_data.
ENDLOOP.
MODULE UPDATE_DATA.
Check the table.
MODIFY ITAB FROM SCREEN_STRUCTURE
INDEX tc-current_line.
TC WILL BE YOUR TABLE CONTROL NAME.
If the return is not sucessful..Append a record.
IF sy-subrc <> 0.
APPEND SCREEN_STRUCTURE TO ITAB.
ENDIF.
ENDMODULE..
Thanks,
Naren
‎2006 Nov 15 7:02 PM
‎2006 Nov 16 8:19 AM
Thankyou for the valuable information guys. But I still have a problem. I am trying to create a sales order screen from BAPI - BAPI_SALESORDER_CREATEFROMDAT2.
I want to provide a table control to capture the order item. There is a structure called - bapisditm. This is what I am binding to the Table Control. I have declared an internal table in my code called order_items_in which references this structure.
in the modify module I have the foolowing code
modify order_items_in from bapisditm index itemdata-current_line.
The table Control is called itemdata.
Still after entering data, on pressing enter the data is wiped out. No data on description column is defaulted after selecting material.
How can this be achieved.
Points willbe reward. Pliz help. Its a bit urgent
‎2006 Nov 16 8:25 AM
Prince,
You have a PBO and PAI ok. When you enter data into the Table control make sure you are updating/passing the data to internal table of Table Control. Do this in PAI. Also remember when u enter data and validate PBO fires again. So if u dont update the internal table in PAI, it wont be reflected in PBO.
Hope this helps you..
Regards,
Sujin
‎2006 Nov 16 10:29 AM