How will use Select-Options in Read table Concept.
Hi All,
How will use Select-Options in Read table. For example,
Select-Options : test for bseg-prctr.
Select * from bseg into table ITAB.
Read table ITAB with key prctr in test.
Last line is showing error. If any way to read ITAB as conditions given per select options.
Thankx Advance,,,
HI,
you cannot use " IN " with read statement , read statement is used as:
READ TABLE it_collect ASSIGNING <fs_collect>
WITH KEY rbpl = <fs_wkdet>-arbpl
ufnr = <fs_wkdet>-aufnr.
anyways you can use loop at statement before read to use " into " statement as:
LOOP AT it_master INTO l_master
WHERE werks = l_werks
hope it will help you
regards
rahul
Edited by: RAHUL SHARMA on Dec 30, 2008 9:14 AM
Similar Messages
-
How to use select options whitout ranges ie like parameter
how to use select options whitout ranges ie like parameter and pls send me the code on that
thanks
raja.hi,
SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b>
eg: code
<b>SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b></b>
data: itab type table of kna1 with header line.
select * from kna1 into table itab where kunnr IN s_kunnr.
rgds
Anver -
How to use select-options in the function module of import parameter ?
Hi ...
I have created a BAPI and tested in SWO1 tcode , by giving the single value for an company code ( BUKRS ) , it executed properly .
Same thing is working after implementing in a program .
so now it is working for fetching a single company code details .
My requirement is : I want to use select-options in program as well as in function module IN IMPORT PARAMETER.
Program :
REPORT ZTEST.
TABLES : T001 , ZBAPI_STR .
TYPES : BEGIN OF TY_ITEM .
INCLUDE STRUCTURE ZBAPI_STR .
TYPES : END OF TY_ITEM .
DATA :WA_ITEM TYPE TY_ITEM ,
ITEM LIKE STANDARD TABLE OF WA_ITEM INITIAL SIZE 0 .
PARAMETER : BUKRS TYPE ZBAPI_STR-BUKRS.
call function 'ZBAPI_FMT001'
exporting
bukrs = BUKRS
IMPORTING
RETURN =
tables
itemtab = ITEM
IF ITEM IS NOT INITIAL .
LOOP AT ITEM INTO WA_ITEM .
WRITE : / WA_ITEM-BUKRS , WA_ITEM-BUTXT , WA_ITEM-ORT01 , WA_ITEM-LAND1 .
ENDLOOP.
ENDIF.
FUNCTION MODULE :
FUNCTION ZBAPI_FMT001.
""Local Interface:
*" IMPORTING
*" VALUE(BUKRS) TYPE EFG_TAB_RANGES
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRET2
*" TABLES
*" ITEMTAB STRUCTURE ZBAPI_STR
SELECT BUKRS BUTXT ORT01 LAND1 FROM T001 INTO TABLE ITEMTAB WHERE BUKRS = BUKRS .
ENDFUNCTION.
Regards
Deepa.I have given a similiar example which i did
Declare a
Table type:Z_TT_PONUM
Short text : Select options PO Number
in SE11 tcode with row type eg: Z_ST_PONUM
create a structure (this will be the row type)
Structure Z_ST_PONUM
Short text Select Options Field PO number
Compenent Compent type
SIGN BAPISIGN Inclusion/exclusion criterion SIGN for range tables
OPTION BAPIOPTION Selection operator OPTION for range tables
LOW EBELN Purchasing Document Number
HIGH EBELN Purchasing Document Number
In the function module import
give as
I_PO_NUM TYPE Z_TT_PONUM opt pass value Select options PO Number
Hope this is exactly what you want to know.
So you create a structure simliar to mine but the low an high whould be your component
then a table type and then include that in the BAPI.
Then pass your select-option value to this BAPI when you call this BAPI in the program -
How to use selection column in a table control
I have given the name of the selection column to be 'DEF_SEL',now i want to select rows in the table control using the 'selection column attribute' and maniupulate it programmatically so that i would transport the rows selected using selection coulmn to a different table control.How would i do this?
Hi raja,
Once you have the table cobtrol built using the extra field in the internal table, all the selected rows will have DEF_SEL = 'X'.
Now you can loop your internal table and filter the records which were selected.
in pai modules:
loop at itab where DEF_SEL = 'X'.
Move itab information inrto another internal table.
append itab_new.
endloop.
have another table control which shows the data in the itab_new.
regards,
Ravi -
How to use "Select options" in Webdynpro Java ?
HI experts ,
I want know if can be implemented "select options" like the ones used in R3 - ABAP in a webdynpro Java.
And in case of being possible, how to implemented using Adaptive RFC or BAPI with a R3 backend system?
Our Portal is EP6.0 SP18 ,J2EE 6.40 .
Thanks & Regards,
Jianguo ChenHi Jianguo,
check these links:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/5f/e5de3f68d48f15e10000000a155106/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/5f/e5de3f68d48f15e10000000a155106/frameset.htm</a>
You may use 2 EVS to simulate your select option.
Regards,
Gianluca Barile -
Using Select option in Native SQL
Hi,
Can any one tell me, how to use select option value in native SQL.
ie.,
I want to use select option in where condition. Need to select all the records from table(non-SAP) where date in given range.
Please suggest.
Thanks,
AmalHi
No!
U need to find a way to convert a range of select-option to a range for Native SQL, probably it should be better doesn't use a select-option for the date but two parameters: one for date from and one for date to.
Max -
Problem with table-indexes when using select-options in select
Hello experts,
is it right that table-indexes will not be used if you take select-options to select data from the database?
in detail:
i have build up an table-index for one of our db-tables and test it via an test-programm. The first test with '=' comparisons worked fine. Every key of the index was used; checked via ST05!
e.g.: SELECT * FROM TABLEA INTO ITAB WHERE keya = '1' AND keyb = '2' AND keyc = '3'.
Now i startet the test with select-options
e.g.: SELECT * FROM TABLEA INTO ITAB WHERE keya IN seltabA AND keyb IN seltabB AND keyc IN seltabC.
First of all i just filled the seltabs with only 1 value: eg: seltabA= SIGN = 'I' OPTION = 'EQ' LOW = '1' etc.
Everything worked fine. Every key of the index was used.
But now, I putted more than one entries in the seltabs e.g.
seltabA: SIGN = 'I' OPTION = 'EQ' LOW = '1'
SIGN = 'I' OPTION = 'EQ' LOW = '2'
SIGN = 'I' OPTION = 'EQ' LOW = '3'
From now on, the indexed was not used completely (with all keys).
Isn't that strange? How can i use select-options or sel-ranges with using the complete table-indexes?
Thanks a lot,
MarcelHi Hermann,
i hope this helps:
this is the first one, which uses the complete index:
SELECT
"KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,
"GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,
"HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,
"TERDAT"
FROM
"/dbcon/01_con"
WHERE
"MANDT" = ? AND "LIFNR" = ? AND "ORGID" = ? AND "KOART_BASIS" = ? AND
"STATUS" = ? AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR "STATUS" = ? OR
"STATUS" = ? ) WITH UR
RESULT: 5 IXSCAN /dbcon/01_con05 #key columns: 4
And the second one, which does not use the complete index! The 3 ranges are filled each with 2 values. Remember; when i fill them each with only one value, the result is the same as you can see above(/dbcon/01_con05 #key columns: 4):
SELECT
"KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,
"GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,
"HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,
"TERDAT"
FROM
"/dbcon/01_con"
WHERE
"MANDT" = ? AND "LIFNR" IN ( ? , ? ) AND "ORGID" IN ( ? , ? ) AND
"KOART_BASIS" IN ( ? , ? ) AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR
"STATUS" = ? OR "STATUS" = ? ) WITH UR
and here the access-plan
0 SELECT STATEMENT ( Estimated Costs = 5,139E+01 [timerons] )
5 1 RETURN
5 2 NLJOIN
5 3 [O] TBSCAN
5 4 SORT
5 TBSCAN GENROW
5 6 <i> FETCH /dbcon/01_con
7 IXSCAN /dbcon/01_con05 #key columns: 2
As you can see, only 2 keys were taken for indexed selection!
Any idea?
Kind regards,
MArcel
Edited by: Marcel Ebert on Jul 28, 2009 5:25 PM -
How to assign select-option values to internal table
hi all,
how to assign select-option values to internal table
thanks in advance.Hi,
You just need to loop at your select-option field and take the values from low and high fields.
for. e.g
loop at s_werks .
move:s_werks-low to <your itab>
if not s_werks-high is initial .
move: s_werks-high to <youritab>
endif .
append <your itab>
endloop .
OR use select statement.
regards,
Omkar.
Message was edited by:
Omkaram Yanamala
Message was edited by:
Omkaram Yanamala -
How can I select columns from a table EMP, using Select statement?.
Hi Friends,
How can I select columns from a table EMP?.
I want to select columns of EMP table, using select statement.
Please reply me urgently.
ShahzadSomething like this:
scott@DBA> select empno,ename,job from emp;
EMPNO ENAME JOB
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
14 rows selected.Check the documentation:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
Message was edited by:
Delfino Nunez -
How to creat select-option on module pool screen???
Hi All,
please tell me how to creat select-option on module pool screen???
Regards
DeepakHi Deepak Kumar Sharma,
There are Two ways to achieve it...
1) How to create a select-options in a module pool screen.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This call subscreen statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to
dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Also have a look on below threads
how to make select option in module pool
select option in module pool program
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
Select options to internal table
i have selected some values in the range say 100 to 200 using select options....is there any way to get these values in an internal table?
also does select option work with alpha numeric values
eg : if i want to select between a100 and b200?>
VR ARVIND wrote:
> i mean to say if i have 100 to 200.. i need 101 102 103 etc..continuosly till 200
Select-options are really only useful for selecting data that matches the select-options from some other dataset. They don "expand out" into a set of values.
If you are always specifying a range in the selection screen, use two parameters - p_low, p_high.
You then will need to build your itab entry by entry. So
l_count = p_low.
WHILE l_count LE p_high.
INSERT l_count INTO t_itab.
ADD 1 to l_count.
ENDWHILE.
For a100 to a200, you'd have to do some string slicing and concatenation to get the desired result. -
How to get select-options type fields in module programming
i need to get ranges type of fields ( like we use select-options in reports) in module prgrming..im only gettin single entry field (like we use in paramenters)...how to get it like this
field1 ___ to ___ ->
field2 ___ to ___ ->
Thanx,
Naveen VishalHi,
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. -
HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS
Hi experts,how to pass select options value as a export parameters to a zclass.
can give me some idea.
Thanks
saiAs Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
So - assuming you have the following in your program:
DATA: wa TYPE sflight.
SELECT-OPTIONS so_car FOR sflight-carrid.
you can create a publically-visible type in your class using direct type entry and the code
TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
and use this to define the importing parameter of the method.
The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
Hope this helps.
Regards
Jon. -
How to create select-options in module pool program
Hi
i am structed at this point could you please tell me
how to create select-options in module pool programSteps to get SELECT-OPTIONS in module pool programs.
<li>. Start one dialog program with SAPZ_TEST.
<li>. Place the below code in the TOP include of the dialog program.
PROGRAM SAPMZ_TEST.
TABLES mara.
SELECTION-SCREEN BEGIN OF SCREEN 2100 AS SUBSCREEN.
SELECT-OPTIONS: matnr FOR mara-matnr.
SELECTION-SCREEN END OF SCREEN 2100.
<li>. Create one screen 2000 .
<li>. Go to Layout of the screen and Define subscreen area on the screen and Name it as g_subscreen.
<li>. Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN g_subscreen INCLUDING 'SAPMZ_TEST' '2100'.
PROCESS AFTER INPUT.
CALL SUBSCREEN g_subscreen.
<li>. Activate all.
<li>. Create Transaction code for the dialog program SAPZ_TEST.
<li>. Execute the transaction code. You will see the select-option like we see on Selection-screen.
I hope that it gets u clear idea.
Thanks
Venkat.O -
How to use CSS option in Answers
Hi,
I have around 5 Dashboards, which includes close to 20 Reports.
I would like to learn how I can format column name (like Font, Size) and data appearance in each report.
Currently am doing it manually, one column by one column. I would like to know how to use CSS option.
Regards,
JitendraThe easiest way is to do this is to create a new "skin" for your dashboards or either modify the default. The location of the default folder is /res/s_oracle10/b_mozilla/views.css. The view.css file is where you can go and customize the classes. For example, if you want to customize the Pivot Table Row Header, search for .PTRH and then you can alter the existing formatting or add additional specifications.
Maybe you are looking for
-
Hi All, One of the vendors we deal with sent out a mass email to all their customers. Here is a partial excerpt of how I received the email: = = start email excerpt = = Received: from johnwkennedyco.com [192.168.1.32] by johnwkennedyco.com with E
-
her apps, not her itunes account
-
I have just bought an airport capsule 2t
It is installed and working on the ground floor with my iPhone/ Macbook pro etc, but wont find the airport upstairs, that used to work, wirelessly. Any ideas. When I link them with a cable they work. It seems to be the wireless range is worse with th
-
Why am i constantly having to restart my phone to get service?
Ever since the new update every couple of days or so I'll try and open an app that requires internet and it won't load. TMZ, Facebook, Safari basically anything that requires service won't load. My messages won't go through. I'll have to restart my
-
My Iphone 4 is not charging in all types of charges after the iOS5.
Hi!! After the ios5 my Iphone 4 it´s not accepting charges from any type of charge ( pc/car/dock/wall). Now the battery is dead what should I do? I tryed in the computer but the USB it´s not regonizing the Iphone. Please someone help me!!! Now the ba