Submit report and export to memory
Hi
I am using this code to submit report
submit ZM005REP
WITH S_BLEND IN R2
WITH S_GROUP IN R3
WITH S_WERKS IN r1
exporting list to memory and return.
I am using LIST_FROM_MEMORY to read the list.
I want to further use the values from this list for calculations , but when I saw the list its just an array of strings.
I want to read the opening bal field which is returned in this list.
Any advice on this ?
Thanks,
Shital
Hi,
DATA BEGIN OF itab_list OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA END OF itab_list.
DATA: BEGIN OF vlist OCCURS 0,
filler1(01) TYPE c,
field1(06) TYPE c,
filler(08) TYPE c,
field2(10) TYPE c,
filler3(01) TYPE c,
field3(10) TYPE c,
filler4(01) TYPE c,
field4(3) TYPE c,
filler5(02) TYPE c,
field5(15) TYPE c,
filler6(02) TYPE c,
field6(30) TYPE c,
filler7(43) TYPE c,
field7(10) TYPE c,
END OF vlist.
SUBMIT zreport EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = vlist
listobject = itab_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
Then you can use the ITAB_LIST for caliculation which is having all the values.
Thanks
Sudheer
Similar Messages
-
Reporting and exporting to Excel in SharePoint Online
Hi
I've developed a SharePoint site to replace a legacy Access database that dealt with consumer complaints and queries. In the Access database I'd developed a feature that allowed users to filter the complaints by a number of criteria and export them to Excel
and I'm trying to do the same in SharePoint.
If it were on-premises SharePoint I'd just create a parameterised SSRS report which would solve all my problems. However being SharePoint online, this is not an option. I'd like the users to be able to select complaints from any date range, for any category
of complaint and for any product supplier (plus a few other criteria). The idea is that they want to be able to then send the filtered data to individual suppliers. Doing this out of the box with views throws up several problems. The main one is that any export
to Excel of a view exports the entire set of data, meaning that users themselves would need to create a new view for every export they wished to perform, which is not practical.
My question is: what is the best way in SharePoint online to export a filtered subset of a list to Excel?
I can use SharePoint designer, but not C# in order to achieve the goal. We also have SharePoint Online Plan 2 if that makes it easier.
Thanks in advance,
DuncanHi Duncan,
Well its easy to Reporting and exporting to Excel in SharePoint Online,
See the Youtube link below and other links for more descriptions.
Office 365: Synchronize Excel with SharePoint Online
Reporting and exporting to Excel in SharePoint Online
Thanks
Indul Hassan (www.indulhassan.com) -
Scheduling a webi report and export the result in PDF on local disk
I'm working with the new SDK to schedule a report and export its result on my local c:\ hard disk drive. My code give no errors at run but I do not find the file on my root.
The Instance counter of the report increase each time, so there is a refresh.
Is something wrong in the following lines? I just follow the examples give in the documentation for scheduling.
Thanks in advance !
Here is my code :
Destinations oDestinations = Destinations.Factory.newInstance();
Destination[] oDestination = new Destination[1];
oDestination[0] = Destination.Factory.newInstance();
oDestination[0].setName("CrystalEnterprise.DiskUnmanaged");
DiskUnmanagedScheduleOptions diskOptions = DiskUnmanagedScheduleOptions.Factory.newInstance();
String[] destinationFile = new String[1];
destinationFile[0] = "c:\\" + report_name + ".pdf";
DestinationFiles destinationFiles = DestinationFiles.Factory.newInstance();
destinationFiles.setDestinationFileArray(destinationFile);
diskOptions.setDestinationFiles(destinationFiles);
oDestination[0].setDestinationScheduleOptions(diskOptions);
oDestinations.setDestinationArray(oDestination);
System.out.println("Getting report...");
ResponseHolder respons = this.platform.get("path://InfoObjects/<path to report>/" + report_name, null);
InfoObjects reports = respons.getInfoObjects();
if (reports == null)
return;
Webi myReport = (Webi)reports.getInfoObjectArray()[0];
System.out.println("Getting scheduling info...");
SchedulingInfo schedulingInfo = myReport.getSchedulingInfo();
boolean newSchedulingInfo = false;
if (schedulingInfo == null)
schedulingInfo = SchedulingInfo.Factory.newInstance();
newSchedulingInfo = true;
System.out.println("Setting scheduling info...");
schedulingInfo.setRightNow(Boolean.TRUE);
schedulingInfo.setScheduleType(ScheduleTypeEnum.ONCE);
schedulingInfo.setDestinations(oDestinations);
WebiProcessingInfo webiProcessingInfo = myReport.getWebiProcessingInfo();
if(webiProcessingInfo == null) {
webiProcessingInfo = WebiProcessingInfo.Factory.newInstance();
WebiFormatOptions webiReportFormatOptions = webiProcessingInfo.getWebiFormatOptions();
if(webiReportFormatOptions == null)
webiReportFormatOptions = WebiFormatOptions.Factory.newInstance();
System.out.println("Setting Format...");
webiReportFormatOptions.setFormat(WebiFormatEnum.PDF);
webiProcessingInfo.setWebiFormatOptions(webiReportFormatOptions);
myReport.setWebiProcessingInfo(webiProcessingInfo);
if (newSchedulingInfo)
myReport.setSchedulingInfo(schedulingInfo);
System.out.println("Schedule...");
this.platform.schedule(reports);
System.out.println("Schedule done...");Hi Jerome,
I have gon ethrough your code again and there we are missing the destination plugin.
We have to query the info store to get the disk unmanaged plugin.
Below is the code
IDestinationPlugin destPlugin = null; //Destination plugin returned by InfoStore Query
IDiskUnmanagedOptions diskUnmanagedOptions = null; //Object returned by the getSchedulingOptions() method
List listDestination = null; //List object to hold destination file location
IDestination destination = null; //Destination Interface
//retrieve the Scheduling Options and cast it as IDiskUnmanagedOptions
//This interface is the one which allows us to add the file location
//for the scheduling
for(int i = 0; i< oInfoObjects.getResultSize();i++)
oInfoObject = (IInfoObject) oInfoObjects.get(i);
destPlugin = (IDestinationPlugin)iStore.query( "SELECT * from CI_SYSTEMOBJECTS WHERE SI_PARENTID=29 and SI_NAME='CrystalEnterprise.DiskUnmanaged'").get(0);
diskUnmanagedOptions = (IDiskUnmanagedOptions) destPlugin.getScheduleOptions();
listDestination = diskUnmanagedOptions.getDestinationFiles();
String dest = "c:\\";
listDestination.add (dest + oInfoObject.getTitle()+".pdf");
schedInfo = oInfoObject.getSchedulingInfo();
schedInfo.setRightNow(true);
schedInfo.setType(CeScheduleType.ONCE);
//retrieve the IDestination interface from the SchedulingInfo object
//use the setFromPlugin() to apply the changes we made to the
//IDestinationPlugin object returned from the IStore
destination = schedInfo.getDestination();
destination.setFromPlugin(destPlugin);
iStore.schedule(oInfoObjects);
Regards,
Prithvi -
hi guys, im currently making a program that imports and exports data into a memory so that when the user logs out that would still remain in the memory. The data would be use for the slection screen but i can't seem to make it work. Could you please help me. Or if you have other ideas on how to store data that would also be ok. The thing is when Im running the program through se38 its working fine but if i run it through its transaction code the import does not work. Please help.
here is my code:
DATA: begin of i_memory,
memory_id(31),
end of i_memory.
initialization.
IF p_prem IS INITIAL.
CONCATENATE c_memory_id sy-uname into v_memory_id
SEPARATED BY c_underscore.
IMPORT i_memory FROM MEMORY ID v_memory_id.
IF sy-subrc = 0.
p_prem = i_memory-memory_id.
ELSE.
p_prem = '0.04'.
Endif.
ENDIF.
at selection-screen.
i_memory-memory_id = v_memory_obj.
CONCATENATE c_memory_id sy-uname into v_memory_id
SEPARATED BY c_underscore.
EXPORT i_memory to MEMORY ID v_memory_id.
IF sy-subrc = 0.
Endif.
Please help. Thanks in advance guys.Shekhar Kulkarni
I need help understanding your code.
Im trying to do same thing as you described in the post.
My main purpose is to IMPORT variant contents from cluster table VARI for all the selection screen variables dynamically.
I can IMPORT individual screen variables :: For ex :
st_key-report = 'ZNIDHS20'.
st_key-variant = 'TEST_VAR'.
IMPORT slsin_p TO TMP_VAR FROM DATABASE VARI(VA) ID ST_KEY.
This will get me the contents of slsin_p parameter in variant TEST_VAR of program ZNIDHS20.
But If I use same statement in a loop, im not able to get the data. : see below
LOOP AT i_selection_table..
IMPORT i_selection_table-name TO TMP_VAR FROM DATABASE VARI(VA) ID ST_KEY.
ENDLOOP.
I found your post interesting and started to test this way....As said, I have extracted selection screen variable table, and then tried to EXPORT the contents to Share Memory from database table VARI(VA), unfortunately program fails. Pls see code below....Pls see if you can help me out...
DATA: BEGIN OF st_key,
report LIKE rsvar-report,
variant LIKE rsvar-variant,
END OF st_key.
data : i_selection_table like rsparams occurs 0 WITH HEADER LINE,
v_rsvar like rsvar-report.
st_key-report = 'ZNIDHS20'.
st_key-variant = 'VJ_TEST'.
V_RSVAR = 'ZNIDHS20'.
data : begin of itab occurs 0,
COL1(40) type c,
COL2(40) TYPE C,
end of itab.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = V_RSVAR
TABLES
SELECTION_TABLE = i_selection_table
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3.
LOOP AT I_SELECTION_TABLE.
MOVE I_SELECTION_TABLE-SELNAME TO ITAB-COL1.
APPEND ITAB.
ENDLOOP.
EXPORT (ITAB) TO SHARED MEMORY VARI(VA) ID ST_KEY.
IMPORT ITAB = JTAB FROM SHARED MEMORY VARI(VA) ID ST_KEY.
Pls help..... -
Show Repeated key values in Reports and Export Into Excel
Hi Experts,
Currently I am working on the BW3.5 version. Our client requirement to display the repeated key value in web and export same into excel. I have followed the steps in web template which mentioned below to achieve the requirement.
1) In my web template, add the following line to the Template Properties object tag (the tag at the very top of the web template in HTML mode):<param name="SUPPRESS_REPETITION_TEXTS" value=""/>
After the change web template change, Myself execute the report in web, Its fine web. But I export into excel, again the key values are suppressed. So I have followed the steps in query. Then its fine. I mean, I can export into excel with repeated key values.
2) In my query, in Properties and on the Display tab, unchecked "Hide Repeated Key Values".
But do we have any other option without changing query properties to achieve the requirement.. I am fine with the web template change("SUPPRESS_REPETITION_TEXTS"). But I do not want to change the query properties.
Please help me to fix the issue. Thanks in advance.
Thanks,
RRHi Experts,
I have come across one of the suggestion in the below location. Could you plz help me to implement it.
http://www.sapfans.com/forums/viewtopic.php?f=16&t=118185
Suggestion:
You can do exactly what you want, but it will take either a button changing the properties of the web item or a javascript function added to the context menu getting the properties of the table item and changing it to "X" or "". These are just two examples, there are other ways to do this. This is the actual code that sets the suppression for the repeated texts. Hope this helps.
SAP_BW_URL item=âu20ACu2122TABLE_1âu20ACu2122 SUPPRESS_REPETITION_TEXTS=âu20ACu2122Xâu20ACu2122
Thanks,
RR -
Create Report and Export it ?
Hi,
I just want to know if it's possible to export created Report on the OEM 10.2.0.2.
In fact, I created some new report, and i would to use them on some other server !
Thx.Hi, have you found a solution for this, I am searching for this as well.
Thx. -
Is there any place I can see examples of CF8 reports? Also,
if I create a report in CF8, from what I've read, I can click on a
button to export it to PDF to save/print. Is there an example of
this? Also, is it easy to create a report and the ability to
export?
Thanks,
NateHi Nate,
You can find some examples
here
Navigate to, Getting Started with CFML -> Tags ->
Alphabetical List of Tags -> cfreport -
Best way to expand a report and export it to PDF?
Hi, we have created an Excel worksheet with several Power View reports. Some of the reports contain detailed information, such as a table of risks for a project. The stakeholders are quite happy with the interactive feature of Power View, as they can use
a filter to select a project and view its risks. Also it is very easy to add additional columns in the future (compared to traditional reporting solutions like SSRS that require developers help just to add some columns). However, sometimes the
stakeholders also need a static pdf output, as some stakeholders do not have Excel 2013, and they may work offline (do not have access to the SharePoint version of Power View either).
In this static version, the projects must be expanded, so that the pdf contains information of all projects, not just the currently selected one by the filter. Ideeally, if there're 10 projects, each contains 3 sheets, then each sheet will be repeated
for every project in the pdf, so there will be 30 pages in the output. But Excel's built-in print to pdf feature doesn't seem to support this scenario. In addition, some projects have a lot of risks, and in Power View, a scroll bar is displayed.
When exporting to pdf, the scroll bar is not expanded. Thus the pdf only displays part of the risks which are currently visible on the screen.
Is there a way to overcome those limitations, while keep most benifits of self servicing report? We don't mind to look into third party solutions, if the price is reasonable and the solution works nicely with Power BI. Thanks for any thought.
Shining Oh Blue StarThis is a bad thing to do with JPEGs. You're better off just reducing the 'q' if you want a smaller/faster/lower resolution image. That way you're throwing away resolution intelligently. Using scaling you're throwing resolution away unintelligently. I was on a project where 40,000 images were scaled when they should have been low-q'd. Don't do it.
-
i want to submit trans MB5B and move the data of table
BESTand (is this itab?) to my ITAB in my programHello Rani,
U can use the following sample code to call the report. U can modify the code as per ur req. however thesecond requirement of urs is not possible as the internal table is defeined only till the program executes and as soon as the control returns back to ur program the internal table is lost.
data: begin of selpr occurs 0.
include structure RSPARAMS.
data: end of selpr.
clear selpr.
refresh selpr.
*selpr-selname = 'KD_LIFNR'.
*selpr-kind = 'S'.
*selpr-sign = 'I'.
*selpr-option = 'EQ'.
*selpr-low = '10000151'.
*append selpr.
clear selpr.
selpr-selname = 'MATNR'.
selpr-kind = 'S'.
selpr-sign = 'I'.
selpr-option = 'EQ'.
selpr-low = '000000000000000967'.
append selpr.
clear selpr.
selpr-selname = 'WERKS'.
selpr-kind = 'S'.
selpr-sign = 'I'.
selpr-option = 'EQ'.
selpr-low = 'MZ01'.
submit RM07MLBD with selection-table selpr and return.
U will have to copy this porgram and play, however u need to be careful as it may server the purpose at this point in tie but during upgrade u may face problems. -
Hi All,
I am using the submit statement to call my report. In my report I call another modal dialog box. My issue is I get blocked on the dialog box and the screen gets hanged. I have no option but to kill the session. I want the control to come back to my calling report after I have done my processing on the dialog box.
Kindly help as this is really urgent.
Thanks in advance.
Thanks & Regards,
AnjuHi Anju,
I think, this is happening because you dont any event on the dialog screen which will process the PAI. create back button and in PAI check for back. on back use leave to screen 0.
Process on Output.
module status.
Process on input.
Module check.
module status output.
set pf-status 'PF100'.
in PF100 , set BACK func code for back button
endmodule.
module check input.
case sy-ucomm.
when 'BACK'. leave to screen 0.
endcase.
endmodule.
Reward points if useful.
Regards
Megha -
Hi,
currently i am trying find a suitable workaround for the wellknown "out of memory" Errormessage during report generation.
http://forums.ni.com/t5/NI-TestStand/TestStand-Memory-Limit/td-p/1964027
I am trying to store the report object as a binary file. So the hole report file size will be small a possible.
http://forums.ni.com/t5/NI-TestStand/Saving-ResultList-as-binary-file/m-p/653522/highlight/true#M182...
In a later process the report generation should be done. The maior aim is that report generation is done without any errors.
It is quite bad if you have some nightly or weekend tests and next morning you will see that test running well but report was crashing,
and you have nothing - thats is really frustrating!
Well it seems that also Engine.SerializeObject is also limited.
I wonder this there a way to determine the size of the object? If this is possible i would split the object.
Regards
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
Attachments:
test.seq 11 KBHi Doug,
I have made a some Tests (test_tsr.seq).
Good news: It is working better than my Engine.Serialize stuff, if loop max count is not too large.
Bad news: If loop count is too large Sequence is crashing with exeption during MainSequence-Call. (see sreenshoots).
Previous tests with test.seq and loopmax =50 were running at least to model's report generation.
So the bottom line is that on-the-fly result recording has not the desired behaviour.
Regards
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
Attachments:
test_tsr.seq 6 KB
Screen1.JPG 138 KB
Screen2.JPG 59 KB -
Skip Error message in submit report
Hello Gurus,
I am using SUBMIT <REPORT> command inside a loop of my calling report. For one record the SUBMIT <report> is throwing an eror message due to which my report is getting stopped by displaying the error message.
My requirement is to skip the record if there is any error in SUBMIT <report> and process rest of the records.
Please help me out.Hi,
Vasanth's idea regarding doing a CALL FUNCTION IN BACKGRUOND TASK does work, unless you need to get back some information from the SUBMIT, as export parameters can't be set when using IN BACKGRUOND TASK.
As i need to get data from the SUBMIT, i'll keep looking for other alternatives, so other ideas are still welcome...
Regards,
mr.
Hi Manuel,
Try calling report in background task like below:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = c_name "this name can be any name defined in constants(you do not have to create a job name anywhere in system or SM36)
IMPORTING
jobcount = w_number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
*" Job opened successfully
IF sy-subrc EQ c_0.
*" Call program to process IDoc
SUBMIT ZSubmit WITH <any value> " e.g. p_field1 EQ <value>
VIA JOB c_name NUMBER w_number
AND RETURN.
[Note: In ZSubmit report you can send the data to calling program through ABAP memory i.e. Use EXPORT parameter to export data
Ex: constants: c_memory(7) type c value 'MEMORY1'.
At the end of ZSubmit report, before returning to the calling program write below statement:
EXPORT i_message TO MEMORY ID c_memory1.]
*" Successful processing of IDoc
IF sy-subrc EQ c_0.
"Here you can import data from ZSubmit report
import i_message from memory id c_memory1.
After retrieving the data, free the memory otherwise it will affect the performance of your report:
Free memory id c_memory1.
*" Close the job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_number
jobname = c_name
strtimmed = c_x
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
ENDIF.
ENDIF.
Hope this helps!
Regards,
Saba -
Report output list to internal table using submit report
Hello,
I have a report that generates the output in the form of an abap list. I want this data in an internal table for further processing. the report internally does not do a export data to memory so i cannot use import later on to get the data.
i did the following
SUBMIT <report name> exportING LIST TO MEMORY and return.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = ascitab
listobject = itab_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
This returns the data in the ascitab, but the data contains additional unwanted info like lines and hyphens etc. Also the data is in a table with a single column, so pulling out individuals fields is again an issue. Is there a way to get this data into an internal table directly?
best regards,
Surajhi suraj
export the internal table of report
DATA: BEGIN OF SR_VBAK ,
VBELN LIKE VBAK-VBELN,
END OF SR_VBAK.
DATA: IR_VBAK LIKE STANDARD TABLE OF SR_VBAK WITH HEADER LINE.
EXPORT IR_VBAK TO MEMORY ID 'SALES'.
SUBMIT <program name in which u want internal table records > AND RETURN.
now import that data in submit program .
here u have to creat a internal table with same structure as the internal table from which u r trying to export the data
DATA: BEGIN OF SR_VBAK,
VBELN LIKE VBAK-VBELN,
END OF SR_VBAK.
DATA : IR_VBAK LIKE STANDARD TABLE OF SR_VBAK WITH HEADER LINE.
IMPORT IR_VBAK FROM MEMORY ID 'SALES'.
regards
ANIL CHAUDHaRY -
Submit report with internal table
Hi Experts !
I have a requirement where report is showing output in ALV1. Based user action I need to process further in background mode.
I have developed a report which I am submitting for this background mode.
I am opening a Job sumbitting created report with return. Job close.
This created report is in scheduled status in SM37. I have to go there and release it.
To pass parameters to newly created report I have used WITH field names with developed report name. But I am not getting parameters at new report. Similarly used import/export --- set/get but still not getting parameters at submitted report.
Is it because it is in background mode? If so how can I achieve this functionality. Can anybody suggest me something ?Hi,
IMPORT and EXPORT from memory doesn't work here.
Have a look into the SAP documentation:
When the program is scheduled in the background task, the selections specified by the user or in the additions for filling the selection screen are stored in an internal variant. When the program is executed in the background request, it is processed fully but the selection screen is processed in the background. The system triggers all events, including that for selection screen processing. The variant stored internally is transferred to the selection screen between the INITIALIZATION and AT SELECTION SCREEN OUTPUT events.
The transfer of the parameters should work, if you don't have any statements that clear those parameters. Maybe parameters with SET/GET parameters also will cause a problem. But it should work with this internal variants. Before you start the jov, please have a look in those generated variants, whether the parameters have the right values.
Regards,
Klaus
Edited by: Klaus Babl on Feb 8, 2011 6:58 AM -
Submit Report including internal table
hi ,
My Req is call Report2 from report1 .
EXPORT itab to MEMORY ID 'DEVIC'.
SUBMIT ZREPORT2 AND RETURN.
free memory id 'DEVIC'.
is this correct?
Thankshi ,
My Req is call Report2 from report1 and utilize itab of report1 in report2..
EXPORT itab to MEMORY ID 'DEVIC'.
SUBMIT ZREPORT2 AND RETURN.
free memory id 'DEVIC'.
is this correct?
Thanks
Maybe you are looking for
-
Good day sir, please i just got an iPAD 4 and I have bee having a serious difficulties performing some operations on it of which was told it is possible one of which is to create a microsoft word documents on my iPAD the second is attaching a file t
-
Installing a used copy of photoshop CS4 onto my macbook air?
I just bought a new macbook air and want to install a used copy of adobe photoshop CS4 onto it. I purchased it off of craigslist and it has the install CD. Obviously I cant use this on my air. I do have a desktop mac with an optical drive if that hel
-
How to add do not read file content option inside File Adapter (Synch Read)
Hi, Is there any way, that I can skip reading the file content inside file adapter with operation as Synchronous Read ( I just want to read the file name and directory and if the file name matches with the input variables then I have to delete the fi
-
I did not update in time, now I have problems and I cannot seem to update ical.
I did not update in time, now I have problems and I cannot seem to update ical. Can someone help guide me?
-
Is there any function module to convert date format?
Is there any function module to convert date format from mm/dd/yyyy to dd.mm.yyyy or sy-datum?