Outgoing Payment Query with GL Name for all payment means

Hi all
Thanks a lot for the earlier help of Nagarajan! 
I managed to improve this Query now the only problem is the Bank Transfer Bank account name does not appear on the same line as the Bank transfer amount.
Please help to test execute on your Demo Database and let me know the correction.
DECLARE @REPORTBY AS NVARCHAR(1)  
/* SELECT FROM [dbo].[OFPR] T0 */    
/* WHERE */ DECLARE @DATEFROM datetime   
SET @DATEFROM =/* T0.F_RefDate */'[%0]'    
/* SELECT FROM [dbo].[OFPR] T1 */    
/* WHERE */ DECLARE @DATETO datetime    
SET @DATETO=/* T1.T_RefDate */'[%1]'    
SET @DATEFROM = '20140101'  
SET @DATETO = '20140131'  
SELECT   ISNULL(T01.BeginStr,'') + ' ' + CONVERT(NVARCHAR(20), T0.DOCNUM) [DOCUMENT NO.] 
  , T0.DocDate [DATE]
  , T0.CardCode [CARDCODE]
  , T0.CardName [NAME]
  , T0.DocCurr
  , T0.DocTotal [TOTAL incl. GST]
  , T0.DocTotalFC  [TOTAL (FC) incl. GST]
  , T0.Comments [Remarks]
  , T0.JrnlMemo
  , T0.CounterRef [Ref 2]
  /*BANK CHARGES*/
  , T0.BcgSum [Bank Charges], T0.BcgSumFC [Bank Charges (FC)]
  /*CHECK PAYMENT*/
  , T2.CheckAct, T4.AcctName, T2.Currency [Check Curr.]
  , T2.CheckSum, T0.CheckSumFC 
  , T2.AcctNum, T2.BankCode
  /*BANK TRANSFER*/
  , T0.TrsfrAcct, T4.AcctName, T0.TrsfrSum, T0.TrsfrSumFC 
  , T0.CashAcct, T6.AcctName, T0.CashSum, T0.CashSumFC 
  /*CREDIT CARD/ADJUSTMENT PAYMENT*/
  , T03.CardName [ADJ. TYPE], T3.CreditAcct [ADJ. ACC.], T5.AcctName, T0.CreditSum, T0.CredSumFC
  /*PAYMENT ON ACCOUNT*/
  , T0.PayNoDoc, T0.NoDocSum, T0.NoDocSumFC
  , T0.DocRate 
  , T0.DiffCurr 
FROM OVPM T0   
LEFT OUTER JOIN NNM1 T01 ON T0.ObjType = T01.ObjectCode AND T0.Series = T01.Series   
LEFT OUTER JOIN VPM1 T2 ON T0.DocNum = T2.DocNum   
LEFT OUTER JOIN (VPM3 T3 LEFT OUTER JOIN OCRC T03 ON T3.CreditCard = T03.CreditCard)  
ON T0.DocNum = T3.DocNum left join OACT t4 on T2.CheckAct = T4.AcctCode left join OACT t5 on T5.AcctCode = t3.creditacct left join OACT T6 on t0.CashAcct = t6.AcctCode 
WHERE T0.DocType = 'C'  
AND T0.DOCDATE BETWEEN @DATEFROM AND @DATETO   
UNION ALL   
SELECT   ISNULL(T01.BeginStr,'') + ' ' + CONVERT(NVARCHAR(20), T0.DOCNUM) [DOCUMENT NO.] 
  , T0.DocDate [DATE]
  , T0.CardCode [CARDCODE]
  , T0.CardName [PAY-TO NAME]
  , T0.DocCurr
  , T0.DocTotal [TOTAL incl. GST]
  , T0.DocTotalFC  [TOTAL (FC) incl. GST]
  , T0.Comments [Remarks]
  , T0.JrnlMemo
  , T0.CounterRef [Ref 2]
  /*BANK CHARGES*/
  , T0.BcgSum [Bank Charges], T0.BcgSumFC [Bank Charges (FC)]
  /*CHECK PAYMENT*/
  , T2.CheckAct, T4.AcctName, T2.Currency [Check Curr.]
  , T2.CheckSum, T0.CheckSumFC 
  , T2.AcctNum, T2.BankCode
  /*BANK TRANSFER*/
  , T0.TrsfrAcct, T4.AcctName, T0.TrsfrSum, T0.TrsfrSumFC 
  , T0.CashAcct, T6.AcctName, T0.CashSum, T0.CashSumFC 
  /*CREDIT CARD/ADJUSTMENT PAYMENT*/
  , T03.CardName  [ADJ. TYPE], T3.CreditAcct [ADJ. ACC.], T5.AcctName, T0.CreditSum, T0.CredSumFC
  /*PAYMENT ON ACCOUNT*/
  , T0.PayNoDoc, T0.NoDocSum, T0.NoDocSumFC
  , T0.DocRate 
  , T0.DiffCurr 
