Diff Using and changing in Perform

Hi All,
       What is the difference betwen USING and CHANGING in Perform.
Thanks in advance
                                              Ranjith

hi,
Using helps to use the parameter value passed.
Changing helps to change the parameter value and then use the same in main program with changed value.
Sample:
data : val1 type i value 1,
       val2 type i value 0.
perform calc using val1 changing val2.
Write / : 'Changing :' , val2.
write / : 'Using :' , val1.
*&      Form  calc
      text
     -->P_VAL1  text
     <--P_VAL2  text
form calc  using    p_val1
           changing p_val2.
p_val2 = p_val1 + 100.
*p_val1 = p_val1 + 100.
*Since p_val1 is passed as using,the above is not *permitted
endform.                    " calc
This link will clear all your Doubts reagrding Perform Statement.
Have a look:
http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm
rgds
anver

Similar Messages

  • Using and chaning in perform statement

    Hi,
    can anyone explain the purpose of using and changing in perform statemnt
    the using and changing fields in the corresponding form statemnts differs  from the one in perform statment.
    Can anyone explain me with a simple statement
    Thanks
    Kajol

    Hi kajol,
    Check the code below:
    Imagine you need to change the date of v_datum and send the result to  v_datum_ok.
    data: v_datum(10) type c value '10/02/2007',
            v_datum_ok type dats.
    PERFORM F_TEST USING v_datum CHANGING v_datumok.
    Below is the form code:
    FORM F_TEST USING P_DATUM CHANGING P_DATUM_OK.
    data: v_day(2) type c,
            v_month(2) type c,
            v_year(4) type c.
    split P_datum at '/' into v_day v_month v_year.
    concatenate v_year v_month v_day into p_datum_ok.
    ENDFORM. "F_TEST

  • Using and changing

    Hi sir,
    what is the diff b/w using and changing keywords for passing the perameters to subroutine and form

    Hi ,
       By default if you pass a varaible as Using , you cannot change the value of it in the subroutine  but in case of chianging it can be.
    Now you can pass the value of using paramater by pass by value , it allows you to change the value in the subroutine but once you are out of the subroutine the changed value is lost and the original value is retained.
    So in case you want to change value of a parameter you are passing to a subroutine use changing and if you just want to use its value then use using.
    Here is a code which might help you understand it better
    REPORT .
    data  : one type  i ,
            two type i.
            one = 1.
            two = 1.
    perform chnage_value using one
                         changing two.
    write /: one , two.
    *&      Form  chnage_value
          text
         -->P_ONE  text
         <--P_TWO  text
    form chnage_value using value(p_one)
                      changing p_two.
    p_one = p_one + 1.
    p_two = p_two + 1.
    endform.                    " chnage_value
    regards
    Arun

  • Perfor using and Changing Concept

    Hello Guys,
               Can anybody describe in detail about PERFORM USING and CHANGING concepts. because i am using multiple times the perform statememnt for a same fuctionality so i want to use the single PERFORM statement for multiple number of times.
    Moderator Message: Basic question please read the F1 documentation.
    Edited by: Suhas Saha on Oct 10, 2011 6:55 PM

    place your cursor over PERFORM and hit F1.
    Or search the forum. I suspect anyone will take his time to write an essays according to this here.
    technically there is no difference as far as ai know of, thos you shouldnt change data that you got via USING.

  • Subroutines using and changing

    Hi All,
    I am using a subroutines like this.
    data num1 type i.
    data num2 type i.
    data res type i.
    num1 = 10.
    num2 = 20.
    perform add.
    form add.
    res = num1 + num2.
    write : res.
    endform.
    This returns the result.
    But what are the changes if I use changing and using parameters and how do i use it in the current context.
    Regards.
    Sagar

    hi,
    in ur code ur r passing static local data to subroutine.
    data num2 type i.
    data res type i.
    num1 = 10.
    num2 = 20.
    perform add.
    form add.
    res = num1 + num2.
    write : res.
    endform.
    but if u use using and changing formal parameters ,then they can behave as dynamic local objects to the subroutine:
    the code will look like:
    perform add using num1 num2 changing res.
    form add using x type i
                          y type i
                 changing z type i.

  • TS3988 iCloud will not accept any passwords after upgrading OS. 2 days of trying every password I have ever used, AND changing Apple ID and iTunes ID, still nothing. Can't backup on iCloud anymore.

    How can I use iCloud again after upgrading OS to Mountain Lion?  2 days of trying every password I have ever used, AND changing Apple ID and iTunes ID, still nothing. Can't backup on iCloud anymore.

    Apple ID's can be used for anything, a single ID can be used for all your accounts (ie iCloud, iTunes, MAS, Apple community etc), ideally this would be the way forward. So far as iTunes goes you need to continue to use the same ID as you have always used or you will lose access to your previous purchases and your iTunes match subscription.
    If you are using a second ID for iCloud, you can continue to do so or use the ID you use for iTunes, but if you choose the later you will need to move all your calendar, contact etc data to the account using the ID you use for iTunes.
    When (if) you change which account you use you would delete the account on an iOS device and log back in with the correct details, on a mac you would sign out in the iCloud system preference pane.

  • Can Firefox guess the input language being used and change spelling dictionaries automatically?

    I have three input languages and their dictionaries enabled in Firefox. However, when I start typing in Spanish, the whole text will be underlined as having spelling mistakes because if the dictionary is set to English. I am constantly writing in either English, Spanish, and/or French, and find it annoying to have to change the dictionary manually. Is there a way that Firefox can detect the input language being used and change the dictionary automatically?

    Try the [https://addons.mozilla.org/en-US/firefox/addon/3414/ Dictionary Switcher] add-on.

  • Difference between Using and Changing

    hi,
    while defining subroutines, what is the exact difference between Using and Changing?
    when we pass by reference we can use both and while passing using value we can use both + Value (VAR).
    Then what is the exact difference between two?
    Also, what is formal parameter?q
    Moderator message - Please do not ask or answer basic questions - thread locked
    Edited by: Rob Burbank on Dec 14, 2009 3:31 PM

    Hi C`hinmay,
    When a subroutine is called with "USING" you can make use of the value inside your subroutine but you cannot change the value. With CHANGING you can CHANGE the value too. Formal parameter is the PARAMETER NAME used while defining the interface of a Subroutine.
    Regards,
    Ravi.

  • Diffrence b/w USING AND CHANGING

    can any one tell me diffrence between USING and CHNAGING.
    whether USING a (or) CHANGING a are equevalent?

    hi prasanth,
    see there r 3 types of psaaing rt
    1.pass by value
    2. pass by reference
    3. pass by value and return
    1.using value(a)----
    this is pass by value
    2.using (a) or changeing (a) -
    this is pass by reference
    3. changing value(a) -
    this is pass by value and return.
    pass by value and return -
    this is pass by reference only if u dont exit from the subrotune expicitly. means if inside the form, there is exit statement or any other statement which forcibly returns from the control from the form with out reaching the end of the form, then it acts as pass by value else it acts as pass by refernce.

  • Confusion on using USING/CHANGING in PERFORMS and FORMS

    I got a little confused with PERFORM statements.
    As far as I understood, the FORM definition is the one that ultimately defines which variable is going to be handled by value and which by reference (Using either USING, USING VALUE(...) or CHANGING (which is a particularity to deal with recursive functions). Thus, why does the PERFORM statement also accepts the CHANGING option ?
    Should I worry with the way the PERFORM statement is written or can I simply imply from it the values of the parameters passed, in a given moment of execution ?
    Thanks
    Avraham

    Hi
    The USING and CHANGING additions in the FORM statement define the formal parameters of a subroutine. The sequence of the additions is fixed. Each addition can be followed by a list of any number of formal parameters. When you call a subroutine, you must fill all formal parameters with the values from the actual parameters. At the end of the subroutine, the formal parameters are passed back to the corresponding actual parameters.
    Within a subroutine, formal parameters behave like dynamic local data. You can use them in the same way as normal local data objects that you would declare with the DATA statement. They mask global data objects with the same name. The value of the parameters at the start of the subroutine is the value passed from the corresponding actual parameter.
    Parameters Passed by Reference
    You list these parameters after USING or CHANGING without the VALUE addition:
    FORM <subr> USING    ... <pi> [TYPE <t>|LIKE <f>] ...
                CHANGING ... <pi> [TYPE <t>|LIKE <f>] ...
    The formal parameter occupies no memory of its own. During a subroutine call, only the address of the actual parameter is transferred to the formal parameter. The subroutine works with the field from the calling program. If the value of the formal parameter changes, the contents of the actual parameter in the calling program also change.
    For calling by reference, USING and CHANGING are equivalent. For documentation purposes, you should use USING for input parameters which are not changed in the subroutine, and CHANGING for output parameters which are changed in the subroutine.
    To avoid the value of an actual parameter being changed automatically, you must pass it by value.
    Input Parameters That Pass Values
    You list these parameters after USING with the VALUE addition:
    FORM <subr> USING    ... VALUE(<pi>) [TYPE <t>|LIKE <f>] ...
    The formal parameter occupies its own memory space. When you call the subroutine, the value of the actual parameter is passed to the formal parameter. If the value of the formal parameter changes, this has no effect on the actual parameter.
    Output Parameters That Pass Values
    You list these parameters after CHANGING with the VALUE addition:
    FORM <subr> CHANGING ... VALUE(<pi>) [TYPE <t>|LIKE <f>] ...
    The formal parameter occupies its own memory space. When you call the subroutine, the value of the actual parameter is passed to the formal parameter. If the subroutine concludes successfully, that is, when the ENDFORM statement occurs, or when the subroutine is terminated through a CHECK or EXIT statement, the current value of the formal parameter is copied into the actual parameter.
    If the subroutine terminates prematurely due to an error message, no value is passed. It only makes sense to terminate a subroutine through an error message in the PAI processing of a screen, that is, in a PAI module, in the AT SELECTION-SCREEN event, or after an interactive list event.
    reward if useful
    Regards
    Pavan

  • Using n Changing

    Can any body tell me why do we use 'using'  and 'changing'.
    what is the use of them.
    for Eg in the code below :
    FORM help_input_file  USING    p_phys_file   TYPE c
                                   p_locl_file   TYPE c
                          CHANGING p_source_path TYPE any.

    Hi,
    ... USING [VALUE(p1)|p1] ... [VALUE(pn)|pn]
    Effect
    Defines formal parameters p1,...pn, which are replaced by actual parameters when the subroutine is called.
    You can assign a type to the formal parameters p1, ..., pn (see specifying types). You can also specify the method with which they are passed.
    Note
    Passing methods:
    USING ... p ...
    The parameters are passed by reference. The field passed can be changed within the subroutine. The changes are kept beyond the subroutine.
    USING ... VALUE(p) ...
    The VALUE(...) addition passes the parameter by copying the field contents to a corresponding local field. VALUE parameters behave in the same way as local fields.
    ... CHANGING [VALUE(p1) |(p1)] ... [VALUE(pn) |(pn)]
    Effect
    The parameters after CHANGING can accept the same specifications as those after USING.
    To link the VALUE specification with the change of a parameter value, you can use the addition CHANGING ... . Then, all the formal parameters specified by VALUE(...) are transported back to the actual parameters at the end of the subroutine (i.e. after ENDFORM). If the subroutine is terminated by a dialog message, none of the parameters referenced by CHANGING VALUE ... changes.
    Otherwise, the effect of USING and CHANGING is identical.
    Reward if useful.
    Regards,
    U. Uma

  • For one Urgent Change during performing the Approval(chnging the status to 'To be Tested') system does not recognize any changes using the CTS WBS BOM in the development system. The transaction is therefore incorrect or the status was reset by the system.

    For one Urgent Change while performing the one of the Approval before changing the status to 'To Be Tested'
    We are getting below error.
    The system does not recognize any changes using the CTS WBS BOM in the development system. The transaction is therefore incorrect or the status was reset by the system.
    COuld anyone please help us to know, How it can be resolved?
    We also have this below error.
    System Response
    If the PPF action is a condition check, the condition is initially considered as not met, and leads to another warning, an error message, or status reset, depending on the configuration.
    If the PPF action is the execution of a task in the task list, and the exception is critical, there is another error message in the document.
    Procedure
    The condition cannot be met until the cause is removed. Analyze all messages in the transaction application log.
    Procedure for System Administration
    Analyze any other messages in the task list application log, and the entries for the object /TMWFLOW/CMSCV
    Additional Information:
    System cancel RFC destination SM_UK4CLNT005_TRUSTED, Call TR_READ_COMM:
    No authorization to log on as a trusted system (Tr usted RC=0).
    /TMWFLOW/TU_GET_REQUEST_REMOTE:E:/TMWFLOW/TRACK_N:107
    For above error Table /TMWFLOW/REP_DATA_FLOWwas refreshed as well but still the same error.

    If you are in Test System, you can use function module AA_AFABER_DELETE to totally delete the depreciation area (tcode SE37, specify chart of depreciation and depreciation area), After that recreate your depreciation area and run AFBN. But before you do that, have you created a retirement transaction type that limits the posting on your new depreciation area? If not create one.
    Hope this helps.
    Thanks!
    Jhero

  • Performance problem using on change

    Hi abapers,
    i am using ON CHANGE OF...END ON,,, AT END OF statements in My program.
    will this statements effect on performance.
    if so , is there any alternative?
    please help .

    Hi Ramesh,
       I don't know what are the performance implications with this statement, but SAP says that it is an Obsolete control structure.
    You cannot use them in class contexts.(This statement is forbidden in classes).
    More over, SAP Hep also says that,
    <b>"For each time the statement ON CHANGE OF is executed, the content of all the specified data objects is saved as an auxiliary variable internally in the global system. The auxiliary variable is linked to this statement and cannot be accessed in the program. The auxiliary variables and their contents are retained longer than the lifetime of procedures. An auxiliary variable of this type can only be initialized if its statement ON CHANGE OF is executed while the associated data object is initial. "</b>
    Regards,
    Ravi Kanth

  • How to resize and change the resolution of a batch of photos using Automator

    I searched for a long time tonight looking for the answer to this (seemingly) simple question:
    How do I use Automator to scale and change the resolution of a batch of images?
    It was not so simple.
    Links to this question:
    https://discussions.apple.com/message/12341246#12341246
    https://discussions.apple.com/message/12342026#12342026
    https://discussions.apple.com/message/5785047#5785047
    https://discussions.apple.com/message/1173358#1173358
    https://discussions.apple.com/message/5641853#5641853
    https://discussions.apple.com/message/3207516#3207516
    These are just the links on this site - I found them all over the place at MacRumors, Apple Tips, Mac Help, etc.
    You can actually manage this in Automator.
    Here are the steps that worked for me:
    Create an Automator APPLICATION - not a workflow (this is due to the way that I'm batch converting images - workflows might be ok for some cases)
    Step 1 is Copy Finder Items
    My flow inserts an SD card, opens the DCIM folder that my Nikon creates, selecting the images that I click (command + click to multi-select) and once I have the photos highlighted, I drag them onto this Automator App we're creating.
    <==  You'll have this guy soon!
    As a result - I want to copy the originals to my computer as step 1.  I don't touch the originals on the SD card (and cards are cheap so I tend to leave them on the cards as well)
    Step 2 is the Scale Images action - you can search the library for this and find it quickly.  For my part, I found that scaling images to about 38.8 percent of their size on the SD card is good for uploading to a blog.  Change this value to whatever you wish.
    Step 3 is Run Shell Script - and here is where we marry the brilliance found at this link with our script.If you have a hard time reading the text in the image, it is as follows:
    #bin/bash
    for f in "$@"
    do
         /usr/bin/sips -s dpiHeight 72.0 -s dpiWidth 72.0 $f
    done
    Save this application (I named mine "Format Photos")
    Place the application inside the target folder where you want the images to end up.  I do this because when I have the SD card window open, I can also open my "Photos" window and see my App sitting there.  I select my images as I mentioned and drag them on top of this app.  The app copies the originals and the conversions into the folder.
    NOTES: When you open a converted pic in Preview, you will see Resolution = 300 dpi if you go to Tools --> Adjust Size...  This reading is explained by another brilliant discussion as sips only touches the JFIF properties inside the file's MetaData.  However, if you look at the bottom of the Adjust Size... window, you'll see the image size is probably around 500 kb (give or take depending on the original).  My goal was to get the images down from the 3.0 MB I shoot at to around 500 kb.  Therefore even though the MetaData still thinks that it is 300 DPI according to Preview, it has been changed to 72 (open it in some other applications mentioned at the links and you'll find different readings - it all depends on what the application reads from the Meta).
    This does not rename the files, so you'll get DSC_1000.jpg and DSC_1000 copy.jpg in all likelihood.  If that annoys you, add a step into the Automator Application that renames the file after the "Run Shell Script" action has run, and you can have each file renamed according to some convention that you like.
    This took a heck of a lot longer than I expected - so I decided to put in the effort to share this with the community and save others the hassle. 

    PPI is pixels per inch of the image.  It is difficult to increase resolution as you are trying to add data that is not there.
    But for printing purposes what you want is dpi or dots per inch.
    The image processor either accessed from Bridge (tools/photoshp) or PS is a good way to change a batch of images.

  • I've just received an email from 'Apple' saying that my apple id was used      to sign into iCloud on an iphone 5s.  I have an iphone 4.  It's asking me to sign in to confirm my details and change my password.  How do I know if this email is genuine?

    I've just received an email from 'Apple' saying that my apple id was used to sign into iCloud on an iphone 5S.  I have an iphone 4.  It then asks that I 'click here' to confirm my details and change my password.  How do I tell if the email is genuine?

    Apple will not ask you to click a link in an email. They may tell you to log in to your account to reset your password. Go to https://appleid.apple.com and log in if you ever want to change any information in your profile (or your password). And do not click the link I just posted; instead enter it into a browser.
    You can verify the devices assigned to your account by going to https://icloud.com/find (again, don't click it), where you can see a list of devices registered to your Apple ID.
    As a general rule, you should never click a link in an email or forum post without verifying it first. You can see where it goes without clicking it in most email programs and browsers by hovering your mouse pointer over it. On an iPhone you can check where it goes by holding your finger on the link (rather than just tapping it).

Maybe you are looking for