How to use at cursor selection
hi gurus,
can anyone tell wats the purpose of
'At cursor-selection' and how to use it in pai module?????
regards,
balaji.s
hi balaji,
The Best explanation with example comes from our help.sap.com....
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm
Also this might help...
MODULE mod CURSOR-SELECTION}
CHAIN-REQUEST}
SWITCH switch .
... AT CURSOR-SELECTION
The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if
The function used to trigger event PAI has function code "CS" and function type "S"
The cursor is placed on a single input or output field of the screen at the moment of the user action
The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.
If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.
Note
The function type and function code of a function are determined in the Screen Painter or in the Menu Painter. We recommend to assign function code "CS" in the Menu Painter to function key F2 in order to simultaneously assign the double-click function of the mouse to it. This allows you to assign dialog modules to the selection of input or output fields.
Link: [Re: MODULE REQUEST;
Thanks,
reward If Helpful.
Similar Messages
-
How to use parrallel cursor in this code
hi can anyone expalin me how to use parallel cursor for this code ...
loop at itabkpf.
read table ibsegpar_fu with key
belnr = itabkpf-belnr
gjahr = itabkpf-gjahr
bschl = '25' .
Start insert by Pradeep 20082008
sort: itabkpf by belnr,
itabsegpar by belnr.
End insert by Pradeep 20082008
if sy-subrc = 0. "Deleted by pradeep 20082008
select bukrs belnr gjahr bschl koart lifnr wrbtr
wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = itabkpf-bukrs and
belnr = itabkpf-belnr and
gjahr = itabkpf-gjahr and
augbl <> itabkpf-belnr and
rebzg <> space and
bschl = '25'.
loop at ibsegpar_fu_1.
Start insert by Pradeep 20082008
sort ibsegpar_fu_1 by belnr.
End insert by Pradeep 20082008
move-corresponding ibsegpar_fu_1 to itabseg.
move ibsegpar_fu_1-belnr to itabseg-augbl.
move ibsegpar_fu_1-rebzg to itabseg-belnr.
move ibsegpar_fu_1-rebzj to itabseg-gjahr.
*********to include code to pick the description for partical payment
select single * from bseg where
bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-belnr and
gjahr = ibsegpar_fu_1-gjahr and
augbl <> ibsegpar_fu_1-belnr and
rebzg = space and
bschl <> '25'.
move bseg-sgtxt to itabseg-sgtxt.
clear bseg.
*********end of code
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-rebzg and
gjahr = ibsegpar_fu_1-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
endloop.
endif. "Deleted by Pradeep 20082008
endloop.
loop at ibsegpar_fu.
sort ibsegpar_fu by belnr. " insert by pradeep
move-corresponding ibsegpar_fu to itabseg.
select bukrs belnr gjahr bschl koart lifnr wrbtr
rebzg rebzj sgtxt into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = ibsegpar_fu-bukrs and
gjahr = ibsegpar_fu-gjahr and
augbl = ibsegpar_fu-belnr and " Pradeep 20082008 Delete
augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
rebzg = space and
bschl = '25'.
if sy-subrc = 0.
loop at ibsegpar_fu_1.
move ibsegpar_fu_1-rebzg to itabseg-rebzg.
move ibsegpar_fu_1-rebzj to itabseg-rebzj.
endloop.
move ibsegpar_fu-belnr to itabseg-augbl.
move itabseg-rebzg to itabseg-belnr.
move itabseg-rebzj to itabseg-gjahr.
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu-bukrs and
belnr = itabseg-rebzj and
gjahr = itabseg-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
read table itabseg with key
belnr = itabseg-rebzg
gjahr = itabseg-rebzj
bschl = '31' .
if sy-subrc = 0.
delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
endif.
endif.
endloop.
Start insert by Pradeep 20082008
loop at itabseg.
if itabseg-belnr = itabseg-augbl.
delete itabseg.
elseif itabseg-belnr = ' '.
delete itabseg.
endif.
endloop.
End insert by Pradeep 20082008hi can anyone expalin me how to use parallel cursor for this code ...
loop at itabkpf.
read table ibsegpar_fu with key
belnr = itabkpf-belnr
gjahr = itabkpf-gjahr
bschl = '25' .
Start insert by Pradeep 20082008
sort: itabkpf by belnr,
itabsegpar by belnr.
End insert by Pradeep 20082008
if sy-subrc = 0. "Deleted by pradeep 20082008
select bukrs belnr gjahr bschl koart lifnr wrbtr
wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = itabkpf-bukrs and
belnr = itabkpf-belnr and
gjahr = itabkpf-gjahr and
augbl <> itabkpf-belnr and
rebzg <> space and
bschl = '25'.
loop at ibsegpar_fu_1.
Start insert by Pradeep 20082008
sort ibsegpar_fu_1 by belnr.
End insert by Pradeep 20082008
move-corresponding ibsegpar_fu_1 to itabseg.
move ibsegpar_fu_1-belnr to itabseg-augbl.
move ibsegpar_fu_1-rebzg to itabseg-belnr.
move ibsegpar_fu_1-rebzj to itabseg-gjahr.
*********to include code to pick the description for partical payment
select single * from bseg where
bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-belnr and
gjahr = ibsegpar_fu_1-gjahr and
augbl <> ibsegpar_fu_1-belnr and
rebzg = space and
bschl <> '25'.
move bseg-sgtxt to itabseg-sgtxt.
clear bseg.
*********end of code
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-rebzg and
gjahr = ibsegpar_fu_1-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
endloop.
endif. "Deleted by Pradeep 20082008
endloop.
loop at ibsegpar_fu.
sort ibsegpar_fu by belnr. " insert by pradeep
move-corresponding ibsegpar_fu to itabseg.
select bukrs belnr gjahr bschl koart lifnr wrbtr
rebzg rebzj sgtxt into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = ibsegpar_fu-bukrs and
gjahr = ibsegpar_fu-gjahr and
augbl = ibsegpar_fu-belnr and " Pradeep 20082008 Delete
augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
rebzg = space and
bschl = '25'.
if sy-subrc = 0.
loop at ibsegpar_fu_1.
move ibsegpar_fu_1-rebzg to itabseg-rebzg.
move ibsegpar_fu_1-rebzj to itabseg-rebzj.
endloop.
move ibsegpar_fu-belnr to itabseg-augbl.
move itabseg-rebzg to itabseg-belnr.
move itabseg-rebzj to itabseg-gjahr.
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu-bukrs and
belnr = itabseg-rebzj and
gjahr = itabseg-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
read table itabseg with key
belnr = itabseg-rebzg
gjahr = itabseg-rebzj
bschl = '31' .
if sy-subrc = 0.
delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
endif.
endif.
endloop.
Start insert by Pradeep 20082008
loop at itabseg.
if itabseg-belnr = itabseg-augbl.
delete itabseg.
elseif itabseg-belnr = ' '.
delete itabseg.
endif.
endloop.
End insert by Pradeep 20082008 -
How to use open cursor and iner join in one statement
Hello All,
Could any one post the code for the below question?
How to use open cursor and iner join in one statement
Regards,
LisaOPEN CURSOR c FOR SELECT carrid connid fldate bookid smoker
FROM sbook innerjoin shook
ORDER BY carrid connid fldate smoker bookid.
Pls reward if helpful. -
How to use at-line selection in ALV
Can someone help me about how to use at-line selection in an ALV
u can try in user_command
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
IT_FIELDCAT = GT_FIELDCATALOG
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
I_CALLBACK_HTML_END_OF_LIST = G_HTML_END_OF_LIST
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_GRID_SETTINGS = GS_SETTINGS
IS_LAYOUT = GS_LAYOUT
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IT_EVENTS = GT_EVENTS[]
* I_SCREEN_START_COLUMN = 0 "Use coordinates for
* I_SCREEN_START_LINE = 0 "display as dialog box
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
TABLES
T_OUTTAB = I_REP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
CASE RS_SELFIELD-FIELDNAME.
WHEN 'XXXXX'.
READ TABLE I_xxx INTO V_xxx
WITH KEY XXX = RS_SELFIELD-VALUE.
IF SY-SUBRC = 0.
ENDIF.
WHEN OTHERS
ENDCASE.
ENDCASE.
ENDFORM. -
How to use offset for select-option parameter ?
Hi experts
could anybody please let me know how to use offset for select-option parameter. i can able to use offset for table fields, variabiles and all , but don't know how to use for parameters.
following is my code
SELECT-OPTIONS: s_prctr FOR vbsegs-prctr OBLIGATORY.
here "prctr" length is 10.
i'm using two tables 1. vbsegd-bupla
2. vbsegs-prctr
here prctr+6(4) = bupla.
"Bupla" length is 4
SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
WHERE belnr = it_vbkpf-belnr
AND gjahr = it_vbkpf-gjahr
AND bukrs = it_vbkpf-bukrs
AND bupla IN s_prctr.
the above statement is not working as prctr and bupla lenths are different. here i want to use offset.
SELECT belnr gjahr bukrs prctr sgtxt buzei FROM vbsegs INTO CORRESPONDING FIELDS OF TABLE it_vbsegs FOR ALL ENTRIES IN it_vbkpf
WHERE belnr = it_vbkpf-belnr
AND gjahr = it_vbkpf-gjahr
AND bukrs = it_vbkpf-bukrs
AND prctr IN s_prctr.
this is working as prctr and s_prctr lengths are equal.
could anybody please help me out in this.
Thanks in advance.
regards
satishBelow code will work for you.
SELECT-OPTIONS: s_prctr FOR vbsegs-prctr OBLIGATORY.
RANGES: s_bupla FOR vbsegd-bupla.
s_bupla[] = s_prctr[].
DELETE ADJACENT DUPLICATES FROM s_bupla.
SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
WHERE belnr = it_vbkpf-belnr
AND gjahr = it_vbkpf-gjahr
AND bukrs = it_vbkpf-bukrs
AND bupla IN s_bupla. -
How to use Hierarchy Filter Selection?
Hi, experts !
Could anyone give me a detail for how to use hierarchy filter selection ?
When i locate a Hier filter selection in the template and execute it, a false info
accured while filtering data,and the IE inferred the hier node object was missing.
Then i add another hier filter in the same template, and the secend runs well, however the first one didn't.
At last, i hide the first one, but the second one can't either.
Help me !!!
Thx in advance!Thanks Toja !
Sorry to reply so late !
The error is line: 51. error:'document.HIERARCHY_MENU_1.NODEID' is null or is not the object.
The code on line of 51 says:document.HIERARCHY_MENU_1.NODEID.value = i_node;
Could you please give me some documents on the topic of Hierarchy Filter Selection ? -
Query: how to use structure and selection and what's the difference between
Query: how to use structure and selection and what's the difference between these two?
Would be appreciated if some experts here give examples to demenstrate on how to use structure and selection in query and what's the difference between these two?
Thanks in advance!Hi Kevin,
1. Well by default all the KF that you include in your query go into a Key Figure Structure. You can additionally have another structure for defining how your chars are laid out. A common example is a Calmonth structure where you have selections for 12 months, quarers and YTD values. This would be a char structure with different selections (for each month, qtr etc)
2. Yes, a selection with a KF is the same as restricting a KF. You can use am RKF is you have one on the left hand side, or if you need to do this locally in the query, right click the structure and choose New Selection, then proceed to choose your KF and reqd char values.
Hope this helps... -
How to use SET CURSOR in REUSE_ALV_HIERSEQ_LIST_DISPLAY
Hi,
I have added new fields in Standard VL10C ALV report , I have added one editable field in this standard ALV output.
I want to set the cursor by default on the editable column on the specific row depending on some condition also if possible
i want to highlight only that particular row.
Please reply if anybody knows how to do this.
Thanks,
PawanHİ Pawan
You can see the list of events supported by reusable alv with function REUSE_ALV_EVENTS_GET
when I run this function in se37 I see the some events maybe helpful for your question
PF_STATUS_SET : this has to be called from PBO of your screen, so you can try to use SET CURSOR
command to put cursor on the selected field
BEFORE_LINE_OUTPUT : It's called before the output of every single line so you should use command
"FORMAT COLOR COL_POSITIVE INTENSIFIED ON. "for highlighting the line
AFTER_LINE_OUTPUT : than u can use "FORMAT COLOR COL_POSITIVE INTENSIFIED OFF." command
I hope it'll be helpful. -
How to Use At line-Selection Functionality in dialog programming or mpp .
hi
i had created customized Transaction ,
in that notification field is there , their when they place notification number ,after that when they double click on that, it have to go to iw23 .(so that they will get confirm that notification number is write )
i have tried to use AT LINE-SELECTION event it showing error ,
where i have to write and which event i have to use ?
may i know how can i resolve this ?
Thanks a lot
Edited by: raghu111 on Dec 3, 2011 6:14 AMhi sharin.
Thanks for ur reply
i followed ur steps
WHEN 'PICK'.
DATA : dc_scrfield TYPE zmotor-qmnum.
GET CURSOR FIELD dc_scrfield.
CHECK NOT dc_scrfield IS INITIAL.
IF dc_scrfield = zmotor-qmnum.
IF NOT zmotor-qmnum IS INITIAL .
set PARAMETER ID 'IQM' FIELD zmotor-qmnum.
call TRANSACTION 'IW23'.
ENDIF. .
ENDIF.
its not working
but i already tried like this .
WHEN 'PICK'.
if field name =tablename-fieldname
set PARAMETER ID 'IQM' FIELD zmotor-qmnum
call transaction 'IW23'
endif
i written in pai event ." i have dought here also whether i have to write here r not
HERE ITS WORKING BUT PROBLEM IS FOR ANOTHER FIELDS ALSO ITS RESPONDING . how to stop the responding .
as per my knowledge in condition only prob but i tried i didnt solve
please send me one example or tell me how to solve
for better understanding only i pasted coding
thanks a lot
Edited by: raghu111 on Dec 5, 2011 12:21 PM -
I have this sql statement as part of my pl/sql code:
SELECT DATE, PRICE
FROM TABLE T
WHERE T.A1 = V1
AND T.A2 = V2
AND T.A3 = V3
However, I don't know how many A's and corresponding V's in the statement when coding.
So I declare a cursor on TABLE. The question is how I can use this cursor for the statement?declare cursor C
(in_a1 table_t.a1%type
,in_a2 table_t.a2%type
,in_a3 table_t.a3%type
is
SELECT DATE, PRICE
FROM TABLE T
WHERE T.A1 = in_a1
AND T.A2 = in_a2
AND T.A3 = in_a3
using as follows
begin
open C(V1,V2,V3);
fetch C into .....
or
begin
for p in C(V1,V2,V3) loop
Can also
procedure xxx(V1,V2....) is
cursor C is
SELECT DATE, PRICE
FROM TABLE T
WHERE T.A1 = V1
AND T.A2 = V2
AND T.A3 = V3
begin
open C;
fetch C into... -
Hello I ran into a problem while running a SQL command using OracleCommand. I am Declaring a cursor to retrieve values from table A and then loop through that dataset to update table B. When I run this script I see my application hanging right there without any response. Do I have to use REF CURSOR? HOW to use it? I can't use DECLARE CURSOR? Need help. Here is my present SQL command
DECLARE CURSOR c_load IS SELECT VALUATION_YR_MTH_NBR,PMT_PRD_NBR,PMT_DAY,PMT_MTH,PMT_YR,SERIES_NAME,GROUP_NAME,FNC_PROD_NAME,SCENARIO_ABBR,PRIN_SCHED_BAL,NET_INT_AMT,SCHED_PRIN_AMT,SPEED_PREPMT_1_MTH_AMT,LOSS_TOTAL_AMT,SURETY_FEE_AMT,INT_FROM_OTHER_GROUP_AMT,PRIN_FROM_OTHER_GROUP_AMT,SENIOR_FIXED_RATE_BOND_BAL,SENIOR_FLOAT_RATE_BOND_BAL,SUBORDINATE_RATE_BOND_BAL,IO_NOTIONAL_BAL,NON_IO_FIXED_INT_PAID_AMT,NON_IO_FLOAT_INT_PAID_AMT,IO_INT_PAID_AMT,TOTAL_PRIN_AMT,BOND_WRITE_DOWNS_AMT,SURETY_PMTS_AMT,OC_BAL,OC_TARGET_BAL,RESIDUAL_INT_AMT,RESIDUAL_PRIN_AMT,RESIDUAL_TOTAL_AMT, CHG_LST_DATE, CHG_LST_USER_ID, CHG_LST_PROG_NAME FROM RESIDCF.CASH_FLOW_FORECAST_UPLOAD WHERE PREV_UPLOADED_IND='Y'; BEGIN FOR c_inx IN c_load LOOP UPDATE RESIDCF.CASH_FLOW_FORECAST SET PMT_DAY=c_inx.PMT_DAY,PMT_MTH=c_inx.PMT_MTH,PMT_YR=c_inx.PMT_YR,PRIN_SCHED_BAL=c_inx.PRIN_SCHED_BAL,NET_INT_AMT=c_inx.NET_INT_AMT,SCHED_PRIN_AMT=c_inx.SCHED_PRIN_AMT,SPEED_PREPMT_1_MTH_AMT=c_inx.SPEED_PREPMT_1_MTH_AMT,LOSS_TOTAL_AMT=c_inx.LOSS_TOTAL_AMT,SURETY_FEE_AMT=c_inx.SURETY_FEE_AMT,INT_FROM_OTHER_GROUP_AMT=c_inx.INT_FROM_OTHER_GROUP_AMT,PRIN_FROM_OTHER_GROUP_AMT=c_inx.PRIN_FROM_OTHER_GROUP_AMT,SENIOR_FIXED_RATE_BOND_BAL=c_inx.SENIOR_FIXED_RATE_BOND_BAL,SENIOR_FLOAT_RATE_BOND_BAL=c_inx.SENIOR_FLOAT_RATE_BOND_BAL,SUBORDINATE_RATE_BOND_BAL=c_inx.SUBORDINATE_RATE_BOND_BAL,IO_NOTIONAL_BAL=c_inx.IO_NOTIONAL_BAL,NON_IO_FIXED_INT_PAID_AMT=c_inx.NON_IO_FIXED_INT_PAID_AMT,NON_IO_FLOAT_INT_PAID_AMT=c_inx.NON_IO_FLOAT_INT_PAID_AMT,IO_INT_PAID_AMT=c_inx.IO_INT_PAID_AMT,TOTAL_PRIN_AMT=c_inx.TOTAL_PRIN_AMT,BOND_WRITE_DOWNS_AMT=c_inx.BOND_WRITE_DOWNS_AMT,SURETY_PMTS_AMT=c_inx.SURETY_PMTS_AMT,OC_BAL=c_inx.OC_BAL,OC_TARGET_BAL=c_inx.OC_TARGET_BAL,RESIDUAL_INT_AMT=c_inx.RESIDUAL_INT_AMT,RESIDUAL_PRIN_AMT=c_inx.RESIDUAL_PRIN_AMT,RESIDUAL_TOTAL_AMT=c_inx.RESIDUAL_TOTAL_AMT , CHG_LST_DATE=c_inx.CHG_LST_DATE , CHG_LST_USER_ID=c_inx.CHG_LST_USER_ID , CHG_LST_PROG_NAME=c_inx.CHG_LST_PROG_NAME WHERE VALUATION_YR_MTH_NBR=c_inx.VALUATION_YR_MTH_NBR AND PMT_PRD_NBR=c_inx.PMT_PRD_NBR AND SERIES_NAME=c_inx.SERIES_NAME AND GROUP_NAME=c_inx.GROUP_NAME AND FNC_PROD_NAME=c_inx.FNC_PROD_NAME AND SCENARIO_ABBR=c_inx.SCENARIO_ABBR; END LOOP; END;That block should run the same from ODP.NET as from SQLPlus. Which is very slowly. You shouldn't be using a cursor here. Instead try an updatable join, or better MERGE (for 9i).
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/13_elems30.htm#37586
David -
In interactive how to use AT LINE-SELECTION WITH SET PF-STATUS
Hi all,
I am developing an interactive report in which i am using gui status (pf-status ) for AT USER-COMMAND and AT LINE-SELECTION event .But when i used at line-selection event is not working with pf-status even though i use PICK function code .
plz help me to work with both the event i.e.
AT USER-COMMAND.
AT LINE-SELECTION.
Thanks a lot in Advance .
Regards,
Tarakhi,
In PBO of Module Pool, Please Write in this way
MODULE status_9001 OUTPUT.
Set the PF-STATUS
SET PF-STATUS '9001'.
To Set the Title of Screen
SET TITLEBAR 'TITLE'.
ENDMODULE
Setting PF status to the (SAP) system default
set pf-status 'BASIC'.
How to check for pf-status
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'ART'.
PERFORM STYR_ARTSKONTI.
WHEN 'PST'.
PERFORM STYR_POSTER.
WHEN 'BIL'.
PERFORM VIS_BILAG.
ENDCASE.. -
How to use database cursor in ABAP
Hi all,
I want to establish a connexion with another database system (Oracle) from SAP. Then i want to execute a cursor which is in a SQL package.
The connexion is done sucssefuly but i don't know how to execute the cursor from SAP.
The SQL package's definition that i have is :
The name of package : pk_name
The name of cursor : cursor c_dos(dat varchar, num varchar) return T_TABLE.
Thx a lot for you help.hi Sourav,
Check the sample program in SE38.
in program name field give BCALV* press F4.
BCALV_TEST_GRID_EVENTS
It will give lot of example program.
Reward if found helpful.
Regards,
Boobalan Suburaj -
How to use REF cursor with toplink
Hi,
I have a stored proc has a out variable which is a REF CURSOR.
How to read my cursor with toplink?I have got it. Here is the solution.
UnitOfWork uow= dbSession.acquireUnitOfWork();
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("smart.getCompanyStruct");
call.addNamedArgument("xnrid");
call.useNamedCursorOutputAsResultSet("cpy");
DataReadQuery query = new DataReadQuery();
query.setCall(call);
Vector parameters = new Vector();
query.addArgument("xnrid");
parameters.add(new Long(5009L));
Vector obj = (Vector) uow.executeQuery(query, parameters);
Vector contains result ser of the cursor
Gurcan -
How to use AT LINE-SELECTION and AT USER-COMMAND in one report????
Dear all,
I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
How can I use both of them in one report for your reference I am giving my test program below.
REPORT ZTEST111 .
SET PF-STATUS '100'.
DO 10 TIMES.
WRITE:/ SY-INDEX.
HIDE SY-INDEX.
ENDDO.
START-OF-SELECTION.
AT LINE-SELECTION.
MESSAGE I002(SY) WITH SY-INDEX.
AT USER-COMMAND.
MESSAGE I002(SY) WITH 'USER COMMAND'.
END-OF-SELECTION.
Thanks in advance
Sachin Gautamhi
Syntax
AT USER-COMMAND.
Effect
This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
Note
Self-defined function codes are all those that include character combinations, except for the following:
The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
Table 1
Function code Function
%CTX Call a context menu
%EX Exit
%PC Save to file
%PRI Print
%SC Search for ...
%SC+ Find next
%SL Search in office
%ST Save to report tree
Table 2
Function code Function
BACK Back
P- Scroll to previous page
P-- Scroll to first page
P+ Scroll to next page
P++ Scroll to last page
PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
PL- Scroll to first line of the page
PL-n Scroll n lines back
PL+ Scroll to last line of the page
PL+n Scroll n lines up
PNOP No effect
PP- Scroll back one page
PP-n Scroll n pages back
PP+ Scroll one page forward
PP+n Scroll n pages forwad
PPn Scroll to beginning of page n
PRI, PRINT Print
PS-- Scroll to first column
PS++ Scroll to last column
PS- Scroll one column to the left
PS-n Scroll n columns to the left
PS+ Scroll one column to the right
PS+n Scroll n columns to the right
PSn Scroll to column n
PZn Scroll to line n
RW Cancel
Maybe you are looking for
-
I have 3 Apple devices - iMac, iPhone, and iPad. I am planning to move to iCloud from MobileMe. In iTunes, I just choose to sync whatever files I want my iPhone and iPad to have since they don't have sufficient disk space as my iMac. Can I just ch
-
UI Defaults Import problems and best practice for using UI defaults
Hi, I'm hoping some of you experts can tell me how to Import the UI Defaults from Schema A and Workspace A to Schema B and Workspace B. My goal is to fluidly share the UI defaults with another developer as we march forward creating new versions of th
-
Problems with built in camera on Mountain Lion.
My built in camera on Macbook Air 2010 stops working after instaling Mountain Lion. Any help?
-
MPLS Design Best Practices for SP
When deploying a new MPLS backbone for a Service Provider, what will be consider the best practices in general? For example what about the following list and any other items: - Define the Internet as a VRF? - Use private ASNs? - Define a VRF per spec
-
My Google toolbar was deleted when I downloaded the latest version of Firefox. It will not re-load because it is not compatible. Is this problem with Google or with Firefox? Will it be fixed soon, or will I have to go back to Internet Explorer?