ABAP routine help required in BI

Hi Experts,
I have a some fields in DSO (Data Store Object) as below
_Code.................. Type.................... Date & Time_
1..............................A....................01/01/10    01:00:00
1..............................B....................01/01/10    02:00:00
2..............................A....................02/01/10    01:00:00
2..............................B....................02/01/10    02:00:00
2..............................C....................02/01/10    03:00:00
3..............................A....................03/01/10    01:00:00
3..............................B....................03/01/10    02:00:00
I need to have the above details in my DSO in single line like
Code.......Type A Date & Time........Type B Date & Time..........Type C Date & Time
1.........01/01/10    01:00:00........01/01/10    02:00:00
2.........02/01/10    01:00:00........02/01/10    02:00:00......02/01/10    03:00:00
3.........03/01/10    01:00:00........03/01/10    02:00:00
Can any expert please provide me the ABAP code to bring the code details in the single line.
Maximum points will be assigned.
Thanks

Not resolved

Similar Messages

  • URGENT ** ABAP ROUTINE HELP

    Hi gurus,
                 I am write a ABAP routine to fetch G/L acount form zpur_acc DSO for a joining consition of PO # and line item #.
    I am not etting the desired result. Can some one please lookinto the code and debug it.
    Here I am reading OI_EBELN and OI_EBELP from the incoming data but since I am in BI7.0 how can I use info object (OI_EBELN , OI_EBELP) directly or it should be referenced via communication structure-filed name? What is the name of communication structure in Bi 7.0?
    data: wa_tab type /BIC/AZPUR_ACC00.
    select single * into wa_tab from /BIC/AZPUR_ACC00
    where
    OI_EBELN = wa_tab-OI_EBELN
    and
    OI_EBELP = wa_tab-OI_EBELP.
    *and objvers = 'A'.
    result = wa_tab-GL_ACCOUNT.
    Warm Regards,
    Anil

    METHOD compute_0GL_ACCOUNT.
      IMPORTING
        request     type rsrequest
        datapackid  type rsdatapid
       EXPORTING
         RESULT type tys_TG_1-GL_ACCOUNT
        DATA:
          MONITOR_REC    TYPE rsmonitor.
    $$ begin of routine - insert your code only below this line        -
    ... "insert your code here
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
    data: wa_tab type /BIC/AZPUR_ACC00.
    select single * into wa_tab from /BIC/AZPUR_ACC00
    where
    OI_EBELN = wa_tab-OI_EBELN
    and
    OI_EBELP = wa_tab-OI_EBELP.
    *and objvers = 'A'.
    *result = wa_tab-GL_ACCOUNT.
    ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
    ... "to skip a record
       raise exception type CX_RSROUT_SKIP_RECORD.
    ... "to clear target fields
       raise exception type CX_RSROUT_SKIP_VAL.
         RESULT = wa_tab-GL_ACCOUNT.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "compute_0GL_ACCOUNT

  • New Abaper! Help required

    Hello Everybody
                 I am a fresher in the ABAP field and I have an interview on the coming Sunday & honestly speaking I am very nervous. Can anyone help me by providing me some interview questions which could be asked in an ABAP interview and DO'S & DONT'S in the interview.
    Thankyou,
    Regards.
    Edited by: @deelmsd on Mar 2, 2011 3:48 AM
    Moderator Message: Before you find out the Do's and Dont's in Interviews, find out the Do's and Dont's of these forums. You can find them in the Rules of Engagement Wiki provided in the first thread of every forum here in SCN.
    Edited by: kishan P on Mar 2, 2011 11:22 AM

    >a laptop
    You need to post a link so people may look... or at least copy/paste the hardware information
    Many (most?) laptops use 5400rpm drives, and you really need 7200rpm drives for even SD video editing
    You also need AT LEAST 2 hard drives (2 separate drives, never partitions on one drive) so you have Windows and all software on the boot drive, and all video and temp files on the 2nd hard drive
    I edit SD video with a setup like that... desktop not laptop... and it is "OK" albeit a bit slow when transcoding to DVD
    See http://www.pacifier.com/~jtsmith/ADOBE.HTM
    Added
    You mentioned an external drive... that may work as long as it is not USB... a USB drive does not have a fast enough data transfer rate for editing... a Firewire or ESata external should be OK

  • ABAP Routine in UR Help

    Hi Friends
    We are on BI7 and ECC6.
    We have to get the quantities into BI from ECC for that we are using one field from 2lis_11_vaitm. But we want to count the quantity only when material is a complete package all other values should be 0. Packages are described in the material as for example DMS PACKAGE , DST PACKAGE , DTTS PACKAGE DTTTT PACKAGE.
    Now My thinking is ,Inorder to do that we have to use the offsets in ABAP routine. But the first few letters are not 3 / 4 fixed it may be 3, 4, 5 or 6 letters the PACKAGE will start from the next word..
    Can any one help me how to write the ABAP logic to get the offset for last 11 letters ?
    regards

    F2 & F3 TYPE I.
    F1 = 'DTTS PACKAGE' (F1 contains the value)
    F2 = LENGTH(F1) (F2 determines the length of the field)
    OR
    F2 = STRLEN(F1)
    F3 = F2 - 11 (F3 determines the difference)
    F4 = F1+F3(11) (F4 picks up value based on offset)
    *Not sure if variables are accepted for offsets.

  • ABAP Trans routine help

    Hi
    I'm writing below abap routine in transrules to bring the plant from ZODS_01 active table :
      SELECT SINGLE PLANT INTO ZPLANT
      FROM /BIC/AZODS_01
      WHERE DOC_NUMBER = TRAN_STRUCTURE-VBELN
      AND /bic/ZCODE = 'SE'.
    Code is working if there is only one record exist in /BIC/AZODS_01 with ZCODE = SE. But if there is more records exist with different codes including SE, its not brining the SE value. Do I need to remove the Single from SELECT statement or do I need to loop this in start rotuine to loop through every record until it finds SE ?
    Please advice.

    Hello
          Writing a SELECT SINGLE is not good if we want a better Code Performance , as for each record it hits the data base , which inturn will increase the load time . rather its suggested that Do one select with For all entries of data package & subsequently at INfo Object level have READ statement . some time like below
          SELECT
         PLANT
            FROM /bic/a<DSO Name>
            INTO TABLE Internal table
             FOR ALL ENTRIES IN source_package
           WHERE doc_number = source_packagedoc_number
    & read would like below
        READ TABLE Internal table  INTO wa_doc
             WITH TABLE KEY doc_number = SOURCE_FIELDS-doc_number
    If this suggestion looks good , & need more code help do let me know
    Thanks
    Vivek

  • Call function in abap routine of infopackage

    Experts,
    Good day. I have a problem concerning the data to be imported in my ods.I can't find a similar thread corcerning my problem. My ‘File date’ field should contain only 2 years and 3months data of recent data. I'm using a call function fima_date_create to filter values of zfile_date.
    CALL FUNCTION 'FIMA_DATE_CREATE'
      EXPORTING
        I_DATE                             = sy-datum
        I_FLG_END_OF_MONTH   = ' '
        I_YEARS                          = 2-
        I_MONTHS                        = 3-
        I_DAYS                             = 0
        I_CALENDAR_DAYS          = 0
        I_SET_LAST_DAY_OF_MONTH       = ' '
      IMPORTING
        E_DATE                             =
        E_FLG_END_OF_MONTH   =
        E_DAYS_OF_I_DATE         =   
    The sy-datum becomes the “High” value and the date generated by this FM will be the “low” value. I already tested this function module and it is what i want. How Should I write the ABAP code for this in the abap routine for my infopackage? Or what steps do I need to take.

    Hi,
    When you choose the option to write a routine for one of the characteristics in the infopackage selections, you get a window to write your code with some prewritten code as below. Modify it as shown below, for your requirement.
    data: l_idx like sy-tabix.
    read table l_t_range with key
         fieldname = 'CALDAY'.
    l_idx = sy-tabix.
    START of YOUR CODE
    <----
    Required logic -
    >
    L_T_RANGE-LOW  = <lower limit of range>.
    L_T_RANGE-HIGH = <upper limit of range>.
         L_T_RANGE-SIGN = 'I'.
         L_T_RANGE-OPTION = 'BT'.
    END of YOUR CODE
    modify l_t_range index l_idx.
    p_subrc = 0.
    Hope this helps.

  • ABAP Routine code for the below logic

    Hello BW Experts ,
    I need to write a complex ABAP routine in BW .
    Following is the detail explaination .
    Can anyone tell me the ABAP code for the below logic?
    It would be a greate help as I am unable to do this
    since last two days.
    WBS Elements are maintained at  IOS and  Warranty levels in R/3 side.
    The IOS WBS is a top level of WBS element and below that the Warranty WBS level.
    The IOS and Warranty WBS elements can be differentiated by means of priority field.
    When priority = i   , WBS Element is known as  IOS Level WBS Element and
    When  priority = Y the WBS element is known as Warranty WBS element.
    The Equipment Number is maintained compulsorily at IOS Level WBS elements only.
    It is not maintained at  Warranty WBS Element.
    But the Cost is maintained at Warranty WBS Elements.
    In BW I need all Warranty WBS ( priority = Y) along with their cost figures and Equipment Numbers.
    But as the Equipment Number is not maintained compulsorily at Warranty WBS level we have asked to
    Copy it from  IOS WBS ( priority = i ) and assign it to Warranty WBS level ( priority = Y ).
    So I have included the Equipment Number in the ODS and in update rules I need to write the routine for it as
    per the above logic.
    The Equipment Number is coming from Master data of  WBS Element.
    The WBS element master data we are loading in BW .
    Also the same WBS Element transaction data is coming from the transaction data data source in BW.
    Following fields / infoobjects and the table names in BW :
    1. Equipment Number : /BIC/ZEQUIPMNT  and table name /BIC/MZWBS_ELEM.
    2. WBS Element       : ZWBS_ELEM  is coming from transaction data data source as well as master data.
                                     In ODS update rules it is coming from  transaction data data source Comm_structure-ZWBS_ELEM.
                                     Also we are loading separetly the master data for ZWBS_ELEM.
                                     The  ZEQUIPMNT is an attribute of ZWBS_ELEM.
    3. Priority                :  PRIORITY     and table name /BIC/MZWBS_ELEM.
                                      The info object name for Priority is 0Priority but in master data table /BIC/MZWBS_ELEM
                                      the field name is    PRIORITY.
                                     When PRIORITY = ' i ' then    ZWBS_ELEM is at IOS Level
                                     When PRIORITY = ' y ' then  ZWBS_ELEM is at Warranty Level.
    4. ODS name :  /BIC/AZCOST00 and same is table name active data table .
    So please tell me the routine Code .
    Best Regards ,
    Amol.

    Hi Dinaker,
    Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
    Thanks,
    SAPBWI

  • ABAP routine in DTP

    hi,
    I need some help withe ABAP routine in the DTP selection
    I have requirement to load the data for specific company codes on a specific days.
    If the current date is monday then it should pick Taiwan  or
    if the current date is Tuesday the it should pick Australia and Korea or
    if the current date is sunday then it should pick CHINA and Vietnam.
    I want to use only one DTP for this requirement. Please help me with the code for Info Object 0COMP_Code.
    Regards,
    Raghu

    hi,
    I have tried the code and it is not populating any value in the selection.
    Please check
    data: l_idx like sy-tabix.
    data: day like SCAL-INDICATOR.
    *Finding out the day
      clear day.
      CALL FUNCTION 'DATE_COMPUTE_DAY'
        EXPORTING
          DATE = sy-datum
        IMPORTING
          DAY  = day.
      read table l_t_range with key
           fieldname = 'COMP_CODE'.
      l_idx = sy-tabix.
    case day.
        when 1.                                 "Monday
          l_t_range-low = '0711'.
          l_t_range-high = ' '.
          l_t_range-option = 'EQ'.
          l_t_range-sign   = 'I'.
          modify l_t_range index l_idx.
        when 2.                                 "Tuesday
          l_t_range-low = '0355'.
          l_t_range-high = ' '.
          l_t_range-option = 'EQ'.
          l_t_range-sign   = 'I'.
          modify l_t_range index l_idx.
        when 3.                                 "Wednesday
         l_t_range-low = '0211'.
          l_t_range-high = ' '.
          l_t_range-option = 'EQ'.
          l_t_range-sign   = 'I'.
          modify l_t_range index l_idx.
       when 4.
       when 5.
       when 6.
       when 7.
         l_t_range-low = 'China'.
         l_t_range-high = ' '.
         l_t_range-option = 'EQ'.
         l_t_range-sign   = 'I'.
         modify l_t_range index l_idx.
    endcase.
    p_subrc = 0.

  • OLAP variable in ABAP Routine.

    In data selection of Infopackage, I have used a OLAP variable. Is it possible to access the routine for OLAP variable in a ABAP routine?? How to proceed for the same???

    Hi,
    There are function modules for SAP variables.
    -     RSVAREXIT_variablename
    -     RREX_VARIABLE_EXIT (for variables to be processed see include LRREXTOP).
    Customized variables with exit can be accessed by FM EXIT_SAPLRRS0_001.
    If you are able to transfer mandatory parameters, just implement call of required FM
    Into report. If not, you have to copy and adopt coding desired from the FMs.
    Hope this helps
    Joe

  • ABAP Routine in the Infopackage data selection

    All,
    I have requirement where i need to write a routine on a Date field(Activity Year Month) which has to return values from the first to the last day of the Previous month in the data selection of the infopackage.
    I know that on Date there is a STD that can be used but my requirement is on Year Month.
    there are 3 vartypes available
    5. free temporal selection
    6. ABAP routine
    7. OLAP variable
    when i pick ABAP routine it asks me to create a routine i need some help with the code here
    Can someone help.
    Thanks

    Hi there
    If the Data field is 0FISCPER you can use the OLAP variable 0P_PRFP1. If you have developed the field yourself i think you need to write code. The code could look something like this.
    DATA:  sysdat TYPE d.
      sysdat = sy-datum.
      sysdat4(2) = sysdat4(2) - 1.
      IF sysdat+4(2) = '0'.
        sysdat+4(2) = '12'.
        sysdat(4) = sysdat(4) - 1.
      ENDIF.
      CONCATENATE sysdat(4) '0' sysdat+4(2) INTO l_t_range-low.
      MODIFY l_t_range INDEX l_idx.
      p_subrc = 0.
    This code returns the previous months as a single value.
    Chris

  • Infopackage Abap Routine (Selection based on other fields?)

    Dear Friends,
    I know that Abap routine is used in infopackage to select or restrict using complex data selection.
    My requirement is to restrict Material no field based on 4 other fields. Is that possible?
    Actual condition is  to load Material no only if other 4 fields combination is new.
    Pls help.
    Guru

    Hi,
    Yes you can do this at infoPackage level using the ABAP routine.
    First read the Active Table of the DSO into internal table and do a lookup for the required four fields combination.
    If these four field are new allow the material number.
    Refer the below link for more help.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a05ac9fa-f44c-2c10-dbb8-ef54c102707c
    Regards
    Manjula.B

  • Useful data selection abap routines

    Hello Experts,
    Can you advise where I could reference useful abap routines for data selection in infopaks? I desperately need these to help meet specific requirements.
    Thanks,
    Ernest Corvino

    Dear Ernesta,
    Infopackage->DataSelection->After from and to values you see a column called type, write '6' and enter.. it asks for ABAP routine ..
    The following are taken on F1 over there for you..
    In this field you determine the variables for periodic data loading.
    If you want to load the data periodically from the source system into BW, and you want selection field contents (such as date fields) to change periodically, please choose one of the following F4 options:
    For data fields:
    get yesterday
    Yesterday's date is automatically set in the date field.
    get last week
    Last week is automatically set in the date field.
    get last month
    Last month is automatically set in the date field.
    get last quarter
    Last quarter is automatically set in the date field.
    get last year
    Last year is automatically set in the date field.
    free selection
    You can also change other fields periodically as you wish. You can find further information in the documentation under Scheduler.
    Regards,
    Hari

  • ABAP routine at Infopackage selection options

    Dear all,
    I need to write ABAP Routine at InfoPackage Selection Options.
    Requirement is to bring only the versions (contains 2 characters) starting with 'C'.
    Ex. I need versions CR, CP...
    Code template is the following:
    data: l_idx like sy-tabix.
    read table l_t_range with key
         fieldname = 'VERSB'.
    l_idx = sy-tabix.
    modify l_t_range index l_idx.
    p_subrc = 0.
    Can anybody help me to resolve this?
    Regards

    Hi,
    here is an example:
      DATA: string(40) TYPE c.
      CONCATENATE 'C' '%' INTO string.
      SELECT *
      FROM /bi0/hwbs_elemt
      INTO TABLE lt_hwbs_elemt
      WHERE nodename LIKE string.
    Best regards,
    Frank

  • Execute a package with an abap routine

    Hi experts,
    I need to execute an infopackage througth an abap routine.
    Can anybody tell me what is the code i need to implement it?
    Thanks.

    Hello Olivier,
    We need run the same IP simultaneously with different selections.
    This selections have to be configured with an ABAP routine.
    The ABAP routine is into a standard BADI.
    The BADI is always called when a user runs a task in the consolidation monitor of BCS.
    In the BADI a method returns all the parameters that we need to configure the selection in the package filters.
    I´ve tried run the same IP with different selections and there was no problems.
    "would say you should create one InfoPackage    for each set of selection and you can run all of them together using a process chain or InfoPackage    group"
    It is impossible because we would have more than 1000 selection combinations so we would need the same number of IPs. When a user calls a task in the consolidation monitor, the task depends on the society, version, period, year ...
    I hope this helps to understand better the requirement.
    Regards

  • Populate new fields in DSO (DBTable) with ABAP routine

    Hi,
    I've added a couple of fields to a DSO. The DSO contains a large number of records (60m+) and I have a tight window to cutover so the activation time would be an issue if I use a loop transformation. Therefore, I am looking to populate the additional fields directly in the Active table using an ABAP routine.
    One of the fields is a key figure to be derived from an existing CHAR field so would need to apply some logic during update, such as IF <CHAR_FIELD> CA 'ABC'. <KYF_FIELD> = 1 etc.
    Aside from fairly basic Start Routines my ABAP is very poor so was wondering if anyone can help me with the syntax or, preferably some sample code to achieve this.
    Thanks in advance,
    Ad

    Hi,
       In transformation of the cube, choose routine  for char E.
       There you can assign value in RESULT field. Actually RESULT field is assigned to E, find the code below,
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
    ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
    ... "to skip a record
       raise exception type CX_RSROUT_SKIP_RECORD.
    ... "to clear target fields
       raise exception type CX_RSROUT_SKIP_VAL.
      (* insert your abap code here to find the value of E*.)
         RESULT =                     * assign the value you got for E here.
    rgrs,
    v.sen

