To Read the processed subtotal and use for calculating tax.

Hi,
I calculated subtotal in REUSE_ALV_LIST_DISPLAY.
I got the subtotal.
After the subtotal i have a line to calculate the tax.
Now I want to read the subtotal and get the sum(calculated total) and use it to process the tax.
Thanks.
Farid.

TYPE-POOLS: slis.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv,
it_events TYPE slis_t_event,
wa_events TYPE slis_alv_event,
it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv,
it_list TYPE slis_t_listheader ,
l_layout TYPE slis_layout_alv,
wp_type type SLIS_PRINT_ALV,
tp_type type table of SLIS_PRINT_ALV.
TYPES: BEGIN OF ty_itab,
field2(10),
field1(10),
qty1(10),
qty2 type i,
qty3 TYPE i,
Total type i,
END OF ty_itab.
DATA: itab TYPE STANDARD TABLE OF ty_itab WITH HEADER LINE,
      wa type ty_itab,
itab1 TYPE slis_t_listheader.
START-OF-SELECTION.
  CLEAR ITAB.
  itab-field2 = 'FIRST'.
  itab-field1 = 'FIRST'.
  itab-qty1 = '2'.
  itab-qty2 = 1.
  itab-qty3 = 5.
  APPEND itab.
  itab-field2 = ''.
  itab-field1 = 'FIRST'.
  itab-qty1 = '2'.
  itab-qty2 = 1.
  itab-qty3 = 5.
  APPEND itab.
  itab-field2 = 'FIRST'.
  itab-field1 = 'FIRST'.
  itab-qty1 = '2'.
  itab-qty2 = 1.
  itab-qty3 = 5.
  APPEND itab.
  itab-field2 = 'FIRST'.
  itab-field1 = 'FIRST'.
  itab-qty1 = '2'.
  itab-qty2 = 1.
  itab-qty3 = 5.
  APPEND itab.
  itab-field2 = 'SECOND'.
  itab-field1 = 'SECOND'.
  itab-qty1 = '2'.
  itab-qty2 = 1.
  itab-qty3 = 5.
  APPEND itab.
itab-field2 = 'SECOND'.
  itab-field1 = 'SECOND'.
  itab-qty1 = '2'.
  itab-qty2 = 1.
  itab-qty3 = 5.
  APPEND itab.
*  wa-field1 = ''.
*  wa-qty1 = 'TAX'.
*  wa-qty2 = 5.
*  wa-qty3 = ''.
*  insert wa into table itab.
  wa_fieldcat-fieldname = 'FIELD2'.
  wa_fieldcat-seltext_m = 'field2'.
  wa_fieldcat-no_out = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat .
  wa_fieldcat-fieldname = 'FIELD1'.
  wa_fieldcat-seltext_m = 'field'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat .
  wa_fieldcat-fieldname = 'QTY1'.
  wa_fieldcat-seltext_m = 'QUNTITY1'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat .
  wa_fieldcat-fieldname = 'QTY2'.
  wa_fieldcat-seltext_m = 'QUANTITY2'.
  wa_fieldcat-do_sum = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat .
  wa_fieldcat-fieldname = 'QTY3'.
  wa_fieldcat-seltext_m = 'QUANTITY3'.
  wa_fieldcat-do_sum = 'X'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat .
  REFRESH it_sort.
  wa_sort-fieldname = 'FIELD1'.
*  wa_sort-fieldname = 'FIELD2'.
  wa_sort-up = 'X'.
*  wa_sort-group = '*'.
  wa_sort-subtot = 'X'.
  APPEND wa_sort TO it_sort.
  wp_type-no_new_page = 'X'.
  append wp_type to tp_type.
  CLEAR wa_sort.
  wa_sort-fieldname = 'QTY1'.
  wa_sort-up = 'X'.
  wa_sort-group = '*'.
*  wa_sort-subtot = ' '.
  APPEND wa_sort TO it_sort.
  CLEAR wa_sort.
  PERFORM get_events .
