Trouble validating in field-exit

I'm using field symbols to enter the values I need to validate in transaction FBCJ, th reference field.
For some reason all the validations I try with '(SAPMFCJ0)itcj_e_postings-tax_code' are not working. It treats them as if the were
I can't find a way to place a break-point in the exits, but when I pass that field symbols to the output export, the Reference field gets filled with the transaction, so I suppose the validations should work
Here is the troubling code
data: i_nd(2) value 'ND',
      i_na(2) value 'NA',
      i_value(2).
DATA: l_tex1(25) value '(SAPMFCJ0)iscj_e_postings',
      l_tex2(18) value '(SAPMFCJ0)sy-ucomm',
      l_tex3(35) value '(SAPMFCJ0)itcj_e_postings-tax_code',
      l_x(3).
FIELD-SYMBOLS: <fest> TYPE iscj_postings,
               <fokc> TYPE sy-ucomm,
               <fes2> TYPE iscj_postings-tax_code.
ASSIGN (l_tex2) to <fokc>.
if sy-subrc EQ 0.
l_x = 'X'.
endif.
ASSIGN (l_tex1) to <fest>.
if sy-subrc EQ 0.
l_x+1 = 'X'.
endif.
ASSIGN (l_tex3) to <fes2>.
if sy-subrc EQ 0.
l_x+2 = 'X'.
endif.
move <fes2> to i_value.
if NOT <fest>-transact_name IS INITIAL AND i_value NE i_nd AND i_value
NE i_na.
CALL METHOD checa_rfcok
EXPORTING
i_est = <fest>.
endif.

It appears that the field exit enters several times, that's why the output did show the tax code
Solved this using all the conditions in structure (SAPMFCJ0)itcj_e_postings because it has all the values I need to validate

