10-17-2015 5:39 AM
Hi,
(Note: I am not asking about search help filtration )
I have one questions. I had written one code. for T-code FS00. When ever i press the f4_help for Gl_account i had written some logic.
It is working fine.Like below.
IF SY-TCODE EQ 'FS00'.
IF SY-UNAME EQ 'USER01'.
" I had written the logic.
ENDIF.
ENDIF.
But the above code is triggering , Other fields are also having f4_help not same different fields, fetching data from different tables,
My question is program has to be trigger only for particular screen field. I think i need to written one more if condition. That is also i tried like below.
Then i added the below code like.
LOOP AT SCREEN.
if screen-field = 'SANKR'.
ENDLOOP.
If i activate the program the below error i am getting.
The data object "SCREEN" does not have a component called "FIELD". |
Then i open the screen painter for this program in se51 then i got the screen name of the field, then i changed to
if screen-field = SAPLGL_ACCOUNT_MASTER_MAINTAIN.
Still i am getting the same error. Can any body tell me how could i do the validation for particular field.
10-17-2015 8:57 AM
Hi
Use - GET CURSOR FIELD
based on that do your action.
Regards,
Venkat
10-17-2015 6:15 AM
Hai,
If you are looping inside the SCREEN structure, then the name of the field is got using
SCREEN-NAME and not SCREEN-FIELD. Please check.
Regards,
Abijith
10-17-2015 6:30 AM
HI, Thanks For your reply. How could i get the screen name.
I open the se51 and here for this field screen name is available i took that one, and i used in the code. But it is not allowing.It means code is not going the inside of the if condition.
If i check the screen-name it is showing that TEXT_COA_BILKT.
Can i use this one as Screen-name. If your answer is yes.
I click on the other field at FS00 . company code i clicked, for that field also screen-name it is showing that TEXT_COA_BILKT.
10-17-2015 6:39 AM
Hai,
When the transaction is running, please place cursor on the required field and press F1. From the popup click on the fourth button and from the next popup you can find the screen field.
Regards,
Abijith
10-17-2015 6:45 AM
Hi,
Thanks for your reply. I tried both. Below is my Code. I put the break point at second loop. I hope i put the correct place.
Not firing. Only cursor is coming on if screen-name condition only. then it will not come to second loop.
two i tried screen-field is 'sankr' and GLACCOUNT_SCREEN_KEY-SAKNR
LOOP AT SCREEN.
if screen-name = 'GLACCOUNT_SCREEN_KEY-SAKNR'.
* if screen-field = 'SANKR'.
LOOP AT RECORD_TAB[] INTO WA_TEMP.
CLEAR: ITAB,TEMP_DATA,T1.
endloop
endif.
endloop
But not working, Any reason.
10-17-2015 7:08 AM
Hai,
I should have asked this question earlier itself. Actually what is your exact requirement? You want to trigger what code on pressing F4 on SAKNR. This is a standard transaction. Then how you had placed your code and where? Have you done this through any sort of enhancements?
Please explain.
Regards,
Abijith
10-17-2015 7:35 AM
Hi...
Please dont ask that question....The topic will be deviates to other things. Then my userid will be deleted . because somebody are observing . Right now just tell me how to get the screen name.
Sorry to say Not able to reveal this time.
10-17-2015 8:57 AM
Hi
Use - GET CURSOR FIELD
based on that do your action.
Regards,
Venkat
10-17-2015 9:28 AM
Hi,
Thanks for your reply. Please have a look on below attached image.
The values are empty. already cursor is moving on this fields but still empty.
10-17-2015 10:44 AM
Hi,
Just insert this piece of code in your implicit enhancement
data : CALLED_FOR_FIELD(10) type C.
import CALLED_FOR_FIELD = CALLED_FOR_FIELD
from MEMORY ID 'CALLFIELD'.
10-17-2015 11:24 AM
10-17-2015 11:31 AM
Hi, Tee Gee
Thanks for your reply. It' working Where ever i pressed the f4_help, now it is giving the correct result.
May i know why default it is not showing the screen-name. Any reason.Can u please Explain.
I used the above in se38 z-program it is working. But in enhancement never used. Now i need to use.
10-17-2015 2:37 PM
screen-name remains empty as the program navigates from one to another.
and your code is in a different program.
10-17-2015 2:43 PM
Thanks For your reply. Point noted. and i am closing the post.
Keep posting.