Ignoring empty select-option inputs
Hi all,
Have 3 input select options as follows:
select-options: so_retnr for vbak-vbeln.
select-options: so_matnr for mara-matnr.
select-options: so_bstnr for vbak-bstnk.
Iam using the above 3 select options in the following select.
Now the user can fill-in all the above select inputs or any 1 or 2 of them.
In my select statement I want to use only those select-options filled in by the user so that it wont make a full table search for the empty select-option input.
Is there any easy way to check that in the select statement.
select vbakvbeln vbakbstnk vbakihrez vbakaudat vbak~auart
vbapmatnr vbaparktx vbap~kwmeng into corresponding fields
of table gt_zrritab from vbak inner join vbap on
vbakvbeln = vbapvbeln
where vbak~vbeln in so_retnr and
vbap~matnr in so_matnr and
vbak~bstnk in so_bstnr and
vbak~auart = 'ZRR'.
Regards
P
data: t_string type string.
if not so_retnr[] is initial and not so_matnr[] is initial and not so_bstnr[] is initial.
t_string = 'vbakvbeln IN so_retnr AND vbapmatnr IN so_matnr AND vbak~bstnk IN so_bstnr'.
elseif not so_retnr[] is initial and not so_matnr[] is initial and so_bstnr[] is initial
t_string = 'vbakvbeln IN so_retnr AND vbapmatnr IN so_matnr.
elseif not so_retnr[] is initial and so_matnr[] is initial and not so_bstnr[] is initial
t_string = 'vbakvbeln IN so_retnr AND vbakbstnk IN so_bstnr'.
elseif.
etc....
endif.
SELECT vbakvbeln vbakbstnk vbakihrez vbakaudat vbak~auart
vbapmatnr vbaparktx vbap~kwmeng INTO CORRESPONDING FIELDS
OF TABLE gt_zrritab FROM vbak INNER JOIN vbap ON
vbakvbeln = vbapvbeln
WHERE (t_string)
AND vbak~auart = 'ZRR'.
zashok
Similar Messages
-
I have a select-options on my selection screen. In the database table i have different four values for this. ex EEX01, EEX02, EEX03 and EEX04.
their overall names are DE, HE, IT, TR respectively.
Now the requirement is user will enter this data like DE to TR , i am now confused how do convert these value to the values that i have in table. Because i have to use this for extracting the data from database table.
thanks in advance.hi,
what is the table name for the case.
and jsut list what are the fields .. we'll try to map the same and see if it works..
if for the field there is a check table attached then conversion routine will take care of that .
just check on the field of the domain in the dbtable
like matn1 for dataelement matnr and domain matnr in mara table.
regards,
vijay -
Empty selection options after report run
Hi,
After the execution of my abap report sap returns to the selection options screen in which all the selected values from the run are still mentioned. How can i refresh the selection screen (so no values in the selection options after the report run) ?
this is the code (all parameters as you can see) :
parameters : p_matnr like mara-matnr default ''.
parameters : p_werks like mard-werks default 'XYZ',
p_lgort like mard-lgort default ''.
selection-screen skip 1.
parameters : p_qty like sy-tabix default 1.
selection-screen skip 1.
parameters : p_file like RLGRAP-FILENAME memory id GXD.
with regardshi
i tried for select-options try for parameters
at selection-screen .
if sy-ucomm = 'ONLI'. " Only when execute is pressed
v_low = s_kunnr-low.
v_high = s_kunnr-high . " Hang on to this for select statement
clear s_kunnr[].
clear s_kunnr. " Clear the screen parameter
endif.
for your program
data : matnr like mara-matnr, " variables are taken so that we can have the values for further operations
werks like mard-werks,
lgort like mard-lgort,
qty like sy-tabix,
file like RLGRAP-FILENAME.
at selection-screen.
if sy-ucomm = 'ONLI'. " Only when execute is pressed
matnr = p_matnr.
clear p_matnr.
werks = p_werks.
clear p_werks.
lgort = p_lgort.
clear p_lgort.
qty = p_qty.
clear p_qty.
file = p_file.
clear p_file.
endif.
start-of-selection. " write what ever code you have for the start-of-selection
NOTE "Remove the memory id for p_file otherwise it will not be cleared
regards
prasanth -
Select option in user defined screen
Hi friends,
In my program i m in need of using select-options ( input in terms of range ) . i saw some thread . in that they have mentioned FM : COMPLEX_SELECTIONS_DIALOG and some have given call subscreen ***.
but i don't know how to use it. i have never used subscreen in my program..
so u please tell me how to get it.
Thanks and regards,
kani,.Refer:
[http://www.saptechies.com/select-option-in-a-dynpro/]
[Complex_Selections_dialog in Module Pool Programming;
[How to put "selection options without intervals" on screen painter?; -
Select Option with data length more than 45 character
Hi everyone,
Kindly suggest how to use select-option when the data type is of length 128 characters because it is truncating the input after 45 characters. The requirement is to pass 1-7 files in select option input.
Thanks in advance.Hi,
Select option doest support STRING data type.
The VISIBLE LENGTH addition is also not working in this case. Also for multiple selection the input length remains the same i.e. 45 characters.
Thanks. -
Integrate Freely Programmed Value Help in Select option WDR_SELECT_OPTION
Hello All,
I have created Freely Programmed Value Help name (ZVALUE_HELP) by using IWD_VALUE_HELP.I have develop an application(ZSELECT_OPTION) which uses the resubale component WDR_SELECT_OPTION for select option.i want search help for one of my select option input field .
i wrote the following code.
*initalise the used component
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_ci_serach_help( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
* add a new field to the selection
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'ZCI_STATUS'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY
I_OBLIGATORY = ABAP_FALSE
I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
I_VALUE_HELP_ID = 'ZVALUE_HELP'
when i execute the select option application n click on search help button i got error "Component usage ZVALUE_HELP does not exist.
Edited by: Abhilasha Dahare on Aug 3, 2011 11:10 AMhi Abhsilasha,
I think your code is some thing wrong.
you have to assign free value help like below method.
in the attribute( the select option field ) properties, you will find input help mode property, in that select 'freely programmed'.
then you willl get some more fields, there you have to provide ZVALUE_HELP
of follow reema suggestion in below link
How to integrate a Search Help in a dynamically created Select-Option?
Regards
Srinivas
Edited by: sanasrinivas on Aug 3, 2011 12:06 PM
Edited by: sanasrinivas on Aug 3, 2011 12:10 PM -
Selection OPTION: Date input problem in Module POOL through Subscreen
Dear ALL,
Being new to ABAP, I am struck in a Problem.
Requirement:
I want an option on the Screen( My Screen 9000) for Date Range. Through this Date-Range I want to filter and pull some data from
Database.
As Date Range Selection option is possible only through Sub-Screen integration. Hence I integrated a Sub-Screen 400 (as below) and named the Sub-Screen area as SEL on my screen.
Problem: As soon as I enter the dates on the screen, then those dates are not taken up by the code.
During debugging I saw the the S_datum-low and S_datum-high are empty (in fact 00000000)
The code follows:
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
Call SUBSCREEN SEL INCLUDING sy-repid '400'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_9000.
DATA: gv_datum Type dats,
SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
SELECT-OPTIONS: s_datum FOR gv_datum.
SELECTION-SCREEN END OF SCREEN 400 .
Plz help where I am missing something.
Regards
ChandanCall the subscreen during the AT SELECTION-SCREEN event.
SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
SELECT-OPTIONS: s_datum FOR gv_datum.
SELECTION-SCREEN END OF SCREEN 400 .
AT SELECTION-SCREEN.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS '0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT -
In BI how to filter the selection options based on inputs on top field
Hi Friends,
In BI, How to filter the selection options based on inputs on top field.
The system should automatically filter the lower level drop downs based on the selection of a higher level.
For e.g. :
If a user selects a Country then the States drop down should only display the State's belongs to the Country. Similarly when a State is selected, the District drop down should display only those District's belongs to the State.
Thanks in Advance.
Regards
Jayaram MHi Anil,
Thanks for reply but I couldn't use Compounding Characteristic here. Need some other solution.
Regards
Jayaram M -
Select-options for input field
hi,
Is it possible to use 'Select-options' in web dynpro for the input field like we use in abap?
Ex. material is the input field. i want to select range also for this input field using 'Select-options'
I have tried only with ovs(f4 help) for the input field. can u pls tel me how to use if it is possible ?
Thanks,
Aishwarya.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( ).
init the select screen
WD_THIS->M_HANDLER =
WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
I_DISPLAY_BTN_CANCEL = ABAP_FALSE
I_DISPLAY_BTN_CHECK = ABAP_FALSE
I_DISPLAY_BTN_RESET = ABAP_FALSE
I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
*create a range table that consists of this new data element
LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE(
I_TYPENAME = 'matnr' ).
add a new field to the selection
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'matnr'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY ).
This is my code followed by saptechnical. but when i exec, am getting err like the type matnr is invalid. -
Multiple select options for an input field
Hi All,
We have a requirement where in we need to provide multiple select options for an input field in a BSP application and get output relevant to all the given inputs(do not require range).
Please do let me know how to solve this.
Thanks & Regards,
Lavanya .Hi,
The requirement is : Suppose there is a input field PLANT.
If we give input for plant it gives related output.
Now if it is required to give 5 or 6 inputs..like plant1,plant2...plant6 and get the output related to all 6 inputs.
(Like we implement in ABAP)
Please do let me know how can this be implemented in BSP.
Thanks & Regards,
Lavanya. -
How can i create a dynamic structure based on my input from a select-option
Hello,
This is to develop a custom report in FI for G/L Balance based on company code.
I have an input select-option for Company code.
Based on the range of company code my output layout should be modified.
I am not very much sure to create a dynamic internal based on the input from a select-option.
Can any one please let me know how can i do this.
I would appreciate for anyone who turns up quickly.
Thank you,
With regs,
Anitha Joss.See the following program, it builds a dynamic internal table based on the company codes from the select option.
report zrich_0001 .
type-pools: slis.
field-symbols: <dyn_table> type standard table,
<dyn_wa>.
data: alv_fldcat type slis_t_fieldcat_alv,
it_fldcat type lvc_t_fcat.
data: it001 type table of t001 with header line.
selection-screen begin of block b1 with frame title text-001.
select-options: s_bukrs for it001-bukrs.
selection-screen end of block b1.
start-of-selection.
select * into table it001 from t001
where bukrs in s_bukrs.
perform build_dyn_itab.
* Build_dyn_itab
form build_dyn_itab.
data: index(3) type c.
data: new_table type ref to data,
new_line type ref to data,
wa_it_fldcat type lvc_s_fcat.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = 'PERIOD' .
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 6.
append wa_it_fldcat to it_fldcat .
loop at it001.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = it001-bukrs .
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 4.
append wa_it_fldcat to it_fldcat .
endloop.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
endform.
Regards,
Rich Heilman -
Selection Options feature for variable input in BEx in 7.0 version
Hi All,
We are currently in EHP1 BI 701 software version. We have queries in both 3.x and 7.0 version. The variable screen that we get when we execute the report in 3.x and 7.0 is different.
We have selection options in 3.x (We can copy and paste values (non sequential) from an excel sheet for example during variable input) but I'm not seeing the same in 7.0 queries.
Please suggest if it's a configuration/software issue or i'm missing something here.
Regards,
VivekHi,
I would like to inform you that you will not get the same button as in 3.x . But when you open the F4 screen and then you have
to click on the More Button.
Two ways you can copies:
To past from clipboard follow these steps:
1. Click on the u201CMore >>u201D button.
2. Click on the right box to set the focus.
3. Ctrl + V.
To import from a txt file follow these steps:
1. Click on the u201CMore >>u201D button.
2. Right click on the right box and choose u201CUpload selectionsu201D option.
3. Select the txt you want to import.
All the values will be copied on the Right Pane.
Thanks,
Venkat -
Selecting user input from Select option into smart form
Hi,
when i use parameter then i wil show company code in smart-form output
but when i use select option then its throwing error parameter specified here is different
what should i do in this case i want to design a big select option screen for taking user input
REPORT ZMM.
TABLES BSEG.
DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
V_FMNAME TYPE RS38L_FNAM.
*PARAMETERS SO_BUKRS TYPE BUKRS.
SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
DATA : Z_CONTROL TYPE SSFCTRLOP, "Smart Forms: Control structure
Z_OPTIONS TYPE SSFCOMPOP. "SAP Smart Forms: Smart Composer (transfer) options.
MOVE 'X' TO : Z_control-no_dialog, "SAP Smart Forms: General Indicator
Z_options-tdnewid, "New Spool Request (Print Parameters)
z_control-PREVIEW. "Print preview
MOVE 'LP01' TO Z_options-tddest. "Spool: Output device
MOVE space TO Z_options-tdimmed. "Print Immediately (Print Parameters).
MOVE 'PRINTER' TO Z_control-device. "Output device
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORMNAME
IMPORTING
FM_NAME = V_FMNAME.
CALL FUNCTION V_FMNAME
EXPORTING
CONTROL_PARAMETERS = Z_CONTROL
OUTPUT_OPTIONS = Z_OPTIONS
USER_SETTINGS = ''
BUKRS = SO_BUKRS.
pls help me in this regards.
ketan..hi
thnx for your reply
can u pls elaborate in my code
now i changed code BUKRS = SO_BUKRS-low.
either i can give low or high but how to select from range
REPORT ZMM.
TABLES BSEG.
DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
V_FMNAME TYPE RS38L_FNAM.
*PARAMETERS SO_BUKRS TYPE BUKRS.
SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
DATA : Z_CONTROL TYPE SSFCTRLOP, "Smart Forms: Control structure
Z_OPTIONS TYPE SSFCOMPOP. "SAP Smart Forms: Smart Composer (transfer) options.
MOVE 'X' TO : Z_control-no_dialog, "SAP Smart Forms: General Indicator
Z_options-tdnewid, "New Spool Request (Print Parameters)
z_control-PREVIEW. "Print preview
MOVE 'LP01' TO Z_options-tddest. "Spool: Output device
MOVE space TO Z_options-tdimmed. "Print Immediately (Print Parameters).
MOVE 'PRINTER' TO Z_control-device. "Output device
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORMNAME
IMPORTING
FM_NAME = V_FMNAME.
CALL FUNCTION V_FMNAME
EXPORTING
CONTROL_PARAMETERS = Z_CONTROL
OUTPUT_OPTIONS = Z_OPTIONS
USER_SETTINGS = ''
BUKRS = SO_BUKRS-low.
ketan.. -
Output from tables which I mention in select options of the screen as input
Dear All,
I want to fetch the data in the form of output from tables which I will mention in select options of the screen as input.
In selection screen option if I write any table name then how can i select this table in select query of ABAP program ?.
I may select any tables in select options of screen. But In select query I should get that table name automatically.. How ?
e.g. If i put table name as an input i.e. MARA in select option .
In program how to write select query to get records from that table ?
SELECT MTART MATKL from MARA
Every time I should not go to select query of program & replace the tablename.
How to solve this problem ?Hi,
PARAMETERS p_table(30)." type string.
"This is a Tested code Just Execute and Check
START-OF-SELECTION.
DATA: lt_tmp TYPE REF TO data.
DATA : line TYPE REF TO data.
FIELD-SYMBOLS: <lt_tmp> TYPE STANDARD TABLE, <wa>, <dyn_field>.
CREATE DATA lt_tmp TYPE STANDARD TABLE OF (p_table).
ASSIGN lt_tmp->* TO <lt_tmp> .
CREATE DATA line LIKE LINE OF <lt_tmp>.
ASSIGN line->* TO <wa>.
SELECT * FROM (p_table) INTO TABLE <lt_tmp>.
IF sy-subrc = 0.
LOOP AT <lt_tmp> ASSIGNING <wa>.
DO.
ASSIGN COMPONENT sy-index
OF STRUCTURE <wa> TO <dyn_field>.
IF sy-subrc NE 0.
EXIT.
ENDIF.
IF sy-index = 1.
WRITE:/ <dyn_field>.
ELSE.
WRITE: <dyn_field>.
ENDIF.
ENDDO.
ENDLOOP.
ENDIF.
Cheerz
Ram -
Making input select option or input field mandatory....
Hello Gurus,
I have been through some material to create select options in web dynpro ABAP. Now I want to make one of the fields mandatory so that if user executes it without filling data in that filed, it gives error message or enforces user to input in the manadtory field.
I know how to do this in ABAP but how do I achieve the same in ABAP webdynpro ?
Please help.
Regards,
Jainam.Hi ,
Set i_obligatory parameter as X. This will set the select options as mandatory and standard error message will popup in case it is not filled.
wd_this->m_handler->add_selection_field(
i_id = 'S_CARR_ID'
it_result = lt_range_table
* i_obligatory = 'X' , " To make it mandatory
Maybe you are looking for
-
ACS20001: An error occurred while processing a WS-Federation sign-in response.
Hey guys, can anyone help with this? I'm trying to access Visual Studio from home, however when trying to log in, i get this error. An error occurred while processing your request. HTTP Error Code: 400 Message: ACS20001: An error occurred while proce
-
Program is erroring out in production system due to transport being missed
hey, we are having a issue where program is erroring out in production which works perfectly fine in dev. we are guessing because of transport is being missed to move to production. what is the best solution. is there way in SAP where we can overwrit
-
Boot Camp Assistanse 5.0.2
I have a legal Windows 8 64 bit DVD and Boot Camp Assistant 5.0.2 my OSX is 10.8.3 and when bootcamp tries partitioning disk it doesn't work i keep if i have any thunderbolt plugged but i didn't. I've been trying to make this work for atleast a year
-
MIGO Error when issuing materials to PM Refurbished order
When I am issuing materials (material types: ERSA-Spare parts or HIBE – Operating supplies) to PM Refurbished order using MIGO, I am getting the following message. SAP Message Details: Enter CondKey: Message no. M7018 Diagnosis: You have not ente
-
Adding Alternative Audio Formats to Website
Am currently constructing a website through Dreamweaver that is to demonstrate new, standard and alternative internet media audio formats including, to mention a few: Ogg Vorbis, Windows Media, iTunes, MP3/MP4, Real Audio, etc. I am really new to thi