Can we call screen from ALV report
Hi All,
I am in the process of creating a stand alone application. However I have stuck up here.
Problem: Can we call any screen from ALV report? If yes then how??? Can anyone give some code snippet??
All your help appreciated.
Thanks,
Jignesh
Hello Jignesh,
Here is an example, when you double click on a line, it pops with with another screen that holds details for the flight information.
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click FOR EVENT double_click
OF cl_gui_alv_grid
IMPORTING e_row
e_column.
ENDCLASS. "lcl_event_handler
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_double_click.
READ TABLE it_flight INTO wa_flight INDEX e_row-index.
IF sy-subrc EQ 0.
SELECT * FROM sbook
INTO TABLE it_book
WHERE carrid EQ wa_flight-carrid AND
connid EQ wa_flight-connid.
CALL SCREEN 101 STARTING AT 10 10.
ENDIF.
ENDMETHOD. "HANDLE_DOUBLE_CLICK
ENDCLASS. "LCL_EVENT_HANDLER
MODULE status_0101 OUTPUT.
Variant to save the layout
gv_repid = sy-repid.
IF g_custom_container2 IS INITIAL.
Create an instance for Custom Container 'ALV_GRID'
CREATE OBJECT g_custom_container2
EXPORTING container_name = gs_container2.
Create an instance for ALV Grid
CREATE OBJECT g_grid2
EXPORTING i_parent = g_custom_container2.
Variant to save the layout
gs_layout-grid_title = 'Flight Bookings'.
CALL METHOD g_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'SBOOK'
is_layout = gs_layout
CHANGING
it_outtab = it_book[].
ELSE.
CALL METHOD g_grid2->refresh_table_display.
ENDIF. "IF grid2 IS INITIAL.
Setting focus for created grid control
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid2.
CALL METHOD cl_gui_cfw=>flush.
ENDMODULE. " status_0101 OUTPUT
Refer to BC_ALV_GRID04 for ALV data declarations used in the above piece of code.
Similar Messages
-
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 -
Calling script from ALV report
there is button in my report(print) when click on this it needs to display the report output in a script (which is designed for this)
Please help me how to declare my itab variables in Script....
only the data and page number will change rest all text elments are constant for differnet pages.
the code in the USER_COMMAND of reuse_GRID_DISPLAY is
WHEN 'PRINT'.
i_itcpo-tdimmed = 'X'.
i_itcpo-tddelete = 'X'.
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
form = 'ZSCRIPT'
language = 'SY-LANGU'
startpage = 'FIRST'
EXCEPTIONS
form = 1
format = 2
unended = 3
unopened = 4
unused = 5
spool_error = 6
OTHERS = 7.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
application = 'TX'
device = 'PRINTER'
dialog = 'X'
form = 'ZSCRIPT'
options = i_itcpo
language = sy-langu.
PERFORM print_data.
CALL FUNCTION 'CLOSE_FORM'.
MESSAGE s208(00) WITH ' Form Successfully Printed.'.
CALL FUNCTION 'END_FORM'.
THE PERFORM DETAILS................
*Left logo
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LLOGO'
EXCEPTIONS
OTHERS = 1.
*script header
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER'
EXCEPTIONS
OTHERS = 1.
*standard text
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TEXT'
EXCEPTIONS
OTHERS = 1.
*dispos detials
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DISPOSI'
EXCEPTIONS
OTHERS = 1.
*ECN number
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ECN'
EXCEPTIONS
OTHERS = 1.
*out_tab headings and data
LOOP AT it_rep_out INTO wa_rep_out.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DETAIL_A'
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
ENDIF.
ENDLOOP.
*Comments from selection screen
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FOOTER'
EXCEPTIONS
OTHERS = 1.Hi,
first store all the relevant data in internal table itab.
loop at itab.
call write form
endloop.
care should be taken that you write the itab in main window.
in script just add
&itab-var1& &itab-var2& and so on...
Regards,
sumit -
Jump from alv report to cor2 screen
Hi experts,
I develop one alv report ..i want to jump from alv report to COR2 screen when click on order number(field name is AUFNR).
i wrote code in this way.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD
CASE SELFIELD-FIELDNAME.
WHEN 'AUFNR'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'AUF' FIELD T_FINAL-AUFNR.
CALL TRANSACTION 'COR2' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM.
but it is not working properly,when u click on any order number it is going only the same order number(in cor2 screen).
what is the problem? set par id (AUF) EXIST IN TPARA table compulsalory or it is created automatically?
pls help me in this . If possible pls send the code.Hi,
I have already mentioned both ways, but ok, once again.
A. how I found parameter ID ANR:
1.) run transaction COR2
2.) set cursor to field "Process order"
3.) press F1 button
4.) performance assistant displays
5.) press "Technical Information"
6.) technical information displays
7.) in field "Parameter ID" you can see parameter ID assigned to a screen field
B. how I found parameter ID BR1:
1.) switch on debugger
2.) run transaction COR2
3.) put a breakpoint on "GET PARAMETER" statement
4.) debugger stops on every GET PARAMETER statement in PBO of COR2
5.) there you can see that BR1 is used for field AUFNR
Basically first mentioned way is sufficient, because system gets parameter value from parameter ID assigned to a screen element automatically. But in this case a value is overwritten by coding in PBO of COR2.
Hope it helps.
Regrds,
Adrian -
Jump from alv report to qa03 screen based on PRUEFLOS field
Hi experts,
I developed one alv report ,in that one field name is PRUEFLOS (inspection lot number).I want to jump from alv report
to QA03 screen based on PRUEFLOS field.I wrote in this way but i didn't get.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
CASE SELFIELD-FIELDNAME.
WHEN 'PRUEFLOS'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'QLS' FIELD T_FINAL-PRUEFLOS.
CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM.
what is the problem ?pls help me in this.Hi Ram,
Recheck:
1) You have passed 'FORM USER_COMMAND' in 'I_CALLBACK_USER_COMMAND' while calling f.m. for ALV displa, and
2) You have checked the value of user command, i.e.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
CASE SY-UCOMM.
WHEN '&IC1'.
CASE SELFIELD-FIELDNAME.
WHEN 'PRUEFLOS'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'QLS' FIELD T_FINAL-PRUEFLOS.
CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
Regards,
Birendra -
Hi Gurus,
is der any way to download data from ALV report to excel sheet depending on layout set dyanmically.
I mean to say that if I choose a layout then data has to transfer to excel sheet according to layout fields automaticaly.I think this can be done by oops ALV , are u using reusealv F.M to call output in ALV ?
Try the below kind of ALV
IN PBO -
>
SET PF-STATUS 'PROJREP'.
SET TITLEBAR text-046.
DATA: g_container TYPE scrfname VALUE 'ALV',
g_grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container. (Name of the container )
CREATE OBJECT g_grid1
EXPORTING i_parent = g_custom_container.
PERFORM create_field_catalog_ce
CALL METHOD g_grid1->set_frontend_fieldcatalog
EXPORTING
it_fieldcatalog = t_fcat_ce.
ALL METHOD g_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ST_DISPLAY'
CHANGING
it_outtab = t_display_io
it_fieldcatalog = t_fcat_ce.
->Create Object to receive events and link them to handler methods.
When the ALV Control raises the event for the specified instance
the corresponding method is automatically called.
CREATE OBJECT g_event_receiver.
SET HANDLER g_event_receiver->handle_double_click FOR g_grid1.
ENDIF.
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid1.
IN PAI -->
CALL METHOD cl_gui_cfw=>dispatch. -
How can I call functionality of ALV Grid by event of button outside grid?
Hello,
How can I call functionality of ALV Grid by event of button located outside ALV Grid? For example how to fire printing of this ALV Grid by button click elsewhere on the screen (not in toolbar of ALV Grid).
Best regards,
Josef Motlhi Motl,
these are steps to create a button in ALV and trigger an event from it..
1.Use the parameter i_callback_pf_status_set in the function module REUSE_ALV_GRID_DISPLAY
i_callback_program = gd_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'NEWALVSTATUS'.
endform.
You have to copy the standard ALV pf stauts to 'NEWALVSTATUS' and add your button.
2.You have to do the following to process the new button click.
i_callback_user_command = 'USER_COMMAND'
form user_command using i_ucomm like sy-ucomm
is_selfield type slis_selfield.
case i_ucomm.
3. to copy the standard pf status to a new one.go to the ALV screen and take the menu System -> Status. Then look for the standard pf status. Copy this to Z range and then add your new button.
reward points if helpful
regards
satesh -
Exporting data from ALV Report...
Dear All,
While I am exporting data from ALV report to any other Format (Excel, Txt, HTML) it only export the data of last column, but the heading is comming properly and also the column heading is displaying properly.
So how to rectify it. (the report is Object Oriented).
Regards,
DahrmeshHi Davabap,
Refer this sample program "BCALV_GRID_VERIFY" . I hope it is problem with structure mismatching.
Otherwise can you paste your code ?
Regards,
Vicky
PS: Award points if helpful -
Calling an existing ALV report in WD4A
Im going to try to call an existing ALV report using WD4A.
Was wondering if anybody has used the "SUBMIT <report> EXPORTING LIST TO MEMORY" option to get the results table, then after IMPORTING from memory, display this in ALV in Webdynpro abap?I was able to acomplish the following way...
My WD4A component has an assistance class, has a method fetch_results, in that method, I pass my selection criteria which calls a function.
The function does this...
SUBMIT REPORTXYZ
USING SELECTION-SET lv_variant
AND RETURN
WITH pnppernr IN pnppernr
WITH pnpbegps EQ act_begda
WITH pnpendps EQ act_endda
WITH pnpbegda EQ act_begda
WITH pnpendda EQ act_endda
WITH pnptimed EQ blank
WITH p_layout EQ '/MGR SEP'
WITH p_portal EQ 'X'.
My p_portal parameter is a flag that REPORTXYZ will use to export the it_output to memory.
I then import that table to the function module which returns to WD4A alv.
IMPORT zit_output TO tbl_output FROM MEMORY ID
lv_flag. -
Can we call bapi from SAP or ABAP How? Pls Step by step
Can we call bapi from SAP How? Pls Step by step
thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
Do you mean you want to access BAPI in ABAP report?
If yes, then YES we can call,
1.Create a report -> In pattern write your BAPI name.
2. It is like your FM , Read correspoding BAPI documentation
3. Fill required parametes.
4. Test run and if successful , final run it.
And from Outside,
You have to establish a connection and create a wrapper and access using avaialble APIs.
Reward if useful! -
Records with a picklist field with empty values can't be seen from a report
Records with a picklist field with empty values can't be seen from a report. I've created a report that have a picklist as a column. When there is no values the record(s) associated to this picklist don't appear. Do you know what are the common causes for this event?
Regards
ArturoHi samrat chakraborty ,
go to SUIM > roles > roles by complexselection criteria>
under the selection according to authorization values give the object's form SU53 screen and press enter it will asks the values for given object pass the values as per the SU53 and execute it will give the list of roles.... capture the roles. The user gets access if you give the any one of the listed roles is assigned, assign the role as per your approval process.
Check with the below link for more assistence:
http://help.sap.com/saphelp_erp2004/helpdata/EN/71/8fba30840c6e4d90da3526971cc684/frameset.htm
Regards,
S.Manu. -
Can i make a normal alv report web eabled if so please guide me
can i make a normal alv report web eabled if so please guide me
i m getting the error as below
Business Server Page (BSP) error
What happened?
Calling the BSP page was terminated due to an error.
SAP Note
The following error text was processed in the system:
Die URL enthält keine vollständige Domainangabe (ecc01 statt ecc01.).
Exception Class
CX_FQDN
Error Name
Program
CX_FQDN=======================CP
Include
CX_FQDN=======================CM002
ABAP Class
CX_FQDN
Analyze
CHECK
Line
10
Long text
Error type: Exception
Your SAP Business Server Pages Team -
Calling screen from another transaction
Hi,
If I want to call screen from other standard or custom transaction into my custom transaction, how do I do it?
Thanks.
Tushar.Hello See this link ,
http://www.sapgenie.com/abap/bdc.htm
This contains the program which calls the transaction using BDC.
Hopping this will help for you -
How to upload/download screen from one report to another report
Hello experts ,
I have to upload a screen from a report say zrept1 screen 0100 to another report say zrept2 screen 0100.
Please , reply .
regards,
Jeet
Moderator message: standard SE80 functionality for copying objects, please do more research before asking.
Edited by: Thomas Zloch on May 19, 2011 3:14 PMHi Anuj,
I have given the function in the prompt message like as you suggested.Next i applied the changes.
Post click on hyperlink still iam facing the same error.
please tell me , Am i doing any thing wrong ?
Regards,
Ram -
How can i exceed the sap screen in ALV report.
hi sap Gurus,
i need solution from you regarding to increase the SAP screen in ALV customised report.
now what we are getting the problem is:
we developed the report, in that lot of fields are there.
because of that the fields are going in second line.
but actually the max length is showing in SAP is :X_65_255.
Please give me the solution to increase the screen.
Regards,
SOMU.Hi,
The standard screen which is displayed once u execute it not possible to change, but can follow one guide line.. by reducing the feild discrption( columns) on the report .
Eg : sold to part can be changed to SP or someother conversion which user understands. ( Before this user confirmation should be taken for this change)
Kindly Reward points if usefull
Regards
vK
Maybe you are looking for
-
Status of document after duplicate in sbo 2007
Hi,everyone I meet a problem in sap business one 2007B. When I duplicated a purchase order ,I found its status is "Unapproved", instead of "Open". So are those marketing documents. Because of it,I can't create a Goods Receipt PO according to that pu
-
My grandson visited the BearShare website. Since then, the only home page that will "stick" in Firefox is http://search.bearshare.com. Repeated attempts to reset my home page have failed. After I reset the home page and close Firefox, when the progra
-
All icons in my dock open when i start my i mac, how can i fix this because i dont want that.
-
Hi I seached in all forum but i did not find relevent solution for my requirment My requirement is like this i'm doing SAP BW/HR full update I got one requirement such a way that ,there want to compare 2009 data with 2010 new data eg) let us presume
-
Color signatures not saved in Preview
Hi all When I paste a signature into Preview (using the inbuilt Preview signature annotation) with a colored ink, it is fine on the screen, and also if printed to paper or pdf; but if the file is simply saved, upon reopening, the signature has change