FROM OVPM T0   
LEFT OUTER JOIN NNM1 T01 ON T0.ObjType = T01.ObjectCode AND T0.Series = T01.Series   
LEFT OUTER JOIN VPM1 T2 ON T0.DocNum = T2.DocNum   
LEFT OUTER JOIN (VPM3 T3 LEFT OUTER JOIN OCRC T03 ON T3.CreditCard = T03.CreditCard)  
ON T0.DocNum = T3.DocNum left join OACT t4 on T2.CheckAct = T4.AcctCode left join OACT t5 on T5.AcctCode = t3.creditacct left join OACT T6 on t0.CashAcct = t6.AcctCode 
WHERE T0.DocType = 'S'  
AND T0.DOCDATE BETWEEN @DATEFROM AND @DATETO   
UNION ALL  
SELECT  ISNULL(T01.BeginStr,'') + ' ' + CONVERT(NVARCHAR(20), T0.DOCNUM) [DOCUMENT NO.] 
  , T0.DocDate [DATE]
  , T0.CardCode [CARDCODE]
  , T0.CardName [NAME]
  , T0.DocCurr 
  , T0.DocTotal [TOTAL incl. GST]
  , T0.DocTotalFC  [TOTAL (FC) incl. GST]
  , T0.Comments [Remarks]
  , T0.JrnlMemo
  , T0.CounterRef [Ref 2]
  /*BANK CHARGES*/
  , T0.BcgSum [Bank Charges], T0.BcgSumFC [Bank Charges (FC)]
  /*CHECK PAYMENT*/
  , T2.CheckAct, T4.AcctName, T2.Currency
  , T2.CheckSum, T0.CheckSumFC 
  , T2.AcctNum, T2.BankCode
  /*BANK TRANSFER*/
  , T0.TrsfrAcct, T4.AcctName, T0.TrsfrSum, T0.TrsfrSumFC 
  , T0.CashAcct, T6.AcctName, T0.CashSum, T0.CashSumFC 
  /*CREDIT CARD/ADJUSTMENT PAYMENT*/
  , T03.CardName  [ADJ. TYPE], T3.CreditAcct [ADJ. ACC.], T5.AcctName, T0.CreditSum, T0.CredSumFC
  /*PAYMENT ON ACCOUNT*/
  , T0.PayNoDoc 
  , CASE T0.DOCTYPE WHEN 'A' THEN 0 ELSE T0.NoDocSum END [PMNT ON ACC.]
  , CASE T0.DOCTYPE WHEN 'A' THEN 0 ELSE T0.NoDocSumFC END [PMNT ON ACC. (FC)] 
  , T0.DocRate [Payment Rate]
  , T0.DiffCurr 
FROM OVPM T0   
LEFT OUTER JOIN NNM1 T01 ON T0.ObjType = T01.ObjectCode AND T0.Series = T01.Series   
LEFT OUTER JOIN VPM1 T2 ON T0.DocNum = T2.DocNum   
LEFT OUTER JOIN (VPM3 T3 LEFT OUTER JOIN OCRC T03 ON T3.CreditCard = T03.CreditCard)  
ON T0.DocNum = T3.DocNum left join OACT t4 on T2.CheckAct = T4.AcctCode left join OACT t5 on T5.AcctCode = t3.creditacct left join OACT T6 on t0.CashAcct = t6.AcctCode 
WHERE T0.DocType = 'A'  
AND T0.DOCDATE BETWEEN @DATEFROM AND @DATETO

