on 2015 Nov 12 4:30 PM
Hi everybody.
After follow and deploy the helpful guide from available here in SCN (http://scn.sap.com/docs/DOC-54073#), I have one additional question: after creation of user-field, Is it possible, even using ABAP, to configure field selection for the new user field?
I've attached few pictures to make myself clear.
Thanks in advance.
Carlos Araujo
Hello Carlos,
It is not possible from here (spro). But these requirements can be well met from within the screen-exit itself. i.e. through codes written in the PBO and PAI modules. I have already touched upon this aspect in the same document after Step4 and below Almost done. I have provided a sample code there to make the fields to Display mode if the tcode is 'IE03' .
For example a code like:
IF equi-eqtyp = 'A' .
LOOP AT SCREEN.
IF screen-name CS 'equi-zzito_zfield'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
in PBO Module hides the zfield if the Equipment category is 'A' .
Similarly a code like
IF equi-eqtyp = 'A' and equi-zzito_zfield IS INITIAL.
MESSAGE: 'Please fill zfield' TYPE 'I' DISPLAY LIKE 'E'.
ENDIF.
in PAI Module will make the Zfield mandatory if the Equipment category is 'A'..
For making zfields mandatory, I recommend user-exit IEQM0003 . Put the following code in include ZXEQMU02:
IF data_equi-eqtyp = 'A' and data_equi-zzito_zfield IS INITIAL.
MESSAGE: 'Please fill zfield' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.
This code makes the Zfield mandatory if the Equipment category is 'A' and stops SAVE event of the Equipment.
These are tested codes, Adopt it to your situation.
Regards
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your piece of code to make mandatory field, very useful and works fine considering screen validation. However, I need also validate when running a function module. I mean, if I run ITOB_EQUIPMENT_MODIFY_SINGLE and zfield is empty, error message must be shown.
I hope to made myself clear. Thanks for any additional hint.
All the best.
Carlos Araujo
EAM Consultant
User | Count |
---|---|
116 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.