ALV Detail and Summaries
Hi There,
I have a report the users want to run in background, the report is an ALV type abap and we use the FM REUSE_ALV_GRID_DISPLAY to display the data on screen. I am aware of the conversion from GRID to LIST from other posts. However, my problem is when I run the report in background I only see the summaries and not the detail. When run in foreground the detail appears first, we then have buttons to drill into the summary, so the normal run of the program is detail first then summary, I thought this would be the same in background.. any suggestions.
Thanks
Conor
Hi conor,
1. Whether summary or detail,
i think we are able to get
only ONE list thru the back ground.
(all list, with the drill-downs
won't be able to get)
2. Try changing the fcode
of the BUTTON which appears in
the first detail list.
(the button fcode should be somewhat
different from standard fcode)
(probably then u will be able to
get the DETAIL list, instead of the summary list)
regards,
amit m.
Similar Messages
-
Reporting Question - Detail and Summary info in the same report
Hello All,
I have a situation where I have to report the detail and summary information from one cube (or multiple cubes) in a single report. Following is the example cube with smaple data and the required report
Cube - Char - 0CUSTOMER
0MATERIAL
0MATL_GRP
0CURRENCY
Key Fig - 0AMOUNT
Data
0CUSTOMER 0MATERIAL 0MATL_GRP 0AMOUNT 0CURRENCY
CUS1 MAT1 GRP1 1000 USD
CUS1 MAT2 GRP1 2000 USD
CUS1 MAT3 GRP2 3000 USD
CUS1 MAT4 GRP2 4000 USD
CUS2 MAT2 GRP1 2222 USD
If I run a report to See Which Customers have bought Material MAT1, I want to produce a report like
Material Cust Matl_Gr Amt(Matl) Amt(Cust/Mtgr) Amt(Cust)
MAT1 CUS1 GRP1 1000 USD 3000 USD 10000 USD
MAT1 CUS2 GRP1 2222 USD 2222 USD 2222 USD
Any Ideas to create such a report is welcome. I am open to use multiple cubes, Multicubes, summarized data joins etc.
Thanks in advance for the help.
Amit GuptaAmit,
You can acheive this using single cube.
All you need to do is to define 2 restricted keyfigures the following way.
1. Amount (Cust/Material Group)
In the Restricted KF (either global or local), pull in the Material to the right side, right click on it and select "Constant Selection". Save it.
2. Amount (Customer)
Pull in both Material and Material Group and do the same step as above for both. Save it.
Now run the query and tests it. Let us know if i worked.
Gova -
Call tcode from alv report and passing group of values
hi all .
i want to call tcode from alv report and passing an internal table or group of values to a selection option of that t code ? how
ex. passing group of GL to fbl3n and display the detials of all .
thank youDear,
You have done a small mistake
--> rspar_line-option = 'EQ'.
rspar_line-HIGH = PDATE-HIGH.
u r passing "high" value and in "option u r passing "EQ" so how it will work!!!
So if u r passing only 1 date or more dates like 01.01.2010 , 15.02.2010 , 10.03.2010 then pass
rspar_line-selname = 'SO_BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-LOW = PDATE-HIGH.
APPEND rspar_line TO rspar_tab.
or if u r passing low & high date means in range like 01.01.2010 to 30.01.2010, then pass
rspar_line-selname = 'SO_BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'BT''.
rspar_line-LOW = PDATE-LOW.
rspar_line-HIGH = PDATE-HIGH.
APPEND rspar_line TO rspar_tab.
try above code , hope it helps...
i think u cannot use "call transaction using bdcdata" in ur case bcoz as u said in ur 1st post u want to display the details of all but still if u want to use then u should pass all parameters in loop.
PROGRAM
DYNPRO
DYNBEGIN
FNAM
FVAL
ex:-
LOOP AT GT_TEMP INTO GS_TEMP.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = 'SAPXXXX'.
bdcdata_DYNPRO = '1000'.
bdcdata_DYNBEGIN = 'X'.
bdcdata_wa-fnam = '''.
bdcdata_wa-fval = ''.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = ''.
bdcdata_DYNPRO = ''.
bdcdata_DYNBEGIN = ''.
bdcdata_wa-fnam = 'SD_SAKNR'.
bdcdata_wa-fval = GS_TEMP-GLACCOUNT.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_PROGRAM = ''.
bdcdata_DYNPRO = ''.
bdcdata_DYNBEGIN = ''.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = 'XXX'.
APPEND bdcdata_wa TO bdcdata_tab.
ENDLOOP.
try above code if u r using call transaction...
Edited by: mihir6666 on Jul 9, 2011 3:10 PM
Edited by: mihir6666 on Jul 9, 2011 3:11 PM
Edited by: mihir6666 on Jul 9, 2011 3:13 PM -
ALV Grid and return to selection screen
Hello
I have an ALV Grid and when I push a buttom that I program appears another ALV Grid. In this second ALV I try to program different buttoms. When I program the BACK buttom I want to go to selection screen.
I try with CALL SELECTION SCREEN but when I stay in selection screen and push the execute buttom the ALV that I see is the second, not the first. It seems that we don't catch the news selections.
I put rs_selfied-refresh = 'X' after the CALL SELECTION SCREEN but is wrong again.
What can I do????Hello Silvia
There is a simple trick to return from the second ALV list directly back to the selection screen:
*& Report ZUS_SDN_REUSE_ALV_GRID_DISPLAY
REPORT zus_sdn_reuse_alv_grid_display.
TYPE-POOLS: slis.
DATA:
gt_t001 TYPE STANDARD TABLE OF t001,
gt_knb1 TYPE STANDARD TABLE OF knb1.
DATA:
gs_fcat TYPE slis_fieldcat_alv,
gt_fcat_t001 TYPE slis_t_fieldcat_alv,
gt_fcat_knb1 TYPE slis_t_fieldcat_alv.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '1000'.
START-OF-SELECTION.
SELECT * FROM t001 INTO TABLE gt_t001.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
* I_PROGRAM_NAME =
* I_INTERNAL_TABNAME =
i_structure_name = 'T001'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = gt_fcat_t001
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = syst-cprog
i_callback_pf_status_set = 'ALV_SET_PF_STATUS'
i_callback_user_command = 'ALV_USER_COMMAND'
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME = ' '
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
it_fieldcat = gt_fcat_t001
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_t001
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END-OF-SELECTION.
*& Form set_pf_status
* text
* -->RT_EXTAB text
FORM alv_set_pf_status USING rt_extab TYPE slis_t_extab.
* NOTE: identical to STANDARD_FULLSCREEN with additional button
* for detail list ('DETAILLIST')
SET PF-STATUS 'STANDARD_FULLSCREEN'.
ENDFORM. "set_pf_status
*& Form alv_user_command
* text
* -->R_UCOMM text
* -->RS_SELFIELDtext
FORM alv_user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
* Display detail list: all customers for selected company code
WHEN 'DETAILLIST'.
IF ( rs_selfield-fieldname = 'BUKRS' ).
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = rs_selfield-value.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = syst-cprog
i_callback_pf_status_set = 'ALV_SET_PF_STATUS'
i_callback_user_command = 'ALV_USER_COMMAND'
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
i_structure_name = 'KNB1'
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_knb1
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>* NOTE: when the program logic returns from the 2nd ALV list
* and exit = 'X' then the program leaves the
* 1st ALV list, too, and returns to the selection screen.</b>
rs_selfield-exit = 'X'.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDFORM. "alv_user_command
Regards
Uwe -
Hyperlink in ALV output and when downloaded to Excel, maintain that hyperli
Hi SAP Friends,
I want to know if this is possible. My requirement is, display a column with Invoice # and hyperlink (or you can call it as Hotspot in SAP language). When clicked on the hyperlink, it should open a webpage, giving details of Invoice. I tried testing BCALV_GRID_VERIFY program. I can see hyperlink in ALV output and when I click, it opens a webpage. However, when I down load data to Excel using Excel inplace, hyperlink is gone. Only data is down loaded. How can we make it happen that hyperlink is maintained even after downloading data from ALV ?
Any ideas ?
NiranjanWaiting for any suggestions from users.
Niranjan -
How to call ALV Report and SMARTFORMS through Pushbutton
hi,
i have created a report.My task is to create two buttons:
1)ALV Report.
2)SMARTFROMS.
Through these button i have to call ALV Report and SMARTFORMS. i have created both button and when i execute the program,
it shows me the button but not working when i click on it.
this is the coding i have used in my report for calling ALV Report.
''Tables sscrfields,
DATA flag(1) Type c.
selection-screen: begin of screen 500 AS WINDOW TITLE tit,
BEGIN OF LINE,
PUSHBUTTON 2(18) but1 USER-COMMAND cli1,
end of line,
BEGIN OF LINE,
PUSHBUTTON 2(18) but2 USER-COMMAND cli2,
end of line,
end of screen 500.
SET PF-STATUS 'STATUS_0100'.
at selection-screen.
case sscrfields.
WHEN 'cli1'.
flag = '1'.
WHEN 'cli2'.
flag = '2'.
endcase.
at USER-COMMAND.
CASE SY-UCOMM.
WHEN 'Detail'.
select vbakkunnr VBakernam VBAkaudat vbakaufnr vbapKWMENG vbapmatnr vbap~ARKTX
into but1
from vbak inner join vbap
on vbakvbeln = vbapvbeln.
ENDSELECT.
ENDCASE.
START-OF-SELECTION.
tit = 'Format'.
but1 = 'ALV Report'.
but2 = 'SMARTFORMS'.
CALL SELECTION-SCREEN 500.
and i also use in my report
''case sscrfields-ucomm'' and ''submit my_report'' but the still button doesn't show the result.
Thanks & Regards,Hi,
I understood your requirement. What i found is, you are creating screen 500 and call it after START-OF-SELECTION,
at that time your AT USER-COMMAND doesn't work.
So what i would suggest , u should create GUI STATUS named ' PFSTAT'
having one functional key 'EXIT' that is standard u can just name it
and
other two u can assign in Freely assigned Function keys as 'BUT1' & 'BUT2'. and than in Application Toolbar u jst have it in ITEM LIST by typing BUT1 and BUT2.
For 'BUT1' text would be 'ALV' and 'BUT2' text would be 'SMARTFORMS'.
Now in Program you can code,,,
START-OF-SELECTION.
SET PF-STATUS 'PFSTAT'.
WRITE:/ 'TEST'.
at user-command.
case SY-UCOMM.
WHEN 'BUT1'.
WHEN 'BUT2'.
WHEN 'EXIT'.
LEAVE PROGRAM.
endcase.
In Program u set PF STATUS and use at user-command event, whcih gets triggered when u click on button . When u execute program you get two button in application tooldbar.
Please do needful.
Thanks,
Saurin SHah -
Hi,
i'm not familiar with ALV classic (i'm always working with ALV OO), but is it possible to add extra buttons to the ALV toolbar, and handle the click on these buttons ?
regards,
HansHi,
The steps to be followed to use events in classic ALV:
say to use top_of_page event the steps will be:
1) declare the events.
data i_events TYPE slis_t_event.
2) define the event.
DATA: line_event TYPE slis_alv_event.
CLEAR line_event.
line_event-name = 'TOP_OF_PAGE'.
line_event-form = 'F4200_TOP_OF_PAGE'.
APPEND line_event TO i_events.
3) define the header details.
DATA: gs_line TYPE slis_listheader.
CLEAR: gs_line.
gs_line-typ = 'H'.
gs_line-info = text-009.
APPEND gs_line TO i_header.
CLEAR: gs_line.
gs_line-typ = 'S'.
gs_line-key = 'Month'.
gs_line-info = p_month.
APPEND gs_line TO i_header.
4) define the list write for header
FORM f4200_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOG'
it_list_commentary = i_header.
ENDFORM.
5) call the grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = ws_c_repid
i_grid_title = ws_title
is_layout = i_layout
it_fieldcat = i_fieldcat
i_default = 'X'
i_save = 'A'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_VARIANT =
it_events = i_events* IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = i_final_out
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ram
Pls reward points if helpful -
What is the difference between Alv Grid and Table Control?Explain in detail..
Table control is a screen table to display table data in a screen. You can add table control to a screen in the Screen Painter. The typical flow-logic to process table control is:
LOOP AT <internal table> CURSOR <scroll-var>
[WITH CONTROL <table-control> ]
[FROM <line1> ] [TO <line2> ].
...<actions>...
ENDLOOP.
ALV Grid is a SAP Technology to display a set of data on the output screen. For example if you have selected some SAP tables and processed these data in a way you want to display, then you can pass the internal table to the ALV Grid and it will be displayed on the result screen as ALV Grid. See example in SE16 result. -
ALV detail user command?
Hi,
sorry, I'm notoriously curious:
On ALV Grid & List display we use user commands (like double-click) to branch to whatever we like.
But on the detail screen there is only Find and Enter.
It would be nice to have the same functions on the detail screen.
Usually we use the ALV functions, not the Objects.
Any ideas?
TIA,
C.Get the OKcode for that detail and handle the sy-ucomm.
and instead of Standard pop up, give ur own pop up
and PF-status.
use this FM to show the popup REUSE_ALV_POPUP_TO_SELECT.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE =
I_SELECTION = 'X'
I_ALLOW_NO_SELECTION =
I_ZEBRA = ' '
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_CHECKBOX_FIELDNAME =
I_LINEMARK_FIELDNAME =
I_SCROLL_TO_SEL_LINE = 'X'
I_TABNAME =
I_STRUCTURE_NAME =
IT_FIELDCAT =
IT_EXCLUDING =
I_CALLBACK_PROGRAM =
I_CALLBACK_USER_COMMAND =
IS_PRIVATE =
IMPORTING
ES_SELFIELD =
E_EXIT =
TABLES
T_OUTTAB =
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
what ever pf status you want keep them and excllude rest using it_excluding.
this will solve ur problem -
Is there a way to create a year at a glance with detail and print?
Is there a way to create a year at a glance with detail and print?
To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
Acrobat 9: Advanced > Extend Features in Adobe Reader
Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
I wonder what it will be next time? -
Customer/Vendor A/C with line item details and with opening and closing Bal
Dear Sir / Madam,
Is it possible to have a customer and / or vendor Sub-Ledger account-
with line item details and with opening and closing balance detail
for a particular period.?
Regards
Chirag Shah
I thank for the given below thread which has solved the same problem for G/L Account
Re: Report to get the ledger printout with opening balancesHello Srinujalleda,
Thanks for your precious time.
I tried the referred T-Code
But this report is not showing Opening balance, closing balance detail.
It only gives transactions during the specified posting period and total of it.
Please guide me further in case if I need to give proper input at selection screen or elsewhere.
Client Requires Report in a fashion
Opening Balance as on Date
+ / - Transactions during the period
= Closing Balance as on date
As that of appearing for G/L Account by S_ALR_87012311
Thanks once again & Regards
Chirag Shah -
Iv downloaded the 0845 wizard from the App Store. Registered my details and it has been working. But for some reason it won't let me log in and keep saying failed every time I try to use it. Iv deleted and re-downloaded the app and it still says the same?
I would say to start by looking on their web site... unfortunately, that appears to be dead.
Based on the horrible ratings on the App Store (1 star for the current version), I'm not surprised it doesn't work well. -
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). -
PURCHASE PROGRAM
When I filled in my credit card details and proceed to Step 4: Enter your payment information, so nothing happens. Have tried several times. This order applies to the upgrade of CS4 and costs 270,60SEK per month.
Does not this offer?
Micke at RaaSome general information... your Adobe account and your credit card details must match exactly
Change/Verify Account https://forums.adobe.com/thread/1465499 may help
-http://helpx.adobe.com/x-productkb/policy-pricing/change-country-associated-with-adobe-id. html
-Credit card https://helpx.adobe.com/utilities/credit-card.html
-ID support http://helpx.adobe.com/x-productkb/global/service-c1.html
-verify email https://forums.adobe.com/thread/1446019 -
Report: Create report for invoice details, shipping details and partner fn.
hi,
i want to know the table used for Invoice Details, Shipping Details and Partner Function in SD.
thanks in advance.Hi Chandrasekar,
Welcome to SDN.
Please check this link for SD tables.
http://www.sapgenie.com/abap/tables_sd.htm
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
Maybe you are looking for
-
What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed? I am running Mavericks and use an AirPort Time Machine to back-up all my files.
-
Dual head setup (mach64 - ATI Rage Mobility)
hello everyone! I want to use a new extra monitor I got recently, with my laptop, I use aweosme. I have installed: xf86-video-mach64 (recompiled with dri support) mach64-dri (from community) mach64drm (from AUR) https://wiki.archlinux.org/index.php/M
-
Need Help with Spry Drop Down Menu
Greetings, I'm a Dreamweaver beginner, and I'm currently working on a redesign of our corporate website, and I would really like to incorporate a drop down navigation system. So far, I've gotten close to what I would like to have, except there are a
-
Hi All, Oracle 9.2 is running sun box , Is it possible to install 10g in different home? if Yes, How do i set path to create 10g database in this server? Thanks Rajas
-
System Copy XI 3.0 - do I need a new SLD?
I am planning to refresh my Sandpit XI system from my Development environment on XI 3.0, WAS 6.40, NW04. I have the system copy guide version 1.1 which states that I need to migrate to a new SLD. At present, I have one SLD for my Sandpit / Dev /QA