'Control parameters' when call the smartform function module
Hi all,
I want to know what we have to export as value to control papameter while calling the fm of smartform.
Plz also let me know the various parameters in CONVERT_OTF.
Thanks in advance.
WA_CONTROL_PARAMETERS-GETOTF = 'X'.
the above is needed if you want OTF data, to convert it to PDF
WA_CONTROL_PARAMETERS-LANGU = 'E'.
Language of smartform
WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
*default o/p device
WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
if you dont want the pop up screen , that asks you for printing make the value as 'X' .
other wise make it as space or clear it.
WA_CONTROL_PARAMETERS-PREVIEW = SPACE.
if u want the print preview , make it as 'X' , otherwise SPACE
Below code shows how you can convert the OTF data to PDF data.
calling the smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SMARTFORM'
IMPORTING
FM_NAME = WF_FUNCMODULENAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CALL FUNCTION WF_FUNCMODULENAME
EXPORTING
CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS "Control Params
OUTPUT_OPTIONS = WA_OUTPUT_OPT "Output Options
WF_CARRID = WF_CARRID
WF_CONNID = WF_CONNID
WF_FLDATE = WF_FLDATE
IMPORTING
DOCUMENT_OUTPUT_INFO = WA_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
ARCHIVE_INDEX = WA_ARC_IDX
IMPORTING
BIN_FILESIZE = WF_NUMBYTES
TABLES
OTF = WA_JOB_OUTPUT_INFO-OTFDATA[]
DOCTAB_ARCHIVE = TB_DOCTAB_ARCHIVE[]
LINES = TB_LINES[]
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
Similar Messages
-
SEND_ERROR in the SMARTFORM function module
Hi All,
I want to send the PO via e-mai as attached PDF file. It is working fine in DEV. But in PRD i am getting SEND_ERROR in the SMARTFORM function module.
can any one hep me to fix this????
CALL FUNCTION fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ssfctrlop
output_options = ls_composer_param
user_settings = 'X'
nast = nast
zxekko = zxekko
zxpekko = zxpekko
IMPORTING
job_output_info = job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Rgds,
Rajesh.Hi,
Go to se37,enter ur generated function module name .
Put a brkpoint at first executable statement of that FM.
If u run ur program,then it will stop.
Then put brk point on SSRFT_READ_ERROR(From menu).
after press f8,u will know what is the reason of ur error.
and check thjis also
http://wiki.sdn.sap.com/wiki/display/Snippets/Unique+Driver+Program+for+any+smartform+of+a+transaction
Try like this.
Thanks
Gourav. -
Where should i call the rfc function module? in xi or in r/3
where should i call the rfc function module?
for the synch scenario: file < -- > xi <---> rfc
i know the type of rfc is tcp/ip; but i'm not sure with the followings,
and with some trials i can not even see any message via rwb even all the setting
can be activated without errors.
where should i create the rfc destination? in r/3 or xi
where should i call the rfc via abap program? in r/3 or xi
i guess the calling program should belong to the different server with the rfc itself....
so confused....
Thanks for your reply!!
Junif i create the destination in xi point to r/3, then i call the rfc use the destination in r/3 right ?
The call doesnt use the destination in R3. XI has the RFC destination which is just used to connect to the R3 system
but where i need to create the fm via se37? in xi or r/3 ?
In R3
Regards,
Prateek -
Error in calling the Remote Function Module
Hi all,
I am trying to call the Remote function Module which is in CRM from ECC .
But we are not able to detect the function module as it is showing the error as Function Module not found.
Can anybody help us in calling the Remote Function Module .
Regards,
MadhaviPlease check the foll 2 things :
RFC radio button clicked in se37 for that FM
RFC connection established with the remote server in SM59
Thanks -
Error while calling the Mapping function module for BW Extraction
Hi
iam getting runtime error while calling the BW mapping function
The error description is as shown below.
Runtime Errors CALL_FUNCTION_UC_STRUCT
Except. CX_SY_DYN_CALL_ILLEGAL_TYPE
<b>Short text</b>
Type conflict during structure parameter transfer at CALL FUNCTION.
<b>What happened?</b>
Error in the ABAP Application Program
The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
because it has
come across a statement that unfortunately cannot be executed.
<b>Error analysis</b>
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
typed in such a way
that only actual parameters are allowed, which are compatible in Unicode
with respect to the fragment view. However, the specified actual
parameter " " has an incompatible fragment view.
I am passing the EXTRACT_DATA parameter as specification LIKE with the associated type - corresponding structure
Please let me know how can i resolve this issue
Regards
LeonDear benarji ,
I'm having the same problem help me to correct . I have mentioned below as what error i got.
Runtime Errors CALL_FUNCTION_UC_STRUCT
Except. CX_SY_DYN_CALL_ILLEGAL_TYPE
Short text
Type conflict during structure parameter transfer at CALL FUNCTION.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
typed in such a way
that only actual parameters are allowed, which are compatible in Unicode
with respect to the fragment view. However, the specified actual
parameter "SFTWORKS" has an incompatible fragment view.
Missing RAISING Clause in Interface
Program ZDLROUTSTANDING_COPY
Include ZDLROUTSTANDING_COPY
Row 876
Module type (FORM)
Module Name PDF
Trigger Location of Exception
Program ZDLROUTSTANDING_COPY
Include ZDLROUTSTANDING_COPY
Row 894
Module type (FORM)
Module Name PDF
Source Code Extract
Line SourceCde
864 ** i_logo = 'ENJOYSAP_LOGO'
865 * IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
866
867 ENDFORM. "alv_top_of_page1
868 *&---------------------------------------------------------------------*
869 *& Form PDF
870 *&---------------------------------------------------------------------*
871 * text
872 *----------------------------------------------------------------------*
873 * --> p1 text
874 * <-- p2 text
875 *----------------------------------------------------------------------*
876 FORM pdf .
877
878 * *** Smartforms & PDF ***
879
880 ssfctrlop-no_dialog = 'X'.
881 ssfctrlop-preview = 'X'.
882 ssfctrlop-getotf = 'X'.
883 ssfcompop-tddest = 'ERP7'.
884 DATA : mcheck LIKE sy-subrc.
885 CLEAR : fm_name.
886
887 "Get Function module name for given smartform
888 CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
889 EXPORTING
890 formname = 'ZSFDLOS1'
891 IMPORTING
892 fm_name = fm_name.
893
>>>> CALL FUNCTION fm_name
895 EXPORTING
896 control_parameters = ssfctrlop
897 output_options = ssfcompop
898 mrefno = mrefno
899 * P_TITLE = MTITLE
900 IMPORTING
901 document_output_info = st_document_output_info
902 job_output_info = st_job_output_info " IT_OTF_DATA
903 job_output_options = st_job_output_options
904 TABLES
905 it_works_sf = sftworks
906 EXCEPTIONS
907 formatting_error = 1
908 internal_error = 2
909 send_error = 3
910 user_canceled = 4
911 OTHERS = 5.
912
913 IF sy-subrc NE 0.
Advance Thanks -
Problem with String parameters while Calling RFC enabled Function Module
Hi all,
I execute BAPI(RFC enabled Function Module) from my WebDynpro Application and retrieve data from R/3.
To fetch the data I pass few String parameters to BAPI from my Dynpro Application.
Now the problem is that while making this call, the parameters are automatically converted to UpperCase. And I want those parameters in the original case at R/3.
I am not able to find out whether this conversion occurs at Dynpro side or R/3 Side.
Should i configure my BAPI(RFC enabled Function Module) or is there some option on the Dynpro Side to preserve the Case of the String?
Please help me.
Thanks,
DarshilHi Darshil,
I'm not sure whether you have experience with ABAP or you are a Java Programmer, but we cannot set that flag permanently.
Now, if you are saying that the domains are marked with the <i>Lowercase</i> attribute, then it means that the final table field will be capable of holding Case Sensitive data.
I have a hunch that the case-conversion is happenning at the Web-Dynpro side. Or, the application logic converts the string to UPPERCASE explicitly.
By the way, which BAPI are you talking about ?
Regards,
Anand Mandalika. -
Regarding Smartform Function module
Hi,
When i am executing the smartform function module via print program, Smart form output is displaying properly but it is not showing any OTF data in the importing parameter JOB_OUTPUT_INFO . (JOB_OUTPUT_INFO-OTFDATA). Why it is happening? Could you please help me in this regard?To get the OTF data you need to set the GETOTF parameter in the Control Parameters of the Smartforms.
DATA: LS_CONTROL TYPE SSFCTRLOP. " Controlling info
LS_CONTROL-GETOTF = 'X'.
CALL FUNCTION WF_FM
EXPORTING
CONTROL_PARAMETERS = LS_CONTROL
IMPORTING
JOB_OUTPUT_INFO = WF_OUTDATA
I guess, when we set the GETOTF flag, it will not generate the output and only puts the data JOB_OUTPUT_INFO-OTFDATA.
Regards,
Naimesh Patel -
Debuggin a Call to Remote Function Module
Hi
I have a scenario where i have a Remote Function Module in r3 which is being called synchronously by an external java application. The FM has a lot of input and output parameters and many tables. The output returned by the FM is not as expected.
Can anyone tell me how debug a Remote Function Module when a call has been made from an external application.
I am not able to get the test data sent by the external application . So when the external application gives a call to this Remote FM and if it is possibele to debug it would be great.
regards
Nilesh Taunk.Hi Nilesh,
1) Login to SAP with the same ID with which you will calling the RFC function module from the outside system.
2) Goto transaction - se37/se38
3) Goto Utilities => Settings.
4) Select the ABAP Editor Tab.
5) Click on the Debugging tab.
6) Tick the Actv. button and give the user name with which you will be debugging the code. In this case the logged in user id.
7) Press Enter.
8) Now put an external break point inside the Function Module.
9) Load your external application (from where you want to debug the FM) once again.
The execution will stop in the FM.
Hope it helps..
Lokesh
PS: This was a simple question, but I guess the reason no one has answered your question is due to the fact that you havent rewarded points to members helping you. Also remember to close your post once it has been answered. -
WHAT ARE THE UPDATED FUNCTION MODULES
Hi Friends,
Can anybody explain me about UPDATED FUNCTION MODULES (types of function modules)Hi
Update Function Module
Unlike transactions and executable programs, dialog modules do not start a new SAP LUW. Calls to update-task function modules from a dialog module use the same update key as the ones in the calling program. The result is that calls to update function modules from a dialog module are executed only if a COMMIT WORK statement occurs in the calling program.
If you place a COMMIT WORK in a dialog module, it does commit changes to the database (for example, with UPDATE).However, it does not start the update task. The function modules are not actually executed until a COMMIT WORK statement occurs in the calling program.
If you use dialog modules, try to avoid including calls to update function modules in subroutines called with PERFORM ON COMMIT. In general, any occurrence of PERFORM ON COMMIT(with or without update-task function calls) in a dialog module can be problematic.
This is because dialog modules have their own roll area, which disappears when the module finishes. Consequently, all local data (including data used for parameter values when calling an update function module) disappears as soon as the commit in the main program is reached.
If you must use this method in a dialog module (i.e. include the call to an update-task function in a subroutine), you must ensure that the values of the actual parameters still exist when the update-task function actually runs. To do this, you can store the required values with EXPORT TO MEMORY and then import them back into the main program (IMPORT FROM MEMORY) before the COMMIT WORK statement
Creating Update Function Modules
To create a function module, you first need to start the Function Builder. Choose Tools ® ABAP Workbench, Function Builder. For more information about creating function modules, refer to the ABAP Workbench Tools documentation.
To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:
Update with immediate start
Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.
Update w. imm. start, no restart
Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.
Update with delayed start
Set this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.
To display the attributes screen in the Function Builder, choose Goto ® Administration.
Defining the Interface
Function modules that run in the update task have a limited interface:
Result parameters or exceptions are not allowed since update-task function modules cannot report on their results.
You must specify input parameters and tables with reference fields or reference structures defined in the ABAP Dictionary.
http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm
Regards,
Harish -
Hi. please solve my problem.
.call information such as call waiting,call forwarding, call holding is not working when caller the call me or im wait for my call i cant see any title by iphon , and also holding is the same.2. there is not any option for call baring.3.playback music is not hearing by second partner during the call.4.i cant select ringing ton from saving tons.
thank you in advance.Hi Ersin,
Exception 1 would seem to be FORMATTING_ERROR, which suggests something in the design of the Smartform. However, that doesn't fit with the form being generated from a report, but only erroring when called from a function module. I can think of no reason why the different calling method would be a factor.
When FORMATTING_ERROR is raise it should also set a message ID and number, are you able to determine what they are?
Regards,
Nick -
Problem while calling an RFC Function Module in Background
Hello,
I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
I will be on holiday for the next 6 weeks, so take your time to answer .
Regards,
Dusan.
Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
Please read the forum rules about u r g e n t ...This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
Just guessing, but might be worth checking.
Cheers,
Julius -
Multiple calls of same function module do NOT initialize variables ?
Hi all,
..so its my fist post here, this is a bit strange problem for me and maybe someone knows whats happening.
So I have in SAP Solution Manager a function module 'Z', which calls a standard SAP class CL_SPROJECT_SOLAR_BASE_REPORT, which in turn calls the standard function module 'SPROJECT_GET_ADMIMP_SCREEN_BP'.
During development, things worked fine, but now I run my Z-Program for more than one instance and even I do all FREE for the Class, apperently the function module SPROJECT_GET_ADMIMP_SCREEN_BP, which is called by the class CL_SPROJECT_SOLAR_BASE_REPORT, does not get it's variables from the global data of the function pool re-initialized, when it is called for the second, 3rd, ... time.
This is a bit strane behavior for me, I would have expected that variables in a function module (or even in the global data of that function pool) get re-initialized each time that function module is called ?
Actually, this is the only function in that function pool.
Well, if not, does anyone has an idea how I can get the variables of this module pool re-initialized between the calls ? More concrete, the global data of function pool SAPLSPROJECT_SOLAR_ADMEVAL_BP define:
DATA: g_v_with_var TYPE char1.
In the function module line 36 (no reference to g_v_with_var, no module call, no changes to g_v_with_var before the IF-statement at all) it is querying:
IF g_v_with_var IS INITIAL.
So this is my problem, the second time I am calling the class (which is 'free'ed and re-created between the calls) which calls this function module the 'g_v_with_var' is not initial and there seems to be no way to have it set to initial again ?
So even thought this is in SolMan, I think the question & problem is a ABAP technical one ?
Any thoughts, help or support would be very much appreciated,
thank so much,
FrankHi Mae,
..thanks a lot for your fast reply, unfortunately there is only one function and no functions or forms at all for initializing. The variable I am fighting with is g_v_with_var and that is referenced only 4 times in the whole function pool:
Global Data: 101 DATA: g_v_with_var TYPE char1.
Function Module SPROJECT_GET_ADMIMP_SCREEN_BP (which is the only function module):
36 IF g_v_with_var IS INITIAL.
127 g_v_with_var = airep_true.
193 CLEAR g_v_with_var.
If in line 36 g_v_with_var is 'X', which it is always after the first call, the function will exit with an exception, so line 193 to clear it will actually never be executed...and it is not cleared the next time the function module is called, so you never get back to have the function run...
All the best,
Frank -
Issue when Calling the RFC from external system
Hi,
I have created one RFC, in which I am using one function module to get the material customer status.
Functional Module name is "QC01_BATCH_VALUES_READ".
When I run this in SAP, it is giving a value for Cusotmer Status. But when this RFC is called from .Net system it is not returning any value for this field.
Even I used a different function module 'CLAF_CLASSIFICATION_OF_OBJECTS' for the same, in this also in SAP it is doing good, but when it is called from .Net, the program is giving dump.
Please help me to resolve this issue
Thanks
RaviHi Ravi,
Issue can be either in the .NET program or in the RFC destination creation.
1)
Check whether data types of .NET program which is calling the SAP function module are correct.
If there are issues with data types, program dont report if you dont so explicitly.
2) Check whether RFC destination you are giving in your .NET program is correctly configured in
SAP , verify by testing the same.
Apart from above two reasons, I dont see any other major reasons for not getting correct results.
Regards
Krishna -
Change the standard function module
The standard function module FI_DUPLICATE_INVOICE_CHECK will check whether an invoice/credit memo has already been posted where all of the following attributes match: Company code, vendor, currency, document date, reference number (If a reference number was entered in the current invoice/credit memo). If no reference number was entered in the current invoice/credit memo the system checks whether an invoice/credit memo has already been posted where all of the following attributes match: Company code, vendor, currency, document date, amount in document currency
my requirement is
The above functionality described in the short description doesnt provide for the need within AP to check on duplicate invoices. The functionality in FI differs from the functionaltiy provided in LIV and therefor needs to be aligned. The risk of posting duplicate invoice entry is eminent since the check is dependent on all parameters. For a good duplicate invoice number check we need FI to check on Vendor and invoice reference within the same fiscal year. To modify rules, copy FI_DUPLICATE_INVOICE_CHECK, modify the checks and then call the copied function module from FB60. The remaining field check in the standard function module should be deleted.
how to achive this. i didn't understand the requirement .Please give me any suggestion for this.Hi ,
I think what you are saying is the functionality given in Logistics Invoice verification is not suitable for FI Invoice.
If I am correct , then there is a configuration setting in SPRO where you set check for duplicate invoice. It has just three checkboxes
a) Company code b) Reference number c) Invoice date
so I think this configuration setting will suffice your requirement.
Please let me know.
Amit -
Call BEx from function modules.
Hi,
I'm trying to run BEx (Excel) from an abap Exit. Using the debugger I have observed that it is necessary to call the rsah_launch_excel function module passing some parameter (i.e. workbook id) but don't know if it is necessary to copy and modify the called program ( RRMX_START_EXCEL).
Any suggestion about the coding will be well appreciated.
Thanks in advance.
GiovanniUse SUBMIT Program statement ... i.e,
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit.htm
Maybe you are looking for
-
Managers can't see their employees when creating apprisal documents in Performance Management
Hi All, I'm looking for you experts to enlighten me regarding an issue with the SAP Performance Management solution. We have recently (2013) implemented the Performance Management solution and everything has worked as expected. Now, we are in the pro
-
Hi, I am trying to create rdlc file programmatically. Using Memory Table as dataset. Here is my code ' For each field in the resultset, add the name to an array listDim m_fields AsArrayList m_fields = NewArrayList() Dim i AsIntegerFor i = 0 To tb
-
Hallo, My scenario is as follows: when sending a RFC to XI via the RFC adapter, I get a short dump with the following error: "the error occurred in an RFC call to another system (XI).The termination occurred in the function "RfcExtendedReceive" of th
-
BAdIs for CAD Desktop Integration
Hi, I am generally looking for some information on the purpose and use of the BAdIs related to CAD Desktop Integration. The name of the BAdIs are:- CDESK_BADI_MAIN CDESK_CAD_CHANGE CDESK_TBM_ADDIN CDESK_BADI_COPY_DLG CDESK_BADI_COPY_DOC CDESK_MATERIA
-
Adobe flash player doesn't support OSX10.5.8 , and i can't watch any video. Please advice? Do i need to upgrade ? or any application to replace? Please HELP.... million thanks!