*  l_layout-subtotals_text = 'Subtotal'.
*  l_layout-totals_text = 'Total text'.
  l_layout-no_totalline = 'X'.
  l_layout-max_linesize = '5'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      it_fieldcat        = it_fieldcat
       I_SCREEN_END_LINE              = 3
      is_layout          = l_layout
      IS_PRINT = wp_type
      it_sort            = it_sort
      it_events          = it_events
    TABLES
      t_outtab           = itab
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.
  IF sy-subrc <> 0.
  ENDIF.
FORM get_events .
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type = 0
    IMPORTING
      et_events   = it_events.
*  READ TABLE it_events WITH KEY
*  name = slis_ev_subtotal_text INTO wa_events.
*  IF sy-subrc = 0.
*    MOVE 'SUBTOTALS_TEXT' TO wa_events-form.
*    MODIFY it_events FROM wa_events INDEX sy-tabix.
*  ENDIF.
*  CLEAR wa_events.
*  READ TABLE it_events WITH KEY
*   name = slis_ev_top_of_page   INTO wa_events.
*  IF sy-subrc = 0.
*    MOVE 'TOP_OF_PAGE' TO wa_events-form.
*    MODIFY it_events FROM wa_events INDEX sy-tabix.
*  ENDIF.
READ TABLE it_events into wa_events WITH KEY name = 'BEFORE_LINE_OUTPUT'.
  if sy-subrc = 0.
    wa_events-form = 'BEFORE_LINE_OUTPUT'.
    MODIFY it_events FROM wa_events TRANSPORTING form WHERE name = 'BEFORE_LINE_OUTPUT'.
  ENDIF.
READ TABLE it_events into wa_events WITH KEY name = 'AFTER_LINE_OUTPUT'.
  if sy-subrc = 0.
    wa_events-form = 'AFTER_LINE_OUTPUT'.
    MODIFY it_events FROM wa_events TRANSPORTING form WHERE name = 'AFTER_LINE_OUTPUT'.
  ENDIF.
*read table it_events with key name = slis_ev_end_of_page into wa_events.
*IF sy-subrc eq 0.
*  wa_events-form = 'END_OF_PAGE'.
*ENDIF.
ENDFORM. " GET_EVENTS
FORM before_line_output using p_c type slis_lineinfo.
  if p_c-subtot = 'X'.
      itab-field1 = ''.
      itab-qty1 = 'TOTAL'.
  endif.
ENDFORM.
FORM after_line_output using p_c type slis_lineinfo.
  if p_c-subtot = 'X'.
      ULINE AT (p_c-LINSZ).        "Dynamic Line Size
    FORMAT COLOR COL_TOTAL ON. "Setting the color
    WRITE :/
      sy-vline,
      15 'Tax',
      13 sy-vline,
      24 sy-vline,
      35 sy-vline.
    POSITION P_C-LINSZ.
    WRITE: SY-VLINE.
    FORMAT COLOR OFF.
  endif.
ENDFORM.

