‎2005 Mar 02 11:12 AM
i have a dynpro containing a tabstrip control
i would make the tab title sequence dynamic
as the tab title are pushbutton i have thought to make the pushbutton text dynamic
how can i do it?
i'm sure it's possible to do it in selection screen
thanks!!
bye
Davide
‎2005 Mar 02 12:02 PM
Hi Davide,
I think you should declare every tab of the tabstrip with text "_________", and then, at the PBO, write "tabs1 = 'Title1'", and so on (tabs1, tabs2... are the names of the tabs in your tabstrip control).
At least I made it in the selection screen of a report.
I hope it helps. BR,
Alvaro
‎2005 Mar 02 12:02 PM
Hi Davide,
I think you should declare every tab of the tabstrip with text "_________", and then, at the PBO, write "tabs1 = 'Title1'", and so on (tabs1, tabs2... are the names of the tabs in your tabstrip control).
At least I made it in the selection screen of a report.
I hope it helps. BR,
Alvaro
‎2005 Mar 02 1:32 PM
unfortunatly it's impossible to set the text template for a dynpro elemnt as "___" (space)
and anyway i cannot call the dynpro element in a module unless i declare it in some way in the top include
at the moment i'm looking for a usefull declaration
thanks anyway for help
bye
Davide
‎2005 Mar 02 1:50 PM
I am assuming you are using Module programming. If so, when you are doing :
LOOP AT SCREEN.
CASE SCREEN-NAME.
WHEN 'XYZ'.
SCREEN-NAME = 'ABC'.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.there is a particular characteristic called Name. Modify the name in PBO in the above loop.
Never had the need to do it, but seems like this will work. Let us know.
Regards,
Subramanian v.
‎2005 Mar 02 1:57 PM
unfortunatly screen-name is the name of the dynpro element
i have already hecked all the structure screen but there isn't a field that contains the dynpro element text
thanks anyway for the help
bye
Davide
‎2005 Mar 02 1:59 PM
‎2005 Mar 02 2:24 PM
Ok..here is my example. Most of the code was generated by screen painter via the tabstrip control wizard. Create screen 100, use the tabstrip control wizard to create your tabstrip, name it TABSTRIP. Double click on the tab text elements, rename them TABSTRIP_TEXT1 and TABSTRIP_TEXT2 for the tab text elements, make sure that the output only check box is checked.
REPORT ZRICH_0003 .
data: TABSTRIP_TEXT1(30) type c,
TABSTRIP_TEXT2(30) type c.
start-of-selection.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module STATUS_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
* Fill the tabstrip text elements here!
TABSTRIP_TEXT1 = 'Text 1'.
TABSTRIP_TEXT2 = 'Text 2'.
endmodule. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
endmodule. " USER_COMMAND_0100 INPUT
* FUNCTION CODES FOR TABSTRIP 'TABSTRIP'
CONSTANTS: BEGIN OF C_TABSTRIP,
TAB1 LIKE SY-UCOMM VALUE 'TABSTRIP_FC1',
TAB2 LIKE SY-UCOMM VALUE 'TABSTRIP_FC2',
END OF C_TABSTRIP.
* DATA FOR TABSTRIP 'TABSTRIP'
CONTROLS: TABSTRIP TYPE TABSTRIP.
DATA: BEGIN OF G_TABSTRIP,
SUBSCREEN LIKE SY-DYNNR,
PROG LIKE SY-REPID VALUE 'ZRICH_0003',
PRESSED_TAB LIKE SY-UCOMM VALUE C_TABSTRIP-TAB1,
END OF G_TABSTRIP.
DATA: OK_CODE LIKE SY-UCOMM.
* OUTPUT MODULE FOR TABSTRIP 'TABSTRIP': SETS ACTIVE TAB
MODULE TABSTRIP_ACTIVE_TAB_SET OUTPUT.
TABSTRIP-ACTIVETAB = G_TABSTRIP-PRESSED_TAB.
CASE G_TABSTRIP-PRESSED_TAB.
WHEN C_TABSTRIP-TAB1.
G_TABSTRIP-SUBSCREEN = '0101'.
WHEN C_TABSTRIP-TAB2.
G_TABSTRIP-SUBSCREEN = '0102'.
WHEN OTHERS.
* DO NOTHING
ENDCASE.
ENDMODULE.
* INPUT MODULE FOR TABSTRIP 'TABSTRIP': GETS ACTIVE TAB
MODULE TABSTRIP_ACTIVE_TAB_GET INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN C_TABSTRIP-TAB1.
G_TABSTRIP-PRESSED_TAB = C_TABSTRIP-TAB1.
WHEN C_TABSTRIP-TAB2.
G_TABSTRIP-PRESSED_TAB = C_TABSTRIP-TAB2.
WHEN OTHERS.
* DO NOTHING
ENDCASE.
ENDMODULE.
Screen Flow is ....
PROCESS BEFORE OUTPUT.
* PBO FLOW LOGIC FOR TABSTRIP 'TABSTRIP'
MODULE TABSTRIP_ACTIVE_TAB_SET.
CALL SUBSCREEN TABSTRIP_SCA
INCLUDING G_TABSTRIP-PROG G_TABSTRIP-SUBSCREEN.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
* PAI FLOW LOGIC FOR TABSTRIP 'TABSTRIP'
CALL SUBSCREEN TABSTRIP_SCA.
MODULE TABSTRIP_ACTIVE_TAB_GET.
MODULE USER_COMMAND_0100.
Regards,
Rich Heilman