2010 Aug 04 3:33 PM
Hi
Can i use sy-ucomm to capture the user action in the user exits or customer exits.
If i use sy-ucomm in exits wat will be the disadvantage.
Regards,
S.
Hi
Can i use sy-ucomm to capture the user action in the user exits or customer exits.
If i use sy-ucomm in exits wat will be the disadvantage.
Regards,
S.
2010 Aug 04 5:56 PM
sy-ucomm necessarly need not hold the screen value once the program logic comes into PAI. In standard SAP program if the user command is calling subscreens or other dynpros then sy-ucomm will not hold the value. I would not recommend depending on sy-ucomm but if you have user-exit or enhancement point then you can export sy-ucomm value to memory to be used later in the code.
'
if it is custom program yes you can use sy-ucomm to capture values but in custom program why do you want to do that. You can define okcode and assign it to the dynpro that way it holds the value in ur PAI and you can use the value.
hope this helps.
2010 Aug 04 6:46 PM
Hi Thanks for ur reply.
In my case i'm using a customer exit for Co11n,
I need to perform certain checks when user saves the confirmation.
I have one exit which will trigger at the time of saving but no error messages can be passed if passed data wil become inconsistent.
So i have choosen another exit and written logic by capturing he sy-ucomm.
if sy-ucomm = 'BU'.
some messages based on logic or conditions.
endif.
i had a doubt that wether i'm going in wright way or Not..
Regards,
S.
2010 Aug 05 3:54 AM
Hi,
You can check the SY_UCOMM value in your exit code and check you are always getting the function code of the SAVE button
correctly as "BU".
But in place of SY-UCOMM better to use the OK_CODE of the screen defined in screen painter.
To make the OK_CODE of the field available in your exit make use of the field-symbol as
field-symbol <fs_ucomm>. type any.
Assign ('(SAPLCORU_S)OK_CODE') to <fs_ucomm>.
if <fs_ucomm> is assigned.
lv_ucomm = <fs_ucomm>.
endif.
and check whether the field symobol is assigned and then you can get the OK_CODE of the SAVE button in the variable lv_ucomm .
Thanks,
Pawan