Selection screen macro
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.
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
Similar Messages
-
Macro not working in BEx Analyzer (Refresh selection Screen)
Hi All,
We have migrated work book for 3.x to 7.x and work book having lot of macros calculated and using multiple quires in single work books for inpt selection screen written Macro same macro is not working after Migration to 7.x
7.X Macro code below..
Sub BW_Prod_Year_Summary()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("E9")
End Sub
Sub BW_Prod_Year_Summary_Period()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("G9")
End Sub
Sub BW_Query_for_YTD_and_Monthly_View()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("J9")
End Sub
Sub BW_Prod_Perform_prev_month()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("M9")
End Sub
Sub BW_Prod_Perform_prev_month_Detail()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("P9")
End Sub
Sub BW_3_Months_Volume_Comparison()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("S9")
End Sub
Sub BW_Query_for_Current_RE()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("E40")
End Sub
Sub BW_Query_for_Previous_RE()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("G40")
End Sub
Sub BW_Query_for_Business_Plan_this_year()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("J40")
End Sub
Sub BW_Query_for_Actuals_last_year()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("M40")
End Sub
Sub BW_Query_for_Forecast_next_year()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("P40")
End Sub
Sub BW_Query_for_Forecast_Accuracy()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("S40")
End Sub
Sub BW_PDR()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("E132")
End Sub
Sub BW_SDR()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("G132")
End Sub
Sub BW_TDQ()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("J132")
End Sub
Sub BW_SSDR()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("M132")
End Sub
Sub BW_DDR()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("P132")
End Sub
Sub BW_Blocked_Stock()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("E195")
End Sub
Sub BW_Age_of_Stock()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("G195")
End Sub
Sub BW_Historical_WOS()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("J195")
End Sub
Sub BW_Current_WOS()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("M195")
End Sub
Sub BW_Current_WOS_Details()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("P195")
End Sub
Sub BW_Historical_STO()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("E243")
End Sub
Sub BW_Future_STO()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("G243")
End Sub
Sub BW_Product_Groups()
Run "BExAnalyzer.xla!SAPBEXrefresh", False, Range("J243")
End Sub
Please help me on this..!!
Thanks
PrakashAglukas,
Thanks again. I understand the name of the Macro can be anything and this is how to create the Macro:
1) Run workbook, the query result display on the screen.
2) In Excel 2007, I click on Developer tab ->Macro.
3) Enter Macro name (Macro1) and click on Create button.
4) I have VB editor open with following:
Sub Macro1()
End Sub
5) So added the following code to Macro routine in VBA Module:
Sub Macro1()
With ThisWorkbook.Sheets("Sheet1")
Stop
.Activate
.Cells(15, 1).Interior.Color = RGB(220, 254, 250)
End With
End Sub
6) I then added the Macro1 to Workbook Setting ->Exit tab, and click on Add Macro button.
When I run/refresh the workbook, I didn't get into debug mode at all!!!
What is wrong in above steps?
Please advice, thanks. -
How to deal with dynamic selection screen elements when macros are used?
Hello experts,
This is regarding the dynamic selection screen elements. Actually the requirement is to modify the existing standard report program RFUMSV00 by copying it into a Z report, adding a few selection screen elements and new fields in the output. I actually did everything required except for the one thing that is going out of my reach.
There are a certain fields which are coming when they are not supposed to get displayed. I don't understand the code because of its obsoleteness. Neither can I debug it because it is just data declaration.
This is the code where there is a fault. If I copy the entire code into a new Z report, I'm getting new fields like Entry Date, Document Type, Reference Transaction, Reference key, Logical system.
DEFINE selection_screen_line.
selection-screen: begin of line.
parameters &3 like &4 default 'X' modif id mc4.
selection-screen: comment (30) &1 for field &3 modif id mc4.
selection-screen: comment pos_low(10) text-019
for field &2 modif id mc4. "neu
parameters &2 like rfums_alv-variante modif id mc4.
selection-screen:
position pos_high.
selection-screen: pushbutton (15) text-028
user-command &5 modif id mc4.
selection-screen end of line.
END-OF-DEFINITION.
Kindly, suggest me the right solution.In the program attributes ( SE38 > RFUMSV00 > GOTO > Properties ), you will find a logical database BRF declared. The include DBBRFSEL is part of the selection screen of this logical database.
The selection screen is actually the selection screen of this logical database.
Under the Logical Database field, there is a Selection screen field where you can input which selection screen of the logical database to be used.
But, this is just to change the selection screen that is displayed. To completely suppress it you need to remove logical database declaration from the properties of the program and call it inside your program through function module.
You cannot just remove it from the declaration because many of its variables are used in the program.
So call it using function module as the first step in INITIALIZATION section of the program.
The syntax and function module to call it in your program can be found in the following thread :
How to hide the selection screen of a Logical datebase?
Regards,
Ashish -
Need Different Selection screen for different Queries in a Workbook
Hi,
I have created a workbook with Multiple tabs in BI 7.0. Each Tab has different Queries and each query has different Selection screens (Variable Selections).
When i open the workbook and refresh it, the selection screen is appearing only for one query. All the queries are refreshed by this single selection screen, though each query has different Variable selections. What i need is a seperate selection screen i.e seperate Variable selection appearing for each queries, when i refresh each one of them.
Is it possible to do this? If anybody has tried this, help me in solving this issue. Thanks for ur time.
Regards,
MuraliMurali,
If you un-check the 'Display Duplicate Variables Only Once' this WILL solve your problem.
When you Refresh, you should be presented with a single variable selection dialog box, but it should contain an area for each Query (DataProvider) that is embedded in the Workbook.
This is the case if the queries are all on the same tab, or on different tabs.
However, if you have multiple tabs each with a query on it, each query must have it's own DataProvider. If all queries are based on the same DataProvider, it will not work as the Workbook only 'sees' one Query for which it needs variable input.
If you REALLY want multiple variable selection dialog boxes, then maybe the best way to do this is to have the queries in separate Workbooks.
If you don't want the User to have to open 5 queries manually, you could use a Macro in each Workbook that runs on opening, to open the next Workbook in the sequence.
I hope this makes sense!
Regards
Steve -
RE:HR-ABAP selection screen problem.
hi,
hi friends iam facing one problem regarding hr ABAP selection screen ,in my program iam using PNP LDB for bonus details report
i have using selection screen declaration present for single selection.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.
SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK B3.
based on this selection iam fetching the information from infotypes using macros.
now my requirement is iam fetch the information for multiple selections means like payroll areas z1,z2 and z3 payroll informations
should be fetching once. pls any body knows solution please give me reply.
thanks & regards,
mgrao.You should be using a selection view (HR Report Category in the programs attributes) to filter results from the LDB.
Why is this in the objects forum? -
RE:pnp LDB selection screen problem
hi,
hi friends iam facing one problem regarding hr ABAP selection screen ,in my program iam using PNP LDB for bonus details report
i have using selection screen declaration present for single selection.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.
SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK B3.
based on this selection iam fetching the information from infotypes using macros.
now my requirement is iam fetch the information for multiple selections means like payroll areas z1,z2 and z3 payroll informations
should be fetching once. pls any body knows solution please give me reply.
thanks & regards,
mgrao.hi jain thanks for your reply, iam already created report category and assigned my report. here iam giving my report selection
declerations fully below.
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. " DECLEARED REPORT CODE LEVEL
SELECT-OPTIONS: S_DATE FOR SY-DATUM NO-EXTENSION. "Bonus for Financial Year
PARAMETERS: P_BDATE TYPE SY-DATUM OBLIGATORY, "Bous payed as on
P_WKDAYS TYPE CHAR6. "No.of Working Days
SELECTION-SCREEN END OF BLOCK B1.
*SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006. " COMMENTED report level TAKING FROM LDB PNP
*SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION, " Payroll area
S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION, Personnel area
S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION, Personnel sub area
S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
*SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002. "REPORT CODE LEVEL SELECTION
PARAMETERS: P_FORMCP TYPE PIN_RATE, " char6, "Form C %
P_FORMEP TYPE PIN_RATE, " char6, "Exgratia %
P_FORMBP TYPE PIN_RATE. " char6 . "Bonus %
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-004.
PARAMETERS: L_REPORT TYPE ZHRD_FORMC AS LISTBOX VISIBLE LENGTH 40 OBLIGATORY . Report for list box 1 form c
SELECTION-SCREEN END OF BLOCK B4. 2 exgratia
the above selection is iam used first, now iam commented BLOCK B3 SELECTION PARAMETERS and taking the parameters from REPORT CATEGORY ASSINGN MENT.
MY PROBLEM is if i select one payroll area example z1 it showing all pay roll employees bonus details it is not filter the remaining payroll areas my requirement is what are the payrolls iam selecting those pay roll area details only displaying.
data fetching from INFOTYPES 0001,0002,0021 AND 9150 FOR BONUS DETAILS and out put is classical report format.
please kindly give the reply if you knows the solution.
thanks & regards ,
mgr. -
Problem in Selection Screen.
Dear Experts,
I am facing a problem in Selection Screen.
<b>I have 2 radio buttons ,</b>
<b>Radio Button 1</b> - Choosing the file from desktop and
<b>Radio Button 2</b> - Executing from Database
Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
Problem Case -
<b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
Please see the entire code .</b>
REPORT ZTEST.
DATA: LV_FILE_PATH(20) TYPE C.
DATA: LV_MASK(20) TYPE C VALUE ',*.XLS ,*.XLS. '.
*-- Macro to put radiobutton on selection screen
*-- &1 - radiobutton parameter name
*-- &2 - text element (description)
*-- &3 - radiobutton group
DEFINE MAKE_RADIOBUTTON.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: &1 RADIOBUTTON GROUP &3.
SELECTION-SCREEN COMMENT 3(60) &2.
SELECTION-SCREEN END OF LINE.
END-OF-DEFINITION.
SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
* From Config File
MAKE_RADIOBUTTON RB_1 ALL_DATA SRC.
SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
* Config file from Presentation server
PARAMETERS: P_FILE1 LIKE T390D-DBNAME OBLIGATORY. "
SELECTION-SCREEN END OF BLOCK A1.
* From database table
MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
SELECTION-SCREEN END OF BLOCK A0.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
CALL FUNCTION 'WS_QUERY'
EXPORTING
QUERY = 'CD' "// Current Directory
IMPORTING
RETURN = LV_FILE_PATH.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = 'TA_DOWNLOAD.MDB'
DEF_PATH = LV_FILE_PATH
MASK = LV_MASK
MODE = 'O'
IMPORTING
FILENAME = P_FILE1
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
INITIALIZATION.
ALL_DATA = 'From Desktop : ? '.
INC_DOWN = 'From Database : ?'.
T000 = 'Configuration Upload'.
Please help
ThanksHi
You should do some modifications like these:
DEFINE MAKE_RADIOBUTTON_1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
SELECTION-SCREEN COMMENT 3(60) &2.
SELECTION-SCREEN END OF LINE.
END-OF-DEFINITION.
DEFINE MAKE_RADIOBUTTON_2.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: &1 RADIOBUTTON GROUP &3.
SELECTION-SCREEN COMMENT 3(60) &2.
SELECTION-SCREEN END OF LINE.
END-OF-DEFINITION.
SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
From Config File
MAKE_RADIOBUTTON_1 RB_1 ALL_DATA SRC AAA.
SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
Config file from Presentation server
PARAMETERS: P_FILE1 LIKE T390D-DBNAME MODIF ID FIL. "
SELECTION-SCREEN END OF BLOCK A1.
From database table
MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
SELECTION-SCREEN END OF BLOCK A0.
AT SELECTION-SCREEN OUTPUT.
IF RB_2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'FIL'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Max -
Dynamic variables: SELECTION-SCREEN PUSHBUTTON
hi, how I can create 100 buttons on a cycle so dynamic?
example:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-001 USER-COMMAND but1.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-002 USER-COMMAND but2.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-003 USER-COMMAND but3.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-004 USER-COMMAND but4.
SELECTION-SCREEN END OF LINE.
.....must be dynamic and they can be 100 and just 10
thanks in advance.
goudden.It gives you an error cause the macro is wrong. Try like this:
define create_line.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&1 USER-COMMAND b&1.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&2 USER-COMMAND b&2.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&3 USER-COMMAND b&3.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&4 USER-COMMAND b&4.
SELECTION-SCREEN END OF LINE.
end-of-definition.
selection-screen begin of block b01.
create_line: 001 002 003 004, 005 006 007 008.
selection-screen end of block b01. -
Retrieve input values from the selection screen
I have a requirement to retrieve the variable value or values inputed from the selection screen and label the worksheet tab to replace the tab name 'Sheet1' from the Excel. The only way to do this would be to write a macro to label the sheets but how would I retrieve the value(s) from the selection screen criteria? Is the value of the selection screen entered by the user stored in some table? How would I write the macro to retrieve this value?
For example, I want to retrieve the company code entered from the selection screen and lets say the company code entered as 10; I would want to replace the worksheet from 'Sheet1' to '10' . Texts would be more recognizable.Use the option Layout->Display Text Elements->Variables from the BEx toolbar. This will display Variable screen user input on your workbook in a fixed location. Then you can use your macro to name the worksheet with the cell reference.
Thanks
Vineet -
Prob in Submit Report via Selection screen.
Hi,
I have to submit a report via selection screen.
The report name is detemined at run time.
This i am able to handle easily as we can use SUBMIT (V_PROG)...
WHERE V_PROG contains the name of the report that i get at runtime...
Now the issue :::::::
I have to also populate a select-options on the called report on submit.
usually this is done by :
SUBMIT (V_PROG)
name of select-option in itab...
However in my case the name of the <name of select-option> is also detemined at runtime say PNPPERNR.
Now if i use any variable / field symbol for the name of the select - option (like for the called program), it does not work (the called report does not have the values i populate in ITAB for the particular select-option)
I have also tried Macro but cant find solution...
ANY IDEAS ??Hi Anuj,
When you are getting the report name in runtime, you can also get the report selection screen information during runtime.
Now how are you going to decide which values you will move to which selection screen variables of which report? If you have a way to determine this, then here is a program that works on that assumption.
REPORT ztest1 .
DATA: i_seltab TYPE TABLE OF rsparams WITH HEADER LINE,
i_selections_info TYPE TABLE OF selinfo WITH HEADER LINE.
DATA: v_report LIKE sy-repid,
v_matnr LIKE mara-matnr.
PARAMETERS: p_rep1 RADIOBUTTON GROUP rad DEFAULT 'X',
p_rep2 RADIOBUTTON GROUP rad.
SELECT-OPTIONS: s_matnr FOR v_matnr.
START-OF-SELECTION.
IF p_rep1 = 'X'.
*-- some criteria to determine the name of the report
v_report = 'ZTEST2'.
ELSE.
v_report = 'ZTEST4'.
ENDIF.
*-- get the parameters for the report
CALL FUNCTION 'RS_SELECTIONS_DESCRIPTION'
EXPORTING
report = v_report
TABLES
selections_info = i_selections_info
EXCEPTIONS
no_selections = 1
report_not_existent = 2
subroutine_pool = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT i_selections_info WHERE name = 'S_MATNR'.
*-- some criteria based on which, move the values from this program
* to the called program
CLEAR i_seltab.
i_seltab-selname = i_selections_info-name.
i_seltab-kind = i_selections_info-kind.
i_seltab-sign = 'I'.
i_seltab-option = 'EQ'.
i_seltab-low = s_matnr-low.
i_seltab-high = s_matnr-high.
APPEND i_seltab.
ENDLOOP.
IF NOT i_seltab[] IS INITIAL.
SUBMIT (v_report) VIA SELECTION-SCREEN
WITH SELECTION-TABLE i_seltab .
ENDIF.
If this works for you, please reward and close the post.
Regards,
Srinivas -
Hi,
I created a copy of the transaction LSO_RHXBUCH0. I noticed that if I select a few radio buttons/check boxes and then F4 on a select-option (e.g Participant) all the settings I checked revert back to the original.
Can't see why so looked at the standard transaction LSO_RHXBUCH0 and the same thing happens there.....
1. change Reporting Period, Selection Options and Standard Selection Screen.
2. F4 on Participant
3. select a person
4. press return
All values back to defaults.
Can't find anything on OSS about it - any ideas?
Thanks.Hi,
thanks.
I figured out the issue.
The macro <i>rhx-f4-objid-low</i> has two lines at the end of it which re-initialise the screen:
set screen sy-dynnr.
leave screen.
I created a z-version of the macro with these lines commented out and it worked fine. Logged an OSS message to see if SAP want to fix it.
I will leave this thread open for a little while. If SAP create a note, I'll post the number. Not too optimistic about it but I may be surprised.
Thanks. -
VBA To judge "Cancel" at variable selection screen in BEx analyzer
Hi BI experts,
I need some advices about how to judge whether "Cancel" button is pressed or not.
We need correction of Excel Macro for migrating reports from 3.x to 7.x.
<Summary of Macro>
1.Call variable selection screen once you pressed VBAbutton.
2.Then, depends on pressed "OK" or "Cancel", the following process wil be diverged.
 
