ABAP Coding- enhance transactional datasource

i need to bring in data from different tables and following code works for me:
DATA: l_s_ziw_orderma_i like ziw_orderma_i.
CASE i_DATASOURCE.
WHEN 'ziw_orderma_i'.
LOOP AT c_t_data INTO l_s_ziw_orderma_i.
l_tabix = sy-tabix.
SELECT PRODUCT_IT FROM CRMD_SRV_REFOBJ INTO l_s_ziw_orderma_i-ZZPRODUCT
WHERE GUID = l_s_ziw_orderma_i-GUID .
MODIFY c_t_data FROM l_s_ziw_orderma_i INDEX l_tabix.
ENDSELECT.
ENDLOOP.
WHEN OTHERS.
EXIT.
ENDCASE.
Guid...date...........objectid...item guid
1122......1.1.10....901..........z1122
1122......1.1.10....901..........z1123
1122......1.1.10....901..........z1124
using this ITEM GUID from extractor, i want to pull out data from table - CRMD_SRV_REF
guid ...............product...............Product type..........product quality
z1122.............110011..........ABC.........................GUD
z1123.............110012..........DEF..........................GUD
z1124.............110013...........DFG.........................GUD
NOW my code works for extracting PRODUCT..
what MODIFICATION I need to do so that i can bring in PRODUCT TYPE & PRODUCT QUALITY

HI ,
I am not sure about the Product quality( Do you know the source table ?)  , but Product type will be available in the
will not be available in CRMD_SRV_REFOBJ, you can get that from table COMM_PRODUCT ,
Change your code as below sample code  to get product id and Type , find the source table for product quality and extend this code in the similar way , check for syntax error if any and fix it
TYPES : BEGIN OF PROD        ,
        PRODUCT_ID   TYPE COMT_PRODUCT_ID ,
        PRODUCT_TYPE TYPE COMT_PRODUCT_TYPE,
        END OF PROD .
DATA: l_s_ziw_orderma_i like ziw_orderma_i,
      i_PROD TYPE TABLE OF PROD ,
      WA_PROD LIKE LINE OF i_PROD .
CASE i_DATASOURCE.
WHEN 'ziw_orderma_i'.
LOOP AT c_t_data INTO l_s_ziw_orderma_i.
l_tabix = sy-tabix.
SELECT PRODUCT_ID
  FROM CRMD_SRV_REFOBJ
  INTO l_s_ziw_orderma_i-ZZPRODUCT
WHERE GUID = l_s_ziw_orderma_i-GUID .
ENDSELECT.
IF SY-SUBRC EQ 0 .
SELECT PRODUCT_ID
        PRODUCT_TYPE
    INTO TABLE i_PROD
    FROM COMM_PRODUCT
         WHERE PRODUCT_ID = l_s_ziw_orderma_i-ZZPRODUCT .
ENDIF .
IF i_PROD[] IS NOT INITIAL .
READ TABLE I_PROD INTO WA_PROD WITH KEY
                        PRODUCT_ID = l_s_ziw_orderma_i-ZZPRODUCT .
IF SY-SUBRC EQ 0 .
l_s_ziw_orderma_i-ZZPROD_TYPE = WA_PROD-PRODUCT_TYPE .
ENDIF.
ENDIF .
MODIFY c_t_data FROM l_s_ziw_orderma_i INDEX l_tabix.
ENDLOOP.
WHEN OTHERS.
EXIT.
ENDCASE.
Regards,
Sathya

