Creation of settlement documents, how to influence

Hi  team ABAP,
i have a requirement to influence creation of settlement documents which get created via TA MEB1 using the pushbutton "Settlement".
There is a SMOD/CMOD project which we use as userexit.
we use SMOD lwbon003, component EXIT_SAPLWN01_003.
i dont need to do much, i just need to "enrich" those settlements with LIFNR, PRCTR and MWSKZ.
the local interface of my exit component EXIT_SAPLWN01_003 looks like following:
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(I_ARRANGEMENT) LIKE  KONA STRUCTURE  KONA
*"     VALUE(I_SETTLEMENT_VALUES) LIKE  ARRANG_VAL STRUCTURE  ARRANG_VAL
*"     VALUE(I_VARIABLE_KEY) LIKE  VAKE STRUCTURE  VAKE
*"     VALUE(I_CONDITION_RECORD) LIKE  KONP STRUCTURE  KONP
*"     VALUE(I_CONDITION_SCALE) LIKE  CONDSCALE STRUCTURE  CONDSCALE
*"     VALUE(I_T6B1) LIKE  T6B1 STRUCTURE  T6B1
*"  EXPORTING
*"     REFERENCE(E_SETTLEMENT_VALUES) LIKE  ARRANG_VAL STRUCTURE
*"        ARRANG_VAL
*"  TABLES
*"      T_VARIABLE_KEY STRUCTURE  VAKE
*"      T_CONDITION_RECORD STRUCTURE  KONP
*"      T_CONDITION_SCALE STRUCTURE  CONDSCALE
*"      T_SETTLEMENT_VALUES_MWSKZ STRUCTURE  ARRANGVALW
*"      T_SETTLEMENT_VALUES_WERKS STRUCTURE  ARRANGVALW
*"      T_ERROR_MESSAGES STRUCTURE  ARRANG_ERR
*"  EXCEPTIONS
*"      ERROR_MSG_SETTLEMENT_VALID
*"      ERROR_MSG_SETTLEMENT_INVALID
*"      FATAL_ERROR_MSG_USER_EXIT
I´ve tried a lot, but nothing really worked out, does anyone have expierience in how to use this interface correctly?
Well LIFNR works fine... but the rest.
I have tried to change MWSKZ in the one existing record i got in parameter T_SETTLEMENT_VALUES_MWSKZ .
It was displayed in the simulate screen, but no tax was calculated and posted, in the FI document the old MWSKZ showed up which was in my record BEFORE i changed it.
Next thing i tired is to add a second record into parameter T_SETTLEMENT_VALUES_MWSKZ, used some imaginary 10% tax calculated the value myself and added the record. Didnt work out either.
Im kinda stuck here, maybe someone can give me a tip.
thx for sharing your time.

Ok, Problem finally solved.
After reading the ducomentation on the EXIT a bit i could correct some problems with filling the structures properly which enabled me make him calculate tax as i want.
For the assignment of the FI-documents to the profit center we used a FI-substitution.

