Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

field exits

Former Member
0 Likes
694

i have a problem, in MM01(Basic data1) there is field called Prod.hierarchy(dataelement is prodh_d), for this data element how to create Field Exits and how to assign to MM01 Tcode.

the code part i have to write is

1. To validate MARA-PRDHA field length (field exit can handle this). the field length should be 18 char.

2.Copy the value of MARA-PRDHA to MVKE-PRODH (the code of the field exit above, you can do field-symbol technique to transfer value from mara-prhda to mvke-prodh).

plz. do the needfull information with all the steps with codeASAP.

I am using Ecc 6.0 Version.

Thanks & Regards,

Sudheer.

5 REPLIES 5
Read only

Former Member
0 Likes
653

hi Sudheer,

Try using the steps mentioned below:

<b>step1</b>: Goto Transaction CMOD.

<b>step2:</b> Choose GOTO->Text enhancements->DataElements->New

Enter the name of data element (you can refer to a screen as well).

Choose Continue.

The system takes you into the Function Library and suggests a name for your function module ( FIELD_EXIT_data element name ). You should use this name.

<b>step3:</b> Create the source code and, if needed, global data for your

function module.

sample code:

    data: lv_len type i.
    field-symbols: <fs_mvke> type MVKE.
    lv_len = STRLEN( MARA-PRDHA ).
    if lv_len < 18.
          "error message
    else.
    <fs_mvke> = MVKE.
    <fs_mvke>-prodh = MARA-PRODH.
    endif.

<b>step4:</b> Activate the function module.

<b>step5:</b> After you have created the processing logic for your field exit, you must assign the exit to one or more programs and screens. This assignment tells the system which screens to trigger your function module on.

You might require to refine the sample code mentioned above.

Hope this helps,

Sajan Joseph.

Read only

0 Likes
653

Hi Joseph,

Thanks for sending the code. one more thing is i read some statement like "<b>Set the abap/fieldexit profile parameter to YES and start the system again</b>".

where do we set it.

can u help me for this.

Thanks & Regards,

Sudheer.

Read only

0 Likes
653

Hi guru,

I got the solution with ur code. i need one more help for u r side. can u give ur email id i can forward the document.

Please........ do the need full .

Thanks..................

Thanks & Regards,

Sudheer.

Read only

0 Likes
653
Read only

0 Likes
653

Hi ,

i send a mail to ur yahoo id.

please provide the solution for that.

Thanks & Regards,

Sudheer.