‎2009 Feb 06 7:47 AM
Hi Friends,
I have two screens 200 and 500. In screen 200 i have a field End_Customer, in screen 500 i have a table control. when i select a particular record in table control and press a push button in table control it is giving me a error saying that : 'Invalid field format(screen error)'.
My requirement is that when a select particular record in table control and press the push button the record value has to be populated in screen 200, field End_Customer.
To achieve this functionality I added this code in my program, guide me where I am going wrong.
PROCESS BEFORE OUTPUT.
MODULE status_0500.
LOOP AT icustomer WITH CONTROL tctrl_custlist CURSOR tctrl_custlist-current_line.
MODULE fill_table_control.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE exit AT EXIT-COMMAND.
LOOP AT icustomer.
ENDLOOP.
MODULE user_command_0500.
MODULE status_0500 OUTPUT.
DATA : lv_lines TYPE i.
SET PF-STATUS 'SCREEN_500'.
DESCRIBE TABLE icustomer LINES lv_lines.
IF lv_lines IS NOT INITIAL.
tctrl_custlist-lines = lv_lines + 10.
ENDIF.
ENDMODULE.
MODULE fill_table_control OUTPUT.
READ TABLE icustomer INTO zdiendcust-endcust INDEX tctrl_custlist-current_line.
ENDMODULE.
MODULE exit INPUT.
LEAVE TO SCREEN 0.
ENDMODULE.
MODULE user_command_0500 INPUT.
DATA : okcode1 TYPE sy-ucomm.
okcode1 = sy-ucomm.
CASE okcode1.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'OK'.
READ TABLE icustomer INTO zdistidyn-endcustomer INDEX tctrl_custlist-current_line.
IF sy-subrc EQ 0.
LEAVE TO SCREEN 0.
ENDIF.
ENDCASE.
ENDMODULE.
Even the okcode1(Function code for OK) is not getting program by the program while debugging.
Thanks & Best Regards,
Jayarama Krishna M.
‎2009 Feb 06 7:52 AM
Hi,
Check my reply on this link:-
https://www.sdn.sap.com/irj/scn/profile?editmode=true&userid=3891471
Hope this helps you out.
Regards,
Tarun