‎2005 Dec 22 7:36 AM
Hi Group.
I am writing a custom code( Z program ) where in I call the standard SAP program RPAR4W00 using Submit command and passing the selection screen parameters.My problem is when this program RPAR4W00 executes it displays a report which has a unique session no created. I need to capture this session no so that I can use this session no to Delete the records using program RPAR4D00.Would like to know how can this be achieved.Thanks in advance.
Regards,
Ankur Bhandari
‎2005 Dec 22 7:40 AM
EXAMPLE :
SUBMIT rseidoc9
WITH updtim IN updtim ....
WITH value1_1 = w_licha-licha
EXPORTING LIST TO MEMORY
AND RETURN .
THEN TO DISPLAY :
DATA : LIST TYPE ABAPLIST OCCURS 0.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
call function 'WRITE_LIST'
exporting
write_only = ' '
tables
listobject = list
exceptions
empty_list = 1
others = 2.
IN YOU'RE CASE YOU CAN DO A SEARCH IN THE TABLE LIST AND
GET THE VALUE YOU NEED!
DON'T FORGET THE REWARD PLZ
‎2005 Dec 22 7:40 AM
EXAMPLE :
SUBMIT rseidoc9
WITH updtim IN updtim ....
WITH value1_1 = w_licha-licha
EXPORTING LIST TO MEMORY
AND RETURN .
THEN TO DISPLAY :
DATA : LIST TYPE ABAPLIST OCCURS 0.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
call function 'WRITE_LIST'
exporting
write_only = ' '
tables
listobject = list
exceptions
empty_list = 1
others = 2.
IN YOU'RE CASE YOU CAN DO A SEARCH IN THE TABLE LIST AND
GET THE VALUE YOU NEED!
DON'T FORGET THE REWARD PLZ
‎2005 Dec 22 7:47 AM
Hi,
One way of doing this is using
SUBMIT (PROG_NAME) TO SAP-SPOOL
VIA
JOB <JOB_NAME>
NUMBER <JOB_COUNT>
WITHOUT SPOOL-DYNPRO
WITH SELECTION-TABLE I_SELTAB " i/p data
and return.
Here i_seltab would be of type rsparams which would have all the selection screen data which you want to pass.
Then using FM 'RSPO_RETURN_ABAP_SPOOLJOB' you can read the whole spool data & can take out the required value of the field into a variable.
This would solve the problem.
Best regards,
Prashant
‎2005 Dec 22 7:53 AM
Hi,
<b>SUBMIT xxxx EXPORTING LIST TO MEMORY</b>
Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST" .
hope this helps you
Regards
Sudheer