Multiple Selection on a block
Hi experts,
How can i make multiple selection on a detail block (in ascending order) and save the selected data on database.?
can i have a sample code please?
Thanks,
mr. baguhan
baguhan,
then replace with this code.
DECLARE
Num_Total_Records NUMBER;
Num_Loop_I NUMBER;
BEGIN
GO_BLOCK(<BLOCK_NAME>);
FIRST_RECORD;
LAST_RECORD;
Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
FIRST_RECORD;
FOR Num_Loop_I IN 1..Num_Total_Records LOOP
IF <CHECKBOX> = 1 THEN
<................................................>
END IF;
NEXT_RECORD;
END LOOP;
<................................................>
END;
Regards,
Manu.
Similar Messages
-
Multiple selection in a detail block
In a scenario where there is a master-detail-detail block structure, is it possible to select several records of the first detail block and enter a record for them in the second detail block?
Thanx in advance.
P.S. please excuse me if the question sounds weird.use this code: i used this for multiple selection in a detail block to delete the selected record. the trick is u need to create a Check box.
DECLARE
Num_Total_Records NUMBER;
Num_Loop_I NUMBER;
BEGIN
GO_BLOCK(<BLOCK_NAME>);
FIRST_RECORD;
LAST_RECORD;
Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
FIRST_RECORD;
FOR Num_Loop_I IN 1..Num_Total_Records LOOP
IF <CHECKBOX> = 1 THEN
<................................................>
END IF;
NEXT_RECORD;
END LOOP;
<................................................>
END; -
Create a custom multiple selection on screen - not selection-screen block
Dear expert,
I created a text field on screen for input selection, e.g field bname for USR02-BNAME. How can i create a CUSTOMIZE multiple selection plus a paste (from clipboard) feature on this screen (e.g. SCREEN 0002) like standard selection-screen from SAP when we create a report.
For a better view on what i want:
This text field already use F4 customize search help. I need a multiple selection lines (like standard selection-screen a button on the right side of select-options field).
Remember, i don't create textfield from select-options parameter (e.q. SELECT-OPTIONS : XBNAME FOR USR02-BNAME),
but on a screen.
Anyone can help my case?.
Thanks and Warm regards,
Dondi.Had the same question from my users. This was the first hit i found but unfortunately without an answer. So for those with the same question, this is how i solved it (goede voornemen voor 2014). In my case the request is a complex selection on the LFA1 table.
The screen contains two fields to enter the low/high value for lifnr (zdy_droogteschade-lifnr and zdy_droogteschade-lifnr_tot)
Created a button on the screen, mark this as output only, when pressed the routine multi_select_crediteuren is performed wich uses the fm 'COMPLEX_SELECTIONS_DIALOG'.
To top it all of, the icon on the button changes depending on the contains of the range table (in a routine called from the PBO).
This only works when the button is marked as 'output only',
Include the icon type pool: 'type-pools: icon.' -
Multiple select staement in 1 query
Hell Team,
I am New to this SQL world. Please help me out with htis:-
I have following queries:-
#select name from v\$database;
#select log_mode from v\$database;
#select count(*)"INVALID_OBJECTS" from dba_objects where status='INVALID';
#select count(*) "INVALID_N/A_INDEXES" from dba_indexes where status!='VALID';
#select count(*)"Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID';
#select count(*) "Broken Jobs" from dba_jobs where broken!='Y';
#select count(*) "Block Corruption" from v\$database_block_corruption;
i want a table which can be generated just by select cmd and it will list the result of all the above queires as follow:-
DB_NAME ARCH_MOD INV_OBJ INV_IDX INV_TRG B_JOB BLK_CRP
PROD NOARCHIVELOG 0 86 6 3 0
I mean to say i want multiple select queries into 1 table (note:- i m not saying to create a tables and then insert,update(using select from other tables), its just a sheel script that will fetch these record into a txt file)Something like this ?
SQL> ed
Wrote file afiedt.buf
1 select a.name,
2 a.log_mode,
3 b."INVALID_OBJECTS",
4 c."INVALID_N/A_INDEXES",
5 d."Invalid Triggers",
6 e."Broken Jobs",
7 f."Block Corruption"
8 from
9 v$database a,
10 (select count(*) "INVALID_OBJECTS" from dba_objects where status ='INVALID') b,
11 (select count(*) "INVALID_N/A_INDEXES" from dba_objects where status !='VALID') c,
12 (select count(*) "Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID') d,
13 (select count(*) "Broken Jobs" from dba_jobs where broken!='Y') e,
14* (select count(*) "Block Corruption" from v$database_block_corruption) f
SQL> /
NAME LOG_MODE INVALID_OBJECTS INVALID_N/A_INDEXES Invalid Triggers Broken Jobs Block Corruption
ORCL ARCHIVELOG 1 1 0 3 0
SQL>Now just try to replace your script with this :
#!/bin/bash
export hostname=$2;
echo " export started"
export ORACLE_SID=$1;
export ORACLE_HOME=/$1db/db/10.2.0;
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/lib;
export TNS_ADMIN=/$1db/db/tech_st/11.2.0/network/admin/$1_$2;
PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/oracle/bin:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch;
export PATH=$PATH:$ORACLE_HOME/bin;
echo $ORACLE_HOME
echo "all export complete"
#export var1=/$1db/db/tech_st/11.2.0/$1_$2.env
#export var2=/$1db/db/tech_st/11.1.0/$1_$2.env
export var3=/$1db/db/10.2.0/$1_$2.env
#. /$1db/db/tech_st/11.2.0/$1_$2.env
#. /$1db/db/tech_st/11.1.0/$1_$2.env
#./$1db/db/10.2.0/$1_$2.env
sqlplus / as sysdba <<eof
select a.name,
a.log_mode,
b."INVALID_OBJECTS",
c."INVALID_N/A_INDEXES",
d."Invalid Triggers",
e."Broken Jobs",
f."Block Corruption"
from
v\$database a,
(select count(*) "INVALID_OBJECTS" from dba_objects where status ='INVALID') b,
(select count(*) "INVALID_N/A_INDEXES" from dba_objects where status !='VALID') c,
(select count(*) "Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID') d,
(select count(*) "Broken Jobs" from dba_jobs where broken!='Y') e,
(select count(*) "Block Corruption" from v\$database_block_corruption) f;
exit; >>filename.txt
Let us know if it works for you or not.
Regards
Girish Sharma -
Setting property attribute values for multiple selected objects.
Hello,
Is there an easy way to set the attribute property values for more that one selected Table Operator Attribute (column) at a time. For example the target table has over 100 columns but I only want to INSERT/UPDATE 10 of those columns. The generated MERGE, INSERT and UPDATE statements will perform DML on all of the columns in the target table, setting the 90 columns with no mapping set to NULL. This is due to the Loading Properties 'Load Column when Updating Row' and 'Load Column when Inserting Row' both default to Yes. I would like to select multiple Attributes in the Table Operator and change the 'Load Column when Updating Row' and 'Load Column when Inserting Row' to No. This is similar to what you were able to do in Oracle Forms 9.0 Designer select multiple Items in a Block and change the properties en-masse.
ThanksHi,
Using OMB scripting to set attribute properties in a data mapping sort of defeats the purpose of utilizing a graphical user interface to define and set properties for a data mapping? Surely the GUI data mapping tool was created to get away from writing scripts and scripting would also require that you know the name of the data mapping, table operator and the set of attribute names for which you have to write one line of script to set each property value, i.e. 90 lines to set 90 attribute values.
Cheers,
Phil -
X3-02 does not support multiple selected delete me...
I have call Nokia Singapore on the issues that X3-02 does not include the feature for all or multiple selective delete message receive. Imagine spam message send to your mobile phone and you have to spend time to delete one at a time. This waste user time and it should be a basic feature of a phone. i have a low end Samsung phone allow me to do this.
Nokia, please put a updated software to allow user to do:-
allow user to mark the spam soure 9 telephone number) and move message into the foder and allow the user to decide to delete it or not.
Allow user to mak and do selective deleation.
Currently, I am very unhappy of this phone as it does not has this important feature.
Thanks
ParryIt take two steps to do this and it depends on the state of the phone. A simple mak and delete at last is availavle in many other phones.
One of the main concern is about sms spam block or filter, this is a important feature. Further more, this phone vibration mode is no selectable. It either on or off fot both call and sms.
Imagine a100 sms flooded will use a lot of battery and anoying.
I am a very unhappy X3-02 owner. I will not recommend anyone to buy this phone until these functions are available. I am even consider to sell it away . -
How to disable the SELECT-OPTINS multiple selection screen's Ranges options
Hi this is sekhar,
I have used the Select-options: statement with 'No-Interval' option. Now I need to restrict the user not to enter the values in the Ranges column of multiple selection screen. How can I do it....You can also refer this code as below : CHECK OUT SELECT OPTION sel_1_0.
*& Report ZTESTREP
REPORT ztestrep.
Include type pool SSCR
TYPE-POOLS sscr.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA opt_list TYPE sscr_opt_list.
DATA *** TYPE sscr_***.
Define the selection screen objects
First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_0 WITH FRAME TITLE text-bl0.
SELECT-OPTIONS sel_0_0 FOR sy-tvar0.
SELECT-OPTIONS sel_0_1 FOR sy-tvar1.
SELECT-OPTIONS sel_0_2 FOR sy-tvar2.
SELECT-OPTIONS sel_0_3 FOR sy-tvar3.
SELECTION-SCREEN END OF BLOCK block_0.
Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_1 WITH FRAME TITLE text-bl1.
SELECT-OPTIONS sel_1_0 FOR sy-subrc.
SELECT-OPTIONS sel_1_1 FOR sy-repid.
SELECTION-SCREEN END OF BLOCK block_1.
INITIALIZATION.
Define the option list
ALL: All options allowed
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
NOPATTERN: CP and NP not allowed
CLEAR opt_list.
MOVE 'NOPATTERN' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne.
APPEND opt_list TO restrict-opt_list_tab.
NOINTERVLS: BT and NB not allowed
CLEAR opt_list.
MOVE 'NOINTERVLS' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
EQ_AND_CP: only EQ and CP allowed
CLEAR opt_list.
MOVE 'EQ_AND_CP' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
JUST_EQ: Only EQ allowed
CLEAR opt_list.
MOVE 'JUST_EQ' TO opt_list-name.
MOVE 'X' TO opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
Assign selection screen objects to option list and sign
KIND = 'A': applies to all SELECT-OPTIONS
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'NOPATTERN' TO ***-op_main,
'NOINTERVLS' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
that is, SEL_0_0, SEL_0_1, SEL_0_2
CLEAR ***.
MOVE: 'B' TO ***-kind,
'BLOCK_0' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'NOINTERVLS' TO ***-op_main.
APPEND *** TO restrict-***_tab.
KIND = 'S': applies to SELECT-OPTION SEL-0-2
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_2' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'EQ_AND_CP' TO ***-op_main,
'ALL' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'S': Applies to SELECT-OPTION SEL_0_3
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_3' TO ***-name,
'I' TO ***-sg_main,
'N' TO ***-sg_addy,
'JUST_EQ' TO ***-op_main.
APPEND *** TO restrict-***_tab.
Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
DB = ' '
EXCEPTIONS
too_late = 1
repeated = 2
not_during_submit = 3
db_call_after_report_call = 4
selopt_without_options = 5
selopt_without_signs = 6
invalid_sign = 7
report_call_after_db_error = 8
empty_option_list = 9
invalid_kind = 10
repeated_kind_a = 11
OTHERS = 12. -
Multiple selection screen.
hi all,
how to create multiple selection screens,
i need 3 selection screens how to do it?
wats the maximum number selection screen can be created in a report.
regards
SuprithSELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
p2 TYPE c LENGTH 10,
p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
q2 TYPE c LENGTH 10,
q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
TAB (20) button1 USER-COMMAND push1,
TAB (20) button2 USER-COMMAND push2,
END OF BLOCK mytab.
INITIALIZATION.
button1 = 'Selection Screen 1'.
button2 = 'Selection Screen 2'.
mytab-prog = sy-repid.
mytab-dynnr = 100.
mytab-activetab = 'PUSH1'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN 1000.
CASE sy-ucomm.
WHEN 'PUSH1'.
mytab-dynnr = 100.
WHEN 'PUSH2'.
mytab-dynnr = 200.
WHEN OTHERS.
ENDCASE.
ENDCASE. -
hi,
i use this code to f4 help and its working o.k. what i wont is multiple selection like to choose 3 or more employee
how i can do that?
REPORT ZV_SMART_SEND1.
TABLES: PA0002.
*DATA: ITAB LIKE PA0002 OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF ITAB OCCURS 0,
PERNR TYPE PA0002-PERNR,
END OF ITAB.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS P_TABLE FOR PA0002-PERNR NO INTERVALS.
DATA BEGIN OF IT_RETN OCCURS 0.
INCLUDE STRUCTURE DDSHRETVAL.
DATA END OF IT_RETN.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TABLE-LOW.
SELECT *
FROM PA0002
INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE BEGDA LE SY-DATUM
AND ENDDA GE SY-DATUM
AND GESCH = '2'.
" Add this line
DATA: LV_REPID LIKE SY-REPID.
LV_REPID = SY-REPID.
" Add this line
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'PERNR'
DYNPPROG = LV_REPID
DYNPNR = '1000'
DYNPROFIELD = 'P_TABLE'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
RETURN_TAB = IT_RETN.
LOOP AT IT_RETN WHERE RETFIELD = 'PERNR'.
P_TABLE = IT_RETN-FIELDVAL.
EXIT.
ENDLOOP.
regardshi i just tried out.
check this .
try whether this changes work
TABLES: pa0002.
*DATA: ITAB LIKE PA0002 OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF itab OCCURS 0,
pernr TYPE pa0002-pernr,
END OF itab.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS p_table FOR itab-pernr . "NO INTERVALS.
DATA BEGIN OF it_retn OCCURS 0.
INCLUDE STRUCTURE ddshretval.
DATA END OF it_retn.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TABLE-low.
SELECT *
FROM PA0002
INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE BEGDA le sy-datum
AND ENDDA ge sy-datum
AND GESCH = '2'.
" Add this line
DATA: LV_REPID LIKE SY-REPID.
LV_REPID = SY-REPID.
" Add this line
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'PERNR'
DYNPPROG = LV_REPID
DYNPNR = '1000'
DYNPROFIELD = 'P_TABLE'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
RETURN_TAB = IT_RETN.
LOOP AT IT_RETN WHERE RETFIELD = 'PERNR'.
P_TABLE = IT_RETN-FIELDVAL.
EXIT.
ENDLOOP. -
Why the multiple selection can't work in sub screen
hi experts:
when i try to use the sub-screen in the report,why the multiple selection function(SO_BCTXT) can't work normally in screen 1095:
the coding as below.will reward points if solve this issue
the main program in Subscreen:
PROCESS BEFORE OUTPUT.
module status_1005.
CALL SUBSCREEN area INCLUDING sy-repid lv_tab_number.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
CALL SUBSCREEN area.
MODULE user_command_1005.
module user_command_1005 input.
my_ok = ok_code.
clear ok_code.
case my_ok.
when 'TAB1'.
mytabstrip-activetab = my_ok .
lv_tab_number = 1095.
when 'TAB2'.
mytabstrip-activetab = my_ok .
lv_tab_number = 1096.
when 'CRET' or 'ONLI'.
perform get_bc_set
using
so_chanb[]
changing
<fs_bcsetfield> .
leave to screen 0.
endcase.
endmodule.
in the screen 1095:
PROCESS BEFORE OUTPUT.
MODULE %_INIT_PBO_J.
MODULE %_PBO_REPORT.
MODULE %_PF_STATUS.
MODULE %_SO_BCTXT.
MODULE %_END_OF_PBO.
PROCESS AFTER INPUT.
MODULE %_INIT_PAI_J.
CHAIN.
FIELD SO_BCTXT-LOW.
FIELD SO_BCTXT-HIGH.
MODULE %_SO_BCTXT.
ENDCHAIN.
FIELD !INCBCTY1 MODULE %_INCBCTY1 .
FIELD !INCBCTY2 MODULE %_INCBCTY2 .
FIELD !INCBCTY3 MODULE %_INCBCTY3 .
FIELD !INCBACT MODULE %_INCBACT .
FIELD !INCBINAC MODULE %_INCBINAC .
FIELD !INCLMAND MODULE %_INCLMAND .
FIELD !INCLOPTI MODULE %_INCLOPTI .
CHAIN.
FIELD SO_BCTXT-LOW.
FIELD SO_BCTXT-HIGH.
FIELD INCBCTY1 .
FIELD INCBCTY2 .
FIELD INCBCTY3 .
FIELD INCBACT .
FIELD INCBINAC .
FIELD INCLMAND .
FIELD INCLOPTI .
MODULE %_BLOCK_1095001.
ENDCHAIN.
CHAIN.
FIELD SO_BCTXT-LOW.
FIELD SO_BCTXT-HIGH.
FIELD INCBCTY1 .
FIELD INCBCTY2 .
FIELD INCBCTY3 .
FIELD INCBACT .
FIELD INCBINAC .
FIELD INCLMAND .
FIELD INCLOPTI .
MODULE %_END_OF_SCREEN.
MODULE %_OK_CODE_1000.
ENDCHAIN.
in the main report
selection-screen begin of screen 1095 as subscreen.
enquire Data
data l_text type as4text.
selection-screen begin of block b1 with frame title text-024.
select-options :
so_bctxt for l_text .
selection-screen skip 1 .
parameters:
incbcty1 type c as checkbox default abap_true ,
incbcty2 type c as checkbox default abap_true ,
incbcty3 type c as checkbox default abap_true .
selection-screen skip 1 .
parameters:
incbact type c as checkbox default abap_true ,
incbinac type c as checkbox default abap_true .
selection-screen skip 1 .
parameters:
inclmand type c as checkbox default abap_true ,
inclopti type c as checkbox default abap_true .
selection-screen end of block b1.
selection-screen end of screen 1095 .Hiii
In main program you have dclared subscreen area.
now First of all you have to declare a selection screen in your main program
selection-screen begin of screen 1005 as subscreen.
SELECT-OPTIONS s_bukrs1 for v_bukrs. "whatever you want in selection screen
selection-screen end of screen 1005.
IN PBO of your main screen (not in 1005) write
call subscreen SUB1 including sy-repid '1005'.
where SUB1 is your subscreen area name. And remember don't touch PBO or PAI of your 1005 screen, otherwise it will give you error. Yuo can just put text in layout of 1005 screen. but don't disturb other things. -
How to create multiple selection screens in reports
How to create multiple selection screens in reports
Thanks,
SridharEx: hope you will find an idea from the below example :
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
CITYTO LIKE SPFLI-CITYFORM.
SELECTION-SCREEN end OF BLOCK SEL1
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS SEL1.
SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2
SELECTION-SCREEN END OF SCREEN 5000.
INITIALIZATION.
TIT1 = 'ITIES'.
aT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN '0500'.
MESSAGE W159(at) WITH 'SCREEN 500'.
WHEN '1000'.
MESSAGE W159(at) WITH 'SCREEN 1000'.
ENDCASE.
START-OF-SELECTION.
TIT1 = 'CITIES FOR AIRPORTS'.
TIT2 = 'AIRPORTS'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
TIT1 = 'CITIES AGAIN'.
CALL SELECTION-SCREEN 1000 STARTING AT 10 10. -
How to Save Multiple Records In Data Block
Hi All,
I Have Two Blocks --> Control Block,Database Block
Please Any Idea How to Save Multiple Records In Data Block when User changed Data in Control Block.
Thanks For Your Help
SaNow i have to use each record of control block(ctl_blk) as where condition in data base block(dat_blk)and display 10 records from database table.>
Do you want this coordination to be automatic/synchronized or only when the user clicks a button or something else to signal the coordination? Your answer here will dicate which trigger to put your code in.
As to the coordination part, as the user selects a record in the Control Block (CB), you will need to take the Key information and modify the Data Block's (DB) "DEFAULT_WHER E" block property. The logical place to put this code is the CB When-New-Record-Instance (WNRI) trigger. You code will look something like the following:
/* Sample WNRI trigger */
/* This sample assumes you do not have a default value in the BLOCK WHER E property */
DECLARE
v_tmp_dw VARCHAR2(250);
BEGIN
v_tmp_dw := ' DB_Key_Column1 = '||:CONTROL.Key_Column1||' AND DB_Key_Column2 = '||:CONTROL.Key_Column_2;
Set_Block_Property('DATA_BLOCK', DEFAULT_WHER E, v_tmp_df);
/* If you want auto coordination to occur, do the following */
Go_Block('DATA_BLOCK');
Execute_Query;
/* Now, return to the Control Block */
Go_Block('CONTROL_BLOCK');
END;
The Control block items are assigned with values in Form level (Key_exeqry).If your CD is populated from a single table, it would be better to create a Master - Detail relationship (as Abdetu) describes.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Multiple Selection in dropdown in module pool/text editor
Hi,
How to provide an option for multiple selection in dropdown/listbox? Is there any option for this other than triggering F4 function and displaying in ALV or table control with multiple selection option?
otherwise, is it possible to have multiple selection in text editor?
Thanks,
AmalHI,
Instead of displaying multiple selection in deopdown list go for multiple section in ListBOx. It will be easier for you. Here is the demonstration of using ListBox along with screen shots and Code.
Check this Link
<Link farm to blocked site removed by moderator>
Edited by: sum_it2 on Nov 16, 2011 9:37 AM
Edited by: Vinod Kumar on Nov 16, 2011 3:01 PM -
Multiple selection should enable the check box item next to the field
Hi,
I want multiple selection for " Environment" field in the Form. Once muliple values are selected, user needs to see a checkbox next to all the values selected in Environment field.
Checkbox field should be called as ' Implemented'.
For ex. In Environment Field, I selected three values, I should see checkbox against each selected environments:
col 1:I Environment col:2 Implemented
Env1 X
Env2 X
Env2 X
X-> refers to checkbox.
Please suggest something if anyone have tried this one.
Thanks in advance.
Regards,
Ramyahello Ramya,
In Environment Field, I selected three values, I should see checkbox against each selected environmentsyou can write Post-Change trigger or When-Validate-Item trigger on Column 1 say: txt_environment and in the trigger, write down the following code
set_item_property('BLOCK.TXT_CHECKBOX',VISIBLE,PROPERTY_TRUE);
set_item_property('BLOCK.TXT_CHECKBOX',ENABLED,PROPERTY_TRUE);
set_item_property('BLOCK.TXT_CHECKBOX',NAVIGABLE,PROPERTY_TRUE);
If someone's response is helpful or correct, please mark it accordingly. -
How to call adobeform multiple times for multiple selection.
Hello Experts,
Good morning.
I am new to ABAP,
I am working on one program which is used for printing a bank voucher for that i have to select multiple document number (BELNR), it is running fine with selecting a single document but for multiple selection i have to call adobeform multiple times.
Can anyone give me the solution how to do this.
Any suggestion will be appreciated.
Regards,
Dipen Pandya.Yes i have done the same way.
Please have a look at my code.
REPORT zfi_print_bank_voucher.
TABLES: bkpf,
bseg,
skat.
TYPES : BEGIN OF lv_main,
belnr TYPE bkpf-belnr,
xblnr TYPE bkpf-xblnr,
ebeln TYPE bseg-ebeln,
bankn TYPE lfbk-bankn,
budat TYPE bkpf-budat,
bldat TYPE bkpf-bldat,
bedat TYPE ekko-bedat,
bankl TYPE lfbk-bankl,
lifnr TYPE lifnr,
END OF lv_main.
TYPES: BEGIN OF st_bseg,
ebeln TYPE bseg-ebeln,
bukrs TYPE bseg-bukrs,
buzei TYPE bseg-buzei,
hkont TYPE bseg-hkont,
bschl TYPE bseg-bschl,
saknr TYPE skat-saknr,
txt20 TYPE skat-txt20,
kostl TYPE bseg-kostl,
mwsts TYPE bseg-mwsts,
dmbtr TYPE bseg-dmbtr,
belnr TYPE bseg-belnr,
END OF st_bseg.
TYPES: BEGIN OF i_desc,
spras TYPE skat-spras,
saknr TYPE skat-saknr,
txt20 TYPE skat-txt20,
END OF i_desc.
TYPES: BEGIN OF st_bkpf,
belnr TYPE bkpf-belnr,
xblnr TYPE bkpf-xblnr,
budat TYPE bkpf-budat,
bldat TYPE bkpf-bldat,
END OF st_bkpf.
TYPES: BEGIN OF st_lfbk,
bankn TYPE lfbk-bankn,
bankl TYPE lfbk-bankl,
END OF st_lfbk.
TYPES: BEGIN OF st_ekko,
ebeln TYPE ekko-ebeln,
bedat TYPE ekko-bedat,
END OF st_ekko.
DATA: it_bseg TYPE STANDARD TABLE OF st_bseg,
wa_bseg TYPE st_bseg.
DATA: it_bkpf TYPE STANDARD TABLE OF st_bkpf,
wa_bkpf TYPE st_bkpf.
DATA: it_desc TYPE STANDARD TABLE OF i_desc,
wa_desc TYPE i_desc.
DATA: it_lfbk TYPE STANDARD TABLE OF st_lfbk,
wa_lfbk TYPE st_lfbk.
DATA: it_ekko TYPE STANDARD TABLE OF st_ekko,
wa_ekko TYPE st_ekko.
DATA: fname TYPE funcname,
ls_outputparams TYPE sfpoutputparams,
logo_bin TYPE xstring.
DATA: ls_result TYPE sfpjoboutput.
DATA: it_main TYPE STANDARD TABLE OF lv_main,
wa_main TYPE lv_main.
DATA: i_bseg TYPE ztt_bseg WITH HEADER LINE.
DATA: ok_code TYPE sy-ucomm.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE t001.
SELECT-OPTIONS bukrs FOR bkpf-bukrs OBLIGATORY DEFAULT '1000' NO-EXTENSION NO INTERVALS.
SELECT-OPTIONS belnr FOR bkpf-belnr OBLIGATORY.
PARAMETERS: year LIKE bkpf-gjahr DEFAULT sy-datum+0(4) OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk1.
INITIALIZATION.
t001 = 'Enter Specific Details'.
START-OF-SELECTION.
PERFORM feeding_data.
PERFORM print_form.
*& Form print_form
* text
FORM print_form.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZFI_BANK_VOUCHER_FORM'
IMPORTING
e_funcname = fname.
ls_outputparams-bumode = 'M'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = ls_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
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 it_main INTO wa_main.
*at new belnr.
PERFORM controll_internal.
CALL FUNCTION fname "'/1BCDWB/SM00000237'
EXPORTING
* /1BCDWB/DOCPARAMS =
belnr_d = wa_main-belnr "bkpf
lifnr = wa_main-lifnr
xblnr = wa_main-xblnr "bkpf
ebeln = wa_main-ebeln "bseg
bankn = wa_main-bankn "lfbk
budat = wa_main-budat "bkpf
bldat = wa_main-bldat "bkpf
podat = wa_main-bedat "ekko
bankl = wa_main-bankl "lfbk
itab_bseg = i_bseg[]
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDLOOP.
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
e_result = ls_result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 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.
ENDFORM. " PRINT_FORM
*& Form FEEDING_DATA
* text
* --> p1 text
* <-- p2 text
FORM feeding_data .
SELECT ebeln
bukrs
buzei
hkont
bschl
kostl
mwsts
dmbtr
belnr
FROM bseg INTO CORRESPONDING FIELDS OF TABLE it_bseg
WHERE bukrs IN bukrs
AND belnr IN belnr.
SELECT saknr txt20 FROM skat
INTO CORRESPONDING FIELDS OF TABLE it_desc
FOR ALL ENTRIES IN it_bseg
WHERE saknr = it_bseg-hkont AND
spras = sy-langu.
IF it_desc IS NOT INITIAL.
LOOP AT it_bseg INTO wa_bseg.
READ TABLE it_desc INTO wa_desc WITH KEY saknr = wa_bseg-hkont.
IF sy-subrc = '0'.
wa_bseg-txt20 = wa_desc-txt20.
MODIFY it_bseg FROM wa_bseg.
ENDIF.
ENDLOOP.
ENDIF.
SELECT * FROM bseg
INTO CORRESPONDING FIELDS OF TABLE it_main
WHERE belnr IN belnr AND
shkzg = 'S'.
LOOP AT it_main INTO wa_main.
SELECT SINGLE lifnr FROM bseg
INTO wa_main-lifnr
WHERE belnr = belnr-low.
SELECT SINGLE bankl bankn FROM lfbk
INTO (wa_main-bankl, wa_main-bankn)
WHERE bankl = wa_main-lifnr.
SELECT SINGLE budat bldat FROM bkpf
INTO (wa_main-budat, wa_main-bldat)
WHERE belnr = belnr-low.
SELECT SINGLE bedat FROM ekko
INTO wa_main-bedat
WHERE ebeln = wa_main-ebeln.
MODIFY it_main FROM wa_main.
CLEAR wa_main.
ENDLOOP.
ENDFORM. " FEEDING_DATA
*& Form CONTROLL_INTERNAL
* text
* --> p1 text
* <-- p2 text
FORM controll_internal .
LOOP AT it_bseg INTO wa_bseg.
* lw_bseg = wa_bseg.
AT NEW belnr.
i_bseg-buzei = wa_bseg-buzei.
i_bseg-hkont = wa_bseg-hkont.
i_bseg-bschl = wa_bseg-bschl.
i_bseg-txt20 = wa_bseg-txt20.
i_bseg-kostl = wa_bseg-kostl.
i_bseg-mwsts = wa_bseg-mwsts.
i_bseg-dmbtr = wa_bseg-dmbtr.
APPEND i_bseg.
ENDAT.
ENDLOOP.
ENDFORM. " CONTROLL_INTERNAL
Maybe you are looking for
-
Itunes wont let me add songs on iPod
okay soo i have a 2 GB so i can hold 500 songs..i only have 355 songs on it now and i want to add more..but its saying that there is no room in my iPod and they will try to add it..and they dont..not even one..can someone help me!! i need this ASAP..
-
Why won't my MBA recognize my external keyboard
Last month I purchased the Apple keyboard w/numeric keypad for my MBA (2012). I am running it through one of the USB ports on my Thunderbolt display. When I sleep the Air, take it home, and then replug the next morning - the Thunderbold display light
-
How to know the Phone ID connected to a PC ?
Hi, I want to know if it's possible to know from a PC desktop, in what Phone this PC is connected ?
-
SAPconnect: Address type
iam using the function module SO_OBJECT_SEND and prg RSCONN01 to send the report output to external user thru internet mail. when iam executing only a meesage is displayed as delivered message. please help me in order to find the report output . wher
-
IMac 20" - whirring noise every few minutes
hi since yesterday, every few minutes a whirring noise occurs. It builds up quite loudish like a crescendo and then resorts back to normal sound levels pretty much straight away once it has hit the highest noise level. Roughly happens every 4 mins an