How can I use the value returned for a function into the macro ??

I create a function to work in a macro and I would like to use the value of parameter f_calc_error returned by function in a condition like IF, but I don't know how can I do that. I have to use the macro function CALC_ERROR ??
  Thanks.
Edson Suzuki

Hi Edson,
Yes you need to use the CALC_ERROR macro function to be able to test whether the last macro function returned an error. CALC_ERROR will return an 'X' if there an error occured during the execution of the last macro function.
You can use a macro similar to the following:
IF
  CALC_ERROR( )
  = 'X'
      DO SOMETHING HERE
ENDIF
Let me explain how this works internally. The SAP system maintains a global variable g_flg_calc_error during the execution of macros in the planning book. The g_flg_calc_error variable will contain the value of f_calc_error that was set by the last macro function which executed. The ABAP coding of a planning book is something like this:
data: g_flg_calc_error type /SAPAPO/FLAG.
* SAP will pass g_flg_calc_error variable to all macro
* functions. When SAP calls a macro function, it does
* something like this.
call function '/SAPAPO/MACRO_FUNCTION_HERE'
        exporting
          plob_values      = i_s_adv_plob_values
          sdp_book         = g_c_advf_sdp_book
          sdp_view         = g_c_advf_sdp_view
        tables
          cols_index       = i_t_cols
          value_tab        = l_t_value_tab
        changing
          f_calc_error     = g_flg_calc_error
As you can see, the g_flg_calc_error variable
is passed in the "changing" part of the call. The macro  function being called can then use the f_calc_error
variable to change the value of the global
g_flg_calc_error variable. In fact, the macro function being called can also check (by looking at the f_calc_error variable) if the last macro function reported an error.  The CALC_ERROR macro function just checks the value of f_calc_error parameter (w/c in fact is the value of the g_flg_calc_error variable) and returns "true/X" if the f_calc_error was set to true by the last macro function.
Hope this helps in clearing things out

