Hello,
Is there any possibility to display the website link with hyperlink with colour blue in sap script?If yes please provide the solution.
Thanks in advance.
Regards,
Ashwini
Hello,
Is there any possibility to display the website link with hyperlink with colour blue in sap script?If yes please provide the solution.
Thanks in advance.
Regards,
Ashwini
Dear Friends,
I had a requirement is that ( URL linkage to place an order ) need to place an URL in Quotation
so that it will place an order, SAP scripts are using for the Form printing.
I'm currently in ECC 6.0, could any one please help with solution tried with Insert -> Text -> Hypertext, but it's not working.
Thanks for your time.
Regards
Kumar.
Hi All,
Actually I need this functionality in program documentation section which opens script editor so I have posted this question in this forum.
The specific requirement is that I need to navigate to a hyper link from a program documentation.
For eg, from the program (custom) help documentation I need to link to google.com. How should I do this ?
I found some insert of Hypertext but not shure how does it work ?
Any idea please.
Regs,
Somnath
Hi All,
In the case where the text for displaying contains bullet points, how do I display those bullet points? Currently, they are being replaced by # sign.
Your help is very much appreciated!
Thanks.
Cady
Hi
I have a Smartform in eRecruitment used for a requisition.
It uses a parameter of POST_INFO_TEXTS of associated type RCF_S_ITF_POST_INFO_TEXTS which is free texts from infotype 5121-posting information. In the output I'm using POST_INFO_TEXTS-COMPANY_DESC_ITF which is a string data type.
A user can enter text and then it is displayed in a data overview via the portal. The problem is that the output contains ## for all/any carriage returns.
So the output is: line1##line2##line3.
What I need to achieve is:
line1
line2
line3
I have removed the ## by using
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>CR_LF IN POST_INFO_TEXTS-COMPANY_DESC_ITF WITH ' '. but I have been unable to track down a solution for putting carriage returns back into the output.
Is it a question of converting the original text into a different format? I've looked using SPLIT POST_INFO_TEXTS-COMPANY_DESC_ITF AT CL_ABAP_CHAR_UTILITIES=>CR_LF and putting that into a table but still not how to then output that with carriage returns.
All/any suggestions are greatly appreciated.
Cheers
Jon.
Hi All,
The requirement is to display the water mark in all pages of the sap script.
Can you please help to solve this.
I have uploaded the image through SE78 and then create another window in sap script and write a command i.e
BITMAP IMAGE_TEST OBJECT GRAPHICS ID BMAP TYPE BMON DPI 75
but in the form outoput only image is displaying not the content of the main window.it seems the image overlap the main window.
Can u plz help.
Thanks
Hello.
i'm trying to use different trays for our HP 4250TN printer. But i'm getting stucked.
XDC:
-------
I copied the XDC File hppcl5e.xdc to zhppcl5e01.xdc (see attached file). I modified
the XDC File with Notepad++ and changed value 26 to 5.
Cause internal Tray ID 5 means physical Tray 3.
<medium long="297mm" short="210mm" stock="a4">5</medium>
AdobeForm:
----------------
The AdobeForm uses medium a4, as described in XDP File (see attached file):
<medium long="297mm" short="210mm" stock="a4"/>
ADS Server:
----------------
I copied the XDC Files to the Adobe Server Lib Directory and restarted the J2EE Engine.
ABAP Server:
------------------
On ABAP Server i created a new device type ZHPLJ401 which is a copy from HPLJ4.
In RSPO022 i assigned this device type with XDC zhppcl5e01.xdc. Then i created
a new printer in SPAD and assigned ZHPLJ401. I use Host Spool Access Method
S: Print Using SAP Protocol.
Printserver:
---------------
On Printserver we use a HP universal printer driver with PCL-5. SAPSprint 7.30
and SAPPdfPrint 7.30 with current Patchlevels are installed. In SAPSprint we set
the parameter PrintPDFAsRAW=1, since some printers can't print directly PDF.
Use-Case:
--------------
But when i try to print the document it doesn't use Tray 3 but the manual tray.
Any ideas or hints what i'm doing wrong ?
Thanks,
Sebastian
I am trying to get Adobe forms printing to non default tray for HP 4350
The documentation about TRay control with Adobe here:
https://www.sdn.sap.com/irj/sdn/adobe?rid=/library/uuid/802ca378-5689-2a10-5298-e537562ba939
I am having trouble following the instructions
For my Adobe form
I made the the first Masterpage's Paper Type as "A4 Letterhead"
The xml for this is stored as stock="a4Letterhead"
I then create a new xdc "zhp4350pcl5e.xdc" from one of the implemented ones hp4350pcl5e.xdc in system.
I modifed it and added:
<medium stock="a4Letterhead" short="210mm" long="297mm">26</medium>
<inputTrayDefinition name="Tray 3" medium="a4Letterhead" trayNumber="4"/>
I then upload this into /usr/sap/RD3/SYS/global/AdobeDocumentServices/lib/
I copied a Device type ZHP4350 from HP4350
Modied my test printer in SPAD to use new deveice type ZHP4350
I then used program via se38 RSPO0022 to add to table TSP0B with entry for ZHP4350, PCL and zhp4350pcl5e.xdc
I have tried the above with no luck as it still prints to default tray. I modify <inputTrayDefinition name="Tray 3" medium="a4Letterhead" trayNumber="4"/> to a different trayNumber="2 " or "3" or "5" and re-uploaded and I even made sure used se38 RSPO0022 to delete and re-create after each change (Not sure if necessary)
What am I missing?
Hi at all,
i try to develop a rtf editor based on the class CL_GUI_RTF_EDITOR similar to the SAPScript EditorControl.
At this moment the editor can load, save, change font, bold, ...
I try to add Variables to the rft-File, so that a generator (e.g. words mail merge ) can use the rtf files to generate letters.
An Idea to solve my Problem:
The class CL_GUI_RTF_EDITOR calls an extern API, for example the Method SET_TEXT_COLOUR from Class CL_GUI_RTF_EDITOR calls an other method SetTextColour. It seems to be some kind of OLE2.
I can't find out what API it is. Can anyone help me?
Maybe this API helps me to define Variables.
Other Ideas?
Thanks in Advance.
Tobias
Edited by: Tobias Bettmann on Mar 4, 2010 2:49 PM
Issue details:
While trying to print using T-code: VF03 in a Local printer (LOCL), then the Order no. coming with its right pattern.
Example:
ORDER NO: 123456789 (Pattern is OK)
But, the problem is coming while trying to pring using any other out put devices then the printing pattern is not coming properly like the previous one.
Example:
ORDER NO:
123456789 (Pattern is NOT OK)
can any body help me on this? Thank you.
We have a requirement where there are 160+ plant locations around the UK and they all use Axis 5600+ print servers which connect to the printers via LPT1. i have all the IP addresses of the print servers, however no matter how i configure the printer in SPAD, i cannot seem to get the print to the destination. I have selected the OKI341(and several others) device types and different Host Spool Access Methods. i have the IP address and ports being used, but i just cannot find the right combination to be able to successful create a single print out! am i missing something when printing using this method? the plants will all be using thin clients with these printers hanging off of a windows XP terminal that is only networked via this Print Server! i know this is old technology, but compared to some of the issues i have come across i feel this should be straight forward! am i asking the impossible? or just not found the right combination?
Hello All,
We are facing a very tricky issue while printing lables using DYMO LableWrite 450 printer. We used the SAP standard form RM07ETIKETT, however, we had to change the layout to Lanscape as suggested by the user.
The issue is that label is printed starting from middle of the page. So we are losing almost 2 inches of space on top of the label. We set the window margin on top to 0 and tried printing the labels on a normal printer on A4 paper and it prints fine. A few days back we printed a sample label in portrait layout on the same lable printer and it printed fine. Now the same printer doesn't print the label properly in portrait format.
We identified a pattern during out testing though. When printed in Landscape format, the top side of the label lost space and when printed in Portrait, it loses space on the left side of the label. We checked with the end user and they say they could print other labels successfully, though they aren't from SAP.
Your inputs are much appreciated.
Thanks,
Anil
Hi all,
I have craeted the smartform and coverted the otf to PDF . Find below code.
For English PDF is comming propely , but arabic text is showing some junk .
when i execute smartform alone in arabic it comes propely but PDF is not comming correctly.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = gv_form
IMPORTING
fm_name = lv_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc EQ 0.
CLEAR: ls_control_parameters.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = '*' "'E'
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = lv_e_devtype.
ls_output_options-tdprinter = lv_e_devtype.
ls_control_parameters-no_dialog = abap_true.
ls_control_parameters-getotf = abap_true.
ls_control_parameters-LANGU = gv_langu.
CLEAR: gs_zhr_terhous, ls_job_output_info.
LOOP AT gt_zhr_terhous INTO gs_zhr_terhous.
CALL FUNCTION lv_fmname
EXPORTING
control_parameters = ls_control_parameters
output_options = ls_output_options
im_params = gs_zhr_terhous
IMPORTING
job_output_info = ls_job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc EQ 0.
IF ls_job_output_info-otfdata IS NOT INITIAL.
APPEND LINES OF ls_job_output_info-otfdata TO gt_otfdata.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
*Display PDF
IF gt_otfdata[] IS NOT INITIAL.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = gt_otfdata.
ENDIF.
For English PDF is comming propely , but arabic text is showing some junk .
Thanks,
Deepa
Hello all,
I am encountering a problem in printing the totals / values in smartforms in Indian rupees. It currently exists as 1,000,000 whereas i want it to be 10,00,000 (Ten lakhs Indian Rupees). I have referred to posts here at SDN and as per suggestions checked Function Module "HR_IN_CHG_INR_WRDS" and table T005X for field LAND . The values which exist for country INdia in table is :
Client 700
Country IN
Dec.pt.format X
Date format 1
12/24 Hours
Here for decimal format has blank , X and Y which stands for ;
Blank 1.234.567,89
X 1,234,567.89
Y 1 234 567,89
By default X format is printed value for country code IN. Its not desirable. Function Module only converts to words hence not useful.
Also by using code
*Write sourceamt CURRENCY 'INR' to targetamt*
it is not throwing desired output. Uisng T.Code SU01 it is same as table T005X output so I have reached an end there too. Anybody who knows how to convert it to desirable format please suggest .
Thank you.
I have an issue in printing invoice output,
there is a text which is highlighted in green color, this text appears correct in SAP,But when we take printout there is a back slash which comes on the text which is highlighted.
I see this is purely sales issue.
Can someone from the forum suggest me what needs to be done for this?
Hi All,
I am executing an ABAP report in background . It has 58 rows and 300 columns.
But it is not getting displayed completely. Previously I got an error ' no suitable list format available for LOCL '
so I created a list format with 58 rows and 300 columns as mentioned in the thread 827206
But still the output is not completely visible in spool
Even after changing the output width to 1000 columns , I am not able to see the output in the spool completely .
I checked the field REALWIDTH in TSPOPTIONS table as mentioned in the above thread .
There is no such field over there.
I also cleared cache settings in SPAD - cache control- reset cache settings .
But still it is not working out .
Kindly help asap .
Hi
We are using Thangsan font to display Thai Font.We have a standalone program whcih will generate a PDF & print.
For PDF, we are using Device THSWINU, and for printing we are using a device type "ZHPLJ4"( This device will generate a Small spool size over the network).
Our Pseudo code will looks like this.
LOOP at Documents.
*---------------------PDF ------------------------------------
* Send mail with PDF data * SEND 2 copies of PDF with differtn values
DO 2 times.
*** Different parmaters are passed to Smartform 1st time and 2nd Time.
call smartform using THSWINU
Convert OTF to PDF and SEND MAIL.
ENDDO.
*-----------------------------------------------------------------
*----------------------PRINTING ---------------------------
*Printing only one Copy.
call smartform using ZHPLJ4 ( this is mapped to the actual printer)
*----------------------------------------------------------------
ENDLOOP.
* Note: ZPHLJ4 IS only works for printing, if used in PDF genration, that PDF is totally out of alignment and Font will not displyed properly.
When we execute the program with 1 document Both PDF & print works fine. But if we execute the program with 2 or 3 documents , 1st copy of PDF for each document is misaligned ( looks like its taking ZHPLJ4 Settings). But second copy for that document is Fine. printing is always Fine.
Document | PDF Copy1(Device: THSWINU) | PDF Copy 2(Device THSWINU) | Print( Device Type ZHPLJ4) |
Document 1 | OK | ok | ok |
Document 2 | NOT ok(Out of alignemnt) | ok | ok |
Document 3 | NOT ok(Out of alignemnt) | ok | ok |
Document 4 | NOT ok(Out of alignemnt) | ok | ok |
Document 5 | NOT ok(Out of alignemnt) | ok | ok |
We suspect that, after printing a copy with ZHPLJ4 , when it comes to next documents 1st copy, system is still taking ZHPLJ4 setting even though THSWINU is mentioned in the parameters.
Please suggest how to clear the printer buffer or any of other way to solve this issue.
thanks
Hi Gurus / Experts,
this is my first discussion post in 2014, I hope this will become the first answered post too.
I have a requirement to create a smartforms.
In my smartforms I need to use the FM Spell_Amount in Indonesian language, but when I try to call it the Short Dump appear in front of me, the short dump tells us that the 'ID' (Indonesian language format, I set it at tcode oba9) is false. How to fix this ? please correct answer will be rewarded by points.
Hello.
i'm trying to use different trays for our HP 4250TN printer. But i'm getting stucked.
XDC:
-------
I copied the XDC File hppcl5e.xdc to zhppcl5e01.xdc (see attached file). I modified
the XDC File with Notepad++ and changed value 26 to 5.
Cause internal Tray ID 5 means physical Tray 3.
<medium long="297mm" short="210mm" stock="a4">5</medium>
AdobeForm:
----------------
The AdobeForm uses medium a4, as described in XDP File (see attached file):
<medium long="297mm" short="210mm" stock="a4"/>
ADS Server:
----------------
I copied the XDC Files to the Adobe Server Lib Directory and restarted the J2EE Engine.
ABAP Server:
------------------
On ABAP Server i created a new device type ZHPLJ401 which is a copy from HPLJ4.
In RSPO022 i assigned this device type with XDC zhppcl5e01.xdc. Then i created
a new printer in SPAD and assigned ZHPLJ401. I use Host Spool Access Method
S: Print Using SAP Protocol.
Printserver:
---------------
On Printserver we use a HP universal printer driver with PCL-5. SAPSprint 7.30
and SAPPdfPrint 7.30 with current Patchlevels are installed. In SAPSprint we set
the parameter PrintPDFAsRAW=1, since some printers can't print directly PDF.
Use-Case:
--------------
But when i try to print the document it doesn't use Tray 3 but the manual tray.
Any ideas or hints what i'm doing wrong ?
Thanks,
Sebastian
Having a bit of a weird problem I've created a form in SPF and I need to write a function module to create the form and email it. I've followed a few tutorials and my code works perfectly as an executable program but when I put it in a function module the pdf generation doesn't seem to be working. I get an error message when opening the pdf that says "Adobe reader could not open xxx.pdf because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)". The email itself isn't the issue because I get the same problem when just trying to generate the pdf and not email it.
My code is below. Any ideas?
FUNCTION Z__SEND_PDF.
data:
t_att_content_hex type SOLIX_TAB.
DATA: fm_name TYPE rs38l_fnam, " CHAR 30 0 Name of Function Module
fp_docparams TYPE sfpdocparams, " Structure SFPDOCPARAMS Short Description Form Parameters for Form Processing
FP_FORMOUTPUT TYPE FPFORMOUTPUT,
fp_outputparams TYPE sfpoutputparams. " Structure SFPOUTPUTPARAMS Short Description Form Processing Output Parameter
fp_outputparams-NODIALOG = 'X'.
fp_outputparams-GETPDF = 'X'.
* Sets the output parameters and opens the spool job
CALL FUNCTION 'FP_JOB_OPEN' "& Form Processing: Call Form
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---- Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' "& Form Processing Generation
EXPORTING
i_name = 'ZPCAR_FORM_EXPAT'
IMPORTING
e_funcname = fm_name.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*-- Fetch the Data and store it in the Internal Table
* Language and country setting (here US as an example)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
*&--- Call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
STUFF = 'X'
IMPORTING
/1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---- Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* E_RESULT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = FP_FORMOUTPUT-pdf
* APPEND_TO_TABLE = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
BINARY_TAB = t_att_content_hex .
" CONVERT_PDF_BINARY
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
* Message body and subject
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear,' TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Personnel Information Form' ).
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Personnel Information Form'
* I_ATTACHMENT_SIZE =
* I_ATTACHMENT_LANGUAGE = SPACE
* I_ATT_CONTENT_TEXT =
* I_ATTACHMENT_HEADER =
i_att_content_hex = t_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
* Add attachment
* Pass the document to send request
lo_send_request->set_document( lo_document ).
* Create sender
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send type ADR6-SMTP_ADDR value 'ADDRESS@GMAIL.COM'.
* lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_sender = cl_sapuser_bcs=>create( sy-uname ).
* Set sender
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
* Create recipient
DATA:
lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
* lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
** Set recipient
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
* lo_send_request->add_recipient(
* EXPORTING
* i_recipient = lo_recipient
* i_express = 'X' ).
* Send email
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
message 'The Personnel Information form has been emailed to the Employee' type 'I'.
" MAIL_ATTACHMENT
ENDFUNCTION.