Hi,
Please post your discussion without mentioning member name.
Try this:
DECLARE @REPORTBY AS NVARCHAR(1)  
/* SELECT FROM [dbo].[OFPR] T0 */    
/* WHERE */ DECLARE @DATEFROM datetime   
SET @DATEFROM =/* T0.F_RefDate */'[%0]'    
/* SELECT FROM [dbo].[OFPR] T1 */    
/* WHERE */ DECLARE @DATETO datetime    
SET @DATETO=/* T1.T_RefDate */'[%1]'    
SET @DATEFROM = '20140101'  
SET @DATETO = '20140131'  
SELECT   ISNULL(T01.BeginStr,'') + ' ' + CONVERT(NVARCHAR(20), T0.DOCNUM) [DOCUMENT NO.] 
  , T0.DocDate [DATE]
  , T0.CardCode [CARDCODE]
  , T0.CardName [NAME]
  , T0.DocCurr
  , T0.DocTotal [TOTAL incl. GST]
  , T0.DocTotalFC  [TOTAL (FC) incl. GST]
  , T0.Comments [Remarks]
  , T0.JrnlMemo
  , T0.CounterRef [Ref 2]
     /*BANK CHARGES*/
  , T0.BcgSum [Bank Charges], T0.BcgSumFC [Bank Charges (FC)]
  /*CHECK PAYMENT*/
  , T2.CheckAct, T4.[AcctName], T2.Currency [Check Curr.]
  , T2.CheckSum, T0.CheckSumFC 
  , T2.AcctNum, T2.BankCode
  /*BANK TRANSFER*/
  , T0.TrsfrAcct,T6.[AcctName],T0.TrsfrSum, T0.TrsfrSumFC 
  , T0.CashAcct,T4.[AcctName], T0.CashSum, T0.CashSumFC 
  /*CREDIT CARD/ADJUSTMENT PAYMENT*/
  , T03.CardName [ADJ. TYPE], T3.CreditAcct [ADJ. ACC.], T5.[AcctName],T0.CreditSum, T0.CredSumFC
  /*PAYMENT ON ACCOUNT*/
  , T0.PayNoDoc, T0.NoDocSum, T0.NoDocSumFC
  , T0.DocRate 
  , T0.DiffCurr 
FROM OVPM T0   
LEFT OUTER JOIN NNM1 T01 ON T0.ObjType = T01.ObjectCode AND T0.Series = T01.Series   
LEFT OUTER JOIN VPM1 T2 ON T0.DocNum = T2.DocNum   
LEFT OUTER JOIN (VPM3 T3 LEFT OUTER JOIN OCRC T03 ON T3.CreditCard = T03.CreditCard)  
ON T0.DocNum = T3.DocNum  left join OACT t4 on T2.CheckAct = T4.AcctCode left join OACT t5 on  T5.AcctCode = t3.creditacct left join  OACT T6 on t0.CashAcct = t6.AcctCode
WHERE T0.DocType = 'C'  
AND T0.DOCDATE BETWEEN @DATEFROM AND @DATETO 
union all
SELECT   ISNULL(T01.BeginStr,'') + ' ' + CONVERT(NVARCHAR(20), T0.DOCNUM) [DOCUMENT NO.] 
  , T0.DocDate [DATE]
  , T0.CardCode [CARDCODE]
  , T0.CardName [NAME]
  , T0.DocCurr
  , T0.DocTotal [TOTAL incl. GST]
  , T0.DocTotalFC  [TOTAL (FC) incl. GST]
  , T0.Comments [Remarks]
  , T0.JrnlMemo
  , T0.CounterRef [Ref 2]
     /*BANK CHARGES*/
  , T0.BcgSum [Bank Charges], T0.BcgSumFC [Bank Charges (FC)]
  /*CHECK PAYMENT*/
  , T2.CheckAct, T4.[AcctName], T2.Currency [Check Curr.]
  , T2.CheckSum, T0.CheckSumFC 
  , T2.AcctNum, T2.BankCode
  /*BANK TRANSFER*/
  , T0.TrsfrAcct,T6.[AcctName], T0.TrsfrSum, T0.TrsfrSumFC 
  , T0.CashAcct,T4.[AcctName], T0.CashSum, T0.CashSumFC 
  /*CREDIT CARD/ADJUSTMENT PAYMENT*/
  , T03.CardName [ADJ. TYPE], T3.CreditAcct [ADJ. ACC.], T5.[AcctName],T0.CreditSum, T0.CredSumFC
  /*PAYMENT ON ACCOUNT*/
  , T0.PayNoDoc, T0.NoDocSum, T0.NoDocSumFC
  , T0.DocRate 
  , T0.DiffCurr 
