‎2007 Jun 11 8:46 PM
Hi buddies,
I created a screen like FB60(not exactly the same), which has table control in it. I put the data into the table control using my internal table.
The problem is: when i scroll down the table control it is coming out of the screen.
I used set screen 'my current screen' in my PAI logic......but it is not working.
How can i correct that? Thanks a bunch.
‎2007 Jun 11 8:50 PM
Use the Table Control Wizard instead of manually creating it:
http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm
Regards,
Ravi
‎2007 Jun 11 8:48 PM
‎2007 Jun 11 9:20 PM
Hi rich,
I am pleased.
One more interesting issue poped up right away. Actually i am creating one create screen, change screen and display screen.
The new problem:
The scroll down option for my change screen is not coming in my table control piece, but if i go back to my create screen and come back again to my change screen the scrolling option is coming.
And here is my flow logic:
********************************************************************************************
PROCESS BEFORE OUTPUT.
MODULE status_0002.
LOOP AT it_tab1 WITH CONTROL tab_wot CURSOR tab_wot-current_line.
FIELD it_tab1-c1 MODULE change_value_header.
ENDLOOP.
LOOP AT it_tab2 WITH CONTROL tab_gor CURSOR tab_gor-current_line.
FIELD it_tab2-c1 MODULE change_value_header.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT it_tab1.
CHAIN.
FIELD it_tab1-c1 MODULE change_value_header.
ENDCHAIN.
ENDLOOP.
LOOP AT it_tab2.
CHAIN.
FIELD it_tab2-c1 MODULE change_value_header.
ENDCHAIN.
ENDLOOP.
MODULE user_command_0002.
*****************************************************************************************
My modules:
MODULE change_value_header OUTPUT.
READ TABLE it_tab1 INDEX tab_wot-current_line.
READ TABLE it_tab2 INDEX tab_gor-current_line.
ENDMODULE. "change_value_header
*****************************************************************************
MODULE change_value_header INPUT.
LOOP AT SCREEN.
IF it_tab1-c1 = 1.
it_tab1-c1 = 1.
MODIFY it_tab1 INDEX tab_wot-current_line.
ENDIF.
ENDLOOP.
MODIFY it_tab2 INDEX tab_gor-current_line.
ENDMODULE. " change_value_header INPUT
*****************************************************************************
*****************************************************************************
MODULE status_0002 OUTPUT.
SET PF-STATUS 'CHANGE'.
SET TITLEBAR '002'.
ENDMODULE. " STATUS_0002 OUTPUT
*****************************************************************************
MODULE user_command_0002 INPUT.
CASE okcode.
WHEN 'ENTER'.
CLEAR okcode.
SET SCREEN '0002'.
WHEN 'SAVE'.
UPDATE 'My table' FROM internal table.
IF sy-subrc = 0.
MESSAGE 'Record Updated Successfully' TYPE 'I'.
ELSE.
MESSAGE 'Record Updation Failed' TYPE 'S'.
ENDIF.
SET SCREEN '0002'.
WHEN 'RESET'.
CLEAR : my variables.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
SET SCREEN '1000'.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " USER_COMMAND_0002 INPUT
‎2007 Jun 11 9:28 PM
Are you trying to code these TCs manually? You should be using the wizards, they will help alot, once you know what you need, you can get rid of a lot of the generated crap, but you must first know what you need. Also, you should always clear your OKCODE field in your CASE statement.
CASE okcode.
WHEN 'ENTER'.
CLEAR okcode.
SET SCREEN '0002'.
WHEN 'SAVE'.
CLEAR OKCODE. "Insert Here
UPDATE 'My table' FROM internal table.
IF sy-subrc = 0.
MESSAGE 'Record Updated Successfully' TYPE 'I'.
ELSE.
MESSAGE 'Record Updation Failed' TYPE 'S'.
ENDIF.
SET SCREEN '0002'.
WHEN 'RESET'.
CLEAR OKCODE. "Insert Here
CLEAR : my variables.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
CLEAR OKCODE. "Insert Here
SET SCREEN '1000'.
LEAVE SCREEN.
ENDCASE.This may not solve your problem with the scrolling, but I know that it would not help the situation if you were not to clear this field.
Personally, I always use the table control wizard, and since I know what I don't need from having done this many times, I get rid of a lot of the generated stuff(if it was generated at all). But I have never had to code anything related to scrolling in my programs, it just works, now if there are specific buttons on your screen for scrolling, that is a different story, but I always remove these buttons and force the user to use the scroll bar or the page up/down key on the keyboard.
Regards,
Rich Heilman
‎2007 Jun 11 10:03 PM
Looks like problem at PBO ,
PROCESS BEFORE OUTPUT.
<b>module scroll.</b> -> double click on scroll.
MODULE status_0002.
What ever you have code in PBO and just comment for time being.
module sroll.
data : g_line type i.
here t_tcdata is internal table
t_tc is table control name
DESCRIBE TABLE T_TCDATA LINES G_LINE.
T_TC-LINES = T_TC-LINES + g_line.
endmodule.
Let me know the status
‎2007 Jun 11 10:14 PM
Thanks a lot to all buddies.........I am going to use table control wizard. Will post the rest.
‎2007 Jun 11 11:40 PM
Hi all,
I have used table control with wizard, but still the problem persists. Waiting for some inputs.
‎2007 Jun 11 11:59 PM
Check the sample programs:
DEMO_DYNPRO_TABLE_CONTROL_1
DEMO_DYNPRO_TABLE_CONTROL_2
RSDEMO_TABLE_CONTROL
to see how to use table controls in dialog programming.
Regards,
Ravi
‎2007 Jun 11 8:50 PM
Use the Table Control Wizard instead of manually creating it:
http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm
Regards,
Ravi
‎2007 Jun 11 9:07 PM
I think the correct way to scroll a table control is by using FM SCROLLING_IN_TABLE.
Rob
‎2007 Jun 18 5:56 AM
‎2007 Jul 16 5:49 AM
Hi Feddie,
How you able to remove vertical scoroll?
Regards,
Trim
‎2007 Sep 09 6:38 AM
Hi,
Can you please let me know how you were able to cleae this.