Regarding Text in Credit note

Dear All,
I have taken 5 Materials from Customers ( Returns ) and raised Retruns sales order / Delivery and Credit Memo.
In my credit note i have to get the text as " Credit note towards customer returns order number XXXXXXX "
i.e. on the print of the Credit note i have to get as above how to do this.
Can any one help on this ?
Siva

Hi ,
It can be done thru text determination. Once this is done assign output determination to the credit memo.
Then your desired text would come into output.
Text forms a basic but essential need within document processing. Using text determination, one can automatically copy a text line from one text object to another, such as from a CMD to a sales doc.
SPRO- IMG- SD- Basic Functions- Partner Determination- Define Partner Functions.
The SD module is used in the text determination for the following text objects:
•     Customer
o     Central texts: KNA1: (texts entered in Extras – Texts) in the CMD from one of the general screens
o     Accounting texts: KNB1
o     Text concerning the contact persons: KNVK: (Extras- Texts from the contact persons’ screen of the CMD
o     Sales & Distbn texts: KNVV (texts entered in Extras- Texts) in the CMD from one of the sales screens.
o     KNMT: text defined for the cust mat info record.
•     Sales Document
o     Header texts: VBBK: the preceding sales doc where text is defined as header text. For e.g., if the preceding doc is a quote copied in to a del, the VBBK refers to a quote.
o     Item texts: VBBP: preceding sales doc ITEM where the text is copied at the item level.
•     Delivery
o     Header texts
o     Item texts
•     Billing Document
o     Header texts
o     Item texts
•     MVKE: texts from the sales text screen in the CMD. For MVKE, there is only one text ID—0001 that refers to the text in the MMR text screen
•     TEXT: this refers to standard text that applies across the system (that is, it is not specific to a doc, customer, or material). The text ID in this case must be ST.  When you select this text object in the access sequence, an additional field will open for you to enter the name of the standard text. This is the name you give text from Logistics Screen, proceed to Tools, Word Processing, Standard Text (SO10)
Reward points if helpful,
Regrds,
vamsi. P

Similar Messages

  • Text blank in Customer line item display for credit notes

    Dear SD gurus,
    We are creating credit memo request in SAP and credit notes are created later on. Now when we look the customer line items, the credit note number is seen over there. But the text field is coming blank. We want to enter some text in the credit memo request and the same should be displayed in the customer ledger i.e., customer line items.
    Kindly suggest some solution.
    Thanks in advance.

    Hi
    Can you elaborate more? Is it that the text is not getting copied form Refernce document to subsequent document ?
    Regards
    Deepak

  • CREDIT NOTE PROBLEAM

    I have a scenario:
    When my user creating sales order in va01
    10. S001
    20 S002
    30 Z TRANS
    LINE ITEM 10 AND 20 ARE PRODUCTS.DELIVERY RELATED BILLING.ITEM CATEGORY TAN
    LINE ITEM 30 TEXT ITEM OR NON STOCK ITEM. (TRANSPORT THEY ARE CRETING AS LINE ITEM .ORDER RELATED BILLING. ITEM CATEGOY TAX.(IN ITEM CATEGORY BILLING RELEAVENCE THEY PUT (A)
    IN VOV8 SALES DOCUMENT
    OR DELIVERY RELATED BILLING F2
    ORDER RELATED BILLING ZF2. MAINTAINED IN OR.
    S001 AND SEPARTE PRICE MAINTAINED MANUALLY IN SALES ORDER.
    S002 SEPARTE PRICE MAINTAINED MANUALLY IN SALES ORDER.
    ZTRANS ALSO MAINTAINTED MANUALLY.
    IN SALES ODER SYSTEM ADDING TOTAL PRICE.
    10020050=350
    10    20     30 LINE ITEMS.
    SAME THRE ITEMS COPIED INTO DELIVERY
    10 10 AND USER ENTER QTY,
    20
    30…..PICKING WILL GO INTO GRAY MODE.
    WHEN IT COMES BILIING SYSTEM CRETING TWO BILLING DOCUMENT.
    10029 LINE TIEM 10NAD 20-=100+200=300 ONE BILLING DOCUMENT
    10030 LINE ITEM 30 50 SEPARETE BILLING DOCUMENT.
    HOW IT IS HAPPENING INVOIVE SPILT.
    I AM THINK VOV8 CONFIGARATION.(10AND 20 ARE DELIVERY RELATED AND 30 IS ORDER RELATED.
    MY USER CRETING RETURN ORDER WITH REF TO SALES DOCUMENT.
    WHEN CRETING RETURN WITH REF TO SALES ORDER.
    SYSTEM COPYING ALL THE 10, 20 AND 30.
    THEN PGR. Z TRANS GRAY MODE.
    WHEN THEY ARE CREATING. CREDIT NOTE  SYSTEM POPLATING LINE ITEM 10 AND 20 ONLY NOT 30 ZTRANS.
    WHAT IS POSSIBLE REASONS.
    IN RETURNS INTM CATEGORY REX ORDER RELATED BILLING.
    ZRE VOV8  FOR 10 AND 20 THEY MAINTAINED DELIVERY RELATED BILLING (PGR)
    ORDER RELATED BILLING FILED IT BLANK.
    IF I MAINTIAN BILLING TYPE IN ZRE (VOV8) WILL SYSTEM POPULATE LINE ITEM 3O
    WHERE I MISSED THE SITTING ?

    hello, friend.
    by net value, are you referring to the Net Value in the order overview (header)?  if so, this is the way SAP presents the order amount.  the net value does not include taxes and just shows you the gross price + surcharges - discounts.  SAP presents taxes in the condition tabs.
    you will also observe this when doing SIS, standard reports, etc..
    regards.

  • Credit Note to be approved and released by Maanager before allow to print

    User wanted all credit note to be viewed and released by higher authority before allowing to proceed with printing.
    If there any configuration I can set for this task?
    if yes, can anyone guide me on the setup?
    Thanks a million

    Hi,
    You can achieve the same through User Status and following developments.
    Define User Status
    SPRO----> Cross Application Component -
    > SAP Business Partner ---> Business Partner ---> Basic Settings ---> Status Management -
    > Define Status Profile (T-Code BS02)  Here you have to create on Status profile with 1. Approved 2. Rejected.
    Assign this status profile to your documebt type details screen T-code VOV8,
    Now you have to create Authorization Key for the User who will change the status, and assign in you it to ur status profile.
    Now for printout
    Create one routine with the help of ABAPer T-code VOFM  select Requirement ---Output
    otherwise write Logic that if user status is Approved then only systmem will give printout.
    Functions to use for this
    "example logic"
      IF flg_set = 1.
        CALL FUNCTION 'SSF_OPEN'
          EXPORTING
            user_settings      = ' '
            output_options     = w_output
            control_parameters = w_control
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
      CALL FUNCTION g_fm_name
        EXPORTING
          w_name_1           = w_name_1
          user_settings      = ' '
          output_options     = w_output
          control_parameters = w_control
        TABLES
          i_out              = i_out
          i_name_1           = i_name_1
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      IF flg_set = 1.
        CALL FUNCTION 'SSF_CLOSE'.
      ENDIF.
    *ENDFORM.                    " F_CALL_SMART_FORM
    PERFORM f_select_data.                             " Subroutine for all select statements
    PERFORM f_build_out_table.                         " Subroutine to build output table
    PERFORM f_text_conversion.                         " Subroutine to call text ID to text conversion
    PERFORM f_call_smart_form.                         " Subroutine to call Smart form
    ENDFORM.                    " ENTRY_SD13
    for Identifiying which User Status is marked in document during calling of routine.
    Get the Object Number (OBJNR) from VBAK for SD and PRPS for PS and Pass the OBJECT NO (OBJNR) into Function Module ALM_ME_READ_USER_STATUS,  based on that we can write logic in our FS if user status is not approved or according to our requirement then system will not allow to take printout.
    Regards
    Shambhu Sarkar

  • Debit & credit note for vendors

    Hi,
    Please tell me how to post debit and credit note for vendors( T-code) and how to take a voucher print of debit note, Because we are not able to find  the particular  correspondence for debit note in OB78.Please assist.
    Regards,
    D

    Hi,
    Please any one help me where should I write the narration for cash journal scrren(FBCJ).If I write it in the addit text but it is not comming in the printing vouchar,
    Regards,
    D

  • Creating Credit Note based on Invoice

    HI there,
    I am trying to create a Credit Note through the DIAPI using VB. This Credit Note must be linked to the Invoice 88 for example :
      Try *
                'Get the required business object *
                ''Dim oCreditDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes)*
                Dim queryString As String*
                Dim oRecSet As SAPbobsCOM.Recordset*
                oRecSet = oCompany.GetBusinessObject(300)*
                queryString = "SELECT T0.CardCode from OINV T0 where T0.DocNum = 88 "*
                oRecSet.DoQuery(queryString)*
               Dim oCreditDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes)*
                'Set the business partner code*
                oCreditDoc.CardCode = oRecSet.Fields.Item(0).Value*
                'set the documents due date -mandatory*
                oCreditDoc.DocDueDate = Now*
                'add first line on invoice*
                'use the SO order specified in the text box *
                'as a base document*
                oCreditDoc.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oInvoices*
                oCreditDoc.Lines.BaseEntry = CInt("88")*
                oCreditDoc.Lines.BaseLine = 0*
                'add the new invoice document*
                lRetCode = oCreditDoc.Add*
                'check return code*
                If lRetCode <> 0 Then*
                    oCompany.GetLastError(lErrCode, sErrMsg)*
                    MsgBox("Error : " & lErrCode & " : " & sErrMsg)*
                Else*
                    'store newly created object code in a new string*
                    '(could have stored it in OrdCodeStr)*
                    Dim OrdCodeStr2 As String*
                    OrdCodeStr2 = ""*
                    oCompany.GetNewObjectCode(OrdCodeStr2)*
                    MsgBox(" Created Credit Note : " & OrdCodeStr2)*
               End If*
            Catch ex As Exception*
                MsgBox("Exception. Connect: " & ex.Message)*
            End Try*
    I am getting an "Item code missing" error. Does this mean i must set up each and every line to credit? What if there are millions of lines? Can we not just set a BaseEntry and BaseType for the document as a whole so it knows which Invoice needs to be credited completely?
    Kind regards,
    Greeshma
    p.s. i tried to get this to display as code but seems this editor is either confusing me or it doesnt work! sorry. when i find the right person to complain about it to i will!
    Edited by: Greeshma Gulab on Nov 18, 2009 11:13 AM
    Edited by: Greeshma Gulab on Nov 18, 2009 11:15 AM

    Hi,
    I am not able to make out ur code because of the formating problem, but anyways check the below thread, it might be helpful to u..
    Create Credit Memo based on A/R Invoice
    Vasu Natari.

  • Text value is not getting displayed in Query designer !!

    Dear experts..,
    i have created a new query in query designer using my info provider and then selected one field in default value and then trying to restrict that particular field while selecting the restriction in query designer am getting the exact text value but after generating the report instead of text value , key value is getting displayed....so how can i get text instead of key value??
    please help me friends....
    i have posted in OSS mesage also...i got a reply like...even i didnt understand his reply too...what he is trying to say?
    whether can i get text display or not???
    can any one help me in this regard???
    SAP Reply----
    Hello kumar,
    After another analysis I have to inform you about general concept of
    "compounded characteristics".
    A compounded characteristic bounds two characteristics. The technical
    name is generated by both technical names of the two characteristics
    combined by two underlines "__".
    An individual text is only available for one single combination of both
    characteristics.
    Example:
    =======
    Compounded characteristic "Famous family name" is a combination of
    characteristic "COUNTRY" & "ETHNIC". Technical name: COUNTRY__ETHNIC
    Values for Country: USA, Australia
    Values for Ethnic: Asian, Latino
    Possible value combinations with individual text:
    USA & Asian; text: "Ling"
    USA & Latino; text: "Sanchez"
    Australia & Asian; text: "Chu"
    Australia & Latino; text: "Garcia"
    (Keep in mind the individual text only valid for the specific
    combination.)
    In analogy to the issue that you reported, you want to restrict this
    compounded characteristic. In the window where you select the restrictedvalue (called Selector) you'll see on the left hand side all available
    combinations of the characters with an individual text.
    You select family name "Chu" and drag'n'drop it to the right side.
    Actually you can only restrict the right compounded characteristic. In
    our example you would restrict on characteristic "ETHNIC" with value
    "Asian". (When you switch on technical names this comes more clear). Thetext "Chu" is displayed in the context of Selector because you selected
    value combination Australia & Asian. But in the end it's just a
    placeholder(!) for any combination of characteristic "ETHNIC" and value
    #Asian#; in our example it could be USA & Asian "Ling" or Australia &
    Asian "Chu").
    By leaving the Selector the individual text is gone because now the
    context is lost between the two characteristics. You have just a
    restriction on characteristic "ETHNIC" with value "Asian". An individualtext can't be displayed because the compounded characteristic is not
    specified for this restriction.
    You're right, it is confusing when "loosing" the text of a restriction.
    But accoring to the concepts of the compounded characteristics it
    is a correct behavior.

    Hi anandkumar,
    I belive this issue can be resolved by changing the  Query proprties for the perticular field.
    Kindly check the Field proerties in query designer and ensure that Text is enabled ather than Key.
    __Field property check up:__Go to query designer->click onn the field-> Right hand side in properties click on display tab-> select Text in drop down menu of Display as tab.
    FURTHER CHECK UP: check the master data avaiulability for the perticular info object, if masterdata is not available, do the text data for txt data availability in report level.
    Hope this helps you!!
    Best Regards,
    Maruthi

  • Free goods in lieu of Rebate Credit Note

    Hi Gurus,
    Can we have the option of Free Goods Settlement instead of Rebate Credit Note at the time of Rebate Settlement.
    Your reply is highly appreciated.
    Sadanandam Kasarla

    Hi Sadanandam kasarla
    Generally if you want to  issue free goods then you need to create a sales order and you have to deliver the stock from the storage location also. The inventory level will come down
    But if you are doing the rebate settlement. then you will be using a Dummy material to create the sales order and then  you will be doing billing . Finally only the rebate value will be settled to the customer .
    Regards
    Srinath

  • Credit Note in case of return scenario

    Hi,
    In case of return scenario, credit note is issued with reference to return order or return delivery?
    I am unable to see the copy control setting in IDES for RE(Return Order) to G2(Credit Memo).
    Could any one please let me know the setting for the same (Header and item).
    Regards
    Suman

    Hi Suman,
                 As for the standard in the IDES,the Credit memo will be created with reference to the Creditmemeo request because of that RE to G2 copy control setting may not avail.
    You copy the settings same as Creditmemo request(CR) to Credit memo (G2), You just change the name CR in to RE it will work.
    -->Other wise you can use Credit for returns RE document type to create credit memo for return order RE for this copy control avail in the IDES t.code VTFA.
    I hope it will help you
    Regards,
    Murali.
    Edited by: Murali Mohan.T on Feb 27, 2008 11:07 AM

  • Text element is not getting printed in the output

    Hi all,
    I'm trying to print address from table KNA1in address window through a text element.
    The corresponding code being :
    In Delivery Prg,
    Data : lv_kna1 type STANDARD TABLE OF kna1,
              lv_adr6 type STANDARD TABLE OF adr6.
    DATA : WA_ADR6 TYPE ADR6.
      SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBPA-KUNNR.
      SELECT SINGLE * FROM ADR6 INTO WA_ADR6 where ADDRNUMBER = kna1-adrnr.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DELIVERY_ADDRESS'
       WINDOW                         = 'DELIVADR'
    and calling the same text element 'DELIVERY_ADDRESS' as follows in the Script:
    /E           DELIVERY_ADDRESS
    /:           IF &LV_KNA1-TELF1& <> &SPACE&
    IL           Tel.: &LV_KNA1-TELF1&
    /:           ENDIF
    /:           IF &LV_KNA1-TELFX& <> &SPACE&
    IL           Fax : &LV_KNA1-TELFX&
    /:           ENDIF
    /:           IF &LV_ADR6-SMTP_ADDR& <> &SPACE&
    IL           E-mail : &LV_ADR6-SMTP_ADDR&
    /:           ENDIF
    But,this text element is not printing in the output.
    Any pointer on this would be of great help.
    Regards,
    Vamsee Priya.

    yes, it is.
    I'm trying to get the e-mail address from adr6 table with the corresponding address number  from table kna1.
    so I created two tables as below:
      Data : lv_kna1 type STANDARD TABLE OF kna1,
             lv_adr6 type STANDARD TABLE OF adr6.
    DATA : WA_ADR6 TYPE ADR6.
      SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBPA-KUNNR.
      SELECT SINGLE * FROM ADR6 INTO WA_ADR6 where ADDRNUMBER = kna1-adrnr.
    now, I'm trying to fill e-mail adress from lv_adr6. but the problem is lv_adr6 is not getting filled.
    data is coming to work area wa_adr6.
    SAP is not allowing me to write the below statement:
    SELECT SINGLE * FROM ADR6 INTO LV_ADR6 where ADDRNUMBER = kna1-adrnr.
    Now, will any move-corresponding statement from work area to its table works?? Is that logically correct??

  • Text Field is not displaying in MIRO , Screen Variant SHD0

    Hi,
    All Experts.
    In my client TEXT field is not there in MIRO T.code. I heard Screen Variant can be a good option for adding field in MIRO.
    Or is there any work around to bring TEXT ( SGTXT ) field in MIRO ?
    I gone through the already posted threads regarding this, unfortunately no any perfect solution found.
    Experts help will be great on this.
    Regards,
    Sharvari Joshi.

    Hi,
    Go to SHD0 and enter transaction code as MIRO
    Then in first tab "Standard variant", sub tab "Standard Variants", do F4 on the field "Name"
    You will get the list of the standard Variants for MIRO.
    Then select one of them and press enter. It the "Activate Match Stick" is enables, that means that standard variant is not activated yet. Similarily check for other standard variants of MIRO.
    If all the standard variant have "Activate Match Stick" enabled, then SAP MIRO should be showing SGTXT as a part of standard SAP.
    Regards,
    SDNer

  • Text captions are not displayed as per timeline settings after publishing.

    Hi All,
    I am using Adobe Captivate 4. I have provided different start times in timeline settings for 4 text captions. When i preview my slide, it displays well. But when i publish it and try to view it, it is only dsiplaying the first text caption and the other text captions are not at all displayed.
    Request to help in this regard.
    Many Thanks,
    Kranthi

    Hi Rick,
    Thanks for your help.
    Yeah..you are correct...I do have buttons in my slide.
    When i adjusted the start time for my buttons after my text captions....it perfectly works fine...
    Many Thanks,
    Kranthi

  • Regarding text messaging, if I send a message from my iPhone, the reply goes to my ipad, or mini ipad. How can I fix this?

    Regarding text messaging, if I send a message from my iPhone, the reply goes to my ipad, or mini ipad. How can I stop this from happening?

    Go to Settings/ Messaging/ Send & Receive on each device to set the contact points to be reached at, and to set the "from" address when you start a new message.  It sounds like your iPhone might be sending messages out as one thing (e.g. an iCloud address) but set to not receive replies only to your phone number.  Make sure you review settings on each device since you may, or may not, want to have them common.

  • Not able to cancel the Credit Note due to "Net Value could not be 0" error

    Hi Gurus
    We have created the Credit Memo Request with ref. to invoice and PGR , and  against that Credit Memo Request entered Credit Note .
    Credit Note is showing 0 Net Value and no accounting document generated .
    Further system is not allowing to cancel the billing document i.e. credit note .
    Pls. Suggest how can we cancel the billing document i.e. credit note and recreate it.
    Regds
    PR

    I wrote that system is not allowing us to create the cancel document with 0 net value.
    I need to cancel this document , so that i can recreate new one.
    Regards
    PR

  • SQL Query for full paid invoices and payed out credit notes

    Hi alltogether,
    I have some problems with a sql query.
    I want to export all closed (full paid) invoices and credit notes in a table with the paid date.
    The problem is that I have several internal reconciliations for one invoice or credit note.
    So with my current query I get all these dates in the result but only for invoices, not for credit notes.
    I only need the last internal reconciliation date as payment date for all invoices and credit notes where the open amount is 0.
    In SAP B1 the finance team has service invoices and credit notes imported out of an ERP system.
    These documents are marked with an 'Y" in the coloumn "U_I_Imported" in the table "OINV" or "ORIN".
    SELECT
    OINV.DocTotal - OINV.PaidToDate as Offen, OINV.NumAtCard, OINV.U_I_Imported, ORCT.DocDate as 'Zahlungsdatum'
    SELECT
    OINV.DocTotal - OINV.PaidToDate as Offen, OINV.NumAtCard, OINV.U_I_Imported, ORCT.DocDate as 'Zahlungsdatum'
    FROM
    OJDT inner join
    ORCT on OJDT.BaseRef = ORCT.DocNum inner join
    RCT2 on ORCT.DocNum = RCT2.DocNum inner join
    OINV on RCT2.BaseAbs = OINV.DocEntry
    where
    OINV.DocTotal - OINV.PaidToDate = 0 and  OINV.U_I_Imported = 'Y'
    group by
    OINV.NumatCard, OINV.DocTotal - OINV.PaidToDate, OINV.U_I_Imported, ORCT.DocDate
    order by
    ORCT.DocDate
    I hope you can help me.
    Kind regards,
    Max

    The solution for my problem:
    select
    OINV.DocTotal - OINV.PaidToDate as 'Offen', OINV.CardCode as 'Kundennummer', OINV.NumAtCard as 'DIAMOD Rechnungsnummer', OINV.DocNum as 'Dokumentennummer',  max(ORCT.DocDate) as 'Zahlungsdatum', case when ORCT.DocCurr = (select MainCurncy from OADM) then RCT2.DcntSum else RCT2.DcntSumFC end as 'SkontoRechnungswährung',
        RCT2.DcntSum as 'SkontoFirmenwährung'
    from
        JDT1 inner join
        OJDT on JDT1.TransId = OJDT.TransId inner join
        ORCT on OJDT.BaseRef = ORCT.DocNum inner join
        RCT2 on ORCT.DocNum = RCT2.DocNum inner join
        OINV on RCT2.BaseAbs = OINV.DocEntry
    where
    JDT1.TransType in ('24') and
    OINV.U_I_Imported = 'Y' and
    OINV.DocTotal - OINV.PaidToDate = 0
    group by
    OINV.NumAtCard, OINV.DocNum, OINV.CardCode, OINV.DocTotal - OINV.PaidToDate, ORCT.DocCurr, RCT2.DcntSum, RCT2.DcntSumFC
    union all
    select
    OINV.DocTotal - OINV.PaidToDate as Offen, OINV.CardCode as 'Kundennummer', OINV.NumAtCard as 'DIAMOD Rechnungsnummer', OINV.DocNum as 'Dokumentennummer',  max(OITR.ReconDate) as 'Zahlungsdatum',
        0.0 as 'SkontoRechnungswährung',
        0.0 as 'SkontoFirmenwährung'
    from
    OITR inner join
    ITR1 on OITR.ReconNum = ITR1.ReconNum inner join
    OINV on ITR1.SrcObjAbs = OINV.DocEntry
    where
    OINV.DocTotal - OINV.PaidToDate = 0 and ITR1.SrcObjTyp = 13 and OINV.U_I_Imported = 'Y'
    group by
    OINV.NumatCard, OINV.DocNum, OINV.CardCode, OINV.DocTotal - OINV.PaidToDate
    union all
    select
    ORIN.DocTotal - ORIN.PaidToDate as Offen, ORIN.CardCode as 'Kundennummer', ORIN.NumAtCard as 'DIAMOD Rechnungsnummer', ORIN.DocNum as 'Dokumentennummer',  max(OITR.ReconDate) as 'Zahlungsdatum',
        0.0 as 'SkontoRechnungswährung',
        0.0 as 'SkontoFirmenwährung'
    from
    OITR inner join
    ITR1 on OITR.ReconNum = ITR1.ReconNum inner join
    ORIN on ITR1.SrcObjAbs = ORIN.DocEntry
    where
    ORIN.DocTotal - ORIN.PaidToDate = 0 and ITR1.SrcObjTyp = 14 and ORIN.U_I_Imported = 'Y'
    group by
    ORIN.NumatCard, ORIN.DocNum, ORIN.CardCode, ORIN.DocTotal - ORIN.PaidToDate

Maybe you are looking for