PO SAPScript question.
Hello SAPients!
I'm a little confused with a situation I have, I have to modify SAPScript MEDRUCK (ZMEDRUCK in fact) and print program SAPFM06P (ZSAPFM06P) I wanted to modify the ENTRY_NEU subroutine but there I can only see this code:
form entry_neu using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
exporting
ix_nast = nast
ix_screen = ent_screen
importing
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
changing
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
call function 'ME_PRINT_PO'
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
importing
ex_retco = ent_retco.
endform.
According to the development standards for this project, the SAPScript should not have PERFORM sentences, all the processing and calculating functionality should be in the print program, does that mean I have to modify the Function modules? Do you know other way of doing it? What would you recommend?
Thanks
In reality, the print program that you mention is really just an "in between" driver, the actually printing goes on in the function group MEDRUCK or ZMEDRUCK. You must copy the function group MEDRUCK to a "Z" version called ZMEDRUCK, this will then allow you to copy the function modules within, one of wich being the ME_PRINT_PO function module, copy this into Z_ME_PRINT_PO. Now in this function module is where you will make you modifications. There are lot so includes in there where you will need to copy them as well and comment out the old include name and include the "Z" version. Also, you will need to change the call in the mentioned program above so that it calls the "Z" version of your print function module.
call function 'Z_ME_PRINT_PO' "<-- Like So
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
importing
ex_retco = ent_retco.
endform.
REgards,
Rich Heilman
Similar Messages
-
Email SapScript : Question on READ_OTF_FROM_MEMORY
Hi All,
I'm trying to extend my order print program in order to enable the sending by mail of a SapScript.
So :
I'm using :
READ_OTF_FROM_MEMORY
Then
CONVERT_OTF_2_PDF
And
SO_NEW_DOCUMENT_ATT_SEND_API1
( With a little more code ! ).
In debug mode, I can see that the return code of
READ_OTF_FROM_MEMORY
is <b>1</b> :
*-- Read OTF from memory
CALL FUNCTION 'READ_OTF_FROM_MEMORY'
EXPORTING
memory_key = nast-objky
TABLES
otf = lt_otf
EXCEPTIONS
memory_empty = 1
OTHERS = 2.
Which means "memory empty" so I can't retrieve my form.
I don't understand why ?
Thx in advance,
Regards,
Erwanhi Check sample code ::
FUNCTION zisa_container_pack_pdf .
*"*"Local interface:
*" IMPORTING
*" VALUE(DELIVERY) LIKE BAPIVBELN-VBELN
*" TABLES
*" IT_PDF STRUCTURE TBL1024
*" RETURN STRUCTURE BAPIRET2
DATA: lt_pdfdata LIKE TABLE OF tline WITH HEADER LINE.
<b> DATA: lt_otf TYPE STANDARD TABLE OF itcoo WITH HEADER LINE,</b>
lt_doctab TYPE STANDARD TABLE OF docs WITH HEADER LINE,
lt_otfdata TYPE STANDARD TABLE OF itcoo WITH HEADER LINE.
DATA: x_nast LIKE nast, "Message Status
x_tnapr LIKE tnapr. "Processing programs for output.
DATA : len TYPE i.
*-- Calling the Subroutine Entry
*-- Get all the details from NAST table
*-- SALESDOCUMENTIN : Sales Document number (Importing parameter)
SELECT * UP TO 1 ROWS INTO nast FROM nast WHERE kappl = 'V2' AND
objky = delivery AND
kschl = 'ZDSP' AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc = 0.
*-- Get all the details from TNAPR table
*-- 'ZDSP' : Output type defined for the Sales order
*-- '1' : Transmission medium : Printer
SELECT SINGLE * INTO tnapr
FROM tnapr WHERE kschl = 'ZDSP' AND
nacha = '1' AND
kappl = 'V2'.
IF sy-subrc = 0.
*-- Populate the return code as per the standard driver program
return_code = 999.
us_screen = 'X'.
*-- Populate the Transaction code in the NAST structure
*-- 'VL03N' : Sales order Display transaction
<b>nast-tcode = 'VL03N'.</b>
PERFORM entry IN PROGRAM zisa_vaddn01_fm USING nast
tnapr
return_code
us_screen.
ELSE.
return-type = 'E'.
return-message = 'No Form found in the TNAPR table'.
APPEND return.
CLEAR return.
ENDIF.
*-- Read OTF from memory
<b> CALL FUNCTION 'READ_OTF_FROM_MEMORY'
EXPORTING
memory_key = nast-objky
TABLES
otf = lt_otf
EXCEPTIONS
memory_empty = 1
OTHERS = 2.</b>
IF sy-subrc = 0.
*-- Convert the OTF data to PDF data
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
IMPORTING
bin_filesize = v_bin
TABLES
otf = lt_otf
doctab_archive = it_doctab
lines = lt_pdfdata
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
return-type = 'E'.
return-message =
'An error occured in Converting OTF Data to PDF Data'.
APPEND return.
CLEAR return.
ELSE.
* Converting pdf data to raw data
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = lt_pdfdata
t_target_tab = it_pdf
EXCEPTIONS
convert_not_possible = 1
OTHERS = 2.
LOOP AT it_pdf.
len = len + STRLEN( it_pdf ).
ENDLOOP.
* if ( v_bin = len ).
* endif.
ENDIF.
ELSE.
return-type = 'E'.
return-message =
'An error occured in retrieving OTF Data from Memory'.
APPEND return.
CLEAR return.
ENDIF.
ELSE.
return-type = 'E'.
return-message = 'No NAST entry found with this Sales Order'.
APPEND return.
CLEAR return.
ENDIF.
ENDFUNCTION.
Regards
Ashok P -
Hello!
I have imported a full page graphic onto a SAPScript form, and it looks great in the print preview. The only problem is that the right-hand side of the graphic is cut off on the print-out.
I've set up the output attributes in SPAD to move the graphic left on the printout so that it starts 1 cm from the left-hand side of the page, but I have not attempted to do anything with the printer itself (HP 2100TN).
Any ideas?
Thanks!
JohnHi Rich;
The part that is confusing me is that is is fine on the print preview and it looks like it will not go off the edge of the paper, or even close. I was curious if there was a print setting on SAPScript or on the printer that was causing the problem...
I could shrink the image, but I would rather not since it is a full page representation of a form that I am filling with data.
Thanks!
John -
SApScript- Custom Font setting ignored by the system default setting
I have an issue related SapScript - Font Setting. Whatever Custom setting i am giving to the text written in the text-element of the Page window inside the form through paragraph or charater format e.g.
Font Family: Times Font Size - 12 Bold: - on . Is displaying as it is in the page window . But when I test the form for print layout through :- Utilities -> Printing Test. All my given custom setting is override by the system default setting in the print preview of the form.
Is there any idea or clue how to solve this isssue?
I am using the SAP 4.7 EE IDES.
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jun 11, 2009 10:32 AMHi pankaj2008_singh,
the chances that you get an answer for your question in this forum are very little.
Please post your SAPscript questions in forum ABAP Development -> Form Printing.
In spite of the name, SAPscript is not a scripting language.
Regards,
Karsten -
Sending Email thorugh SAPSCRIPT
Hi,
we are able to send an email using a sapscript, inthe function OPEN_FORM we are passing the fields ITPCO, MAIL SENDER and MAIL RECIPENT. But now we want one line in the body also. Cann any tell us the fields we should pass for this data????Hi,
Check the code it may help u.
REPORT Z_SCRIPT .
DATA: itcpo LIKE itcpo,
tab_lines LIKE sy-tabix.
Variables for EMAIL functionality
DATA: maildata LIKE sodocchgi1.
DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
PERFORM send_form_via_email.
FORM SEND_FORM_VIA_EMAIL *
FORM send_form_via_email.
CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
Creation of the document to be sent File Name
maildata-obj_name = 'TEST'.
Mail Subject
maildata-obj_descr = 'Subject'.
Mail Contents
mailtxt-line = 'Here is your file'.
APPEND mailtxt.
Prepare Packing List
PERFORM prepare_packing_list.
Set recipient - email address here!!!
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
APPEND mailrec.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = maildata
put_in_outbox = ' '
TABLES
packing_list = mailpack
object_header = mailhead
contents_bin = mailbin
contents_txt = mailtxt
receivers = mailrec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
ENDFORM.
Form PREPARE_PACKING_LIST
FORM prepare_packing_list.
CLEAR: mailpack, mailbin, mailhead.
REFRESH: mailpack, mailbin, mailhead.
DESCRIBE TABLE mailtxt LINES tab_lines.
READ TABLE mailtxt INDEX tab_lines.
maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
Creation of the entry for the compressed document
CLEAR mailpack-transf_bin.
mailpack-head_start = 1.
mailpack-head_num = 0.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'RAW'.
APPEND mailpack.
Creation of the document attachment
This form gets the OTF code from the SAPscript form.
If you already have your OTF code, I believe that you may
be able to skip this form. just do the following code, looping thru
your SOLISTI1 and updating MAILBIN.
PERFORM get_otf_code.
LOOP AT solisti1.
MOVE-CORRESPONDING solisti1 TO mailbin.
APPEND mailbin.
ENDLOOP.
DESCRIBE TABLE mailbin LINES tab_lines.
mailhead = 'TEST.OTF'.
APPEND mailhead.
Creation of the entry for the compressed attachment
mailpack-transf_bin = 'X'.
mailpack-head_start = 1.
mailpack-head_num = 1.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'OTF'.
mailpack-obj_name = 'TEST'.
mailpack-obj_descr = 'Subject'.
mailpack-doc_size = tab_lines * 255.
APPEND mailpack.
ENDFORM.
Form GET_OTF_CODE
FORM get_otf_code.
DATA: BEGIN OF otf OCCURS 0.
INCLUDE STRUCTURE itcoo .
DATA: END OF otf.
DATA: itcpo LIKE itcpo.
DATA: itcpp LIKE itcpp.
CLEAR itcpo.
itcpo-tdgetotf = 'X'.
Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'Z08V3_COLLI'
language = sy-langu
options = itcpo
dialog = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
error_message = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'
EXCEPTIONS
error_message = 01
OTHERS = 02.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
error_message = 01
OTHERS = 02.
MOVE-CORRESPONDING itcpo TO itcpp.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
result = itcpp
TABLES
otfdata = otf
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR solisti1. REFRESH solisti1.
LOOP AT otf.
solisti1-line = otf.
APPEND solisti1.
ENDLOOP.
ENDFORM.
Check out these threads ..
Re: send sap script via email or printer.
Email SapScript : Question on READ_OTF_FROM_MEMORY
Regards, -
Hi all expert,
I'm relatively new to sapscript. This is what i wish to do..
Let's say i want to print the vendor address with the addrnumber,
then take the address from ADRC using the same addrnumber.
From the spec, these are the fields which are required:
Name1, Name2, Name3, Name4, str_suppl1, str_suppl2, street, str_suppl3 and tel_number
Expected:
Kraft Foods Limited
Rm 1606 16/F
Str_suppl2
street
str_suppl3
tel_number
my question is...how to ignore those empty fields.. what if one of the fields required is not filled..will sapscript leave a gap to something like this if str_suppl2 is not field
Kraft Foods limit
Rm 1606 16/F
street
str_suppl3
tel_number
is there anyway to ignore the gap so that it will be printed to the next line instead of leaving a line..
thanks all comments are appreciated.Hi Yew Wing,
The best option is to use the
/: ADDRESS
/: ADDRESSNUMBER &ADRC-ADRNR&
/: ENDADDRESS
This way the system will automatically format the address for you. You need not worry about the blank space and other formatiing options. You need not select all the other fields as well. Just pass the Address number and rest the command ADDRES and ENDADDRESS will do automatically.
Cheers
VJ -
Hi all,
I have the following question :
In my abap program u have the following:
data : WA_count type i.
select single * from nast where kappl = 'EV'.
after this statement is nast-anzal = 1 (type of nast-anzal is
DEC2).
wa_count = nast-anzal.
so far so good.
On my sapscript :
/: if &wa_count& = 1.
One
/: else.
Others
/: endif.
The word 'Others' is printed (i accept One ).
Its seems simple but i dont know what i do wrong.
I tried also with : if &nast=anzal& = 1 ('1' eq ..etc)
ThanksHi Adel,
Can you change your WA_COUNT declaration from type I to NAST-ANZAL type and try again.
DATA WA_COUNT TYPE NAST-ANZAL.
/: if &wa_count& = '1'.
One
/: else.
Others
/: endif.
Thanks,
Vinay -
A question on different zebra printer dpi printing - sapscript
Hello,
We have an existing sapsript (with ZPL code) to print label via a zebra printer (300dpi). There is a requirement to print
the same label on new device zebra QL 320 plus(wireless printer, 203 dpi).
Please advise how to make use of the existing sapscript to print to the wireless device without creating another sapscript(with different dpi).
existing 300dpi ZPL code in sapscript:
^FX
~DGR:ROHS.GRF,2222,22,jG0IFCI07LFCT07HFJ03HFJ07JFI07MFT03HFJ03HFJ0KF8H07MF8S03HFJ03HFI03KFEH07MFES03HFJ03HFI07LFH07NFS03HFJ03HFI0MF807NF8R03HFJ03HFI0MF807NFCR03HFJ03HFH01MFE07NFCR03HFJ03HFH03MFE07NFCR03HFJ03HFH03MFE07NFER03HFJ03HFH07NF07NFER03HFJ03HFH07HFC01IF07NFER03HFJ03HFH07HF801IF07FEI01IFR03HFJ03HFH07FEI07HF07FEJ0IFR03HFJ03HFH07FEI03HF87FEJ07HFR03HFJ03HFH07FEI03HF87FEJ07HFR03HFJ03HFH0HFCI01HF87FEJ07HF8I03HFEJ03HFJ03HFH0HFCI01HFC7FEJ03HF8I0JF8I03HFJ03HFH0HFCI01HFC7FEJ03HF8H01JFCI03HFJ03HFH0HFCJ0HFC7FEJ03HF8H03KFI03HFJ03HFH0HFCJ0HFC7FEJ03HF8H0LF8H03HFJ03HFH0HFEM07FEJ03HFI0LF8H03HFJ03HFH0HFEM07FEJ03HFH01LFEH03HFJ03HFH07HFM07FEJ07HFH03LFEH03HFJ03HFH07HFEL07FEJ07FEH07LFEH03OFH07IF8K07FEJ0HFEH07MFH03OFH07JF8J07FEI01HFEH0IFC1IFH03OFH07KF8I07FEI03HFEH0IFH07HF803OFH03KFEI07NFCH0HFEH03HF803OFH03LFCH07NFCH0HFEH03HFC03OFH01MFH07NFI0HFCH01HFC03OFI0MF807NFH01HFCI0HFC03OFI0MFE07MFEH01HF8I0HFC03OFI07MF07MFCH01HF8I0HFC03OFI01MF07NFH03HF8I0HFE03OFJ0MF87NFH03HFJ07FE03HFJ03HFJ01LFC7NF803HFJ07FE03HFJ03HFL0KFC7NFC03HFJ07FE03HFJ03HFL07JFC7NFC03HFJ07FE03HFJ03HFM07IFC7FEI0IFC03HFJ07FE03HFJ03HFM01IFE7FEI03HFE03HFJ07FE03HFJ03HFN03HFE7FEJ0HFE03HFJ07FE03HFJ03HFO0HFE7FEJ0HFE03HFJ07FE03HFJ03HFO0HFE7FEJ0HFE03HFJ07FE03HFJ03HF01H08J07FE7FEJ0HFE03HFJ07FE03HFJ03HF01HF8J07FE7FEJ07FE03HF8I0HFE03HFJ03HF01HF8J07FE7FEJ07FE03HF8I0HFC03HFJ03HF01HFCJ07FE7FEJ07FE01HF8I0HFC03HFJ03HF01HFCJ07FE7FEJ07FE01HFCI0HFC03HFJ03HF01HFEJ07FE7FEJ07FE01HFCH01HFC03HFJ03HFH0HFEJ0HFE7FEJ07FEH0HFCH03HFC03HFJ03HFH0HFEJ0HFC7FEJ07FEH0HFEH03HFC03HFJ03HFH0IFI01HFC7FEJ07FEH0IF807HF803HFJ03HFH07HFCH07HFC7FEJ07FEH07HFC1IFH03HFJ03HFH07IF01IFC7FEJ07FEH07MFH03HFJ03HFH07NFC7FEJ07FEH07MFH03HFJ03HFH03NF87FEJ07FEH03LFEH03HFJ03HFH03NF07FEJ07FEH01LFEH03HFJ03HFH01NF07FEJ07FEI0LF8H03HFJ03HFI0MFE07FEJ07FEI0LFI03HFJ03HFI07LFC07hHFE7gJFC7E3TFE7gJFC7E3TFE7gJFC7E3RF8FE7gJFC7E3RF8FE7gJFC7TF8FE7gJFC7TF8FE7gJFC7TF8FE7FC0IFC1JFC3FC3IFE1HFC7JF83JFC3HF8FE7FH03FEH03FE3H0FH0HF3803FC7E3FCH03FC6H0FC01E7CH01FCI0FE4H04H07F2H01FC7E3F8H01FC4H03C01E787F1FC7F0FE0FC0FC3F07F0FC7E3F8FE1FC1FC3F8FE78HF8F0HFC7E1FE1FE3F0HF8FC7E3F1HF8FC3FE3F8FE70HF8F0HFC7E1FE1FE1F0HFC7C7E3E1HF8FC3FE1F8FE71HFCF1HFC7E3FE1FE1F1HFC7C7E3JF8FC3HF1F8FE61IFE1HFE3E3FE3FE1F1HFC7C7E3JF0FC3HF1F8FE61IFE3HFE3E3FE3FE1F1HFC7C7E3HF8H0FC7HF1F8FE61IFE3HFE3E3FE3FE1F3HFC7C7E3FCI0FC7HF1F8FE61IFE3HFE3E3FE3FE1F3HFC7C7E3F01F8FC7HF1F8FE61IFE3HFE3E3FE3FE1F3HFC7C7E3E0HF8FC7HF1F8FE61IFE1HFE3E3FE3FE1F1HFC7C7E3E3HF8FC7HF1F8FE61HF8F1HFC7E3FE3FE1F1HFC7C7E3E3HF8FC7HF1F8FE71HF8F0HFC7E3FE3FE1F0HF87C7E3E3HF0FC7HF1F8FE70HF8F0HFC7E3FE3FE1F0HF8FC7E3E3FE0FC7HF1F8FE787E1FC7F0FE3FE3FE1F07F0FC7E3E1FC0FC7HF1F8FE7CH01FCI0FE3FE3FE1FI01FC7E3EI083C7HF1F81E7EH07FEH03FE3FE3FE1F1H07FC7E3F80383C7HF1FC1E7FH0IF807FE3FE3FE1F1807FC7E3F807C3C7HF1FC1E7YF1gHFE7YF1gHFE7YF1gHFE7YF1gHFE7YF1gHFEhJ07YF1gHFE7hHFE7hHFE7hHFE7hHFE
^XA
^PRC
^LH0,0^FS
^LL610
^MD0
^MMT
^MNY
^LH0,0^FS
^FO32,20^A0N,45,45^CI13^FR^FDPART #: 60000001^FS
^BY2,3.0^FO36,66^BCN,56,N,Y,N^FR^FD>:60000002^FS20000001
^FO709,74^A0N,45,45^CI13^FR^FDMSD: 60000003^FS20000002
^FO32,137^A0N,36,36^CI13^FR^FD60000004^FS
^FO32,183^A0N,36,36^CI13^FR^FDMPN: 60000005^FS30000001
^BY2,3.0^FO36,222^BCN,56,N,N,N,A^FR^FD60000006^FS
^FO32,293^A0N,36,36^CI13^FR^FDBATCH NO: 60000007^FS
^BY2,3.0^FO36,330^BCN,56,N,Y,N^FR^FD>:60000008^FS3000000230000003
^FO460,293^A0N,36,36^CI13^FR^FDD/CODE: 60000009^FS
^BY2,3.0^FO461,330^BCN,56,N,Y,N^FR^FD>:60000010^FS30000004
^BY42,42^FO750,300^BXN,5,200,0,0,1^FH\^FD60000011^FS30000005
^FO200,517^A0N,36,36^CI13^FR^FDCOO: 60000012 ^FS
^BY2,3.0^FO36,500^BCN,56,N,Y,N^FR^FD>:60000013^FS
^FO500,460^A0N,36,36^CI13^FR^FDQTY: 60000014^FS
^BY2,3.0^FO500,500^BCN,56,N,Y,N^FR^FD>:60000015^FS
^FO32,399^A0N,36,36^CI13^FR^FDSAP Doc: 60000016^FS20000003
^FO500,399^A0N,36,36^CI13^FR^FDV/CODE: 60000017^FS20000004
^BY2,3.0^FO36,432^BCN,56,N,Y,N^FR^FD>:60000018^FS
^FO30,566^ABN,25,15^CI0^FR^FDDate RECEIVED: 60000019 ^FS
^FO520,566^ABN,25,15^CI13^FR^FDUser:60000020^FS20000005
^FO713,455^FR^XGRoHs,1,1^FS20000006
^FO0,282^GB931,0,2^FS
^FO0,126^GB931,0,2^FS
^FO0,172^GB931,0,2^FS
^FO0,390^GB931,0,2^FS
^FO0,558^GB931,0,2^FS
^XZ
^FX End of job
^FX END OF FORMATHi,
You should generate a new label file and upload it to a new sapscript form as described in note #179534.
Regards,
Aidan -
Hi, everyone, a question about sapscript?
Hi, everyone,
My sapscript have one page and next page is the same as the first page, the page have two window, a var window and a main window, in the main window there is a command at the top that is "/: BOX FRAME 10 TW". and when I preview the form there is two page and in page 1 there is frame but the next page doesn't have frame, I don't know why, can anyone tell me why? thank you in advance!
Kind regards
Dawsonhi,
The box will not be carried by the main window to the other page this is because, the main window will be having the changing content, and as we define the main window only once the box appears only once. the remaining data in the main window will increase according to the content in it. so prepare your box in a variable window and define it in all the pages so your box will be coming in all the pages. overlay the variable window on the main window. with the same size..
you can refer to the link with same kind of query
[BOX IN SAP SCRIPTS|Re: sapscript box nto printed on all pages]
have a good day,
regards,
sarves -
SAPscript paragraph format question
I have a paragraph format called 'ZX' in first sapscript. I am able to enter into graphical PC editor in this sapscript. I am using this paragraph format while defining a address in one window.
I also have the same paragraph format 'ZX' in a second sapscript and using it for defining a address. When I tried entering into graphical PC editor for this second sapscript, it says 'Unknown paragraph format ZX' !
Is there any place where we have to assign paragraph format to the sapscripts? I am confused why this error is coming for the second sapscript.
Thanks in advance for your input,
KrishenI Guess You have to define the paragraph format for the second script in the second script only..I dont think you can use the pragraph format of one script in the other.
- Guru
Reward points for helpful answers -
Question reg. sapscript. please help
I am modifying a standard medruck sapscript form for the customer needs. Now on the printout, if i want the text under 'item_text' text element to come after the text under'ITEM_SCHEDULE' text element, where should I change the code? in main program ? or in form itself? Please give me an idea reg. this.
/E ITEM_TEXT
IC ,,&TTXIT-TDTEXT&
/: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE &
/E ITEM_SCHEDULE
IM ,,,,,,&RM06P-PRMG1&,,&T006A-MSEHT&,,&RM06P-PRITX& &RM06P-LFDAT&,,,,
= &RM06P-PHTXT(27)&
Thanks a lot,
KrishenYes it will, and yes you will have to copy a couple of things, first you will need to copy the driver, program SAPFM06P into custom program SAPFZM06P. Then copy function group MEDRUCK into ZMEDRUCK with all the function modules, then go to the SAPFZM06P program and copy the include program FM06PE02 into ZFM06PE02 and include this in the main program SAPFZM06P, inside the ZFM06PE02, change the call in the ENTRY_NEU form to call the "Z" version of your function module in the ZMEDRUCK function group.
form entry_neu using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
exporting
ix_nast = nast
ix_screen = ent_screen
importing
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
changing
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
<b>call function 'ZME_PRINT_PO'</b>
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
importing
ex_retco = ent_retco.
endform.
You must then change your configuration for the purchase order to tell the system to use the "Z" versions of the print program SAPFZM06P
Regards,
Rich Heilman -
Question reg. sapscript
I have two fields:
&EKPO-NETPR&
and
&EKPO-PEINH&
on a sapscript form main window. When I write in mainwindow:
&EKPO-NETPR&/&EKPO-PEINH&, it is expected on the output. For ex, if netpr is 50 and peinh is 1, the output has to show 50/1 whereas it is showing now
50/ 1
(I mean with spaces after that ' / ' ). What can I do to remove these spaces?
Thanks for your input.hi
tri this one
shift ekpo-peinh left deleting leading space.
regards
Usman -
Hi, i want to know if i have a program with print button, call a sapscript two times.
The first call for obtain the otf data and download to PC and the second call for show the print preview screen.
I tried to do the two activities at the same time.
itcpo-tdnoprev = ' '.
itcpo-TDGETOTF = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING form = tnapr-fonam
language = ekko-spras
options = itcpo
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = RESULT
RDI_RESULT =
TABLES
OTFDATA = DATAB[]
But it didn´t work, i got the otf data, but no print preview screen; so i suppose to call the sapscript two times will resolve my problem.
ThanksHi Jos,
No need of calling the sapscript two times...What you have declared is correct
itcpo-tdnoprev = ' '.
itcpo-TDGETOTF = 'X'.
[Converting SAP Script outputs to PDF file|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556]
Regards,
Sravanthi -
Hi Experts, a question about Account statement(sapscript)?
Hi Experts,
I am working on Account statement, I want to know what is the field for opening balance on the first date of the month, I have a structure(RF140) to use and I found there is final balance(rf140-datu2, rf140-saldo) used in the form, can anyone tell me what is opening balance and final balance? what are the corresponding fields? thank you in advance, thanks.
Kind regards
Dawson
Edited by: dawson wang on Jun 22, 2009 7:00 AMHi,
U can go to SE11 & give structure name RF140 & press display button. it displays all the fields in struture...
FYI...field name for Open balance is 'OPBETRAG' & for Final Balance is 'GSALDD'.
Hope it helps!!
Rgds,
Pavan -
Sapscript related question,
Hi all,
<b>
/: BOX XPOS 0 CH YPOS 0 LN WIDTH 72 CH HEIGHT 2 LN FRAME 10 TW
/: BOX XPOS 0 CH YPOS 0 LN WIDTH 28 CH HEIGHT 32 LN FRAME 10 TW
/: BOX XPOS 28 CH YPOS 0 LN WIDTH 12 CH HEIGHT 32 LN FRAME 10 TW
/: BOX XPOS 40 CH YPOS 0 LN WIDTH 14 CH HEIGHT 32 LN FRAME 10 TW
/: BOX XPOS 0 CH YPOS 0 LN WIDTH 72 CH HEIGHT 32 LN FRAME 10 TW
IB ,,Marka/Marks,,Miktar/Quantity,,Fiyat/Price,,Meblağ/Amount
</b>
The above box statements are written in the main window of the first page and main window starts from; Left: 4 ch, Upper 28 ln, Width: 74 ch, Height : 32 ln.
At first print there is no problem about the box, it starts from the main boundaries, however when second page needed, the boxes are located at the top of the page, not window.
There is just one page and it is first page, it uses it as needed.
Thanks.see in first page it will print defaultly .......
Are you writing it at the uppermost or the lowermost part with a text element..
but when it is the upcoming page .....
use /e ele before box and pass ele as parameter in write form
You can use the POSITION and SIZE commands to set default parmeters for a box.
Instead of:
/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MM INTENSITY 10 FRAME 0 TW
You can write:
/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
/: SIZE HEIGHT '2' MM WIDTH '76' MM
/: BOX FRAME 10 TW INTENSITY 10
This can be usefull if you gave several boxes that share the same parameters.
If you want to set the position realtively to the window use POSITION WINDOW
to set the position to the top/left start of the window. Then use POSITION
to set the current position relatively to the start of the Window.
Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
/: POSITION WINDOW
/: POSITION XORIGIN '5' MM YORIGIN '10' MM
the position is now 5 MM from the left and 10 MM from the top of the window
NOTE: After using the position command you can move the current position
realtively to the last used position
/: POSITION XORIGIN '10' MM YORIGIN '20' MM
Now the position will be X = 15 and Y = 30
Drawing a line. You can draw a line by setting the Height or Weidth to 0
and add a frane. E.g. a horizontal line:
/: SIZE HEIGHT '0' MM WIDTH '200' MM
/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100
You can check the &PAGE& variable, like this:
/: IF &PAGE& = 1
/: BOX on the first page
/: ELSE
/: BOX on the second page
/: ENDIF
reward points if helpful..........
Maybe you are looking for
-
Mapping conversion help needed for date
Hi Experts, I need help in message mapping convesion for date field The source date field can have value '2010-06-04T02:09:59.610-07:00' or 2010-06-04T02:09:60.610-07:00 I have to change it to '2010-06-04T02:09:59.000-07:00'. ie, if the seconds are 5
-
Unable to purchase January software update
I upgraded to 1.1.4 and got the prompt to purchase the upgrade, I clicked don't remind me at the time (by accident). Now I want to purchase it and I cannot find the buy button or does not show up when I repeat the steps outlined in the troubleshootin
-
IBP with ERP systems overview document
This document gives professors and overview of the IBP textbook and syllabus options.
-
Error through Remote Connection
Hi Experts, we have done crystal report add-on for our client in SAP b1 2007B. It is working fine in the client system. The same is not working when we are taking the REMOTE CONNECTION OF THE CLIENT SYSTEM. We are not able to identify the i
-
Dv6-6100 webcam device unplugged issue
hi there my webcam stop working suddenly and disappear from device manager and an intermitant issue of reistalling usb compsite device says that hp truevision hd device unplugged i check webcam by removing the lcd frame and found the plug was ok i wo