SUBMIT Report with return values
Hi,
I am using the SUBMITE REPORT STATEMENT as
SUBMIT RVV50R10C WITH st_ledat-LOW = s_vstel-LOW
WITH st_ledat-HIGH = s_vstel-HIGH
AND RETURN EXPORTING LIST TO MEMORY.
For the report RVV50R10C the o/p is an hierarchical display.
So when i am exporting list to memory. how exactly are the values populated and,
if i want two fields from the o/p of the report t be populated in another internal table, how can i get it.
initially i am calling FM LIST_FROM_MEMORY and getting values in to a itab of type abaplist.
how the values will be populated into this table.
Hi,
Hope this wud help u...
Once the program report has been accessed, the list stored there in the ABAP Memory is read by means of function modules and inserted in the current list.
DATA list_tab TYPE TABLE OF abaplist.
SUBMIT report EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = list_tab.
ENDIF.
Keerthi.
Similar Messages
-
Submit report with dynamic selections
Hi All,
I am trying to Submit a report with dynamic selections. I am using the option SUBMIT REPORT WITH FREE SELECTIONS.
But the dynamic selections are not getting passed.
Request you to kindly provide some inputs
My code is
DATA: trange TYPE rsds_trange,
trange_line LIKE LINE OF trange,
trange_frange_t_line LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.
trange_line-tablename = 'PA0002'.
*trange_frange_t_line-tablename = 'PA0002'.
trange_frange_t_line-fieldname = 'GBJHR'.
trange_frange_t_selopt_t_line-sign = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low = '1987'.
trange_frange_t_selopt_t_line-high = '1987'.
APPEND trange_frange_t_selopt_t_line TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit RPCADVQ0
VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar_tab
WITH FREE SELECTIONS it_texpr
and returN.
Kindly provide your inputs
Regards
ReshmaHi Reshma,
Use the FM - RS_REFRESH_FROM_DYNAMICAL_SEL before FREE_SELECTIONS_RANGE_2_EX.
data: trange type rsds_trange,
g_repid type sy-repid.
g_repid = 'RPCADVQ0'.
call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
exporting
curr_report = g_repid
mode_write_or_move = 'M'
importing
p_trange = trange
exceptions
not_found = 1
wrong_type = 2
others = 3.
if sy-subrc eq 0.
" Do the changes to the trange
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit RPCADVQ0
VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar_tab
WITH FREE SELECTIONS it_texpr
and returN.
endif.
Cheers,
Kothand -
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 -
How to call a dialog program with return value in another dialog program
Dear All,
How can I call a dialog program with return value from another dialog program?
Regards,
Alok.Hi Alok,
You can you SET/GET parameters to do this.
This is some information about this.
To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
To fill one, use:
SET PARAMETER ID pid FIELD f.
This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
To read an SPA/GPA parameter, use:
GET PARAMETER ID pid FIELD f.
This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
Thanks,
SriRatna -
Submit reports (with parameters) from TabStrip.
Hi,
I have this target:
I have two programs (A and B) called by two different transactions.
Now I had to use a single transaction that calls a screen with two TabStrips.
In the first, I must include the parameters of report A and in the second
the parameters of report B.
I can't modify report A and B.
Is it possible ? ..And how I can obtain this goal ?
Does anybody have a good example?
I Thank You in advance. Regards,
Valerio.In the submitted program, the fields on the tabs are uniquely defined, so when using the SUBMIT statement you simply need to address the parameters that you want to pass. Take this example. Here we have two tabs, one parameter on each, we what to execute this program and pass "X" to P_FLD2 on the 2nd tab.
report zrich_0001.
selection-screen begin of screen 101 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_fld1 type c.
selection-screen end of block b1.
selection-screen end of screen 101.
selection-screen begin of screen 102 as subscreen.
selection-screen begin of block b2 with frame title text-002.
parameters: p_fld2 type c.
selection-screen end of block b2.
selection-screen end of screen 102.
selection-screen begin of tabbed block one for 20 lines.
selection-screen tab (15) name1 user-command ucomm1
default screen 101.
selection-screen tab (17) name2 user-command ucomm2
default screen 102.
selection-screen end of block one.
initialization.
name1 = 'Tab 1'.
name2 = 'Tab 2'.
start-of-selection.
write:/ 'Value of P_FLD1 is', p_fld1.
write:/ 'Value of P_FLD2 is', p_fld2.
So when submitting this program just pass the value to the parameter
submit zrich_0001
with p_fld2 = 'X' and return.
Regards,.
Rich Heilman -
Problem with SUBMIT report [ WITH SELECTION-TABLE ] or [ IN range ]
Hello Everybody,
I am trying to call transaction F.80 for mass reversal of FI documents by using SUBMIT sentence and its parameters like this:
LOOP AT i_zfi013 INTO wa_zfi013.
PERFORM llena_params USING 'BR_BELNR' 'S' 'I' 'EQ' wa_zfi013-num_doc ''.
range_line-sign = 'I'.
range_line-option = 'EQ'.
range_line-low = wa_zfi013-num_doc.
APPEND range_line TO range_tab.
endloop.
Line: -
SUBMIT sapf080
WITH br_bukrs-low = p_bukrs
WITH SELECTION-TABLE it_params [ same problem with - WITH BR_BELNR IN range_tab]
WITH br_gjahr-low = p_an1
WITH stogrd = '05'
WITH testlauf = ''
AND RETURN.
My problem is that when the report is executed the BR_BELNR only delete one document of the all the inputs in the selection criteria from the loop. if I add the statement [ VIA SELECTION-SCREEN] in the SUBMIT if open the multiple selection criteria in the screen I can check that all the documents are set in it from the ABAP code in the loop from it I just need to push F8 to copy them and run the program processing all the documents normally .
Can some one help me with this? is there a way to execute the transaction BY the SUBMIT with the multiple selection criteria for the Document Number working well?
Thank for you time and help.This is my code:
TYPES: BEGIN OF T_ZFI013,
BUKRS TYPE BUKRS,
GJAHR TYPE GJAHR,
MONAT TYPE MONAT,
ANLN1 TYPE ANLN1,
ANLN2 TYPE ANLN2,
NUM_DOC TYPE BELNR_D,
DATE TYPE DATUM,
TIME TYPE UZEIT,
USER TYPE SYUNAME,
END OF T_ZFI013.
DATA: I_ZFI013 TYPE STANDARD TABLE OF T_ZFI013,
WA_ZFI013 TYPE T_ZFI013,
DATA: br_belnr TYPE BELNR_D,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF br_belnr,
range_line LIKE LINE OF range_tab."range_tab.
LOOP AT i_zfi013 INTO wa_zfi013.
range_line-sign = 'I'.
range_line-option = 'EQ'.
range_line-low = wa_zfi013-num_doc.
APPEND range_line TO range_tab.
ENDLOOP.
SUBMIT sapf080
WITH br_bukrs-low = p_bukrs
WITH br_belnr IN range_tab
WITH br_gjahr-low = p_an1
WITH stogrd = '05'
WITH testlauf = ''.
This is the RANGE_TAB table before submit:
1 I EQ 1001xxxxxx
2 I EQ 1002xxxxxx
3 I EQ 1003xxxxxx
4 I EQ 1004xxxxxx
5 I EQ 1005xxxxxx
6 I EQ 1006xxxxxx
7 I EQ 1007xxxxxx
8 I EQ 1008xxxxxx
I think this wont work for some reason so I will start to do this by a BDC.
Many thanks for your help. -
Tabular report with return popups
Hi,
i have a tabular report in which, for each cell the user must enter a code. i want a popup to appear when the user clicks in the cell with a list of codes to chose from, and then i want the selected code to populate the cell. i dont care if the popup closes automatically, but that would be nice.
i saw this site:
http://spendolini.blogspot.com/2009/04/returning-value-from-popup-page.html
but i don't know how to reference individual cells in a tabular report.
this code works to create a popup using another page : onclick="popUp2('f?p=' + $v('pFlowId') + ':5:' + $v('pInstance'),250,600);" but i dont know how to return the values to a cell.
thanks
kesterHi,
781759 wrote:
but i don't know how to reference individual cells in a tabular report.Individual items in a tabular form have IDs like fcc_rrrr where cc is the field number and rrrr is the row number. For example:
<input type="text" name="f06" size="16" maxlength="2000" value="2" id="f06_0002" autocomplete="off">
For this example, just 'f06_0002' as 'that' in the $v_PopupReturn function.
Luis -
Problem with return value of stored function
Hi,
I've made a stored function that insert a new row in a table and return the primary key (see at the end of the message the function script).
In VS 2005 with Visual basic, using the designer, I've created a dataset containing a tableAdapter to be able to use the Pl/SQL function.
My problem is I can't get the proper return value. The VB code below works without error except that I get 0 as value.
What's wrong?
Cheers,
Sebastien
VB code
Dim myAddSession As New ICISDataSetTableAdapters.AddSessionTableAdapter
Dim intSessionId As Integer
intSessionId = myAddSession.ADD_SESSION(tbxUsername.Text, _
tempFolder.Substring(tempFolder.LastIndexOf("\") + 1), _
"toto", Environment.GetEnvironmentVariable("COMPUTERNAME"), _
myLevelAccess.icisUserId, myLevelAccess.levelId)
The debugger tells me that the ADD_SESSION function return value is Object.
add_session PL/SQL script:
CREATE OR REPLACE FUNCTION ICISSEC.add_session (
orausername IN icis_session.ora_user_name%TYPE,
ctxsessionid IN icis_session.ctx_session_id%TYPE,
ctxsessionname IN icis_session.ctx_session_name%TYPE,
ctxservername IN icis_session.ctx_server_name%TYPE,
icisuserid IN icis_session.icis_user_id%TYPE,
startlevelid IN icis_session.start_lvl_id%TYPE
RETURN icis_session.ICIS_SESSION_ID%TYPE
IS
tmpvar icis_session.ICIS_SESSION_ID%TYPE;
BEGIN
INSERT INTO icis_session
(ora_user_name, ctx_session_id, ctx_server_name,
icis_user_id, start_lvl_id, ctx_session_name
VALUES (orausername, ctxsessionid, ctxservername,
icisuserid, startlevelid, ctxsessionname
RETURNING icis_session_id
INTO tmpvar;
COMMIT;
RETURN tmpvar;
EXCEPTION
WHEN OTHERS
THEN
RAISE;
END add_session;naama wrote:
that if a value is null to convert it to 0 ? . i mean in the part of the declaration of parameter
Nope, can't do that in the signature. You'll need to handle that by validating the passed parameters at the start of the function.
It's simple enough. In your case you might just as well test for NULL and fail the function like this:
FUNCTION date_post_message(
user_lock_in IN NUMBER,
form_type_in IN NUMBER DEFAULT 0 ,
date_in IN DATE)
RETURN BOOLEAN
IS
v_num NUMBER(1);
BEGIN
dbms_output.put_line('Value of parameters : user_lock_in : '||user_lock_in || ' : form_type_in : '||form_type_in||' : date_in : '||date_in );
IF user_lock_in = 1 THEN
RETURN FALSE;
END IF;
IF form_type_in IS NULL THEN
RETURN FALSE;
ELSIF form_type_in NOT IN (1,2) THEN
RETURN FALSE;
END IF;
RETURN TRUE;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN FALSE;
END;In other use cases I would declare a local variable and process it like this:
IF form_type_in IS NULL THEN
l_form_type := 0;
ELSE
l_form_type := form_type_in;
END IF;Obviously the code should use the local variable rather than the parameter.
Validating the values passed in parameters at the start of a function is good practice. If you really want to go to town, read about Design By Contract.
Cheers, APC
Edited by: APC on Nov 9, 2011 1:36 PM
Added example, as requested by OP -
CN41 report with out values for project dates
Hi Experts
The following field values are captured in Table PROJ.
a. Finish Date PROJ-PLSEZ
b. Forecast Start PROJ-SPROG
c. Forecast Finish PROJ-EPROG
But the report CN41/CN41N does not show values for these fields.
Can anybody give clue to get this report with values for the above fields.
Warm regards
ramSivaHI,
if you want the top - of - page to be displayed
even when we scroll down
then use this
try to give heading as text elements by giving some spaces
TOP-OF-PAGE.
PERFORM display_header. RESERVE 10 LINES.
form
SET LEFT SCROLL-BOUNDARY COLUMN 84.
FORMAT COLOR COL_BACKGROUND INTENSIFIED ON.
WRITE:/01(252) text-h01 CENTERED.
WRITE:/01(252) text-h06 CENTERED.
SKIP.
endform
as it is working fine in my report
reward points if helpful,
regards,
venkatesh -
Conditional Scheduling of report with Prompt values
Hi All,
My requirement is that I select some values in the dashboard prompt and get the report. Is there any methodlogy to schedule that report with having data in report according to
set prompt values on the fly that is dynamically.
We can a link below the report to schedule it but how can we pass the condition parameters? Please help.Hi Kishore,
Thanks very much for the reply. It answers one part of the question.
I am thinking to put a text property or button below the report and is it possible to attach the report values with current prompt selection and the request is attached to the in delivery content section which means user need not pick up the delivery content only he has to schedule current report only by clicking the link or button? Can I have script for that.
To make it simple If I am the user I would like to see following:
1. I go to dashboard page and select the prompt and get the report result.
2. I have link or button below to schedule.
3. I press the button I go to delivers section.
4. I have current report attached to the delivery content with default selection or current selection.
5. I modify other parameters and schedule.
Please help me. -
ADF Code Corner 069 : problem with returned value
Hello,
I use jdeveloper 11.1.2.2.0 and am trying to follow the sample 69 from ADF Code Croner : how-to create a custom LOV using bounded task flows. http://www.oracle.com/technetwork/developer-tools/adf/learnmore/69-custom-lov-with-btf-276178.pdf
I have a problem with the returned value. The correct value is returned in the inputText but it seems that it is just at UI level and that binding layer is not impacted. If user click on next button, all others rows show the same value in the inputText (the value chosen before in the lov), and not the correct value which must be value from db.
How can I solve this problem?
note : opening the 69-sample, jdeveloper ask me to migrate some files (jpr/jws) from previous version of jdeveloper.
Edited by: h0s on 8 oct. 2012 06:14Yes It happens with the downloaded sample. You can do this test :
Launch EmployeesForm activity -> Open the LOV and select a department -> click next and see that the department id is the same for all rows.
jdeveloper 11.1.2.2.0 -
How can I show report with multi value
Dear Maters,
I am creating a report using BUILD A REPORT USING A DYNAMIC TEMPLATE,
Although, I choose all product but my report only show value of revenue one product and not summary by quater, only by month.
Detail below:
I want to report :
ACTUAL, Periodic 2009.Q1 2009.Q2 2009.Q3 2009.Q4 2009.TOTAL
Revenue 7,300 232,000 20,000 140,000 465,000
Adjusted Revenue
Total Revenue 7,300 232,000 20,000 140,000 465,000
but I only can see :
ACTUAL, Periodic 2009.Q1 2009.Q2 2009.Q3 2009.Q4
Revenue
Adjusted Revenue
How can I customize for this,
I try using EVGST on member set but I don't know exactly what parameter on it
Please help me?
Thanks you so much and waiting advice from you
Best Regards
Chinh PhamHi,
Please refer to the EVGTS function in the below link from help.sap:
http://help.sap.com/saphelp_bpc75_nw/helpdata/en/ef/824d0b838a4c73bd460ec9d689607f/content.htm
You need to, basically, mention the data region from where you want to fetch the data. Depending on the template of your report, the account member comes from the row, and the time member comes from the column. So, for these 2 dimensions, you need to refer to the cells, which holds the ID of the members. For the rest of the dimensions, you should fetch the members from the page region, preferably.
Hope this helps. -
Combination of Submit report with SELECTION-SET and WITH is not working
I tried all possibilities to make the additional parameter also pass to the report along with variant but it just does not work. Anybody faced this issue before?
Code snipped which is not taking pernr parameter along with variant 'Report Dis'.
SUBMIT H99CWTR0 USING SELECTION-SET 'REPORT DIS'
WITH pernr = pernr-low
EXPORTING LIST TO MEMORY
AND RETURN.Hi,
THis sample code worked for me
data:params type rsparams.
data:it type table of rsparams.
params-low = '2003'. "In variant ZSURESHPAGA the actual value is 2004, but it got executed for 2003.
params-kind = 'P'.
params-option = 'EQ'.
params-sign = 'I'.
params-selname = 'P_YEAR'.
append params to it.
CALL FUNCTION 'SUBMIT_REPORT'
EXPORTING
report = 'Z12256_TASK1'
VARIANT = 'ZSURESHPAGA'
SKIP_SELSCREEN = 'X'
TABLES
SELECTION_TABLE = it
EXCEPTIONS
JUST_VIA_VARIANT = 1
NO_SUBMIT_AUTH = 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.
SUBMIT H99CWTR0 USING SELECTION-SET 'REPORT DIS'
WITH pernr = pernr-low "<----check this statemnent
EXPORTING LIST TO MEMORY
AND RETURN.
Edited by: Keshav.T on May 13, 2010 4:07 PM -
Creating a report with YTD values
Hello experts ,
I have a requirement wherein I have to modify a few Cash Spend reports in monthly movements format to Year to Date (YTD) format.I am a bit confused with the terms Monthly movements and Year to Date , can anyone who has some knowledge in this area explain to me about that.Also is there any SAP exit available for YTD format.Thanks a lot for your time and guidance.Arvind,
Monthly movements is simply comparing the values of past few months with the current month. Whereas, YTD is getting the values from year starting to the current month. THere are some predefined variables for YTD. Again you can create a variable for YTD using an user exit if the SAP delivered variables do not satisfy the requirement.
Hope this helps you..... -
Database Adapter insert operation with return value
Hi All,
I have a table with auto generate parimary key in DB2 database. I need to have an insert operation ont this table which should return current value of primary key after insert.
For this , I have created an insert operation in DB Adapter. But this insert operation in oneway operation.
Is there any way I can create an Insert operation in DB2 adapter which returns the primary key value?
Thanks
--SreeHi Sree,
With insert operation it is not possible. You may use stored procedure/function to perform insert and return the required value, and call this SP/function using DB Adapter.
Regards,
Anuj
Maybe you are looking for
-
Mail Application Crashes Everytime Open A Message
I looked at the previously posted questions but did not find anything specific my problem. My mail application crashes every time I try to open an email. It only happens when I attempt to open the email. If the preview pane is open, the application c
-
How do I make my Cannon Printer MP250work with my new iMac?
Just bought the iMac, and I need to use my old Cannon printer. Plugged it in and the printer is not responding. Is this a device driver issue, software,etc.?
-
How to get currect index of the cell on which user actually clicked.
Hi All, In my widget I have displayed data in tabular format Now I am trying to send the value of the cell on which user has actually clicked. I am not using any standard table control. using standard text() elemnt I am displaying my data in tabular
-
Listening to Ipod library on other computer
Is it possible to connect my ipod to another computer and listen to my library through it's itunes? without changing my library? Thanks
-
IS FUNCTION TO_BLOB( ) IS SUPPORTED IN ORACLE 8i
HELP me!!!! Thanks, Antonio