Similar Messages

  • HT1660 how can I use one single library for all users on the same laptop?

    how can I use one single library for all users on the same laptop?

    You are most of the way there. Each user having access to hard drive is the key. If users are limited in file privileges this is harder.
    Any files you add to your library and any files she adds to her library are available to the other. Just not automatically. Each user must add the files to their own library using the add file or add folder option from menu bar.
    What I have done is set library location to a location outside of My Documents\My Music. On my network storage I have a folder names s:\itunes. Both accounts iTunes are set to use this location for the library.

  • How to get the values returned by a function in a drop down?

    Hi All,
    Can anyone please help in getting the values returned by a function into a drop down? I have a java class file where in i have written a function called getWeeks() which give all the week dates and i want to display these week dates in a drop down box in a JSP page.
    Please help me in this regard.
    Thanks in Advance!!
    Lakshman.

    Hi Lakshman,
    the following code can help you do what you want :
    <hbj:dropdownListBox id="calendar" tooltip="Calendar" selection="<%= selected %>">
    <%
    String[] weeks = myObjectBean.getWeeks();
    for (int i = 0; i < weeks.length; i++) {
    %>
         <hbj:listBoxItem key="<%= i %>" value="<%= weeks<i> %>"/>
    <%
    %>
    </hbj: dropdownListBox>
    The <%= selected %> snippet allows you to pre-select one of the options (provided that the variable 'selected' is equal to one of the listBoxItem keys).
    You can also add onSelect to the tag (e.g. = "setSelectedItem"). It corresponds to a method in the corresponding JSPDynPage class. This means that when you select another item in the dropdown list, the method in your Java class is performed (allowing you to save the selected value and performing actions with it)
    I hope this helped you enough,
    kind regards,
    Frederic
    Edited seven times by: Frederic Taes on Nov 5, 2008 11:24 AM -> the onSelect element was in the hbj tag and in the text with "='setSelectedItem'" next to it and when I tried to post my message, I got a 501 error all the time ! Seems like a SDN bug to me ...

  • HT204053 i RECENTLY PURCHASED ANOTHER IPHONE.  MY INTERNET IS NOT WORKING.  I JUST CREATED AN APPLE ID.  WHAT'S NEXT?  I NOW HAVE TWO DIFFERENT ACCOUNTS WITH DIFFERENT USER NAMES.  HOW CAN I USE ONLY ONE ACCOUNT FOR ITUNES, ICLOUD APPLE ID ETC???

    I RECENTLY PURCHASED ANOTHER IPHONE.  MY INTERNET IS NOT WORKING.  I JUST CREATED AN APPLE ID.  WHAT'S NEXT?  I NOW HAVE TWO DIFFERENT ACCOUNTS WITH DIFFERENT USER NAMES.  HOW CAN I USE ONLY ONE ACCOUNT FOR ITUNES, ICLOUD APPLE ID ETC???

    Welcome to the Apple community.
    iTunes and iCloud and different accounts, you will need to delete both accounts from your device before adding the new details in their place.
    For iCloud go to settings > iCloud, scroll down and hit the delete button. You can then sign back in using your correct details. For iTunes go to settings >store, tap your account ID and then sign out, you can then sign back in using your correct Apple ID.

  • HT5437 How can I use apple TV to connect my computer to the tv screen as an external monitor?

    How can I use apple TV to connect my computer to the tv screen as an external monitor?

    Morning jotref,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    About AirPlay Mirroring in OS X Mountain Lion
    http://support.apple.com/kb/ht5404
    Best of luck,
    Mario

  • How can I use my itunes library for iphoto slideshow?

    how can I use my itunes library for iphoto slideshow?

    Here's a possible workaround:
    Create the slideshow in Iphoto and add a theme and music.
    Install Picasa  and it will include the slideshow on it's indexed list.
    Upload the slideshow to PicasaWebAlbums and send the link to anyone you wish.
    The music and theme is preserved.
    Caveat: My playback pictures appear darker than usual but that could be just lousy photography...:)
    Example:https://picasaweb.google.com/mb2180/Kona2011?authuser=0&authkey=Gv1sRgCPGWz_qPrM XKZA&feat=directlink

  • How do i get a list of all Roles defubed under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?

     

    Sorry for the typographical mistake.
    Please read the question as:"How do i get a list of all Roles defined under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?"

  • How can I use Guest network when my internal server provides the DNS?

    How can I use guest network when my internal server provides the DNS? The help article TS4505 tells me to enter an external DNS server, but I believe I can not configure my network that way...

    Apple assumes that you will be connecting the Time Capsule to a simple modem....and.....that the Time Capsule is configured as a router to provide DHCP and NAT services for the network.
    The Guest Network cannot be enabled correctly unless the Time Capsule is in charge of DHCP and NAT services on the network.
    Another way of saying the same thing is that the Guest Network will not operate correctly if the  Time Capsule is configured in Bridge Mode or DHCP Only.

  • I Have and iPhone and iPad. How can i use Finder my iPhone for both devices.

    I Have and iPhone and iPad. How can i use Finder my iPhone for both devices?

    http://itunes.apple.com/us/app/find-my-iphone/id376101648?mt=8
    That app is also compatible with the iPad and requires iOS 3.1.3 or later.

  • How can I use app find iPod  for my daughters iPod even if she has own acct Id?

    How can I use app find iPod  for my daughters iPod even if she has own acct Id?

    Hi,
    So far so good! I was successful with my first request-and thanks, but I guess i did not ask enough.
    New question: Is there any way for me to have my Apple devices show up with my daughters even though we have different apple id's? I was able to have her sign in and I could see but, if she doesn't sign in I can't see her device. She is only 15 and I going on a trip soon that I would like to just have security if she looses her device or I'll know she is okay. I don't want to sync and see everything, just the where abouts of the device. We were able to create a music folder for her music only and not mine- Success!
    Did I ask too much?
    Thanks for your quick reply!

  • My iphone 4s is 2nd ...then i format..the phone want old user id...how can i used that iphone back because i dont know the id?

    My iphone 4s is 2nd ...then i format..the phone want old user id...how can i used that iphone back because i dont know the id?

    There is no other solution - as you have already been told, if you don't have that user id and you cannot contact the previous owner of that id for the phone, then there is absolutely nothing that you can do.  You have a useless brick that you can't use.
    Nothing else to do.

  • HOW CAN I USE MY OWN EMAIL FOR IMESSAGE IF I DONT HAVE MY OWN ACCOUNT

    HOW CAN I USE MY OWN EMAIL FOR IMESSAGE IF I DONT HAVE MY OWN ACCOUNT

    You have to achieve at least 500 points before you are able to do that.
    Award points, level up, and earn new privileges

  • How can I use srvctl command line for change "Failover type" and "F method"

    Hi all,
    I am using Oracle One Node (11.2.0.3), and I have a service:
    /u01/11.2.0/grid/bin/srvctl config service -d orcl
    Service name: orcldb
    Service is enabled
    Server pool: orcl
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: BASIC
    Edition:
    Preferred instances: orcl_1
    Available instances:
    I would like to change "Failover type" and "Failover method" to:
    Failover type: SELECT
    Failover method: BASIC
    How can I do that? Is there any graphical tool for it? Or, How can I use srvctl command line for change it?
    Thanks in advance.
    Leonardo.

    user10674190 wrote:
    Hi all,
    I am using Oracle One Node (11.2.0.3), and I have a service:
    /u01/11.2.0/grid/bin/srvctl config service -d orcl
    Service name: orcldb
    Service is enabled
    Server pool: orcl
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: BASIC
    Edition:
    Preferred instances: orcl_1
    Available instances:
    I would like to change "Failover type" and "Failover method" to:
    Failover type: SELECT
    Failover method: BASIC
    How can I do that? Is there any graphical tool for it? Or, How can I use srvctl command line for change it?
    Thanks in advance.
    Leonardo.srvctl modify service -d database_name -s orcldb -q TRUE -m BASIC -P BASIC -e SELECT -z 180 -w 5 -j LONG
    Also see
    11gR2(11.2) RAC TAF Configuration for Admin and Policy Managed Databases [ID 1312749.1]

  • Can i use my mac mini for some users at the same time?

    can i use my mac mini for some users at the same time? i mean with their own screen, mouse, and keyboard

    If you're asking whether more than one user can use the computer at the same time with multiple displays, the answer is no. Other users can log in over a network with Screen Sharing, but each one will need his own computer (not necessarily a Mac.)

  • I live in Germany and in the USA. How can I use an itunes account for both shops ?

    Hi,
    I live half a year in Germany and half a year in California. How can I use my different Apple ID's to buy in Germany from the US-iTunes shop and in the U.S. from the German shop. Reason: the shops have different offers. Some booksare not available in the German shop and some are not available in the U.S. shop.
    For a person, who lives in both countries the restrictions makes absolutely no sense.
    Has anybody an idea how to manage that`
    Thanks

    For starters, there's probably not many people who have dual national residencies so I'm guessing it's not a priority with Apple.  The solution according to the store terms of use regarding your physical location, credit card billing address, nation of store, is when you are physically present in Germany you should be making purchases from the German store with a credit card billed to an address in Germany.  When in the USA you buy from the US store with a credit card billed to a USA address.  You're not supposed to use a store in another country when not actually present in that country even if you have a valid account there.

Maybe you are looking for

  • Duplicates / Triplicates - Help!  How do I stop iTunes from doing this?

    This is getting frustrating. Everytime I have iTunes add the music in the iTunes Music folder, I get TRIPLE files. I've looked in the directory, and there are only single mp3s, but nonetheless, iTunes gives me a Library with triple files. Needless to

  • How to edit top sites in the maverick program?

    How do I edit top sites in the new maverick program

  • Error in CF form in flash format

    Hi I receive the following error when loading a CF form in a Flash format... Errors, warnings or exceptions were found when compiling /mystore/admin/purchases_not_processed.cfm. Visit the online Flex documentation or API reference for further informa

  • Will Photoshop 6.0 work in OS X Tiger 10.4.6 ?

    Evolving Dinosaur here!!!Upgrading my powerPC G4 to OS X Tiger. (System info: 896 mb ram / two 30 gig hd's / 466 Mhz. Epson color 980 / epson perfection 1240u / wacon 4x6 tablet. ) I mainly use Photoshop 6.0 for illustration. I scan my drawings then

  • ALV Hierarchical in OOPS

    Hi , Is it possible to have a ALV hierarchical display in a single screen using ALV with ABAP objects.