Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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 (164634 B)
replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question