Variable in routine

Hi,
Some one  please.
what is type of ABAP variable using in transfer or update routines.
Thanks,
Pria

Hi,
Variable is, it is just you are declaring for further processing usage.
Eg:
Data: dat like sy-datum
Here dat is a variable, so in this way you can declare variables in routines, there is no separate  ABAP variables.
Thanks
Reddy

Similar Messages

  • Infopackage Selections Tab-OLAP Variable/ABAP Routine

    Hi Experts
    In my Infopackage Selections Tab i had Cal Mon/Year field....
    As per my requirment i have to write a selection condion that when we execute info package (it is a monthly data load)  it will extract data only for the months greater than or equal to current month
    Please update me on how can i achieve this either by using OLAP Variable or ABAP Routine in infopackage...will be great if can provide the required ABAP Code
    Thanks in Advance

    here's an example that fills the fiscal year from last month (bold is customer code... the rest is standard):
      data: l_idx like sy-tabix.
      read table l_t_range with key
           fieldname = 'PARAM_P_GJAHR'.
      l_idx = sy-tabix.
      data:
      v_caldy type /BI0/OICALDAY,
      v_calmn type /BI0/OICALMONTH,
      v_calyr type /BI0/OICALYEAR.
      v_caldy = sy-datum.
    determine first day*
      v_caldy+6(2) = '01'.
    determine last month*
      subtract 1 from v_caldy.
      v_calyr = v_caldy(4).
      l_t_range-sign   = 'I'.
      l_t_range-option = 'EQ'.
      l_t_range-low    = v_calyr.
      modify l_t_range index l_idx.
      p_subrc = 0.

  • Store # in a variable in routine

    HI experts,
    I am calcualting the difference of two dates  during transformation in a routine and i want that value "#" should be displayed in the report even if one of the dates is blank ie. no data for that date.
    Right now the variable is giving the value 0 and not # in the report if one of the dates is blank.
    Kindly recommend a solution to this problem.

    Hi singh,
    you can achieve this using Query properties.
    in Query designer, goto query properties,
    in the dialog box, goto dispaly properties, there u will find Display Zeros as, select it and give # in the textbox.
    Assign points if helpful.

  • Setting/using a variable in a package in SQL Developer

    The 10g db I'm working with has a package that contains a variable and routines to set and get the value of the variable. The variable is used in a number of views to tailor data displayed according to the variable value. This all works well in applications, which set the variable after a connection is opened and then issue queries against the views, and then close the connection.
    This also works well in Toad - I can open Toad, run a package routine to set the value and then open views (or run queries against views) in Toad to see how different variable values effect the data displayed. The package variable maintains its value so long as Toad is open, which seems to imply that Toad keeps a connection open.
    But I can't use SQL Developer in the same way. I can run the SET routine, but it has no effect in on views subsequently run. When running the SET routine, setting the value to 1, the output is:
    Connecting to the database HERC DB.
    Process exited.
    Disconnecting from the database HERC DB.
    I can then run the GET routine, but the value of the variable is always zero:
    Connecting to the database HERC DB.
    v_Return = 0
    Process exited.
    Disconnecting from the database HERC DB.
    The implication seems to be that a connection is made, the routine is run and then the connection is closed. The closing of the connection resets the variable. Is there some way I can have SQL Developer behave like Toad, such that the package variable value is maintained for my SQL Developer session? I've looked at connection roperties and application preferences, but I've not seen anything that seems to be related keeping a connection open.
    BTW, I have tried the "connection startup script", but to no avail. Perhaps I've doen this improperly; the script simply attempts to invoke the package set routine, like so: myPkg.set_identity(1)
    Thanks.
    Edited by: user483973 on Oct 20, 2009 9:20 AM

    When running stored PL/SQL through the IDE context node or editor, indeed a new session is opened and consequently closed on completion after committing. Although great for having the IDE free to continue working, it does have its drawbacks when you want variables to persist and changes to be visible in the IDE before committing.
    To prevent the new session and the commit, just call the PL/SQL from a worksheet (in a call, query or anonymous block).
    The startup script should work in that respect, but make sure to wrap your call in an anonymous block, else you'll get a syntax error.
    Hope that helps,
    K.

  • Variable substitution in Unit Testing validation - Date format?

    Using SQL Developer unit testing, I am having difficulty comparing Date datatype in a validation.
    I use a Dynamic Value Query to set the parameters of an insertion procedure under test.
    select * from (select doc_nbr as p_mstr_doc_nbr, doc_nbr as p_assoc_doc_nbr, sysdate as p_date_added from documents sample(0.01) order by dbms_random.random)  where rownum <= 1;So P_DATE_ADDED is a DATE datatype.
    I wish to validate that the insertion was correct. So I run a Process Validation returning one or more rows.
    SELECT * FROM X100_ASSOC
      WHERE MSTR_DOC_NBR = '{P_MSTR_DOC_NBR}'
        AND ASSOC_DOC_NBR = '{P_ASSOC_DOC_NBR}'
        AND to_char(DATE_ADDED,'dd-MON-yy HH24:MI:SS')  = {P_DATE_ADDED};I understand that the {P_DATE_ADDED} is substituting in a string. From Help page :
    "What is actually substituted is the string representation of the parameter value. For example:
    If P1 is a parameter of type NUMBER and has the value 2.1, the string {P1} will be replaced by the string 2.1.
    If P1 is a parameter of type VARCHAR2 and has the value ABC, the string '{P1}' will be replaced by the string 'ABC'. (Note the single-quotation marks around {P1} in this example.)"
    I need to know the format that the date is cast into as a string. Then I can do the comparision on the where clause.
    Any answers? or details of where is more in depth documentation?
    Thank you,
    Bill

    I agree as a general rule. However in this case, it appears that the variable substitution routine is returning the default format. So to compare my expected data to the returned data I choose to use the default format. If the variable substitution routine specified an explicit format, I would use that. In my original question, I asked if anyone knew the format.
    Regards,
    Bill

  • Routine at info package level

    Hi Friends,
    i have seen routine option at extraction tab of info provider.
    Pls can any one explain me in which secenario we can write this one.
    Thanks in advance,
    Thanks& Regards,
    Ramnaresh.
    Edited by: ramnaresh porana on Dec 16, 2008 3:28 AM

    Hi Ramnaresh,
    Infopack level routine is gen used to calculate selection at runtime... for eg a very basic eg wud be running an infopack for the current month. Now every month, value for current month will change and hence we can write a small routine to calculate current month...
    to write infopack level routine u enter 6 in Variable Change type... and start writing routine
    Fill below variables in routine to get desired result!!
    L_T_RANGE-SIGN
      L_T_RANGE-OPTion
      L_T_RANGE-low
      L_T_RANGE-high
      modify l_t_range index l_idx.
    regards
    Aadil

  • Routine in Infopackage - Extraction

    Hi All,
    I want to know ; How to write Routine in the Infopackage Extraction?
    I know that we can write Routine in Infopackage extraction.
    PLease let me know the steps.
    Regards,
    Macwan James.

    Hi
    In ifopackage we use routine for selection, please find below threads related to this which will be helpfull to you:
    Infopackage Selections Tab-OLAP Variable/ABAP Routine
    ABAP Routine correction in the selections fields of a Infopackage
    Re: how to write routine for infopackage
    Regards
    Ravi

  • How to Create DTP Filter Variable?

    Hi experts!
    I noticed that in filter screen of Data Transfer Process it's possible to choose as filter besides a routine a variable too.
    But how and where I have to define this variable?
    Thanks a lot.
    Angelo

    Hi,
    If necessary, we determine filter criteria for the delta transfer. To do this, choose  Filter.
    This means that you can use multiple data transfer processes with disjunctive selection conditions to efficiently transfer small sets of data from a source into one or more targets, instead of transferring large volumes of data. You can specify individual selections, multiple selections, intervals, selections based on variables, or routines. To change the list of InfoObjects that can be selected, choose Change Selection.
    The  icon next to pushbutton  Filter indicates that predefined selections exist for the data transfer process. The quick info text for this icon displays the selections as a character string.
    Hope this helps u..
    Best Regards,
    VVenkat...

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • Queries on Extraction Tab while DTP creation

    Hi ,
    Could you please explain the following  :
    DTP - > Extraction Tab :
                1. Only Get Delta Once
                2. Get all new data Request By Request
           - > Delta Init. Extraction From. Tab  :
                1.Active Table (with Archive)
                2.Active Table (without Archive)
                3.Archive(Full Extraction Only)
                4.Change LOg
    Edited by: Garima on Dec 2, 2008 3:39 PM

    HI,
    If necessary, we can use  filter criteria for the delta transfer. To do this, choose  Filter.
    This means that you can use multiple data transfer processes with disjunctive selection conditions to efficiently transfer small sets of data from a source into one or more targets, instead of transferring large volumes of data. The filter thus restricts the amount of data to be copied and works like the selections in the InfoPackage. You can specify single values, multiple selections, intervals, selections based on variables, or routines. Choose Change Selection to change the list of InfoObjects that can be selected.
    The  icon next to pushbutton  Filter indicates that predefined selections exist for the data transfer process. The quick info text for this icon displays the selections as a character string.

  • How to debug a runtime stack underflow error?

    I'm really struggling to resolve a stack underflow that I'm getting.  The traceback I get at runtime is:
    VerifyError: Error #1024: Stack underflow occurred.
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    This is particularly difficult to debug because when I run in debug mode it does not happen at all.  It only happens when compiled as a release.
    Does anyone have any tips on how to debug a Stack Underflow?  Are have a clean explanation of what that means for Flash?
    In case it helps, this error is occurring when I click a button whose handler makes an RPC call, which uses a URLLoader, an AsyncToken, and then invokes the set of AsyncResponder instances associated with the AsyncToken.  With some server-side logging as well as some logging hacked into the swf, I know that the UrlLoader is successfully doing and GET'ing a crossdomain.xml file, is correctly processing it (if I wreck it, I get a security error), and is also successfully completing the "load" request (the server sends the data)... the underflow seems to be happening in the Event.COMPLETE listening/handling process (as is, of course, implied by the traceback as well).
    mxmlc used = from flex_sdk_4.5.0.20967
    Example player (I've tried a few) = 10.2.153.1

    Peter Blazejewicz wrote:
    crossposted:
    http://stackoverflow.com/questions/6270837/how-to-debug-a-runtime-stac k-underflow-error
    Yes... I intended to say so here but didn't get to it yet.  View traffic was extremely low here and I thought I'd see how stackoverflow compared.  I tend to check there first for most languages usually, but thought I'd try here as well to see if I should break that habit.
    As per the SO post, my specific problem was resolved by switching my variable initialization routine from the "initialize" application event, to the onCompletion event.  Although I am obviously "happy" about this since this issue cost me a lot of time and hair, it does not really indicate how I would go about debugging such an internal error in the future, so the question is technically unanswered.
    As to the question from Flex harUI, I am compiling indirectly via the MXMLC in the SDK, through the Amethyst Visual Studio plugin (which I'm auditioning).  The only libraries involved are from the flex_sdk_4.5.0.20967 SDK.  The project is quite small (a test project), consisting only of 1 MXML file and 2x .AS files.

  • Using a variable in an allocation routine in SAP BPC 7.5NW

    Below is a very simple BPC allocation routine I wrote.  The data originally sits on a dummy profit center and needs to be allocated to all itu2019s relevant profit centers. These relevant profit centers can be derived from the profit center hierarchy (BPC_ + ID of entity).
    When I hardcode the Profitcenter and the entity, the routine works (as below). But what I really want is that it works variable as in the line that I commented out. Any idea whether this could work (BPC 7.5NW)  ? If not, I am afraid I need to go to ABAP, which is really a pitty
    //ALLOCATION PROCEDURE CONVERSION RATE
    //=====================================
    *RUNALLOCATION
    *FACTOR=1
    *DIM SEBACCOUNT WHAT=CONV_RATE; WHERE=<<<; USING=<<< ; TOTAL=<<<
    //*DIM PROFCENT WHAT=DUMPC; WHERE=BAS(BPC_"%ENTITY_SET%");USING=<<<; TOTAL=<<<
    *DIM PROFCENT WHAT=DUMPC; WHERE=BAS(BPC_OKB);USING=<<<; TOTAL=<<<
    *DIM ENTITY WHAT=OKB; WHERE=<<<; USING=<<< ; TOTAL=<<<
    *ENDALLOCATION
    Thanks
    Nico

    Gersh,
    It works now. I have implemented the below code (ENTITY needed to contain the variable as well). The relationship profitcenter and entity is very important as it derives the relevant profitcenters from the profit center hierarchy (e.g. all profitcenters under the legalentity node).
    //ALLOCATION PROCEDURE CONVERSION RATE
    //=====================================
    *FOR %ENT% = %ENTITY_SET%
    *RUNALLOCATION
    *FACTOR=1
    *DIM SEBACCOUNT WHAT=CONV_RATE; WHERE=<<<; USING=<<< ; TOTAL=<<<
    *DIM PROFCENT WHAT=DUMPC; WHERE=BAS(BPC_%ENT%);USING=<<<; TOTAL=<<<
    *DIM CATEGORY WHAT=FCSTCUR; WHERE=<<<; USING=<<< ; TOTAL=<<<
    *DIM ENTITY WHAT=%ENT%; WHERE=<<<; USING=<<<; TOTAL=<<<
    *ENDALLOCATION
    *NEXT
    Thanks
    Nico

  • Customer Exit variable and Filter routine in DTP does not works?

    Hello Experts,
    Does anyone know what might be the possible reason - A customer exit variable working fine on the OLAP side does not work in a DTP??
    I have also tried to use the Filter routine, which does not give me the right results..I am trying to fetch a Fiscalyear period maintained in an infoObject as follows in my Filter routine..
    ata: sel_period like /BIC/PZPARAM-/BIC/ZPARAMVAL.
    DATA: zperiod type /BI0/OIFISCPER.
              SELECT SINGLE /BIC/ZPARAMVAL INTO sel_period
              FROM /BIC/PZPARAM
              WHERE /BIC/ZPARAM = 'ZPCA'
              AND objvers = 'A'.
              zperiod = sel_period.
    data: l_idx like sy-tabix.
              read table l_t_range with key
                   fieldname = 'FISCPER'.
              l_idx = sy-tabix.
              l_t_range-iobjnm = '0FISCPER'.
              l_t_range-fieldname = 'FISCPER'.
              l_t_range-sign = 'I'.
              l_t_range-option = 'EQ'.
              l_t_range-low = zperiod.
              if l_idx <> 0.
                modify l_t_range index l_idx.
              else.
                append l_t_range.
              endif.
              p_subrc = 0.
    Please let me know if I am making any mistakes above..
    Kind Regards,
    Kadriks

    Hi
    1.  CLEAR l_t_range-high. is missing in your code befor assigning values to l_t_range.
    2. use simple append l_t_range after the l_t_range asisgnments. remove below code :
    if l_idx 0.
    modify l_t_range index l_idx.
    else.
    append l_t_range.
    endif.
    p_subrc = 0.
    3. I dont think you need to assign infoobject.
    4. Clear sel_period and zperiod is also missing
    Hence your code should be  :
    data: l_idx like sy-tabix.
    read table l_t_range with key
    fieldname = 'FISCPER'.
    CLEAR l_t_range-high.
    l_idx = sy-tabix.
    l_t_range-fieldname = 'FISCPER'.
    l_t_range-sign = 'I'.
    l_t_range-option = 'EQ'.
    l_t_range-low = zperiod.
    append l_t_range .

  • How to populate the variable created in start routine to a field.

    Hi
    I have created a variable ZCUST in the Start routine and I have written some code to populate this value. Now there is a field in the update rules, Z_YTCUST. I want to assign the result of the variable created in start routine to this field. How can I go abt doin this? I have tried but for some reason the result shows 0.
    Thank you.

    Hi,
           Make sure the variable used in the start routine is a global variable. then assign the value u get it from the start routine in the update rule result field.

  • 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

Maybe you are looking for

  • Creating and Selecting a line in After Effects CC?

    OK, So I suppose this is a two part question... But there is a little thing in After Effects CC that is annopying me alot, and it could just be me, and the way I've been doing things... 1) The way I have creating a simple Line in After effects, is by

  • M2v and AC3 dont Merge in Toast

    Hello maybe i was wondering why doesnt Toast Joins the M2v and AC3 files sometimes when i'm trying to burn them, i mean all this these years i have been joining them as usual but since some months ago sometimes i just add the Video file and doesnt as

  • This page cannot be displayed - web connectivity problem

    Just purchased an HP laptop with Windows 8 and IE 10. I am connecting to my wireless connection because I can login and use Yahoo messenger, but cannot access any websites.  When open IE, get the error:  This page cannot be displayed.  There is an op

  • Drop shadow changes when layers merged

    When saving a Photoshop file as a pdf or jpeg, my layers get flattened and the drop shadows I have around some of my elements become much lighter. Is there something I should be doing to my layers containing drop shadows to keep them in tact?  Also,

  • How to determine which iPad i need 16mb or 32mb ?

    I am trying to figure out which ipad i need 16mb or 32mb not sure.