Skip to Content
author's profile photo
Former Member

Table control

Hi All,

I have defined a table control using wizard. Table control is based on a ABAP internal table (G_DELIVERY_DATA_ITAB

) and I have defined a explicit work area (G_DELIVERY_DATA_WA) for the internal table. I have data populated in the internal table and in the PBO I am using the following statement to move the data to the screen.

LOOP AT G_DELIVERY_DATA_ITAB

INTO G_DELIVERY_DATA_WA

WITH CONTROL DELIVERY_TAB

CURSOR DELIVERY_TAB-CURRENT_LINE.

ENDLOOP.

I can see that G_DELIVERY_DATA_WA gets the data from the internal table in the above loop ( and my screen fields are defined as G_DELIVERY_DATA_WA-VBELN, G_DELIVERY_DATA_WA-POSNR etc..) but I don't see them on the screen.

Please let me know what could be causing this problem?

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    author's profile photo
    Former Member
    Sep 29, 2005 at 08:49 PM

    Have you set DELIVERY_TAB-CURRENT_LINE?

    Rob

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 11:06 PM

    you can use following psuedo code

    i think u cant define screen fields with WA rather define them as G_DELIVERY_DATA_ITAB-fieldname.

    LOOP AT G_DELIVERY_DATA_ITAB WITH CONTROL TCTRCL.

    MODULE DISPLAY.

    ENDLOOP.

    MODULE DISPLAY OUTPUT.

    READ TABLE G_DELIVERY_DATA_ITAB INDEX TCTRCL-CURRENT_LINE

    TRANSPORTING NO FIELDS .

    ENDMODULE.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      If you have define your screen fields as G_DELIVERY_DATA_WA, in PBO module you should write

      READ TABLE G_DELIVERY_DATA_ITAB INTO G_DELIVERY_DATA_WA

      INDEX TCTRCL-CURRENT_LINE.

      IF SY-SUBRC <> 0. CLEAR G_DELIVERY_DATA_WA. ENDIF.

      instead of

      READ TABLE G_DELIVERY_DATA_ITAB INDEX TCTRCL-CURRENT_LINE

      TRANSPORTING NO FIELDS .

      If you have define your screen fields as G_DELIVERY_DATA_ITAB, it's useless the statament

      READ TABLE G_DELIVERY_DATA_ITAB INDEX TCTRCL-CURRENT_LINE

      TRANSPORTING NO FIELDS

      Max

      Message was edited by: max bianchi

  • author's profile photo
    Former Member
    Sep 30, 2005 at 05:43 AM

    Hi Chandrika,

    The code you have written should work fine. I would suggest you double-check your screen fields, data declarations etc.

    Sudha

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2005 at 06:09 AM

    Hi,

    Check the link.In this, I am handling Table control without wizard.It will help you.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table control in abap.pdf

    Kindly reward points by clicking the star on the left of reply,if it helps.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 30, 2005 at 02:50 PM

    why are u using 'transporting no fields' to your read statement?

    transporting no fields will not place the required contents in the workarea and hence in the screen fields which u defined same as the work area.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks all for your helpful answers. I have given points to all of you.

      I did solve the problem. All I did is delete the table control from the screen and add it back using the wizard and it works now. I don't know what was causing the problem since the table control definition and PBO logic is the same as before.