Skip to Content

Program has to be trigger only for particular field.

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.


error1.png (164.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 17, 2015 at 07:57 AM

    Hi

    Use - GET CURSOR FIELD

    based on that do your action.

    Regards,

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2015 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.