SE78 - Sapscript / Smartform
Moved to correct forum by moderator
Ladies and Gentlemen,
I am investigating graphics upload into SAP for use in sapscripts / smartforms. The format that I am currently researching is TIFF. I have previously used SE78 and have had an option to upload a TIFF format graphic directly from the transaction, however on this 4.6C system I only get one type choice - BMP. Can SE78 be configured somewhere to allow other type uploads and if so where could I find such configuration screens?
Kind Regards,
Mantas
Edited by: Matt on Jan 13, 2009 3:32 PM
Method 1 If you are in 46c, there is a better method. Save your image in bmp or tiff. Upload using the se78->graphics->bma format. You can load the image as color or monochrome. once done there is undocumented sapscript command /:bitmap, using which it can be printed. See oss note 307414 for documentation of this command.
Method2 These are the steps to be followed for uploading graphics in R/3 system
1. First save the file as BMP
2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and
make it Zoom as 100% and save as *.TIFF
3. Open SE38 and execute program RSTXLDMC
4. Give your TIFF file path name
5. Select Bcol (for Color)
6. TEXT ID will be ZHEX-MACRO-*.
7. Inplace of * write your own logo name (ZCOMPANYLOGO)
8. Execute the program
9. Now Goto SE71 create your ZFORM
10. Create logo window
11. Goto text element of logo window
Method3
1. Goto SE71 Change the mode to GRAPHICAL
2. Choose the Graph Tabstrips
3. Now type in some name for the LOGO WINDOW
4. Press the IMPORT BUTTON (third button from left) and then IMPORT the BMP file from your DESKTOP
5. The code will be written automatically. You just need to drag and drop wherever you want
the graphics to be.
Similar Messages
-
Sapscript/Smartform via mail with PDF attachment: logo is missing
Hi all
I'm implementing my function to send Sapscript/smartform via mail.
I need to do it because when a message needs to be sent, I have to insert the message as attachment but also to add a text in the body mail.
So I've just created a simple sapscript having a logo (as graphic) and a little text.
I use the fm CONVERT_OTF to convert the OTF to PDF format and the following code to increase the pdf string from 132 to 255 char:
LOOP AT t_pdf.
TRANSLATE t_pdf USING ' ~'.
CONCATENATE l_buffer t_pdf INTO l_buffer.
ENDLOOP.
TRANSLATE l_buffer USING '~ '.
DO.
MOVE l_buffer TO l_attachment.
APPEND l_attachment TO x_attachment.
SHIFT l_buffer LEFT BY 255 PLACES.
IF l_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
All seem to work fine, but as soon as I open the pdf file attached to the mail I can't see the logo
So after calling fm CONVERT_OTF, I've created a pdf file by method GUI_DOWNLOAD, and then upload this file (by GUI_UPLOAD) into internal table for attachment and send the mail.
Now really all work very fine, becaus I can see the logo
Of course I don't want to dowload the file before sending a mail, but I need to send my print directly as pdf attachment
The two ways seem to be equal, they use the same print and the same functions, only the way to upload the internal table for attachment is different:
1) tha abap code above to expand the line from 132 to 255
2) the method GUI_UPLOAD
So something seems to be wrong in the first way because ithe logo is missing in the pdf attachment generated for the mail
MaxHi
I'm not working on unicode system, anyway I didn't see that parameter BIN_FILE, so I didn't use it
I've read the note 1324547 and I've done just as it explaines: now works fine
I don't know why it doesn't work with old manner (i.e data is treated as character-type), but it worls with the new one (If the data is treated as xstring-type)
I can only suppose the data are corrupted while being elaborated for expand to 255 char....but I don't why
Anyway your suggestion works for me
Thank
Max -
SAPScript/Smartform phase out
Is SAP planning to phase out SAPScript & Smartforms in near future? Kindly advise.
Thanks,
VivekHi,
Not sure but looks like. Also in my project we are moving to Adobe over smartforms.
Below link will be of some help
Re: What SAP recommends in ECC 6. Either SAPSCRIPT or SMARTFORMS?
Regards,
Vipul -
Print Currency as symbols in SAPSCRIPT/Smartforms
Hi all,
My customer want to print currency not as text but as symbols , for example "S" instead of "USD" .
Does somebody know how to make it?
Is there a dynamic solution ?
Best regards.Hi
U should check if in your system there's the currency symbol and if it supports it.
The other problem can be in the printer, it need to know if it can understand that symbol.
U can get all symbols available in your system from table TCP01.
Here the symbol corresponds to a number has to be used in the sapscript/smartform.
For example Euro sing is 156, so in the sapscript it need to insert <156>, the dollar shoul be 36, so <036>.
Anyway you can't be sure your device can print the symbol.
Max -
Rightfax commands in Sapscript/Smartforms
Hi,
We are using RIGHTFAX with SAP ECC 5.0 for fax sending functionality.
I have read all the threads related to RIGHTFAX functionality but would like to have answers for the following.
1) Where exactly in a SAPSCRIPT / SMARTFORM form do I add the fax control commands (FCL Commands)so that RIGHTFAX connector for SAP R/3 recognise them?
For eg: I want RIGHTFAX to include a particular cover sheet.For that I need to write the fax control command RFSAP_FCSFILE:file name. But where do I write that inside sapscript/smartform?
Thanks,
Bhaskar Pal.
This message is not answered.Somehow it is showing as being answered already. I would appreciate your help/input on this issue. Please respond.Hi. First try to set your post as unsolved. There should be a radiobutton on the left of your post to do so.
TO answer your questions, what you need to do is to create a page, this page will be printed first. Put your FCL commands in this page. When the document is send to the printer device(the one setup for RIGHTFAX), it will have this coding on the first page. Once it reaches RightFax, the software will recognize that there is FCL code on this page and will except it, get the values, apply them, and then it strips off this first page. This is good because we don't want the end user to see this anyway. So, create a page in your sapscript called FAXPAGE, put your commands in there and always start your printing at this page.
Regards,
RIch Heilman -
Standard sapscript / smartforms for GOODS RECEIPT
Hi,
Can anyone tell me standard sapscript / smartforms for GOODS RECEIPT
-JohnHere is your answer from NACE
Output type WF01 or WF02
Application ME
Program SAPM07DR
Form routine ENTRY_WF01 or WF02
Sap script: WE_FERT_VERS1 or VERS2 (this is for GR for prod. orders)
Or
Output type WE01 or WE02
Application ME
Program SAPM07DR
Form routine ENTRY_WE01 or WE02 or WE03
Sap script: WESCHEINVERS1 or VERS2 or VERS3 (this is for GR for normal purchase orders)
I would suggest you use the latest version. -
Standard SApScript / Smartform name for FB75 (credit memo) transaction
Need to know Standard SApScript / Smartform name for FB75 (credit memo) transaction..
hi
check SPRO>Financial Accounting>Accounts Receivable and Accounts
Payable>Customer Accounts>Line Items>Correspondence>Carry Out
and Check Settings for Correspondence
surya -
How to get (OAAD tcode) employee photo into sapscript / smartforms??
Hi!
I need to insert the employee photo jpeg (from oaad) into an sapscript or smartforms.
It's possible to do dynamically? (without file conversion)
ThanksHi,
I m providing u with this link, u may get some idea .
How to display the employee photo in a smartform
or
These are all the steps to upload the Photo.
1. Create a number range for SAP Archive Link :
IMG>Basis Components>Basis Services>SAP Archive Link>Basic Settings>Maintain number ranges.
Tcode: OANR
Create range 01 from 0000000001 to 9999999999 without the external number flag.
2. Document type HRICOLFOTO must exist with document class JPG.
IMG>Basis Components>Basis Services>SAP Archive Link>System Settings>Maintain document types.
Table: TOAVE
Tcode: OAC2
3. Document type HRICOLFOTO must be linked to object type PREL and IT0002.
IMG>Personnel Management>Personnel Administration>Tools>Optical Archiving>Set up Optical Archiving in HR.
View: V_T585O,
In all three columns there are minuses, don't put a flag in the check box.
4. Check which content repository (Archive) is linked to document type HRICOLFOTO and object type PREL.
IMG>Basis Components>Basis Services>SAP Archive Link>Basic Settings>Maintain Links.
Table: TOAOM_C,
Tcode: OAC3
5. Create this content repository with storage type FILE archive.
IMG>Basis Components>Basis Services>SAP Archive Link>Basic Settings>Maintain content repositories.
Tcode: OAC0
Storage type FILE archive can be attained by clicking on the field Storage type and clicking somewhere else in the screen with the right mouse button. Choose Possible entries and only then you get a list of all values. FILE Archive is entry number 08. Choose Version no. 0031 and Archive path something (e.g. C .
6. Link photo to personnel number.
Menu>Tools>Business Documents>Miscellaneous>Stored Documents.
Tcode: OAAD
Thanks,
Mamta Kumari -
SAPSCRIPT,SMARTFORMS,PDFFORMS
Hi SDN Friends!
I had this question.
Given a SAP Script or SMART Form ... how do we identify (table names?)
The Print program associated with them? Also, how does that concept differ from PDF forms?
Any body can answer please........
Markivhi,
Interactive Forms based on Adobe software is SAP's new solution for forms development. Its first release has the focus on interactive use of forms. High-volume printing is supported in principle, but - being a new solution - the performance has not yet reached the same level as Smart Forms or SAPscript, two established solutions that had years to grow. Interactive Forms is the only solution that will continue to be enhanced with new features, while SAPscript and Smart Forms will be supported without limitations.
When (or if) to move to Interactive Forms depends on your requirements. For interactive forms usage, i.e. the new functions, you have no choice, as the existing solutions don't support it. High-volume print scenarios need to be carefully analyzed to see whether your concrete requirements can be met at this point.
However, it is possible to move to Smart Forms and design your forms in such a way that a migration at any point in the future would be but a small step. Smart Forms offers from Web AS 6.40 a migration wizard to Interactive Forms. Technically, everything can be migrated, but we recommend against things like ABAP program nodes, for example.
You are not forced to ever go to Interactive Forms if you don't want to. It really depends on whether your client needs any of the new features in Interactive Forms. Also, if they are currently working with JetForms, they could enquire with Adobe directly what migration path they offer to the joint solution.
It is impossible to make a blanket statement on what needs to be done in each of the applications using a form for output. Despite the same underlying technology, forms handling has always been a decision for each SAP application: Some do it through customizing, some through coding, some in yet anither way.
What I CAN say from a technology pespective is that all applications are in the process of creating their forms based on Interactive Forms so that by 2007 pretty much all SAP forms will be PDF-based. Obviously, each application does it within the framework of their application - but they all use Interactive Forms.
By the way, be aware that in ERP 2004 this forms solution is subject to a limitation for high-volume printing scenarios as we cannot ensure that ALL customers will be content with the performance in ALL scenarios with this release. (see SAP Note 863893).
creating :
To get an overview idea about Adobe forms ,
Using SFP , first you need to create a interface . in interface you can declare the import and export parameters and also the declaration part, coding etc : This is nothing but similar to Function module interface.
And now we have to create the Form which is interactive. Create the form and enter the interface name which you have created in first step, so that the parameters , declarations of fields etc : will be copied and available in the form layout. So that you can drag and drop these declared fields ( dclared fields of interface ) to the layout.
Create the context and layout in the form.
The layout generated can be previewed and saved as PDF output.
Now we need to integrate the driver program and the PDF form to get the final output as per the requirement.
On activating and executing the form you will get a function module name just similar to smartforms.
The driver program needs to call this FM.
Refer to the below sample code :
DATA : is_customer TYPE scustom.
DATA : it_bookings TYPE ty_bookings.
DATA : iv_image_url TYPE string.
DATA : iv_sending_country TYPE adrc-country.
DATA : it_sums TYPE TABLE OF flprice_t.
DATA : docparams TYPE sfpdocparams.
DATA : formoutput TYPE fpformoutput.
DATA : outputparams TYPE sfpoutputparams.
PARAMETERS : pa_cusid TYPE scustom-id.
SELECT SINGLE * FROM scustom INTO is_customer
WHERE id = pa_cusid.
SELECT * FROM sbook
INTO CORRESPONDING FIELDS OF TABLE it_bookings
WHERE customid = pa_cusid.
outputparams-nodialog = 'X'.
outputparams-getpdf = 'X'.
*outputparams-adstrlevel = '02'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 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.
docparams-langu = 'E'.
docparams-country = 'US'.
docparams-fillable = 'X'.
CALL FUNCTION '/1BCDWB/SM00000043'
EXPORTING
/1bcdwb/docparams = docparams
is_customer = is_customer
it_bookings = it_bookings
IV_IMAGE_URL =
iv_sending_country = 'US'
IT_SUMS =
IMPORTING
/1bcdwb/formoutput = formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
E_RESULT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
use link
http://help.sap.com/saphelp_nw04/helpdata/en/d2/4a94696de6429cada345c12098b009/frameset.htm
regards,
Prabhu
reward if it is helpful -
SAPScript / SmartForm - 2 Forms & 2 Printer
Hi All,
I have a requirement as below. Please suggest me a suitable solution.
1. The SAP Standard Program calls the Form. The Standard Form is modified to accommodate the client specific changes and added in Customization.
2. If the numbers of pages to be printed is with in one page, Form1 to be used to print the same using Printer A for printing this Form1.
2. If the numbers of pages to be printed are more than one page, Form2 to be used to print the same using Printer B for printing Form2.
3. Form1 and Form2 have different page windows. That is, both First page and Next page are of different Format for both the Forms.
Please write to me,
1. Is it possible to accommodate the above requirement in SAPScript?
1. Is it possible to accommodate the above requirement in SmartForm?
Thanks in Advance,
KannanHello
Do you want to know the idea how find out which form should be called depending of number of pages?
But the question is:
How do you count number of pages ? Usually it's not possible to know that at program running.
Do you count the number of positions? it is not save but it could be use... in the worst case...
What would I do I would use surely ONLY smartform
if I do not want to change Standard program.
You can use in Smartform - COMMAND placed within MAIN Window of First page and with it control the flow of pages withouth any small change done in a Sap Standard Program.
With Command included in MAIN Window you can jump to the diffrent pages.
I think it is complicated but possible to manage...
I have a lot of experience in creating strange
Smartform Flows...
Try to create:
4 Pages
FIRST1 (Next page parked as Next1)
NEXT1 (Next page marked as Next1)
FIRST2 (Next page parked as Next2)
NEXT2 (Next page marked as Next2)
(All of them has the same MAIN window
and in that MAIN window depending on condition use
COMMAND at the beggining and jumb to the
requested PAGE accoring to condition
either FIRST1 or FIRST2)
You must try it and I cannot 100% assure you that it works
Create a simple Smartform and try to test it.
But I have no IDEA how to force printing it on diffrent printers... on diffrent trays it is possible but printers I have no idea...
Greetings
Bogusia [email protected] -
Sapscript & smartform upgrade issue
Can anyone please let me know the issues faced while upgrading sapscript and smartform in documents like purcchase order,sales order and invoice.
Hi Ch@ndr@,
This seems a strange problem. It is possible that this is simply a problem with the Sapscript buffers. Can you run the report RSTXDELL on the system to clear the Sapscript buffers?
To do this you can use RSTXDELL report with default settings except it is better to have * instead of the current client number in the Client field.
After this, create a new spool and see if the problem is resolved? It will not work to reprint an old spool as the print data is already incorrect.
Regards,
Aidan -
Change the transport package of a SAPScript, Smartform
Hi!
There are several SAPScripts and Smartforms in our system, which is assigned to a transport package Z1, which points to nowhere, so it's just a technical, local package.
Now the basis team set up a new system, and there is a new package Z2, which points to this new system.
So I would like to assign the object from Z1 to Z2 package.
Within a program it could be easily changed.
How can I change it in a SAPScript or within a Smartform?
Thank you
Tamá> How can I change it in a SAPScript or within a Smartform?
>
for smartforms
in the smartforms transaction
enter the formname which you want to change , and from menu Goto->Object Directory Entry , now you can edit the package , using the change mode option.
For script.
go to Transaction SE03
Now you can see Object Directory entry option, press the change button.
(change object Directory entries)
Enter FORM in the input for object type, it comes in this way, now check the checkbox.
check RETR FORM <formname>
press F8,
Now you will see the option to change the Directory entry in the result screen. -
Hi All
I am totally new in this field and at present m on training.
i wann study SAPscript and Smartforms.
Can anybody suggest me how to proceed or how to start as at present i don know anything about SAPscript and smartforms
Thanks in advanceHi
As per your question suggest you need some practical classes to know smthing about sapscript and smartforms.
Anyway if you have SAP at your home or institute you follow this process.
SAP SCRIPT
1- GO TO SE71
2- Set the Character format
3- Set the paragraph format
4- Open the layout set.
5- Design the form as per your requirements.
Main window
Constant Window
Variable Window
6-go to se38
7- write a driver program
8- use the minimum function module of the sap script
OPEN_FORM
WRITE_FORM
CLOSE_FORM.
Here is a driver program you can use this for your reference
============
*& Report ZTRIPATHY_SCRIPT *
REPORT ZTRIPATHY_SCRIPT .
TABLES: ZSCRIPT_TAB.
data: itab type standard table of ZSCRIPT_TAB with header line.
select * from ZSCRIPT_TAB into corresponding fields of table itab.
DATA: VALUE TYPE I.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZPS_MROF1'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEXT1'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at itab.
VALUE = VALUE + ITAB-MY_INCOME.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEXT2'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endloop.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEXT3'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-PAGE'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 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.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 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.
*FORM ADD_INCOME USING INCOME TYPE ZSHAIL_TAB1-MY_INCOME CHANGING VAL.
*VAL = VAL + INCOME.
*ENDFORM.
SMARTFORMS
1-GO SMARTFORM TCODE
2-GIVE THE APPROPRIATE DATA IN THE
Form attributes
Form interface
Global Definition
3- Use the windows,tables,texts as per your requirements.
4-go to se38
5-write the driver program
here i am giving a sample driver program you can follow this
TABLES : vbrk,
vbrp,
kna1.
TYPES : BEGIN OF t_vbrk,
vbeln TYPE vbrk-vbeln,
fkart TYPE vbrk-fkart,
kunag TYPE vbrk-kunag,
END OF t_vbrk.
TYPES : BEGIN OF t_vbrp,
vbeln TYPE vbrp-vbeln,
fkimg TYPE vbrp-fkimg,
cmpre TYPE vbrp-cmpre,
netwr TYPE vbrp-netwr,
END OF t_vbrp.
TYPES : BEGIN OF t_kna1,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
adrnr TYPE kna1-adrnr,
ort01 TYPE kna1-ort01,
pstlz TYPE kna1-pstlz,
regio TYPE kna1-regio,
END OF t_kna1.
TYPES : BEGIN OF t_final.
INCLUDE STRUCTURE ZINVOICE.
vbeln TYPE vbrk-vbeln,
fkart TYPE vbrk-fkart,
kunag TYPE vbrk-kunag,
fkimg TYPE vbrp-fkimg,
cmpre TYPE vbrp-cmpre,
netwr TYPE vbrp-netwr,
name1 TYPE kna1-name1,
adrnr TYPE kna1-adrnr,
ort01 TYPE kna1-ort01,
pstlz TYPE kna1-pstlz,
regio TYPE kna1-regio,
types: END OF t_final.
DATA : i_vbrk TYPE TABLE OF t_vbrk,
i_vbrp TYPE TABLE OF t_vbrp,
i_kna1 TYPE TABLE OF t_kna1,
i_final TYPE TABLE OF t_final.
data : v_fnam type rs38l_fnam.
DATA : wa_vbrk TYPE t_vbrk,
wa_vbrp TYPE t_vbrp,
wa_kna1 TYPE t_kna1,
wa_final TYPE t_final.
*START-OF-SELECTION
SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln.
START-OF-SELECTION.
SELECT vbeln
fkart
kunag
INTO TABLE i_vbrk FROM vbrk
WHERE vbeln IN s_vbeln.
SELECT vbeln
fkimg
cmpre
netwr
INTO TABLE i_vbrp FROM vbrp
FOR ALL ENTRIES IN i_vbrk
WHERE vbeln = i_vbrk-vbeln.
SELECT kunnr
name1
adrnr
ort01
pstlz
regio
INTO TABLE i_kna1 FROM kna1
FOR ALL ENTRIES IN i_vbrk
WHERE kunnr = i_vbrk-kunag.
LOOP AT i_vbrk INTO wa_vbrk.
wa_final-vbeln = wa_vbrk-vbeln.
wa_final-fkart = wa_vbrk-fkart.
wa_final-kunag = wa_vbrk-kunag.
LOOP AT i_vbrp INTO wa_vbrp WHERE vbeln = wa_vbrk-vbeln.
wa_final-fkimg = wa_vbrp-fkimg.
wa_final-cmpre = wa_vbrp-cmpre.
wa_final-netwr = wa_vbrp-netwr.
ENDLOOP.
LOOP AT i_kna1 INTO wa_kna1 WHERE kunnr = wa_vbrk-kunag.
wa_final-name1 = wa_kna1-name1.
wa_final-adrnr = wa_kna1-adrnr.
wa_final-ort01 = wa_kna1-ort01.
wa_final-pstlz = wa_kna1-pstlz.
wa_final-regio = wa_kna1-regio.
ENDLOOP.
APPEND wa_final TO i_final.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZINVOICE_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = V_FNAM
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.
CALL FUNCTION V_FNAM
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
i_final = i_final.
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 hope this will help you to solve your problem
Thanks
Mrutyunjaya Tripathy -
Pls explain how to add standard text in sapscript & smartforms
Dear friends,
pls explain how to implement standard text into sap script and smartforms.
in how many we can do.
and what is diff between include text & text modules in smartforms.
how we can translate into multiple languages.
Regards
Jagadeeshwar.Bhi,
for the include text goto tcode so10.
for changing the smartform and scripts use there methods..
1. goto se63>translation->abap objects->other long texts->FS Forms and Styles---> for scripts use Forms
for smartforsm use SAPSmart form
for styles use Styles
2. goto se71->utilities->original language.---> source lang
(for scripts) target lang
to include the include text created in the tcode so10 in the smartforms go to general attributes of the text element--text type> include text...
regards,
venkat.
Edited by: venkat appikonda on Mar 22, 2008 11:56 AM -
Conversion of sapscripts/smartforms to PDf format
i want to use the standard program RSTXPDFT4 for converting into pdf format. but i want a way in which the spool number is automatically generated for the current script or smartform opened instead of the manual entry of the spool number by the user.
hi bhaskar,
this sample code may help u to convert smartforms to pdf.
report ztest_smartforms_to_pdf
DATA : FM_NAME TYPE RS38L_FNAM,
IT_VENDOR LIKE TABLE OF ZVENDOR,
IT_MATERIAL LIKE TABLE OF ZMATERIAL,
IT_PO LIKE TABLE OF ZPURCHASEORDER.
DATA: CTRLPARAMS TYPE SSFCTRLOP,
JOBOUTPUT TYPE SSFCRESCL,
TLINES LIKE TABLE OF TLINE,
IT_FILETABLE LIKE TABLE OF FILE_TABLE WITH HEADER LINE,
FNAME TYPE STRING,
RC TYPE I,
BIN_SIZE TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSSF_PURCHASEORDER'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME.
CTRLPARAMS-GETOTF = 'X'.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = CTRLPARAMS
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = JOBOUTPUT
JOB_OUTPUT_OPTIONS =
TABLES
IT_VENDOR = IT_VENDOR
IT_PO = IT_PO
IT_MATERIAL = IT_MATERIAL.
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.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
IMPORTING
BIN_FILESIZE = BIN_SIZE
TABLES
OTF = JOBOUTPUT-OTFDATA
LINES = TLINES
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'ENTER A FILENAME'
DEFAULT_FILENAME = 'REPORT.PDF'
FILE_FILTER = '*.PDF'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILE_TABLE = IT_FILETABLE[]
RC = RC.
LOOP AT IT_FILETABLE.
FNAME = IT_FILETABLE-FILENAME.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = BIN_SIZE
FILENAME = FNAME
FILETYPE = 'BIN'
TABLES
DATA_TAB = tlines.
Maybe you are looking for
-
Parallel How many times user can login to the SAP system through ITS
Hello all We are using the ITS ---620 and following 46D R/3 system R/3 system details: Kernal : kernel release :46D O/S :SunOS 5.8 Generic_108528-05 sun4us We would like to now, At a time How many times user can login to the SAP system through ITS K
-
Gathering statistics in 8.1.7.4
Hi I 10g there is a default job to collect statistics can somebody refer me to code that can do the same on 8.1.7.4 in 8.1.7.4 also is the "bytes" column in the dba_tables is updated automatically , when rows inserted and deleted. or we need to dbms_
-
i recently updated my old nokia 5800 to version 60.all was good but every time i play video on it lags a lot for 2min i request u to see the prob. Regards simrat
-
Oracle support for Weblogic 7 under LINUX
Hi, Does anyone know what happened to oracle support in weblogic 7.0 for linux platform, as it seems that the drivers are not included? Are there any discussions on that topic anywhere? thanks. Zlatko
-
Have 2010 Excel Workbook with Named Tables and child Pivot Tables and several other support sheets. I want to make a 'working' file -- with only copies of these Named Tables and Pivot Table structures, and then I would populate the copied Tab