Similar Messages

  • How identify closed accounting period to restrict creation of billing document in sap

    Hi Experts,
    I have a requirement to identify the  closed  periods in sap based on this we need to restrict the creation of billing document .
    Actually we are working for  Brazil  client, there we have notafiscal   which created along with billing document.we are maintaining  periods monthly basis.
    When the periods are closed  accounting document not created and billing document is created  this is working fine . But over scenario along with billing document notafiscal number is also created which  is causing the problem. This notafiscal should not be created without a accounting  document.
    so my client wants to restrict creation of billing document also when these monthly periods are closed.
    Please suggest me a solution.
    Regards
    Ravi

    Helllo Ravinder,
    To check if a period is closed using the FM FI_PERIOD_CHECK.
    First calculate the period of the FI document date.
    DATA: GJAHR LIKE BKPF-GJAHR,
           MONAT LIKE BKPF-MONAT,
           POPER LIKE T009B-POPER.
    CALL FUNCTION 'FI_PERIOD_DETERMINE'
           EXPORTING
                I_BUDAT        = I_BUDAT
                I_BUKRS        = I_BUKRS
    *          I_PERIV        = ' '
    *          I_GJAHR        = 0000
    *          I_MONAT        = 00
    *          X_XMO16        = ' '
           IMPORTING
                E_GJAHR        = GJAHR
                E_MONAT        = MONAT
    *          e_poper        = poper
           EXCEPTIONS
                FISCAL_YEAR    = 1
                PERIOD         = 2
                PERIOD_VERSION = 3
                POSTING_PERIOD = 4
                SPECIAL_PERIOD = 5
                VERSION        = 6
                POSTING_DATE   = 7
                OTHERS         = 8.
    IF SY-SUBRC = 0.
    MOVE MONAT TO POPER.
            CALL FUNCTION 'FI_PERIOD_CHECK'
                 EXPORTING
                      I_BUKRS          =  I_BUKRS
    *                I_OPVAR          = ' '
                      I_GJAHR          =  I_GJAHR
                      I_KOART          = '+'
    *                i_konto          =
                      I_MONAT          = POPER
                 EXCEPTIONS
                      ERROR_PERIOD     = 1
                      ERROR_PERIOD_ACC = 2
                      OTHERS           = 3.
    ENDIF.
    Tutorial ABAP How to check that posting date belongs to closed period - ABAP Development - SCN Wiki
    I hope you help.

  • Error occurs, BAPI_ACC_DOCUMENT_CHECK for creation of accounting document

    Hi Experts,
    I am creating accounting document using BAPI_ACC_DOCUMENT_CHECK  Bapi F.M.  Profit segment number  is mandatory ( T.code KEDR)  for G/L account 411103 .when i am using this G/L account for creation of accounting document, occurs below error message.
    1.Field  Prof. Segmt  is required field  for G/L account 0495 411103
    2. Account 411103 requires an  assignment  to a CO Object.
    Please let me know how i can resolve this problem using with BAPI.
    Thanks
    Jaya Reddy

    The BAPI you have mentioned is used to check whether a posting to accounting is possible.  You can use the Bapi "BAPI_ACC_DOCUMENT_POST" for posting accounting documents.  Depending on the GL account configuration you have to pass PROFIT CENTER / COST CENTER to the BAPI.
    Regards
    vinod

  • Creation of PDF Document  using ADF Table data in new window

    Hi Guys,
    I have a requirement of creating a pdf document from adf table and it must open in a new window.I know creation of pdf document using itext pdf jar.But in my case how to write the table data to pdf and how to open it in new window.
    Thanks,
    Srinivas.

    In the TF do like this..
    view activity A-------dialog:invokePdf------->view activity B (invokePdf)
    Fragment A command button would be
    <af:commandButton action="#{pageFlowScope.PdfBean.openPDF}"
    text="Generate" id="cbpdf"
    useWindow="true"
    windowWidth="700" windowHeight="700"/>
    in the action add a return like return "dialog:invokePdf";
    Control flow outcome is "dialog:invokePdf". B would be just a empty fragment.

  • Backgorund job for automatic creation of billing document

    Dear All
    Could you advise me on how to set up a bacground job for automatic creation of billing document?
    Thanks and regards,
    Sylwia

    In standard, you cannot generate automatic billing but you can set date and time so that you can generate invoices at the specified time in bulk.  The TCode to achieve this is VF06.
    thanks
    G. Lakshmipathi

  • Bacground job for automatic creation of billing document

    Dear All
    Could you advise me on how to set up a bacground job for automatic creation of billing document?
    Thanks and regards,
    Sylwia
    Edited by: S. KOWALSKA on Jan 12, 2009 10:12 AM

    Dear Sylwia
    Please dont post the same question in multiple threads.  You are receiving feedback in the other forum.  Check this link
    [Backgorund job for automatic creation of billing document   |Backgorund job for automatic creation of billing document;
    thanks
    G. Lakshmipathi

  • Automatic creation of billing document

    Hi all,
    i want to automate creation of billing document for all the deliveries for which PGI done.
    i think we have to define a job which will call VF04.
    my question is when we do VF04 manually, we have to give selection criteria like sales org etc and then it displays the list of all the deliveries and then we have to select the deliveries manually and press collective billing/individual billing.
    so when the batch job calls the VF04, how will the batch job tells VF04 to select all deliveries and generate the invoices.
    regards
    sachin

    Hi Sonu,
    Go to VF04 and provide the inputs in the selection screen. Now save this as a variant.say ZZ_INV_DUELIST
    After saving the variant, find the program name of the tcode VF04. This can be found by going to System----Status in the menu. The resultant screen will have the program of the tcode VF04. Lets say it is BILLDUELIST
    Now go to SM36. Give some name for hte job name and click Step button
    Here you have to give the program name(BILLDUELIST) and the variant name(ZZ_INV_DUELIST). Here you can also configure whether the job should run immediately or in some schedules.
    Once this is done, you can create a delivery and then run this program in SM37. Now you can see the log of this program. It will tell you that the invoice is created
    Hope this helps

  • Error in Settlement Document - Sales order

    Hi,
    In MTO Scenario, for Bulk Sales order we have done partial Delivery and billing to customer but for COPA value appeared for line item wrong value,
    i.e.
    1. Sales order item # 100 Quantity &  Material (H1PA16006ISNKB0006) 5 MT
    2. Sales order Item # 200 Quantity & Material  (H1PA09006ISNKB0006) 1 MT
    for the above Item no 100 Partial Delivered 6th Sept' 2010,  4 MT,Settlement completed through VA88
    again the above Item no 100 partial Delivered 10th Sept' 2010 1 MT Settlement completed through VA88
    Second Sales order Item no 200 Fully Delivered 8th Sept 2010 1 MT  Settlement completed through VA88
    (Totally 3 settlement document in period 006.2010)
    Due to some reason i have done Settlement reverse but in System taken
    Sales order no 100 for 1 MT not consider 4 MT with value
    and second sale order no 200 1 MT fully.
    could u tel me what was wrong in my document and how can rectified these documents...during settlement
    Thanks & Regards
    Vinu,

    Hi Ajay,
    it is one of the requirement from our client.
    I have post this issue earlier and my client was accepted to do partial sales order settlement on daily basis, now three copa document was wrong value so i have reverse the document but system taken consider latest document,
    is their any chance to change COPA Settlement document ( Record type C)...i need add one characteristics i.e. material Group in the COPA Document
    Thanks & Regards.
    Vinu

  • Automatic creation of billing documents

    Hi all,
    i want to automate creation of billing document for all the deliveries for which PGI done.
    i think we have to define a job which will call VF04.
    my question is when we do VF04 manually, we have to give selection criteria like sales org etc and then it displays the list of all the deliveries and then we have to select the deliveries and press collective billing/individual billing.
    so when the batch job calls the VF04, how all the deliveries are selected and the selection criteria taken into account by the batch job,
    regards
    sachin

    hi,
    thanks for the reply.
    my mian question was when the batch job calls the VF04 and the slection criteria is filled using variants, then the list of deliveries is called up by VF04. my question is how will the batch job select all the deliveries for invoice creation beause whn we run the VF04 witout bathc jb ,we need to select the deliveries for billing (either collective or individual)
    reards
    sachin

  • Settlement document No. range

    hi,
    from where i can set settlement Document no. range...
    settlement document type is "SA"...  i have checked in spro. T.code is SNUM. but i havn't found any clue....
    please suggest.. without settlement document no. range i can't settle an order.
    Regards,
    Amit kushwaha

    hi,
    MURALEEDHARAN.R ,
    Thanks for sharing , besides this i have assigned controlling area to the no. range in pm spro., that error has gone.
    now i am getting a error that is
    The tax code entered is not defined in the country for this company code.
    please tell me the way how can i  define tax code in country for the controllin area.
    regards,
    Amit kushwaha

  • Reverse Settlement Document

    Hi,
    Can some one advise how to reverse the settlement document posted during the year 2007, period 4 via transaction code KO88.
    System says " Reversal not possible; last settlement was in period 006 2009"
    Thanks
    Billa2009

    Hello,
    For error:KD547,
    The posting period needs to belong to the same fiscal year, otherwise the error msg will be issued.
    Postings and reversals cross fiscal years are not supported as they do
    not comply with the idea of financial periodic accrual. See attached
    note 140672, point 3.
    It might be in an extraordinary case though, that a cross year reversal
    might be accepted for the given case by your financial auditor.
    Then a posting might be legally possible.
    However in R/3 it can likely be permited just by a modification.
    Firstly check through note 140672, it describes the options for settling
    costs from previous years without modification.
    Pls.also check relative notes:
    372630     Information: Reversal for settlement
    359814     Info: Cannot reverse settlement reversal
    140672     Info: Settle/reverse costs from previous per
    Hope the above infor. are useful for you!
    Best Regards,
    Gladys xing

  • DSD Settlement Document - Shipment

    Hi folks,
    I am trying to search in the forum but no luck so far.
    My question is, how does the settlement document link to the shipment document? As we all know, in the Settlement Cockpit, we are actually using the shipment document to create the settlement doc. However, I try to use where-used list to search all the possible fields in the settle document header table and so, I can't find shipment document there as a reference for the settlement document.
    Can anyone shed some lights to me on this? and good SAP table map will be the best for DSD.
    Thanks so much ~

    Hi siddharth sharma,
    The /DSD/SL_FSR is final setllement run, this process is executed when the settlement is finished (worklist).
    Regards,
    Enrique Lydna,

  • About settlement document

    hi pp gurus,
    how we get previous settlement documents
    i have to check accounting documents of previous settlements
    thanks in advance
    umesh

    Hi,
    You can view the previous settlement documents by KO88 tcode.
    Go to KO88>GO TO>Previous settlement
    Or for mass display you can use the below mentioned tables.
    COAS->TO find the object numbet for any order.
    COBK ->Document header.
    COEP--> For Item for the settlement documents.
    Hope this will help.
    Regards,
    kaushik

  • Delivery document how to print the BOM Parent and Child items

    Hi,
    I have a production BOM. In Delivery document how to print the Parent and Child items Item Code and Qty.At the time
    of add a delivery document Inventory stock redused only in Parent Item not child item because child item stock already reduced in issue for production.

    If you need to print both the BOM Parent and Child items, you have to create your own report. BOM is only for production if it is not Sales type.
    Thanks,
    Gordon

  • Unable to block creation of sales document from Quotation thru user status

    Dear Experts,
    I have maintained a status profile in my Quotation document through the use of user status. I have defined a status to forbid creation of sales document if the status has not yet been set to "Approved".
    However, even when the status is not yet "Approved", it still allows me to create subsequent sales document from this Quotation.
    Anything that I have missed here?

    Hi,
    It should not happen.
    Please check the Object types for which the status profile is created. It should be for either Sales Order header or Sales order Item.
    Make sure that the "create sales document" is "forbiddden" for the initial status only.
    Also please check Low- High numbers for each status.
    Hope this helps.
    Regards,
    Sharan

Maybe you are looking for