Skip to Content
avatar image
Former Member

table control with wizard scrolling incon

hi all,

i have  developed module pool program with table control with wizard.

in that while creating itself i checked , the scroll check box.

but when i am  executing the program , if i click the next page or any of four icon its not working , instead of that it is saving the record.

for that icon , system it self will create coding right? or we have to right any code for enable that?

i checked tha sap scn thread also and tried but its not working.

help me to slove this issue.

regards,

s.kavitha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 11, 2015 at 07:06 AM

    Hi Kavitha,

    in TC_2000_USER_COMMAND you can write code like below.

    Try to debug the code and do corresponding changes you required.

    MODULE TC_2000_USER_COMMAND INPUT.

      OK_CODE = SY-UCOMM.

      PERFORM USER_OK_TC USING    'TC_2000'

                                  'IT_EMP_DETAILS'

                                  'SEL'

                         CHANGING OK_CODE.

      SY-UCOMM = OK_CODE.

    ENDMODULE.

    FORM USER_OK_TC USING    P_TC_NAME TYPE DYNFNAM

                             P_TABLE_NAME

                             P_MARK_NAME

                    CHANGING P_OK      LIKE SY-UCOMM.

    WHEN 'P--' OR                     "top of list

             'P-'  OR                     "previous page

             'P+'  OR                     "next page

             'P++'.                       "bottom of list

          PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME

                                                L_OK.

          CLEAR P_OK.

    ENDFORM.

    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME

                                          P_OK.

    DATA L_TC_NEW_TOP_LINE     TYPE I.

      DATA L_TC_NAME             LIKE FELD-NAME.

      DATA L_TC_LINES_NAME       LIKE FELD-NAME.

      DATA L_TC_FIELD_NAME       LIKE FELD-NAME.

    FIELD-SYMBOLS <TC>         TYPE CXTAB_CONTROL.

      FIELD-SYMBOLS <LINES>      TYPE I.

    ASSIGN (P_TC_NAME) TO <TC>.

    CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.

      ASSIGN (L_TC_LINES_NAME) TO <LINES>.

      IF <TC>-LINES = 0.

      L_TC_NEW_TOP_LINE = 1.

      ELSE.

    CALL FUNCTION 'SCROLLING_IN_TABLE'

             EXPORTING

                  ENTRY_ACT             = <TC>-TOP_LINE

                  ENTRY_FROM            = 1

                  ENTRY_TO              = <TC>-LINES

                  LAST_PAGE_FULL        = 'X'

                  LOOPS                 = <LINES>

                  OK_CODE               = P_OK

                  OVERLAPPING           = 'X'

             IMPORTING

                  ENTRY_NEW             = L_TC_NEW_TOP_LINE

             EXCEPTIONS

    *              NO_ENTRY_OR_PAGE_ACT  = 01

    *              NO_ENTRY_TO           = 02

    *              NO_OK_CODE_OR_PAGE_GO = 03

                  OTHERS                = 0.

      ENDIF.

    GET CURSOR FIELD L_TC_FIELD_NAME

                 AREA  L_TC_NAME.  IF SYST-SUBRC = 0.

        IF L_TC_NAME = P_TC_NAME.

        SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.

        ENDIF.

      ENDIF.

    <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.

    ENDFORM.

    Thanks,

    Marimuthu.K

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi sir ,

      i checked my coding part , it will same as what u pasted here.

      but it is not working.

      regards,

      S.kavitha

  • avatar image
    Former Member
    Jan 12, 2015 at 05:25 AM

    Hi Kavitha,

    Good day.

    1. Have you check whether the Scroll option is checked in layout in SE41.

    2. If possible delete the screen and create again by folowing the below URL.

    3. Try to increase the TC-LINES before the below statement in PBO and check whether you can able to scroll or not.

    Thanks & Regards,

    Seshadri.

    Add comment
    10|10000 characters needed characters exceeded

    • HI Kavitha,

      Could you debug your program in at line no 94. ( G_HFW_TABLE17_lines = SY-LOOPC ).

      and provide or check the Internal Table content, is somewhere Minus ➖ sign exist for any any of the records.

      Regards.

      Praveer.