Maybe you are looking for

  • Using TImed Access mode on Airport Extreme with other routers in bridge mode. Not working as expected.

    I am trying to setup timed access mode on my airport extreme in order to limit the times devices can connect to my network, but I am having some trouble. My setup is as follows  Cable Modem ---> Airport Extreme ---> Netgear router The Airport is runn

  • Applescript to encode mp3, add ID3 info, ftp result now available

    Hi, I've been working with three other guys on a podcast for a little while now, and I got tired of all the stuff that comes after editing -- compressing to mp3, adding ID3 tags, and ftp'ing up to my podcast host. So I wrote an Applescript that autom

  • Batching outbound transactions

    I have a business requirement to correlate and batch outbound responses with inbound transactions. I receive inbound files from various customers that contain a set of documents I need to construct the outbound file with responses to the same set of

  • Libxml/xmlstring.h not found

    Hi I am developing a sample application using iphone sdk in which I have to parse xml. If I import <libxml/xmlstring.h> or any .h file from libxml I am getting compilation error libxml/xmlstring.h not found. I have already added libxml2.2.dylib in fr

  • Exchange 2010 Mailbox Auditing Owner Sent Items (Create)

    I have activated Mailbox auditing feature for a Mailbox "Set-mailbox -identity User1 -auditenabled $true | Set-Mailbox -Identity User1 -Auditowner harddelete,create", I need to audit sent ítems (create), but the Search command didn´t show any results