Without SPOOL Dynpro!
Hi friends!
We are trying to submit a SAP Standard program in FOREGROUND mode that gives the output in form of SAP SCRIPT but we are unable to generate a spool from it.
Whenever a SUBMIT statement is triggered a BOX is popped up and spoils the show.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = 'X'
IMPORTING
valid = w_valid
out_parameters = e_params.
submit ZPROGRAM
to SAP-SPOOL without spool dynpro
spool parameters e_params
AND RETURN
USING SELECTION-SET '28951'.
Any thoughts, how do we generate a SPOOL number from this. As later we need to take this spool and convert into PDF.
Thanks.
Hey Anderson,
Check this program . It works.
REPORT ztest_notepad.
TABLES: tsp01.
"Variables
DATA:
l_lay TYPE pri_params-paart,
l_lines TYPE pri_params-linct,
l_cols TYPE pri_params-linsz,
l_val TYPE c.
*Types
TYPES:
t_pripar TYPE pri_params,
t_arcpar TYPE arc_params.
"Work areas
DATA:
lw_pripar TYPE t_pripar,
lw_arcpar TYPE t_arcpar.
l_lay = 'X_65_132'.
l_lines = 65.
l_cols = 132.
CONCATENATE sy-uname sy-datum sy-uzeit INTO lw_pripar-plist."Give spool name.should be unique
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = lw_arcpar
in_parameters = lw_pripar
layout = l_lay
line_count = l_lines
line_size = l_cols
no_dialog = 'X'
IMPORTING
out_archive_parameters = lw_arcpar
out_parameters = lw_pripar
valid = l_val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
lw_pripar-prrel = space.
lw_pripar-primm = space.
SUBMIT zprogram
TO SAP-SPOOL SPOOL PARAMETERS lw_pripar
WITHOUT SPOOL DYNPRO
USING SELECTION-SET '28951'
AND RETURN.
* To fetch the spool number from TSP01 table
SELECT SINGLE *
FROM tsp01
WHERE rq2name = lw_pripar-plist."Give spool name.should be unique
IF sy-subrc = 0.
WRITE tsp01-rqident.
ENDIF.
Thanks
Venkat.O
Similar Messages
-
Convert ABAP list output to PDF without spool
Hi All,
We have used the FM 'CONVERT_ABAPSPOOLJOB_2_PDF' to convert the list output to PDF. It creates the spool number in SP01 and PDF is getting generated.
But, in our SAP ECC 6.0 server all spools are redirected to printer by default and get printed because it configured like that. We requested BASIS people to reconfigure but they said no for a single report.
So we need to find the alternate solution to generate the PDF without spool. We have searched in sdn, but didnot get any alternate solution.
Please help us in this regard.
Thanks in advance.data: begin of i_list occurs 0,
line(255),
end of i_list.
data:i_mara like mara occurs 0 with header line.
parameters: p_matnr like mara-matnr.
start-of-selection.
set pf-status 'PDFFILE'.
select *
from mara
into table i_mara
where matnr = p_matnr.
loop at i_mara.
write:i_mara-matnr,i_mara-ernam,i_mara-pstat.
endloop.
at user-command.
if sy-ucomm = 'PDF'.
DO.
READ LINE SY-INDEX.
IF SY-SUBRC NE 0.
EXIT.
ELSE.
I_LIST = SY-LISEL.
APPEND I_LIST.
ENDIF.
ENDDO.
NEW-PAGE PRINT ON DESTINATION 'LP03' IMMEDIATELY ' ' COVER TEXT ' ' KEEP IN SPOOL 'X' NEW LIST IDENTIFICATION 'X' LINE-SIZE 132 LINE-COUNT 65 NO DIALOG.
LOOP AT I_LIST.
IF I_LIST-LINE IS INITIAL.
SKIP.
ELSE.
at first.
write: TEXT-001.
endat.
WRITE: I_LIST-LINE+0(132).
ENDIF.
ENDLOOP.
NEW-PAGE PRINT OFF.
data:filename like RLGRAP-filename value 'C:\PDFFILE.PDF'.
DATA: SPOOL TYPE TSP01-RQIDENT.
SPOOL = SY-SPONO.
SUBMIT rstxpdft4
WITH spoolno = spool
WITH download = 'X'
WITH p_file = filename
AND RETURN.
if sy-subrc = 0.
write: 'pdf file generated'.
else.
write:'pdf file not generated'.
EXIT.
endif.
endif.
please paste this code and check once ,if it works modify the code according to ur requirement.
regards,
padmaja -
Is it possible generate pdf into xstring without spool? The task is mass generating pdf files, about 100 per day. Any idea?
Ok, here is the one variant, but i think it also create any jobs, work for me faster then standart algoritm pdf output:
1. We need two files XFD with the outputdata and XDP of our PDF Form.
2. XFD we can generate by transformation.
3. And the code:
DATA: l_fp TYPE REF TO if_fp,
l_pdfobj TYPE REF TO if_fp_pdf_object,
l_xft TYPE xstring,
l_xfd TYPE xstring,
pdfresult TYPE xstring,
l_dest TYPE rfcdest.
MOVE cl_fp=>get_ads_connection( ) TO p_dest.
* get FP reference
l_fp = cl_fp=>get_reference( ).
TRY.
* create PDF Object
l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).
* set template
l_locale = p_loc.
l_pdfobj->set_template( xftdata = l_xft locale = l_locale ).
* set data
l_pdfobj->set_data( formdata = l_xfd ).
* tell PDF object to create PDF
l_pdfobj->set_task_renderpdf( ).
* execute, call ADS
l_pdfobj->execute( ).
* get result
l_pdfobj->get_pdf( IMPORTING pdfdata = pdfresult ).
ENDTRY. -
Adobe Interactive Forms without Web Dynpro and ACF???
Hi All, we would like to build an interactive forms solution based on the Adobe software integrated into WAS. However, the customer requires a true thin client application with no additional installation on the client. Integrating Adobe Interactive Forms into Web DynPro however requires the Active Component Framework (ACF) to be installed since these forms are integrated into the page within an ActiveX container.
So the question is whether there is a way to use Adobe Interactive forms including the Adobe Documents Service within WAS but without(!) using Web Dynpro?(the full blown Adobe LifCycle Forms solution is not an option). Any suggestions on this are highly appreciated!
Tanks!
FrodoHello everyone,
I would like to add a couple of points from the SAP Product Management perspective.
Adobe has a number of stand-alone products that are the foundation for what SAP can now offer thanks to our partnership. This is exactly why we decided on a partnership that provides us with established technology, which is now integrated.
It is true that Web Dynpro is the main SAP way of integrating the interactive functions of the solution. We made this decision consciously, because the development and run-time environments provide very useful features that reduce the need for manual coding, such as the possibility of passing the data back to the backend using the Web Dynpro context. The automatism we offer here needs to be implemented from scratch with any other solution, including the Adobe stand-alone one.
While it is true that the ACF constitutes a certain limitation for the reasons you mention, Adobe will remedy this in 2005. The Reader/Web Dynpro integration will be available later this year for multiple platforms (OS, browsers) and will not require ACF anymore.
If you do not want to use a full-blown Web Dynpro application for your concrete scenario, consider developing an application that provides nothing but the interactive PDF form to the end user, to be filled in using the stand-alone Reader. The submit of the form data (with or without the PDF itself) could then happen via HTTP or e-mail.
Kind regards,
Markus Meisl
SAP NetWeaver Product Management -
Sending a mail without spool in abap
hi all,
how to send a mail without going to spool request?
please tell me any function modules to get the functionality?
thanks in advance.Please try out this code. Here we send the pdf that we have converted from smartform. If this is not your case please inform me. But the logic is permanent - simply pass the string which holds the pdf data.
*some data
*please check which You need there is some thing that is not *usefull
data lv_string type string.
data main_text type bcsy_text.
data binary_content type solix_tab.
data size type so_obj_len.
* event handler for data retrieval
data: l_devtype type rspoptype,
l_function_module_name type rs38l_fnam.
data: ls_output_options type ssfcompop,
ls_control_parameters type ssfctrlop.
data: ls_output_data type ssfcrescl.
* generated result: HTML with embedded CSS
data: ls_xmloutput type ssfxmlout,
lt_html_raw type tsfixml.
data: l_xstring type xstring, "needed for HTTP response
l_xlength type i,
l_html_xstring type xstring.
data: l_pdf_xstring type xstring,
lt_lines type table of tline,
ls_line type tline,
l_pdf_len type i.
data:
solix TYPE solix,
soli type soli.
DATA send_request TYPE REF TO cl_bcs.
DATA text TYPE bcsy_text.
DATA document TYPE REF TO cl_document_bcs.
DATA recipient TYPE REF TO if_recipient_bcs.
DATA sent_to_all TYPE os_boolean.
DATA pdf_content TYPE solix_tab.
DATA lp_pdf_size TYPE so_obj_len.
*here we make the smartform and convert it to pdf
ls_control_parameters-no_dialog = 'X'.
ls_control_parameters-getotf = 'X'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = sy-langu
* i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = l_devtype
EXCEPTIONS
no_language = 1
language_not_installed = 2
no_devtype_found = 3
system_error = 4
others = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid type sy-msgty number sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ls_output_options-tdprinter = l_devtype.
CALL FUNCTION l_function_module_name
EXPORTING
* archive_index =
* archive_parameters =
control_parameters = ls_control_parameters
* mail_appl_obj = APPL_OBJECT_ID
* mail_recipient = RECIPIENT_ID
* mail_sender = SENDER_ID
output_options = ls_output_options
user_settings = space
iv_werks = i_werks
iv_datum = i_date
IMPORTING
* document_output_info =
job_output_info = ls_output_data
* job_output_options =
TABLES
im_matnr = application->IT_MATERIAL
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid type sy-msgty number sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
* MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
IMPORTING
bin_filesize = l_pdf_len
bin_file = l_pdf_xstring " binary file
TABLES
otf = ls_output_data-otfdata
lines = lt_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid type sy-msgty number sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*and here we mail it
send_request = cl_bcs=>create_persistent( ).
lp_pdf_size = XSTRLEN( l_pdf_xstring ).
pdf_content = cl_document_bcs=>xstring_to_solix( ip_xstring = l_pdf_xstring ).
document = cl_document_bcs=>create_document( i_type = 'PDF'
i_hex = pdf_content
i_length = lp_pdf_size
i_subject = 'Test Message' ).
send_request->set_document( document ).
recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = 'YOUR-EMAIL-HERE' ).
send_request->add_recipient( i_recipient = recipient ).
sent_to_all = send_request->send( i_with_error_screen = 'X' ).
COMMIT WORK. -
Smartforms to pdf without spool
Hello,
Is it possible to convert a smartform to pdf without a spool id ? I need to generate a pdf file from a smartform without print it.
Thanks.Hi Julián Moreno Luna,
Please check this link
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/smartform%2bto%2bmail%2bas%2bpdf%2battachment
*& Report ZTEST_NREDDY_PDF_MAIL
REPORT ZTEST_NREDDY_PDF_MAIL.
* Internal Table declarations
DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
* Objects to send mail.
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
* Work Area declarations
WA_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
* Variables declarations
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
* Attachment
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
* Create Message Body Title and Description
I_OBJTXT = 'test with pdf-Attachment!'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
READ TABLE I_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
* Main Text
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
* Attachment (pdf-Attachment)
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smart'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = 'Write Mail ID Here'.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
If you want to send some text as Body of the Mail then follow this once
when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
I_OBJPACK-TRANSF_BIN = ' '.
I_OBJPACK-HEAD_START = 000000000000001.
I_OBJPACK-HEAD_NUM = 000000000000001.
I_OBJPACK-BODY_START = 000000000000002
I_OBJPACK-BODY_NUM = 000000000000010.
I_OBJPACK-DOC_TYPE = 'RAW'.
append I_OBJPACK-.
by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
Best regards,
raam -
PDF generation without spool requests
Hi gurus,
Can I generate a PDF document bypassing spool. Is there any way we can create PDF document without sending it to spool. If yes, just let me know about the procedure.
Thanks in advance,
D. MallickU can directly download an internal table in PDF format with FM GUI_DOWNLOAD
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\test.pdf'
FILETYPE = 'BIN'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
OTHERS = 5.
Regards,
Joy. -
ITAB to PDF without spool request
Hi Experts,
I have a requirement where I need to convert internal table data into PDF format and send it as an E-Mail with PDF attachment.
How do I achieve this .
I dont have any smart form or SCript...
In Fact I don't want to use SPOOL....
Is there any way to convert Internal Table to PDF.....
Please Guide....
Edited by: Thomas Zloch on Sep 29, 2011 1:50 PMHi,
try below stuff,
http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES
some more info like this at ,
http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage
Thanks,
Chandra
Edited by: Chandrashekhar Mahajan on Sep 29, 2011 3:25 PM -
Report in background without spool list generation
Hi everyone!
I want to run a standard report RMMRP000 in backgroun, only I don't want it to generate a spool list. Fiddling with the output options, I was only able to make it generate a summarized list, instead of the mode datailed one that is currently being printed.
My question is this:
Is it possible, when we create the job, to disable spool list generation, even if the associated report always returns a list?
Best Regards,
Luís Andrade.one thing you could try: wirte a small program which SUBMITS RMMRP000 with the addition EXPORTING LIST TO MEMORY. I guess you need to replicate the selection screen of RMMRP000 into your own program, but you could avoid the spool this way.
-
Standalone Interactive Forms without ABAP Dynpro and Drop down boxes
Friends,
I need to create Adobe interactive form with drop down boxes. I have 2 questions:
1) do i need to use abap dynpro to display the form or can i display the form using print program
2) for using drop down box, should i use the one from standard library or Web Dynpro ActiveX or Web Dynpro Native library
Points will be rewarded for helpful answers.
Thanks.Hi,
Its not necessary to have ABAP web Dynpro to create and display adobe forms. You can display it in programs in ABAP. Go to following link to know more:
[https://www.sdn.sap.com/irj/sdn/adobe#section39]
There is a sample application for Adobe form in ABAP and lot more.
You can use web dynpro Native dropdown list.
Hope it will help you.
Regards,
Vaibhav Tiwari. -
How to get user language in property renderer without web dynpro (java)
Hi all,
how can I get the language of the current user?
Normally I got it with:
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
IResourceContext resourceContext = new ResourceContext(ep5User);
String strUserLanguage = resourceContext.getLocale().getLanguage();
But this only works in web dynpro applications. Now I need to get the language in my own property renderer. The code throws:
com.sap.tc.webdynpro.services.sal.um.api.WDUMException: No client user defined for the current request (no regular Web Dynpro request as ITask is null.
Thanks a lot
SteffiHi,
If you are in a property renderer you always have a IResource which inturn has a ResourceContext and ResourceContext has the Users object.
So the code should be:
IResourceContext resourceContext = IResource.getContext();
IUser user = resourceContext.getUser();
user.getLocale().getLanguage();
Regards,
Praveen Gudapati
Edited by: Praveen Gudapati on May 16, 2008 2:54 PM -
Dynpro call during processing -- Without PBO, Dynpro remains visible
Hello!
My problem is as follows:
During the build of a tree hierarchy, i check how long the work is going on since starting the process. If work lasts longer than an amount of time, i interrupt processing and call a function that calls a Dynpro. After leaving to screen 0, I continue processing but as no pbo is called, the before called Dynpro remains visible on screen until procession finished and a pbo is executed by system.
Is there any possibility to tell the Dynpro to disappear before PBO?
Many Thanks in advance,
ThomasHi Arnab!
Thanks for the fast reply!
But that's not the problem.
I'll try to show you what I've got:
In ABAP-Objects I've got a manager class that runs a method M.
In this Method M I'm extending a CL_GUI_ALV_TREE-Object by adding nodes recursively. In the recursive method I check if some conditions are false, and if so, call an ABAP-Function that calls a Dynpro. After leaving this Dynpro (by using leave to screen 0), the PBO of the parent Dynpro is not processed because process is still inside the recursive method. The update is done not before Method M and the recursive Method have been fully processed.
Method M.
loop at nodes.
call method build_nodes_recursively.
endloop.
endmethod M.
Method build_nodes_recursively.
if condition is false.
call function D. //Function call that calls Dynpro
if function_call_d is true.
return.
endif.
endif.
call method build_nodes_recursively. //recursive call.
endmethod build_nodes_recursively.
Maybe you understand my problem now?
Because there's no PBO of the parent Dynpro, recursive progress goes on after closing the child Dynpro but the child Dynpro is still visible until Method M is finished and PBO of the parent Dynpro is processed.
Thank you for helping,
Thomas
Edited by: Thomas Hostnik on Jul 15, 2009 2:14 PM -
Hi Experts,
I need some help plz :
I use a job for a program, this program submits another program.
In sm37, the job doses not give spools : I don't know why ? perhaps there is a problem with the submit?
Thanks for your help
regards,
MehdiHi,
I hope there is a problem happended while you are submit another program. Try to avoid submit and try to schedule it an backround job in SM37 Transaction. If you have scheduled it it will be generated the spool number. Let me know if you have required any more
Regards
Thiru -
SPOOL_INTERNAL_ERROR spool overflow when submitting the same program
I am submitting the same program via job with different seletion screen values after JOB_OPEN, and then SUBMIT statement and JOB_CLOSE FM. But this job get cancelled with message "ABAP/4 processor: SPOOL_INTERNAL_ERROR" . The submit is as follows:
SUBMIT (sy-repid) USER sy-uname
VIA JOB 'ZTP_SAl_REG_MONITOR_JOBS'
NUMBER l_jobcount
TO SAP-SPOOL
SPOOL PARAMETERS fp_user_print_params
NEW LIST IDENTIFICATION 'X'
WITHOUT SPOOL DYNPRO
WITH rb_monit EQ 'X'
WITH s_jobcnt IN s_jobcnt
WITH p_date EQ p_date
WITH rb_row EQ rb_row
WITH rb_col EQ rb_col
AND RETURN.
Is it possible to use the same program to be scheduled....Let me include that the submit is happening with rb_monit = X and it has separate branch...so infinite looping can not happen.Hi Sumit,
I hope that the flag is ensuring that it doesnt go into infinite loop. You may wish to check that once bcz Spool overflow seems to be bcz of infinite loop or bcz of layout issue.
Goto SP01 in the same client where you have scheduled the job.
Check the spool no. which was generated bcz of the job.
Double click on the STATUS of the spool ( it should be in red background color).
System will give a popup with status details.
Again double click on the status. System will again give a popup.
The popup will give the details of why the spool ran into errors.
Also check the layout.
Thanks,
Best regards,
Prashant -
How to create spool in an online report
Hi All,
I have a requirement where the ALV report output has customers and details related to it.For example My report output has three customers(with a check box against it) and each customer has 5 line items.The user will select first and the last customer and press a push button provided.Once he clicks this push button, I should get the customers which are selected by the users and the line items related to this customers.I am able to capture all this.Now the real problem here is that I have to create a pdf document for each customer along with line items and send it as an email.In effect, in this scenario I have to create two pdf documents since the user has selected two customers on the output screen and send it to the email of that particular customer.Is there any FM available to create spool in the background for each of these customers(along with line items data) and make use of this spool number to generate a pdf document using CONVERT_ABAPSPOOLJOB_2_PDF.Once I get this I can send the email.
Please help!
Thanks in advance
SandeepThe following steps shows how to download the output data in to PDF.
1.Provide Spool Parameters using following function module 'GET_PRINT_PARAMETERS'.
--This function module will provide the print parameters for creating the output in the spool; the required parameters are passed to the OUT_PARAMETERS import parameter.
2.Submit the report to generate the output in the spool.
SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_mstr_print_parms
WITH SELECTION-TABLE i_int_tab
AND RETURN.
--Submit the report to generate the output in the spool as i_int_table is an internal table with structure RSPARAMS. As variant allows you to set the names and contents of the parameter and selection options dynamically at runtime, we need to use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table i_int_table with the structure RSPARAMS and pass that internal table in above manner.
3.To Find the spool number from the table TSP01
Data: l_rq2name LIKE tsp01-rq2name.
*Concatenate the report and User name as per the value available in the table
TSP01.
CONCATENATE f_repid+0(9)
f_uname+0(3)
INTO l_rq2name.
*Fetch the most recent spool from the TSP01 table
SELECT * FROM tsp01 WHERE rq2name = l_rq2name
ORDER BY rqcretime DESCENDING.
l_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
4.Convert Spool to PDF using the FM : CONVERT_ABAPSPOOLJOB_2_PDF.
5.Download to local file by using the FM : DOWNLOAD
This function module returns an internal table data_tab contains the PDF formatted output.
Using above points your can create the output in the PDF from there you can send the email.
Hope your reqirement can met using the above five points.
Reward points please
Thanks,
Ravi Kanth
Maybe you are looking for
-
Creating abap program to develop and activate a global table type and global structure.
Hi friends, I want to create and activate a global structure and global table type by coding in ABAP editor only. so can I do that anyhow. Please help me. Thanks in advance.
-
Oracle Not Available Error Message
My application has been running fine until today. I have not changed any code in a while, but now I'm suddently getting the error message: Oracle.DataAccess.Client.OracleException: ORA-1034: ORACLE not available The database is not shutdown and I can
-
Hi all, I have created some fot albums in iPad and I want to sync them in my Mac, my surprises is that I cannot do it ... What am I doing wrong? many thanks in advance regards
-
Dear Experts, In VA02 when we go to GoTo>Header>Status--->Object Status , when we change Object status e.g. from RELE to CHVL , then i need immediately that status in some field or table without saving it. Although i can get status from FM ALM_ME_REA
-
I can't download Tones for my iPhone. I can't find the option Store > Create Tone when I select a song. Can anyone help me?