We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-abap] OK_CODE Not Working Properly

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from vhietha_darwis on Nov 28 at 12:34 AM
Hi All,

Thank you for the response. I do this:
First I declare

DATA: OK_CODE TYPE UI_FUNC.

and then I use this :
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT' OR 'BACK'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
PERFORM LYR_BERSIH.
WHEN 'ZFORM'.
* NO_URUT =0 0.
*************select datpri
* SELECT * FROM ZHRDT_DATPRI INTO TABLE T_ZHRDT_DATPRI WHERE NAB = ZHRDT_DATPRI-NAB.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZASPK_NL_RESUME'
IMPORTING
FM_NAME = FUNC_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.

CALL FUNCTION FUNC_NAME
EXPORTING
VNMJAB = V_NMJAB
VNMDEP = V_NMDEP
VNMDIR = V_NMDIR
VKDLOK = ZHRDT_DATPRI-WERKS
VPERIODE = IT_ZHRDT_PPKK01_H-SEMPPKK
VTGLAWAL = V_TGLAWAL
VTGLAKHIR = V_TGLAKHIR
TABLES
IT_T_REP_OUT = IT_T_REP_OUT
* T_ZHRDT_DATPRI = T_ZHRDT_DATPRI
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.

ENDCASE.
CLEAR: OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT

As the code seen above I use sy-ucomm cause when I use ok_code it cant read the last action I did. I just don't know why the ok_code can't work properly.

Thank you in advance.
vita.

---------------Original Message---------------
From: vhietha_darwis
Sent: Tuesday, November 26, 2013 9:16 PM
Subject: OK_CODE Not Working Properly

Hi All,

I have a problem when using OK_CODE, sometimes this OK_CODE can catch my last action but sometimes cant, so I have to use sy-ucomm to catch my last action. But the problem is I cant clear sy-ucomm.
Can anyone help me in this issues?
Thank you in advance.

Vita.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
vhietha_darwis  

Programmer/Developer - Software
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have a technical question? Need to find IT solutions? Ask your peers in the Toolbox for IT community.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language