How to write ABAP Routeines in Update/Transfer Rules ?

Hi Experts,
Iam new to BW and i don't have ABAP knowledge.Can any body help me ..to write ABAP Routeines in Update rules/Transfer rules.Give me some basic knowledge with proper example.and what type of routeines we need to write ?
I will appreciate if some one helps me with proper Documentation.My mail id is [email protected]
Points will be rewarded.
Thanks in advance,
Nayanasri.

Hi Nayanasri,
It is not mendatory that u need to write Update routines for all update rules. It depends on the requirement. Without update routine u can always manage. My last implementation was for a small chemical firm where i did not use any of the update routine. Suppose if u want to change the records in datapackage depending on certain conditions, then u can go for this. I'm just pasting one of my update routine program
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line  -
TABLES: ...
DATA:   ...
$$ end of global - insert your declaration only before this line   -
The follow definition is new in the BW3.x
TYPES:
  BEGIN OF DATA_PACKAGE_STRUCTURE.
     INCLUDE STRUCTURE /BIC/CS8YGTGDCL6B.
TYPES:
     RECNO   LIKE sy-tabix,
  END OF DATA_PACKAGE_STRUCTURE.
DATA:
  DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
       WITH HEADER LINE
       WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
  TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
           MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
           DATA_PACKAGE STRUCTURE DATA_PACKAGE
  USING    RECORD_ALL LIKE SY-TABIX
           SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
  CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line        -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
DELETE DATA_PACKAGE WHERE /bic/yverbr NE  'V2'.
DELETE DATA_PACKAGE WHERE /bic/ydpbasfs = 0 AND /bic/yoplqty = 0.
ENDFORM.
Where the delete statement deletes the records when the field /bic/yverbr noe equals to 'V2' or deletes it when /bic/ydpbasfs equals zero.
If the explanation is not suffecient, pls post further
Regards
Sriram

