Refreshing a classical report
Hi all...
I m having a requirement to refresh a classical report from the output screen itself..
From the basic list, if I select a row and click on the detailed list button in application tool bar, a custom screen will be called. In that screen I am modifying some values and saving it. Again if i click back button, the modified value and related calculations should be updated in the basic list.....
The values which I am modifying in the screen are not to be directly updated in the list. Based on the values in the screen there are some computations ( Which are already there in the report)..
If refreshing is not possible, I need to run the report one more time to get the new values in the out put list, which is not desirable.....
Please solve this....
Thanks in advance,
JJ.
Hi Reeta,
I got the requirement to migrate a report in old system (SAP 4.6c) to ECC6.0. The functionality of refreshing the report was not there in the old system, I have to incorporate that.
The old program was not modularized.
I finally myself modularized the code into different sub-routines and I identified that which sub-routines are exactly carrying out the report calculations and display, and I called the same set of two sub-routines under the back button of the detailed screen....
Before this I directly tried with submit to the same program under the back button of detailed list screen...though it is not a good solution it worked fine up to refreshing the report, but if we hit the back button in the refreshed basic list, it will directly go to the easy access screen instead of the selection screen..
So, I followed the modularization of old code and called the particular sub-routines....
-JJ.
Similar Messages
-
Automaticaly refresh a Classic Report
Anyone can help me with this?
How to automaticaly refresh a classic report
TanksSorry for complicating thing, but i think i'm not doing the things right.
I'm putting this on the header of the page but it isnt working. The P4_LIST is the static id of classic report.
<script type="text/JavaScript">
function refresh_this_page(timer_in_seconds) {
var refreshId = setInterval(function(){
$('#P4_LIST').trigger('apexrefresh');
}, timer_in_seconds*1000);
window.onload = refresh_this_page(10);
</script>what i'm doing wrong?
Tanks -
(Classic) Report losing pagination on partial page refresh - APEX feature request
I have a page with both an Interactive Report and some classic Report regions.
Based on user updates, there are many occasions where I need to do a partial page refresh.
Thanks to plugin http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/refresh-interactive-report-1.0_361.html
I'm able to refresh my IR, but not my classic report (unless I do a submit of the whole page) without losing pagination.
Request: Will a Dynamic action 'Refresh without losing pagination' be part of future apex versions?
Now, in apex 4.2, is there another work around available for classic reports?
(I use 'submit page' now as action, but it's at least a second slower as a partial refresh, and because I need it on every user update, this second becomes a big addition to user frustration).
Thanks, JPHere is the solution for your problem:
https://apex.oracle.com/pls/apex/f?p=31517:243
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494 -
Refresh classic report based on select list value selected
hello,
can anyone please help me out with this issue. I have a parameterized classic report based on a select list and I want to refresh this report whenever the select list value is changed. I am using oracle apex version 3.2. i just want to have a javascript function onchange event for the select list which refreshes my report whenever a value is selected.
My select list item is p1_datastore
select distinct datastore d,datastore r from my_table1 order by 1;
My classic report query is
select * from my_table2 where datastore = :p1_datastore order by last_updated_dt desc;
****************************************************thanks,
ortoncan anyone please help me out with this issue.
thanks,
orton -
Refresh Classical report/basic list
Hi,
I have created a classical report/basic list where user can select check boxes and adjacent rows should be deleted. But after the action, I wish to refresh the report and remove the selected lines from displaying.
Please let me know how to achieve this.
Thanks in advance.
NitinHi Nitin,
Check the following program.
Here on pressing the delete push button(FCODE: DELETE) it will delete all
rows which has adjacent checkboxes checked.
REPORT ztest_list_processing NO STANDARD PAGE HEADING .
TYPES: BEGIN OF ty_tab,
delete,
f1(3) TYPE c,
f2(3) TYPE c,
f3(3) TYPE c,
END OF ty_tab.
DATA: it_tab TYPE TABLE OF ty_tab,
wa_tab TYPE ty_tab.
DATA: w_delete TYPE c,
w_lines TYPE i,
w_ind TYPE i.
wa_tab-f1 = '111'.
wa_tab-f2 = 'ABC'.
wa_tab-f3 = '123'.
APPEND wa_tab TO it_tab.
wa_tab-f1 = '222'.
wa_tab-f2 = 'DEF'.
wa_tab-f3 = '456'.
APPEND wa_tab TO it_tab.
wa_tab-f1 = '333'.
wa_tab-f2 = 'GHI'.
wa_tab-f3 = '789'.
APPEND wa_tab TO it_tab.
wa_tab-f1 = '444'.
wa_tab-f2 = 'JKL'.
wa_tab-f3 = '987'.
APPEND wa_tab TO it_tab.
wa_tab-f1 = '555'.
wa_tab-f2 = 'MNO'.
wa_tab-f3 = '654'.
APPEND wa_tab TO it_tab.
SET PF-STATUS '100'. "Contains Delete button
PERFORM print_output.
"Logic which you can implement
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'DELETE'.
DESCRIBE TABLE it_tab LINES w_lines.
DO w_lines TIMES. "To read all rows
CLEAR: wa_tab.
READ LINE w_ind FIELD VALUE wa_tab-delete
wa_tab-f1. "Getting the values
IF wa_tab-delete EQ 'X'. "Delete when check box is 'X'
DELETE it_tab WHERE f1 = wa_tab-f1.
ENDIF.
ADD 1 TO w_ind."Index for next line
ENDDO.
IF it_tab IS INITIAL.
WRITE: / 'There are no data in the table'.
ELSE.
PERFORM print_output. "Reprint the updated data(like refreshing)
ENDIF.
"Modified the existing Back button in standard Toolbar so that on
"pressin the back button it will come to program and not to
"previous displayed list
WHEN '&BACK'.
LEAVE SCREEN.
ENDCASE.
*& Form print_output
* text
* --> p1 text
* <-- p2 text
FORM print_output.
LOOP AT it_tab INTO wa_tab.
WRITE:/ wa_tab-delete AS CHECKBOX INPUT ON, "Display as checkbox
wa_tab-f1,
wa_tab-f2,
wa_tab-f3.
IF sy-tabix EQ 1.
w_ind = sy-linno. "Get the line position of first row
ENDIF.
ENDLOOP.
Hope this helps you.
Regards,
Manoj Kumar P -
Print LOGO in classical report printout
Hi GURUS,
Is it possible to take print of logo in classical report.refer this link:[click|http://tinyurl.com/5s22vp]
the code is copied from that link.
Make the changes in the code as given below.
REPORT zgb_prog06.
* START OF DO NOT CHANGE***********************************
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,
html_table LIKE w3html OCCURS 1,
return_code LIKE w3param-ret_code,
content_type LIKE w3param-cont_type,
content_length LIKE w3param-cont_len,
pic_data LIKE w3mime OCCURS 0,
pic_size TYPE i.
* END OF DO NOT CHANGE*************************************
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: p_dummy(4) DEFAULT '4' .
PARAMETERS: p_dummy1(4) DEFAULT '5' .
AT SELECTION-SCREEN OUTPUT. "Remove this event
START-OF-SELECTION.
write 'Testing picture printing in classic report'.
PERFORM show_pic. "Add it here
end-of-selection.
*& Form show_pic
FORM show_pic.
DATA: repid LIKE sy-repid.
repid = sy-repid.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>DISPLAY_MODE_FIT.
CALL METHOD picture_control_1->set_position "change positions
EXPORTING
height = 70
left = 800
top = 20
width = 190.
*CHANGE POSITION AND SIZE ABOVE***************************
IF url IS INITIAL.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
*CHANGE IMAGE NAME BELOW UPLOADED IN SWO0******************
query_table-value = 'ZLOGO'.
APPEND query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 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 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = url.
*Syntax for URL
*url = 'file://D:\corp-gbanerji\pickut\cartoon_184.gif'.
*url = 'http://l.yimg.com/a/i/ww/beta/y3.gif'.
ENDFORM. "show_pic -
Highligh current row not working for classic report in 4.1
Hello experts,
One of our customers is migrating applications from APEX 3.0 to 4.1.
All their applications use classic reports because interactive reports didn't exist in 3.0.
The end users of the applications like the row color changing when they hover there mouse over the rows (highlight current row) and they insist on keeping this "functionality" in the applications.
For some reason, this "functionality" doesn't work anymore after the migration to APEX 4.1.
I thought it was something theme related so I created a new application with a classic report, tried some APEX built-in themes, and with none of them, I manage to get the highlight current row working.
For interactive reports it is not an issue.
Is this an undocumented no-longer-available feature of APEX 4.x or has there changed something which caused this functionality to stop working??
Regards,
BartHi,
I created a service request for this issue, and the support analyst that helped me confirmed that this is a bug:
"I have created the bug :
Bug 13584762 - ROW HIGHLIGHTING NO MORE WORKS IN CLASSIC REPORT IN APEX 4.1
While working on the problem , I have found the following solution in order to make the Row HighLightng work in APEX 4.1
In the apex_4_1.min.js (file located in images\javascript ) , Search for :
function setRowHighlight(a){apex.jQuery("#report_"+a+" .highlight-row").live("hover",function(b)
and replace "hover" by "mouseover mouseout" :
After the modification :
function setRowHighlight(a){apex.jQuery("#report_"+a+" .highlight-row").live("mouseover mouseout",function(b)
A refresh in the browser may be necessary in order to "reload" the file apex_4_1.min.js"
I implemented the suggested workaround and this solved the problem!
HTH,
Matthias Hoys -
Classic Report - Column Conditions Not taking Effect when Changing Pagination
Apex Version: 4.2.1.00.08
DB Version: 11g Release 11.2.0.3.0
Hi,
I have a classic report that has some columns that conditional hide/show depending upon the value of a page item. When the report is first displayed with the first pagination set(Rows 1-100), the columns display as they should.
When moving to the next pagination set(Rows 101-200), the columns no longer display as they should and it seems that the condition is not taking effect. Partial Page Refresh is set to 'Yes' for the report.
Any ideas on why this might be occurring?tvanderl
Assuming you mean that columns are rendered while you expect them not to.
Are the conditions based on page items.
It could be that the session state of those items is different between when the page is first rendered and when de refresh due to the pagination is done.
See if adding the in the condition used page items to the page items to be submitted for the region helps.
Others wise see if you can replicate the issue on apex.oracle.com so we can see what you mean.
Nicolette -
How can a classic report be filtered using one select item and dynamic action?
APEX 4.2.1
DB 11g
I have a page with 4 reports on it. The top report is an interactive report and the following 3 are classic reports. The users would like to be able to use a select list to filter the 3rd report by PO line number without refreshing the entire page.
After verifying that the report is set to allow partial refreshes, I took the following steps
1. Created a PO Line select item (p_po_line_select) in the same report region
2. Added p_po_line_select to the report query
3. Created a dynamic action on p_po_line_select with 2 true actions
1. Set value (p_po_line_select)
2. Refresh report region.
The Set Value dynamic step was not working; I would get an out of memory error at line 2, memory stack error, or the value did not get saved to session state depending on the settings I selected. I was able to get it working with the following set:
1. Action = Set Value
2. Set type = PL/SQL Expression
3. PL/SQL Expression = :p_field_does_not_exist
4. Page items to submit = blank
5. Selection Type = Item(s)
6. Item(s) = p_field_does_not_exist
p_field_does_not_exist does not exist as a page or application item which leads me to believe that this is a bug and I am just lucky that it worked. I would rather know how to do this properly. Can someone please provide a link to a working example of how this should be done or state which settings are wrong?
I was able to reproduce the issue in the following app
http://apex.oracle.com/pls/apex/f?p=4500:1000
workspace = occam
user test/apex1
Thanks,STOP POSTING DUPLICATE THREADS.
If you have additional information, continue the discussion by posting it as a follow-up on the original thread: What is the proper way to filter classic report using just an LOV select field with dynamic action? -
How to print logo in printout using classical report.
Hello Friends,
By using below code i am displaying logo in output using Classical report.
What my problem is it is not displaying in print out.
Please help. or else tell me how to print logo in classical report as well as output print out.
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c ,
query_table LIKE w3query OCCURS 1 WITH HEADER LINE,
html_table LIKE w3html OCCURS 1,
return_code LIKE w3param-ret_code,
content_type LIKE w3param-cont_type,
content_length LIKE w3param-cont_len,
pic_data LIKE w3mime OCCURS 0,
pic_size TYPE i,
repid LIKE sy-repid.
repid = sy-repid.
START-OF-SELECTION.
CREATE OBJECT picture_control_1
EXPORTING
parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 100
left = 700
top = 1
width = 200.
"Position
IF url IS INITIAL.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
" Logo Name
query_table-value = 'ENJOYSAP_LOGO'.
APPEND query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 2
OTHERS = 3.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = url.
WRITE : /'Classical Report Logo'.
Regards,
Phaneendra
Edited by: phaneendra punukollu on Dec 31, 2009 11:38 AM
Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 4:52 PMHello Nidhi,
Thanks for your sugessition.
Actual we have data from IDOCS and it is maintained in Ztables
and need to dispaly in report ( Service centre - Warranty data ).
The report is completed. So again going to Script means waste of time for us.
So Plz help me if possible in Classical report.
Regards,
Phaneendra -
Hi Experts,
I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
How to convert into PDF format from Classical report ?
YusufHi yusuf,
please find the below report,,
please make two include programs before executing it,
there codes are pasted below,
INCLUDE zimpr_data_declaration.
INCLUDE zimpr_performs_wrap.
REPORT zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
INCLUDE for DATA DECLARATION *
INCLUDE zimpr_data_declaration.
INCLUDE for all performs. *
INCLUDE zimpr_performs_wrap.
TOP-OF-PAGE--
TOP-OF-PAGE.
PERFORM f_top_page. "TOP OF THE REPORT PAGE,I.E. HEADER.
START-OF-SELECTION.
SET PF-STATUS 'SEL_SCREEN'. "PF-STATUS OF THE SELECTION SCREEN.
PERFORM f_data_retrieval. "PERFORM FOR ALL SELECT STATEMENTS.
PERFORM f_report_display. "REPORT DISPLAY,WRITE STATEMENTS.
--Define the actions to be performed for pf-status-----
AT USER-COMMAND.
wf_ok_code = sy-ucomm.
wf_save_ok = wf_ok_code.
CLEAR wf_ok_code.
CASE wf_save_ok.
WHEN 'PDF'. "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
loc_repid = sy-repid. "PROGRAM NAME
--THIS FM SETS THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = loc_paart "LANDSCAPE LAYOUT
line_size = loc_linsz "CHARACTER WIDTH OF REPORT
no_dialog = 'X'
user = sy-uname "USERNAME
IMPORTING
out_parameters = loc_print_parms "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
valid = loc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
--FOR GENERATING THE SPOOL NUMBER--
NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms. " This allocates the spool no
"to the screen without the dialog screen.
PERFORM f_top_page.
PERFORM f_report_display.
NEW-PAGE PRINT OFF. "This marks the end of the screen for which the spool no was generated.
wf_id = sy-spono. " This assign the spool no of the screen to the variable.
--PERFORM FOR GETTING THE PDF OUTPUT--
PERFORM f_pdf_display.
--PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
PERFORM f_download_local.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
include data declaration----
*& Include ZIMPR_DATA_DECLARATION
TYPE-POOLS : shlp.
DATA : wf_ordert TYPE aufk-auart. "ORDER TYPE
DATA : wf_order TYPE aufk-aufnr. "ORDER NUMBER
DATA : wf_bdate TYPE afko-gstrp. "BASIC START DATE
DATA : wf_status(4) TYPE c ."rihea-i_astatin. "STATUS
DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'. "Object number
DATA : wf_aufnr TYPE aufk-aufnr.
DATA : wf_name TYPE thead-tdname. "NAME TO PASS IN FM READ_TEXT
DATA : wf_date1(12) TYPE c. "DATE
DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'. "COUNTERS FOR REPORT DISPLAY
DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
DATA: wf_id TYPE tsp01-rqident , " For storing Spool request number
wf_bytes TYPE i . " For storing the bytes of data to be converted to PDF.
DATA : wf_langu(2) TYPE c VALUE 'EN'.
DATA: wf_pripar TYPE pri_params, " Structure for Passing Print Parameters
wf_rcpar TYPE arc_params. " ImageLink structure
DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
&--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_ordert FOR wf_ordert . "ORDER TYPE
SELECT-OPTIONS: s_order FOR wf_order OBLIGATORY. "ORDER NUMBER
SELECT-OPTIONS: s_bdate FOR wf_bdate. "BASIC START DATE
SELECT-OPTIONS: s_status FOR wf_status matchcode object zei_sys . "SYSTEM STATUS
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK b_1.
*--INTERNAL TABLES--
TYPES : BEGIN OF ty_aufk,
aufnr TYPE aufk-aufnr, "OREDR NUMBER
auart TYPE aufk-auart, "ORDER TYPE
objnr TYPE aufk-objnr, "OBJECT NUMBER
ktext type aufk-ktext, "SHORT TEXT
gstrp TYPE afko-gstrp, "BASIC START DATE
END OF ty_aufk.
TYPES : BEGIN OF ty_tj02t,
objnr TYPE aufk-objnr, "OBJECT NUMBER
txt04 TYPE tj02t-txt04, "STATUS
istat TYPE tj02t-istat, "Object status
spras TYPE tj02t-spras, "LANGUAGE KEY
END OF ty_tj02t.
TYPES : BEGIN OF ty_temp,
objnr TYPE aufk-objnr,
status(300) TYPE c,
END OF ty_temp.
TYPES : BEGIN OF ty_wrap,
line(54) TYPE c, "LONG TEXT
END OF ty_wrap.
TYPES : BEGIN OF ty_wrap2,
line(25) TYPE c, "STATUS
END OF ty_wrap2.
TYPES : BEGIN OF ty_f4,
txt04 TYPE tj02t-txt04,
txt30 TYPE tj02t-txt30,
END OF ty_f4.
types : begin of ty_sta,
istat type tj02t-istat,
objnr type jest-objnr,
end of ty_sta.
data : int_sta type table of ty_sta with header line.
DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE. "TABLE FOR PDF CONVERSION
DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE. "TABLE FOR LONGTEXT
DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE. "TABLE FOR STATUS
DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE. "Table for concatenation of system status.
DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld. " Field Type for FM for F4 help
DATA :int_return TYPE TABLE OF ddshretval WITH HEADER LINE .
DATA:
loc_print_parms LIKE pri_params, "PRINT PARAMETERS
loc_valid(1) TYPE c,
loc_file type SDOK_CHTRD,
loc_bytecount TYPE i, "NUMBER OF BYTES TRANSFERRED
loc_length TYPE i, "LINE-LENGTH
loc_rqident LIKE tsp01-rqident, "SPOOL NUMBER
loc_rq2name(12) TYPE c.
DATA: loc_filename LIKE rlgrap-filename. "FILENAME
DATA:loc_repid LIKE sy-repid, " Report to execute
loc_linsz LIKE sy-linsz VALUE 115, " Line size
loc_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
Include ZIMPR_PERFORMS_WRAP----
*& Include ZIMPR_PERFORMS_WRAP
*& Form f_top_page
top-of the page
--> p1 text
<-- p2 text
FORM f_top_page .
*--HEADER--
FORMAT COLOR 1 .
WRITE : text-010.
FORMAT COLOR 1 OFF.
WRITE : / text-011,sy-datum NO-GAP.
WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
ULINE .
FORMAT COLOR 1 INTENSIFIED OFF .
WRITE : 1 sy-vline, "HEADINGS
2 text-014 NO-GAP,
7 sy-vline,
8 text-015 NO-GAP,
20 sy-vline,
21 text-016 NO-GAP,
76 sy-vline,
77 text-017 NO-GAP,
88 sy-vline,
89 text-018 NO-GAP,
115 sy-vline.
WRITE : /1 sy-vline,
2 text-019 NO-GAP,7 sy-vline,
20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
ULINE.
FORMAT COLOR 1 OFF.
ENDFORM. " f_top_page
*& Form f_data_retrieval
select statements
--> p1 text
<-- p2 text
FORM f_data_retrieval .
SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
SELECT p~aufnr
p~auart
p~objnr
p~ktext
r~gstrp
FROM ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
INTO TABLE int_aufk
WHERE p~aufnr IN s_order AND
p~auart IN s_ordert AND
r~gstrp IN s_bdate AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_aufk BY aufnr.
DELETE ADJACENT DUPLICATES FROM int_aufk.
SELECT q~istat
p~objnr
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_sta
FOR ALL ENTRIES IN int_aufk
WHERE p~objnr = int_aufk-objnr
AND q~txt04 IN s_status and
q~spras = wf_langu and
p~inact = ''.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_sta BY objnr.
DELETE ADJACENT DUPLICATES FROM int_sta.
*--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
IF int_sta[] IS NOT INITIAL.
SELECT p~objnr
q~txt04
q~istat
q~spras
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_tj02t
FOR ALL ENTRIES IN int_sta
WHERE p~inact = '' AND
p~objnr = int_sta-objnr AND
q~spras = wf_langu AND
q~txt04 IN s_status AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
ENDIF.
ENDFORM. " f_data_retrieval
*& Form f_report_display
report display
--> p1 text
<-- p2 text
FORM f_report_display .
LOOP AT int_tj02t. "concatenating the status into a internal table
AT NEW objnr.
CLEAR int_temp-status.
ENDAT.
CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
AT END OF objnr.
int_temp-objnr = int_tj02t-objnr. "key field.
APPEND int_temp.
CLEAR int_temp.
ENDAT.
CLEAR int_tj02t.
ENDLOOP.
LOOP AT int_aufk.
CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name . "concatenating client number and order number
*--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = wf_kopf "TEXT ID
language = sy-langu "LANGUAGE
name = wf_name "TEXT NAME
object = wf_aufk "TEXT OBJECT
TABLES
lines = int_tline "LINES OF LONG TEXT.
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
int_tline-tdline = int_aufk-ktext.
APPEND int_tline.
CLEAR :int_tline.
ENDIF.
LOOP AT int_tline.
*--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_tline-tdline "LONG TEXT LINE
outputlen = 54 "OUTPUT LENGTH
TABLES
out_lines = int_wrap "INTERNAL TABLE
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR :int_tline.
ENDIF.
ENDLOOP.
*-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_temp-status
outputlen = 25
TABLES
out_lines = int_wrap2
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF NOT int_wrap2[] IS INITIAL.
ULINE AT (115).
ENDIF.
DESCRIBE TABLE int_wrap LINES wf_i2. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
DESCRIBE TABLE int_wrap2 LINES wf_i1. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
IF ( wc_i2 LE wf_i2 ).
READ TABLE int_wrap INDEX wc_i2 . "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
wc_i2 = wc_i2 + 1.
ENDIF.
IF ( wc_i1 LE wf_i1 ).
READ TABLE int_wrap2 INDEX wc_i1 . "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
wc_i1 = wc_i1 + 1.
ENDIF.
*--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_aufk-gstrp
IMPORTING
output = wf_date1.
IF NOT int_wrap2[] IS INITIAL .
*--REPORT DISPLAY--
WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
20 sy-vline,21 int_wrap-line,
76 sy-vline ,77 wf_date1 ,
88 sy-vline ,89 int_wrap2-line,
115 sy-vline.
*--CLEARING THE VARIABLES--
wf_date1 = ''.
CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
ENDIF.
ENDWHILE.
wc_i1 = 1.
wc_i2 = 1.
CLEAR :int_wrap,int_wrap2.
REFRESH : int_wrap,int_wrap2,int_tline.
ENDLOOP.
ULINE AT (115).
ENDFORM. " f_report_display
*& Form F_PDF_DISPLAY
pdf conversion
--> p1 text
<-- p2 text
FORM f_pdf_display .
*--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = wf_id "SPOOL NUMBER
no_dialog = space
pdf_destination = 'X'
IMPORTING
pdf_bytecount = loc_bytecount "NUMBER OF BYTES TRANSFERRED
TABLES
pdf = int_pdf "TABLE FOR PDF REPORT
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
ENDFORM. " F_PDF_DISPLAY
*& Form f_download_local
download to local system
--> p1 text
<-- p2 text
FORM f_download_local .
---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
data loc_ret TYPE iwerrormsg.
CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
IMPORTING
SAPWORKDIR = loc_file
ERROR_MSG = loc_ret
loc_filename = loc_file.
if loc_ret is initial.
concatenate loc_filename '\work order header long text_ ' sy-timlo '.pdf' into loc_filename.
endif.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = loc_bytecount "NO. OF BYTES
filename = loc_filename "DEFAULT FILE NAME
filetype = 'BIN'
IMPORTING
act_filename = loc_filename
TABLES
data_tab = int_pdf.
ENDFORM. " f_download_local
if you have any doubts,,
please revert
Regards,
Talwinder -
Hi SAP gurus,
My requirement is to add a button on the Output of a Classical report. When any line is selected on the report and the changes have been made in the detail, after coming back to the main list, I should be able to refresh the data by clicking the refresh button.
I used PF-status to put the refresh button on the report but I am not able to drill down into the lines.
Could you help me with this.
Thanks,
Reeta.Go through the sample report.
REPORT YMS_INTERACTIVETEST LINE-SIZE 50 NO STANDARD PAGE HEADING.
TABLES: VBAP,KNA1,VBAK.
SELECT-OPTIONS: CUST FOR KNA1-KUNNR.
DATA: BEGIN OF ITAB OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
VBELN LIKE VBAK-VBELN,
AUDAT LIKE VBAK-AUDAT,
AUART LIKE VBAK-AUART,
POSNR LIKE VBAP-POSNR,
POSAR LIKE VBAP-POSAR,
END OF ITAB.
DATA: ITAB1 LIKE ITAB OCCURS 0 WITH HEADER LINE.
INITIALIZATION.
START-OF-SELECTION.
SELECT KNA1~KUNNR KNA1~NAME1 INTO CORRESPONDING FIELDS OF TABLE ITAB1
FROM KNA1 WHERE KNA1~KUNNR IN CUST.
LOOP AT ITAB1.
WRITE:/10 ITAB1-KUNNR HOTSPOT, 30 ITAB1-NAME1.
HIDE: ITAB1-KUNNR.
ENDLOOP.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN '1'.
SELECT KNA1~KUNNR VBAK~VBELN VBAK~AUDAT VBAK~ERDAT INTO CORRESPONDING FIELDS OF TABLE ITAB1
FROM KNA1 INNER JOIN VBAK ON KNA1~KUNNR = VBAK~KUNNR.
LOOP AT ITAB1.
WRITE:/ ITAB1-VBELN HOTSPOT, ITAB1-AUDAT, ITAB1-AUART.
HIDE: ITAB1-VBELN, ITAB1-AUDAT, ITAB1-AUART.
ENDLOOP.
WHEN '2'.
SELECT VBAK~VBELN VBAP~POSNR VBAP~POSAR
INTO CORRESPONDING FIELDS OF TABLE ITAB1 FROM VBAK INNER JOIN VBAP ON VBAK~VBELN = VBAP~VBELN.
LOOP AT ITAB1.
WRITE:/ ITAB1-POSNR, ITAB1-POSAR.
ENDLOOP.
ENDCASE.
TOP-OF-PAGE.
WRITE:/ SY-VLINE,TEXT-001 COLOR COL_NEGATIVE.
ULINE. -
Adding button in classical report
Hi All,
I have a requirement to add a button in the Classical report.
Iam new to abap.can anyone please guide me regarding this?
Thanks in advancehi,
if you use reuse alv grid. you can define your button at pf status. here the example :
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'MY_PF_STATUS'
i_callback_user_command = 'MY_USER_COMMAND'
then :
FORM my_pf_status USING it_extab TYPE slis_t_extab.
SET PF-STATUS 'MY_PF_STATUS'.
ENDFORM. "MY_PF_STATUS
FORM my_user_command USING ip_ucomm TYPE sy-ucomm
ip_selfield TYPE slis_selfield.
CASE ip_ucomm.
WHEN 'VBELN'.
SET PARAMETER ID 'AUN' FIELD ip_sellfield-value.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDCASE.
CLEAR : ip_ucomm.
ip_selfield-refresh =
ip_selfield-col_stable =
ip_selfield-row_stable = 'X'.
ENDFORM.
if you use : write for output.
START-OF-SELECTION.
SET PF-STATUS 'DENEME'.
WRITE : 'EXAMPLE'.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'EXAM'.
BREAK-POINT.
ENDCASE.
if you use Class for ALV u can find more info at here : [OO ALV Reference|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907] -
Drill Down In classical report
Hi
i had done a classical report ,but now user wants in in drill down ,
My output now is
Planned Downtime
IDLE MACHINE TIME (DUE TO) 25.50 47.60 %
PREVENTATIVE MAINTENANCE 88.50 0.32 %
HOLIDAYS 288 1.05 %
Unplanned Downtime 0.00 0.00 %
SHIFT START-UP 0.00 0.00 %
PRODUCT TO PRODUCT CLEANING 0.00 0.00 %
BATCH TO BATCH CLEANING 0.00 0.00 %
Now he want a plus sign at planned and unplanned down time
when click on that pplus sign i should get details of that
similarly same for unplanned and rest and also Minus ..
Most importantly iam using sy-vline uline all in normal list to display.
Is it possible in classical report ..if yes then pls help me
out in this if possible with code.
Regards
Answers will be rewarded points.Hi,
see this example.
REPORT ZRJNTRIAL_TREE LINE-COUNT 65
LINE-SIZE 80
NO STANDARD PAGE
HEADING.
DATA: BEGIN OF ITEMS OCCURS 100,
ID(10),
PARENT_ID(10),
TEXT(20),
SYMBOL,
END OF ITEMS,
TABIX_STACK LIKE SY-TABIX OCCURS 10 WITH HEADER LINE,
ITEMS_SHOW LIKE ITEMS OCCURS 100 WITH HEADER LINE.
INCLUDE <SYMBOL>.
append sample items (mixed order)
PERFORM APPEND_ITEM USING:
'1' '' 'Food',
'2' '' 'Drinks',
'12' '9' 'Jack Daniels',
'17' '11' 'Bosch',
'3' '' 'Tools',
'4' '1' 'Meat',
'16' '11' 'Metabo',
'5' '1' 'Chocolate',
'6' '2' 'Alcoholic',
'8' '4' 'Pork',
'10' '5' 'Milka',
'11' '3' 'Drills',
'13' '9' 'Jim Beam',
'7' '4' 'Beef',
'14' '2' 'Non-alcoholic',
'35' '31' 'Teran',
'9' '6' 'Whiskey',
'15' '14' 'Coca-cola',
'18' '6' 'Wine',
'28' '18' 'Croatia',
'33' '28' 'Slavonia',
'34' '28' 'Istria',
'29' '18' 'Hungary',
'30' '29' 'Tokaj',
'19' '33' 'Enjingi',
'20' '33' 'Zdjelarevic',
'22' '19' 'Riesling',
'23' '19' 'Chardonnay',
'24' '20' 'Riesling',
'32' '31' 'Malvazija',
'25' '20' 'Merlot',
'31' '34' 'Tomasevic'.
show initial list (items with level 0 - parentless items)
LOOP AT ITEMS WHERE PARENT_ID = ''.
MOVE-CORRESPONDING ITEMS TO ITEMS_SHOW.
ITEMS_SHOW-SYMBOL = '+'.
APPEND ITEMS_SHOW.
ENDLOOP.
PERFORM PRINT_TREE TABLES ITEMS_SHOW.
at line-selection - when the node is opened/closed or item double-clk
AT LINE-SELECTION.
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID. "see 'hide'
IF SY-SUBRC = 0. "item has children - expand or collapse
SY-LSIND = 0.
PERFORM EXPAND_COLLAPSE USING ITEMS_SHOW-ID.
PERFORM PRINT_TREE TABLES ITEMS_SHOW.
ELSE. "item has NO children - perform some action
READ TABLE ITEMS WITH KEY ID = ITEMS_SHOW-ID.
WRITE: 'Action performed on item "' NO-GAP, ITEMS-TEXT NO-GAP,
'", id.', ITEMS-ID.
ENDIF.
form print_tree
FORM PRINT_TREE TABLES ITEMS STRUCTURE ITEMS.
DATA: V_TABIX LIKE SY-TABIX,
START_TABIX LIKE SY-TABIX,
V_LEVEL LIKE SY-TFILL,
V_OFFSET TYPE I,
V_ID LIKE ITEMS-ID,
V_PARENT_ID LIKE ITEMS-PARENT_ID,
V_PARENT_ID_FOR_VLINE LIKE ITEMS-PARENT_ID,
V_PREV_LEVEL TYPE I,
V_ITEMS_COUNT LIKE SY-TFILL,
V_VLINES_STRING(200).
CHECK NOT ITEMS[] IS INITIAL.
SORT ITEMS BY PARENT_ID ID.
READ TABLE ITEMS INDEX 1.
V_PARENT_ID = ITEMS-PARENT_ID.
START_TABIX = 1.
REFRESH TABIX_STACK.
DO.
LOOP AT ITEMS FROM START_TABIX.
V_TABIX = START_TABIX = SY-TABIX."remember current index
V_ID = ITEMS-ID.
V_PARENT_ID_FOR_VLINE = ITEMS-PARENT_ID.
decrease level and exit loop if parent not the same as previous
IF ITEMS-PARENT_ID NE V_PARENT_ID.
PERFORM READ_FROM_STACK CHANGING START_TABIX. "level = NoOfRecs
READ TABLE ITEMS INDEX START_TABIX.
V_PARENT_ID = ITEMS-PARENT_ID.
ADD 1 TO START_TABIX. "next loop starts from parent index + 1
clear vline
IF V_LEVEL > 1.
V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
EXIT.
ENDIF.
V_PARENT_ID = ITEMS-PARENT_ID.
write item
FORMAT COLOR OFF.
DESCRIBE TABLE TABIX_STACK LINES V_LEVEL."level is no of StackRecs
WRITE: / V_VLINES_STRING.
V_OFFSET = V_LEVEL * 3.
IF V_LEVEL NE 0.
IF V_PREV_LEVEL < V_LEVEL.
WRITE: AT V_OFFSET '|', / ''.
WRITE: / V_VLINES_STRING.
ENDIF.
V_OFFSET = V_LEVEL * 3.
WRITE AT V_OFFSET '|--'.
ENDIF.
V_OFFSET = V_OFFSET + 3.
CASE ITEMS-SYMBOL.
WHEN '+'.
WRITE AT V_OFFSET SYM_PLUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WHEN '-'.
WRITE AT V_OFFSET SYM_MINUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WHEN OTHERS. FORMAT COLOR 5.
ENDCASE.
WRITE: ITEMS-TEXT.
V_PREV_LEVEL = V_LEVEL.
HIDE: ITEMS-ID.
ADD 1 TO V_ITEMS_COUNT.
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS-ID.
increase level and exit loop if item has children
IF SY-SUBRC = 0.
START_TABIX = SY-TABIX.
APPEND V_TABIX TO TABIX_STACK. "level is no of recs in stack
V_PARENT_ID = ITEMS-PARENT_ID.
set vline
V_TABIX = V_TABIX + 1.
READ TABLE ITEMS INDEX V_TABIX.
V_OFFSET = 2 + ( V_LEVEL - 1 ) * 3.
IF V_LEVEL > 0.
IF ITEMS-PARENT_ID = V_PARENT_ID_FOR_VLINE AND SY-SUBRC = 0.
V_VLINES_STRING+V_OFFSET = '|'.
ELSE.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
ENDIF.
EXIT.
ENDIF.
at last - decrease level
AT LAST.
clear vline
IF V_LEVEL > 1.
V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
" next loop starts from parent index, not parent index + 1
" because of different parents level will decrease anyway
PERFORM READ_FROM_STACK CHANGING START_TABIX.
APPEND START_TABIX TO TABIX_STACK. "must return index to stack
ENDAT.
ENDLOOP.
DESCRIBE TABLE ITEMS.
IF START_TABIX > SY-TFILL OR V_ITEMS_COUNT >= SY-TFILL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
form expand_collapse
FORM EXPAND_COLLAPSE USING VALUE(V_ID).
DATA: V_NO_MORE_ORPHANS,
ITEMS_TEMP LIKE ITEMS OCCURS 100 WITH HEADER LINE.
DELETE ITEMS_SHOW WHERE PARENT_ID = V_ID. "try to collapse
IF SY-SUBRC = 0. "succesfull first collapse
DO. "cascade collapse - delete 'orphans' that are left
REFRESH ITEMS_TEMP.
MOVE ITEMS_SHOW[] TO ITEMS_TEMP[].
SORT ITEMS_TEMP BY ID.
V_NO_MORE_ORPHANS = 'X'.
LOOP AT ITEMS_SHOW WHERE PARENT_ID NE ''.
READ TABLE ITEMS_TEMP WITH KEY ID = ITEMS_SHOW-PARENT_ID
BINARY SEARCH TRANSPORTING NO FIELDS.
IF SY-SUBRC NE 0. "no parent - it's an orphan
CLEAR V_NO_MORE_ORPHANS.
DELETE ITEMS_SHOW.
ENDIF.
ENDLOOP.
IF V_NO_MORE_ORPHANS = 'X'. EXIT. ENDIF.
ENDDO.
ITEMS_SHOW-SYMBOL = '+'.
MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
ELSE. "unsuccessfull collapse - expand
ITEMS_SHOW-SYMBOL = '-'.
MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
LOOP AT ITEMS WHERE PARENT_ID = V_ID. "show children
APPEND ITEMS TO ITEMS_SHOW.
ENDLOOP.
LOOP AT ITEMS_SHOW WHERE PARENT_ID = V_ID. "check grandchildren
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID.
IF SY-SUBRC = 0.
ITEMS_SHOW-SYMBOL = '+'.
ELSE.
ITEMS_SHOW-SYMBOL = ''.
ENDIF.
MODIFY ITEMS_SHOW.
ENDLOOP.
ENDIF.
ENDFORM.
form append_item
FORM APPEND_ITEM USING VALUE(ID) VALUE(PARENT_ID) VALUE(TEXT).
ITEMS-ID = ID.
ITEMS-PARENT_ID = PARENT_ID.
ITEMS-TEXT = TEXT.
APPEND ITEMS.
ENDFORM.
form read_from_stack
FORM READ_FROM_STACK CHANGING TABIX LIKE SY-TABIX.
DESCRIBE TABLE TABIX_STACK.
CHECK SY-TFILL NE 0.
READ TABLE TABIX_STACK INDEX SY-TFILL.
TABIX = TABIX_STACK.
DELETE TABIX_STACK INDEX SY-TFILL.
ENDFORM.
rgds,
bharat. -
HI ,
Is it possible to display the logo in classical basic) reports.
if possible tell me how to doHi,
I have inserted a picture in my classical report. According to the position where you want can be adjusted. If you know how to upload Logo in SMW0 then upload and just copy paste the code that i have shown will display the image.
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,
html_table LIKE w3html OCCURS 1,
return_code LIKE w3param-ret_code,
content_type LIKE w3param-cont_type,
content_length LIKE w3param-cont_len,
pic_data LIKE w3mime OCCURS 0,
pic_size TYPE i.
END OF DO NOT CHANGE----------------------*
FORMAT HOTSPOT ON.
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: A(4) DEFAULT '4' .
PARAMETERS: B(4) DEFAULT '5' .
DATA: ANSWER TYPE I.
ANSWER = A + B.
WRITE:/ ANSWER.
AT SELECTION-SCREEN OUTPUT.
PERFORM show_pic.
PERFORM show_pic1.
START-OF-SELECTION.
*& Form show_pic
FORM show_pic.
DATA: repid LIKE sy-repid.
repid = sy-repid.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 90
left = 40
top = 30
width = 190.
CHANGE POSITION AND SIZE ABOVE****************
IF url IS INITIAL.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
CHANGE IMAGE NAME BELOW UPLOADED IN SWO0*****************
query_table-value = 'YREDDY'. "name which u have given in SMW0
APPEND query_table.
query_table-value = 'YLOGO'.
APPEND query_table.
*FORMAT HOTSPOT ON.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 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 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = url.
FORMAT HOTSPOT OFF.
ENDFORM.
INSERT PICTURE IN SMW0 TXCODE.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Oct 29, 2008 1:16 PM
Maybe you are looking for
-
Excel 2007 and 2010 slow to save to network drive with Windows 7
I know this issue has been passed around and I know that there are some fixes out there. I will lay out my issue and resources, what I've tried and the things I've noticed. I have a mix of Server 2003 32bit, 64 bit and 2008 64 bit. The desktop/laptop
-
Calling stored procedure and returning multiple resultsets
Hello, Is it possible to create a procedure that return multiple result sets? e.g. procedure GetDataFromTables() is begin select * from table_one; select * from table_two; end GetDataFromTables; And I want to call this procedure that returns multiple
-
With the new update for iphone, how do I delete a photo and how do I close open apps. There used to be a delete button to delete a photo and I used to double click on the main phone button and then click on the x to close an app.
-
Specific differences between AP and bridge modes?
I've RTFM'd everywhere but cannot find anything definitive regarding the differences between AP+client versus bridge+bridge modes. Presume you have a pair of AP1200's. First test case: One is in AP mode and the other is in WGB mode. Second test case:
-
Deal with $0.00 line items? (AP Module)
Greetings all, Apologies in advance if this is placed in the wrong location or group...(Newbie alert) A question from one of my users... Is there any way to "turn off/hide" the $0.00 amount lines in a PO when the invoice arrives and they need to deal