Error in the function module CONVERT_ABAPSPOOLJOB_2_PDF
I have generated the Spool for the smart form output.
I want to convert that to PDF. so after fetching the spool number i have used the above function module as below.
Here i am getting an error as "Spool request 11378 contains no ABAP list data"
Here is the code for reference. Please guide me your suggesions.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output.
Hi Manjunath,
See the program RSTXPDFT4 to know how to use the fm CONVERT_ABAPSPOOLJOB_2_PDF
Declare an internal table like :
DATA: lt_pdf LIKE tline OCCURS 100 WITH HEADER LINE.
and call the Fm :
pass spool request no and bytecount.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = i_spool_request
no_dialog = ' '
IMPORTING
pdf_bytecount = lv_bytecount
TABLES
pdf = lt_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Check the following link.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-38c601d5db9
This is a report program that will execute the given program with the specified variant in background and convert the spool request into PDF and send it as attachment to the specified Email ID.
Regards,
Jagadish
Similar Messages
-
Getting error in the function module
Hi everybody.
I have created one function module in se37 and i am calling that function module in the se38 report, when i am executing the report it is throwing me an error.
here in my report i am having the select option fields ex matnr, in the function module importing i have given the parameter matnr over there and when i am running the report it is through an error that
"The function module interface allows you to specify only
fields of a particular type under "MATNR".
The field "S_MATNR" specified here is a different
field type "
IF i am giving the parameter instead of select-options in the report and executing, then the function module is getting triggered and receiving the data what ever the code is available in the source code.
can anyone help me out in this issue so that i can get the data while using the select-option instead of parameter.
Thanks in advanceHi,
Actually, I wouldn't recommend the use of that tables parameter...
From sap help:
Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
Exceptions
So i definitely would go with either importing or changing parameter...
Cheers,
m. -
There seems to be an error in the function module OPEN_FORM obstructing the
Hi,
There seems to be an error in the function module OPEN_FORM obstructing the process.
Some vendors are not cabaple of usinf EDI and for some reason also not willing to use TTOOL solutions (example Hewlet Packard). In those cases the supplier still would like to get purchase order electronically via e-mail. Sending POu2019s via external mail (SMTP) is basically standard function in R/3 that has been possible since the version 4.5. It is not pre-configured, so (almost) all the required elements needs to be configured.
When we send the output message through ME9F t'code i facing the problem in the above FM.
Please help me how to solve this.
VijayGot you, the digital display for Cupertino and Frankfurt are wrong too.
Submit feedback:
http://www.apple.com/feedback/iphone.html -
System_failure error with the function module HTTP_POST
Hi Friends,
While executing the function module "HTTP_POST" ,sometime we are getting the error "System_Failure" exception.
Can anyone tell what could be the reason for this exception,any configurations need to be done on SAP???
For this FM we are passing the RFC destination"SAPHTTPA" as one of the paratmeter and
The two import paramters we are passing to this FM are
URI :
http://10.74.40.31:8686/ArchiveBridge/?informaticaArchive&contRep=IA&sumFile=MYTA_SUMMARY_20090820063258.sum
Destintion : SAPHTTPA
Thanks all in advance.
Regards
DharmarajuHi,
Check if any proxy is maitained in the client by going into transaction
SICF-> Goto-> HTTP Client Proxy -> HTTP LOG TAB.
If there is anything maintained under Host name and port, if yes you need to specify the IP address while calling FM HTTP_POST
under PROXY as
192.168.0.1:8080 where first part is IP address & 2nd part(8080) is port.
Also test connection for SAPHTTPA under SM59 to see if its properly configured.
Regards,
Amit -
Error with the function module REUSE_ALV_GRID_DISPLAY
Hi,
While using the fucntion module REUSE_ALV_GRID_DISPLAY
I am getting the below error.
Message i407(0k) with l_template_om.
message says 'Contact your system administrator. The following template is missing: sap_mm.123
Kindly provide me the reason why this success message is displayed for this function module.
Vijayat first its an information message sind its of type I and not of type S which would be success.
this message is beeing displayed because that template is really missing, believe it when SAP talks to you.
So talk to your basis guys.
to come around this problem without talking to your basis guys, i´d propose to use CL_SALV_TABLE or CL_GUI_ALV_GRID to display an ALV. -
Catching the error from the function module
hi,
call function 'ZV_SALES_ORDER_CANCEL_TSPPRA'
exporting
salesdocument = l_order
customer = l_kunnr
importing
return = return
the return contains the error message.
how to display this error message in our programHi Sudarshan,
What is the type of return. Is it a BAPIRET.
Then just check for the MSGTYP and if it is E then show the error.
Regards,
Atish -
Regarding the function modules
Hi anybody pls tell me
what are the scenarios for the creation of function module
can you give me the some examples
thanks in advance<b>Function Modules</b>
Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system.
Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
The Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed -
Error message for function module
I have created a custom function module. I have activated it. But when i'm trying to use it in a program it is showing an error. The function module has 'TABLES' but it is showing error as:
"field "TABLES" is unknown. It is neither in one of the specified tables nor defined by a DATA statement".
Please help me!!
Thank you.Hello Titan,
Generally you get these kind of syntax errors when there is some problem with the format of the program. Please recheck the format of the program in which you are calling the newly created function module. Please check if there are any erroneous '.' or ',' in the program before the 'Tables' partameter of the function module.
Please verify the same.
Regards,
Pavan -
Error during generation of the function module..need help urgently
Hello everyone,
m trying to generate data source in BWDevelopment.
After mapping all the BW fields to Source Object elements I click on Generate DataSource(for UD Connect) so following error comes
'An error occurred in step 1 during generation of the function module'
RFC connection is fine, error free and extractor is also fine.
Where could be the problem?
Thanks & Regards,
PriyankaHello everybody,
my problem is solved.For the UDConnect, whatever DATA SOURCES you create gets registered in a FUNCTION MODULE which has a capacity of only 99 enties, so to increase it implement the SAP NOTE 876340 - UDC Error available on SERVICE MARKET PLACE.
This problem occurs with BW version 3.5 level 17 or below.
Regards,
Priyanka
Edited by: Priyanka Joshi on Jun 10, 2008 11:03 AM -
Error while executing the function module BAPI_RE_CN_CREATE
Dear All
I was using the the function module BAPI_RE_CN_CREATE. When I am trying to execute the function module I am getting the error message u201CBusiness transaction RECN doest existu201D. While inputting the parameters for the function module I have given RECN In the input field TRANS. Requesting you to please kindly suggest.
Regards.
VaraprasadHi Varaprasad,
please try the following.
1. Create a contract manually in the system
2. Use BAPI_RE_CN_GET_DETAIL to show how the fields and structures are filled.
3. Check and change the parameters for BAPI_RE_CN_CREATE accordingly.
Hope that helps.
Regards, Franz -
Error while activating the function module
hi,
am getting error while activating the function module i.e. program or report statement is missing.
thank you in advance
karthikhii vinu,
hi there....
make sure that the Processing type in Attributes tab is 'Normal function module'. Also chk the general data, it must be having some name in the Program Name and include name column.try checking the program names in se38, if the program is of type include or not. you can also chk by writting a program call the function module and test it
I hope this will solve the query. in my case, SAPLZ123 is the program name and LZ123U28 is the include name.
or
Its common prob with Function module.
Goto SE80->Give Function group name->Right click on it->Activate.
regards,
Shweta -
Error while using the function module GUI_UPLOAD
Hi,
My requirement is to upload the data from .txt file into internal table.
I have given my code like this
PARAMETERS: p_fname LIKE rlgrap-filename.
data: begin of gt_string occurs 0,
record type char255,
end of gt_string.
AT SELECTION-SCREEN ON VALUE-REQUEST for p_fname.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = 'X'
MASK = ' '
CHANGING
file_name = p_fname
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
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 'GUI_UPLOAD'
EXPORTING
filename = p_fname
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = gt_string
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Here I am getting dump error as 'Type conflict when calling a function module.
The function module interface allows you to specify only fields
of a particular type under "FILENAME". The field "P_FNAME" specified here has a different field type'.
What would be the reason for this error?
Can anyone help me?
Regards,
Hemasee this sample program for F4 help
*& Report ZSD_EXCEL_INT_APP
REPORT ZSD_EXCEL_INT_APP.
parameter: file_nm type localfile.
types : begin of it_tab1,
f1(20),
f2(40),
f3(20),
end of it_tab1.
data : it_tab type table of ALSMEX_TABLINE with header line,
file type rlgrap-filename.
data : it_tab2 type it_tab1 occurs 1,
wa_tab2 type it_tab1,
w_message(100) TYPE c.
at selection-screen on value-request for file_nm.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = 'X'
MASK = ' '
CHANGING
file_name = file_nm
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
start-of-selection.
refresh it_tab2[].clear wa_tab2.
file = file_nm.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = file
i_begin_col = '1'
i_begin_row = '1'
i_end_col = '10'
i_end_row = '35'
tables
intern = it_tab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 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.
loop at it_tab.
case it_tab-col.
when '002'.
wa_tab2-f1 = it_tab-value.
when '004'.
wa_tab2-f2 = it_tab-value.
when '008'.
wa_tab2-f3 = it_tab-value.
endcase.
at end of row.
append wa_tab2 to it_tab2.
clear wa_tab2.
endat.
endloop.
data : p_file TYPE rlgrap-filename value 'TEST3.txt'.
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*--- Display error messages if any.
IF sy-subrc NE 0.
MESSAGE e001(zsd_mes).
EXIT.
ELSE.
*---Data is downloaded to the application server file path
LOOP AT it_tab2 INTO wa_tab2.
TRANSFER wa_tab2 TO p_file.
ENDLOOP.
ENDIF.
*--Close the Application server file (Mandatory).
CLOSE DATASET p_file.
loop at it_tab2 into wa_tab2.
write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.
endloop. -
Regarding the function module --error is coming.
Hi All
I am executing function module and i am getting one error after actvating that FM.
Error is - REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
Waiting for the fovarable reply.Hi,
While creating a FM you will be assigned to a Function Group, that Function Group is not active. If function group is not active then only you will be getting this error.
To over come this issue. Please do the below process.
Go to Se80--> Select Function Group from the drop down list --> Select the function group --> Right click on the Function group --> Select activate.
After above process is completed.
Test the Function Module.
Thanks,
Sriram Ponna. -
Error while using the function module..pack_handling_unit_dlvry
Hi all...
while using the function module pack_handling_unit_dlvry,
we need to pass the handling unit number as per the functionality we require.
but the mandatory field for the function module is the handling unit number in the form of bar code..
so how to use this function module..
All the useful answers will be regarded..
Regards,
Saroja.Have you tried using BAPI BAPI_HU_CREATE. Also view Function Module Documentation on its usage.
-
Error executing custom function module
Hi all,
am trying to read a function module form my java code as below.
There is no problem with the function module.
I think there is some problem with the java code that is written. I am sure the problem lies with the TABLES IT_PRODUCT_DATA STRUCTURE ZOG_ITEM_SCREENSTR.
Function module parameters and signature.
FUNCTION ZGET_CUST_ORDERGUIDE_ITEMDATA.
""Local Interface:
*" IMPORTING
*" VALUE(IV_ORDER_GUID) TYPE CRMT_OBJECT_GUID OPTIONAL
*" VALUE(IV_CUSTOMER) TYPE BU_PARTNER
*" TABLES
*" IT_PRODUCT_DATA STRUCTURE ZOG_ITEM_SCREENSTR
Java Code that is Implemented is attached above.
public ArrayList fetchOrderGuide(String customerNumber) {
ArrayList itemList = new ArrayList();
ItemSalesDoc itemSalesDoc = new ItemSalesDoc();
if (log.isDebugEnabled()) {
log.debug("inside ZAdminLogin");
try
JCoConnection aJCoCon = (JCoConnection) getConnectionFactory().getConnection(com.sap.isa.core.eai.init.InitEaiISA.FACTORY_NAME_JCO,
com.sap.isa.core.eai.init.InitEaiISA.CON_NAME_ISA_STATEFUL);
try
try
JCO.Function zFetchSalesOrderFunctionModule = aJCoCon.getJCoFunction("ZGET_CUST_ORDERGUIDE_ITEMDATA");
// set the import values
Table zItemsTable = new Table("ITEMS");
//zPackagesTable.addColumn(Table.TYPE_STRING,"HUI");
zItemsTable.addColumn(Table.TYPE_STRING,"JOGITEM");
zItemsTable.addColumn(Table.TYPE_INT,"JPRUOM");
zItemsTable.addColumn(Table.TYPE_STRING,"JPRSEQ");
zItemsTable.addColumn(Table.TYPE_STRING,"JOGDESC");
zItemsTable.addColumn(Table.TYPE_STRING,"JLINE");
zItemsTable.addColumn(Table.TYPE_STRING,"JOGNR");
zItemsTable.addColumn(Table.TYPE_STRING,"JPACK");
zItemsTable.addColumn(Table.TYPE_STRING,"JSIZE");
zItemsTable.addColumn(Table.TYPE_STRING,"JBRAND");
zItemsTable.addColumn(Table.TYPE_STRING,"JWEEKAVG");
zItemsTable.addColumn(Table.TYPE_STRING,"JDELFLAG");
JCO.ParameterList importParams = zFetchSalesOrderFunctionModule.getImportParameterList();
importParams.setValue("BP-104", "IV_CUSTOMER");
aJCoCon.execute(zFetchSalesOrderFunctionModule);
JCO.Table zRtItems = zFetchSalesOrderFunctionModule.getTableParameterList().getTable("IT_PRODUCT_DATA");
int numberOfPackages = zRtItems.getNumRows();
if (log.isDebugEnabled()) {
log.debug("number of packages " + numberOfPackages);
if (numberOfPackages > 0)
for (int j=0; j<numberOfPackages; j++)
TableRow itemRow = zItemsTable.insertRow();
//itemRow.setRowKey(new TechKey(zRtItems.getString("EXIDV")));
//packageRow.getField("HUI").setValue(zGoods.getString("EXIDV"));
itemRow.getField("JOGITEM").setValue(zRtItems.getString("OGITEM"));
itemRow.getField("JPRSEQ").setValue(zRtItems.getString("PRSEQ"));
itemRow.getField("JOGDESC").setValue(zRtItems.getString("OGDESC"));
itemRow.getField("JLINE").setValue(zRtItems.getString("LINE"));
itemRow.getField("JOGNR").setValue(zRtItems.getString("OGNR"));
itemRow.getField("JPACK").setValue(zRtItems.getString("PACK"));
itemRow.getField("JSIZE").setValue(zRtItems.getString("SIZE"));
itemRow.getField("JBRAND").setValue(zRtItems.getString("BRAND"));
itemRow.getField("JWEEKAVG").setValue(zRtItems.getString("WEEKAVG"));
itemRow.getField("JDELFLAG").setValue(zRtItems.getString("DELFLAG"));
zRtItems.nextRow();
catch(JCO.AbapException abapException)
//Exception thrown, user is not valid
if(log.isDebugEnabled())
log.debug( abapException.getKey());
catch (Exception ex)
if (log.isDebugEnabled()) {
log.debug(ex);
finally
aJCoCon.close();
catch(BackendException beeEx)
if(log.isDebugEnabled())
return itemList;
LOGDETAILS
ZGET_CUST_ORDERGUIDE_ITEMDATA:: - IN: INPUT * IV_CUSTOMER='BP-104' IV_ORDER_GUID='00000000000000000000000000000000'
Oct 9, 2008 6:48:41 AM,507 SAPEngine_Application_Thread[impl:3]_7 Error com.sap.isa.core.eai.sp.jco.JCoConnectionStateful Error occcurred in EAI layer "com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet".
[EXCEPTION]
com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet
at com.sap.mw.jco.JCO$Record.checkRowCapacity(JCO.java:12354)
at com.sap.mw.jco.JCO$Record.getString(JCO.java:12827)
at com.sap.mw.jco.JCO$Field.getString(JCO.java:11055)
at com.sap.isa.core.eai.sp.jco.JCoUtil.paramIterator(JCoUtil.java:412)
at com.sap.isa.core.eai.sp.jco.JCoUtil.logCall(JCoUtil.java:382)
at com.sap.isa.core.eai.sp.jco.JCoUtil.logCall(JCoUtil.java:236)
at
All helpful answers will be rewarded heavilyhi,
first of all you do not set the import values for your table correct. You should do something similar like this:
Function myFunction = connection.getJCoFunction(Z_FM");
Table myTable = myFunction.getTableParameterList().getTable("Z_TABLE");
for(int i=0; i<2; i++) {
myTable.appendRow();
myTable.setValue(value1,"VALUE1");
myTable.setValue(value2,"vALUE2");
connection.execute(myFunction);
Did you debug your java class? You should check at which point your java class throws the error.
Regards
Michael
Maybe you are looking for
-
Missing invitee field in iphone ical
Hello, In my iphone ical, I am missing the invitee/attendee field when I create an event. How can I get it on? Thanks Tammy
-
Migration from SqlServer to Oracle
I am using Sqldeveloper 1.2.1 I am trying to migrate sql server 2000 data to Oracle.. For that i had created two connections for oracle & SqlServer. SqlServer and Oracle connections were made sucessfully, i am able to view the database and table. Now
-
How to purchase items in the app, SvZ Defense 2?
I'm unable to purchase any in-game items in the app, SvZ Defense 2. It keeps asking me to "Contact ITunes support to complete my transaction"
-
I am the end user of Sapgui 640, recently i facing the problem when logon onto in. Below was the error message. connection to host 10.1.30.83, service sapdp52 timed out. Component: NI(network interface) Release: 640 version: 37 Module: nixxi_r.cpp Li
-
Hi all, Is there a BAPI FM availaible using which we can get the details of all parked FI documents? We need to get this detail and then using this detail we will post new documents and discard the existing parked document? Thanks & Regards