Similar Messages

  • ABAP coding error...enhance transactional datasource

    i need to enhance CRM extractor with additional field.
    This is transactional data so i used Exit_rs_001
    Here is the extractor result -
    Guid...date...........objectid...item guid
    1122......1.1.10....901..........8811
    1122......2.1.10....901..........8812
    1123......1.1.10....902..........8813
    1123......2.1.10....902..........8814
    now i need field Product id in it which is called from DB Table CRMD_SRV_REFOBJ
    itemguid...referencekey...product
    8811............01.................110011
    8812............02.................110012
    8813............03.................110013
    now i want to extract data--
    Guid...date...........objectid...item guid...product
    1122......1.1.10....901..........8811.........110011
    1122......2.1.10....901..........8812.........110012
    1123......1.1.10....902..........8813.........110013
    so i appended the extractor...with field zproduct
    FOLLOWING Code doesnot work:::
    DATA: L_S_INFOSTRU LIKE ziw_orderma_i.
    CASE I_DATASOURCE.
    FIELD-SYMBOLS: <PRO_01> TYPE ziw_orderma_i.
    CASE i_datasource.
    WHEN 'ziw_orderma_i.'. " Upper case
    LOOP AT c_t_data ASSIGNING <PRO_01>.
    SELECT PRODUCT_ID INTO <PRO_01>-zZPRODUCT
    FROM CRMD_SRV_REFOBJ UP TO 1 ROWS
    WHERE ITEM_GUID = <PRO_01>-CRMD_SRV_REFOBJ.
    ENDSELECT. " not whole primary key
    ENDLOOP.
    ENDCASE.

    Hi,
    For this, you can do as below
    REFER EXTRACTOR GUID --1122
    Find GUID References for guid = 1122 in table CRMD_ORDERADMI (item level table)
    for the guid reference in CRMD_ORDERADMI, find the Product >0 in table CRMD_SRV_REFOBJ
    select that Product and write into extractor field zzproduct#
    WHEN 'ziw_orderma_i'.
    LOOP AT c_t_data INTO l_s_ziw_orderma_i.
    l_tabix = sy-tabix.
    data: temp_guid like CRMD_ORDERADM-GUID. to create a temporary variable
    SELECT single GUID FROM CRMD_ORDERADMI INTO temp_guid
    WHERE GUIDREF = l_s_ziw_orderma_i-GUID.
    The above statement would give you value for GUID from this table i.e. z1122
    SELECT PRODUCT_IT FROM CRMD_SRV_REFOBJ INTO l_s_ziw_orderma_i-ZZPRODUCT
    WHERE GUID = temp_guid.
    MODIFY c_t_data FROM l_s_ziw_orderma_i INDEX l_tabix.
    ENDSELECT.
    This would fetch your value
    clear temp_guid. to clear this temporary variable
    ENDLOOP.
    WHEN OTHERS.
    EXIT.
    ENDCASE.
    PS: It appears that you have corrected already so not requried any more
    Edited by: Rahul K Rai on Oct 17, 2010 9:27 PM

  • Enhancing a transaction datasource!

    Hi all,
    Can anyone please tell me where I can find documentation on writing User exits/enhancing transaction datasources.  Is the procedure for enhancing transaction datasource same for all extraction methods like LO-Cockpit, LIS, COPA, Generic Datasource and FISL or are they dependent on the extraction method.
    I need to enhance LIS datasource and write code to populate value for couple of new fields.
    I appreciate your help.
    thanks.

    Your question has been already answered !
    https://websmp205.sap-ag.de/bi -> BI InfoIndex -> Exits
    Bye,
    Roberto
    Anyway, try to do a search inside these forums...you will try a lot of very useful material and sample...

  • Transactional datasource enhancement

    Need documentation for transactional datasource enhancement
    Please search SDN
    Edited by: Pravender on May 25, 2010 12:28 PM

    hi,
    chk the links
    Master data enhancement
    CMOD Enhancements
    Enhancing master data extractor
    Lo Enhancement- Transactional data
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc6731660f46
    Ramesh

  • Transaction Datasource Enhancement

    Hi Experts,
    I did the extractor enhancement for 0WBS_ELEMT_ATTR. Data will be loaded to an infocube using infosource 0CO_OM_NWA_1. Do I still need to enhance the transaction datasource to populate data into a infoobject related to WBS element? Please help on this.
    Thanks,
    Bill

    Was the masterdata enhancement for a new attribute to WBS ?
    For reporting purposes you may use master data.
    It depends, if you want to use the attribute data for drill down it has to be made navigational.

  • ABAP coding in defining start condition for action.

    Hi Everybody,
    Can anyone tell me if ABAP coding is possible for giving condition for action? If yes, where? Is it in condition editor? I have 3 validations to be done:- 1) Filter service contract (transaction type USC), 2) Filter the active contracts, 3) Filter contracts which doesn't have billing cycle in current month.
    So, do you think these validations can be done in start condition of action? First two validations are static in nature and thus can be done. But, how about the last condition?
    Please help.
    Regards,
    Sanj.

    Hi Sanj
    I would do this.
    1. The transaction type cannot be changed, therfore I will set this up in the scheduling condition.
    2. Active contracts. Depends on teh definiton of active. If it is based on some status then I will use scheduling condition.
    3. use one of the dates in the date profile to determine if the billing date is in the current month or not.
    See if this helps.
    Thanks

  • Abap coding in SAP query (SQ01)

    Hi,
    By using the a table like for MSEG if i want to retrieve data for the movement type 101 (receipts from vendor), i can build a query using this table and retrieve data - my problem starts when the system shows individual line items instead of cumulated result as mentioned in the following example.
    Example :-
    for the date 01.07.2007 - i have 10 entries (101 movement) of quantity 1,2,3,4,5,6,7,8,9,10 against a vendor V1. - the query lists all the 10 entries.
    But what is required is the cumulated entry against the vendor like shown below
    vendor    receipt
    V1         55.
    What abap coding should be written (provide the sample code) and the where should it be written in the query transaction SQ01
    Regards,
    M.M

    Hi Magesh,
    If you do not wish to see the detail lines, then you do not need to create them.  Just create the Statistics portion only.
    If you wish to see 'summarized Vendor quantity by day', then you might sort on Vendor first, then posting date second.  Or, vice versa, depending on your business requirement.  I would think that you might also wish to include Material in the sort, since each Material is probably valued differently.
    For more info on creating statistics in SAP Query, refer to
    http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb4256455611d189710000e8322d00/frameset.htm
       Regards,
       Bruce

  • Adding a Field in a Transaction Datasource

    Hi,
    I have created a ZAUTH InfoObject in BI for the field Authorization group (BEGRU - MARA).  This ZAUTH Infoobject is getting filled in through Master data Load of 0MATERIAL.  I have added the Infoobject ZAUTH as a Navigational Atttribute in 0MATERIAL.
    I have created a Billing DSO for the Transaction load which gets data through the Datasource 2LIS_12_VDITM.  In DSO, i have a requirement wherein i have to write a routine using 0customer & Authorization group (ZAUTH).  The requirement goes like this:
      If the Customer number = 100 & Authorization = ABC, Put Detail = Stock.
      If the Customer number = 200 & Authorization =  XYZ, Put Detail = Trade.
    The Problem here is i dont have the BEGRU field in the Transaction Datasource 2LIS_12_VDITM.  I know we can customize the Datasource & add this field.  But, is there any other way to do this?
    Regards,
    Murali

    I guess you can realize this requirement without enhancing the datasource. There is 1:1 relationship between material and auth group as it is added as an attribute on it. You can derive the auth group by looking up material master data in the code, for the material on the billing document. Once this is derived you can build your logic for detail. You need to derive auth group at a lower level in the data flow and put logic for detail at the next level or you can consider using start (derive auth group) and end routines (logic for Detail).

  • What is difference among F5 and F6 and F7 in ABAP coding?

    what is difference among F5 and F6 and F7 in ABAP coding ?  Can u give me any example regarding this thread ?

    Some additional info which can be quite helpful.
    a watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program. You can only define watchpoints in the Debugger.
    Use
    You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program.
    Features
    · You can set up to five watchpoints in a program.
    See also Setting Watchpoints.
    · You can also specify the conditions under which a watchpoint is to become active.
    · You can specify a logical link for up to five (conditional) watchpoints.
    See also Specifying Logical Links.
    · You can define watchpoints as either local or global. If you define a global watchpoint, it is active in all called programs. Local watchpoints are only active in
    the specified program.
    · You can change and delete watchpoints.
    See Changing Watchpoints
    · You can use watchpoints to display changes to the references of strings, data and object references, and internal tables.
    See Memory Monitoring with Watchpoints
    Breakpoints
    Apart from being able to execute an ABAP program in the Debugger, you can also start the Debugger call by the choosing a breakpoint. This is achieved by setting one or more of these breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The Debugger is activated when the program reaches this point.
    There is also a special kind of breakpoint called a watchpoint. When you use watchpoints, the Debugger is not activated until the contents of a particular field change. For more information, refer to the chapter Watchpoints.
    Breakpoint Variants
    The Debugger contains different breakpoint variants:
    Static
    A user-specific breakpoint is inserted in the source code as an ABAP statement using the keyword BREAK-POINT. A non user-specific breakpoint is set in the ABAP Editor using the BREAK user name statement.
    Directly set
    dynamic breakpoints
    Can be set in the ABAP Editor or the Debugger by double-clicking a line, for example. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.
    Breakpoints
    at statements
    The Debugger stops the program immediately before the specified statement is executed.
    Breakpoints
    at subroutines
    The Debugger stops the program immediately before the specified subroutine is called.
    Breakpoints at function modules
    The Debugger stops the program immediately before the specified function module is called.
    Breakpoints at methods
    The Debugger stops the program immediately before the specified method is called.
    Breakpoints at exceptions and system exceptions
    The Debugger stops the program immediately after a system exception, that is, after a runtime error has been intercepted.
    Static Breakpoints
    Static breakpoints are always user-independent if there is no specification of a user name. Once a user has inserted the statement BREAK-POINT or BREAK name in an ABAP program, the system always interrupts the program at that point for that user or only for the user name. This procedure is only useful in the development phase of an application when program execution is always to be interrupted at the same place. For more information, refer to the chapter Static Breakpoints.
    In HTTP sessions, a static breakpoint is skipped if you did not set additional dynamic HTTP breakpoints in the editor of a BSP page. Instead, a corresponding system log entry is written, which can be checked using transaction SM21.
    Dynamic Breakpoints
    Dynamic breakpoints are user-specific. Therefore, you should use them if you only want the program to be interrupted when you run it yourself, not when it is being executed by other users. All dynamic breakpoints are deleted when you log off from the R/3 System.
    Dynamic breakpoints are more flexible than static breakpoints because you can deactivate or delete them at runtime. They have the following advantages:
    · You do not have to change the program code.
    · You can set them even when the program is locked by another programmer.
    · You can define a counter that only activates the breakpoint after it has been reached.
    Special dynamic breakpoints are useful when you want to interrupt a program directly before a particular ABAP statement, a subroutine, or an event, but do not know exactly where to find it in the source code. Event here is used to refer to the occurrence of a particular statement, for example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger. For more information, refer to the chapter Dynamic Breakpoints.
    In HTTP sessions, the system stops both at static and dynamic breakpoints if a dynamic breakpoint was set in the editor of a BSP page before program execution.
    Lifetime and Transfer of Breakpoints
    A static breakpoint remains intact as long as the BREAK-POINT or BREAK-POINT name statement is not removed from the source code. Without saving, dynamic breakpoints only remain intact in the relevant internal session. However, they remain in effect during the entire user session if they are saved by choosing the menu path Breakpoints ® Save in the ABAP Debugger. For more details on the subject of user sessions and modes, refer to Modularization Techniques in the ABAP keyword documentation.
    If you call an HTTP session during a user session, only the HTTP breakpoints are loaded when the HTTP session is started. You activate HTTP debugging in the ABAP Editor by choosing Utilities ® Settings ® HTTP Debugging. Depending on the setting, the system then displays either the HTTP or standard breakpoints in the Editor.
    If you call an update session during a user session, breakpoints that were defined beforehand in the calling processing unit are copied to the new update session, where they can be displayed under Breakpoints. If, in the ABAP Debugger, you check Update Debugging under Settings and then, for example, call the update module func using CALL FUNCTION func IN UPDATE TASK, a new window is opened in which you can debug this function module in the update session. All the breakpoints that were set in the calling processing unit can also be processed here.
    we can keep them at :
    Statements
    Subroutines
    Function Module Calls
    at Methods
    System Exceptions
    break point :
    we can start debugging from that point or if we keep break point at some place we can directly got ot htat point using f6.
    watch point: for example if we have to check the output for 4000 records based on a field value i.e.for vendor number 'in'we have to check then we will create watchpoint on field LIFNR value '2000'. then we can directly go to vendor whose numbe ris 2000

  • What is LUW? How do we use it in SAP ABAP coding?

    Hi Friends,
    Kindly explain me what is LUW with examples and how do we use it in our ABAP coding with scenarios why and when we use it?
    Regards,
    Pradeep

    Hi,
    SAP LUW
    Die Verbuchungsverwaltung
    The Open SQL statements INSERT, UPDATE, MODIFY, and DELETE allow you to program database changes that extend over several dialog steps. Even if you have not explicitly programmed a database commit, the implicit database commit that occurs after a screen has been processed concludes the database LUW. The following diagram shows the individual database LUWs in a typical screen sequence:
    Under this procedure, you cannot roll back the database changes from previous dialog steps. It is therefore only suitable for programs in which there is no logical relationship between the individual dialog steps.
    However, the database changes in individual dialog steps normally depend on those in other dialog steps, and must therefore all be executed or rolled back together. These dependent database changes form logical units, and can be grouped into a single database LUW using the bundling techniques listed below.
    A logical unit consisting of dialog steps, whose changes are written to the database in a single database LUW is called an SAP LUW. Unlike a database LUW, an SAP LUW can span several dialog steps, and be executed using a series of different work processes. If an SAP LUW contains database changes, you should either write all of them or none at all to the database. To ensure that this happens, you must include a database commit when your transaction has ended successfully, and a database rollback in case the program detects an error. However, since database changes from a database LUW cannot be reversed in a subsequent database LUW, you must make all of the database changes for the SAP LUW in a single database LUW. To maintain data integrity, you must bundle all of you database changes in the final database LUW of the SAP LUW. The following diagram illustrates this principle:
    Database Logical Unit of Work (LUW)
    From the point of view of database programming, a database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it was in before the transaction started.
    The database changes that occur within a database LUW are not actually written to the database until after the database commit. Until this happens, you can use a database rollback to reverse the changes. In the R/3 System, database commits and rollbacks can be triggered either implicitly or using explicit commands.
    Implicit Database Commits in the R/3 System
    A work process can only execute a single database LUW. The consequence of this is that a work process must always end a database LUW when it finishes its work for a user or an external call. Work processes trigger an implicit database commit in the following situations:
    When a dialog step is completed
    Control changes from the work process back to the SAP GUI.
    When a function module is called in another work process (RFC).
    Control passes to the other work process.
    When the called function module (RFC) in the other work process ends.
    Control returns to the calling work process.
    When a WAIT statement interrupts the work process.
    Control passes to another work process.
    Error dialogs (information, warning, or error messages) in dialog steps.
    Control passes from the work process to the SAP GUI.
    Explicit Database Commits in the R/3 System
    There are two ways to trigger an explicit database commit in your application programs:
    Call the function module DB_COMMIT
    The sole task of this function module is to start a database commit.
    Use the ABAP statement COMMIT WORK
    This statement starts a database commit, but also performs other tasks (refer to the keyword documentation for COMMIT WORK).
    Implicit Database Rollbacks in the R/3 System
    The following cases lead to an implicit database rollback:
    Runtime error in an application program
    This occurs whenever an application program has to terminate because of an unforeseen situation (for example, trying to divide by zero).
    Termination message
    Termination messages are generated using the ABAP statement MESSAGE with the message type A or X. In certain cases (updates), they are also generated with message types I, W, and E. These messages end the current application program.
    Explicit Database Rollbacks in the R/3 System
    You can trigger a database rollback explicitly using the ABAP statement ROLLBACK WORK. This statement starts a database rollback, but also performs other tasks (refer to the keyword documentation for COMMIT WORK).
    From the above, we can draw up the following list of points at which database LUWs begin and end.
    A Database LUW Begins
    Each time a dialog step starts (when the dialog step is sent to the work process).
    Whenever the previous database LUW ends in a database commit.
    Whenever the previous database LUW ends in a database rollback.
    A Database LUW Ends
    Each time a database commit occurs. This writes all of the changes to the database.
    Each time a database rollback occurs. This reverses all of the changes made during the LUW.
    Database LUWs and Database Locks
    As well as the database changes made within it, a database LUW also consists of database locks. The database system uses locks to ensure that two or more users cannot change the same data simultaneously, since this could lead to inconsistent data being written to the database. A database lock can only be active for the duration of a database LUW. They are automatically released when the database LUW ends. In order to program SAP LUWs, we need a lock mechanism within the R/3 System that allows us to create locks with a longer lifetime (refer to The R/3 Locking Concept).
    The bundling technique for database changes within an SAP LUW ensures that you can still reverse them. It also means that you can distribute a transaction across more than one work process, and even across more than one R/3 System. The possibilities for bundling database changes within an SAP LUW are listed below:
    The simplest form of bundling would be to process a whole application within a single dialog step. Here, the system checks the user’s input and updates the database without a database commit occurring within the dialog step itself. Of course, this is not suitable for complex business processes. Instead, the R/3 Basis system contains the following bundling techniques.
    Bundling using Function Modules for Updates
    If you call a function module using the CALL FUNCTION... IN UPDATE TASK statement, the function module is flagged for execution using a special update work process. This means that you can write the Open SQL statements for the database changes in the function module instead of in your program, and call the function module at the point in the program where you would otherwise have included the statements. When you call a function module using the IN UPDATE TASK addition, it and its interface parameters are stored as a log entry in a special database table called VBLOG.
    The function module is executed using an update work process when the program reaches the COMMIT WORK statement. After the COMMIT WORK statement, the dialog work process is free to receive further user input. The dialog part of the transaction finishes with the COMMIT WORK statement. The update part of the SAP LUW then begins, and this is the responsibility of the update work process. The SAP LUW is complete once the update process has committed or rolled back all of the database changes.
    For further information about how to create function modules for use in update, refer to Creating Function Modules for Database Updates
    During the update, errors only occur in exceptional cases, since the system checks for all logical errors, such as incorrect entries, in the dialog phase of the SAP LUW. If a logical error occurs, the program can terminate the update using the ROLLBACK WORK statement. Then, the function modules are not called, and the log entry is deleted from table VBLOG. Errors during the update itself are usually technical, for example, memory shortage. If a technical error occurs, the update work process triggers a database rollback, and places the log entry back into VBLOG. It then sends a mail to the user whose dialog originally generated the VBLOG entry with details of the termination. These errors must be corrected by the system administrator. After this, the returned VBLOG entries can be processed again.
    For further information about update administration, see Update Administration
    This technique of bundling database changes in the last database LUW of the SAP LUW allows you to update the database asynchronously, reducing the response times in the dialog work process. You can, for example, decouple the update entirely from the dialog work process and use a central update work process on a remote database server.
    Bundling Using Subroutines
    The statement PERFORM ON COMMIT calls a subroutine in the dialog work process. However, it is not executed until the system reaches the next COMMIT WORK statement. Here, as well, the ABAP statement COMMIT WORK defines the end of the SAP LUW, since all statements in a subroutine called with PERFORM ON COMMIT that make database changes are executed in the database LUW of the corresponding dialog step.
    The advantage of this bundling technique against CALL FUNCTION... IN UPDATE TASK is better performance, since the update data does not have to be written into an extra table. The disadvantage, however, is that you cannot pass parameters in a PERFORM... ON COMMIT statement. Data is passed using global variables and ABAP memory. There is a considerable danger of data inconsistency when you use this method to pass data.
    Bundling Using Function Modules in Other R/3 Systems
    Function modules that you call using CALL FUNCTION... IN BACKGROUND TASK DESTINATION... are registered for background execution in another R/3 System when the program reaches the next COMMIT WORK statement (using Remote Function Call). After the COMMIT WORK, the dialog process does not wait for these function modules to be executed (asynchronous update). All of the function modules that you register in this way are executed together in a single database LUW. These updates are useful, for example, when you need to maintain identical data in more than one database.
    For further details, refer to the keyword documentation.
    For more details of RFC processing, refer to the Remote Communications section of the Basis Services documentation.
    Pls. reward if useful....

  • How does an enhancement of datasource affect my production data

    Hello All,
    We have enhanced a datasource 2LIS_11_VAITM, I want to know what will happen to my existing data in the production after i move the enanced datasource to production???
    will i need to clear the existing data in production after moving the same to another dummy cube O r will just running the deltas bring in the data for the enhanced fields as well without disturbing the existing data...
    Please respond. The issue is very critical..

    Hi,
    For all the historical data that already exists in your BI system, the data for the enhanced fields will not be populated but deltas would work absolutely fine and for all the new transactional changes, these fields will be filled. If you want to populate the data for historical data as well, you will have to carry out fill up of setup tables and reload the data to BI by initialising the data. If the data is being fed to DSO, I dont think that there is any need for deleting the data, as it would get overwritten by the new initialisation load.
    As such, please note that deltas will not get triggered if the only changes to Sales Order are for enhanced fields. Deltas will only be captured for the fields that are part of main communication structure. The motive for adding the enhaned fields is only to bring information for these fields.
    Edited by: Rahul K Rai on Sep 14, 2010 11:26 AM

  • ABAP coding issues after BW upgrade

    Hello Gurus,
    We recently did a BW upgrade from version 3.5 to 7.31 and even since have been encountering few strange issues with many of our ABAP coding.
    For example, there is an APPEND statement in one of our Update Rules as below:
    APPEND <lw_rtab_wa> TO <lt_rtab>.
    Before upgrade, this was working as expected and the contents of <lw_rtab_wa> was getting transferred to <lt_rtab> without any issues.
    Now after upgrade, we find that the contents of <lw_rtab_wa> is being clubbed together in the 1st few columns of <lt_rtab>.
    Both the <lw_rtab_wa> & <lt_rtab> have the same fields, but the length of few fields in <lt_rtab> is bigger than that in <lw_rtab_wa>. For example DOC_NUMBER in <lw_rtab_wa> is of type C(10) while in <lt_rtab> it is C(20). This difference is causing the data of the 2nd field also to be over-writen in the DOC_NUMBER field of <lt_rtab>.
    Please let us know if you have encountered similar situations after your BW upgrade. Any possible solutions to this would be very much appreciated as this is causing PROD issues at the moment!
    Thanks
    Arvind

    Hi Arvind,
    After Upgrade In BW 7.3 or higher versions All data elements that use the domain RSCHAVL are converted from CHAR60 to SSTRING. thats the reason you are getting that syntax error.
    Take help of some ABAP programmer and try to change the syntax as suggested from below link.
    Just scroll down and check the same. even though link shows for BW 7.4 issues, its applicable for 7.3 too. Please let me know
    http://scn.sap.com/community/data-warehousing/bw/blog/2014/07/28/sap-bw-74-analysis-issues
    Thanks
    Ajay

  • ABAP coding in LSMW

    Hi All,
    A)Is it possible to  write ABAP coding in LSMW, if yes where can we do this. and
    B)During the First Step of LSMW we come across 1. Standard/Batch Direct Input
                                                                          2.Batch input recording
                                                                          3.Business Object Method (BAPI)
                                                                          4.IDOC(intermediate document)
    which one to use and when to use?
    C) what are the advantages/disadvantages of LSMW compared to other data transfer methods like BDC.
    please let me know the answers for above.
    useful answers will be rewarded for the same.
    Regards,
    Yellappa.

    hi
    for q posed to ashvinder, its used only for validation of the input records and their corresponding processing, i will explain a simple scenario,
    1. if u want to transfer data a part of which has already been created in the system. You
    want to decide at runtime whether the data is created or changed.
    u can write this coding in corresponding field
    2. You want to "skip" a record depending on a certain condition, i.e. this record shall not be converted and transferred to the output file.
    3. Duplicate a Record
    If want complex pricing procedures u cant do that in LSMW, u need to go for BDC's
    for ur question about what to use, BAPI or IDOC, check this link
    http://www.sap-img.com/abap/ale-bapi.htm
    http://searchsap.techtarget.com/generic/0,295582,sid21_gci1089362,00.html?bucket=ETA&topic=299357
    award points if found helpful
    Message was edited by:
            Rahul Kavuri

  • Performance of ABAP coding very poor

    Hi gurus,
    I'm a newbie in ABAP programming.
    Currently, I managed to write an ABAP coding for BW to load data from a source DSO to target DSO.
    We are using BW 3.5.
    In the source, we have YTD amount as Key Figures.
    In the start routine, we use ABAP coding to calculate the Monthly value and Last 12 Months value.
    Monthly value is defined as: current month YTD - last month YTD (except when current month = January, then monthly value for January = YTD value for January)
    Last 12 months value is calculated for example as follow:
    for March 08, then Last 12 months value is April 07-March08
    Thus the formula for last 12 Months value is:
               YTD current month current year + YTD month12 last year - YTD current month last year
    I used internal table to read and store all of the information
    However, I need to read 3 times from internal table to get all of the necessary value to calculate the monthly value and last 12 months value.
    The performance is very low. The system runs for 40 minutes to read and calculate 15500 data.
    Therefore if you can perhaps give some hint/tip/tricks how to improve the performance of the code, it will be highly appreciated.
    Thank you very much in advance.
    Best regards,
    Fen
    My code is as follow:
    Define internal table to hold last year & current year data:
      DATA: LCYEARDATA type sorted table of /bic/aZABC3_O00
            with unique key /BIC/ZABC_ENTI /BIC/ZABC_ACC
            /BIC/ZABC_SUBA /BIC/ZABC_VERS CALMONTH
            with header line.
    Create variables needed to hold last month/year values.
      DATA: CALMONTHLOW TYPE /BI0/OICALMONTH.
      DATA: CALMONTHHIGH TYPE /BI0/OICALMONTH.
      DATA: CALYEARTHISYEAR TYPE /BI0/OICALYEAR.
      DATA: CALYEARLASTYEAR TYPE /BI0/OICALYEAR.
      DATA: CURRENTMONTH TYPE /BI0/OICALMONTH2.
      DATA: CURRENTMONTHLASTYEAR TYPE /BI0/OICALMONTH.
      DATA: LASTMONTH TYPE /BI0/OICALMONTH.
      DATA: CALMONTH12LASTYEAR TYPE /BI0/OICALMONTH.
      DATA: LASTMOYTD type /BI0/OIAMOUNT.
      DATA: LAST12MONTH TYPE /BI0/OIAMOUNT.
      DATA: YTDLASTYEAR type /BI0/OIAMOUNT.
      DATA: FIRSTRUN type N.
      DATA: MONTHLYVALUE type /BI0/OIAMOUNT.
      DATA: YTDMONTHLASTYEAR type /BI0/OIAMOUNT.
      DATA: AMOUNT type /BI0/OIAMOUNT.
    Set initial value of all variables to 0.
      CALMONTHLOW = 0.
      CALMONTHHIGH = 0.
      CALYEARTHISYEAR = 0.
      CALYEARLASTYEAR = 0.
      CURRENTMONTH = 0.
      CURRENTMONTHLASTYEAR = 0.
      LASTMONTH = 0.
      LASTMOYTD = 0.
      LAST12MONTH = 0.
      YTDLASTYEAR = 0.
      YTDMONTHLASTYEAR = 0.
      FIRSTRUN = 0.
      MONTHLYVALUE = 0.
      CALMONTH12LASTYEAR = 0.
    Loop through data package.
      LOOP AT DATA_PACKAGE.
        IF DATA_PACKAGE IS NOT INITIAL.
    First run:
          IF FIRSTRUN = 0.
    Get current year from any line in the data package.
            CALYEARTHISYEAR = DATA_PACKAGE-CALMONTH(4).
            FIRSTRUN = 1.
          ENDIF.
    Calculate last year (i.e. data package year - 1).
            CALYEARLASTYEAR = CALYEARTHISYEAR - 1.
    Calculate current month
            CURRENTMONTH = DATA_PACKAGE-CALMONTH+4(2).
    *Set CALMONTHLOW and CALMONTHHIGH as time period to fill the internal
    *table:
            CONCATENATE CALYEARLASTYEAR CURRENTMONTH INTO CALMONTHLOW.
            CONCATENATE CALYEARTHISYEAR CURRENTMONTH INTO CALMONTHHIGH.
    Fill internal table with Last Years data and Current Year data:
            select *
              from /bic/aABC2_O00
              into table LCYEARDATA
              WHERE CALMONTH >= CALMONTHLOW
                AND CALMONTH <= CALMONTHHIGH
                AND /BIC/ZABC_ENTI = DATA_PACKAGE-/BIC/ZABC_ENTI
                AND /BIC/ZABC_ACC = DATA_PACKAGE-/BIC/ZABC_ACC
                AND /BIC/ZABC_SUBA = DATA_PACKAGE-/BIC/ZABC_SUBA
                AND /BIC/ZABC_VERS = DATA_PACKAGE-/BIC/ZABC_VERS.
    Continue with the looping
    Get last month from current month.
            LASTMONTH = DATA_PACKAGE-CALMONTH - 1.
    *CHECK IF CURRENTMONTH = JAN then LastmonthYTD amount = 0, else read
    *from the internal table.
    *CURRENTMONTH = DATA_PACKAGE-CALMONTH+4(2). (this variable has been set
    *above)
            IF CURRENTMONTH = '01'.
              LASTMOYTD = 0.
            ELSE.
              READ TABLE LCYEARDATA
                WITH KEY
                /BIC/ZABC_ENTI = DATA_PACKAGE-/BIC/ZABC_ENTI
                /BIC/ZABC_ACC = DATA_PACKAGE-/BIC/ZABC_ACC
                /BIC/ZABC_SUBA = DATA_PACKAGE-/BIC/ZABC_SUBA
                /BIC/ZABC_VERS = DATA_PACKAGE-/BIC/ZABC_VERS
                  CALMONTH = LASTMONTH.
              IF sy-subrc IS INITIAL.
                LASTMOYTD = LCYEARDATA-AMOUNT.
              ENDIF.
            ENDIF.
    *Calculate Monhtly value for this month (to later be stored in data
    *package)
            MONTHLYVALUE = DATA_PACKAGE-AMOUNT - LASTMOYTD.
    Count value for Last 12 Months:
    1: Get the YTD Month12 Last Year & YTD CurrentMonth Last Year.
            CONCATENATE CALYEARLASTYEAR CURRENTMONTH INTO
            CURRENTMONTHLASTYEAR.
            CONCATENATE CALYEARLASTYEAR '12' INTO CALMONTH12LASTYEAR.
            READ TABLE LCYEARDATA
               WITH KEY
                /BIC/ZABC_ENTI = DATA_PACKAGE-/BIC/ZABC_ENTI
                /BIC/ZABC_ACC = DATA_PACKAGE-/BIC/ZABC_ACC
                /BIC/ZABC_SUBA = DATA_PACKAGE-/BIC/ZABC_SUBA
                /BIC/ZABC_VERS = DATA_PACKAGE-/BIC/ZABC_VERS
                 CALMONTH = CALMONTH12LASTYEAR.
            IF sy-subrc IS INITIAL.
              YTDLASTYEAR  = LCYEARDATA-AMOUNT.
            ENDIF.
            READ TABLE LCYEARDATA
              WITH KEY
                /BIC/ZABC_ENTI = DATA_PACKAGE-/BIC/ZABC_ENTI
                /BIC/ZABC_ACC = DATA_PACKAGE-/BIC/ZABC_ACC
                /BIC/ZABC_SUBA = DATA_PACKAGE-/BIC/ZABC_SUBA
                /BIC/ZABC_VERS = DATA_PACKAGE-/BIC/ZABC_VERS
                CALMONTH = CURRENTMONTHLASTYEAR.
            IF sy-subrc IS INITIAL.
              YTDMONTHLASTYEAR  = LCYEARDATA-AMOUNT.
            ENDIF.
    2. Specify YTD This month.
        AMOUNT = DATA_PACKAGE-AMOUNT.
    *3: Last 12 Months = (YTD Last Year - YTD Month Last Year) + YTD This
    *Month
           LAST12MONTH = YTDLASTYEAR - YTDMONTHLASTYEAR + YTDTHISMONTH.
           LAST12MONTH = YTDLASTYEAR - YTDMONTHLASTYEAR + AMOUNT.
    Save MONTHLYVALUE and LAST12MONTH to the DATA_PACKAGE.
            DATA_PACKAGE-/BIC/ZAMTMO = MONTHLYVALUE.
            DATA_PACKAGE-/BIC/ZAMTLTM = LAST12MONTH.
            modify DATA_PACKAGE.
            ENDIF.
          ENDLOOP.
        ABORT = 0.

    Hi,
    Just check these blogs to improve performance...
    The SQL Trace (ST05) u2013 Quick and Easy
    The SQL Trace (ST05) – Quick and Easy
    The ABAP Runtime Trace (SE30) - Quick and Easy
    The ABAP Runtime Trace (SE30) -  Quick and Easy
    Regards,
    Sachin

  • Docs for ABAP coding for BW

    Hello Gurus,
    I need some documents or links where i can find enough info to learn abt ABAP coding in transfer, update rules, ABAP routine in infopackage and in the start routine etc. Can any one help me with this?
    Looking for some basic concepts of ABAP.
    Thank you,
    Kumar
    [email protected]

    Hi,
    Please check the following links that may be useful for you.
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4493c4a6-0301-0010-62a2-efd6ded61e04https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/60cecb1d-0a01-0010-8289-b14fd99062fa
    http://www.bwexpertonline.com/downloads/ABAPCodeforRuvinskyarticle.doc
    http://www.bwexpertonline.com/downloads/Extractor_Source_Code.doc
    http://www.bwexpertonline.com/downloads/Nissen.doc
    https://www.sdn.sap.com/irj/sdn/abap
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    Regards,
    ®

Maybe you are looking for

  • ITunes not shutting down properly

    When I click iTunes > Quit iTunes on my iMac, the iTunes library window closes, and the iTunes menu bar disappears from the top left corner of the screen.  But the iTunes icon in the dock still has a white dot under it, implying the the iTunes app is

  • How to attach files in workflow notification response/reply message

    There is a requirement to respond to worklist notification or email notification with attachments, where in user attachs some data and replies back to notification and this attachments must be handled back by workflow and go to another user. Any idea

  • Flash Builder 4.6 won't start on my Mac 10.7

    I'm having trouble launching Flash Builder 4.6. It worked for a while, but now it boots, says its loading the workbench and then it silently quits. I've tried deleting the metadata folder and also renaming my workspace folder. Are there any other sol

  • Inspection lot generated without any movements

    Hello, Inpection lot is created on 15.02.2010 for a material, however there were no movements taken place on the material on 15.02.2010. The material has QM view activated with inspction types 01 & 04, Inspection lot 80000000003 is posted for Insp.lo

  • RRI warnings

    Hi, I looked at the forums on SDN and SAP library for my issue but I still have questions. I created a sender/receiver assignment for a query. The receiver is transaction va03 display sls order in our R/3 production system, and the infosrc is 2LIS_11