Change variable type during program flow

Hi there. Please tell me is there a possibility in ABAP to change variable type during program flow? I'd be very thanful for suggestions. Greetings.

hi,
   Make use of field symbols for that ...
field-symbols : <fs> type any.

Similar Messages

  • Change storage type during putaway

    Hi,
    I know it is possible to change the destination bin during putaway.
    I set it in storage type and it works.
    Is it possible to change also the storage type during putaway by SU (LM02) ?
    Thank you
    Best regards
    Andrea

    Hi, thank you for your reply.
    The TO is just created.
    I want to change the storage type during the confirmation of TO  via RF using transaction LM02.
    Is it possible?
    Thanks

  • Change Variable Type P to STRING but with thousand separators

    Dear all,
    I am no specialist (in abap/bsp).
    I have a variable 'number' type p decimals 0.
    I need that 'number' converted to a string but with the thousand separators.
    Is there a function available?
    Is is possible to give this function the desired character as a thousand separator?
    E.g.
    Character '.'  for German Number Format
    Character ',' for US Number Format.
    Thank you in advance for help.
    Rewarding Points for helpful answers guaranteed.
    Philipp

    Hi Philipp,
    I have written a report for you.
    Just copy & paste the below code in your report.
    Try changing the num variable in the report and see the result.
    DATA: num TYPE p DECIMALS 0,
          de_str TYPE string,
          en_str TYPE string.
    DATA: temp_str TYPE string,
          str_len TYPE i,
          count TYPE i,
          index TYPE i,
          sub_str TYPE string,
          sub_str_len TYPE string.
    num = 1234567890.
    temp_str = num.
    str_len = STRLEN( temp_str ).
    str_len = str_len - 1.
    IF str_len >= 3.
      count = str_len DIV 3.
      index = 0.
      DO count TIMES.
        sub_str_len = ( count ) * 3.
        count = count - 1.
        index = str_len - sub_str_len.
        IF index < 3.
          sub_str_len = index.
          index = 0.
        ELSE.
          sub_str_len = 3.
          index = index - sub_str_len.
        ENDIF.
        IF index NE 0 OR sub_str_len NE 0.
          sub_str = temp_str+index(sub_str_len).
          CONCATENATE de_str sub_str '.' INTO de_str.
          CONCATENATE en_str sub_str ',' INTO en_str.
        ENDIF.
      ENDDO.
      index = str_len - 3.
      sub_str = temp_str+index(3).
      CONCATENATE de_str sub_str ',' '000' INTO de_str.
      CONCATENATE en_str sub_str '.' '000' INTO en_str.
    ELSE.
      sub_str = temp_str+0(str_len).
      CONCATENATE de_str sub_str ',' '000' INTO de_str.
      CONCATENATE en_str sub_str '.' '000' INTO en_str.
    ENDIF.
    WRITE:  temp_str,
           / de_str,
           / en_str.
    Hope it helps you.
    Regards,
    Maheswaran B
    I have done a small change. Try it now!
            Maheswaran B
    Message was edited by:
            Maheswaran B

  • How to change pricing type during invoicing

    Hello,
    How can I change the pricing type from 'B' (which is in the copy rule VTFL) to 'D' during the invoicing regarding specific criteria like sales organization ?
    Thank you by advance.
    Fabien

    If the unit price in sale order differs from pricing master data (VK11) and in copy control, if "B" is maintained for the field "Pricing Type", system will consider the price from master data in billing.  If you dont want this new price for that particular billing document, as suggested already, go to condition tab, click on "Update" button and again double click on "G". 
    But please note this will work ONLY  if accounting document has not been generated.  If accounting document has been generated, then this button (Update) in condition tab will become uneditable.
    On the other hand, if for any particular billing type itself, if you dont want "B" to consider, then in VTFL itself, change it to "G" or whatever you require.
    thanks
    G. Lakshmipathi

  • Build screen menu dynamically during program flow

    Hi there.
    I've got such situation that I have to determine menu bar apperance according user priveleges.
    So for example one user will see on the menu bar:
    ITEM1
    |____subitem1
    |____subitem2
    |____subitem3
    Whilst other user would see :
    ITEM1
    |____subitem1
    |____subitem3
    Do You know some way to determine menu structure in ABAP code? Greetings. P.

    hi,
    while setting the menu use
    excl_tab is an internal table should contain the function codes of the buttons which you want to disable for that particular user.
    set pf-status 'MENU' excluding excl_tab.
    see example below.
    DATA fcode TYPE TABLE OF sy-ucomm.
    MODULE status_0100 OUTPUT.
      APPEND 'CHANGE'  TO fcode.
      APPEND 'SAVE' TO fcode.
      SET PF-STATUS 'STATUS_0100' EXCLUDING fcode.
    ENDMODULE.
    rgds,
    bharat.

  • LABVIEW 2012 - shared variable error during programming of NI CRIO 9023 and TPC 2212

    HELLO,
    i am using CRIO 9023 with TPC 2212 and LV 2012. I want to develop a stand alone app which has a front panel on TPC. at first i am building a simple app with two controls variables, one is a sliding bar on TPC Vi and the other one is the while loop  variable "i" on CRIO VI. i used  shared variables.
    first i creat shared variable on CRIO side and access this on TPC Vi. I COMPILE both Vi,s and they are working fine. But when i created the slide bar control in TPC VI, compiled and deploy the TPC Vi, it get deployed in TPC. But when i  start compiling the CRIO VI an error mesage occured as follows;
    I have tried every option to best of my understanding like formating crio then installing all softwares including Network variable engine etc. i also go in properties of the executable file of TPC Vi and go in properties-shared variable- then check the "deploy variable in application" option . below is image displayed.
    I am in despirate need for solving this problem as i have to develop the final app for testing soon. can some one help me regrarding this.
    REGARDS

    I would not recommend using shared variable engine.  It is supposed to make things easier, but in fact, you will spend more time troubleshooting why it is not working than you will actually coding an alternative solution.
    Try the Simple TCP Messaging instead.
    http://zone.ni.com/devzone/cda/epd/p/id/2739
    Machine Vision, Robotics, Embedded Systems, Surveillance
    www.movimed.com - Custom Imaging Solutions

  • Change the Pricing Type during billing

    We are facing an issue with the rebate conditions which needs to be resolved asap..
    User has created a credit memo request in VA01.
    Credit memo request is created for the change in the Price.
    (Note: Order reason for such specific credit memo requests is ZXX (e.g.))
    Due to price change rebate accruals value is also reduced in proportion to the reduced price.
    The rebate accruals should not be reduced in this case, since there is no material return and rebate condition is quantity based.
    As a solution to this u2013
    We created a new routine AAA and assigned to the rebate condition types in Pricing procedure.
    This routine will function when order reason entered in the Credit memo request is ZXX.
    Therefore all the rebate condition types (assigned with routine AAA in Pricing) will get deactivated in Order Conditions tab.
    This is working correctly in creating credit memo (VA01).
    The issue is u2013
    When the credit memo is created in VF01, these rebate condition types are again activated and accruals are posted.
    This should not happen. Pricing from the CM request (VA01) should get copied in Credit memo (VF01) completely. The same issue
    with VF02..
    Please  suggest a user exit in which the pricing type can be changed during billing..Tried coding in the form
    USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ by changing the Pricing Type KNPRS..But didnt work out..
    Is there any way to meet this requirement. I have checked the user exit RV61AFZA having two forms:
    FORM USEREXIT_PRICING_RULE &
    FORM USEREXIT_PRICING_COPY.
    I would be interested to know how this can be  coded to meet the requirement. Coding displayed will be of great help to
    implement.
    Any pointers / solutions to the issue will be highly appreciated..
    Moderator message - Please do not offer points or rewards
    Edited by: Rob Burbank on Jul 29, 2010 12:34 PM

    Hello Sean
    1) Firstly I don't think the Credit Memo for this case or any case in your situation should be relevant to rebate.  That's becasue your rebate is tied to quantity.  So you should deactivate rebate processing for that Billing Doc type. T Code OVB0. That should close the issue.
    2) Pricing type 'D' in copy control from sales to Billing documents should ensure that Pricing from the CM request (VA01) gets copied in Credit memo (VF01) completely. Why do you need user exits for that? T code VTFA.
    3) If you need to change pricing type selectively for some conditions, then you should configure the condition type with condition category X,Y or Z ( Customer Reserve) and then use USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA to ensure that those conditions are copied (or otherwise) from source. But I don't think you need this.

  • Change meter reading type during reading estimation (el30)

    Hi,
    I would change meter reading type during or after reading estimation process (el30 transaction), just before the meter reading upload.
    Is there any user-exit to activate to do this?
    Thanks

    Hi,
    You can use enhancement - EDMLELSV / EDMLELAA
    Let me know if more information is required.
    Thanks and Regards,
    Ranjit Thakur.

  • How to get all program attributes (Variables, types, tables....)

    Hello,
    i want to analyse a programe source code, so i want to get all variable declaration.
    like in SE38->utilities->display list object, but in abap code.
    can you please help me.

    Hi Yassir,
    If ur program has TOP include then all global variables declarations will exist in this include. All local variables declarations exist with in the FORM.
    Open ur program in SE80. Here u can see all objects of ur program like Fields(Variables), TYPES,Tables, Routines etc.
    Thanks,
    Vinod.

  • Can we change movement 601 to Zmovement type during PGI?

    Hi all,
    Can we change the standard movement type 601 based on some logical condition to Z movement type during PGI?
    If any exit is there , please provide.
    Thanks for giving input.
    Saravanan

    Hi lakshmipathy,
    Thanks for your answer.
    So , can I  take that re-determination of movement type during PGI is not possible?
    Why I need this requirment?
    Account determination in TDP ( IS-OIL ) functionality is based on movement type .
    In my case , because of additive addition to the main material , only some times the G/L account determination should change and this can be controled by checking additive flag during PGI and if flag available , then If I can change movement type only to these cases , I can go do new account determination. Other wise I do not want to distrub the present configuration.
    If this is not feasible , then I have to think some other way to get it done .
    Thanks and regards,
    Saravanan

  • Modification in ML87 upload program to change contract type

    Hi Experts.
    I need your help regarding ML87 transaction code. I want to change contract type for uploading prog. Currently I am uploading for default contract type XYZ1 and now i want to change it as XY as new default contract so can you tell me the process to make changes for contract type .
    Thanks
    Regards
    Rajas01

    Hi, use LSMW, Import method  - recording

  • Changing message type is standard program

    Hi all
    In transaction cs02 I m getting a warning message "Enter Change number-BOM has History requirement".
    Instead of warning I want it as a Error message. Can anybody tell me how to do that

    my dear no matter that in which forum it is belongs to.
    I mean to say my problem, just want to know how to
    change message type....

  • Dialog Box simulation without interrupting program flow

    I'm developing data acquisition/control software and need to give the end
    user flexibility to change the file to which the acquired data is being
    saved during operations. In the past, users have been confused with a
    simple string control that specifies the data file path, so I would prefer
    to move to the popup/dialog box standard to windows. Unfortunately, calling
    a dialog box results in the stoppage of program flow for the caller until
    the dialog box is closed (even though there may be no apparent data flow
    from the popup VI.) and stopping the program flow is not an option for this
    control system (the computer is controlling pressure, temperature, flow
    rates, etc of a very expensive and sensitive bit of hardware, so halting the
    control function for an unknown length of time is unacceptable).
    I am looking for the best way to accomplish this under LabVIEW 6i.
    Using a VI class reference through VI Server, I can essentially detach the
    popup window from the base program execution, spawning a separate
    application and passing the relevant parameters through judicious use of
    global variables. If I call the subroutine via VI server with "Wait until
    done" attribute set to false, the appropriate VI appears, functions
    correctly, and terminates as expected. Unfortunately, it remains visible on
    the screen, an inactive application. I have the VI Properties -> Window
    Appearance -> Customize -> Show Front Panel When Called and the Close
    Afterwards if Originally Closed checkboxes checked on this popup VI. It
    seems that calls through VI Server trigger the "Originally Open" flag, so
    the window does not close as I had expected.
    The way I have found to get around this problem is to use VI Server to call
    an intermediate subroutine whose front panel is not displayed and whose sole
    purpose it to call the subroutine that calls the dialog box. This does what
    I wanted, essentially. When the user wants to change directories, they
    press a button that triggers a call to VI Server to open a separate
    application. This application's front panel is never displayed and only
    calls a sub-VI that performs all the actual work and ends when it is
    completed. As this sub-VI terminates, all visible traces of the subroutines
    disappear and I'm left with just the primary program executing, continuing
    to take and send control signals through this whole process.
    This seems a rather cumbersome way to get a custom dialog box on the screen
    without stopping the program flow of the caller, however. Is there a more
    efficient way to accomplish this?
    Wade C. Eckhoff
    [email protected]

    Wouldn't it be easier to use two parallel independent while loops in the
    main vi, with one taking care of acquisition and the other of user
    interaction.
    When the UI loop is temporarily 'halted' because of the dialogue box poping
    up, the acquiring loop continues without delay.
    Regards
    Harrie Boonen
    www.novonordisk.com
    "Default User" wrote in message
    news:[email protected]...
    > I'm developing data acquisition/control software and need to give the end
    > user flexibility to change the file to which the acquired data is being
    > saved during operations. In the past, users have been confused with a
    > simple string control that specifies the data file path, so I would prefer
    > to move to the popup/dialog box standard to windows. Unfortunately,
    calling
    > a dialog box results in the stoppage of program flow for the caller until
    > the dialog box is closed (even though there may be no apparent data flow
    > from the popup VI.) and stopping the program flow is not an option for
    this
    > control system (the computer is controlling pressure, temperature, flow
    > rates, etc of a very expensive and sensitive bit of hardware, so halting
    the
    > control function for an unknown length of time is unacceptable).
    >
    > I am looking for the best way to accomplish this under LabVIEW 6i.
    >
    > Using a VI class reference through VI Server, I can essentially detach the
    > popup window from the base program execution, spawning a separate
    > application and passing the relevant parameters through judicious use of
    > global variables. If I call the subroutine via VI server with "Wait until
    > done" attribute set to false, the appropriate VI appears, functions
    > correctly, and terminates as expected. Unfortunately, it remains visible
    on
    > the screen, an inactive application. I have the VI Properties -> Window
    > Appearance -> Customize -> Show Front Panel When Called and the Close
    > Afterwards if Originally Closed checkboxes checked on this popup VI. It
    > seems that calls through VI Server trigger the "Originally Open" flag, so
    > the window does not close as I had expected.
    >
    > The way I have found to get around this problem is to use VI Server to
    call
    > an intermediate subroutine whose front panel is not displayed and whose
    sole
    > purpose it to call the subroutine that calls the dialog box. This does
    what
    > I wanted, essentially. When the user wants to change directories, they
    > press a button that triggers a call to VI Server to open a separate
    > application. This application's front panel is never displayed and only
    > calls a sub-VI that performs all the actual work and ends when it is
    > completed. As this sub-VI terminates, all visible traces of the
    subroutines
    > disappear and I'm left with just the primary program executing, continuing
    > to take and send control signals through this whole process.
    >
    > This seems a rather cumbersome way to get a custom dialog box on the
    screen
    > without stopping the program flow of the caller, however. Is there a more
    > efficient way to accomplish this?
    >
    >
    > Wade C. Eckhoff
    > [email protected]
    >
    >
    >

  • ABAP program flow.

    Hi,
    whenever i write abap program, i usually maintain following program flow.  is it right from performance tuning point of view?
    1) include statements
    2) DATABASE TABLES
    3)  VARIABLE DECLARATIONS
    4) SELECTION-SCREEN
    5) FIELD SYMBOLS
    6) INITIALIZATION
    7) AT SELECTION SCREEN
    8) TOP OF PAGE
    9) END OF PAGE
    10) START OF SELECTION
    11) END OF SELECTION
    Please advise
    Regards,
    Santosh

    Hello,
    Just to add to Kathick's explanation. ABAP is an event-driven programming language. The general flow of an ABAP program is controlled by events.
    It is a good -practice to code event processing blocks in the order in which they will be triggered during execution.  However, they do not have to be coded in a sequential order. 
    This is the first thing i learnt in ABAP basics class )
    BR,
    Suhas

  • Is there a possibility to change step-parameters during debug execution ?

    Would be helpfull to be able to change step-parameters during step-by-step dubugging execution.
    Has someone got an idea ?

    Hi bestware,
    I am assuming you want to provide some sort of debug from your Operator Interface.
    I've been looking at using the SequenceFilePreStep and SequenceFilePostStep to provide some sort of debug.
    Using the SequenceFilePreStep callback you could place some code in here to evaluate the step running (about to be executed) and display an appropiate Dialog box to allow the user to change any of the available parameter.
    My simple example tests if the step is a NumericLimitTest step type and if so, allows the user to change the Upper Limits only (said it was simple).
    Now to Looking at the Locals and Parameters in the Sequence of the Step about to be performed. You will have to look at RunState.Caller.Locals and RunState.Caller.Parameters. Get a list
    of the variables, find out the type and provide the suitable interface to be able to modify the contents.
    Look at here http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=506500000005000000FF750000&HTHREAD=000030207&UCATEGORY_0=_8_&UCATEGORY_S=0 and see what Dan has been doing in this area.
    Hope this is a start.
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    Debug_Example.zip ‏6 KB

Maybe you are looking for

  • Accidentally Disabled Account & Can't Get It Back

    Wondering if anyone has any ideas on this... I accidentally disabled (by un-checking the box that says enable account) one of my Mobile Accounts in Workgroup Manager while that Mobile Account was logged in. Not knowing this yet... the next day I went

  • Optimising for two cores on an older macbook

    I use an older macbook with snow leopard (not sure how old, but it has two cores) and I'm trying to get the most out of it as I can, because at times things run slowly (ever since I got SL, iTunes has been running prohibitavely slowly, Safari tends t

  • Generic Data Source and InfoPackage Data Selection

    Hello,  I'm trying to extract data from a generic data source (composed of a view joining 4 tables) using the Data Selection Criteria in an infopackage.  Sometimes the selection criteria is ignored and more data is pulled than expected.  The number o

  • Need help about userexit and badi

    How to find particular user exit or particular method in badi?

  • Problem with a process Flow (RPE-02062 )

    Execution of a workflow ended with an error. When I try to execute again I get an error. But when I try to deploy , also I get another error RPE-02062: No se puede borrar el tipo de elemento F3 ya que tiene procesos en ejecución. Debe abortar primero