Similar Messages

  • How to write a Globla Routine for Transfer Rules

    Hi Experts,
    How to write a Global Routine for Tranfer Rules ? Where all the infoobjects need to be grouped? Effect need to be shown on group of fields that are available in a single structure.
    Thanks in Advance
    Vara

    Hi,
    Are you aware of Start Routine available?.. This helps to write a routine on all the infoObjects available in Transfer Structure
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm
    regards
    Happy Tony

  • How to write ABAP HR reports in ABAP web dynapro

    Hi All,
    How  to write ABAP HR reports in ABAP web dynapro? We can add HR REPORT CATEGORY in ABAP HR using logical database like PNP.How to add HR REPORT CATEGORY in ABAP Webdynapro ?
    Thanks.

    You can't use legacy concepts like logical databases directly in Web Dynpro ABAP.  Even if you could do so, you shouldn't.  Web Dynpro ABAP should always follow MVC - meaning that your business logic (the model) should be separated from WD as much as possible. This means calling function modules or class methods to consume the business logic and data.  So in general there should be no difference between building HR reports or any other type of report in WDA - since from the WDA side you are calling other objects to consume the data. 
    This probably does mean that you will need to create classes to expose the HR data that you want in your WDA.

  • How to write a procedure for update the table

    Hi all
    can any body please tell me how to write a procedure to update the table......
    I have a table with about 10,000 records...........Now I have add a new column and I want to add values for that like
    registration Code Creidits
    13213 BBA
    1232 MCS
    I had add the creidit now i want to update the table.........the new value want to get by SQL like
    Creidit = select creidit from othere_table...........
    Hope u can understand my problem
    Thanks in advance
    Regards
    Shayan
    [email protected]

    Please try the following --
    update Program_reg a
    set TotalCreidit = ( select tot_cr <Accroding to your logic>
                                from Program_reg b
                                where a.Registration = b.Registration
                                and    a.Enrollment = b.Enrollment
                                and    a.code = b.code
    where a.Registration in ( select distinct Registration
                                        from Program_reg );
    N.B.: Not Tested....
    Regards.
    Satyaki De.

  • HOW TO WRITE ABAP PROGRAMMING IN JAVA BY USING NETWEAVER

    HI,
    i am working with bapi(mean is calling bapis in my java programs).
    please tell me the how to write abap programs in nwds
    Thanqqqqqqqqq
    Guru

    Hi,
    Refer the following links..
    http://manuals.sybase.com/onlinebooks/group-iaw/iag0203e/iadgen2/@Generic__BookTextView/24685
    and this blog
    /people/kathirvel.balakrishnan2/blog/2005/07/26/remote-enable-your-rfchosttoip-to-return-host-ip-to-jco
    Regards,
    Uma

  • How to refer field of DataSource in transfer rule for DSO object  in BI 7.0

    hello Gurus,
    I am new to BI 7.
    pls tellme how to refer field of DataSource in transfer rule for DSO object.
    I will assign points to proper answer.
    Praveen.

    hi praveen,
    when u create the transformation for the DSO, it asks for the source. in that you enter your datasource, then you get the datasource fields on one side and the rules in the middle and the DSO objects on the other side. whichever field of DataSource you want to refer in tranformation rule, just connect that field to the rule for the required object of the DSO.
    hope this will help you.
    regards
    vaibhav

  • How to write ABAP Workflow test script

    Hi
    Please any body tell me what is the workflow test script. And how to write. Please if any body have the documentation please share wd me

    For some reason I think the test script will depend on the workflow build, maybe because a test script is scenario specific? So if you need to create a test script for a workflow, you will need to analyze the documentation created for the workflow and maybe the workflow itself. Then you can create a script. If you don't know how to create a test script I think you will need to check a different forum.
    Regards,
    Martin

  • How to write abap code to create manual hierarchy

    Hi,
    This is urgent got to write abap code to create manual hierarchy.
    Thanks

    Hi Adam
    Thanks for replying.
    In my scenario i have one custom zinfoobject which have lots of attributes.
    So, i have to create hierarchy for this zinfoobject with three nodes. one node/charateristic is present in this zinfoobject as attribute. which will be the first node of hierarchy.
    Then second custom infoobject is external not present in attribute list. which will be the second node of hierarchy.
    Third node will be for which i am creating hierarchy.
    So basically need solution for this first.
    some one will load hierarchy info in some table and then will create view on top of that then i have to create datasource on top of that and write a program to load the data from that view in this hierarchy.
    Need solution for this abap program also.
    Thanks
    SAPBW

  • Unable to collect Update/Transfer rules Info & Data sources from BI content

    Hi,
    We are tyring to activate Infoprovider 0PY_CO2 from BI content by selecting the option - In data before. BI is unable to collect all corresponding objects such as Update rules, Info source, transfer rules and the data source for the selected Infoprovider. Only Info area and associated info objects are being collected for the installation.
    We are experiencing same problem whilst acitvating most of the info providers. However, in some cases, either of these objects get activated but not all the necessary objects that feed data to the Infoprovider (cube or multi provider).
    Also, Infopackages and Info object catalogs are not being collected for any objects activated/installed so fare from the BI content.
    We are trying to activate BW 3.5 content on the BI 7.0 environment. BI Content release is 703 and support pack level is 008.
    Kindly share any pointers to troubleshoot this probelm please.
    Thanks
    Venkat

    Shiv,
    For some Info providers, all associated info objects(including transfer & update rules and info source and data sources) are getting collected and got successfuly installed. But this is true for only 10% of the Info providers that we have installed so far.
    Remaining all the objects, we are unable to proceed further.
    Thanks
    Venkat.

  • Transform Update/transfer rules into DTP in Standard Business Content

    Hi all,
    I have a new installation of BI 7.0, and we are massively going to use Standard BC delivered by SAP.
    I received an input from to transform all Update/Transform rule contained in the Standard BC, into DTP.
    First of all I noticed that in the area of interest for our scope the DTP delivered with the standard content are a very small percentage of the all Standard BC (area HCM, FIN, SC). Is it possible?
    Second I have to perform ana analysis on impact/benefits/consequence of performing this transformation. We tried already, but we had some errors, and we had to stop.
    Can you please help me?
    Many Many Thanks
    Valentina

    TR/UR will be migrated to Transformations not DTP - DTP is jst like an Infopackage which loads data from PSA to Datatargets.
    Migrate TR/UR before you Migrate datasources.
    Migrate datasources with WITH EXPORT in RSDS.
    Change the Routines accordingly to OO ABAP.
    There is no standard BC for Transformations and DTP's.

  • How to write ABAP code behind, the OLAP navigation functions

    Hi SDN Community,
    We have created an artificial hierarchy within BEx, using order structure elements, or characteristic key figures as SAP calls them.
    Now, the only feature that dosent seem to be present within the OLAP, is to expand all hiearchy nodes.
    It allows you to expand one hierarchy node, but not all the structure element nodes.
    I have tried command sequencing by specifying the technical id's of the the structure elements found via RSRT2, but this dosen't work.
    I have seen that when the nodes are expanded, that there is indeed standard SAP ABAP code executing back in the datawarehouse.
    Hence, do you know
    - Where to make ABAP enhancements for OLAP functionality
    - How to execute this ABAP (will it be by using Web API and javascript enhancements)
    - Is this possible, or has it been done by anyone?
    Thank you.
    Simon

    Hi Thomas,
    I have been working with a brilliant ABAP'er, and together we
    implemented a solution in the START method, that makes use of the
    following methods and expands all the hierarchy nodes at start.
    And this class can be omitted in the Print all view we have formulated
    as only a collapsed view has been specified there.
    thank you.
    Simon
    I found this all in that class interface CL_RSR_REQUEST
    for N_R_REQUEST
    for N_R_DATA_SET
    Initial Value: Set Drilldown State of a Hierarchy
    Description: 'SET_DRILL_STATE'
    this looks like the method that gets executed. what do you think?
    can you code this in the program
    constants C_CMD_SET_DRILL_STATE type RSRCMDID
    value 'SET_DRILL_STATE'. "#EC NOTEXT
    methods SET_DRILL_STATE
    importing
    value(I_AXIS) type RRXAXIS optional
    value(I_POSITION) type I optional
    value(I_FOCUS_IOBJNM) type RSIOBJNM optional
    value(I_DRILLSTATE) type RRXDRILLSTATE optional
    value(I_TOGGLE) type RS_BOOL default RS_C_FALSE
    !I_R_PARAMETER type ref to CL_RSR_PARAMETER optional
    exporting
    !E_KEEP_LAST_LINES type I
    !E_KEEP_FIRST_LINES type I
    !E_NEW_LINES_FROM type I
    !E_NEW_LINES_TO type I
    !E_NODE_POSITION_FROM type I
    !E_NODE_POSITION_TO type I
    exceptions
    NO_PROCESSING
    X_MESSAGE .

  • How to write ABAP code to split a sentence into Word by Word and store them

    Hi all,
        I have to split a sentence into word by word and store them into separate columns. This sentence is nothing but a text description (TXTMD) from table TXXXX. The description will have 3 or more than 3 words and LAST word will be <b>always with %</b>'. The following is the sample input data:
    KEY(ORD43)       Description(TXTMD)
    'AAAA'                '1234  ABCD COMPANY USA  80%'
    'BBBB'                '4745  XYZ INC CANADA ABCD  70%'
    For the first record:
      '1234' should stored in to <b>Field 1</b>, 'ABCD COMPANY USA' into <b>Field 2</b> and
    '80%' into <b>Filed 3</b>.
    For the second record:
      '4745' should stored in to <b>Field 1</b>, 'XYZ INC CANADA ABCD'  into <b>Field 2</b> and 70%' into <b>Field 3</b>.
      The first word into Field 1, the last word with % into Field 3 and all middle words into Field 2. The number of words in the sentence could be 3 or more than 3.
      Could you please help in writing the ABAP for this requirement ????
      Thanks in advance.
    Regards,
    Venkat.

    Easy way if you know the length of the field.
    In my example I assumed my field has 12 places.
    DATA: obs TYPE string,
           bkp TYPE char12.
    obs = '12345678901234567890123456789012345678901234567890'.
    DO.
       MOVE obs TO bkp.
       SHIFT obs BY 12 PLACES LEFT.
       write: / bkp.   "Do what you want with bkp variable
       IF obs IS INITIAL.
         EXIT.
       ENDIF.
    ENDDO.

  • How to write ABAP code to split a sentence into Word by Word ???

    Hi all,
    I have to split a sentence into word by word and store them into separate columns. This sentence is nothing but a text description (TXTMD) from table TXXXX. The description will have 3 or more than 3 words and LAST word will be always with %'.
    This description is available on R/3 table and in InfoObject on BW side and this split is required in reporting. Should I split it in R/3 itself or BW side, PLEASE ?
    The following is the sample input data:
    KEY(ORD43) Description(TXTMD)
    'AAAA' '1234 ABCD COMPANY USA 80%'
    'BBBB' '4745 XYZ INC CANADA ABCD 70%'
    For the first record:
    '1234' should stored in to Field 1, 'ABCD COMPANY USA' into Field 2 and
    '80%' into Filed 3.
    For the second record:
    '4745' should stored in to Field 1, 'XYZ INC CANADA ABCD' into Field 2 and 70%' into Field 3.
      The first word into Field 1, the last word with % into Field 3 and all middle words into Field 2.
    Could you please help in writing the ABAP for this requirement ????
    Thanks in advance.
    Regards,
    Venkat.

    Hi,
    in case your text is built in that way for every record you can do the following in routines of the update rules to the 3 fields:
    routine for field 1:
    result = comm_structure-<name of your textfield>(4).
    routine for field 2:
    data: l_length type i.
    l_length = strlen( comm_structure-<name of your textfield> ).
    l_length = l_length - 9.  "the 5 characters at the beginning + 4 at the end.
    result = comm_structure-<name of your textfield>+4(l_length).
    routine for field 3:
    data: l_length type i.
    l_length = strlen( comm_structure-<name of your textfield> ).
    l_length = l_length - 3.
    result = comm_structure-<name of your textfield>+l_length(3).
    hope this helps!
    kind regards
    Siggi

  • How to write ABAP Logic in SAP Query to fetch records from many Tables

    Hi Expert,
    I have one requirement, want to display all BOM (Equipment BOM, Function Location BOM and Meterial BOM) from a particular plant.
    List of tables as below:
    EQST: Equipment to BOM Link
    TPST: Link Between Functional Location and BOM
    MAST: Material to BOM Link
    STPO:BOM item
    Requirement: When user enters Plant then SAP Query should execute and fetch all BOMs (as mentioned above) from STPO Table.
    I have done so far is as follows:
    I create User Group, Infoset and SAP Query.
    While creating INFOSET, i used 4 tables (EQST,TPST,MAST & STPO) and link between then is as follows:
    STPO-STLNR ---> EQST-STLNR : Left Outer Join
    STPO-STLNR ---> TPST-STLNR : Left Outer Join
    STPO-STLNR ---> MAST-STLNR : Left Outer Join
    Now its showing all BOM from all plants though I enter one Plant value.
    Please advise me to write SAP Query and Logic to fetch all BOM from selected Plant Value.
    Thanks,
    Jay.
    Edited by: jaykrishna007 on Jul 29, 2011 11:41 AM

    Hi FCannavo,
    Thanks for your quick reply.
    See, now I changed my Infoset design.
    I added one Plant Table (T001W) and then
    T001W-WERKS--->EQST-WERKS
    T001W-WERKS--->MAST-WERKS
    T001W-WERKS--->TPST-WERKS
    and then
    EQST-STLNR--->STPO-STLNR
    MAST-STLNR--->STPO-STLNR
    TPST-STLNR--->STPO-STLNR
    on selection screen, user will enter Plant Value.
    Now its showing some records, but i dont think so i would be correct output or not, please guide me whether it is correct or not?
    Thanks,
    Jay.

  • How to write a user password update page to update jazn-data.xml?

    Many thanks!
    Or is there any container managed servlet?

    Can someone help on this?
    I am just looking for an example (may be with a 2 column matrix), not somebody to write full code as per my requirements for me.

Maybe you are looking for

  • Status Update of Service Order From Billing Document

    Dear Experts, I am told to change the User status of Service Order once the Billing Document is Generated. Here we are in CRM 2007 and i have done the status update of previous document but here Billing document is not possible to read through CRM_OR

  • After Effects CC (2014) MacPro Performance??

    I just installed the new After Effects CC (2014) on my 2013 MP with 2 D700s.  I am not noticing any significant difference from the previous version of AE.  GPUs are still showing as 2GB of VRAM (see below).  I dropped in a 5K (5120x2700) R3D clip in

  • HT3782 What does it mean "Battery Health" Check battery in the battery menu bar?

    What does it mean "Battery Health" Check battery in the battery menu bar?

  • How to make CS5 hotspots work like rollovers

    Hello, I have this project where I am taking a map of a country and wanting to make each state a hotspot that when you click on it, will show 2 or 3 images of that state that the person can click on for more information. I want to create hotspots so

  • BEA Liquid Data, Enosys XQuery Server

    Is anybody using BEA's Liquid Data product? How does it compare to Enosys Server? http://www.enosyssoftware.com/news/pr111802a.html http://edocs.bea.com/liquiddata/docs10/index.html http://edocs.bea.com/liquiddata/docs10/faq/index.html