BAPI_ACC_DOCUMENT_POST - User Exit is not working

Hi all,
I need to perform a posting and pass in some field into the extension table. I have follow the sap note recomendation and created a project in CMOD using ACBAPI01 as the component. I then added the coded into the user exit. When I tried to debug it doesn't not execute the code inside the user exit. Also BAPI_ACC_DOCUMENT_POST was executed w/o any error. However when I check the system, there's no document posted.
Also please correct me if I'm wrong. I'm not so sure what to populate for the following field in the header. Is the following correct?
  gt_docheader-obj_type   = 'IDOC'.
  gt_docheader-obj_key    = '$'.
  gt_docheader-obj_sys    = 'BGS1'.
  gt_docheader-bus_act    = 'RFBU'.
Thanks in advance
Ricky

Hi Ricky and Igor,
Rick is right: You can use userexit wherever they are provided. Many BAPIs as i.e.
[code]BAPI_ACC_DOCUMENT_POST        
BAPI_ACC_DOCUMENT_CHECK
BAPI_ACC_GL_POSTING_POST      
BAPI_ACC_GL_POSTING_CHECK
BAPI_ACC_BILLING_POST         
BAPI_ACC_BILLING_CHECK
BAPI_ACC_INVOICE_RECEIPT_POST
BAPI_ACC_INVOICE_RECEIPT_CHECK
BAPI_ACC_GOODS_MOVEMENT_POST  
BAPI_ACC_GOODS_MOVEMENT_CHECK
[/code]
are implemented including userexit (to be seen as CALL CUSTOMER-FUNCTION in coding). Only the most impotant and regularily used fields are part of the BAPI interface. If the customer makes an append to any table or structure, the handling of the additional fields does not always happen automatically in the BAPI.
We created a User exit for BAPI BAPI_ACC_GL_POSTING_POST because the customer made extensions to the posting block.
The additional parameter values are passed in the BAPI extension table which is a genereric character table. In include ZXACCU15 we do the transfer of values passed via extension table to table t_accit which is part of the interface of the ueserexit.
If then BAPI is executed but it does not trigger the userexit, then you can put a breakpoint at the statement before CALL CUSTOMER-FUNCTION and see if you get there. If CALL CUSTOMER-FUNCTION is not executed, then try do de-activate the CMOD project and activate it again. This usually helps.
For the document header I can provide you just anaother example which works for us:
[code]  ls_documentheader-obj_type              = 'BKPFF'.
  ls_documentheader-obj_sys               = lv_logsys.
  ls_documentheader-obj_key               = '$'.
  ls_documentheader-username              = sy-uname.
  ls_documentheader-header_txt            = 'Investment Notes reconciliation'(026).
  ls_documentheader-comp_code             = ps_alv_display-bukrs.
  ls_documentheader-doc_date              = p_bldat.
  ls_documentheader-fisc_year             = p_gjahr.
  ls_documentheader-pstng_date            = p_budat.
  ls_documentheader-fis_period            = p_bper .
  ls_documentheader-doc_type              = p_blart.
[/code]
Hope this helps.
Regards,
Clemens

