Report Submit
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 ?
create a variant at runtime for the background report
with fm RS_CHANGE_CREATED_VARIANT
(befor you must create a sample variant)
hope that helps
Andreas
Similar Messages
-
Hi, I'm a developer. How do I know when apple has received my bug report submissions. Will they notify me? Can they contact me regarding the submission?
Will they notify me?
Not normally.
Can they contact me regarding the submission?
On rare occasions, Apple will ask for more details if they have reason to believe a bug exists and they are interested in correcting it. -
Refresh SQL Report (Submit Page Item)
I want to add a search field in a SQL Report. I have something like this
SELECT * FROM emp
WHERE emp_no LIKE :P1_SEARCH || '%'I want to do the search asynchronous, on keypress. The problem is that a SQL Report doesn't have a "Submit Items:" atribute like a interactive report.
So after i refresh the report:
$a_report($x('P1_REPORT_ID').value,'1','10','100');The report is refreshing (the circle icon on top of the screen) but nothing changes cause the :P1_SEARCH doesn't submits.
How could i submit a page item from JS ?
King Regards,
Cearnau Dan
PS: I'm using APEX 4 and using dynamic actions it's the same like the Javascript call.(still doesn't submits the :P1_SEARCH item)Hi Dan,
I would suggest not to use the undocumented
$a_report($x('P1_REPORT_ID').value,'1','10','100');It's very likely that it will be changed in APEX 4.1
Dan.Cearnau wrote:
PS: I'm using APEX 4 and using dynamic actions it's the same like the Javascript call.(still doesn't submits the :P1_SEARCH item)That's true, but have a look at Anthony's blog posting http://anthonyrayner.blogspot.com/2010/07/report-filtering-with-apex-40-dynamic.html which explains a workaround to pass the new values for a classic report as well.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Report submit in workflow BO method
Dear Experts,
I have developed a workflow; in the method of this workflow i want to submit a report e.g; tcode AFAB (Asset depreciation) to fill the parameters of the report using a bdc recording (As there is no param_id in AFAB fields). There is no problem in bdc recording. It is working quite fine for me. My workflow work fine, it fill the parameters of report as expected but after that it don't show me the result of report when i click on execute button; on the basis of parameters; and control comes out in SAP initial screen and nothing else.
code:
method abc container xyz.
submit report and return
with param1 = param1
with param2 = param2.
call transaction AFAB mode 'E'.
will you please let me know; what may be the reason.
Regards,
SohailHello,
Avoid BDCs at all costs. Nothing but trouble. Look at the underlying code if necessary.
regards
Rick Bakker -
Open BI Publisher Report After Submit
I have a page with 2 date fields, which are parameters for a report.
I also have a button called RUN_REPORT.
What I need to do is that the user puts the parameters in, then clicks RUN_REPORT. The page should submit (putting parameters into session state) and then a BI Publisher report should appear in a pop up page.
At the moment using the code below, the user inputs parameters and clicks RUN-REPORT (SUBMIT). Unfortunatley the BI report tries to open before the submit is finished. So there are no items in session state for the report to use as parameters.
Page HTML Header
<script type="text/javascript">
function renew()
doSubmit('SUBMIT')
popupURL('This contains my string to open the report')
</script>On my button
javascript:renew();Help appreciated
GusI've solved this in two ways:
First solution:
- The last parameter the user has to pick is in a selectlist which submits the page
- The button redirects to url:
javascript:popUpNamed('URL','');Seccond solution (and user-friendlier solution ;) ):
1 - Hidden item (say P_RAP), default it's empty
2 - The buttons Action is 'Submit page'
3 - A conditional Branche to the own page, which only runs when the report button is pressed.
3a -- This branche sets the hidden Item (P_RAP) with the report name (in my case, becouse I can start multiple reports on the page and I use it in my URL to the report, it can also be just a 1 or something, just that it is filled)
4 - A Page Process which runs On Load - After Header, and is conditional: Value of Item P_RAP is NOT NULL.
4a -- The code of this process is:
BEGIN
htp.p('<script type="text/javascript">');
htp.p('w = open("URL_to_the_report","_blank","Scrollbars=0,location=0,resizable=1,menubar=0,toolbar=0,left=50,top=100,width=500,height=500");');
htp.p('</script>');
:P_RAP:=''; /*clear the P_RAP item after starting the report*/
END;Hope this helps -
Submit in report in Background job.
Hi, In a report trasaction MCBE is submitted. When this report is executed in back ground there is no spool list generated but in job log a selection version ID is shown. As a result submit ....exporting list to memory is failing.
Is there any way to export the data during background execution of the report to ABAp memory??
Thanks, Kapil,Hi,
use submit to spool
Refer to the code below
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = v_jobname
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Submit Report
SUBMIT rkaep000 TO SAP-SPOOL
VIA
JOB v_jobname " JOBNAME
NUMBER v_jobcount " UNIQUE ID OF JOB
IMMEDIATELY ' '
WITHOUT SPOOL DYNPRO "SKIP PRINT DIALOG SCREEN
USING SELECTION-SCREEN 0100
WITH p_tcode = 'KSB1'
WITH kostl IN s_kostl
WITH kstgr = p_ksgru
WITH kstar IN s_kstar
WITH koagr = p_kagru
WITH r_budat IN s_budat
WITH p_disvar = v_layout
AND RETURN.
COMMIT WORK.
CLOSE THE JOB
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
jobcount = v_jobcount
jobname = v_jobname
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
strtimmed = 'X'
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9
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
Pankaj -
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,
ShitalHi,
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 -
How to submit the report in Background job.
Hello Friends,
In the selection screen I have 2 radio buttons one for background Process & other for foreground processing. if the user selects the background processing the program should execute in background and output need to be sent to SAP Inbox.
Issues:
1) If I am using the JOB_Submit FM or Report Submit the program is going to infinite loop and many continiously jobs are are being scheduled. How to avoid.
2) Is there any best possible way to send the mail to SAP Inbox.
Note: I am using OOALV in my program....
Thanks,
RaviHi,
the first problem looks like you have an infinite recursion. You just need to avoid background scheduling again. There is a system field sy-batch. So if this field is equal to 'X' then you are already in background mode and you don't need to schedule your background job again. Another way is to split your program in two programs. The first will be responsible for scheduling or executing the second one.
You can use FM SO_NEW_DOCUMENT_SEND_API1 to send message to workflow inbox. You need to user receiver type B. There are so many posts on this forum about sending emails from ABAP which may help you with implementing this requirement.
Cheers -
Problem in Submit Statement of Alv Report
Hi All Experts,
i make one report,my requirement is when i execute my report then it displays 100 records, i select 20 records from 100 records
then based upon 20 records execute the another report with out slection screen. i know the process through the submit statement,but it doesn't give exact output 20 of 20 based upon selected entries.
my Code is:SUBMIT ZPS_PROJ_CN41N USING SELECTION-SCREEN '1000' WITH SELECTION-TABLE RSPAR_TAB
AND RETURN.
give suggistions and correct syntax of submit statement.
Thanks.Hi,
= 'EQ ' for parameters
In for range or selct-options
SUBMIT <Report name>
WITH r_budat IN s_budat " Selection screen parameters
WITH kostl IN s_kostl
WITH kstar IN s_kstar
AND RETURN.
"With Variant
SUBMIT <Report Name>
USING SELECTION-SET 'BPC TEST' "BPC set is Varaint name for report
EXPORTING LIST TO MEMORY AND RETURN.
"capturing the output to another report
SUBMIT <Report name>
WITH r_budat IN s_budat " Selection screen parameters
WITH kostl IN s_kostl
WITH kstar IN s_kstar
EXPORTING LIST TO MEMORY AND RETURN.
Prabhudas -
How to submit a report ,Passing the internal tables from parent report
How to submit a report ,Passing the internal tables from the parent report ?
The SUBMIT statement executes a report from within a report. i.e. you could have a drill-down which
calls another report. Can only execute reports of type '1'.
*Code used to execute a report
SUBMIT Zreport.
*Code used to populate 'select-options' & execute report
DATA: seltab type table of rsparams,
seltab_wa like line of seltab.
seltab_wa-selname = 'PNPPERNR'.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
load each personnel number accessed from the structure into
parameters to be used in the report
loop at pnppernr.
seltab_wa-low = pnppernr-low.
append seltab_wa to seltab.
endloop.
SUBMIT zreport with selection-table seltab
via selection-screen.
*Code used to populate 'parameters' & execute report
SUBMIT zreport with p_param1 = 'value'
with p_param2 = 'value'.
Other additions for SUBMIT
*Submit report and return to current program afterwards
SUBMIT zreport AND RETURN.
*Submit report via its own selection screen
SUBMIT zreport VIA SELECTION-SCREEN.
*Submit report using selection screen variant
SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
*Submit report but export resultant list to memory, rather than
*it being displayed on screen
SUBMIT zreport EXPORTING LIST TO MEMORY.
Once report has finished and control has returned to calling
program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
DISPLAY_LIST to retrieve and display report.
*Example Code (Retrieving list from memory)
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.
IF sy-subrc NE '0'.
WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
ENDIF.
Submit report as job
*Submit report as job(i.e. in background)
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
Insert process into job
SUBMIT zreport and return
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif. -
11.1.2- Need to find out what reports are being executed by a user
Hi,
We have financial reports executed from workspace.In essbase session , only the user id is displayed and the Request type- mdxreport is displayed. We also tried searching the log for Financial report didnt find anything relevant.
Is there a way to find out what reports are being executed by the user.
Thanks in advance.
Regards,
SaumyaSTAT will give you the information for a limited period of time and is limited to the server which you are logged onto yourself. Beyond 24 hours it is of even less use even if you change the selection screen values.
If you want it for a period way back into the past, then you need to use ST03N.
There are at least 2 dependencies and 1 confusion:
1 dependency) The length of period is determined by the size (length) of the file. You can change this in ST03N (default 50MB) via the menu settings.
2 dependency) The stat collector jobs need to be scheduled to write the information to ST03N (once per hour is a legal requirement in some non-banana republic countries).
1 confusion) There is an obscure function which converts a report submit to a transaction name (there is not much difference anyway) and an even more obsure one which filters what ST03N will record and therefore whether you can read it. You can (un)filter these things away if you search the SAP Marketplace for the term "MONI".
What is of particular value from this control is that you can even detect a submission of an abap which only existed temporarily.
Also note that having this information is potentially very powerfull with respect to the users (some of them are human too), so you should expose and use it responsibly.
You should also ensure that only responsible users / auditors have access to S_TOOLS_EX. -
Executing SUBMIT statement in background
Hello Experts,
Is it possibe in executing SUBMIT statement in backgound? If yes can anyone provide example code?
Also in terms of performance tuning how does SUBMIT fares against CALL TRANSACTION? Which is much better in terms of performance.
Appreciate your answers. Thanks!Hi
There's no difference for the performance:
if a transaction is assigned to a report (so no dialog program, module pool), it's better to use the SUBMIT if it needs to transfer the value on SELECTION-SCREEN. It can't do it by CALL TRANSACTION.
DATA: VA_JOBNAME LIKE TBTCO-JOBNAME,
VN_JOBCOUNT LIKE TBTCO-JOBCOUNT.
* Open job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = VA_JOBNAME
IMPORTING
JOBCOUNT = VN_JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
CASE SY-SUBRC.
WHEN 0.
WHEN OTHERS.
MESSAGE E208(00) WITH 'Error.
ENDCASE.
* Call report
SUBMIT <REPORT> USER SY-UNAME
VIA JOB VA_JOBNAME NUMBER VN_JOBCOUNT
WITH ..................................
AND RETURN.
* Close job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = VN_JOBCOUNT
JOBNAME = VA_JOBNAME
STRTIMMED = 'X' " start immediatly
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.
Max -
Output of an Report to an WebBrowser
Hi Folks,
I got an important requirement .
The requirement is that for example when I ran an sales report I should get the report output in any webbrowser.
The webbrowser should ask for some username and password so when someone enter the correct username and password it should give my SAP report output.
And one more thing is if I use webbrowser how can i generate a link for this report output.
Help me out,,,, its a bit urgent.
Thanks & Regards,
Sudheer.User id and Password And link
Then you have to Go For BSP, or WebDynpro or ITS.
If you dont want user id and password then
you can work with report submit with exporting list to memory. and you will get the list from memory and convert that listobject to HTML
For getting the list output from memory use the function
'LIST_FROM_MEMORY'
For converting to HTML use the function
'WWW_HTML_FROM_LISTOBJECT'
Now you have HTML objects, you have to use the class CL_GUI_HTML_VIEWER and class methods to display the html output , it generates URL, but that is not like normal urls,
But password userid options not possible. -
Call program screen in ABAP Report
I have a execute program which match to a transaction, in the program, which will generate a selection screen and do selection. After that, the program will call another program screen to do somethings, i want to know can i call program's screen in my execute report, thanks
Hi
To Call the Transaction :
CALL TRANSACTION '<TCODE>' AND SKIP FIRST SCREEN.
To call a Report :
SUBMIT <REPORT> USING SELECTION-SCREEN <NO>.
<b>Reward if Helpful</b> -
Force Background processing with SUBMIT and keeping results in memory
Hi Everyone
I have a very tricky issue that i need some help with.
I have a developed an RFC that allows a NON-SAP front-end to execute reports in the SAP backend the result of the report is saved in memory and formatted to XML and passed to the front-end where the report is displayed.
Therefore for this to work i have added the following code
g_guid = cl_salv_export_db_storage=>create_guid( ).
" Set ALV memory parameters
export l_mode = 'M' to memory id 'ALV_EXTRACT_MODE'.
export l_guid = g_guid to memory id 'ALV_EXTRACT_GUID'.
"Execute the selected report
SUBMIT (wlv_report_name)
USING SELECTION-SET wlv_variant_name
WITH PNPTIMED EQ ' '
WITH PNPBEGDA EQ im_begda
WITH PNPENDDA EQ im_endda
WITH PNPPERNR IN wlr_employee
AND RETURN.
data: l_xstring type xstring.
l_xstring = cl_salv_export_db_storage=>import_xmlstring(
guid = g_guid ).
This allows me to get the report results to be passed to the front-end.
This works quite good for most reports but in some cases the reports has a popup message. In this case the execution fails as the report is not executed as a background job (if the report is executed in the background then the popups are ignored).
The issue is that the reports cannot be executed in the background as the memory will then not contain the report results and secondly the client does not want to use the spool for the report results at all. The second constraint is that the client does not want to alter the reports in any form to remove the popups due to the large volumes of reports.
What i have noted is that if the report is executed and i set the SY-BATCH parameter to "X" then it works perfectly (via the debugger). I can change the SY-BATCH value in my code but obviously once the SUBMIT is executed the SY parameters are reset.
My question is: Is there a way to force the SY parameter values when i perform a SUBMIT? Or is there any other possible solution to this issue?If you want to go with the option of spool, then you can use the following addition
SUBMIT <reportname> to SAP-SPOOL
SPOOL PARAMETERS <print_parameters>
WITHOUT SPOOL DYNPRO and RETURN.
and then read the spool,
if you want to go with the option of a background job, then you can use the following addition
SUBMIT <reportname> VIA JOB <name> NUMBER <num> AND RETURN.
<name> and <num> are generated using FM JOB_OPEN, and then you have to close it using JOB_CLOSE.
Thanks.
Maybe you are looking for
-
Using two apple IDs on one Itunes account
I recently purchases a ipad for my 86 year old mother. I want to also add music to it that I have cd's for. She now has an Apple ID of her own and I have my own Apple ID. The problem is this, when I log out of my itunes account and log in as her, I c
-
My iPod touch 4g has stopped connecting to the wifi yet all my other devices are fine?
My iPod 4g hasn't been connecting to the wifi here since last night. It gets up to the point where the little wifi sign next to the server name becomes blue but then the tick never comes up next to the name to verify the connection. I have tried rest
-
Strange characters in downloaded file names
Everytime I download a file that has a space or some kind of accent in it's name, I get some bizarre characters. For instance I get a %20% instead of every space in the file name... I guess it's an encoding problem but I haven't been able to find wha
-
Dreamweaver CS6 / CC crashes after Mac OSX 10.9.3 update.
Updated today to Dreamweaver CC, and the issue persists. My 'local' files are stored on a Windows Vista server on the LAN. Everything worked OK until 2 days ago, so I'm almost sure the issue is related to the OS update. I can open a file, work on it
-
How to load IDVD (only) from ILife'11
I am waiting on delivery of ILife '11 package. How do I install (only) IDVD from this package? I have IOS Mountain Lion and it came with IMovie,Iphoto and Gagageband. I believe they are included in ILife'11 along with some other apps. My need is