Similar Messages

  • I'm in the process of updating my iPhone4 to IOS. The installation has stopped half way in the process. And it has ben like that for almost two hours. Now what do I do?

    I'm in the process of updating my iPhone4 to IOS6. The installation has stopped half way in the process. And it has ben like that for almost two hours. Now what do I do?

    Hello scrapperdw,
    Thank thank you for using Apple Support Communities. 
    The following article provides steps and troubleshooting when the install process has stopped.
    iOS: Apple logo with progress bar after updating or restoring from backup
    Regards,
    Jeff D. 

  • Multiple iphones each with an apple id - can i use the same laptop and itunes for back up, restore and updates?

    We have two iphones each with a different apple id - can i use the same laptop and itunes for back up, restore and updates without risking having my apps overwritten.  Basically does itunes keep the two iphones as two separate entities ?  Does iTunes differentiate between the two devices and keep two different SYNCs ?

    Yes, you can use the same computer for BACK UPS, RESTORING AND UPDATING. But that is it.
    You cannot, however, use it to sync the different devices. iTunes will only recognize one device to sync with and if you sync any other devices with that iTunes library, it will replace what is on the phone with whatever is in the library. It cannot differentiate between devices. At most, it will jsut recognize that the phone has been synced with a different iTunes library.
    So if you would like to use the same computer for backing up, restoring and updating, just make sure to turn of Automatic Syncing in your iTunes Preferences.

  • Can I connect a 4 TB USB drive to the airport extreme and use it as a network drive for Time Machine

    Can I connect a 4 TB USB drive to the airport extreme and use it as a network drive for Time Machine

    Yes, if the drive is formatted in Mac OS Extended (Journaled).
    The USB port on the Time Capsule is under powered, so you may need use a powered USB hub with the 4 TB drive...even if it has its own power supply.

  • The hotmail address i use for my apple ID was hacked and i no longer have access to it, this is stopping me from accessing any of my icloud or itunes. how can i fix this?

    The hotmail address i use for my apple ID was hacked and i no longer have access to it, this is stopping me from accessing any of my icloud or itunes. how can i fix this?

    Thanks, I appreciate the help.  I think this is one of the problems Apple is creating by changing the OS so often. I had fomer colleagues at [a major aerospace contractor] who told me that so many original files were ultimately lost because of the deadly change in the "Save As" operation that they are now afraid of every OS update. Apple has badly damaged their support base with that very prominent company (they won't update now until they've fully examined and understand changes in the pre-conditioned nature of OS computer functions), and they are a whole lot less enthaled with Mac-related equipment/software. Can't blame them, I too used orginal files that way (as easy-to-use templates), and lost some important files before I realized what was happening (to late to revert). Companies should not have to retrain employees each time an OS gets an update, it's can be very expensive several different ways. They learned a painful lesson with that one. And because I'm now retired and don't use multiple devices, I need iCloud like I need a hole in the head... but I'm told there's no way to keep Apple out of my computer. Fortunately, because of major problems when initially installing Mountain Lion, one hold-over of the hardware/software damage I experienced was that iCloud can no longer access my computer even though everything else is working fine again. That was the only "good luck" I had as a result of that expensive nightmare.

  • How can I transfer video taken with my iPhone to my iPad WITHOUT using a computer or iTunes? I'm going to Europe for a month and want to use my iPhone to take pics and video, then come back to the hotel room and use my iPad to edit/store each evening.

    How can I transfer video taken with my iPhone to my iPad WITHOUT using a computer or iTunes? I'm going to Europe for a month and want to use my iPhone to take pics and video, then come back to the hotel room and use my iPad to edit/store each evening. I don't want to use my iPad to take the video...too large/bulky. And I WON'T have a computer with me...I purchased the iPad to take with me so I could use the RDC to my home computer and avoid taking my computer at all. Is this possible?

    here is a cheaper solution than camera kit and a lot easier if you have WIFI available.
    I use the PhotoSync APP (I think its a $1.99) will transfer videos and photos over WIFI to any other IOS device or even PC/MAC. Great app since I like doing video and photos on my IPHONE and transfer to IPAD2 without synching through computer or doing cloud based storage.
    You can even send photos/videos from your MAC/PC to your IOS devices that way too. Makes it so much easier.
    Here is the link;
    http://www.photosync-app.com/

  • When opening a pdf link the process stalls and there is a message that Adobe acrobat reader is running. to the best of my knowledge I do not have the reader. I have an older version of Acrobat Pro. How can I fix this?

    when opening a pdf link on a web poage the process stalls and there is a message that Adobe acrobat reader is running. To the best of my knowledge I do not have the Acrobat reader. To the best of my knowledge I have deleted the reader program. I have an older version of Acrobat Pro. The problem occurred before I did the deletion and continues since then.

    Assuming that you are using IE10 / IE11 on Windows: http://support.microsoft.com/kb/2716529

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • Are the Tcodes which we use for work flow are same in ecc and crm

    Are the Tcodes which we use for work flow are same in ecc and crm

    Yes they are! the same enjoy!
    Regards
    Tatenda I H Chaibva!

  • What exact metals are used in the iPod 5 and what for?

    what exact metals are used in the iPod 5 and what for?

    Hey Connor and Josh, The same kind of metals that are found in pretty much all electrics. Aluminum, Gold, Copper, Solder, (I would guess lead free). You will also find plastics and resins, glass and Li-ion, carbon, and silicon. Why do you ask? If your thinking of stripping one down for the metals, it's not worth it, there so little in there it will cost you more to separate the metals than there value by weight.  Cheers.

  • IPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

  • On Apple TV. Can the USB port be used for a keyboard and mouse interface

    On Apple TV. Can the USB port be used for a keyboard and mouse interface

    A bluetooth keyboard can be used with the Apple TV.
    There is no need for a mouse with an ATV.

  • My apple-ID is blocked, and I can't access the e-mail I use for my apple-ID so I can't restore the account. What should I do?

    My apple-ID is blocked, and I can't access the e-mail I use for my apple-ID so I can't restore the account. What should I do?
    I can't remeber my security questions, and I can't ask for a new password because I can't log in to the email because it got hacked...

    Have you tried logging out of your account on your iPod by tapping on your id in Settings > iTunes & App Store and then logging back in to see if that 'refreshes' the account on it and if it then works ?

  • Process audio and use midi at the same time?

    I would like to use Mainstage to process my vibraphone and acoustic percussion while also using software instruments with a MalletKat and audio playback for backing tracks all at the same time. Is this possible? I have a 17" Mac Book Pro with 4 GB Ram and 2.66 speed.

    Rich O'Meara wrote:
    I would like to use Mainstage to process my vibraphone and acoustic percussion while also using software instruments with a MalletKat and audio playback for backing tracks all at the same time. Is this possible? I have a 17" Mac Book Pro with 4 GB Ram and 2.66 speed.
    Absolutely....
    Create audio channels for the "live stuff", Instrument channels for the MIDI stuff, and use Playback for the backing tracks.
    HTH
    CCT

  • My iPad will not charge and every time I charge it. It comes up with the iTunes icon and I will not charge, it is not a new I pad and the same charger I use for the I pad I use for my I phone and it will charge. What is wrong?

    My iPad will not charge and every time I charge it. It comes up with the iTunes icon and I will not charge, it is not a new I pad and the same charger I use for the I pad I use for my I phone and it will charge. What is wrong?

    What exactlyare you seeing on the iPad's screen ? If it's the iTunes icon and a cable then that means that it's gone into recovery mode - you will need to connect it to your computer's iTunes and you should be able to use that to reset it back to factory defaults and you can then restore/resync your content to it.

Maybe you are looking for

  • Cfhttp error on CF7 but not CF8 - need help

    I have been battling this for a few days now, and I am starting to go a bit insane.  So, I am hoping someone can offer some assistance. I am trying to make a call to the Live Contacts API.  On CF8, I can get this to work but on CF7 it throws an error

  • Hotsync manager

    I am running Windows 7 64 bit and recently installed Palm desktop. I've had this for years (since it came out!) and I only use desktop to keep the hundreds and hundreds of addresses and phone numbers I have - I don't even use my Palm 3e anymore.  Eve

  • How can I recover u tube possibly deleted accidentally

    How do I recover u tube after accidental deletion

  • Video: MOV/H.264 format for iMovie

    For years I have used a Sony HandyCam with digital tape, inside of a Sony underwater housing to do underwater video.  Great quality and editing it in iMovie is a piece of cake.  I have had no compatability issues.  Trouble is hauling the housing, the

  • Possible to upgrade a G5 to Intel? or trade G5 for an Intel iMac?

    I gave my wife my G5 tower (10.4.11); it's pretty beefy but increasingly the software she has is "Intel only". Is it possible to change out the motherboard and make it into an Intel (while keeping the hardware) or is that a pipe dream? If it's imposs