Problem linking A/R invoice table INV1 and Credit memo table RIN1

Hi Experts,
I have developed a sales report by picking data from the A/R invoice table INV1, BP partner table OCRD and Charts of accounts table OACT and the report is working fine. The only problem is I am having a challenge linking the above tables with the A/R Credit memo table RIN1. I want the linkage that is in case an A/R invoice is cancelled by raising an A/R credit memo, the same is not reflected on the sales report, kindly help.
Patrick

Hi Gordon,
Sorry, I did both the report and relationships in crystal but if I do a query in a view it is something like
SELECT     dbo.OACT.AcctCode, dbo.OACT.AcctName, dbo.INV1.ItemCode, dbo.INV1.Dscription, OCRD_1.CardCode, OCRD_1.CardName
FROM         dbo.OCRD CROSS JOIN
                      dbo.OACT INNER JOIN
                      dbo.INV1 ON dbo.OACT.AcctCode = dbo.INV1.AcctCode INNER JOIN
                      dbo.OCRD AS OCRD_1 ON dbo.INV1.BaseCard = OCRD_1.CardCode
the problem is incorporating the credit memo table coz if i include it I end up with wrong figures, hope this will help you guide.
Patrick

Similar Messages

  • Get a summary of items by a query with 2 tables (INV1 and RIN1)

    Hi!
    I have a question about SQL-queries.
    When a customer pay an item (sum 100.- Euro), this is written in table INV1.
    SELECT T0.DocEntry, T0.ObjType, T0.DocDate, T0.ItemCode, T0.Dscription, T0.LineTotal,T0.SlpCode FROM INV1 T0
    show me all entries about all sold items. Thats fine!
    When the same customer give back some of this sold item (sum 50.- Euro), this is written in RIN1.
    SELECT T0.DocEntry, T0.ObjType, T0.DocDate, T0.ItemCode, T0.Dscription, T0.LineTotal,T0.SlpCode FROM RIN1 T0
    shows me the sum of all items that get back.
    For a statistc i want evaluate a sum of real sold items (sum of money).
    Now, i want create a query that evaluate a sum of the table INV1 and RIN1 and want show the result.
    Example for a result:
    DocEntry       ObjType       DocDate       ItemCode       Descriton       LineToal
    1       13       01.01.06       11111       ItemOne       100.- Euro
    2       14       05.01.06       11111       ItemOne       - 50.- Euro
                                              total sum:               50.- Euro
    is there a way that show me this result (query, form, etc.)?
    How can i realize it?
    Thanks a lot!
    Juergen

    I'm a SQLServer newbie from the Oracle world, so there may be a simpler way to do this, but the following will return all the data that you need, although it may not be pretty:
    SELECT 'Detail' LineType, T0.DocEntry, T0.ObjType, T0.DocDate, T0.ItemCode, T0.Dscription, T0.LineTotal,T0.SlpCode FROM INV1 T0
    union all
    SELECT 'Detail' LineType, T0.DocEntry, T0.ObjType, T0.DocDate, T0.ItemCode, T0.Dscription, T0.LineTotal,T0.SlpCode FROM RIN1 T0
    union all
    select 'Total' LineType, null DocEntry, null ObjType, null DocDate, null ItemCode, null Dscription, sum(LineTotal) LineTotal, null SlpCode from
    (SELECT T0.DocEntry, T0.ObjType, T0.DocDate, T0.ItemCode, T0.Dscription, T0.LineTotal,T0.SlpCode FROM INV1 T0
    union all
    SELECT T0.DocEntry, T0.ObjType, T0.DocDate, T0.ItemCode, T0.Dscription, T0.LineTotal,T0.SlpCode FROM RIN1 T0 ) x
    order by 1,2

  • How to extract invoice and credit memo total by BP refernce number

    I am very new to the system and need to extract a report that lists all invoices and credit memos from my company for a specific client based on date and/or client po number(BP reference number)  I want to view all the line items by sku for each invoice and cm in one report for qty, dollar amount, issue date and remarks.  I also need the cm to be listed as negative for qty and dollars.  I tried to go through the query wizard but am unsure as to the data tables I need to pull this info from.  Any help would be much appreciated.
    ~Cheers
    Elizabeth

    Hi Elizabeth.......
    Try this..........
    Select T0.DocNum, T0.DocDate, T0.CardName, T1.Dscription, T1.Quantity, T0.DocTotal,
    T1.LineTotal From OINV T0 Inner Join INV1 t1 On T0.DocEntry=T1.DocEntry
    Where T0.DocDate>='[%0]' And T0.DocDate<='[%1]'
    Union All
    Select T0.DocNum, T0.DocDate, T0.CardName, T1.Dscription, T1.Quantity, T0.DocTotal,
    T1.LineTotal From ORIN T0 Inner Join RIN1 t1 On T0.DocEntry=T1.DocEntry
    Where T0.DocDate>='[%0]' And T0.DocDate<='[%1]'
    Regards,
    Rahul
    Edited by: RAHUL MOUNDEKAR on Aug 1, 2011 11:42 PM

  • - Query to Join AR Invoice & AR Credit Memo table -

    Dear All,
    I've a query which shows the sales figure monthly in a year (eg: from Jan - Dec). And my issue is how can i join the RIN1 (credit memo table) with the INV1 (invoice table) so the sales figure will be more accurate. Please advise.
    Cheers,
    serene

    Dear Serene,
    Yes, the first line is the sum of invoices and
    next line is the sum of Credit memos.
    Here is the modified query for month wise
    SELECT DISTINCT T0.CardCode [Customer],
    T1.CARDNAME [NAME], (SELECT ISNULL(SUM(I.DocTotal),0)
    FROM INV1 I1 INNER JOIN OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Day(I.DocDate) = Day(GetDate())
    AND Month(I1.DocDate) = Month(GetDate()) AND
    Year(I1.DocDate) = Year(GetDate())) [Daily - Today],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1
    INNER JOIN OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 1
    AND Year(I1.DocDate) = Year(GetDate())) [Jan],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND
    Month(I.DocDate) =2 AND Year(I1.DocDate) = Year(GetDate())) [Feb],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 3 AND
    Year(I1.DocDate) = Year(GetDate())) [Mar],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) =4
    AND Year(I1.DocDate) = Year(GetDate())) [Apr],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 5
    AND Year(I1.DocDate) = Year(GetDate())) [May],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 6
    AND Year(I1.DocDate) = Year(GetDate())) [Jun],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) =7
    AND Year(I1.DocDate) = Year(GetDate())) [Jul],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 8
    AND Year(I1.DocDate) = Year(GetDate())) [Aug],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 9
    AND Year(I1.DocDate) = Year(GetDate())) [Sep],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 10
    AND Year(I1.DocDate) = Year(GetDate())) [Oct],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 11
    AND Year(I1.DocDate) = Year(GetDate())) [Nov],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry
    WHERE I.CardCode = T0.CardCode AND Month(I.DocDate) = 12
    AND Year(I1.DocDate) = Year(GetDate())) [Dec],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM INV1 I1 INNER JOIN
    OINV I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND (Month(I.DocDate) >=4) AND
    Year(I.DocDate) = Year(GetDate())) [Yearly - Current Year]
    FROM dbo.OINV T0 LEFT OUTER JOIN OCRD T1
    ON T1.CARDCODE=T0.CARDCODE GROUP By T0.CardCode,
    T1.CARDNAME
    union SELECT DISTINCT T0.CardCode [Customer],
    T1.CARDNAME [NAME],
    (SELECT ISNULL(SUM(I.DocTotal),0) FROM rin1 I1 INNER JOIN
    orin I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Day(I.DocDate) = Day(GetDate()) AND
    Month(I1.DocDate) = Month(GetDate()) AND
    Year(I1.DocDate) = Year(GetDate())) [Daily - Today],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =1 AND Year(I1.DocDate) = Year(GetDate())) [Jan],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN OrIN I ON
    I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =2 AND Year(I1.DocDate) = Year(GetDate())) [Feb],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =3 AND Year(I1.DocDate) = Year(GetDate())) [Mar],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =4 AND Year(I1.DocDate) = Year(GetDate())) [Apr],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =5 AND Year(I1.DocDate) = Year(GetDate())) [May],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =6 AND Year(I1.DocDate) = Year(GetDate())) [Jun],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =7 AND Year(I1.DocDate) = Year(GetDate())) [Jul],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =8 AND Year(I1.DocDate) = Year(GetDate())) [Aug],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =9 AND Year(I1.DocDate) = Year(GetDate())) [Sep],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =10 AND Year(I1.DocDate) = Year(GetDate())) [Oct],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =11 AND Year(I1.DocDate) = Year(GetDate())) [Nov],
    (SELECT ISNULL(SUM(I.DocTotal *-1),0) FROM rin1 I1 INNER JOIN
    OrIN I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND Month(I.DocDate) =12 AND Year(I1.DocDate) = Year(GetDate())) [Dec],
    (SELECT ISNULL(SUM(I.DocTotal * -1),0) FROM INV1 I1 INNER JOIN
    orin I ON I1.DocEntry = I.DocEntry WHERE I.CardCode = T0.CardCode
    AND (Month(I.DocDate) >=4) and Year(I.DocDate) = Year(GetDate())) [Yearly - Current Year]
    FROM dbo.Orin T0 LEFT OUTER JOIN OCRD T1 ON
    T1.CARDCODE=T0.CARDCODE GROUP By T0.CardCode, T1.CARDNAME
    Regards,
    Bala
    Edited by: Balakumar Viswa on Apr 28, 2009 3:17 PM

  • Netting Invoices and Credit Memos in Business One

    I found one thread related to invoices and credit memos, but the database was MAS not SAP. In creating and calculating sales commissions, the report must contain both invoices and credit memos. How do I get common and similar fields (e.g., doc#, document total) from the two tables (OINV, ORIN) to display in the same column?
    I am new to Crystal Reports and am self-taught at the moment (training TBD).

    make sure you join the tables with outter join to get both docs
    you can create a formula that will retreive either field based upon specific criteria,
    are the fields the same in the tables or are they different
    one table has doc# the other has docid?
    i gather they are different(if they are) by type of doc?\
    if so you can create a formula
    if doctype ='a' then else if doctype='B' the docid
    etc.

  • Can we join a table structure  and a transparent table?

    Pls let me know, whether we can join a table structure  and a transparent table and how?

    Hi rich,
         Since i dont have ur id ,iam posting my issue on this ,can u please help me on the below issue.
    below i have a set of code which would sends email along with attachtment .
    iam getting the XLS attachtment perfectly ,but for TXT attachtment there was problem with formating all the records are formated in single line .
    a solution on this would be helpfull.
    Thanks,
    vinay .
    FUNCTION Z_SHANKAR_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(EMAILID)
    *"     VALUE(SUBJECT)
    *"     VALUE(ATYPE)
    *"  TABLES
    *"      ATTACH_FILE STRUCTURE  SOLISTI1
    *"      BODY OPTIONAL
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
      DATA OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
      DATA OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as binary objects.
      DATA   OBJBIN TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                     WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as ASCII objects.
      DATA OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
      DATA  RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE .
    This structure must contain the attributes of the document to be sent.
      DATA: DOC_CHING LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
    Create the internal table for body , subject
      DATA: IT_BODY LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    *changes added to the code by shankar.
    constants: x(1) type X value '0A'.
    *End of changes to the code
    CONSTANTS: con_cret TYPE C VALUE cl_abap_char_utilities=>horizontal_tab,
               con_tab TYPE C VALUE  cl_abap_char_utilities=>cr_lf,
               con_new type c value  CL_ABAP_CHAR_UTILITIES=>NEWLINE.
    Move Body to Internal Table (body into it_body)
      LOOP AT BODY .
        MOVE BODY TO IT_BODY .
        APPEND IT_BODY .
      ENDLOOP.
      DOC_CHING-OBJ_DESCR = SUBJECT.   "Subject of the Email
    Move the Subject and Body to OBJTXT
      OBJTXT[] = IT_BODY[].
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHING-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'RAW'.
    APPEND OBJPACK.
    Convert IT to Excel format
    IF ATYPE = 'XLS' .
      LOOP AT ATTACH_FILE .
        REPLACE ALL OCCURRENCES OF '#' IN ATTACH_FILE WITH con_cret. "  INTO objbin.
        CONCATENATE  ATTACH_FILE con_tab INTO objbin.
        APPEND  objbin.
      ENDLOOP.
    ELSEIF ATYPE = 'TXT' .
      LOOP AT ATTACH_FILE .
        REPLACE ALL OCCURRENCES OF '#' IN ATTACH_FILE WITH con_tab. "  INTO objbin.
        CONCATENATE con_new ATTACH_FILE-line  INTO OBJBIN-line .
    *changes done by shankar
    *CONCATENATE ATTACH_FILE-line con_new INTO OBJBIN-line .
        APPEND OBJBIN .
      ENDLOOP.
    ENDIF.
    ****End-Code Excel Format .
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = subject. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = TAB_LINES.
    objpack-doc_type   = ATYPE.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'TEST'. "Attachment File Name
    objpack-doc_size   = TAB_LINES * 255.
    APPEND objpack..
    reclist-receiver = EMAILID.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
       DOCUMENT_DATA                    = DOC_CHING
       PUT_IN_OUTBOX                    = 'X'
       COMMIT_WORK                      = 'X'
    IMPORTING
      SENT_TO_ALL                     =
      NEW_OBJECT_ID                   =
      TABLES
        PACKING_LIST                    = OBJPACK
       OBJECT_HEADER                    = OBJHEAD
       CONTENTS_BIN                     = OBJBIN
       CONTENTS_TXT                     = OBJTXT
       RECEIVERS                        =  RECLIST
    EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       OPERATION_NO_AUTHORIZATION       = 4
       OTHERS                           = 99 .
    ENDFUNCTION.

  • STANDARD SMARTFORM FOR CUSTOMER INVOICE AND CREDIT MEMO

    GUD MORNING ,
    I WANT THE STANDARD SMART FORM FOR THE CUSTOMER INVOICE AND CREDIT MEMO RELATED TO FI FOR SALES.
    ARUN REDDY I

    Hi,
    Search For Standard or Customise Smartform
    *&  Report       : ZTEST_SEARCH_FORMNAME
    *&  This program will help you to search the SMARTFORM either Standard
      Or Customer created in your compatiable language.
    REPORT  ZTEST_SEARCH_FORMNAME  .
    TYPE-POOLS: SLIS.
      TABLES: STXFADM, STXFADMT.
      DATA:  BEGIN OF ITAB OCCURS 0,
           FORMNAME     LIKE STXFADM-FORMNAME,
           MASTERLANG   LIKE STXFADM-MASTERLANG,
           DEVCLASS     LIKE STXFADM-DEVCLASS,
           VERSION      LIKE STXFADM-VERSION,
           FIRSTUSER    LIKE STXFADM-FIRSTUSER,
           FIRSTDATE    LIKE STXFADM-FIRSTDATE,
           FIRSTTIME    LIKE STXFADM-FIRSTTIME,
           LASTUSER     LIKE STXFADM-LASTUSER,
           LASTDATE     LIKE STXFADM-LASTDATE,
           FORMTYPE     LIKE STXFADM-FORMTYPE,
           CAPTION      LIKE STXFADMT-CAPTION,
           END OF ITAB.
      DATA: IT_FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV,
              WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
              WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_DEV  FOR STXFADM-DEVCLASS NO INTERVALS.
    SELECT-OPTIONS: S_FORM FOR STXFADM-FORMNAME NO INTERVALS.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: P_LANG LIKE T002-SPRAS DEFAULT 'EN'.
    SELECTION-SCREEN END OF BLOCK B1.
    PERFORM F_SELECT_DATA.
    PERFORM F_LAYOUT.
    PERFORM F_FIELDCAT.
    PERFORM DISPLAY.
    *&      Form  f_select_data
          text
    -->  p1        text
    <--  p2        text
    FORM F_SELECT_DATA .
      SELECT
             A~FORMNAME
             A~MASTERLANG
             A~DEVCLASS
             A~VERSION
             A~FIRSTUSER
             A~FIRSTDATE
             A~FIRSTTIME
             A~LASTUSER
             A~LASTDATE
             A~FORMTYPE
             B~CAPTION
             FROM STXFADM AS A INNER JOIN  STXFADMT AS B ON
             AFORMNAME = BFORMNAME INTO  TABLE ITAB  WHERE
             A~DEVCLASS IN S_DEV AND
             A~FORMNAME IN S_FORM AND
             B~LANGU = P_LANG.
        IF SY-SUBRC  = 0.
        SORT ITAB BY FORMNAME.
      ELSE.
        MESSAGE I398(00) WITH 'No Form Exits for this selection criteria'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " f_select_data
    *&      Form  display
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY .
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SYST-CPROG
          IS_LAYOUT          = WA_LAYOUT
          IT_FIELDCAT        = IT_FIELDCAT
        TABLES
          T_OUTTAB           = ITAB.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " display
    *&      Form  f_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM F_FIELDCAT .
      DATA: WA_COL TYPE I VALUE 1.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-003.  " Form Name
      WA_FIELDCAT-FIELDNAME =  'FORMNAME'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-004.  " Smart form Text
      WA_FIELDCAT-FIELDNAME =  'CAPTION'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-005.  "Package
      WA_FIELDCAT-FIELDNAME =  'DEVCLASS'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-006.  "First User
      WA_FIELDCAT-FIELDNAME =  'FIRSTUSER'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-007.  "First Date
      WA_FIELDCAT-FIELDNAME =  'FIRSTDATE'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-008.  "Version
      WA_FIELDCAT-FIELDNAME =  'VERSION'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-009.  "Master Language
      WA_FIELDCAT-FIELDNAME =  'MASTERLANG'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS   =  WA_COL + 1.
      WA_FIELDCAT-SELTEXT_L =  TEXT-010.  "Last User
      WA_FIELDCAT-FIELDNAME =  'LASTUSER'.
      WA_FIELDCAT-TABNAME   =  'ITAB'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      ENDFORM.                    " f_fieldcat
    *&      Form  f_layout
          text
    -->  p1        text
    <--  p2        text
    FORM F_LAYOUT .
        WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    ENDFORM.                    " f_layout
    Regards,
    Jagadish

  • Define key figures -incoming order, invoiced sales and credit memo in BW

    Hi everyone,
    I combined two ODS into one ODS from 2LIS_11_VAITM & 2LIS_13_VDITM. I want to generate reports that contain net value, cost of incoming order, invoiced sales, and credit memo'(SD module).
    I tried to create some calculated key figures in BW that contain the net value and cost of incoming order, invoiced sales and credit memo. However, i couldn't find relative fields to define them.
    Can anyone provide help regarding how to create those key figures in BW? Thank you.

    Hello John,
    I think the best way to check it out is by looking at the business content. There might be mapping already defined for the fields you are looking for. The one standing out is perhaps the net value 'ONET_VALUE'.
    Please try to use as much of content KF as possible. A good approach to finding the right info-objects is by searching the business content by info-sources and marking the grouping as 'Collect before and afterwords', it should list down all the dependent info-objects.
    Hope that helps.
    Cheers, Ashu

  • BAPI for Vendor Invoice and Credit memo - FB60

    Hi
    Iam using BAPI_ACC_DOCUMENT_POST for creating Vendor invoice and Credit memo ..Could you please tell me which fields to be populated on the below structures?
    what will be the value i should use for BAPIACHE09-BUS_ACT...RFBU or RMRP?
    ACCOUNTPAYABLE ( BAPIACAP09)
    ACCOUNTGL(BAPIACGL09)
    CURRENCYAMOUNT( BAPIACCR09)
    Only the fields which needs to be populated on these structures when we do FB60 invoice and credit memo using bapi..
    Thanks in advance
    Govi

    Hi,
    Populate in Document_header : (User name, Comp code, Doc DAte, Doc type, Ref Doc No)
                       Account GL : ItemNo_Acc, GL Accuont, REf Key1, Refkey2, Refkey3, Account Type = 'A', Doc Type, Comp code
                                              Account_number, Cost_center
                       Account Payable: ItemNo_Acc, Vendor_No, Rey_key1, Ref_key2, Ref_key3
                      Currency Amount: Item No_Acc = 2, 1
                                                    Curr = USD, USD
                       Amt_Doccur 
    At last use commit bapi.
    Thanks,
    Krishna

  • Payment document  having invoices and credit memos

    How to identify when a payment document has both invoices and credit memos in it?Is there any criteria?

    Hi Savitha,
    This can be identified by document type.
    Ashven

  • Report to identify invoices, debit memos and credit memos

    Hi,
    Just enquiring if there is a report in SAP that will identify all invoices debit memos and credit memos issued within a particular date range.
    Thank you.

    Hi,
    You can try VF05 as Navaneet indicated and also you can try VF05N (for only the header details), if you are using ECC 6.0
    If you have VF05N, then you can tick 'Biling Documents in FI'. It will give you the billing docs for a date range and the ones that have been released to accounting....
    Hope this helps
    Thanks
    Mukund S
    Edited by: MukundHS on Jul 26, 2010 6:52 AM

  • In which table current /and in which table last 5 passwords are stored

    Hello
    in which table current /and in which table last 5 passwords are stored

    hi,
    The password may not be changed to any of a useru2019s last x passwords, if the user changes the password himself or herself.
    Until SAP NetWeaver 6.40 (inclusive), the password history was fixed to the value 5.
    After SAP NetWeaver 6.40, the administrator can set the size of the password history (up to 100 passwords selected by the user).
    The administrator can reset a useru2019s password to any initial password, therefore also to one of the last x passwords for this user. This is necessary, since the administrator should not know the passwords of the users. The user is prompted to change the initial password at the first interactive logon.
    You can change this with the profile parameter login/password_history_size.
    -Gokul

  • Invoice generated with out release to accounting, credit memo request and credit memo raised

    Dear SD Experts,
    I have a situation where the invoice is not released to accounting , but credit memo request and credit memos are being raised...now user would like to release the invoice to accounting (after raising credit note request and credit note), is it possible how do i handle this,
    (There is no delivery as this is service business scenario).
    Thanks in advance
    krishna

    Go to 'VFX3' and give the inputs, then select right line and click the FLAG option. It will be manually released to accounting, If not you might find the reason for block.
    Revert back with your results.
    Anandkumar KS

  • Regarding invoice and credit memo of sales order

    Hi,
    I have invoice for sales order and also have credit memo for the same sales order. I can see invoice and credit memo differently through transaction VF03. I want to append credit memo details to the invoice ...is it possible ?..if yes then please tell me the procedure.
    Thanks.

    check in the documnet flow if you can see the invoice and the credit memo. Then you can see them both in the document flow of any of the document.
    When you say append, what does it mean? Please explain.
    Regards
    Sai

  • Create Item AR Invoice to Service AR Credit Memo

    Hi Expert,
    Customer is running 2007A PL30. We understanding that it is impossible to copy Item AR Invoice to service AR credit memo. It is customer business practice to issue same AR invoice to all customer for same item and later issue service AR credit memo to customer. Customer wants the item information to be copied to service AR credit memo rather than keying multiple rows to indicate discount given on which items. It is not possible to include discount at original AR invoice.
    Any workaround or solution to solve this problem?
    Regards
    Thomas

    Please note the following:
    Item and Service type documents do not have a one to one match of the row level fields.  So the ItemCode from the AR Invoice could not be copied to a AR Service CM as the ItemCode column is not exposed and these are 2 different types of documents.
    This is what you could do....
    Open the AR Credit Memo...Enter the Customer Code....
    Add a formatted search to the Description field to Display the list of Items and take the Invoice number from the user as a parameter.
    Query same below
    SELECT T0.ItemCode FROM [dbo].[INV1] T0 INNER JOIN [dbo].[OINV] T1 ON T0.DocEntry = T1.DocEntry
    WHERE T1.CardCode = $[$4.0.0.] AND T1.DocNum = '[%0]'

Maybe you are looking for

  • Cannot load report from server in Crystal Reports 2013 Viewer

    Hello, I am having trouble opening a report that is hosted on a Crystal Reports Server (2013) from the Crystal Viewer.  I've created and uploaded the reports using the report designer (version 2013).  The reports have been uploaded using the "Save As

  • Activating TimeMachine Server for Active Directory Users

    Currently we'd like to switch to Active Directory and I tried it out with our Test environment, setuped an Active Directory Server and joined a OSX Mavericks Server. So far so good I can manage all my AD users, but when I click on "Edit Access to Ser

  • Can't use disc warrior 4.4 with my iMac lion

    I have tried pushing "c" when restarting the computer to boot from my Disc Warrior (4.4) disc but it is ignored.  When I push the "option" button on startup to boot from the disc warroir disc I get the dreaded 3 beep sound and I have to turn off the

  • Rack mount kit for SRW208P?

    Hello all -- anybody with 2 x rack mount kits for a SRW208P that they don't want? I need to rack mount these devices but my predecessor very wisely decided to throw them out and Cisco does not sell the racks as a separate SKU. Thanks. Victor

  • How to upload file in AL11 transaction

    Hi, I have created folder in the directory in AL11 transaction. Now I want to upload the file to the folder. Can anybody please tell me the procedure? Thanks.