‎2010 Jan 21 12:58 PM
Hi All,
I am calling one layout(script) from module pool programming.
I am facing a problem, the spool number is not getting generated.
Can anyone let me know what are all the options that are needed to be given in open form, so that spool number will get generated?
Regards,
Raghu
‎2010 Jan 21 2:35 PM
Assuming you're not getting an exception on the OPEN_FORM or CLOSE_FORM, then post your code for the OPTIONS parameter population and the function call so that folks can verify that you tried it yourself first and get a better idea of what you're doing wrong.
‎2010 Jan 22 4:33 AM
Below are the options i am giving in the open form:
itcpo-tddest = 'LOCL'.
itcpo-tdnewid = 'X'.
itcpo-TDNOPREV = 'X'.
itcpo-tddelete = space.
itcpo-tdprogram = sy-repid.
‎2010 Jan 22 5:21 AM
Hi,
Are you able to see the preview?
Not sure if below code works....
Just before OPEN_FORM use statement
LEAVE TO LIST-PROCESSING.
And just after close form use
LEAVE LIST-PROCESSING.
Usually we use this for list processing. Not sure if we need to use the same for form output also. Just give a try.
Thanks,
Vinod.
‎2010 Jan 22 6:09 AM
No I dont want to go for list processing.
I just want to spool number to be generated.
So that we can take print out from SP01.
‎2010 Jan 22 6:16 AM
Parameters to be passed in open form.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = TNAPR-FONAM
LANGUAGE = NAST-SPRAS
OPTIONS = ITCPO
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMS = ARC_PARAMS
DEVICE = XDEVICE
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.READ TABLE it_spool INTO wa_spool INDEX 1.
v_spoolno = wa_spool-rqident.
*Get Spool request attributes
SELECT SINGLE *
FROM tsp01
INTO tsp01
WHERE rqident EQ v_spoolno. IF sy-subrc <> 0.
MESSAGE i000 DISPLAY LIKE 'E'
WITH text-003 v_spoolno text-034.
LEAVE LIST-PROCESSING.
ENDIF.
v_client = tsp01-rqclient.
v_name = tsp01-rqo1name.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = v_client
name = v_name
part = 1
IMPORTING
objtype = v_objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE i000(zz) DISPLAY LIKE 'E'
WITH text-003 v_spoolno text-034.
LEAVE LIST-PROCESSING.
ENDIF.
‎2010 Jan 22 10:37 AM
Guys spool number is generating when i keep the break-point in the program and once reach the break-point, by just executing it.
But when i remove the break point and run it directly without any break point then no spool number is getting generated.
Please let me know how to fix this.
‎2010 Jan 22 10:45 AM