Skip to Content
0
Former Member
Oct 05, 2005 at 08:18 PM

Subscreens

19 Views

Hi All,

I have defined a main screen containing a subscreen and two table controls. This subscreen has a third table control. Reason I have defined this as a subscreen is because based on conditions I can either call the subscreen containing third table control or some other subscreen containg entirely differnt data.

Now my PBO and PAI logic on the main screen looks something like this:

MODULE 1010_INIT.

call subscreen subscrn1 including 'SAPLZCIC_TEST_SCREEN'

wa_dynnr.

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

MODULE R_3_TC_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE R_3_TC_CHANGE_COL_ATTR.

LOOP AT G_R_3_ONLY_ITAB

WITH CONTROL R_3_TC

CURSOR R_3_TC-CURRENT_LINE.

*&SPWIZARD: MODULE R_3_TC_CHANGE_FIELD_ATTR

ENDLOOP.

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

MODULE POD_TAB_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE POD_TAB_CHANGE_COL_ATTR.

LOOP AT G_POD_ITAB

INTO G_POD_WA

WITH CONTROL POD_TAB

CURSOR POD_TAB-CURRENT_LINE.

MODULE POD_TAB_GET_LINES.

*&SPWIZARD: MODULE POD_TAB_CHANGE_FIELD_ATTR

ENDLOOP.

PROCESS AFTER INPUT.

call subscreen subscrn1.

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

LOOP AT G_R_3_ONLY_ITAB.

CHAIN.

FIELD G_R_3_ONLY_ITAB-VBELN.

FIELD G_R_3_ONLY_ITAB-POSNR.

FIELD G_R_3_ONLY_ITAB-AUART.

FIELD G_R_3_ONLY_ITAB-AUGRU.

FIELD G_R_3_ONLY_ITAB-AUDAT.

FIELD G_R_3_ONLY_ITAB-KWMENG.

FIELD G_R_3_ONLY_ITAB-VRKME.

FIELD G_R_3_ONLY_ITAB-FAKSK.

MODULE R_3_TC_MODIFY ON CHAIN-REQUEST.

ENDCHAIN.

FIELD G_R_3_ONLY_ITAB-FLAG

MODULE R_3_TC_MARK ON REQUEST.

ENDLOOP.

*&SPWIZARD: MODULE R_3_TC_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE R_3_TC_CHANGE_COL_ATTR.

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

LOOP AT G_POD_ITAB.

CHAIN.

FIELD G_POD_WA-ZCARTON_ID.

FIELD G_POD_WA-ZPRODUCT_ID.

FIELD G_POD_WA-ZPRODUCT_DESC.

FIELD G_POD_WA-ZQTY.

FIELD G_POD_WA-ZUOM.

MODULE POD_TAB_MODIFY ON CHAIN-REQUEST.

ENDCHAIN.

FIELD G_POD_WA-FLAG

MODULE POD_TAB_MARK ON REQUEST.

ENDLOOP.

MODULE POD_TAB_USER_COMMAND.

*&SPWIZARD: MODULE POD_TAB_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE POD_TAB_CHANGE_COL_ATTR.

MODULE USER_COMMAND_1010.

Now I expected the screen to show up with all the three table controls. Instead it only displays the table control from subscrn1 and not from the main screen. Shouldn't the subscreen logic behave like an include and continue from the point where it is called ? I mean it should have continued with the table control 'R_3_TC' and 'POD_TAB', correct ?

Please let me know how I can make this work.