Submit statment
hi guys,
I am calling a report program from another report program using
SUBMIT statment
the calling program(1st program) returns 3 statment like
1st table updated
2nd table updated
3rd table updated
the three statements which returns from the 1st program is simply a write statement in the 1st program
when i am using the submit statment like this in the 2nr program
submit '1stprogram' with sel_screen in int_table and return.
it return correctly(3 statements) and stops after the satament.
i also need to do some process aftet the statment and then only i need to print the (3)statement in the 2nd program
i want that 3 statment to be printed in the 2ndprogram..
How can i do this using submit statement?
Regards
senthil
hi,
try this addition of Submit statement
... EXPORTING LIST TO MEMORY
Effect
This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.
The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.
The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.
The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.
Similar Messages
-
Calling a Report Program In Web Dynpro Using Submit statment
Hi all,
Can any one suggest how can i call a report program form Web Dynpro using Submit statment. I tried to call it its showing Field symbols not defined error. Is their any other ways to call Report in a Web Dynpro?. I have posted the error message when i tried using SUBMIT ZRR AND RETURN CONTROL
Field symbol has not yet been assigned.
The error occurred on the application server mnghcmsap_HRS_00 and in the work process 1 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Form: CHECKBOX_OUT of program SAPLKKBL
Form: GEN_LINE_OUT of program SAPLKKBL
Form: DATA_OUT_SIMPLE of program SAPLKKBL
Form: LIST_OUTPUT_NEW of program SAPLKKBL
Form: FIRST_LIST_DISPLAY of program SAPLKKBL
Module: LIST_DISPLAY of program SAPLKKBL
Function: K_KKB_LIST_DISPLAY of program SAPLKKBL
Method: PRINT_BACKEND of program CL_GUI_ALV_GRID===============CP
Method: SET_TABLE_FOR_FIRST_DISPLAY of program CL_GUI_ALV_GRID===============CP
Form: PBO of program SAPLSLVC_FULLSCREEN
Edited by: VINMANO on Jul 22, 2009 2:54 PMHI,
Its possible to call report program from Web dunpro...
chk out dis link,
calling report(se38) in webdynpro abap
By the way are using field symbol anywhere and left it unassigned?
Thanks,
Divya.S -
Submit Statment inside Loop - Problem in display O/P
Hi All,
Iam Using Submit statment inside the Loop with Return , when the first line in the loop completes the O/P gets display and the Second line is not processed and get in O/P.Can any one let me know why this problem occurs?...
Regards,
Veerawhen You submit for a report it starts a parallel process and it is O/P then if you are doign it in loop it may be over writing the existing O/P that may be the reason you are not seeing the out put properly as it is written across different internalk sessions
-
Hi,
In my pgm if i use like this
SUBMIT pgm
TO SAP-SPOOL IMMEDIATELY ''
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN .
the submit stmt is working fine but i use the Fm job_submit like mentioned below its not working fine.Its throwing the sy-subrc as 3.My requirment is to it shouldnt return any value so have to make use of the FM only.What is the reason for the error and how to get rid
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = number
jobname = name
LANGUAGE = SY-LANGU
report = pgm
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
tAt first you mast open the job by calling the function 'JOB_OPEN' like below
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
JOBNAME = name
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
JOBCOUNT = number
CHANGING
RET =
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 pgm
TO SAP-SPOOL IMMEDIATELY ''
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN .
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = number
jobname = name
LANGUAGE = SY-LANGU
report = pgm
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
t -
Passing multiple values to select-option low by submit at one go from zpro.
Hi all,
I have a requirement pass descrete multiple values form my z-program to to select-option low on selction screen of standard SAP program using SUBMIT statment at one go.At the same time select-option high will be empty.I will be thankful if anybody can help me in this regard.
Sandeep.Hi Check this link...on submitting programs
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db9d7535c111d1829f0000e829fbfe/frameset.htm
here is the code . we are calling the same program....you can call any other program as well.
REPORT demo_program_submit_rep1.
DATA number TYPE i.
PARAMETERS paramet(14) TYPE c.
SELECT-OPTIONS selecto FOR number.
The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
DATA: int TYPE i,
rspar TYPE TABLE OF rsparams,
wa_rspar LIKE LINE OF rspar.
RANGES seltab FOR int.
WRITE: 'Select a Selection!',
SKIP.
FORMAT HOTSPOT COLOR 5 INVERSE ON.
WRITE: 'Selection 1',
/ 'Selection 2'.
AT LINE-SELECTION.
CASE sy-lilli.
WHEN 4.
seltab-sign = 'I'. seltab-option = 'BT'.
seltab-low = 1. seltab-high = 5.
APPEND seltab.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.
WHEN 5.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
wa_rspar-low = 14. wa_rspar-high = 17.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
wa_rspar-low = 'Selection 2'.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
wa_rspar-low = 10.
APPEND wa_rspar TO rspar.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar
AND RETURN.
ENDCASE. -
Submit statement is not working
i am trying to use submit statment in FM but i am not getting control when submit get executed..
Return is not working ..
any help regarding this will be appreciated
Edited by: James rammstein on Jun 30, 2009 5:14 PMThere may be list output from what you are submitting.
Try EXPORTING LIST TO MEMORY along with AND RETURN. -
How to use SUBMIT key word in the program in the program
Hello Folks,
I want use SUBMIT statment in the program for calling the other program. My query is
I have one report named REPORT1 and I am using the SUBMIT statment in this report to call the second report named as REPORT2. The flow of the program is I excute the first report REPORT1 and entr the value on selection screen of REPORT1, selection screen is having one parameter. then SUBMIT statment comes into picture to call the second report REPORT2 in this second report, I would like to pass the selection screen value of first report REPORT1.
I want to know how to pass the selection screen value of the first REPORT1 to second REPORT2.
Anyone please guide me in this regards.
Thanks & Regards
ChetanHi Chetan,
Try this report.
Create two reports namely ztry, ztry1 as below.
Run report ztry.
When you run report ztry,
ztry1 will get excuted first(through 'submit'),
getting values from report ztry through 'import' and 'get parameter'.
Report ztry.
*Export and Import
DATA: text(20) VALUE 'Hello',
mem(20).
WRITE:/ 'Export and Import' COLOR = 1.
EXPORT text TO MEMORY ID mem.
SUBMIT zawi_try AND RETURN.
WRITE:/ ''' Hello'' exported to ZAWI_TRY successfully '.
WRITE:/.
*Set and Get Parameter ID
DATA: var(20) VALUE 'Master'.
WRITE:/ 'Set and Get Parameter' COLOR = 1.
SET PARAMETER ID 'abc' FIELD var.
WRITE:/ 'Set Parameter ID is success'.
WRITE:/.
Report ztry1.
DATA: text(5),
mem(20).
IMPORT text FROM MEMORY ID mem.
WRITE:/ 'Importing '' Hello'' from ztry:', text color = 1.
FREE MEMORY ID mem.
write:/ mem.
DATA: var(6).
GET parameter id 'abc' field var.
write:/ 'Value got through Get Parameter ID from ztry:',var color = 1 .
Thanks.... -
Submit a program but I donu00B4t want to see the slection screen of this progra
Hi expert.
I have a problem. I am calling a program B from another program A using a SUBMIT statment. I am passing the parameters of the selection screen of the program B with the instruction VIA SELECTION SCREEN. The problem is that the program B shows a informatin message anf the selection screen appears; and i don´t weant this, I don´want that the selection screen apeear. Spme body can say me how can I make this??
ThanksHello,
If you use VIA SELECTION-SCREEN the screen will be showed, try using USING SELECTION-SCREEN.
*... VIA SELECTION-SCREEN *
Effect
If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed
*... USING SELECTION-SCREEN dynnr *
Effect
This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.
If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.
If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.
Example:
The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.
Program accessed
REPORT report1.
DATA text TYPE c LENGTH 10.
SELECTION-SCREEN BEGIN OF SCREEN 1100.
SELECT-OPTIONS: selcrit1 FOR text,
selcrit2 FOR text.
SELECTION-SCREEN END OF SCREEN 1100.
Calling program
REPORT report2.
DATA: text TYPE c LENGTH 10,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
Regards. -
Submit via selection-screen - Return automatically
Hello so far I have a code ....
<b> SUBMIT (p_pname) EXPORTING LIST TO MEMORY AND RETURN
USING SELECTION-SET p_vname.</b>
Now what this does is self explanatory. Afterwards I just write the list to the program with the submit statment.
However, instead of using a variant. I would like to have an option that it goes to the selection-screen where the user can input the parameters and return back to the original program afterwards.
When I tried this ...
<b>SUBMIT (p_pname) VIA SELECTION-SCREEN
EXPORTING LIST TO MEMORY AND RETUR</b>
What happens is that it goes to the selection-screen, but stays in that program which I submitted and sends the report there. Its only when I press the back button is when it Exports list to memory.
As mentioned my desired process is that after the selection-screen process is done. You return back and the report is generated there. Thank you every one and good day.Chad,
As you need the selection screen of the calling program, unless you exit out of the report, its not going to come out of the program. Once the program is displayed, you will hav explicity come out of it.
Regards,
Ravi
Note : Please mark the helpful answers -
Hello all,
I have a program that submits a report. This report sends the output to the spool. When the process executes the submit command I get the following message:
Spool request (number &) created without immediate output.
I need the spool request number for further processing. Does anybody know how to get the message and the spool request number at runtime? Kind of like the messages we get with a call transaction into the message table. By the way, the message is NOT available in the system structure SY(SYST).Here is what I've done in the past.
1) in the submitted program, export the sy-spono to a memory id. This should be the very last statement of the program.
2) in the calling program, after the SUBMIT statment, import the spool number into memory id.
3) do what ever you need to do with the sy-spono.
Regards,
Rich Heilman -
Hi,
My requirement is 2 open display a report when a particular function is called.
Scenario:
I have a function module Z_FM to which a program name is passed along with a line no.
My requirement is to open a new session and display the report that was passed to Z_FM programatically and i also have to move the cursor to the line specified in the import parameters of Z_FM.
Please advise me on how to pcoeed.
I thought of using "CALL TRANSACTION" "LEAVE TO TRANSACTION" but they are not helpful.
Thanks,
VigneshHi,
since you want to move the cursor, its not possible to use submit statment.
i would suggest you to go for BDC recording. First confirm whether you want to go in display mode or in change mode?
Please find the same BDC recording.
Program | Screen | Field Name | Field Value
SAPLWBABAP | 0100 | X
BDC_OKCODE | =SHOP "Display mode
RS38M-PROGRAMM | Z_TEST " program name
RS38M-FUNC_EDIT | X
SAPLS38E | 0400 | X
BDC_SUBSCR | SAPLEDITOR_START 6420EDITORSUBSCREEN
RSTXP-TDFIRST | 5 " instead of 5 replace with the line no -
Commit work statement creating problem in CALL TRANSACTION
Hi Friends,
we are facing a problem where we need to call a standard program from a Zprogram.
we have tried the following ways.
1. Using SUBMIT statement , we are sending the parameters to the standard program, but when the standard program gives a
dump our program cannot process further records. we are calling the submit statment in a loop. As because the standard
program is giving dump our program is not able to process the next record in the loop and this should not be the case.
To avoid this we have used the second method.
2. we used a CALL transaction, we have created a Tcode for the standard program and called this transaction in the calling
program. We are passing the parameters for the standard program via BDC table. this works fine even when the standard
program gives a dump but when ever the control comes across a Commit work statement the the control comes back to our
calling program with out executing the rest of the statments after the commit.
now our concern is even though there is an commit work statement , statements after the commit work should also get executed in call transaction. Is thee any way?
Regards,
SravanHi All,
I got the solution
DATA: ctu_parameters TYPE ctu_params.
ctu_parameters-dismode = 'E'.
ctu_parameters-updmode = 'A'.
ctu_parameters-racommit = 'X'. "No abortion by COMMIT WORK
CALL TRANSACTION USING itab_bdcdata OPTIONS FROM ctu_parameters.
the above code will work even if there is an commit work . This might help some others. -
Hi,
I am trying to implement parallel processing and am facing a problem where in the Function Module contains the statement :
submit (iv_repid) to sap-spool
with selection-table it_rspar_tmp
spool parameters iv_print_parameters
without spool dynpro
via job iv_name
number iv_number
and return.
I call the Function Module as such :
CALL FUNCTION 'YFM_OTC_ZSD_ORDER'
STARTING NEW TASK v_task_name
DESTINATION 'NONE'
PERFORMING receive_results ON END OF TASK
EXPORTING
iv_repid = lv_repid
iv_print_parameters = v_print_parameters
iv_name = v_name
iv_number = v_number
TABLES
it_rspar_tmp = t_rspar_tmp[]
EXCEPTIONS
communication_failure = 1
OTHERS = 2.
But I keep getting the error Output Device "" unknown.
Kindly advise.
Thanks.I need the output of a report to be generated in the spool and then I am retreiving it later on from the spool and displaying ti along with another ALV in my current program.
I have called the Job Open and Job Close function modules. Between these 2 FM calls, I have written the code for the parallel processing.
CALL FUNCTION 'YFM_OTC_ZSD_ORDER'
STARTING NEW TASK v_task_name
DESTINATION 'NONE'
PERFORMING receive_results ON END OF TASK
EXPORTING
iv_repid = lv_repid
iv_print_parameters = v_print_parameters
iv_name = v_name
iv_number = v_number
TABLES
it_rspar_tmp = t_rspar_tmp[]
EXCEPTIONS
communication_failure = 1
OTHERS = 2.
After this, I retrieve the data from Function Module : RSPO_RETURN_SPOOLJOB.
All the above steps work while I am in debugging mode.At the RFC call, it opens a new session and i execute the session completely, return to the main program execution, and then execute to the end , and I get the desired output.
But in debug mode, if i reach the RFC, a new session opens.I do not execute the FM, instead if i go back to the main program and execute it directly, i can replicate the error : Output device "" unknown.
So i guess it has got something to do with the Submit statment in the RFC.
Any assistance would be great !
Thanks !! -
Hi,
I have made a screen with 2 ALV lists that is working perfect when running program in dialog. When I run program in batch only the first list is saved in spool file. Anyone who know how to be able to save both lists in spool file?
Regards,
Fredrik RagnarHi,
I feel this could be because of the spool size defined being different than the ALV size.
Change the Spool size using transaction SPAD. Use this spool size while calling the Background program ( in the SUBMIT statement ).
Pass Layout Parameter of type sy-paart in the SUBMIT statment where the Layout parameter would be created through SPAD.
Hope this solves the problem.
Best regards,
Prashant -
Remote enabled Function module for a simple report program
Hi Experts ,
I have to convert a Simple list report program to a remote enabled function module, so that it can be used from the online applications.
One option that comes to my mind is to create some import parameters for all the selection screen fields and then the result will be fetched in the export tables in function module. and call that report program using call transaction or submit program.
I Dont know whether this is a best solution or not, can you please help me with your suggestions?
Regards,
Ashish ShahHi,
You can use the SUBMIT statment in the Function module , then in the report program you need to EXPORT the Result to the list then use the IMPORT option in the function moduel then pass the data to the TABLE parameters so that the data will be avilable in the table parameters
Regards
Sudheer
Maybe you are looking for
-
How do I install 10.9.1 directly using an Air with 10.6.8 Snow Leopard? My friend shared a copy of the 10.9.1. installer but i can't seem to make it work. Help please!
-
Is arch the distro for me?
Hiya all, just want to thank you in advance for your time and advice:D anyway, my plans are to buy the linux version of the MSI Wind when it is released in a few months. (http://www.msimobile.com/DetailPage.asp - d_NB_Linux) I have used SUSE (the dis
-
Help with importing .raw images and b+w filters
I have recently been taking alot of b+w images. With most of these images I apply a red in camera filter. When I then import the pictures into lightroom 2.3 a color version of my picture is then rendered, without the red in camera filter that i too
-
Mac Pro 2014 USB Keyboard not working for log-in.
I have a Mac Pro 2014 with two thunderbolt displays and an apple USB keyboard. Whenever I boot up the computer the keyboard doesn't seem to work at first. Often I get hung up on the log-in screen pushing keys to no effect until the bluetooth keyboa
-
I want to thank Adobe for this new Cloud all apps program.
Being an artist who is honestly having a heck of a time in this economy and the last year being not so good. I was unable to afford the CS6 production upgrade, not even close to having that much money, times are tough. And I want to thank them for ma