Similar Messages

  • Use of field exit for validation of KNTTP in ME51N

    Hi All,
    I've a client who is still running on SAP 4.6C.  There is a requirement to validate the Account Assignment Field KNTTP based on the document type, and if the validation fails, to raise an error message.  As there is no standard user exit that I've been able to find for this field, and we don't want to modify standard screens, I've created a field exit against the KNTTP field and generated the FM FIELD_EXIT_KNTTP, and activated it, but it doesn't work. 
    As this is the first Field Exit I've coded could someone please assist me with understanding the following:  in the parameters list is the value of INPUT the value of, in this instance, the KNTTP field and also is it possible to read other screen data within this FM, for example, if the KNTTP value eq 9, can I read the BSART field of the current transaction, and if so, how do I reference it (BSART, EKKO-BSART, MEREQ_TOPLINE-BSART,  parameter id BSA, etc)?
    Any suggestions on how to debug the process would be greatly appreciated as well.
    Any help would be greatly appreciated.
    Regards,
    Steve

    Due to lack of assistance, we were unable to pursue this requirement - the users were not happy, but what can you do, huh!

  • User exit for validation of field NEWKO in f-48 tcode in finance

    hi,
           Previously we  validated the Field XBLNR (Reference) in the document header from the table EKKO, for the PO Number. now we want to validate the vendor number(LIFNR)  in the field NEWKO from the table EKKO with reference to the PO number entered in the field XBLNR.
    we want to find out the correct user exits or any enhancement for the above validation.
    pls help me in this regard ,matter most urgent.
    Thanks & regards
    veera

    hi,
    for f-48 you could use FI-validation with tcode OB28
    use an exit (UK...) for your check in Program ZGGBR000
    A.

  • Query on Field exits in ECC 6.0

    Hi All,
    We have implemented field exits in SAP R/3 4.6c and now we have upgraded to ECC 6.0.
    I need to know the following information:
    Are field exits obsolete in ECC6.0?
    Can we create new field exits in ECC 6.0 ?
    Going forward, what is the alternative technology/concept to be used - enhancement sports, BADIs etc for field validations(or instead of field exits)?
    Regards
    Shiva

    Hi,
    Though it is obsolete, SAP does not say dont you field exit. You can still use field exit. You can still create field exits.
    Whatever is already existing will definitely work. Creating a field exit is much more simpler and easy than the BADIs or Enhancement points.
    Yes you are right, going forward, you will have to use BADIs or Enhancement points.
    Regards,
    Subramanian

  • Field Exit with DYNP_VALUES_UPDATE

    Hello, I am trying to develop a validation in a SAP transaction (XD01) to check some field values and if them are right then fill automatically the rest of the field in the screen, using a Function Modulo and the FM DYNP_VALUES_READ I am able to retrieve the field values correctly, my problem is when a try to fill the rest of the screen's fields with FM  DYNP_VALUES_UPDATE it doesn't work. Does anybody have used this FM? is possible what I am trying to do?
    Thanks in advice for your help.

    Hi Fernando,
    Using Field exit we can't populate multiple fileds, One filed exit is applicable for only one input filed.If you want to implement the
    filed exit for multiple fileds you have to implement the one exit for one filed.
    Regards,
    Mahender Reddy

  • PR creation for 'F" in ME51N, ME52n, the cost center field exit getactivate

    Dear Gurus,
    We have a Cost center Field exit activation, meaning when a PR is generated, the system will validate only for his department cost center. Its working fine
    The issue, when we create PR through ME51n or me52n for Acct Assign "F" here we are going to enter only Work order number and GL number, not cost center. Still this field exit has activation,  here the same error message popup, which suppose not to be.
    So in MM configuration,  i have disabled Cost center field  for acct assignment "F".
    Now when i create a PR for F, for single account assignment, the system will alllow, but if i want to distribute the qty to different work order, the system goes for validation for cost center field exit.
    How to resolve for multiple assignment, how to deactivate the Cost center field exit for this case, its woking fine of Single account assignment (after disable the cost center field for Account Assignment "F")
    Please help me out or any way to do this?
    Regards
    RS
    Edited by: RS on Sep 14, 2009 7:40 AM

    Hi,
    Cross check you have Cost Center field is Hidden for Account Assignment Category A (Asset) in t.code:OME9. Now change Cost Center field as Display for Account Assignment Category A and save.
    Now create a new PO with Account Assignment Category A and find the difference how Cost Center appearing in your PO in “Account Assignment” TAB.
    Regards,
    Biju K

  • Field Exit  for QA01

    Hi All,
    i'm having a trouble using Field Exit.
    Im using the QA01 transaction.  Here's my code:
    function field_exit_abc.
         if input = '013'.
              include ZXXX001.
    endif.
    Where ZXXX001 is a function module that should contain a "CALL SCREEN"(using ScreenPainter) but SAP doesn't allow me, it gives an ABAP Dump Error.

    You should probably post this question in the ABAP forum.

  • Messages in field exits

    Hi all,
    I need to perform some validations over a field and I am doing it on a field exit. The requirement is that I have to inform the user if, after the validation, the exit changes the value of the field.
    Does anyone has a hint for that?
    Thanks in advance!
    Best Regards,
    Ezequiel Martin

    Well, I have changed the strategy because it was too difficult and complicated because I had to perform several other validations using other fields, and in case those other fields were changed, validate everything again.
    After all, I have put al the required validations in a user exit and issued an error message proposing a new value for the field so the user will have to change it manually.
    This is, by far, the simplest solution I found.
    Thank you all for your time and help!!
    Cheers,
    Ezequiel Martin

  • A question about field exit

    I have created a function module 'FIELD_EXIT_ABREX'.Can I use other field value  in this Function Module?How to implement it?

    Hi,
    Firstly decide the scope : Global or Local to screen.
    Global Field Exits are trigerred from all Screens whereas for Screen specific needs the screen to be specified when we go for activating it....
    Run program RSMODPRF and specify the field ...
    Note : Screen name & data element may be different...so u have to specify Data Element & not Screen field name. Just to remind as this is common pitfall.
    Now as u said 'FIELD_EXIT_ABREX' as the Func module created. This gets the screen value of field ABREX in variable INPUT of the Func Mod 'FIELD_EXIT_ABREX' and after processing u can return value throu variable OUTPUT.
    You can write u r validations in the FM and do whatever. Just remember the value are lost as soon as this Field Exit is triggerred Again
    I hope this should help you for further wwork and any other specific issue do post back ... we'll see dude.
    <b>Do reward if this was useful and adds to u r knowledge / solves issue</b>
    Regards,

  • Field Exit for Batch Input creation from LSMW

    Hi all,
    I am having problems getting a field exit to work for validation of user id in the "Create Batch Input Session" step of LSMW.
    Program: /SAPDMC/SAP_LSMW_BI_RECORDING
    Screen:  1000
    Data Element: SYUNAME
    Any help would be appreciated.
    Regards,
    Jason
    Message was edited by: Jason Lante

    Field exits are not supported after 4.6 yes, but they still work. I found the reason why my field exit wasn't working; it related to the fact that the field I am applying it to is not directly related to a dictionary object. Meaning I cannot apply a field exit.
    So my question now is what other ways are there to enhance LSMW?
    Regards,
    Jason

  • The way how field exit gets called??????

    Hi ALL,
    Can any guru tell me how exactally the field exit works.
    Senario- I have created field exit on Data element WERKS_EXT for user validation on plant level for T-code VA01.
    Issue- I don't have proper user details in Dev. system to test this thing, for ulternative what i m doing is; I am running VA01 by putting brake point inside my Include for field exit to check it is getting called or not?
    But the control is not coming to this field exit code and it is creating sales order .
    I have checked, it is ACTIVE and GLOBLE for all screens.
    So, please tell how exactally the field exit works and how i can test this?
    Regards,
    Rahul

    Field exits can only be executed for fields that are directly related tothe dictionary. If the relation is indirect, i.e. via an ABAP declaration ( LIKE ), no field exit can be executed. Field exits cant be debugged.
    For details on field exits, have a look at below link.
    http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm
    http://www.sap-basis-abap.com/sapab014.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Field Exit in ME21N -PO

    Hi all,
    This is related to the Tcode ME21N (PO).
    I need to put validations on the fields of Purchasing Document and Item in the above Tcode.These are the fields at the item level in the last two columns.For this I have created 2 Field Exits for the Purchasing Document(Data Element-EBELN and Item (Data Element EBELP).
    The problem is that there are 2 Item fields (the first column and the Last Column) of the same Data Element EBELP.Now for both these fields the field exit for the Item gets trigerred, once for each (ie first it has the value from the 1st column and next time it has value from last column).Now my validations are required only for the Last Column entry.
    So how do I make out in the logic of the field exit that it has been trigerred only for the Last Column Entry.Can I use the Field name in the screen for Last Column in any way for my requirement.
    Your Inputs are appreciated and will be rewarded.
    Thanks,
    Stock.

    see u need to get the entries as
    Ebeln        EBELP
    12000001   0001
    12000001   0002
    so if i want to validate on ebeln for item 2 then i need to differentiate it in hte select
    12000001 0001
    <b>12000001 0002</b> "---> on limit the validation of 2
    so i need to feed EBELP in the select statement .
    select single EBELN EBELP from EKPO
    where EBELN  = P_EBELN
      and EBELP =  P_EBELP
    To fetch the right entry u need to reach only that value of ebelp .
    Pass the code .
    regards,
    vijay

  • Field exits is not working in the COPA

    Dear All,
            I had create the field exits for profit center and it is working well in all the screen except the COPA.  My profit center field exits will automatically change the profit center value if user key in the valid profit center department in the profit center field.
    However, it is not working in the COPA screen. Please kindly advise.
    thank you very much

    Thank u for your answer.
    Yes, of course .. i�ve already apply the unique key validator for the entity.. so that custom error message is the error im trying to get in the application.
    Other issue is when im trying to edit that error message: when im going to edit the message the previous error im entered is not there. Is it normal?

  • Re: field exits

    Hi,
       Iam getting one problem while creating field exit for
    tcode iw21.  When i choose the activiteis tab, if there is no value in the table control first field then i raise error message( there is no activities defined) . But the error messge is reporting for each row when i choose the save button or any dialog. How can i rectify this problem.

    sasi,
         Iam creating field exit.  Inside that field exit function module i have written the code like this.
    DATA: DYNTAB LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.
    DYNTAB-FIELDNAME = 'VIQMEL-QMART'.
    APPEND DYNTAB.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                         = 'SAPLIQS0'
          dynumb                         = '1050'
        tables
          dynpfields                     = DYNTAB.
          READ TABLE DYNTAB INDEX 1.
    ***logic for validations
      IF SY-TCODE = 'IW22'.
           IF DYNTAB-FIELDVALUE = 'M7'.
             IF  INPUT EQ SPACE.
                 MESSAGE E004(ZIW21).
             ENDIF.
           ENDIF.
    ENDIF.

  • Field Exit or User Exit for Maintenance Order field.

    Dear All,
    we need an field exit or an user exit for order(AUFNR)field in PM module.
    The Client wants that the value of this field should be validated and for certaion condition an error message should be given while saving an invoice for this order.
    Kindly provide the user exit ..
    Its urgent.
    Thansk in advance ..
    regards
    Ajay.

    Implement Field Exit within program   
    For this example I am using dta element 'EBELN' from table EKKO.                   
    Step 1: Execute program 'RSMODPRF', entering the data element of the field
    Step 2:Create function module when prompted, and add you code to the source section using the parameter 'INPUT' as the field value you are checking
    Step 3:      Save and activate Function and execute transaction 'CMOD'.
    Step 4:      Choose option: Goto-> Text Enhancements->Data elements->New DE cust docu.
    Step 3:      Save and activate Function and execute transaction 'CMOD'.
    Step 4:      Choose option: Goto-> Text Enhancements->Data elements->New DE cust docu.
    Step 5:      Enter data element
    Step 6:      Save and activate
    Step 7: Execute program 'RSMODPRF' again but this time leave data element field blank. Step 8: Select the checkbox for the data element you have just created and choose option: Field exit->Activate This will now be active for all instances of this data element, but you can assign specific program and screen combinations by pressing the 'Assign prog./screen' button. You can also change the code you entered in the field exit function module by pressing the 'Edit FM' button.
    regards
    vinod

Maybe you are looking for