FROM OVPM T0   
LEFT OUTER JOIN NNM1 T01 ON T0.ObjType = T01.ObjectCode AND T0.Series = T01.Series   
LEFT OUTER JOIN VPM1 T2 ON T0.DocNum = T2.DocNum   
LEFT OUTER JOIN (VPM3 T3 LEFT OUTER JOIN OCRC T03 ON T3.CreditCard = T03.CreditCard)  
ON T0.DocNum = T3.DocNum  left join OACT t4 on T2.CheckAct = T4.AcctCode left join OACT t5 on  T5.AcctCode = t3.creditacct left join  OACT T6 on t0.CashAcct = t6.AcctCode
WHERE T0.DocType = 'S'  
AND T0.DOCDATE BETWEEN @DATEFROM AND @DATETO 
union all
SELECT   ISNULL(T01.BeginStr,'') + ' ' + CONVERT(NVARCHAR(20), T0.DOCNUM) [DOCUMENT NO.] 
  , T0.DocDate [DATE]
  , T0.CardCode [CARDCODE]
  , T0.CardName [NAME]
  , T0.DocCurr
  , T0.DocTotal [TOTAL incl. GST]
  , T0.DocTotalFC  [TOTAL (FC) incl. GST]
  , T0.Comments [Remarks]
  , T0.JrnlMemo
  , T0.CounterRef [Ref 2]
     /*BANK CHARGES*/
  , T0.BcgSum [Bank Charges], T0.BcgSumFC [Bank Charges (FC)]
  /*CHECK PAYMENT*/
  , T2.CheckAct, T4.[AcctName], T2.Currency [Check Curr.]
  , T2.CheckSum, T0.CheckSumFC 
  , T2.AcctNum, T2.BankCode
  /*BANK TRANSFER*/
  , T0.TrsfrAcct, T6.[AcctName], T0.TrsfrSum, T0.TrsfrSumFC 
  , T0.CashAcct,T4.[AcctName], T0.CashSum, T0.CashSumFC 
  /*CREDIT CARD/ADJUSTMENT PAYMENT*/
  , T03.CardName [ADJ. TYPE], T3.CreditAcct [ADJ. ACC.], T5.[AcctName],T0.CreditSum, T0.CredSumFC
  /*PAYMENT ON ACCOUNT*/
  , T0.PayNoDoc, T0.NoDocSum, T0.NoDocSumFC
  , T0.DocRate 
  , T0.DiffCurr 
FROM OVPM T0   
LEFT OUTER JOIN NNM1 T01 ON T0.ObjType = T01.ObjectCode AND T0.Series = T01.Series   
LEFT OUTER JOIN VPM1 T2 ON T0.DocNum = T2.DocNum   
LEFT OUTER JOIN (VPM3 T3 LEFT OUTER JOIN OCRC T03 ON T3.CreditCard = T03.CreditCard)  
ON T0.DocNum = T3.DocNum  left join OACT t4 on T2.CheckAct = T4.AcctCode left join OACT t5 on  T5.AcctCode = t3.creditacct left join  OACT T6 on t0.CashAcct = t6.AcctCode
WHERE T0.DocType = 'A'  
AND T0.DOCDATE BETWEEN @DATEFROM AND @DATETO 
Thanks & Regards,
Nagarajan

