Subroutine call from SAP Script
Hi,
I need to calculate required/outstanding qty. hence am passing existing values of reservation#/item# and issued qty.
both req/out qty are returned blank by the code. please help.
Following is my code segment for a external routine call from SAP Script.
/: PERFORM P_GET_QTY IN PROGRAM ZTEST
/: USING &MSEG-RSNUM&
/: USING &MSEG-RSPOS&
/: CHANGING &REQ_QTY&
/: CHANGING &MSEG-MENGE&
/: CHANGING &OUT_QTY&
/: ENDPERFORM
REPORT ztest .
TABLES resb.
DATA: wa_resb TYPE resb,
req_qty TYPE resb-bdmng,
isd_qty TYPE mseg-menge,
out_qty TYPE resb-bdmng.
FORM p_get_qty TABLES input STRUCTURE itcsy
output STRUCTURE itcsy.
DATA: avlbl TYPE resb-bdmng.
READ TABLE input WITH KEY 'MSEG-RSNUM'.
CHECK sy-subrc = 0.
wa_resb-rsnum = input-value.
READ TABLE input WITH KEY 'MSEG-RSPOS'.
CHECK sy-subrc = 0.
wa_resb-rspos = input-value.
READ TABLE input WITH KEY 'REQ_QTY'.
CHECK sy-subrc = 0.
req_qty = input-value.
READ TABLE input WITH KEY 'MSEG-MENGE'.
CHECK sy-subrc = 0.
isd_qty = input-value.
SELECT SINGLE * INTO wa_resb
FROM resb
WHERE rsnum = wa_resb-rsnum
AND rspos = wa_resb-rspos.
CHECK sy-subrc = 0.
avlbl = wa_resb-bdmng - wa_resb-enmng.
req_qty = avlbl - out_qty.
out_qty = req_qty - isd_qty.
output-name = 'REQ_QTY'.
output-value = req_qty.
MODIFY output TRANSPORTING name value WHERE name = 'REQ_QTY'.
APPEND output.
output-name = 'OUT_QTY'.
output-value = out_qty.
MODIFY output TRANSPORTING name value WHERE name = 'OUT_QTY'.
APPEND output.
ENDFORM.
Thanks,
Ram.
Hi Ram,
I think you have to use MODIFY instead of append for the OUTPUT table.
MOdify the table with KEY. This should resolve the problem.
Ram, you can check this code and see how the MODIFY is to be used.
REPORT YLSD999A.
DATA W_LENGTH TYPE I.
* GENERAL PURPOSE SUBROUTINES FOR CALLING FROM SAPSCRIPTS
FORM DISPLAY_POUND TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
DATA: COUNT TYPE P VALUE 16.
DATA: W_VALUE(17) TYPE C. "defined as 7 chars to remove pence
DATA: W_CHAR TYPE C.
DATA: W_DUMMY TYPE C.
DATA: W_CURR(3) TYPE C.
* Get first parameter in input table.
READ TABLE IN_TAB INDEX 1.
WRITE IN_TAB-VALUE TO W_VALUE .
* get second parameter in input table
READ TABLE IN_TAB INDEX 2.
MOVE IN_TAB-VALUE TO W_CURR.
IF W_CURR = 'GBP'.
W_CURR = '£'.
ENDIF.
W_LENGTH = STRLEN( W_CURR ).
* look for first space starting at right.
WHILE COUNT > -1.
W_CHAR = W_VALUE+COUNT(1).
* W_CHAR = IN_TAB-VALUE+COUNT(1).
IF W_CHAR = ' '.
COUNT = COUNT - W_LENGTH + 1.
W_VALUE+COUNT(W_LENGTH) = W_CURR.
COUNT = -1.
ELSE.
* W_VALUE+COUNT(1) = W_CHAR.
COUNT = COUNT - 1.
ENDIF.
ENDWHILE.
* read only parameter in output table
READ TABLE OUT_TAB INDEX 1.
OUT_TAB-VALUE = W_VALUE.
MODIFY OUT_TAB INDEX SY-TABIX.
ENDFORM.
Cheers
VJ
Similar Messages
-
How to call a subroutine from sap script
hi friends,
Can anybody tell me How to call a subroutine from sap script .
thanks n regards .
Maheshhi..
Calling ABAP Subroutines: PERFORM
You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (First page, Next page, Last page) is printed as local variable symbol.
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
regards,
veeresh -
Is it possible to can a program (report output) from SAP Script?
Hi,
From SAP Script I would like to call a report output (without displaying the selection screen).
Is this possible. If so, how can I do this?
Thanks.H i kumar g,
why not?
In script you can call external subroutine. You must define the subroutine in a program, there you can do a SUBMIT or whatever you want.
See online docu for further explanation.
Regards,
Clemens -
How can i debug a rfc being called from sap
hello Gurus,
We made a RFC call from SAP r3 to sap grc nfe......we did not receive any data in sap grc .......we go to SM58 and there it gives
the message "Name or password is incorrect (repeat logon)u201D.
How can i find out where the data has stuck.
Please help.
BR
HoneyHI,
please have a look at the link below..
this may help u !!!
[Re: how can i debug a rfc being called from .net connector (NCO) v2.0?;
Best of Luck !!1
Regards
Ravi -
Creating an RDI file from SAP script
Hello All,
I would like to create an RDI file from SAP Script.
Please can anyone let me know how do we do it programmatically.
I am aware of the option of setting RDI parameter to 'X'.
However my requirement is to allow user to have a print preview option and simulatenously create RDI file .
Thanks and Regards
AmrutaSee:
http://discussions.apple.com/message.jspa?messageID=11535851#11535851 -
How to pass tables data from SAP script to the routine.
Hi,
I have standard program RPCTEAL0_01 which calls a SAP script form(Custom) to print the form.
Now I have to add some additional functionality to change the values in the form. Since it is custom form I can add ROUTINE and then pass the values to the custom program to modify the variables.
My concern here, I would like to pass the tables like RT,CRT to the custom program via form.
Is this possible? RT and CRT filled by standard progam.
Regarsd
Eswar
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jan 20, 2009 9:06 AMHi, The suggested option is not working.
Actually I am using the below code in SCRIPT
/: PERFORM CAL_2008 IN PROGRAM ZHR_TEST1
/: USING &PER_NO&
/: CHANGING &W12&
/: ENDPERFORM
and calling form in ZHR_TEST1. But this will pass only variables. Now my requirement is to pass tables also. -
Invoke MII Transaction thru RFC Call from SAP
Hi,
We want to get the data from Oracle DB table thru MII (12.0.2).
We need to use RFC call from SAP to MII.
Is it possible to invoke the MII transaction thru RFC by setting in Message Listener?
We have used iDoc messages but not tried with RFC.
How to do that?
Regards,
SenthilI feel MII doesn't have anything equivalent to RFC in ECC. You may try web services in an ABAP program
Hope the article below helps you
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9f101377-0c01-0010-269f-c3ee905d583b&overridelayout=true
Regards,
Musarrat -
UCCE: Forceful Release an Agent Call from ICM Script, Can I?
Hi, let me explain the requirement first. Customer wants to make their IVR free of cost but they want to start billing only when the call is landed to skill group/agent. So far I can think to make it possible by triggering their billing server by ODBC gateway through Application Gateway process. But also the customer wants to release that particular call when that pre-paid caller is out of charge. They might trigger one of my application or can modify any particular database field and put the calling# into there and my task would be release that call.
I have thought an idea to develop a TCL script run into the voice gateways and release the call from there by searching the particular call with calling#, but I do not know TCL scripting or any idea how to develope TCL , can't I release that call from ICM script? Do I have any control on calls from ICM when the call is landed and connected to agent?
Any help would be hightly appreciated.That's a nasty piece of work. Just imagine how jacked off you would be if you are the customer, you have enough in your bank account to get to an agent who is then starting to help you, and in the middle of your conversation you are simply cut off!
I don't think it's possible - although CVP would be your best shot because of the switch leg.
But not only that, I don't think it is desirable. If you check the customer's balance before going to an agent, that should be sufficient. Anything else is just terrible customer service.
Regards,
Geoff -
Covesion from sap scripts to smart forms
hi everybody
I want covert from sap scripts to smartform,There are already develoepd scipts in my development system.my requirement is to covert to smartfomr,how can we do that..
Regards
madhooHi,
Goto SMARTFORMS and name your smartform. Dont press Create Button.
Now follow the path. GOTO -> Migrate SAP Script form.
You will get a pop-up window to enter the name of SAPscript from which you would like to migrate and choose language and then press enter.
Also, have alook at the following link
http://help.sap.com/saphelp_nw04/helpdata/en/9d/9599386185c064e10000009b38f8cf/frameset.htm
The specified item was not found.
Migrating SAPscript print program to Smartform
Smartforms -> sapscript
Re: Convert SapScript to Smartforms ?
Hope this helps.
Regards,
Richa -
Calling subroutine from SAP script
I am using the below code within my SAP script form that prints GR/GI Slips but its not working. And the only way I can issue the output is from MB02 whcih doesn't seem to allow to call the debuger, so I'm at a lost as to what to do.
Code in SAP script
/: PERFORM GET_BINS IN PROGRAM ZMM_SAPSCRIPT_FORMS
USING &MSEG-MATNR&
/: USING &MSEG-LGNUM&
/: CHANGING &MABDR-LGPBE&
/: ENDPERFORM
CODE from my subroutine program:
FORM get_bins TABLES input_table STRUCTURE itcsy
output_table STRUCTURE itcsy.
DATA: lc_matnr TYPE matnr,
lc_lgnum TYPE lgnum,
lc_lgpla TYPE lgpla,
lc_index TYPE sy-tabix.
* Material no
READ TABLE input_table WITH KEY name = 'MSEG-MATNR'.
MOVE input_table-value TO lc_matnr.
* Warehouse number
READ TABLE input_table WITH KEY name = 'MSEG-LGNUM'.
MOVE input_table-value TO lc_lgnum.
* Get BIN
SELECT SINGLE lgpla INTO lc_lgpla
FROM mlgt
WHERE matnr = lc_matnr
AND lgnum = 'CPT' "lc_lgnum
AND lgtyp = '001'.
IF sy-subrc = 0.
READ TABLE output_table WITH KEY name = 'MABDR-LGPBE'.
lc_index = sy-tabix.
MOVE lc_lgpla TO output_table-value.
MODIFY output_table INDEX lc_index.
ENDIF./: PERFORM GET_BINS IN PROGRAM ZMM_SAPSCRIPT_FORMS
/: USING &MSEG-MATNR&
/: USING &MSEG-LGNUM&
/: CHANGING &MABDR-LGPBE&
/: ENDPERFORM
FORM get_bins TABLES input_table STRUCTURE itcsy
output_table STRUCTURE itcsy.
DATA: lc_matnr TYPE matnr,
lc_lgnum TYPE lgnum,
lc_lgpla TYPE lgpla,
lc_index TYPE sy-tabix.
Material no
READ TABLE input_table WITH KEY name = 'MSEG-MATNR'.
MOVE input_table-value TO lc_matnr.
Warehouse number
READ TABLE input_table WITH KEY name = 'MSEG-LGNUM'.
MOVE input_table-value TO lc_lgnum.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = lc_matnr
IMPORTING
OUTPUT = lc_matnr .
Get BIN
SELECT SINGLE lgpla INTO lc_lgpla
FROM mlgt
WHERE matnr = lc_matnr
AND lgnum = 'CPT' "lc_lgnum
AND lgtyp = '001'.
IF sy-subrc = 0.
READ TABLE output_table WITH KEY name = 'MABDR-LGPBE'.
lc_index = sy-tabix.
MOVE lc_lgpla TO output_table-value.
MODIFY output_table TRANSPORTING VALUE WHERE NAME = 'MABDR-LGPBE'.
ENDIF. -
How to Print form using SAP Smart Forms which is migrated from SAP Script?
Hello every one,
i have a problem in printing form using smart form which is migrate from the SAP Script...so what method i have to use...if any one know the solution for this than plz reply me as soon as possible...hi
when ever u want to migrate the script to smartform u have to chage the driver program also..
refere this link to convert script to smartform
convert sapscript to smartform
c_formname = u r smartform name...
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
...........................CALL SMARTFORM............................
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
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. -
ABAP QUERY PROGRAM OUTPUT SHOULD DISPLAY FROM SAP SCRIPT.
THIS IS MY URGENT REQUIREMENT ...
I DONT KNOW ABAP QUERY PROGRAM ..
PLEASE SUGGEST ME A WAY ON THIS ....
Functional requirements
Introduction
The wish of the customer is a printable customer overview. All desired fields will be shown in a new query called ZZADDRSS_CO. Double entries are taken for granted because of the data taken from the sales area and because of multiple contact persons. The customer accepts this. It should be made possible that the user creates and saves its own variant.
A second overview is needed, another ABAP will be developed for this requirement. This ABAP will show all the customer data and this list will have the possibility to be printed.
Solution
New Query ZZADDRESS_CO
The desired fields of attachment 1 need to be shown in the query.
The selection criteria are shown in attachment 2.
The column names of the additional data have to changed in the query.
Customer Overview.
Functional specification.
On behalf of this customer overview a standard SAP transaction will be used (transaction VC/2).This transaction will be extended.
The fields are shown on screen with the described headers. Printing of the overview will be done via SAP script. The script makes use of a fixed layout of the data.
The selection criteria are specified in attachment 2.
The layout of the customer overview and the SAP Script are specified in attachment 3.
Specification.
The next steps need to be performed.
1. A routine per infoblock need to be created in Include RV77UNNN. In this routine the data is retrieved and written down to the screen and script,
Example LST1_901 . In include RV77SNNN you can find the standard infoblocks.
2. Adapt via transaction SE16 table TFRM.
3. Create a new view in the customizing (sales and distribution- Sales support-sales summary-Assign Reporting Views).Assign the new view to the infoblocks.(Example view 001 is assigned to block 901).
4. In customizing it is not possible to assign the correct window and element to the infoblock .so this is done via SE16 in table T182A.
5. Adapt script. Copy script SD-SALES-SUMMARY to a Z-SALES_SUMM.
Assign this new version to the new view in customizing. Create in the main window the element who writes the data on behalf of the print.
Attachment 1 Desired fields
Header: Address
~ Customer number KNA1-KUNNR
~ Title KAN1-ANRED
~ Name1 ADRC-NAME1
~ Name2 ADRC-NAME2
~ Name3 ADRC-NAME3
~ Name4 ADRC-NAME4
~ PO Box ADRC-PO_BOX
~ PO Box POSTAL CODE ADRC-POST_CODE2
~ PO Box city ADRC-PO_BOX_LOC
~ Telephone no1 ADR2-TEL_NUMBER 1ST RECORD
~ Telephone no2 ADR2-TEL_NUMBER 2ND RECORD
~ Fax number1 ADR3-FAX_NUMBER 1ST RECORD
~ Fax number2 ADR3-FAX_NUMBER 2ND RECORD
~ E-mail ADR6-SMTP_ADDR
~ Search item ADRC-SORT1
~ Notes ADRT-REMARK
Header: control data
~ VAT registration number KAN1-STCEG
Header: Payment transactions
~Bank country key KNBK-BANKS
~Bank key KNBK-BANKL
~Bank Account number KNBK-BANKN
Header: Marketing
~ Industry key KNA1-BRSCH
~ Industry code 1 KNA1-BRAN1
~ Industry code 2 KNA1-BRAN2
~ Industry code 3 KNA1-BRAN3
~ Industry code 4 KNA1-BRAN4
~ Industry code 5 KNA1-BRAN5
~Annual sales, currency, year KNA1-UMSA1, KNA1-UWAER, KNA1-UMAH
~ Yearly no of employees, year KAN1-JMZAH, KNA1-JMJAH
~ Fiscal year variant KNA1-PERIV
~Legal status KNA1-GFORM
Header: Correspondence
~ Our account number at customer KNB1-EIKTO
Header: sales
~ Sales office KNVV-VKBUR
~ Customer group KNVV-KDGRP
~ ABC-classification KNVV-KLABC
Header: Invoice
~Tax classification KNVI-TAXKD
~Terms of payment key KNVV-ZTERM
~
Header: Contact Persons
~Title KNVK-ANRED
~Name KNVK-NAME1
~Advertising material KNVK-NMAIL
~Martial Status KNVK-FAMST
~Notes KNVK-PARAU
~Function KNVK-PAFKT
~Department KNVK-ABTNR
Header: Partnerroles
~Personnel Number KNVP-PERNR
~Name of employee PA0001-ENAME
Header: Additional Data
~Attribute 1 KNA1-KATR1
~Creation date KNA1-ERDAT
~Attribute 2 KNA1-KATR2
~Change date of field KNA1-KATR2 CDHDR-UDATE
~Attribute 3 KNA1-KATR3
~Attribute 4 KNA1-KATR4
~Attribute 5 KNA1-KATR5
~Attribute 6 KNA1-KATR6
Attachment 2 Selection fields
~Customer number
~Sales office
~Personnel Number
~Sales Organization (default NL01)
~Industry key
~Industry codes (1 till 5)
~ABC- classification
~Creation date
~Attribute 1
~Attribute 2
~Attribute 3
~Attribute 4
~Attribute 5
Attachment 3 Customer overview + SAP Script
Customer master data sheet: 11490 Page1
Requested by karen Dunnewold Date: 25.08.2004
Address
(Default SAP script ADDRESS statement)
Title
Name1
Street + number
PO Box city
Country
Search term: ADRC-SORT1
Telephone 1: ADR2-TEL_NUMBER 2: ADR2-TEL_NUMBER
Fax 1: ADR3-FAX_NUMBER 2: ADR3-FAX_NUMBER
E-mail: ADR6-SMTP_ADDR
Notes: ADRT-REMARK
PO BOX
ADRC-PO_BOX
ADRC-POST_CODE2 ADRC-PO_BOX_LOC
T005T-LANDX (T005T-LAND1 = ADRC-COUNTRY)
Control data
VAT registration number: KNA1-STCEG
Payment transactions
Country: KNBK-BANKS Bank-key: KNBK u2013 BANKL Bank account: KNBK-BANKN
Marketing
Industry KNA1-BRSCH Industry Description
Industry code1 KNA1-BRAN1 Industry Description
Industry code2 KNA1-BRAN2 Industry Description
Industry code3 KNA1-BRAN3 Industry Description
Industry code4 KNA1-BRAN4 Industry Description
Industry code5 KNA1-BRAN5 Industry Description
Figures
Annual Sales KNA1-UMSA1, KNA1-UWAER in KNA1-UMAH
Employees KNA1-JMZAH in KNA1-JMJAH
Legal status KNA1-GFORM description
Customer master data sheet 11490 Page 2
Requested by karen Dunnewold Date: 25.08.2004
Contact Persons
KNVK-ANRED
Mailings: KNVK-NMAIL Notes: KNVK-PARAU
KNVK-ANRED
Mailings: KNVK-NMAIL Notes: KNVK-PARAU
Correspondence
Our account number at customer KNB1-EIKTO
Sales
Sales office KNVV-VKBUR Description
Customer group KNVV-KDGRP Description
ABC-classify KNVV-KLABC
Currency KNVV-WAERS
Invoice
Terms of payment key KNVV-ZTERM Tax classification KNV1-TAXKD
Description
Partner (Leave SAP default)
Partnerrole Number Name
KNVP-PARVW KNVP-KUNNR NAME1
KNVP-PARVW KNVP-KUNNR NAME1
Additional data
Attribute1 kna1-katr1 Description
Attribute2 kna1-katr2 Description
Attribute3 kna1-katr3 Description
Attribute4 kna1-katr4 Description
Attribute5 kna1-katr5 Description
Attribute6 kna1-katr6 Descriptionhi narayana
i think u need to write a driving program and a provided with a smatform u sit along with the SD consultant.
ur further views can be shared.
Rgs,
Venkat. -
Write Special Characters in PDF file from SAP Script
Hi there,
Need a quick help...
We are converting SAP Script to PDF using the function module CONVERT_OTF
and saving the file on presentation server using GUI_DOWNLOAD...
But in certain cases where the item text is maintained with some special
characters like @#$% u03B1 u03B2 u03B3 u03B4 ®... then, some of these characters are seen
as junk/garbage characters...
how do we handle this??
P.S. Our Forms are already using Korean Font...
Any help is highly appreciated
Kind Regards,
TanujaHi,
Use the FM CONVERT_OTF to get the Binary data and down load it as PDF .
sample
*/ Convert the OTF data into PDF.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = lv_bin_filesize
bin_file = lv_xstring
tables
otf = lt_otf_data-otfdata[]
lines = lt_pdf_data
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5 .
*/ Convert the Xstring data into PDF
call method cl_document_bcs=>xstring_to_solix
exporting
ip_xstring = lv_xstring
receiving
rt_solix = lt_mess_att .
Then down load the table lt_mess_att with extension PDF.
Edited by: UmaMaheswaraRao Surapaneni on Apr 1, 2009 5:44 PM -
Adobe Form called from SAP Portal, not executing interface global init code
Hello!
I have an adobe form called from both R/3 and SAP Portal and I need to show long text dinamically calculated.
The deal is at the SAP Portal execution, as scenario characteristics don't allow string definitions, I'm using 255 characters tables (QISR_TAB_TYPE), that I'm trying to convert inside form interface (Global init code).
The problem is that the interface global init code is being executed when the form is called from R/3, but it is not at SAP Portal.
Does anybody know how to manage this? It's kind of a problem that the BAdi method int_service_request_init doesn't allow types over 255 characters... and if it is not possible to access the form interface code section (maybe there's any way)... i need to find some code section where i can convert tables before the form context is filled!!
Thanks a lot!!
Regards,
Diana.Hi,
have you searched on SCN? There are some threads with same problem such as [this one|/message/9270216#9270216 [original link is broken];. There is more threads. They may help you to solve your issue.
Cheers -
Why a " # " is coming while printing chinese characters from SAP script?
Hi All,
Facing one issue.
We have a SAP script for printing delivery note thru T-code VL03N. The script has chinese characters in it.
When I print this form the chinese characters that are hardcoded in the script can be seen in the print out but the ones which are coming from the table cannot be seen instead they are repalced by " # ".
Strangely, when a debug the script or see a print preview on the screen they can be seen as it is with no problem.
Only when I print it, on the paper print they are seen as # but the characters that are hardcoded in the script can be seen clearly on paper.
Secondly, in Transaction FB03 which is for display of list of documents it too has some chinese characters and when I print this directly from the t-code doing Shift-F1 ( no SAP script or form is involved in this case) then the same case is there the chinese characters get replaced by a " # ".
Any inputs or views are welcome.
Please suggest.
Thanks.
Cordially,
Saurabh.Hi,
You need to set your activate multibyte functions to support.
Long on to SAP --->right side right corner (Customized local layout) --> click --->Select options --->select tab (l18N)
-->Check Activate multibyefunctions to support.
log off you SAP Gui then re-log in...you can able to view multi language characters.
Thanks,
Nelson
Maybe you are looking for
-
Settlement to Material Based on Grade
Hi guys, Our client has the following requirement: Suppose that they have 2 material code: X and Y, both are the same material, but are separated based on grade (quality). Both use the same BOM and routing. Initially, when creating production order,
-
I do not know what's causing this, but at some point working with the SQLWorksheet becomes painful: pressing <Return> or <Del> or the Arrow keys or Ctrl-V (and probably many more) triggers the corresponding action twice. The only cure seems to be res
-
Case not working with aggreate function
i a writing the these SQL lines which is basically alternative approach of pivot keyword using in SQL Server 2005 but here i am using CASE statement if DateNumber exists then give count of ParticulersCount otherwise null select Particulers ,sum(case
-
No FI Doc created from return delivery transaction.
Dear Guru, I did open PO for asset procurement. All processes from PO creation until LIV and payment were completed successfully. Depreciation was run for asset purchased for the period 9. After that period was closed successfully. In period 10, asse
-
How to do business development?
Hi, If you've been following my other threads you know that I'm trying to either A) find a new job in Southern California or B) get transferred to the Irvine office of my current company. I want to propose that if they transfer me and if I can't stay