Posted: Tue Sep 11, 2007 3:33 pm Post subject: Hide & Get Cursor in Interactive Programming
Hide & Get Cursor is used in interactive programming ( in the event AT LINE-selection).
Using Hide in Loop..Endloop, you can get the field name At Line-Select
Event While Double Clicking That Line.
END-OF-SELECTION.
CLEAR : it_test-code, it_test-name.
WRITE : / 'this from end of selection'.
*&--------------------------------------------------------------------*
*& Form DISP1
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM disp1.
WINDOW STARTING AT 15 10
ENDING AT 80 15.
DO.
CLEAR chk1.
READ LINE sy-index FIELD VALUE chk1.
IF sy-subrc NE 0.
EXIT.
ELSE.
CHECK chk1 NE space.
WRITE : / it_test-code, it_test-name.
MODIFY CURRENT LINE :
FIELD VALUE chk1 FROM ' '
FIELD FORMAT chk1 INPUT OFF.
ENDIF.
ENDDO.
ENDFORM. "DISP1
***line double click ****
AT LINE-SELECTION.
CHECK sy-lsind = 1.
WINDOW STARTING AT 5 4
ENDING AT 85 20.
WRITE: / 'THE USER DOUBLE-CLICKED A LINE IN THE REPORT'.
WRITE: / sy-lisel.
WRITE : / 'Sometime ',it_test-name, ' is good '.
WRITE : / 'Sometime ',it_test-name, ' is bad '.
WRITE : / 'Sometime ',it_test-name, ' is rich '.
WRITE : / 'Sometime ',it_test-name, ' is poor '.
WRITE : / 'Who knows, who is ',it_test-name, ' ? '.
WRITE : /, / 'we can also use this in SELECT statement'.
CLEAR : it_test-code, it_test-name.
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ULINE.
SKIP.
SKIP.
WRITE : / 'Below from Get Cursor Field...'.
GET CURSOR FIELD fldname VALUE fldval.
CONDENSE fldname.
CONDENSE fldval.
WRITE : / 'You have clicked ', fldname, ' & its value is ', fldval.
***function key press F6 ****
AT PF06.
PERFORM disp1.
*AT USER-COMMAND.
* CASE SY-UCOMM.
* WHEN 'STOP' OR 'CANCEL'.
* LEAVE TO SCREEN 0.
* WHEN 'TESTME'.
* PERFORM DISP1.
* ENDCASE.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.