How to track the cursor in the MODULE POOL?
Hello everyone,
I have developed one module pool program. I am facing a problem in tracking the cursor position.
Let me tell you in detail. I have display/change button on the screen. If I come in change mode and gives a invalid value to any of the field, then after pressing 'ENTER' my screen gets gray out i.e. in display mode with flashing an error message. If I press again 'ENTER' it gets in change mode by removing all the invalid entries user changed.
Now the requirement is I want the cursor to be placed at that particular entry in that particular column, where I have got the error message for invalid value.
Please Help me on this.
Thanks in advance.
Hi Ganesh,
Use this Syntax to set cursor
<b>SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] }
| { col lin } }.</b>
Regards,
Balavardhan.K
Similar Messages
-
How to delete a column from the table control in module pool?
Hi,
can any one please tell How to delete a column from the table control in module pool?
thanks in advance
warm regards
HareeshKumar Nhi hareesh,
I think it is better to hide it.
How to hide: You can check this link
Dynamic Hide column in table control -
How can I replace the cursor in the below query?
I have this below query which calls a stored procedure that takes only 1 item's attributes at a time. But because of performance problems we are
required to remove the cursor. How can I replace the below cursor logic with set operations or CTE? Please advice.
DECLARE db_cursor_ava CURSOR
FOR
SELECT t.[agent-id],
t.[start-date],
t.[end-date],
t.[monitor-days],
t.[monitor-start],
t.[monitor-end],
t.[timezone-offset]
FROM @tmpAgentPeriodTimeRange t
OPEN db_cursor_ava
FETCH NEXT FROM db_cursor_ava INTO @agentID_ava,
@stDateTime_ava,
@endDateTime_ava,
@monDays_ava,
@monSt_ava,
@monEnd_ava,
@offset_ava
WHILE @@FETCH_STATUS = 0
BEGIN
DELETE
FROM @tmpMonitorPeriod
DELETE
FROM @tmpFinalResult
SET @runID = 1
IF(@endDateTime_ava>DATEADD(MI,@offset_ava, GETUTCDATE()))
BEGIN
SET @endDateTime_ava=DATEADD(MI,@offset_ava, GETUTCDATE())
END
INSERT INTO @tmpMonitorPeriod
EXEC core.usp_GetMonitoringPeriod
@startDate = @stDateTime_ava,
@endDate = @endDateTime_ava,
@monitoringDays = @monDays_ava,
@monitoringStart = @monSt_ava,
@monitoringEnd = @monEnd_ava
SELECT @maxID = MAX(tm.id)
FROM @tmpMonitorPeriod tm
FETCH NEXT FROM db_cursor_ava INTO @agentID_ava,
@stDateTime_ava,
@endDateTime_ava,
@monDays_ava,
@monSt_ava,
@monEnd_ava,
@offset_ava
END
CLOSE db_cursor_ava
DEALLOCATE db_cursor_ava
mayooran99You've been down this path before - and the response is exactly the same.
how to replace cursor logic
And I'll suggest that you post the entire code - since you repeatedly delete 2 table variables but only populate one. The setting of @maxID also seems to have no purpose. And perhaps the issue here isn't the cursor but the general approach. Who knows
- but it appears you may have prematurely assumed that the cursor is the problem. -
How to get the Grand Total in Module pool Screen
Hi Frds.
How to get the Grand Total in Module pool Screen
Example i have 10 different materials
for each matarial has different moving . But in my case matarials is doesnt matter here
10 material Moving Average price to do Frand total and display in one column...
Please Help me out Frds.
Regards,
KabilHi
You need to calculate the total in a module of PAI (or PBO) event:
PROCESS PAI.
LOOP.....
ENDLOOP.
MODULE CALCULATE_TOTAL.
MODULE CALCULATE_TOTAL.
GRAND_TOTAL = 0.
LOOP AT ITAB,
GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
ENDLOOP.
ENDMODULE.
In this way the grand total will be calculated as soon as the user presses enter or another command.
You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop, -
How to position the cursor at the end of the text with EDIT_TEXT?
Hello, it wanted to ask to them if somebody could make work the module of function EDIT_TEXT so that it positions the cursor at the end of the text that is visualizing in the text editor. In the documentation it says that passing a ' X' to him in the field scrollend of the parameter Control is obtained that operation. Nevertheless, I did this and the cursor continues appearing at the beginning of the text that visualizes.
Somebody could help me please?
Regards,
Gabriel
PD: The code that I use is the following one:
FORM f_ingresar_comentarios.
DATA: l_action,
l_result LIKE itcer,
l_pedido LIKE thead-tdname,
li_coment_save LIKE i_comentarios OCCURS 0,
li_coment_aux LIKE i_comentarios OCCURS 0 WITH HEADER LINE,
l_lines TYPE i,
l_lines_save TYPE i,
l_lines_insert TYPE i,
l_index TYPE i,
l_index_aux TYPE i,
l_insert,
lwa_control LIKE itced.
CLEAR: l_action.
CLEAR i_comentarios.
REFRESH: i_comentarios,
li_coment_save,
li_coment_aux.
l_pedido = v_pedido.
Leemos el texto si es que existe
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = v_id_text
language = sy-langu
name = l_pedido
object = c_ekko
IMPORTING
header = wa_cabecera
TABLES
lines = i_comentarios "Lineas de texto leídas
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
Armamos la cabecera por primer comentario para el pedido
CLEAR wa_cabecera.
wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
wa_cabecera-tdname = v_pedido. "Nro de pedido
wa_cabecera-tdid = v_id_text. "ID en tabla TTXID
wa_cabecera-tdspras = sy-langu. "Lenguaje
wa_cabecera-tdlinesize = 70.
ENDIF.
Salva comentarios originales
li_coment_save[] = i_comentarios[].
lwa_control-scrollend = c_x. " c_x = 'X'
Abre el editor de texto
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
header = wa_cabecera
save = space
control = lwa_control
IMPORTING
newheader = wa_cabecera
function = l_action
RESULT = l_result
TABLES
lines = i_comentarios
EXCEPTIONS
object = 1
id = 2
language = 3
name = 4
linesize = 5.
Si cambio los comentarios, actualiza comentarios
CASE l_action.
WHEN c_unchanged.
WHEN c_delete.
WHEN c_update OR
c_insert.
Obtiene cantidad de lineas de comentarios originales y modificados
DESCRIBE TABLE li_coment_save LINES l_lines_save.
DESCRIBE TABLE i_comentarios LINES l_lines.
Si se insertaron lineas...
IF l_lines > l_lines_save.
Calcula cantidad de lineas a insertar para luego calcular valor de
indice a partir del cual insertar los nuevos comentarios
l_lines_insert = l_lines - l_lines_save.
l_index = ( l_lines - l_lines_insert ) + 1.
Controla que al menos una de las lineas insertadas sea diferente de
blanco
l_index_aux = l_lines.
l_insert = c_n.
DO l_lines_insert TIMES.
READ TABLE i_comentarios INDEX l_index_aux.
IF sy-subrc = 0 AND
i_comentarios-tdline <> space.
l_insert = c_s.
EXIT.
ENDIF.
l_index_aux = l_index_aux - 1.
ENDDO.
IF l_insert = c_s.
Carga comentarios originales y agrega lineas insertadas
li_coment_aux[] = li_coment_save[].
APPEND LINES OF i_comentarios
FROM l_index
TO l_lines
TO li_coment_aux.
Setea variable para indicar actualizacion de comentarios.
v_comentario = 'S'.
Agrega usuario y fecha del comentario
CONCATENATE sy-uname
sy-datum
INTO li_coment_aux-tdline
SEPARATED BY space.
li_coment_aux-tdformat = '*'.
APPEND li_coment_aux.
Grabamos el texto
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = wa_cabecera
savemode_direct = c_x
IMPORTING
newheader = wa_cabecera
TABLES
lines = li_coment_aux
EXCEPTIONS
id = 1
language = 2
name = 3
object = 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.
ENDIF.
ENDIF.
ENDCASE.
ENDFORM. " f_ingresar_comentarios
In addition, I made another program simpler that it uses the same functions and also have the same problem:
*& Report Y_GVA_TEXT *
REPORT y_gva_text .
DATA: wa_cabecera LIKE thead,
i_comentarios LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: l_action,
v_comentario,
l_result LIKE itcer,
v_pedido LIKE thead-tdname VALUE '3',
l_pedido LIKE thead-tdname,
c_a05 LIKE thead-tdid VALUE 'A05',
c_ekko LIKE stxh-tdobject VALUE 'EKKO',
l_lines LIKE sy-tabix,
lwa_control LIKE itced.
CONSTANTS: c_x VALUE 'X',
update VALUE 'U', "Langtext verändert
insert VALUE 'I', "Langtext eingefügt
delete VALUE 'D', "Langtext gelöscht
modify VALUE 'M', "Kein Langtext, Inlinezeile veränd.
unchanged VALUE ' '.
CLEAR: l_action.
CLEAR i_comentarios.
REFRESH i_comentarios.
Leemos el texto si es que existe
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = c_a05
language = sy-langu
name = v_pedido
object = c_ekko
IMPORTING
header = wa_cabecera
TABLES
lines = i_comentarios "Lineas de texto leídas
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Armamos las cabecera para mostrar los comentarios
CLEAR wa_cabecera.
wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
wa_cabecera-tdname = v_pedido. "Nro de pedido
wa_cabecera-tdid = c_a05. "ID en tabla TTXID
wa_cabecera-tdspras = sy-langu. "Lenguaje
wa_cabecera-tdlinesize = 70.
ENDIF.
lwa_control-noendlines = c_x.
lwa_control-scrollend = c_x.
Abre el editor de texto
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
header = wa_cabecera
save = space
control = lwa_control
IMPORTING
newheader = wa_cabecera
function = l_action
RESULT = l_result
TABLES
lines = i_comentarios
EXCEPTIONS
object = 1
id = 2
language = 3
name = 4
linesize = 5.
Si cambio los comentarios, actualiza comentarios
CASE l_action.
WHEN unchanged.
WHEN delete.
WHEN update OR
insert.
Agrega usuario y fecha del comentario
CONCATENATE sy-uname
sy-datum
INTO i_comentarios-tdline
SEPARATED BY space.
i_comentarios-tdformat = '*'.
APPEND i_comentarios.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = wa_cabecera
IMPORTING
newheader = wa_cabecera
TABLES
lines = i_comentarios.
ENDCASE.Murugesh,
I believe that you have mis-read Gabriel's problem.
Gabriel,
The cursor is not positioning at the base of the editor as you have cited.
In order to get this functionality to work, you must set the LINE_EDITOR import paramter to 'X'.
data: hdr like THEAD.
data: l_itced like itced.
hdr-tdobject = 'VBBP'.
hdr-tdname = '4000029521000030'.
hdr-tdid = 'Z005'.
hdr-tdspras = 'E'.
hdr-TDLINESIZE = '100'.
hdr-TDTXTLINES = '3'.
l_itced-SCROLLEND = 'X'.
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
DISPLAY = ' '
EDITOR_TITLE = ' '
HEADER = hdr
PAGE = ' '
WINDOW = ' '
SAVE = 'X'
LINE_EDITOR = 'X' " here !!!
CONTROL = l_itced
PROGRAM = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
RESULT =
TABLES
LINES = lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
LINESIZE = 3
NAME = 4
OBJECT = 5
TEXTFORMAT = 6
COMMUNICATION = 7
OTHERS = 8
Don't forget those points !! -
How to highlight a line in a text stream and position the cursor at the end.
I would like to select a line in a text control data stream, highlight the text, and place the cursor at the end of the line so that the text control can be edited at that point.
Depends on what you mean by "highlight". If you mean highlight in the sense of when you use the mouse to select text, then you can't do that and then place the cursor at the end, since that would effectively "unhighlight" the text. You need to use a different kind of "highlight", like turning the text bold or something. This KB article talks about highlighting particular characters: How Do I Highlight Particular Characters in a String Control?
See attached for simple example. Modify as needed.
Attachments:
Text Select.vi 19 KB -
I lost my iphone4. How to track my iphone4 if the phone is switched off
I lost my iphone4. How to track my iphone4 if the phone is switched off
If the phone is switched off, it is inert. It can no more be tracked than a brick with your address and home number written on it.
-
How can I create cursors within the cursor?
How can I create cursors within the cursor?
Table1 2001 - 2007 data
Account_no
Account_eff_dt
No_account_holder
Num
Seq_Num
Value1
Value2
Table2_Historical (doesn't have Num as a field) 1990 - 2000 data
Account_no
Account_eff_dt
No_account_holder
Seq_Num
Value1
Value2
Table3_06
Account_no
Account_eff_dt
No_account_holder
Num
My result table should be:
Table_result_06
Account_no
Account_eff_dt
No_account_holder
Num
Value1_min (the minimum value for the minimum of record_sequence)
Value2_max (the maximum value for the maximum of record_sequence)
I have to get data from Table1 and Table2_Historical. If one account was open in 1998 and is still effective, the minimum value of that account is in the Table2_Historical.
Let's say I open a cursor:
cursor_first is
select * from table3_06;
open csr_first
loop
fetch cursor_first into
v_Account_no
v_Account_eff_dt
v_No_account_holder
v_Num
EXIT WHEN csr_first%NOTFOUND;
How can I open a second cursor from here that will get the Seq_Num from Table1
csr_second
select Seq_Num from Table1 where
v_Account_no = Account_no
v_Account_eff_dt <= Account_eff_dt
v_No_account_holder=No_account_holder
v_Num = Num
How does it works???
Thanks a lotThanks so much for replying back. Here is what I am trying to do.
I have to create a table for each year 2002, 2003, 2004, 2005, 2006 that has all the account numbers that are active each year plus some other characteristics.
Let’s say I will create Table_result_06. This table will have the following fields. The account number, account effective date, Number of the account holder and the field Num (The primary key is a combination of all 4 fields), the beginning look of value 1 in 2006, the last look of value 1 in 2006.
Table_result_06
Account_no key
Account_eff_dt key
No_account_holder key
Num key
Value1_min (the minimum value for the minimum of record_sequence)
Value2_max (the maximum value for the maximum of record_sequence)
All the active account numbers with the Account_eff_dt, No_account_holder and Num are in the Table3. As such I can build a query that connects Table3 with table Table1 on all 4 fileds, Account_no, Account_eff_dt, No_account_holder, Num and find the Value1_min for the min of req_sequence in 2006 and Value1_max for the max of req_sequence in 2006. Here my problem starts.
Table 1 doesn’t have a new entry if nothing has changed in the account. So if this account was open in 1993 and nothing has changed I don’t have an entry in 2006 but this doesn’t mean that this account doesn’t exist in 2006. So to find the minimum value I have to go back in 1993 and find the max and min for that year and that will be max and min in 2006 as well.
As such I have to go to Table_2 historical and search for min and max. But this table doesn’t have the field NUM and if I match only on the Account_no, Account_eff_dt and No_account_holder I don’t get a unique record.
So how can I connect all three tables, Table 1 for max and min, if it doesn’t find anything will go to table 2 find the two values and populate Table_result_06.
Thanks so much again for your hep, -
How to programmatically move the cursor to the "To" field of a new AppointmentItem?
I need to move the cursor to the "To" field of all new AppointmentItems which are created through my Outlook Addin. How I can achieve this?
Thanks in advance.
Thanks PrasadHello Prasad,
The Outlook object model doesn't provide anything for that. You need to use Windows API functions or use
Accessibility API to set the cursor programmatically. -
Safari status bar disappears. I have tried clicking on show status bar, under the View tab and it will only appear when I move the cursor to the top of the screen. I can not minimize the open page, only full screen or close the browser. Any idea how the rectify this issue?
One enters and exits full-screen with control+command+F keys. This is on the View menu in Safari. Optionally, the green traffic light in your browser title bar, if you roll over it, has the full-screen control it it. While in full-screen mode with Safari, moving your mouse pointer virtually up, and off-screen reveals the Safari title bar again, and you can click the green traffic light to exit full-screen mode.
You can hide/show the status bar by simply typing command+/. This too, is on the Safari View menu. and in 10.10.1 — it works reliably for me. -
How to track materials shipped by the Vendor but not received
Hi,
Can anyone explain how to track materials shipped by the Vendor but not received at the customer plant?
Thanks in advanceYou can use confirmation control in PO for tracking
1. OMGZ to Configure Confirmation control.
Here you can specify the order in which you expect confirmations from your vendors.
2. MK02 - to assign Confirmation Control to Vendor in Purchasing View.
3. To view acknowledgments that have been received,
in PO choose Item --> Confirmations --> Overview
Check this out-
http://www.sap-img.com/materials/explain-about-the-po-confirmation-control-key-in-detail.htm -
How i can fixup the cursor in the center of plot at any time?
i need the cursor show the data of the points in plot,but i found after the plot zoomin,the cursor can not show .how i can fixeup the cursor at any time?
thanks a lot.Hi Longsan,
So I tried to reproduce the issue you were seeing and I believe I know what is going on. If you zoomin and the max and min of the axes are smaller than the cursor position, the cursor will no longer be in the viewing area of the graph. Therefore, you would want to reposition the cursor after you zoom in. For example, in Visual Basic you could use the command
CWGraph1.Cursors(1).XPosition to change the position. I thiss out and it seems to work correctly. Let me know if try this and you are still having trouble.
Thanks,
Caroline
National Intruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments -
Hi , at Launchpad when I move the cursor up the screen starts to thimble. Any idea how to fix it. thanks Jacob
HI Jacob, Did you ever solve your problem with Launchpad? I am having the same problem now.
-
at Launchpad when I move the cursor up the screen starts to tremble. any idea how to fix it ? Jacob
HI Jacob, Did you ever solve your problem with Launchpad? I am having the same problem now.
-
HT2477 when i move the cursor across the screen it launches the dashboard - how do i stop it
when i move the cursor across the screen to the left it launches the dashboard - how do i stop it doing that ?
Hi Jimb9,
Thanks for visiting Apple Support Communities.
If Dashboard seems to be launching automatically when you move your mouse to the left, first check to see if a "Hot Corner" has been set.
Hot Corners
To specify an action to perform when you move the pointer to a screen corner, choose the action from one of the Active Screen Corners pop-up menus.
After you set an active corner, move your mouse to that corner of your screen to see the result.
You can find the Active Screen Corners menu by going to System Preferences, then choosing Mission Control and clicking the Hot Corners button in the bottom left.
These articles have more information about Mission Control:
Mac Basics: Mission Control
http://support.apple.com/kb/ht4689
OS X Mavericks: Mission Control preferences
http://support.apple.com/kb/PH13925
All the best,
Jeremy -
How to find the current line in the table control in module pool ?
How to find the current line in the table control in module pool ?
This is an urgent requirement? please do help me.refer to this example
REPORT demo_dynpro_tabcont_loop_at.
CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
DATA: cols LIKE LINE OF flights-cols,
lines TYPE i.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
DATA: itab TYPE TABLE OF demo_conn.
TABLES demo_conn.
SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
LOOP AT flights-cols INTO cols WHERE index GT 2.
cols-screen-input = '0'.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDLOOP.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
DESCRIBE TABLE itab LINES lines.
flights-lines = lines.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE read_table_control INPUT.
MODIFY itab FROM demo_conn INDEX<b> flights-current_line.</b>
ENDMODULE.
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'TOGGLE'.
LOOP AT flights-cols INTO cols WHERE index GT 2.
IF cols-screen-input = '0'.
cols-screen-input = '1'.
ELSEIF cols-screen-input = '1'.
cols-screen-input = '0'.
ENDIF.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDLOOP.
WHEN 'SORT_UP'.
READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
IF sy-subrc = 0.
SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
cols-selected = ' '.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDIF.
WHEN 'SORT_DOWN'.
READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
IF sy-subrc = 0.
SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
cols-selected = ' '.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDIF.
WHEN 'DELETE'.
READ TABLE flights-cols INTO cols
WITH KEY screen-input = '1'.
IF sy-subrc = 0.
LOOP AT itab INTO demo_conn WHERE mark = 'X'.
DELETE itab.
ENDLOOP.
ENDIF.
ENDCASE.
ENDMODULE.
Maybe you are looking for
-
Mac Mini (PPC) won't boot off install DVD
I'm having a major issue with my 1.24GHZ G4 Mac Mini. What I want to do is reformat the HD and reinstall OSX. But for some bizarre reason the machine refuses to boot off any OSX install DVD I throw at. I've tried Jaguar and Panther as well. If I hold
-
create or replace TYPE NUMTABLE AS TABLE OF INTEGER; i've a function in EQUIP_PKG package FUNCTION Exists_In_Numtable (p_target NUMBER, p_list NUMTABLE) RETURN boolean IS v_found boolean := FALSE; BEGIN FOR i IN p_list.FIRST .. p_list.LAST LOOP IF p_
-
I am trying to see if Crystal 2008 will work with MP2 Access 2000. When using the report wizard I get the error messages "Failed to retrieve data from the database" and the error message "Cannot determine the queries necessary to get data for this r
-
My Developer Community is not able to preview or publish topics. The Preview window is greyed out. The Error Message when trying to publish says: There is no publishing styles.You might have no permissions to them, they might have been accidenta
-
How to get this type of class?
Hi. I'm trying to make a class like Math which i can run his methods without declaring an object. I want this: MyClass.method(); not this: MyClass a = new MyClass(); a.method(); How can i do it? And what's the name of this type of classes?