SAP Script - T&C on 2nd and last page based on company code
Hi Experts,
I have got a requirement from client to print the T&C page in PO script as 2nd page if company code is 1000 & it will be the 4th page if company code is 2000 (for rest it will be 2nd only).
I am not sure we can put some conditions through some code or not. if so then where to put such conditions and what will be the code.
Right not my pages are navigating as below:-
Page1 -> Terms
Terms -> Next
Next <> Next
Note: Next is for subsequent po items.
regards,
Nik
Hi Nikhil,
You could try using "Command" to place your logic on the page navigation based on the company code criteria.
Let us know in case you need further details from us.
Similar Messages
-
Gl a/c short and long text based on company code
Hello Friends,
In table skat the gl account description is given based on chart of accounts but what if i want the description based on company code.
I want the table where i can get the gl account description based on company code??
Pls suggest.
Regards,
SunnyHi,
you can look at the database view for requirement
GL_ACCT_CC_TEXT
regards\
Mahesh -
To convert Sap Script output to PDF format and send it via email.
Hi Friends,
Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
Thanks & Regards,
JohnPlese check this sample code from other thread.
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'. -
How to print header in first and last page only in SAPSCRIPT
Hi!
How to print header in first and last page only in SAPSCRIPT,
in between pages, I need to print all line items in MAIN window only .
Thanks in anticipation!
Aki.Hi All,
Thanks for your early update...but my requirement here is
I have two pages (FIRST , NEXT ) First is having Header, Main and Footer
NEXT is having Main and Footer ..I am printing PO here..let us think that my PO is having 20lines items , let us assume that it takes five pages...
Now how application is printing is ..first set of data is printing in FIRST page and remainiang data distributed to 4 pages printing in NEXT page ..but what my requirement is , I need fifth page print on FIRST page, instead of NEXT page... Ultimately I need last set of data always print in FIRST ie out of 5 pages 1st print on FIRST 2nd 3rd 4th print on NEXT and 5th print again on FIRST .
hope you this will clear you.
Thanks! -
Different Footer on First page and last pages
Hi
I am trying to display Continue on first page and middle pages and Total Amount on last page on a multipage PO. I can display different footer page for first page and last page but the middle pages don't have a footer. How to do this if possible. There are so many threads here but not one gives the exact steps.
first page header footer
Add Page Break
2nd page header footer
Add Section Break => Next Page
<?start@last-page-first:body?><?end body?>
last page footer
Please help
ThanksDid you miss this ?
http://winrichman.blogspot.com/search/label/different%20page%20header
http://winrichman.blogspot.com/search/label/element%20in%20header
http://winrichman.blogspot.com/search/label/diff%20header -
Problem regarding printing in first and last page of a form
I need to print a some text only in the first page and last page. I have defined a window to print this text. The number of pages that will be created is decided on run time. Can some body please help regarding this issue. I have tried to use SFSY-FORMPAGES to calculate total number of pages in the begining but it does not work
Edited by: subhajit bhadra on Feb 20, 2009 7:44 AMHi Badhra,
You can use conditions for that window or text element.
in conditions, tick 'only befor main window' forr header
and 'ONly after main window ' for footer.
Sunil -
IDCS3 Print Booklet - Image across first and last page
Does anyone know how I could place an image to be wrapped around the cover of a booklet? No problem on inside pages because they show as two page spreads but the first and last pages don't display as a two page spread.
Place it on the cover and stretch it out across what would be the back
cover if it were there.
Copy to clipboard and scroll to the last page. Edit>copy in place. Crop
to fit on back cover and front cover.
Bob -
IPhoto 11 Book 1st and last page errors
When previewing my completed book, the 1st and last page have white lines going through them.
How can i fix this so I can buy it.
ThanksBoot into Safe Mode and preview the book. If the first and last page photos are OK order the book from the Safe Mode. It's a problem others are having and worked around it with the Safe Mode boot.
Be sure to report it to Apple via http://www.apple.com/feedback/iphoto.html.
OT -
On the 2nd and 3rd page of my ipod touch, none of the apps.work. When you touch the screen, they start to "go" then return. This started today. I have reset the ipod, but this still happens. What do I do now?
Ahh, looks like I remembered correctly
To the OP:
This is directly from the KB article lllaass linked to:
3. Install another app from the App Store
If all user-installed apps are not launching, it could be an Apple ID authorization issue. Download and install an app that isn't already installed on your device to reset this information.
Note: If you have installed apps using multiple Apple ID accounts, you may need to perform this step for each account. -
Cost center validity change and assign it to new company code
Hello
We are having 10 Cost centers in 1000 Company code, And validity of these cost centers is .01.01.2001 to 31.12.9999.
Now business want to create one more company code 2000. and wants to extend these same cost centers to 2000 company code also. But as per SAP std Cost center extention is not possible , bcz cost center can use by only one company code.
Now Company is saying that..they wants the same number for new company code from 23.09.2010 to 31.12.9999..
system is not allow me to change validity period of these cost centers, bcz these saying that the cost center is already defined for given period.
Beacuse new company code will start working from 24.09.2010. so i,e the reason , we want to make example "2561 cost center validity 01.01.2001 to 22.09.2010 for company code 1000. then after words 23.09.2010 to 31.12.9999 the same cost center 2561 will for 2000 company code.
but system is not allowing me to change the validity
Regards
MaheshHi Mangesh
What you wish is not possible.. You will have to create new cost center and assign to the new company code...
may be for simplicity sake, you can add a prefix or suffix to the existing cost center no i.e Cost Ctr 2356 can become N2356 in new comp code
Regards
Ajay M -
Functional area and cost of sales accounting (company code 2000) active
Hi There!
I hope someone can help.
In our sandbox system, whenever I try to convert a Purchase requistion into a Purchase Order I get the following error message : "Functional area and cost of sales accounting (company code 2000) active".
Anyone know how I can resolve this issue?
Kind regards,
KarlHi,
Double click on the error message & check the message Number..
Then go to
Spro>MM>Pur
Attributes of system messages & change the Message from Error to Warning..
Thx
Raju -
Need to download the data from BSEG based on company code and fiscal year
Hi All,
Please suggest me the solution to download the data from BSEG based on company code and fiscal year. As data in BSEG for the fiscal year2009 is 27 lakhs (= 2.7 million) for the specified company code.
<removed>
Thanks & Regards,
Koti
Edited by: Thomas Zloch on Mar 26, 2010 4:28 PM - please use English metrics only!May I ask what you mean by solution? You can download from SE11, but where are you going to store 2.7 million rows and what tool are you going to use to store it?
You probably need a (small) program that extracts what you want, then opens a dataset in an appropiate server-system folder, and transfers the data rows to the dataset as fixed-length or tab-delimited file. It's been done many times, so suggest that you search. -
Access restriction in IM52 based on company code and investment reason
Hi,
How can we have access restriction in IM52 based on company code and investment reason?
thanks
Randeephi
please check the authorization object for the transaction
company code you can -
Footer on each pages and last page
I need to develop a template which has a header , body and footer. The Body has order lines. If the order lines exceeds the 1st page, it should overflow in the 2nd page , so the 1st page will have just signature as footer and 2nd page will have the main footer(which is shipping details). If the number of lines are just 5-6 then the main footer(shipping details) comes on the same page.
I am able to achieve this using <?start@last-page:body?><?end body?>.
The problem is if there are 8 lines, then still it prints all the 8 lines on 1st page and the 2nd page just shows the main footer at the bottom.
Is it possible for me to restrict the table in the body such that it shows only 6 lines at a time so that the overflow goes to the next page and it does not just show a blank page with only footer.
Please suggest
1. How can I restrict the height of the table in the body(number of row lines)
2. OR print the footer in all pages.
I need help urgently. Please help
Thanks,VidhyaYou can restrict number of row lines:
http://blogs.oracle.com/xmlpublisher/2007/03/anatomy_of_a_template_i_fixed.html -
How to report header and footers on first and last page only
Hi
We are trying to create a report that has a one data header on the first page and another header on subsequent pages then the data body then a footer section on the last page only. If we only have one page of data it works fine but when we move to multiple pages the data body section does not expand to fill the gap and we are left with second header but then a gap before the data.
We have tried to use anchors but are realy stuck. Any help would be greatly appreciated
IanSomething like:
LOOP AT t_output1.
WRITE:/1 vline,
2 t_output1-ktokd,
17 vline,
18 t_output1-kunnr,
29 vline,
30 t_output1-name1,
70 vline,
71 t_output1-katr1,
87 vline,
88 t_output1-land1,
96 vline,
97 t_output1-vkorg,
107 vline,
108 t_output1-kvgr1,
118 vline,
* DV4K934131-Start.
* 119 T_OUTPUT1-TTEXT,
120 t_output1-v_text,
* 150 VLINE.
255 vline.
* DV4K934131-End.
ENDLOOP.
WRITE:/1 sy-uline(255).
TOP-OF-PAGE.
IF p_upda = 'X'.
v_linsz = 255.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 vline,
2 text-h01, "'Sold to/Ship to'
17 vline,
18 text-h02, "'Customer#'
29 vline,
30 text-h03, "'Customer Name'
70 vline,
71 text-h04, "'Customer Status'
87 vline,
88 text-h05, "'Country'
96 vline,
97 text-h06, "'Sales Org.'
107 vline,
108 text-h07, "'EST Status',
118 vline,
119 text-h08, "'Change History',
* 150 VLINE.
255 vline.
FORMAT RESET.
WRITE:/1 sy-uline(255).
ENDIF.
Rob
Maybe you are looking for
-
As stated above, I've been at it all day "Turning my phone on and off, resetting my wifi (did it nine times), held the power button and home button (did that three times), made space (got 1.2GB left, and it's like around 600 or 500 Mb to install it.
-
I used the following query to select GID whose GEOM is within some distance from a point, circle, polygon and rectangle. It works well in 8.1.6 version. When I upgrade from 8.1.6 to 8.1.7, only rectangle one works and other shapes end with a message
-
Passing Parameters to a report query
I have built a report query, the query has 3 parameters. select * from EMP_DETAIL where emp=:EMPP and loc=:LOCP and seq=:SEQP When I test the query, enter the parameters manually, it renders and I get my report. When I add this layout to a standard o
-
Subroutine (perform) inside the include program
Hi all, i am writting a subroutine inside an include.include itself is present inside a subroutine. form x. include xyz. endform. inside this include, structure of program is like below. include xyx. perform y. perform z. form y. endform. form z. end
-
Ibooks and worldwide territory rights
I'm a published author and I have just submitted my book to itunes. I filled out all of the necessary information in itunes producer but I have one question. In the territory rights section, I don't see the option for worldwide rights? I only have in