Activate/implement function module
Hi,
How to activate/implement function module?
Thx.
Anirudh,
hi,
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
Function Modules are Global ABAP programs created by SAP for reusable purpose. They have IMPORT, EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
You can create them from TCode SE37.
Go through the following doc:
Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
Function Module Interfaces
The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
Syntax
... [IMPORTING parameters]
[EXPORTING parameters]
[CHANGING parameters]
[TABLES table_parameters]
[{RAISING|EXCEPTIONS} exc1 exc2 ...]
The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
Interface parameters
The interface parameters are defined on the relevant tab pages in the Function Builder.
IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for 'pass by value' is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
TABLES parameters are table parameters. 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
The exceptions of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception is defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
CALLING A FUNCTION MODULE:
1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
--> Write the Corresponding FM name --> Hit Enter
2)The appropriate import ,export Parameters will be displayed in ur editor
3)Pass the Values Here.
Check this link:
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
regards,
rewards point.
Similar Messages
-
How to activate a function module programatically?
How to activate a function module programatically?
Hi,
You can try the following function module:
RS_FUNCTION_ACTIVATE
Thanks and regards,
S. Chandra Mouli. -
Implement Function module logic in BI
Hi all,
the bellow is the DataSource FM code i wanted to implement same in the BI side, instead system date user wants to enter the date according to the user entry date the calculation should happen
if t_tab-net_d < sy-datum.
if t_bsid-shkzg = 'S'.
if t_bsid-dmbtr > 0.
t_tab-due_v = t_tab-due_v + t_bsid-dmbtr.
t_due-due_v = t_bsid-dmbtr.
endif.
else.
if t_bsid-dmbtr < 0.
t_tab-due_v = t_tab-due_v - t_bsid-dmbtr.
t_due-due_v = t_bsid-dmbtr * -1.
endif.
endif.
In BI i have the t_tab-net_d,shkzg,dmbtr in my cube. now how can i calculate the due_v at report level.
Regards,
Kiranabove is allready there in production and now user want to enter the date to caluculate
below is also the logic of FM user want to implement this at BI side
if due_temp is initial or due_temp >= t_tab-net_d.
due_temp = t_tab-net_d.
t_tab-due_m = sy-datum - t_tab-net_d.
endif.
endif.
here due_temp = sy-datum.
Please let me know how can i implement this in BI side
Regards,
Kiran
Edited by: kiran kumar on Feb 9, 2010 6:05 PM -
BTE Name in Called Function Module
Hello,
A function module say XYZ is called from a BTE. Can I know the name of the BTE which called the function module XYZ inside the function module XYZ ?
With Regards,
Avisesh.I think this document may help you...
<b>Business Transaction Events</b>
This activity describes how you can connect additional components (such as in the form of function modules developed yourself or a product from an external software provider) to the standard R/3 System.
There are two types of interface available in the General Ledger
Accounting (FI-GL), Accounts Receivable and Accounts Payable
(FI-AR/FI-AP), and Sales and Distribution (SD) components for this:
1. Publish & Subscribe interfaces (also called "informing interfaces" in the following) These should inform you about particular events (such as a document being entered) in the SAP standard application and make the data generated as a result available to the external software. The external software does not return any data to the standard R/3 System.
(I'm confused. MIT is using two business transaction events for the SD to FI interface. Both of these events are Publish & Subscribe interfaces. They both return data to the SAP standard application! They both change the FI document before it is posted. What I've figured out is that if there is an export to memory and an import from memory before and after the function call, then we can't modify the data. We can check this in the calling function module - OUTBOUND_CALL_00503110_E or OPEN_FI_PERFORM_00001020_E, etc)
Examples of such events in the R/3 System are:
Master record was created, changed, or blocked
Document was entered, parked, changed, or reversed
Items were cleared or reset
Additional processing can be caused in the additional component on the basis of these events and data:
Starting a workflow
Generating or changing additional data
Requesting correspondence
FI Clearing (F-32) calls (gathered via SE30):
Function OPEN_FI_PERFORM_00001020_E (can't modify data)
00001020 POST DOCUMENT: Prior to final checks
EVENT
This Event is reached prior to completing the document. The checks that are carried out at this point include checking, prior to posting, that the document balances to zero, and calculations for tax offsetting. This Event is accessed once per standard posting process and is similar to validation at document level (Event 0003). A document number has not yet
been assigned when this Event is reached.
INTERFACE
All document line items created and the document header data are
transferred (both as tables).
Parameter
T_BSEG
T_BKPF
Function OPEN_FI_PERFORM_00001025_E (can't modify data)
00001025 POST DOCUMENT: Final checks completed
EVENT
This Event lies following all checks on the whole document, but prior to number assignment. Following this Event, no further error messages may be sent. The document is complete at this point, and no further changes can be made to it prior to posting.
INTERFACE
All current data, all document data relevant for the posting, and various control parameters are transferred to the additional component. At this point you can still implement your own checks on the current document data.
Parameter
I_BKDF
T_AUSZ1
T_AUSZ2
T_AUSZ3
T_BKP1
T_BKPF
T_BSEC
T_BSED
T_BSEG
T_BSET
T_BSEU
Function OPEN_FI_PERFORM_00001030_E (can't modify data)
Function OPEN_FI_PERFORM_00001140_E (can't modify data)
2. Process interfaces (also referred to as "process" in the following) Process interfaces are used to submit business processes to a different control which cannot be realized with the standard system, that is process interfaces replace standard processes. Here you can structure determination of individual field contents or of specific reactions to process flows individually. It is possible to connect different external developments to the standard R/3 System. The additional developments are generally carried out using the ABAP/4 Development Workbench. This way you can, for example, influence the control of payment transactions. Selection of payment method, house bank and partner bank can be made using the payment data (currency, amount, and payee) according to a selection logic which you have defined.
FI Clearing (F-32) calls:
Function OPEN_FI_PERFORM_00001120_P
Function OPEN_FI_PERFORM_00001130_P
Function OPEN_FI_PERFORM_00001150_P
Function OPEN_FI_PERFORM_00001170_P
Standard Settings
Sample modules are delivered in the standard R/3 System which you can
copy into your name range and fill them with statements there.
Activities
1. Enter a product using "Settings -> Customer's products". Actually, in 4.6C, from transaction FIBF (IMG -> Financial Accounting -> Financial Accounting Global
Settings -> Business Transaction Events):
Settings -> Products -> ...of a customer
There are generally a large number of function modules belonging to a product which can be called by different program events from within the standard R/3 System. A product can also be an external software component. If the product is in an external system, enter an RFC destination here. If the product is in the same system, you do not have to enter anything. Important: Do not forget to activate the product after making the following settings.
2. Establish the interfaces with which the R/3 System provides you. To do this, choose
Environment -> Info system (P/S)
or
Environment -> Info system (Processes).
Execute the program. You should enter "A" as the
attribute type. You see the respective interfaces with which the R/3 System provides you. Note the key of the interface which you require.
You can also select:
By particular SAP application components
By particular events by entering intervals
Which interfaces are used in activated products
Which interfaces are used within a particular country version or within a particular industry
Which interfaces are used within a particular customer product
3. Enter the function module which you have developed yourself. To do this, choose either Goto -> Edit modules within the info system or Settings -> P/S modules or Process modules -> Customer's in the "SAP Business Framework" menu. Make the following entries:
Key for the interface
The product that you want to use
Function module which belongs to this product.
You can also enter several function modules for a product. Caution:
The function module must be within your name range, that is must begin with the letter Z. You leave the Ctr and Appl. fields blank unless you want a particular country version or a particular SAP industry-specific component to be enhanced or replaced instead of the standard process flow.
4. Fill the source text of your function module
and activate it. To do this, go again via Environment -> Info system (P/S) or Environment -> Info system (Processes) into the information system and execute the program. Then proceed as follows:
Click twice on the interface you have chosen. If you want, you can look at the interface at this point by choosing Goto -> Interface. Then choose the Back function again afterwards.
Place the cursor on the relevant line and choose Goto -> Function library. You see the sample function module delivered by SAP.
Copy the sample module delivered by SAP and call it the same as the function module entered in step 3.
Fill the source text of the empty function module.
Activate the function module.
Activate the product as described in step 1.
5. Run the R/3 program affected and test whether calling your function module works.
Further Notes
The other menu paths are only used for information about additional components delivered by SAP or about software already installed by external software providers. -
what are the steps to create BAPI functionalodule?
hi,
Scenario: Step-by-step creation of a BAPI to retrieve fields from table T001.
Procedure: Go to transaction SE11 and create a structure as shown or as per your requirement.
Give the name in the Data type field and click create.
In the pop-up that comes up, select the radio button u201C structureu201D.
In the components tab of the structure, give the different fields and their corresponding field types and press enter to check the compatibility and corrective ness.
Do not forget to save it in a package. You can even save it as a local object. For my example, I save it in a package.
Check the structure (ctrl + F2) and activate (ctrl + F3) the structure.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a Structure.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Go to transaction SE37 where you create function modules. Click on create after you enter the name of the Function module.
A screen as shown above would pop-up where you mention the function group to save the function module and also provide some short text describing your function module.
In the next pop-up that follows, click on continue as shown above.
The function module screen would look like the one above.
Go to the Attributes tab and select the radio button reading u201Cremote-enabled moduleu201D. Come back to the imports tab and provide the import parameters as shown or as per your requirement.
Now in the Export tab, provide the export parameters as shown or as per your requirement.
In the tables tab, provide the information as shown or as per your requirement.
The next screen you visit is the source code. It would look like this.
In the source code tab, write the following code in order to pick the data based on the input you provide.
Now, save and check the code and activate the function module.
After successful activation, Go to the attributes tab. Go to Function moduleàReleaseàRelease.
+++++++++++++++++++++++++++++++++++++++++++++++
Now we are done with the creation of a Function Module.
+++++++++++++++++++++++++++++++++++++++++++++++
Go to transaction SWO1 and enter the name of the BAPI you would like to create or as shown in the screen and click the create button.
Give the name of the BAPI as above and click on create.
Give the above-mentioned details and click on the continue icon.
Save in a package.
The resulting screen is as follows.
Now click on the methods to drop down and see what methods are provided by default. There would be two methods, showing in red color which come by default while creating the BAPI.
Click or select the method as shown above and go to the path u201CUtilitiesàAPI methodsàAdd methodsu201D.
On the screen that follows, provide the function module name and click on the continue icon.
In the ultimate pop-up, click the next step icon. We observe that the information is predefined in the fields.
This is the next screen where you would just click on the u201Cnextu201D icon.
Click on Yes. You can see an information message reading u201C ZBAPIFMT001u201D inserted.
Now save after you add the method. Select & Double click on the API method.
Go to Tab: ABAP Check 'API Function'.
The above screen is displayed. Go to the ABAP tab as shown below.
Select the Radio button reading u201CAPI Functionu201D as already said above.
click on the continue icon to proceed further.
Now select the Object u201CZBAPI_T001u201D as shown below.
Go to : EditàChange Release StatusàObject type àTo Modeled.
The above shown screen will be displayed. Click on yes.
The message shows, The object type status set to modeled. (or already modeled)
Go to : EditàChange Release StatusàObject type à To Implemented.
You can see a message reading u201CObject type status set to implementedu201D
Now, go to: EditàChange Release StatusàObjectàTo Released.
There would be two pop ups coming up. Click continue on the Pop Ups.
Keep the cursor on the 'Method'.
Go to: EditàChange Release StatusàObject type componentàTO Modeled.
You can see the message reading u201C status for method u2018zbapifmt001u2019 set to modeledu201D.
Now, go to: EditàChange Release StatusàObject type componentà TO Implemented
You can see the message reading u201C status for method u2018zbapifmt001u2019 set to implementedu201D.
Now go to: EditàChange Releasse Status à Object type component à To Released
You can see the message reading u201C status for method u2018zbapifmt001u2019 set to Releasedu201D.
Click on Generate Button. (the red ball kind of button is the Generate button)
After clicking on the generate button, you can see the message reading u201CObject type 'ZBAPI_T001' generated successfullyu201D -
Help in Creation of a Function Module.
Hi Abapers,
I am new to ABAP and hardly have knowledge abt it. I need to create a Function Module which is of the type RFC. Pls provide me information and steps to create the same.
Many thanks in Advance.Hi Pooja,
Please follow the below steps to create a function module :
1. Goto Transaction code : SE37.
2. Create a Function Group first.
a) From the Menu Bar Choose Goto -> Function groups -> Create group.
b) Specify the function group name and a short text.
c) Choose Save.
When you create a new function group, the system automatically creates a main program containing two includes. Like any other programs and includes, you can display them in the Repository Browser.
3. Now create a Function Module.
4. Enter the function's name in the field Function module.
5. Choose Create.
6. In the Enter function group dialog box, enter the function group to which you want to assign the function module.
7. In The Attributes Tab select Remote Enabled Module (since you want a RFC function module ).
8. Give the Import and Export parameters and exceptions(if any).
9. Write the functioning part of the fuction module in the Source code tab.
10. Save and Activate your function Module.
Now go ahead and use your function module where ever you want.
Hope it helps.
Reward if helpful.
Regards
Hemant Khemani -
Function module not working when used with 'In Background Task'
hi,
this is my code
call function 'Z_IBD_FILL_ZINETACT'
in background task
destination 'SAPD220125'
tables
it_net1 = it_net1
it_net2 = it_net2
it_net3 = it_net3 .
when this code is executed i am not getting any data in my internal tables i.e it_net1, it_net2, and it_net3
but i changed this code see the below code
call function 'Z_IBD_FILL_ZINETACT'
in background task (THIS IS COMMENTED)
destination 'SAPD220125'
tables
it_net1 = it_net1
it_net2 = it_net2
it_net3 = it_net3 .
now i am getting data into my internal tables
can any one tell me what can be the problem and how to solve it in my case
its very urgentHi,
Pls. go through the docu..
CALL FUNCTION
Variant 5
CALL FUNCTION func IN BACKGROUND TASK.
Additions:
1. ... AS SEPARATE UNIT
2. ... DESTINATION dest
3. ... EXPORTING p1 = f1 ... pn = fn
4. ... TABLES p1 = itab1 ... pn = itabn
Effect
Flags the function module func to be run asynchronously. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
Note
This variant applies only as of Release 3.0, so both the client system and the server system must be Release 3.0 or higher.
Note
qRFC with Outbound Queue
This is an extension of tRFC. The tRFC is serialized using queues, ensuring that the sequence of LUWs required by the application is observed when the calls are sent.
For further information about qRFC, refer to the Serialized RFC: qRFC With Outbound Queue section of the SAP Library.
Addition 1
... AS SEPARATE UNIT
Effect
Executes the function module in a separate LUW under a new transaction ID.
Addition 2
... DESTINATION dest
Effect
Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable.
Depending on the specified destination, the function module is executed either in another R/3 System or as a C-implemented function module. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
Since each destination defines its own program context, further calls to the same or different function modules with the same destination can access the local memory (global data) of these function modules.
Note
Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you may not use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
Addition 3
... EXPORTING p1 = f1 ... pn = fn
Effect
EXPORTING passes values of fields and field strings from the calling program to the function module. In the function module, formal parameters are defined as import parameters. Default values must be assigned to all import parameters of the function module in the interface definition.
Addition 4
... TABLES p1 = itab1 ... pn = itabn
Effect
TABLES passes references to internal tables. All table parameters of the function module must contain values.
Notes
If several function module calls with the same destination are specified before COMMIT WORK, these normally form an LUW in the target system. Calls with the addition 1 are an exception to this rule - they each have their own LUW.
You cannot specify type 2 destinations (R/3 - R/2 connections).
(See Technical details and Administration transaction.)
Example
REPORT RS41503F.
/* This program performs a transactional RFC.
TABLES: SCUSTOM.
SELECT-OPTIONS: CUSTID FOR SCUSTOM-ID DEFAULT 1 TO 2.
PARAMETERS: DEST LIKE RFCDES-RFCDEST DEFAULT 'NONE',
MODE DEFAULT 'N',
TIME LIKE SY-UZEIT DEFAULT SY-UZEIT.
DATA: CUSTITAB TYPE TABLE OF CUST415,
TAMESS TYPE TABLE OF T100,
WA_CUSTITAB TYPE CUST415.
SELECT ID NAME TELEPHONE INTO CORRESPONDING FIELDS OF TABLE CUSTITAB
FROM SCUSTOM WHERE ID IN CUSTID ORDER BY ID.
PERFORM READ_CUSTITAB.
EDITOR-CALL FOR CUSTITAB TITLE 'Editor for table CUSTITAB'.
PERFORM READ_CUSTITAB.
CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
IN BACKGROUND TASK
DESTINATION DEST
EXPORTING
TAMODE = MODE
TABLES
CUSTTAB = CUSTITAB.
CALL FUNCTION 'START_OF_BACKGROUNDTASK'
EXPORTING
STARTDATE = SY-DATUM
STARTTIME = TIME
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC = 1.
EXIT.
ENDIF.
COMMIT WORK.
CALL TRANSACTION 'SM58'.
FORM READ_CUSTITAB *
FORM READ_CUSTITAB.
WRITE: / 'System ID:', SY-SYSID.
SKIP.
LOOP AT CUSTITAB into WA_CUSTITAB
WRITE: / WA_CUSTITAB-ID, WA_CUSTITAB-NAME,
WA_CUSTITAB-TELEPHONE.
ENDLOOP.
ULINE.
ENDFORM.
Pls. reward if useful.... -
Help in enhancing CRM logon function module
Hello all,
We have a situation where in the past we have allowed the creation of multiple Business Partners sharing the same e-mail address. We are about to close this loophole but we have this as a master data issue for some existing Customers/Business PArtners.
Currently, our CRM Webshop only uses e-mail address and password for login verification (not using Business Partner/Customer number).
We would like to enhance the webshop logon to include customer number as well ie. We want to determine which customer number associated with the ambiguous e-mail address is used. I have attempted to identify which function module is involved by inserting an endless WHILE loop into the following , but none of them seems to be called :
CRM_ICSS_USER_LOGIN
CRM_ISA_IUSER_LOGINr
CRM_ISAI_BP_LOGIN_BPARTNER_GET
CRM_ISA_BP_LOGIN_CHECK
CRM_ISA_LOGIN_R3USER_CHECK
CRM_ISA_IUSER_LOGIN
CRM_ISA_LOGIN_CHECK
CRM_ISAI_BP_LOGIN_BPARTNER_GET
In addition I notice the function SUSR_CHECK_LOGON_DATA can not be enhanced as it's a Basis FM.
I have attempted to look up documentation in SAP Help and not much joy. Can anyone tell me whether I'm barking up the wrong tree and this needs to be addressed by a kernel level function or recommend another place in the standard code ?
Regards,
GabrielHi Pooja,
Please follow the below steps to create a function module :
1. Goto Transaction code : SE37.
2. Create a Function Group first.
a) From the Menu Bar Choose Goto -> Function groups -> Create group.
b) Specify the function group name and a short text.
c) Choose Save.
When you create a new function group, the system automatically creates a main program containing two includes. Like any other programs and includes, you can display them in the Repository Browser.
3. Now create a Function Module.
4. Enter the function's name in the field Function module.
5. Choose Create.
6. In the Enter function group dialog box, enter the function group to which you want to assign the function module.
7. In The Attributes Tab select Remote Enabled Module (since you want a RFC function module ).
8. Give the Import and Export parameters and exceptions(if any).
9. Write the functioning part of the fuction module in the Source code tab.
10. Save and Activate your function Module.
Now go ahead and use your function module where ever you want.
Hope it helps.
Reward if helpful.
Regards
Hemant Khemani -
How to call a function module in VC
Hi,
I want to call a function module for an addition formula which shall calculate and infer the value.
eg. quantities of 5 different characteristics (of numeric data) is to be summed up and inferred against the 6th characteristic.
I want to know the detailed process to create a Variant Function and use it in a dependency.
Request to please advise the steps, type of dependency and its code.
Regards,
Rajesh MohapatraDear Rajesh,
I also wanted to learn how to do that, your post motivated me to use a bit of freetime and investigate on the subject. I finally made my function work, so here are the tips.
The example is very simple, just a variant function with two inputs and which multiplies inside the input values and transfer that result to the output ( 3 x 4 => 12 ).
Deducting how to add five values or any other logic would be easier starting from there.
STEP 1: Create Variant Class for the product. I imagine you already have that. In my case its name is ZVC_CLASS, you have already a material assigned to the class, a configuration profile, etc....
STEP 2: Create Three Characteristics Z_NUM_CH_1,Z_NUM_CH_2,Z_NUM_CH_3 the three of numeric type
STEP 3: Assign characteristics from step 2 into class ZVC_CLASS
STEP 4: Create the function module with the code given below. I put the name ZVC_FUN_TEST
FUNCTION ZVC_FUN_TEST.
""Interfase local
*" IMPORTING
*" REFERENCE(GLOBALS) TYPE CUOV_00
*" TABLES
*" QUERY STRUCTURE CUOV_01
*" MATCH STRUCTURE CUOV_01
*" EXCEPTIONS
*" FAIL
*" INTERNAL_ERROR
*- Inicializar los valores.
DATA:
GV_VALOR_FINAL TYPE CUOV_01-ATFLV,
GV_VALOR_NUM1 TYPE CUOV_01-ATFLV,
GV_VALOR_NUM2 TYPE CUOV_01-ATFLV.
CLEAR:
gv_valor_final,
gv_valor_num1,
gv_valor_num2.
CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
EXPORTING
ARGUMENT = 'Z_NUM_CH_1'
IMPORTING
VTYPE = P_VTYPE1
SYM_VAL = P_VALOR_SYM1
NUM_VAL = gv_valor_num1
IO_FLAG =
TABLES
QUERY = QUERY
EXCEPTIONS
ARG_NOT_FOUND = 01.
IF SY-SUBRC <> 0.
RAISE INTERNAL_ERROR.
ENDIF.
CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
EXPORTING
ARGUMENT = 'Z_NUM_CH_2'
IMPORTING
VTYPE = P_VTYPE1
SYM_VAL = P_VALOR_SYM1
NUM_VAL = gv_valor_num2
IO_FLAG =
TABLES
QUERY = QUERY
EXCEPTIONS
ARG_NOT_FOUND = 01.
IF SY-SUBRC <> 0.
RAISE INTERNAL_ERROR.
ENDIF.
*- Calculate final value
gv_valor_final = gv_valor_num1 * gv_valor_num2. "Especifico de c/u.
DATA: VTYPE TYPE CUOV_01-ATFOR.
VTYPE = 'NUM'.
CALL FUNCTION 'CUOV_SET_FUNCTION_ARGUMENT'
EXPORTING
ARGUMENT = 'Z_NUM_CH_3'
VTYPE = VTYPE
NUM_VAL = gv_valor_final
TABLES
MATCH = MATCH
EXCEPTIONS
EXISTING_VALUE_REPLACED = 01.
IF SY-SUBRC <> 0.
RAISE INTERNAL_ERROR.
ENDIF.
ENDFUNCTION.
STEP 5: Activate the function module for Variant Configuration in transaction CU65, put there your function module, release int and in button characteristics write Z_NUM_CH_1,Z_NUM_CH_2,Z_NUM_CH_3. Flag the first two lines as they are inputs.
STEP 6: Create a Dependency ZVC_PROC_TEST of type Procedure to call the function with this code:
000010 Function ZVC_FUN_TEST
000020 (Z_NUM_CH_1 = $root.Z_NUM_CH_1,
000030 Z_NUM_CH_2 = $root.Z_NUM_CH_2,
000040 Z_NUM_CH_3 = $self.Z_NUM_CH_3)
STEP 7: Lets say I want to calculate the multiplication only upon the selection of another characteristic "Calculate" YES/NO. For this I create a characteristic in CT04 Z_CALCULATE type CHAR 1 with possible values Y or N. For the value Y y add the procedure ZVC_PROC_TEST so that formula only activates on Y.
STEP 8: Add characteristic Z_CALCULATE to class ZVC_CLASS
STEP 9: VA01, it should work -
Runtime error in functional module
they given below program is a function module calling program.while am execute this program they could display the message like as
What happened?
Error in ABAP application program.
The current ABAP program "YSUSFUN1" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
In program "SAPLYGROUP3 ", the following syntax error occurred
in the Include "LYGROUP3U01 " in line 1:
"The main program of the function "Y_INTERNAL1" does not begin with "FU"
"NCTION-POOL"."
Author and last person to change the Include are:
Author "BASIS "
Last changed by "BASIS "
Error analysis
In program "SAPLYGROUP3 ", the following syntax error occurred:
"The main program of the function "Y_INTERNAL1" does not begin with "FU"
"NCTION-POOL"."
REPORT YSUSFUN1.
TABLES YSUSTAB1.
DATA IT1 LIKE YSUSTAB1 OCCURS 2 .
SELECT * FROM YSUSTAB1 INTO TABLE IT1.
LOOP AT IT1 INTO YSUSTAB1.
WRITE: / YSUSTAB1-NAME, YSUSTAB1-ROLLNO,YSUSTAB1-PHONENO.
ENDLOOP.
CALL FUNCTION 'Y_INTERNAL1'
TABLES
IT4 = IT1 .
LOOP AT IT1 INTO YSUSTAB1.
WRITE: / YSUSTAB1-NAME, YSUSTAB1-ROLLNO, YSUSTAB1-PHONENO.
ENDLOOP.
2.)
the given below program is function module definition. while at that time of execution they could display the message as
*Syntax error in program*
*Source code LYGROUP3U01 Line 1*
*The main program of the function "Y_INTERNAL1" does not begin with*
*"FUNCTION-POOL".*
FUNCTION Y_INTERNAL1.
""Local Interface:
*" TABLES
*" IT4 STRUCTURE YSUSTAB1
LOOP AT IT4.
WRITE : IT4-name, it4-phoneno, it4-rollno.
endloop.
ENDFUNCTION.thanks
before am gone to se80 to activate the function group , am activate the function module only not activate the function group .
now am activate the function group they could not be depict the error . -
How to debug mapping function module during delta extraction?
Hi experts,
Somehow our delta is not working properly, and i would like to debug our mapping function module. How can i debug it during a delta extraction?
Some info:
Our source system is CRM and our extractor is extracting one order document (contracts in this case). I know that when we modify a contract, a bdoc is generated and then passed throught the mapping function then the extracted data to the delta queue. I just need to debug when the bdoc is being mapped to see what's wrong with the extracted data.
Thanks in advance,
VanHi,
Since you are using a Function Module for the Extraction. Edit the Function Module and give "BREAK-POINT" before the loop command. Check and activate the Function Module.
Now Extract the datasource using RSA3. Now you can debug it. After checking remove the "BREAK-POINT" from the function module. Also Check and activate the same.
Regards
Jayaram M -
RFC Function Module - Message Reference parameters are not allowed with RFC
Hi,
Ive checked the Remote-Enabled Module radio button, declared Import and Export parameters using Type typing and checked the Pass Value in export and import parameters but I still receive message Reference parameters are not allowed with RFC and not able to activate the function module.
Am I missing something?
Regards,
...NaddyHi all,
I faced the same problem and solved it ,
You have defined a reference parameter for a remotely called
function module. However, only value parameters are allowed
for this type of module.
Procedure
Change the reference parameter to a value parameter.
Guys pls .don't leave the thread un-asnwered when you solved problem , post the solution it might be useful for others also.
Regards
Krishna Acharya -
Function Module Not Getting Activated
Hi,
We are using a customised function module which we are calling in a user exit. We would like to call this function module in update task in the user exit to populate data in a custom table.
We have given the following parameters to the function module
Import Parameters
ITAB LIKE ZPRUNDAT
Export Parameters
l_subrc TYPE sy-subrc
On the attributes tab of the function module, Update Module has been selected under processing type.
When we try to activate this function module we get the following message
EXPORTING parameters are not allowed in the update task.
and the function module does not get activated. What should we change to get the function module activated?
MickHi,
Please try this....
In function module
In tables Section add this...
RETURN TYPE BAPIRET2 and then activate.
if its useful reward points -
Function module to read the the idoc
Hi abap gurus,
I have an inbound idoc coming form a wms system .The IDOC is for goods recieved . how can I read the idoc to update the inbound delivery data in the sap system ? Is there any function module to read the data from teh inbound idoc ?Hi Gaurab,
Creating a Function Module (Direct Inbound Processing)
This step describes how to create a function module which is identified by the IDoc Interface using a new process code and called from ALE (field TBD52-FUNCNAME). Direct inbound processing using a function module (not using a workflow) always includes the ALE layer. This setting (processing with function module and ALE layer) is identified by the value 6 in the field TEDE2-EDIVRS, which is read by the function module IDOC_START_INBOUND. IDOC_START_INBOUND then calls ALE.
Prerequisites
You must have completed the required steps in Defining and Using a Basic Type .
Procedure
Choose Tools ® ABAP Workbench ® Development ® Function Builder, and create a new function module.
Create the segments as global data in your function group. The function module should copy the application data from the segments into the corresponding application tables and modify the IDoc status accordingly. If an error occurs, the function module must set the corresponding workflow parameters for exception handling.
Activate the function module: From the initial screen of the Function Builder select .
In the example, create the function module IDOC_INPUT_TESTER with a global interface. The function module is called when an IDoc of type TESTER01 is received for inbound processing. You will assign an application object ("standard order") to this IDoc type and therefore maintain tables from SD. To do this, call transaction VA01 using the command CALL TRANSACTION. Please note that the intention here is not to simulate a realistic standard order, but only to illustrate how data reaches application tables from an IDoc table via segment structures (form routine READ_IDOC_TESTER) and how the function module triggers an event for exception handling (by returning suitable return variables to the ALE layer in the FORM routine RETURN_VARIABLES_FILL).
A comprehensive example of the code for an inbound function module is provided in the ALE documentation in the SAP Library under Example Program to Generate an IDoc. This function module, for example, also checks whether the logical message is correct and calls a (fictitious) second function module which first writes the application data and then returns the number of the generated document. In addition, status 53 is only set if the application document was posted correctly.
Administration parameters for IDOC_INPUT_TESTER
Application abbreviation
V (Sales and Distribution)
Processing type
Normal, start immediately
Interface for IDOC_INPUT_TESTER (global interface)
Formal parameters
Reference structure
Explanation
Import parameters
INPUT_METHOD
BDWFAP_PAR-INPUTMETHD
Describes how the function module is to be processed (example: in the background)
MASS_PROCESSING
BDWFAP_PAR-MASS_PROC
Mass inbound processing? (indicator)
Export parameters
WORKFLOW_RESULT
BDWFAP_PAR-RESULT
Set to 99999 if an event is to be triggered for error handling.
APPLICATION_VARIABLE
BDWFAP_PAR-APPL_VAR
Variable freely available from application for workflow
IN_UPDATE_TASK
BDWFAP_PAR-UPDATETASK
Asynchronous update? (indicator is not set in example)
CALL_TRANSACTION_DONE
BDWFAP_PAR-CALLTRANS
Transaction called? (indicator is not set in example)
Table
IDOC_CONTRL
EDIDC
IDoc control record
IDOC_DATA
EDIDD
IDoc data records
IDOC_STATUS
BDIDOCSTAT
IDoc status records for ALE
RETURN_VARIABLES
BDWFRETVAR
IDoc assigned to Object type method parameters.
SERIALIZATION_INFO
BDI_SER
If several IDocs are to be processed in a certain sequence: this structure contains the necessary information
Example
FUNCTION IDOC_INPUT_TESTER.
""Globale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC OPTIONAL
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
initialize SET/GET Parameter and internal tables
PERFORM INITIALIZE_ORGANIZATIONAL_DATA.
Move IDOC to internal tables of application
PERFORM READ_IDOC_TESTER.
call transaction Order Entry VA01
PERFORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
set status value
perform write_status_record using errorcode.
return values of function module
PERFORM RETURN_VARIABLES_FILL USING ERRORCODE.
ENDFUNCTION.
FORM INITIALIZE_ORGANIZATIONAL_DATA.
initialize SET/GET parameters
SET PARAMETER ID 'VKO' FIELD SPACE.
SET PARAMETER ID 'VTW' FIELD SPACE.
SET PARAMETER ID 'SPA' FIELD SPACE.
SET PARAMETER ID 'VKB' FIELD SPACE.
SET PARAMETER ID 'VKG' FIELD SPACE.
initialize internal tables
REFRESH BDCDATA.
CLEAR BDCDATA.
CLEAR BELEGNUMMER.
CLEAR ERRTAB.
REFRESH ERRTAB.
REFRESH XBDCMSGCOLL.
CLEAR XBDCMSGCOLL.
ENDFORM. " INITIALIZE_ORGANIZATIONAL_DATA
FORM READ_IDOC_TESTER.
PERFORM INITIALIZE_IDOC.
LOOP AT IDOC_DATA
WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
header data
WHEN 'E1HEAD'.
MOVE IDOC_DATA-SDATA TO E1HEAD.
PERFORM PROCESS_SEGMENT_E1HEAD.
position data
WHEN 'E1ITEM'.
MOVE IDOC_DATA-SDATA TO E1ITEM.
PERFORM PROCESS_SEGMENT_E1ITEM.
ENDCASE.
ENDLOOP.
only when there were one or more items
CHECK FIRST NE 'X'.
APPEND XVBAP. "last one
ENDFORM. " READ_IDOC_TESTER
FORM INITIALIZE_IDOC.
CLEAR XVBAK.
REFRESH XVBAP.
CLEAR XVBAP.
POSNR = 0.
FIRST = 'X'.
ENDFORM. " INITIALIZE_IDOC
FORM PROCESS_SEGMENT_E1HEAD.
requested date of delivery
WLDAT = E1HEAD-WLDAT.
delivery date
XVBAK-BSTDK = E1HEAD-BSTDK.
customer number
XVBAK-KUNNR = E1HEAD-AUGEB.
order number
XVBAK-BSTNK = E1HEAD-BELNR.
division
XVBAK-SPART = E1HEAD-SPART.
distribution channel
XVBAK-VTWEG = E1HEAD-VTWEG.
sales organization
XVBAK-VKORG = E1HEAD-VKORG.
order type
XVBAK-AUART = E1HEAD-AUART.
do not fill incoterms (inco1, inco2)
customer function
CALL CUSTOMER-FUNCTION '001'
EXPORTING
PI_VBAK621 = XVBAK
IMPORTING
PE_VBAK621 = XVBAK
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
ENDFORM. " PROCESS_SEGMENT_E1HEAD
FORM PROCESS_SEGMENT_E1ITEM.
position number
XVBAP-POSNR = XVBAP-POSNR + 1.
amount
XVBAP-WMENG = E1ITEM-MENGE.
unit
CALL FUNCTION 'ISO_TO_SAP_MEASURE_UNIT_CODE'
EXPORTING
ISO_CODE = E1ITEM-BMEINH
IMPORTING
SAP_CODE = XVBAP-VRKME
EXCEPTIONS
OTHERS = 0.
material number
XVBAP-MATNR = E1ITEM-LMATNR.
CALL CUSTOMER-FUNCTION '002'
EXPORTING
PI_VBAP621 = XVBAP
IMPORTING
PE_VBAP621 = XVBAP
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
APPEND XVBAP.
ENDFORM. " PROCESS_SEGMENT_E1ITEM
FORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
call transaction first dynpro
PERFORM DYNPRO_START.
call transaction double-line entry
PERFORM DYNPRO_DETAIL2.
incoterms
PERFORM DYNPRO_HEAD_300.
call transaction item datas
PERFORM DYNPRO_POSITION.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'SICH'.
determine input method
IF INPUT_METHOD IS INITIAL.
INPUT_METHOD = 'N'.
ENDIF.
call transaction VA01
CALL TRANSACTION 'VA01' USING BDCDATA
MODE INPUT_METHOD
UPDATE 'S'
MESSAGES INTO XBDCMSGCOLL.
errorcode = SY-SUBRC. " remember returncode for status update
ENDFORM. " CALL_VA01_IDOC_ORDERS
form write_status_record using errorcode.
FILL IDOC_STATUS
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IF ERRORCODE = 0.
IDOC_STATUS-STATUS = BELEG_GEBUCHT. "value 53
GET PARAMETER ID 'AUN' FIELD BELEGNUMMER.
IDOC_STATUS-MSGID = 'V1'.
IDOC_STATUS-MSGNO = '311'.
IDOC_STATUS-MSGV1 = 'Terminauftrag'.
IDOC_STATUS-MSGV2 = BELEGNUMMER.
ELSE.
IDOC_STATUS-STATUS = BELEG_NICHT_GEBUCHT. "value 51
IDOC_STATUS-MSGID = SY-MSwGID.
IDOC_STATUS-MSGNO = SY-MSGNO.
IDOC_STATUS-MSGV1 = SY-MSGV1.
IDOC_STATUS-MSGV2 = SY-MSGV2.
IDOC_STATUS-MSGV3 = SY-MSGV3.
IDOC_STATUS-MSGV4 = SY-MSGV4.
ENDIF.
APPEND IDOC_STATUS.
ENDFORM.
FORM DYNPRO_START.
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
DYNPRO-EINSTIEG
CHANGING LAST_DYNPRO.
ordertype
PERFORM DYNPRO_SET USING 'VBAK-AUART' XVBAK-AUART.
sales organization
PERFORM DYNPRO_SET USING 'VBAK-VKORG' XVBAK-VKORG.
Distribution channel
PERFORM DYNPRO_SET USING 'VBAK-VTWEG' XVBAK-VTWEG.
Division
PERFORM DYNPRO_SET USING 'VBAK-SPART' XVBAK-SPART.
Sales office
PERFORM DYNPRO_SET USING 'VBAK-VKBUR' XVBAK-VKBUR.
Sales group
PERFORM DYNPRO_SET USING 'VBAK-VKGRP' XVBAK-VKGRP.
ENDFORM. " DYNPRO_START
FORM DYNPRO_NEW USING PROGNAME
DYNPRONR
CHANGING LAST_DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGNAME.
BDCDATA-DYNPRO = DYNPRONR.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
LAST_DYNPRO = DYNPRONR.
ENDFORM. " DYNPRO_NEW
FORM DYNPRO_SET USING FELDNAME
FELDINHALT.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
dynpro field name
BDCDATA-FNAM = FELDNAME.
contents
BDCDATA-FVAL = FELDINHALT.
APPEND BDCDATA.
ENDFORM. " DYNPRO_SET
FORM DYNPRO_DETAIL2.
okcode
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-UER2.
fix dynpro number 4001
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
'4001'
CHANGING LAST_DYNPRO.
order party
PERFORM DYNPRO_SET USING 'KUAGV-KUNNR' XVBAK-KUNNR.
purchase order number
PERFORM DYNPRO_SET USING 'VBKD-BSTKD' XVBAK-BSTNK.
requested delivery date
PERFORM DYNPRO_DATE_SET USING 'VBKD-BSTDK' XVBAK-BSTDK.
purchase order date
PERFORM DYNPRO_DATE_SET USING 'RV45A-KETDAT' WLDAT.
ENDFORM. " DYNPRO_DETAIL2
FORM DYNPRO_DATE_SET USING FELDNAME
FELDINHALT.
DATA: DATE TYPE D.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
BDCDATA-FNAM = FELDNAME.
WRITE FELDINHALT TO DATE.
BDCDATA-FVAL = DATE.
APPEND BDCDATA.
ENDFORM. " DYNPRO_DATE_SET
FORM DYNPRO_HEAD_300.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-KKAU.
incoterms part 1
IF NOT XVBAK-INCO1 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO1' XVBAK-INCO1.
ENDIF.
incoterms part 2
IF NOT XVBAK-INCO2 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO2' XVBAK-INCO2.
ENDIF.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'BACK'.
ENDFORM. " DYNPRO_HEAD_300
FORM DYNPRO_POSITION.
LOOP AT XVBAP.
dynpro item double line entry
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'UER2'.
IF XVBAP-POSNR = 1.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(01)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(01)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(1)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(1)' XVBAP-VRKME.
ELSE.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'POAN'.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(02)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(02)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(02)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(02)' XVBAP-VRKME.
ENDIF.
ENDLOOP.
ENDFORM. " DYNPRO_POSITION
FORM RETURN_VARIABLES_FILL USING ERRORCODE.
allocate IDOC numbers to Workflow output parameters
IF MASS_PROCESSING <> SPACE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = PID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
RETURN_VARIABLES-WF_PARAM = APO.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
RETURN_VARIABLES-WF_PARAM = EID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ELSE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = APE.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ENDIF.
ENDFORM. " RETURN_VARIABLES_FILL
Globale Daten von IDOC_INPUT_TESTER
TABLES: E1HEAD, E1ITEM.
DATA: BEGIN OF BDCDATA OCCURS 500.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA: BEGIN OF XVBAK. "Kopfdaten
INCLUDE STRUCTURE VBAK621.
DATA: END OF XVBAK.
DATA: BEGIN OF XVBAP OCCURS 50. "Position
INCLUDE STRUCTURE VBAP.
DATA: WMENG(18) TYPE C.
DATA: LFDAT LIKE VBAP-ABDAT.
DATA: KSCHL LIKE KOMV-KSCHL.
DATA: KBTRG(16) TYPE C.
DATA: KSCHL_NETWR LIKE KOMV-KSCHL.
DATA: KBTRG_NETWR(16) TYPE C.
DATA: INCO1 LIKE VBKD-INCO1.
DATA: INCO2 LIKE VBKD-INCO2.
DATA: YANTLF(1) TYPE C.
DATA: PRSDT LIKE VBKD-PRSDT.
DATA: HPRSFD LIKE TVAP-PRSFD.
DATA: END OF XVBAP.
DATA: BEGIN OF DYNPRO,
EINSTIEG LIKE T185V-DYNNR VALUE 101,
KKAU LIKE T185V-DYNNR,
UER2 LIKE T185V-DYNNR,
KBES LIKE T185V-DYNNR,
ERF1 LIKE T185V-DYNNR,
PBES LIKE T185V-DYNNR,
PKAU LIKE T185V-DYNNR,
PEIN LIKE T185V-DYNNR,
EID1 LIKE T185V-DYNNR,
POPO LIKE T185V-DYNNR,
EIPO LIKE T185V-DYNNR,
KPAR LIKE T185V-DYNNR,
PSDE LIKE T185V-DYNNR,
PPAR LIKE T185V-DYNNR,
KDE1 LIKE T185V-DYNNR,
KDE2 LIKE T185V-DYNNR,
PDE1 LIKE T185V-DYNNR,
PDE2 LIKE T185V-DYNNR,
PKON LIKE T185V-DYNNR,
END OF DYNPRO.
DATA: BEGIN OF PANEL,
KKAU LIKE T185V-PANEL VALUE 'KKAU',
UER2 LIKE T185V-PANEL VALUE 'UER2',
KBES LIKE T185V-PANEL VALUE 'KBES',
ERF1 LIKE T185V-PANEL VALUE 'ERF1',
PBES LIKE T185V-PANEL VALUE 'PBES',
PKAU LIKE T185V-PANEL VALUE 'PKAU',
PEIN LIKE T185V-PANEL VALUE 'PEIN',
EID1 LIKE T185V-PANEL VALUE 'EID1',
EIAN LIKE T185V-PANEL VALUE 'EIAN',
POPO LIKE T185V-PANEL VALUE 'POPO',
EIPO LIKE T185V-PANEL VALUE 'EIPO',
KPAR LIKE T185V-PANEL VALUE 'KPAR',
PSDE LIKE T185V-PANEL VALUE 'PSDE',
POAN LIKE T185V-PANEL VALUE 'POAN',
PPAR LIKE T185V-PANEL VALUE 'PPAR',
KDE1 LIKE T185V-PANEL VALUE 'KDE1',
KDE2 LIKE T185V-PANEL VALUE 'KDE2',
PDE1 LIKE T185V-PANEL VALUE 'PDE1',
PDE2 LIKE T185V-PANEL VALUE 'PDE2',
PKON LIKE T185V-PANEL VALUE 'PKON',
KOAN LIKE T185V-PANEL VALUE 'KOAN',
END OF PANEL.
DATA: BEGIN OF ERRTAB OCCURS 20,
TRANS LIKE TSTC-TCODE,
ARBGB LIKE T100-ARBGB,
CLASS(1) TYPE C,
MSGNR LIKE T100-MSGNR,
TEXT LIKE T100-TEXT,
TEXT(123) TYPE C,
MSGV1 LIKE SY-MSGV1,
MSGV2 LIKE SY-MSGV2,
MSGV3 LIKE SY-MSGV3,
MSGV4 LIKE SY-MSGV4,
END OF ERRTAB.
*---- Hilfsfelder -
DATA: PROGRAMM_AUFTRAG LIKE T185V-AGIDV VALUE 'SAPMV45A'.
DATA: LAST_DYNPRO LIKE T185V-DYNNR,
WLDAT LIKE VBAK-BSTDK,
POSNR LIKE VBAP-POSNR,
FIRST(1) TYPE C VALUE 'X'.
DATA: BEGIN OF XBDCMSGCOLL OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF XBDCMSGCOLL.
Terminauftrag ( Auftragsart wird fest gesetzt !)
DATA: BELEGNUMMER LIKE VBAK-VBELN.
DATA: ERRORCODE LIKE SY-SUBRC.
Statuswerte fuer IDOC-Status
DATA: BELEG_NICHT_GEBUCHT LIKE TEDS1-STATUS VALUE '51'.
DATA: BELEG_GEBUCHT LIKE TEDS1-STATUS VALUE '53'.
*- Direktwerte für Return_variables -
data:
eid like bdwfretvar-wf_param value 'Error_IDOCs',
pid like bdwfretvar-wf_param value 'Processed_IDOCs',
apo like bdwfretvar-wf_param value 'Appl_Objects',
ape like bdwfretvar-wf_param value 'Appl_Object'.
*- Direktwerte für Workflow_Result -
DATA: C_WF_RESULT_ERROR LIKE BDWFAP_PAR-RESULT VALUE '99999'.
thanks
karthik
DATA: C_WF_RESULT_OK LIKE BDWFAP_PAR-RESULT VALUE '0'. -
Error in extracting data through function module
Hi All
Need ur help .I am extracting data from crm thru function module.I have copied RSAX_BIW_GET_DATA_SIMPLE and modified it by using code.I am getting an error while testing extraction
Structure I have created ztest_01
Data Source :zmgc_ds1.
There 3 crm tables from where data is picked crmd_orderadm_h,crmd_customer_h,crmd_order_index.
I am attaching the code,can any body help me in correctring the error.Tell me if tthe placing of the code in the template is correct.please give details.
Error which I got:
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_FUNC', was
not caught in
procedure "RSA3_GET_DATA_SIMPLE" "(FUNCTION)", 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:
The program "SAPLRSA3" contains the CALL FUNCTION statement.
The name of the function module to be called is "ZRSAX_BIW_GET_DATA_SIMPLE_01"
but "ZRSAX_BIW_GET_DATA_SIMPLE_01" cannot be found in its function group.
Possible reasons:
a) The function module "ZRSAX_BIW_GET_DATA_SIMPLE_01" has not been activated.
Therefore,
it cannot be found at runtime.
b) The Function Library contains an incorrect entry for
"ZRSAX_BIW_GET_DATA_SIMPLE_01".
c) The function module contains no code, even FUNCTION ... ENDFUNCTION
is missing.
You help would be appreciated.
Don't worry about points,.Did you create your function module without problems...assigned the Z* function group? activate the function module? i assume that you copy the function module code and the variables definition on TOP include of RSAX_BIW_GET_DATA_SIMPLE
Regards
Message was edited by:
Oscar Díaz
Maybe you are looking for
-
Blank CD's do not show up on desktop
I have a G5 Imac. When is insert a blank disc it does not show on desktop. Recorded disc do. It work the day before and now it will not let me copy files or burn.
-
My Macbook pro has slowed down drastically after upgrading to 10.9.2. It has become so slow that i can hardly use it. I did an etrcheck Hardware Information: MacBook Pro (13-inch, Mid 2012) MacBook Pro - model: MacBookPro9,2
-
My music won't go on my ipod touch... Help
Last week I bought a vinyl record that came with a free digital download from soundtrax.com. I downloaded it, and it is currently in my iTunes library. It plays the songs on the album, the album has artwork, it is completly fine. However, I cannot pu
-
XML Spy Error while testing the SOAP request
Hi, I have generated a webservice from an XI scenario, I am trying to test the webservice through XML Spy. I am getting the following error when I am sending the SOAP request. Where do we specify the authentication information (user/pwd) in XML Spy.
-
How To Remove PHP Extension File Association With Internet Explorer
When I select a PHP file to open it is redirected to be downloaded and opened (or I can choose to save) in Internet Explorer. I need to test the file in different browsers. How can I remove this automatic association? I've tried selecting a php fil