Similar Messages

  • Editing the Query name for all reports in PRD.

    Dear All,
    I have created 25 reports using Query Designer.We have moved all the reports to BI Production. And Clients are using these reports using the Tool Bex Analyser.
    Every time they are navigating through open Query -> Info Areas -> Data targets and Query.
    Instead of going this way, is there any other way to Open a query easily.
    And they wants to modify the Report name and the Technical name for all the reports. Can we able to edit the Query name for all reports, or do i need to go for SAVE AS for all querys.
    Pls Suggest.
    Thanks,
    Ram

    Hi Ram,
    1. For the first question; if it user specific query then ask the users to save them at the FAVORITES so that there is no need to go to the dataprovider specific.
    Or they can create the reports as favorites user menu screen of that particular user.
    2. In order to change the technical name and description of the queries goto RSZC t-code> give the source and target infoprovider as same> select queries>click on the reports>click on transfer selections-->
    Then you get a screen to change the description and technical name.
    But this is pertained to Infoprovider level.
    You can see all the reports on the infoprovider (cube/ods).
    Hope you understood.
    Regards,
    Ravi Kanth

  • Retrieving user detail, group name for all users

    Hi,
    How can I retrieve User name, email, authentication, user group name
    for all users using SDK.
    It is possible to create this report in webi or CR?
    Thank you for reply,
    Gregor

    Use the following code to retrieve this information:
    IInfoObjects users = oInfoStore.query("select * from ci_systemobjects where si_kind='user'");
    for (int i=0; i<users.size(); i++)
             IUser user = (IUser)users.get(i);
             // user.getTitle(); for user name
             // user.getFullName(); for user's full name
             //  user.getEmailAddress(); for user's email address
             //  for authentication type:
             IUserAliases alises = user.getAliases();
             for(int j=0; j<aliases.size();j++)
                       IUserAlias alias = alises.get(j);
                       // alias.getAuthentication() for authentication associated with this alias, since same user can have more than 1 authentication. e.g. Enterprise and Ldap.
             // for user group memberships:
             java.util.Set groups = user.getGroups();        
             // the groups Set object will contain SI_ID of all the user groups that this uses is member of. You need to query by the SI_ID of the usergroup to get the group names.
    //  e.g.
    //    oInfoStore.query("select si_id, si_name from ci_systemobjects where si_kind='usergroup' and si_id in (a,b,c....)");
    where a,b,c are the SI_IDs of the usergroups.
    To create a report based on the above fetched data, there are several methods such as:
    you can use Java resultset where in you create the report structure in designer and push the data at runtime using java result set objects. Another way is to push this info in Excel or Access and design your report based on that excel\access.

  • Custom dynamic names for outbound payment files in R12

    I have asked this on a couple of forums, but somehow missed this one.
    We are upgrading from 11i to R12 and require custom dynamic file names for the Payments output files (cheques, advices, efts). I see that you can create a custom prefix and extension through payment profiles, but the functionality is very limited (i.e. no date stamp). I am thinking that others must have come across this before, and am wondering how you have handled such a requirement. Is it possible to add custom steps to the seeded payment process? Can the payment process be run as part of a request set and then a custom step added which grabs the output file and renames it based on information obtained from the batch and the process profile. Our goal is a fully automated payment process where batches are scheduled, processed and files renamed and sent out to banks and a 3rd party printer with no user interventation.
    Any advice/tips would be appreciated.
    Thanks.
    Tam.

    Hi Tam,
    Could you please let me know if you got the solution as we have a similar requirement of renaming the output file as perthe business needs fro which we need custom program.
    Thanks,
    Manas

  • Extract schema/metadata - names for all tables and attributes

    Hi, I am quite new to Oracle DB (only been doing dev mostly with sqlserver before). Is there a way to extract schema (names for all tables and attributes) for 10g and 11g in application code (either java or .net) or pl/sql?
    Thank you,
    -Tony

    There are built in views that start with DBA_, ALL_, and USER_. All means all the user can see, user means all the user has, and dba means everything, which generally means the same as the others plus an owner. So you can desc user_tables to see what-all that view has, then select columns from the view with ordinary sql. See the doc set for all the views available, interesting ones are ...views, ...objects, ...tab_cols and so forth.
    There are also built in procedures for getting metadata, google for details.
    Many tools have easy GUI's for this too. EM has ways on the administration screen to get to various objects, and then you can show the ddl. Maybe sqldeveloper has something too.

  • Import tables using same file name for all tables

    hi,
    We are using oracle 11.2.0.3.0, we have taken export of multiple tables in schema, unfortunately in exp command we have mention same file name for all the tables, now it has created one file for all export but the size of that file shows that all the tables included in it , when we try to import the tables only last table mention in export command is imported for other tables it hangs, example of code show below.
    Is there any way to import the remaining tables.
    exp system file =exp05042013.dmp tables=gr.table1
    exp system file =exp05042013.dmp tables=gr.table2
    exp system file =exp05042013.dmp tables=gr.table3

    Hi,
    You can use as :
    exp username@database tables=table1,table2 file=tabledata.dmpDid you have any RMAN full backup?
    Why you are not recover crash database?
    Mahir

  • Must I define abstract  interfaces with different names for BPM?

    Must I define abstract interfaces with different names for BPM?
    When interface appeared several times with different values and usage.
    Of course they are the same message type.

    Hi,
    Check this
    RFC Scenario using BPM --Starter Kit
    Regards
    Seshagiri

  • Package name for all objects

    Gurus
    Any easy way to know package name for all objects.
    Thankyou Gurus

    Hi,
    double click on the object-then select extras menuthen select write transport request--
    it will show the package of present.
    hope this help you
    regards
    harikrishna N

  • Generate public names for ALL attributes?

    Hi all,
    What suggestions do you have to generate public names for ALL attributes in OPM 10.4?
    We're trying to pretty up the decision report by setting invisible ALL attributes, except for: the top goal, structural reference number, and base data.
    Seems like the only way to get it done is to go in the build model and manually create public name one-by-one.
    Thanks,
    Isamu

    Hi Isamu,
    It sounds like you could use the silent property to customise your decision report.
    If Attribute A is proven by B, C and D, you can set A to silent and it will hide B, C and D from a decision report...there is no need to individually set B, C and D to invisible.
    Check out the help file here http://docs.oracle.com/html/E27987_01/Content/Decision%20reports/Hide_information_in_decision_report.htm
    What's really helped me in the past is creating a Visual Browser file (or multiple files if your rulebase is large) of the rules, and identifying the attributes you want in the decision report by colour coding the visualization. After you have the visual picture, it becomes much easier to see which attributes you should set to silent & invisible to achieve the correct report.
    Let me know if this helps!
    Cheers,
    Ben

  • What's the best method for a nav menu with image rollover for all visitors?

    Hi.
    First, thanks for reading this.
    What's the best method for a nav menu with image rollovers for all visitors, including PDAs? I've used JavaScript rollovers for years because the majority of my customers' visitors use some version of IE (past 7.0) but I'm building a new site that has to display properly for the widest range of visitors imaginable. (I also know that I need to use a more modern method for everyone and this is my excuse to start).
    Finally, using images is critical. I apologize ahead of time to anyone I offend, but I have never seen a nav menu without images that doesn't look just plain terrible.
    Thanks.
    Fitz21

    If you want the best menus possible for Dreamweaver look no further than Project Seven:
    http://projectseven.com/
    They have all kinds of menus and other extensions available for purchase.  Easy to use and they work as advertised.  I personally use Pop Menu Magic and Tab Panel magic myself.  I could go on and on, but I guarantee that if others respond they will echo the same sentiment for Project Seven.

  • Sql query to list menus, submenus and function-names for all resp

    Hi,
    Please let me know one single sql query to list all the menus, submenus and user-function-names attached for all responsibilities
    Thanks...

    Hi,
    See the following threads.
    How to find All The Responsibilities with a specific Menu
    How to find All The Responsibilities with a specific Menu
    SQL query
    SQL query
    Regards,
    Hussein

  • While saving Bex query with Technical name, it says Query already existing

    Hi,
    I am facing a problem. While saving a query withy its technical name (for example ZQYZMPR_01), it says that query is already existing. But when I search for the query in all tabs like Favourites, Roles, Infoprovider It is not found.
    I also checked a view V_REP_JOIN. In this view I find Query (ZQYZMPR_01) in MODIFIED version.
    I want to use my previous query instead of creating new one.
    Suggest, how can I retrieve my previous query that I am unable to search for.

    Saurabh
    Searching with descriptions may lead to confusion as there may be similar  descriptions to a query but just one technical name.  Check the query 'where used list' you may find answers.
    Can you check the query in RSZCOMPDIR ? If the query exist here, it must be there in the system.  Do the search with exact technical name ZQYZMPR_01 or ZQYZMPR*, you should be able to find.  Do not search in specific areas like roles etc..search directly by inputting the tech. name.
    Ferdinando - you can delete the query in RSZDELETE transaction.  While doing so, it will prompt for removal from all areas like roles, workbooks etc. Say 'yes' and delete, you will be able to assign the technical name to another query.
    Ramesh

  • Tables name for Customer Payment Report

    hiiiiiiiiii
    can anyone tell us the tables name for the report customer payment receive..?
    Thanks & Regards
    Rekha sharma

    Hi Rekha
    when you pass following entry
    Bank dr  
    to Customer
    All header data like co code currecy ref , period etc goes to BKPF,
    line item - Bank Dr ( its a GL  entry ) goes to BSIS
    line item- Customer Cr ( its a AR entry ) goes to BSID or BSAD depends it is cleared or still open
    Also both the line items goes to BSEG
    Hope this helps.
    Regds
    Rajiv

  • BDC select query with addition based on all If conditions

    Hi can any one send me the select query with conditions like
    If Itab is not initial.
    Endif. and if possible with valiadations messages also.
    IF CHECK_NUMBER of CHECK_ADVICE of the flat file = PAYR-CHECT. Then update SAP field BSEG-XREF2 .
    9.     When Flat file check Number = PAYR-CHECT then Insert or Update Flat file RECEIPT_DATE into SAP field BSEG-XREF1.
    Please send me immediately.

    >     SELECT rsnum
    >            rspos
    >            matnr
    >            werks
    >         lgort
    >            shkzg
    >            aufnr
    >            bdmng
    >            enmng                      
    >            FROM  resb INTO  TABLE it_rsnum FOR ALL ENTRIES IN it_aufnr
    >            WHERE rsnum EQ it_aufnr-rsnum
    >            AND   xloek NE 'X'
    >            AND   postp NE 'X'
    >            AND   resbbdmng GE resbenmng.
    >   ENDIF.
    >
    > Database Table RESB: 40,000,000 Records (40 Million)
    > Internal Table   it_aufnr:  20,000 Entries
    > Entries selected from RESB: 150,000.
    >
    Hi,
    the problem is the big for all entries table.
    Your 20.000 records FAE will be split into SEVERAL sql statements depending on the size of the table.
    Where do you get the it_auftrn from?
    If it's another transparent table try to JOIN this table to your big table.
    SELECT rsnum
                rspos
                matnr
                werks
            lgort
                shkzg
                aufnr
                bdmng
                enmng                      
                FROM  resb JOIN tab_auftrn  on  resbrsnum = tab_auftrnauftrn
                AND   xloek NE 'X'
                AND   postp NE 'X'
                AND   resbbdmng GE resbenmng.
    Make sure that your WHERE filter and the JOIN keys on both tables are supported by indexes.
    150.000 records about of 40 Mio. can definitly be serviced by an appropriate index:
    i.e. Index fields (check your PK or secondary indexes):
    rsnum
    enmng                      
    aufnr
    bye
    yk

  • Recreate remittance advices for all payment runs of the day at once a day.

    Hello Sap Gurus,
    Here we have requirment for remittacne advices , so please find below quey.
    1.      Run once a day and recreate all the remittance advices for all the payment runs of the day.
    2.       Convert this into PDF format and download to the LAN structure automatically.
    3.       This program should be scheduled in batch and have proper error handling to alert a user via email should there be a error in the download as we need to understand immediately if we donu2019t have all the remittance advices on the LAN.
    Please provide valuable inputs for the customised program? and is this possible with customised program? or any standard SAP avialable for ths requirement.
    Regards,
    Raj

    HI,
    You can create the same via a custom program with below steps:-
    (1) Fetch all the payment run IDs from table REGUV for a particular run date.
    (2) Then for each run date and run identification combination, call in loop Remittance Advice Printing Program (RFFOAVIS or RFFOAVIS_FPAYM) and it will generate the spool.
    (3) Then call the program RSTXPDFT4 to convert the spool into a PDF file and store on SAP aplication server.
    Then you can have a interface from SAP Application server to your LAN to have the file transferred.
    Regards,
    Gaurav

Maybe you are looking for