Similar Messages

  • EXIT_SAPLV50E_001 User Exit is not working for multiple plants case

    Hi,
    I have to update foreign trade data in Invoice during invoice creation using VF11. For that, I have written code in EXIT_SAPLV50E_001 and updated segal value. This functionality is working fine, if I have a single plant in an invoice. But customer has scenario where they can have multipl plants in an invoice.
    For multiple plants in an invoice, this EXIT_SAPLV50E_001 is not called.
    I am unable to find another better place where in I could place my code. Please help. Remember, case in multiple plants.
    Will be rewarded.
    Regards
    Arpit

    Hi Arpit,
                   Please use below mentioned user exit in T-code VF11
    he following user exits are available for tcode VF11
    Exit Name           Description
    SDVFX001            User exit header line in delivery to accounting
    SDVFX002            User exit for A/R line in transfer to accounting
    SDVFX003            User exit cash clearing in transfer to accounting
    SDVFX004            User exit G/L line in transfer to accounting
    SDVFX005            User exit reserves in transfer to accounting
    SDVFX006            User exit tax line in transfer to accounting
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    J_3RSINV            Customer enhancement: Pricing
    or You can use BADI
    BADI_SD_SALES_BASIC
    BADI_SD_TO_FM
    BADI_SD_BILLING
    Regards,
        Thangam.P

  • PA30 User exit for Creating work tax area

    Hi all, 
    I have a requirement to create a work tax area for personnel with allocation percent is allowed more than 100% for two particular tax areas. 
    For this I tried to use the user exit EXIT_SAPFP50M_002. In that user exit I have written the condition if the tax area is one of the two areas and the allocation percentage is greater than 100% then skip the validation it is doing currently.  But this user exit is not called when I run the program. I ran in the debug mode to see if it is called. But it is not called.   
    Currently if I enter allocation percentage greater than 100% then it will fire a dialogue message box saying “Work percentage cannot be greater than 100% Change existing records”.
    So I am wondering if it is the correct user exit to use.  Can you help? 
    Thanks for the great help. 
    Sobhan.

    Hi sobhan,
    1. ideally, this is the correct exit.
    2. for all infotypes, on saving,
       this is called.
    3. to check,
       just give some MESSAGE statement
       (without any If or without any logic
       and without any checking of infotype)
    4. From that we will come to know,
      if this is really getting called or not.
    5. Also make sure, the PROJECT (CMOD)
      is activated for this enhancement.
    regards,
    amit m.

  • 1. TACAS+ Accounting and Logged in Users report is not working on ACS 4.1(1

    Hi,
    I am facing problem with ACS 4.1 accounting, TACAS+ Accounting and Logged in Users report are not working, the csv file is been generated but nothing is showened in the file.
    I have checked the documents related to ACS 4.1, it says that there is a bug related to command accounting “CSCsg97429 - TACACS+ Command Accounting does not work in ACS 4.1(1) Build 23”.
    Tried upgrading the same with the patch applAcs-4.1.1.23.3.zip, still it is not working.
    Other reports are working fine.
    1. TACAS+ Accounting - not working
    2. Logged in Users - not working
    3. TACAS+ Administration - working
    4. Passed Authentication - working
    5. Failed Attempts - working
    Any suggestions or any idea, please revert.
    Regards
    Vineet

    Hi,
    Thanks
    Yes I have configured the command “aaa accounting exec default start-stop group tacacs+”
    As I have mentioned all the other reports are working. Which user and when he has logged in and what commands he has used. Only the TACAS+ Accounting and logned user is not working.
    Regards,
    Vineet

  • GRC 10.0: Access Request Creation - LDAP user advanced search not working

    Dear Experts,
    We are implementing SAP GRC Access Control and we have an issue in Access Request Creation. If we put the user name in “User” field and press intro, the user details are updated, but if we want to make an "Advanced search" the user is not found and the application give us the following message: “No records found for the search criteria entered.”
    Scenario 1: If we put the user name in “User” field and press intro, the user details are updated:
    Scenario 2: If we want to make an "Advanced search" the user is not found and the application give us the following message: “No records found for the search criteria entered.”
    We are using the Active Directory as Data Source.
    Thanks and Regards.

    Hi Jose,
    Try maintaning the parameter 2050 as YES and check once.
    Kindly, also make refer to  the below list of SAP notes:
    1757906 - GRC 10.0 - LDAP user search does not work in NWBC
    1745370 - LDAP search in GRC does not work anonymously
    1718242- UAM: User search not working in Access Request.
    Regards,
    Neeraj Agarwal

  • Exit button not working can u say how to do that?

    Exit button not working can u say how to do that?

    Which version are you using, please the exact number? Exit depends also on the browser, not only on Captivate.

  • Cancel and Exit button not working

    Dear Experts,
    <u>Cancel and Exit button not working</u>
    I am calling a screen from inside a report program
    using SET SCREEN 9000.
    2 of the date fields(start date end date)
    on this screen are Mandatory.
    I am not able to Come out of this screen 9000 using
    CANCEL or EXIT button
    without giving a date entry in both of
    Mandatory fields (start date end date).
    Can someone help me with a solution?
    Appreciate your valuable help;
    Points assured
    Thanks,
    Aby Jacob

    Hi..
    To avoid this problem you have to use AT EXIT-COMMAND Module.
    1. In the GUI Status for both EXIT and CANCEL buttons assign the Function type E (Exit Command)
    2. In the PAI of the Screen Call this module.
       MODULE EXIT_SCREEN AT EXIT COMMAND.
    3. Now check the OK_CODE or Sy-ucomm in this module to Leave the Screen
       MODULE EXIT_SCREEN  INPUT.
           CASE OK_CODE.
          WHEN 'EXIT' .
                LEAVE TO SCREEN 0.
          WHEN 'CANCEL'.
          ENDCASE.
       ENDMODULE.
    This will surely work.
    <b>reward if Helpful.</b>

  • Service master user exit to populate work center description

    Hi experts,
    In IW31 work order, I need a user exit to populate the work center description to PR delivery address for control key PM03 with Service Master.  I have tried and search in vain for other BADI or user exit but none works.
    Is there anyone have solution on this?
    Thanks.
    Regards
    PSK

    My abaper has tried a few IWO1_PREQ_BADI, IW010009 and WORKORDER_UPDATE.
    Operationally, user require the work centre address as the delivery address of the services due to the company has 24 physical workshop locations.
    Anyway, will also try to create the fields in AUFK table as recommended.

  • Field Exits are not working in ECC6

    Hi Friends,
    We upgraded our 4.6C system to ECC6 but after upgradation field exits are not working. What could be the reason.
    We are using GUI version-7.1 and SP-10,Release-6.
    Rewarded,
    Steve

    Hi there,
    Try this link ... it could help you.
    [http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm|http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm]
    If not, give an example.
    I did the same upgrade without problems.
    Best regards.
    Valter Oliveira.

  • User Exit RV60AFZZ not Triggered When Processing IDOC

    Hi,
    I'm writing to seek some advice on why is the user exit RV60AFZZ not getting triggered when I do a vf01 bdc inside my inbouund IDOC function module. But when I try SHDB the user exit is getting triggered normally.
    Thanks,
    Mawi

    Hi,
    Yes I'm creating invoice using delivery orders, inside the idoc function module I'm using bdc call transaction vf01 but somehow it does not trigger the user exit.
    But when I do manual vf01 in sap, the user exit is getting triggered.
    I cant figure out why this is the behavior of sap.
    Regards,
    Mawi

  • How to find if 1000 variables have user exit or not

    Hi could you please let me know  any table
    to find if a list of variables In bex have a user exit or not .
    actually i have 7000 variables and want to document if these variables have a user exit or not for Reporting Documentation
    Wuld really appreciate your help
    Thanks and regards
    Novino

    Hi,
    See following tables related to Rpeorts, so check in that tables to find the Variables and properties
    Use RSZGLOBV table and there give OBJVERS = A and VPROCTP = 3 or 4 then execute it and se eth variables, all that are SAP/Customer Exit varaibles.
    RSZELTDIR Directory of the reporting component elements
    RSZELTTXT Texts of reporting component elements
    RSZELTXREF Directory of query element references
    RSRREPDIR Directory of all reports (Query GENUNIID)
    RSZCOMPDIR Directory of reporting components
    RSZRANGE Selection specification for an element
    RSZSELECT Selection properties of an element
    RSZELTDIR Directory of the reporting component elements
    RSZCOMPIC Assignment reuseable component <-> InfoCube
    RSZELTPRIO Priorities with element collisions
    RSZELTPROP Element properties (settings)
    RSZELTATTR Attribute selection per dimension element
    RSZCALC Definition of a formula element
    RSZCEL Query Designer: Directory of Cells
    RSZGLOBV Global Variables in Reporting
    Thanks
    Reddy

  • User-exit EXIT_SAPLSPOR_001 not executed (filter spool requests)

    Hi,
    The default SAP functionality provided to control the output controller functions via auth. objects S_SPO_DEV, S_SPO_ACT & S_ADMI_FCD does not do what we would like to do.
    There's a user-exit available to implement some additional code: SPOOAUTH / EXIT_SAPLSPOR_001.
    I've activated SPOOAUTH via CMOD and added a record in table TSPOPTIONS (AUTHORITY, value CUSTOM) which was mentioned in the documentation of the function module.
    No other changes were made.
    However, this user-exit is not called when I start trx. SP01.In the selection screen I choose to show all spool request from all users for a specific time period. According to the documentation this should trigger the user-exit.
    Now the funpart begins:
    I've debugged SP01 and found that FM RSPO_CHECK_JOB_PERMISSION contains:
           IF INIT IS INITIAL.                   
             data: v like tspoptions-value.      
             call function 'RSPO_OPTION_GET'     
               exporting                         
                 name                = SPOPT_AUTH
               IMPORTING                         
                 VALUE               = v.        
             if not v is initial.                
    return value of v should be CUSTOM. However it is empty -> skips the user-exit.
    The check in FM RSPO_OPTION_GET contains:
    ALL 'RSPO_CACHE_CONTROL' ID 'AREA' FIELD 'OPTION'           ID 'OP'      
    FIELD 'GET'                
                             ID 'NAME'
    FIELD NAME                 
                             ID 'VALUE'   
    FIELD V.                   
    if sy-subrc ne 0.            
       perform write_trace1 using 'RSPO_OPTION_GET %s failed\n'  name. "#EC NOTEXT                     
       select single value from tspoptions into v where spoption = name.
    Field NAME = AUTHORITY
    Field V    = empty
    Return = 0 -> skips user-exit.
    Have I overlooked something?
    Any help would be welcome.
    Kind regards,
    Mark

    Hi Mark,
    Could be that the option value is being picked from cache/buffer (old value). You can restart the system and verify.
    Also, after putting a break-point in FM RSPO_OPTION_GET, you can edit the value of 'v' in debugger and set it to CUSTOM, just to check whether the user-exit gets executed in this case.

  • Exit button not working in Captivate 7 published output

    Hi. I am using Capivate v7 and am experiecing this problem with published output:
    I am using an Exit button that runs the standard javascript code
         javascript:window.close()
    so that the user can exit the presentation. The button works fine when I test out the presentation using Internet Explorer 8, but when I generate an output and try running the .swf file, the button does not work.
    How do I get an Exit button to work for the .swf output?
    Thanks,
    - Michael Fekete

    Yes, the close X does work 100% of the time. That's because the browser itself is just a window in the operating system. And you are commanding the window to close.
    And you might find yourself asking why that would work while the Exit button fails. And it would be that it's a security issue. Security prevents the window from closing because if a web site was nefarious, it could actually trap you by making changes and quickly closing the window and preventing you from browsing elsewhere.
    It's simple to turn off the Exit button. Just click Project > Skin Editor and clear the Close checkbox.
    Cheers... Rick

  • Captivate 4 SCORM not working, Exit Button Not working

    Hi All-
    I hope somebody can help me out because I am at the end of my rope with Captivate.
    I have a project that is in the final stages, I'm attempting to publish it to our LMS and it is not tracking properly, it is initializing the LMS and it is recording a "Started" status, but I can not get the completion status to work properly.
    I really don't want to include a quiz at the end so these are the settings I have used:
    LMS Standard: SCORM 1.2
    Report Status: Complete/Incomplete
    Report To LMS As: Percent
    Choose report Data: User Access Only
    Reporting Level: Interactions and Score
    I have tested every possible setting I can think of and the bloody thing will not work!
    Somebody please help me, because I do NOT want to have to start this over with Articulate!

    Hi Nathan
    In addition to the other advice, I believe that you need to have at least one scorable object in order for the reporting to work. For example, sometimes folks need a simple acknowlegement that the content has been viewed. I believe this is the case with SOX compliance. In cases like these, you insert a simple Button object the user clicks. Configure a quiz. You don't need actual question slides. You configure the button to report back the click.
    I didn't see anything about the Exit button, but the Exit button is unreliable at best. If you are clicking the Exit button and it's not working for you, take a look at the info below:
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • USER EXIT MB_CF001 NOT GETTING TRIGGERED

    Hi All,
    I am using EXIT_SAPLMBMB_001(MB_CF001)
    I want it to be triggered after the document has been saved but its not trigeering..
    How can I find out the reason???
    Regards
    Shilpa

    Hi,
    have you checked documentation for that enhancement? That function module is not called after goods movement creation.
    The user exit MB_CF001 includes a function module that is called up
    immediately before the COMMIT WORK when a goods movement is posted.
    How do you test that FM? Some function modules from user exits are called in UPDATE TASK so they just ignore break points. In this case you can use the following trick. You need to enter an infinite loop into your user exit. Then you can connect to this program via transaction SM50 (Program/Session -> Program -> Debugging).
    Cheers

Maybe you are looking for