Add select-option fields in report category (PNP)
Hi,
I am trying to create a new report category based on the logical database PNP.
I noted that the fields available for select-option for report category come from infotype 0 or 1. Is there anyway to include fields from other infotypes ?
Thank you.
Regards
Kir Chern
Hi Kir Chern
Due to the structure of the logical database you can just insert selection fields that are bestowed.
However, as Charles mentioned, you can add selection fields special to your program by coding a selection screen at your program whose fields are inserted just after the ones added by the report category.
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
Similar Messages
-
To add select-options to standard report program...
Hi,
How to add a field as select-options to sap standard report program?
Regards,
sachin
Moderator Message: Do some R&D on the topic first and ask a specific question, instead of a step-by-step process.
Edited by: kishan P on Nov 25, 2010 5:40 PMHi shiva,
I have following doubts?
1) exactly where should i add select-options of a field in enhancement point?
and 2) where to keep the database extraction logic for the same select-options? -
Adding Selection Options Fields in Report(Using Query)
Hi,
how can we add Selection Fields Options in Query Reports Which we create using SQ01. I need a default option by which we can add all the selection option given by user.
Anybody can help me..?
Regards
lijo JosephDo you have anything defined in the 'Calcs' section?
If so, any fields returned by the query that are not included in the calculation will be automatically added to the Group fields (using the same logic as required with calculations/group by in any SQL query). The fields won't be able to be removed from the Group list unless the Calc is also removed. -
How to add spaces on select-option field?
All,
I want to add few spaces on my select-option field.
Customer: ________ to ________
Can I change the spaces here? I
I want to put some spaces after 'to'
It should be displayed like....
Customer: _________ to _________
Regards,
RHHi!
Using the SELECT-OPTIONS it's not possible.
But you can create your own line, somehow like this:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT ... "customer
PARAMETERS: p_low.
SELECTION-SCREEN COMMENT ... "to+spaces
PARAMETERS: p_high.
SELECTION-SCREEN END OF LINE.
The syntax is not perfect, but you have to do something like that.
Regards
Tamá -
Module pool programming " to add selection-option on screen"
I want to add selection option for a field ( matnr ) on the screen in module pool programmiing. ( how it comes in report programming). If you you know how to add Please help me to solve.....
Sure, you need to define your selection screen as a subscreen, then embed this into your subscreen area on the dynpro. Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*& Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
endmodule.
* Create Screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
*process before output.
* module status_0100.
* call subscreen subscreen_1010 including sy-repid '1010'.
*process after input.
* call subscreen subscreen_1010 .
* module user_command_0100.
Regards,
Rich Heilman -
Disable the Select-options field in the viewcontainer
Hi,
I have two select option fields(Date,Number) in a viewcontainer .
Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
Thanks in Advance.
Regards,
bala.Hi,
I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
I just had one select-option on my scr...but it can be done with two too...
step1:
created three attributes at component level under the attribute tab ( as suggested by Thomas )
ENABLE_PRI_SELECTOPTION type WDY_BOOLEAN
M_HANDLER type ref to IF_WD_SELECT_OPTIONS
M_WD_SELECT_OPTIONS type ref to IWCI_WDR_SELECT_OPTIONS
Note: all are with public check box checked....so that all your views can see these attributes
I created a method at componenet controller leverl: create_select_option....in this method i have following code:
DATA:
lt_range_table TYPE REF TO data,
* rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
typename TYPE string.
DATA:
lr_componentcontroller TYPE REF TO ig_componentcontroller,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
* create the used component
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
* get a pointer to the interface controller of the select options
*component
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
* init the select screen
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
* create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'PERSNO' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'PERSNO'
I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
I_NO_INTERVALS = abap_true
it_result = lt_range_table
i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ). <-----pls see here how i am controlling the read only property
I assume you know this much...already....but i am just putting everything down....
step2:
in my view where i want to display the select-options....i added this code under my wddoinit method
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false. <--pls see initially we want this field to be open
lo_componentcontroller->create_select_option(
step3:
i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
under that button action method i added the following code:
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
"<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
"this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
"which produces dump from system....
lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
i_id = 'PERSNO' ).
"now call the same method which we created at component level to create the select_options...
lo_componentcontroller->create_select_option(
that is all....it works great for me.....let us know if still have any questions....
Thanks...
AS... -
How can i used pai in screen 1000 to change the select-options field?
hi,all.
I want used pai to change the select-options field,but it can't works.
the mainly code is:
REPORT ZTEST99.
TABLES :MARA,MAKT,MARC.
SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TITLE0 .
select-options:s_matnr for mara-matnr,
s_werks for marc-werks MODIF ID ID1.
SELECTION-SCREEN END OF BLOCK B0.
parameters:p_flag as checkbox.
at selection-screen OUTPUT.
LOOP AT SCREEN.
IF P_FLAG = 'X' .
IF screen-group1 = 'ID1'.
screen-input = '0'.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
CALL SCREEN 1000.
when i click p_flag,then i want to change s_werks from OBLIGATORY to no OBLIGATORY.
how can i realized?
Thanks for all.
SunHi ,
change your code like this.
Change in your code:
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : s_matnr for mara-matnr,
s_werks for marc-werks MODIF ID ID1.
SELECTION-SCREEN END OF SCREEN 100 .
At selection-screen.
if sy-dynnr = '100'.
IF P_FLAG = 'X' .
LOOP AT SCREEN.
IF screen-group1 = 'ID1'.
screen-required = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'ID1'.
screen-required = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
my code :
REPORT Z50871_SELECTOPS_DYNAMIC.
PARAMETERS : CH_EBELN AS CHECKBOX,
CH_VBELN AS CHECKBOX.
DATA: V_EBELN TYPE EKKO-EBELN,
V_VBELN TYPE VBAK-VBELN.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
VBELN FOR V_VBELN MODIF ID G2.
SELECTION-SCREEN END OF SCREEN 100 .
AT SELECTION-SCREEN OUTPUT.
IF SY-DYNNR = 100.
IF CH_EBELN = 'X' AND
CH_VBELN = ''.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_VBELN = 'X' AND
CH_EBELN = '' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G2'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'
OR SCREEN-GROUP1 EQ 'G2' .
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF SY-DYNNR = 1000.
IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
CALL SELECTION-SCREEN 100.
ELSE.
MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
ENDIF.
ENDIF.
regards
Sandeep Reddy -
How to write in selection screen after the select option field?
Hi
Please help me with this...
i need to write format of date after the select option field in the selection screen.
its like..
date ___________ to ___________ <b>yyyymmdd</b>
points will be awarded..
thanxUse selection-screen comment 1(31) text-005 -> this will give you format option.
See the below sysntax ,you have to use like this
Selection-screen begin of block b2 with frame title text-002.
selection-screen begin of line.
selection-screen comment 1(31) text-004.
parameter: r_1 radiobutton group rad1.
selection-screen end of line.
selection-screen begin of line.
Aging Report
selection-screen comment 1(31) text-005.
parameter: r_2 radiobutton group rad1.
selection-screen comment 40(30) text-003.
parameter: p_expir as checkbox.
selection-screen end of line.
selection-screen begin of line.
Materials with no Expiry Date
selection-screen comment 1(31) text-006.
parameter: r_3 radiobutton group rad1.
selection-screen comment 40(30) text-007.
parameter : p_bin as checkbox ."default 'X'.
selection-screen end of line.
selection-screen end of block b2.
selection-screen end of block b0. -
Dialog programming - How to place a select-option field in a dialog screen
Hi all,
In Dialog Programming, How to place a select-option field in a dialog screen.
Kindly give me some example code...
Thanks,
Jaffer Ali.Shi Ali,
U can add select-options in ur module pool by using SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN command.
check this link for reference.....
http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
Example Code :
DATA : ok_code TYPE sy-ucomm.
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
p_rad2 RADIOBUTTON GROUP grp1,
p_rad3 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
s_matkl FOR mara-matkl,
s_mtart FOR mara-mtart.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1010.
START-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
CALL SCREEN 1010 .
ENDMODULE. "status_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
SCREEN 100 ****************
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
<b>***** where sub_1010 is name of sub-screen area</b>
PROCESS AFTER INPUT.
CALL SUBSCREEN sub_1010.
MODULE user_command_0100.
<<< REMOVED BY MODERATOR >>>
Harimanjesh AN
Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM -
How to set focus and mark red on certain select option field
hi experts
I embedded a select_option view in my application and tried to use IF_WD_SELECT_OPTIONS->request_focus to set focus on a certain select option field if the logical check failed, and also hope the low field of the select option can be marked red....but things does not happen that way....
could anyone kindly tell me how to implement that requirement?
tkx and regards
sunWhat is the problem you are facing in this ?
Requesting focus is easy.
just call the method request focus and pass the id of the parameter whose lower value field you want to focus.
as shown below.
code you might have written in wddoinit
DATA: LT_RANGE_TABLE TYPE REF TO DATA,
RT_RANGE_TABLE TYPE REF TO DATA,
READ_ONLY TYPE ABAP_BOOL,
TYPENAME TYPE STRING.
DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
* * create the used component
L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
L_REF_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'ZDEALERID' ).
* * add a new field to the selection
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'ID'
IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
code for focusing a field.
wd_this->m_handler->request_focus( i_id = 'ID' ).
you must have declared attributes m_handler and m_wd_select_options type reffering to IF_WD_SELECT_OPTIONS and
IWCI_WDR_SELECT_OPTIONS respectively.
and regarding that red color i am not sure it is possible without using message manager.
thanks
sarbjeet -
Want to insert select-options field in between LDB nodes selection fields
Hi Guys,
I want to add a select-options field in between the LDB nodes selection fields. Please let me know how I can do this.
Thanks,Use SELECTION-SCREEN BEGIN OF LINE,
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: PERIODO LIKE QPPNP-PABRP,
ANIO LIKE QPPNP-PABRJ.
SELECTION-SCREEN END OF LINE. -
Any limitations on select-option field size
I am trying to define a select options (NO INTERVALS) for a field which is 80 characters in length.
Program cuts it off to 45 characters in execution mode.
Could you please let me know if there is any other way to achieve this.
Regards
KasiHi Kasi,
It looks like you've hit a hard limit of the system, the generated selection screen has the selection option field defined as 45 chars, even though the field defined in the program is longer.
I think the only way around this is to create your own selection screen and assign this to your report.
Regards,
Nick -
Lock in parameter/select-options field
Hi,
How can we block another user from executing report with the same value of parameter/select-option field entered on screen by user?
for example:
Report ZZZ, parameter field sales org = A, run by user 1.
Another user, say B, attempts to run the report by entering the same sales org = A. In these second execution of the report, I need to display error message saying that user A is running the report then report cant be run by user B.
Do i need to put lock object for these?
thanks alots
AliaNo, there is no mechanism to restrict in that way.
but you can create a Z-table with one column (vkorg)
now make a little change in the report..
1.check if any entry of vkorg is there in that z-table.
if not proceed, else error msg.
2.craete an entry of that vkog in that z-table.
3.Normal processing of this report.
4.at end delete that entry of vkorg from z-table.
thus you can achieve mutual exclusion.
cheers.
Message was edited by: Anid -
Select-option field on module pool screen
hi all,
Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e. how can i get that multiple selections tab after the high field of the select-options.
thanks in advance,
vinnyAll you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen). Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*& Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
endmodule.
<b>* Screen screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
*process before output.
* module status_0100.
* call subscreen subscreen_1010 including sy-repid '1010'.
*process after input.
* call subscreen subscreen_1010 .
* module user_command_0100.</b>
Regards,
Rich Heilman -
Authorization check for select-options field - Company code.
Hi experts,
i have company code field on the report selection screen and i have to validate the authorization check for BUKRS.
How to do authorization check for a select-options field?
Any function modules used to write the authorization check for a SELECT-OPTIONS FIELD?
Thanks.>
RNB wrote:
> Any function modules used to write the authorization check for a SELECT-OPTIONS FIELD?
Does it hurt to type a few lines of code? Why do you need an FM for this my friend?
Anyways can you please tell which SAP application area (viz. FI, SD etc.) do you want to run the report?
Suhas
Maybe you are looking for
-
I'm trying to open Adobe Acrobat Reader to download something from the internet, and discovered for the first time that I can't because Power PC is no longer supported by Apple..(whatever that is????) I don't know what to do. Can someone help. Tha
-
My icons have disappeared from my bookmarks toolbar. Yes there are icons listed under toolbars/bookmarks..they just stopped appearing on the toolbar icon ********** PLEASE READ REST OF QUESTION BEFORE GIVING PRE-SET ANSWER *********** As instructed I
-
Itunes will not load, someone please help!?
i have read all the forums, and nothing is working for the technical help that I need, itunes will not load or work and no matter what help I am trying to seek, nothing is working. I have tried uninstalling, reinstalling, everything that people are a
-
Yosemite install on iMac with Maverick stuck at "Less than a minute remaining" what do I do?
-
Create references to user_constraints or other applicable table...
Hi , Is it possible to create a reference(foreign key) to the constraint_name column of user_constraints object or to other table of sys/system which keeps the constraint names created per user...???? I use Db 10g. Thanks, Simon