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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    Hi

    Use - GET CURSOR FIELD

    based on that do your action.

    Regards,

    Venkat

    Add comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded

    • 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.