<1st process's change>
Old:「Return_Code = Run("SAPBEX.XLA!SAPBEXrefresh", False, inWorksheet.Range("B30")) 」
New:「Return_Code = Run("BExAnalyzer.xla!MenuChangeVariable")」
<2nd process's change>
Under 3.x verstion, I used the situation that workbook would not be updated if you pressed "Cancel" button and write the logic.
But under 7.x verstion, even if you pressed the "Cancel" button, the workbook would be updated.
So, now I can not use the logic before and need to correct it.
Please give me some advice how to judge whether "Cancel" button is pressed or not at variable selection screen.
Also my correction of calling logic of variable selection screen?
Thanks a lot in advance!
Keiko
Message was edited by:
Keiko MatsuiI would like to add questions.
What I want to know is....
How to make variable selection button (VBA) in 7.x, which has chance to choose "OK" and "Cancel".
I see a lot of posts about VBA, but most of them are about under 3.x verstion.
keiko -
Regarding Selection Screen field making display field in ALV report
Hi All,
In ALV Report, at runtime how can i make the field as Display Field in selection screen .
Thks & Regds
Shaileshhii,
Go to se38 and give the below progra name execute.... check the source code it is very easy to understand.
1.demo_dynpro_modify_simple
2.demo_dynpro_modify_screen
if tou are using grid,u can refer to foll link
sequencing / choosing fields in report screen at runtime,
Display the Columns in the grid at run time
rgrds,
Shweta -
Help Needed in At selection screen output
Hi Experts,
I need your help in AT SELECTION SCREEN OUTPUT event. My issue is i have 4 radio button and with each radio button couple of parameters that need to be filled in selection screen of report. My requirement is that sometimes user enters details in second radio button parameters but forgot to change the radio button to second one so kindly suggest a solution so that radio button gets selected as per user input in parameter like if user clicks on certain parameter to enter value then automatically corresponding radio button gets selected.
Thanks in advance for all your help.example from a checkbox in one of my progs..but you can do same approach with radio butts
parameters p_test as checkbox default abap_on user-command test.
at selection-screen.
if sy-ucomm = 'TEST'.
perform birth_mnth_chck.
endif. -
Help needed in selection screen - Urgent
Hi Experts,
I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters.
e.g : if radiobutton1 is selected, njo activation needed,
if radiobutton2 is selected, activate selection screen parameter p_one,
if radiobutton3 is selected, activate selection screen parameter p_two.
All three radiobuttons are attached to the same radio button group.
I have assigned the parameters p_one, p_two, p_three to MODIF ID as follows.
p_one - NULL
p_two - t01
p_three - t02.
on the selection of a radio button I want the corresponding parameter to get activated.
please help me.
Regards,
Arul jothi A.hi
jothi
AT SELECTION-SCREEN OUTPUT.
CASE SY-TCODE.
WHEN 'ZEDI6'.
LOOP AT SCREEN.
CASE SCREEN-GROUP4.
WHEN '001'. "Sales order select
SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '002'. "Delivery select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '003'. "Invoice select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
WHEN '004'. "PO Select
SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display
MODIFY SCREEN.
regards
praveen
Maybe you are looking for
-
Sudden screen lines + iMac not booting
Hi everyone: I have an 24" Intel iMac, only 4 month with it, it was working normally then I left and my computer entered sleep mode, when I came back I prssed the keyboard to wake my computer the screen was black with green stains, I did reset, and o
-
How do I copy content from an entire row into a different table?
How do I copy content from an entire row of one table into a different table? When I try to copy/paste the selected row into a row of the same size and configuration in another table in the same document, the cells change width, the formatting and
-
My outlook email apear to be stuck, with 2/9 sent. Error messages
-
I am getting a microsft C++ dll is missing all after running latest update on dell vostro windows vista which was authorize as one of the devices I could use after buyig Ipad mini.Everything apple has stopped worng alone with the R6034 error apple mo
-
Just want to make sure I understand the Free CF 8 Developer edition. The free CF 8 Developer edition can be on a Development server but it can only have 2 client workstations (at one time) connecting to it or is it 2 workstations maximum connecting t