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
Similar Messages
-
How to create the select option in the screen
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMTry RANGES.
The RANGES has same structure as that of select-options. -
How do you delete records from table with data in a select option
how do you delete records from table with relevant to data in a select option..how to write coding
Hi,
Try
if not s_select_option [ ] is initial.
delete * from table
where field in s_select_option.
endif.
commit work.
Be careful though. If select option is emty, you will delete the entire table.
Regards,
Arek -
How to creat a select-options in the screen layout of se80.
Because in se80 ,the screen is drawed in the screen layout,but it just have text-field for parameter.
Thanks!In your main program, you can declare your desired select-option. Do your select-option declaration before calling your dialog screen.
Create a subscreen in your screen's flow logic (PBO & PAI) that contains your selection screen with its corresponding screen number of your declared subscreen.
sample code of select-option declaration below.
SELECTION-SCREEN BEGIN OF SCREEN 5003 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK PARAM.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (18) TEXT-ABK FOR FIELD S_ABKRS.
SELECT-OPTIONS: S_ABKRS FOR PA0001-ABKRS.
SELECTION-SCREEN POSITION 47.
PARAMETER: P_ATEXT LIKE T549T-ATEXT VISIBLE LENGTH 30.
SELECTION-SCREEN POSITION 70.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK PARAM.
SELECTION-SCREEN END OF SCREEN 5003.
call screen 5000.
Sample Flow logic Code below of screen 5000:
*--- PBO
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN SUB_5003 INCLUDING SY-REPID '5003'. " subscreen 5003
MODULE STATUS_5000.
LOOP AT GT_MBBH INTO GS_MBBH WITH CONTROL TC_MBILL
CURSOR TC_MBILL-TOP_LINE.
ENDLOOP.
*--- PAI
PROCESS AFTER INPUT.
LOOP AT GT_MBBH.
FIELD GS_MBBH-SELEC MODULE TC_TABLE_MARK ON REQUEST.
ENDLOOP.
MODULE USER_COMMAND_5000.
CALL SUBSCREEN SUB_5003. " subscreen 5003
Hope this will help.. -
Multiple select option in the screen painter
Hi all,
I want to give multiple select option for a particular field in the screen painter.
how to provide it.
NitinHi,
Refer to this link..[Select-Option in Dialog programming |Re: Select-Option in Dialog programming]
[How to make select option in module pool |how to make select option in module pool] -
How to create the select option for the Plant in screen (Module pool)
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Cross post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMSteps to get SELECT-OPTIONS in module pool programs.
1.Start one dialog program with SAPMZ_001.
Place the below code in the TOP include of the dialog program.
TABLES marc.
SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
SELECT-OPTIONS: werks FOR marc-werks.
SELECTION-SCREEN END OF SCREEN 3200.
2 .Create one screen 3000.
Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN l_subscreen.
Activate all.
Create Transaction code for the dialog program .
Execute the transaction code. You will see the select-option for werks how we see on Selection-screen. -
Select-options/range in screen
Hi all,
I just wanted to display select-options in the screen numbered 1000,
by putting which control can i do this ??........
regards
Joseif u want to pass values in the selection screen use
Ex:
selection-screen begin of block b1
select-options : p_matnr for mara-matnr.
selection-screen end of block b1.
else if u want to pass while execution of program
use Ranges
Ex: ranges: p_matnr for mara-matnr.
Pass variables
p_matnr-low, p_matnr-high....................
Regards,
Ajay -
Delete records from tableA which are not in tableB
Table A contains milions of records which is the best way to delete records from tableA which are not in tableB
delete from tableA where empno not in (select empno from tableb)
or
delete from tableA where empno not exists (select empno from tableb
where b.empno=a.empno)
any helpHi
If you can do this, do with this:
create table tableC
as select a.*
from tableA a,
(select empno from tableA
minus
select empno from tableB) b
where a.empno = b.empno;
drop table tableA;
rename table tableC to tableA;
Ott Karesz
http://www.trendo-kft.hu -
FM which will display a select option in a pop up
Hi All,
I am looking for a FM which will display a select option in a pop up and prompt me to enter some value into it.
I tried FM POPUP_GET_VALUES_USER_BUTTONS, & POPUP_GET_VALUES which allows me to enter only single parameter values and not a select option.
Regards
PujaHi
u can create by yourself, it's very easy and fast:
TABLES BKPF.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS: S_BUKRS FOR BKPF-BUKRS,
S_BELNR FOR BKPF-BELNR.
SELECTION-SCREEN END OF SCREEN 100.
CALL SELECTION-SCREEN 100 STARTING AT 5 10.
IF SY-SUBRC = 0.
*------> User has pressed F8
ELSE.
*------> User wants to leave the popup
ENDIF.
Max -
FM which will display a select option
Hi All,
I am looking for a FM which will display a select option in a pop up and prompt me to enter some value into it.
I tried FM POPUP_GET_VALUES_USER_BUTTONS, which allows me to enter only single parameter values and not a select option.
RegardsHi,
Please try below function modules.....
FC_POP_GET_RANGE
RERA_POPUP_MD_RANGE_INPUT
UG_WB_POPUP_TO_GET_RANGE
Dont forgot to Reward me points .....
All the very best....
Regards,
Sreenivasa sarma K.
Edited by: sharmashree kashi on Mar 26, 2008 2:59 PM -
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 -
SELECT-OPTIONS on custom screen problem
Hi all,
I have a screen added on the standard transaction IW21 (with selection screen definition and called like subscreen). On this screen I have some SELECT-OPTIONS and when I press the button of selecting multiple values, I get the following message: "Requested function & is not available here" (V0 104), where & is long number starting with %..No matter the error message, the values are transferred correctly from the multiple selection screen to my screen. I have added entries to the tables T185F and T185 with the transaction VFBS, but I dont know how to assign the Function codes to SELECT-OPTIONS..
Thanks in advance for feedback!
AnnaHi, this is copied from SELECT-OPTION documentation:
The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, use SUBMIT to pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY, the fields are then truncated whenever the selection screen is processed in the background ( SUBMIT without VIA SELECTION-SCREEN).
regards, -
Multiple select-options in a screen But no screen space
Dear Experts,
I have mutiple select options in a screen, i am finding it a problem to display them all in one screen.
it should be done with out any vertical scroll nor horizontol scroll.
Awaiting to hear from you all.
Regards,
KarthikHi,
You can include more than one selct options or parameters in a single line..that might be favourable as u do not want to have scrolls..
the syntax goes like this
SELECTION-SCREEN BEGIN OF LINE.
<declare your parameters and select options>
SELECTION-SCREEN end OF LINE.
whatever u have written between begin of line and end of line will appear in a line..in this way you can reduce the page size..Hope the information was useful.
Regards
Vasavi
Edited by: Vasavi Kotha on Jan 6, 2009 5:29 PM -
Have new update but when i am on trying to sync I have no scroll down bar to select option on the bottom of pages so sync is not done with all i want on it. Using my arrow keys also dont work. I have deleted itunes and reinstall but its still the same. Any ideas?
iPod touches or any iDevices from Apple sync only to one computer. If you sync to a different computer, all your music will be replace with the music from the new computer's iTunes. If the music were purchased from iTunes, you can re-download them again otherwise the music on iPod touch will be deleted. Do you have iTunes backup?
-
The size of your selected options exceeds the available space
I am trying to install a brand new full version of Adobe Creative Suite 4 Web Premium.
I am unable to proceed, as the install options window tells me "The size of your selected options exceeds the available space" with a red exclamation point.
It says my options require 9.6GB of space.
I am trying to install on my D Drive, which has 1.1 TB of available space. Yes, that's right, Terrabytes.
Help!
System: Intel Core2 Quad Q6600 @2.4 GHz, Windows Vista Ultimate 64 bit SP1, 4 GB RAM, system drive WD Raptor (75GB) and main drive (where I am trying to install CS4) is (6) 500GB seagate SATA hard drives in a 2.5TB RAID 5 array. Motherboard is a Gigabyte GA-P35-DQ6 and video is an Nvidia GEForce 8800GT (512 RAM). RAID controller is onboard the motherboard (Intel ICH8R)SOLVED!
Bob and Peter, you nailed it.
I had inadequate room on the C drive...I was down to only 5 GB of space.
I cleaned up the desktop (The wife thinks that is a great place to store everything) and freed up my C drive so it had just over 10 GB of free space, and the red exclamation point went away. It is now happily installing onto my D drive.
Ian, my C drive (system) is a Western Digital Raptor...10,000 RPM. They are really small (75GB) but really fast so that windows boots up really quick. It is a performance thing. My D is a RAID array for redundancy...as I cannot afford to lose my pictures, videos, and documents, etc. - and I always keep my program installs on D so as to keep the C drive speedy and un-cluttered - plus if and when windows gets corrupted (which it does once every couple of years for some reason), I can re-do it in 5 minutes with an image using Acronis True Image.
Thanks to all of you for your ideas, and I am glad I got it solved. If any Adobe employees read this...you can at least throw in some nice paper manuals for the software. When software is $1600.00 I'm not real concerned about saving another tree - and you shouldn't be either...I'd rather have some paper manuals for reference when I buy a full retail package. So pump up the packaging please. Thanks!!!!
Shane
Maybe you are looking for
-
Storing iTunes on external hard drive -- quick question
I know how to save my iTunes library on an external hard drive, but how do I move my entire Itunes onto it? Do I just save the Itunes on the external drive instead of on the C drive? As it is now, all my music is stored on the external drive, but if
-
If anyone can help me here I'd appreciate it. I have one song that repeatedly crashes whenever I do an edit on an audio region and then put a crossfade in. As soon as I press play, to hear what I've just done, I get the spinning beachball and the Log
-
Keeping or Saving a check box in agentry
Hi; I am working on customising Work Manager 6.0 on Agentry Editor 6.1.3. I have a list of personnel on the left side of the screen and on the right hand side, I have a check box that shows for every personnel selected on the left side. Somehow when
-
I am running windows XP-SP2. I just don't want FF11 to upgrade to FF12 as I already have that installed in a different directory. I need to be able to have the two installed side by side (but not necessarily at the same time).
-
Some images do not appear in Nokia browser. 5630, ...
Hi 2 all, I've got a problem with some images that do not showing up in Nokia browser. This is a major problem that randomly occurs with different Nokia handsets. Please check the .html page in the attachment. If you open the page in PC browser, you'