‎2006 Mar 03 6:17 AM
Hi,
I am doing modification of sap standard program,in that some selection screen are defined using macros,i do not have idea much about that,i have to do to change the selectin screen selection text renaming and adding two more parameters in that same block,i am giving the coding for that selection screen macro below,pleae help me.
this piece of code difined in the main program
BLOCK 2.
AUSWAHL: ZDRU Z, XDTA W, AVIS A, BEGL B .
SPOOL_AUTHORITY. "Spoolberechtigung
SELECTION-SCREEN END OF BLOCK 2.
this piece of code the macro code for selection screen.
************************************************************************
*
Include RFFORI0M der Zahlungsträgerprogramme für Makrodefinitionen *
*
AUSWAHL Aufbau einer Zeile im Selektionsbild zur Wahl der Ausgabe *
BLOCK Beginn eines Blocks auf dem Selektionsbild *
*
************************************************************************
DATA:
BEGIN OF TAB_SELFIELDS OCCURS 12,
FIELD(8) TYPE C,
TEXT(3) TYPE N,
END OF TAB_SELFIELDS.
FIELD-SYMBOLS .
DEFINE AUSWAHL.
SELECTION-SCREEN:
BEGIN OF LINE. PARAMETERS: PAR_&1 LIKE RFPDO-FORD&1.
SELECTION-SCREEN:
COMMENT 03(28) TEXT&1 FOR FIELD PAR_&1,
COMMENT POS_LOW(10) TEXTPRI&2 FOR FIELD PAR_PRI&2.
PARAMETERS:
PAR_PRI&2 LIKE RFPDO-FORDPRI&2 VISIBLE LENGTH 11.
SELECTION-SCREEN:
POSITION POS_HIGH.
PARAMETERS:
PAR_SOF&2 LIKE RFPDO1-FORDSOF&2.
SELECTION-SCREEN:
COMMENT 60(18) TEXTSOF&2 FOR FIELD PAR_SOF&2,
END OF LINE.
TAB_SELFIELDS-FIELD = 'TEXT&1'.
CASE TAB_SELFIELDS-FIELD+4.
WHEN 'ZDRU'. TAB_SELFIELDS-TEXT = 101. "Zahlungsträger drucken
WHEN 'WDRU'. TAB_SELFIELDS-TEXT = 103. "Wechsel drucken
WHEN 'XDTA'. TAB_SELFIELDS-TEXT = 104. "Datenträgeraustausch
WHEN 'AVIS'. TAB_SELFIELDS-TEXT = 105. "Avis ausgeben
WHEN 'BEGL'. TAB_SELFIELDS-TEXT = 106. "Begleitliste drucken
ENDCASE.
APPEND TAB_SELFIELDS.
TAB_SELFIELDS-FIELD = 'TEXTPRI&2'.
TAB_SELFIELDS-TEXT = 107. "auf Drucker
APPEND TAB_SELFIELDS.
TAB_SELFIELDS-FIELD = 'TEXTSOF&2'.
TAB_SELFIELDS-TEXT = 108. "Sofortdruck
APPEND TAB_SELFIELDS.
END-OF-DEFINITION.
DEFINE SPOOL_AUTHORITY.
selection-screen: skip 1,
begin of line,
comment 01(31) textauth for field par_auth.
parameters par_auth like itcpo-tdautority.
selection-screen end of line.
tab_selfields-field = 'TEXTAUTH'.
tab_selfields-text = 109.
append tab_selfields.
PARAMETERS PAR_AUTH LIKE ITCPO-TDAUTORITY NO-DISPLAY.
END-OF-DEFINITION.
DEFINE BLOCK.
SELECTION-SCREEN BEGIN OF BLOCK &1 WITH FRAME TITLE BLOCK00&1.
TAB_SELFIELDS-FIELD = 'BLOCK00&1'.
TAB_SELFIELDS-TEXT = 90&1. "Blocktext
APPEND TAB_SELFIELDS.
END-OF-DEFINITION.
from the above code i need to changes the selection screen text and adding two more paramenter.
‎2006 Mar 03 6:19 AM
if u want to change the selection screen text ,
in the program,
GOTO->TEXT ELEMENTS->SELECTION TEXTS and give the texts u wanted for the selection fields
‎2006 Mar 03 6:22 AM
Hi Sanjeev,
Use the below fm to change standard sel-screen text.
i_tab-name = 'PNPPERNR'.
i_tab-kind = 'S'.
i_tab-text = 'Employee ID'.
append i_tab.
CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
EXPORTING
program = 'ZESO_TEST'
tables
seltexts = i_tab
EXCEPTIONS
PROGRAM_NOT_FOUND = 1
PROGRAM_CANNOT_BE_GENERATED = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Pls.reward if it solves your prbs.
Thanks
Eswar
‎2006 Mar 03 6:23 AM
Hi sanjeev
you can change the selection text in the comment statement for the parameters.
COMMENT 03(28) <b>TEXT&1</b> FOR FIELD PAR_&1
TEXT&1 is present in TEXT ELEMENT->SELECTION TEXT
regards
kishore
‎2006 Mar 03 8:25 AM
Hi Sanjeev ,
There are different blocks of selection screen for which different macros have been written here.
Please explain where you want to rename your selection text and in which block you want to add parameter.
Please mention the text and parameter details for the same.
Thanks.
‎2011 Dec 07 12:09 PM
Hi Sanjeev,
The current text is coming from the include SAPDBPYF (Text pool)--> Include RFFORI0T.
But it is standard include. I think u can cpy this include to custom include and make use if it as required.
Hope this will helps you.
Regards,
Ashwini