Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table control with Wizard issue

former_member188791
Participant
0 Likes
536

Hi Group,

In custom screen (tab scrip)I created table control with wizard and displaying custom table entries , when i created table control with wizard its automatically created PBO and PBI ,but I am facing issue with data display in TC , I am entering werks value in first screen ,it need to pick up entries

corresponding to werks from table zds0018 and needs to display ,its wowrking fine for the first time , when I am second time entring different werks its showing still first time retrieval valus, can any body suggest how I can do the refresh in system generated code.

PROCESS BEFORE OUTPUT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'ZTC_FLEET'

   MODULE ZTC_FLEET_INIT.

*&SPWIZARD: MODULE ZTC_FLEET_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE ZTC_FLEET_CHANGE_COL_ATTR.

   LOOP AT   G_ZTC_FLEET_ITAB

        INTO G_ZTC_FLEET_WA

        WITH CONTROL ZTC_FLEET

        CURSOR ZTC_FLEET-CURRENT_LINE.

*&SPWIZARD:   MODULE ZTC_FLEET_CHANGE_FIELD_ATTR

     MODULE ZTC_FLEET_MOVE.

   ENDLOOP.

   MODULE init_1006.

PROCESS AFTER INPUT.

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'ZTC_FLEET'

   LOOP AT G_ZTC_FLEET_ITAB.

     CHAIN.

       FIELD Z0018-WHOUSE.

       FIELD Z0018-NORMAL_ROUTE.

       FIELD Z0018-LATE_ROUTE.

       FIELD Z0018-NORMAL_DEPART.

       FIELD Z0018-LATE_DEPART.

     ENDCHAIN.

   ENDLOOP.

*&SPWIZARD: MODULE ZTC_FLEET_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE ZTC_FLEET_CHANGE_COL_ATTR.

MODULE ZTC_FLEET_INIT OUTPUT.

   IF G_ZTC_FLEET_COPIED IS INITIAL.

*&SPWIZARD: COPY DDIC-TABLE 'Z0018'

*&SPWIZARD: INTO INTERNAL TABLE 'g_ZTC_FLEET_itab'

     SELECT * FROM Z0018

        INTO CORRESPONDING FIELDS

        OF TABLE G_ZTC_FLEET_ITAB where store = ZCM_ADD_SITE_DATA-WERKS.

     G_ZTC_FLEET_COPIED = 'X'.

     REFRESH CONTROL 'ZTC_FLEET' FROM SCREEN '1006'.

   ENDIF.

ENDMODULE.

*&SPWIZARD: OUTPUT MODULE FOR TC 'ZTC_FLEET'. DO NOT CHANGE THIS LINE!

*&SPWIZARD: MOVE ITAB TO DYNPRO

MODULE ZTC_FLEET_MOVE OUTPUT.

   MOVE-CORRESPONDING G_ZTC_FLEET_WA TO S0018.

ENDMODULE.



1 ACCEPTED SOLUTION
Read only

PeterJonker
Active Contributor
0 Likes
491

I think you need to clear G_ZTC_FLEET_COPIED first when you do a new select (and also refresh the table G_ZTC_FLEET_ITAB.

You need to do this in your PAI event at the right moment (BACK, EXIT, CANCEL button user command ?)

1 REPLY 1
Read only

PeterJonker
Active Contributor
0 Likes
492

I think you need to clear G_ZTC_FLEET_COPIED first when you do a new select (and also refresh the table G_ZTC_FLEET_ITAB.

You need to do this in your PAI event at the right moment (BACK, EXIT, CANCEL button user command ?)