Dought regarding Function module
Hi ,
I have small dought regarding fm....
since Read_text is a function module can it be changed to RFC , since i need to retrive data from sap to informatica .
since some of the long text are also need to retrived to a non sap system .
if i creat a zread _text as a RFC .
will this work .am i in the right path ,need ur advice on the same .
if its right what are the steps needs to be followed .to create a zread_text
Thanks ,
VInay .
Create a new function module in SE37, e.g. Z_RFC_READ_TEXT and tick that it is RFC enabled. The Import, Export, and Tables parameters should mirror those in READ_TEXT, but you might like to add another table so you can return any exception messages to the caller (e.g. "OT_RETURN" with a structure like BAPIRET2)... you might also have local standard for naming parameters in custom code which you may need to follow. Inside your "Z" function module you just call 'READ_TEXT' using the parameters of the "Z" function. Any exceptions from 'READ_TEXT' should be added into OT_RETURN so that the external caller can be advised of the problem.
Similar Messages
-
query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)
shopping cart
Hi in FM SPOOL_RQ_READ_BAPI_EXPORTS
i want to relate the internal tables requisition_items and requisition_services.
but in am not getting the key on which they should be joined
here i have to take the quantity and other fields from requisition_services
right now i am using the joining condition as
requisition_items-pckg_no = requisition_services-pckg_no.
any help in this regard is welcome.
Thanks and regards,
VithalprasadHi Kathirvel,
Thank you for reply. I am making changes for standard code only.
" Call FM SPOOL_DPO_READ_BAPI_EXPORTS to read PO data exported to backend.
Use this data to call FM B46B_DPO_TRANSFER and copy errors tab from
' lt_bapi_return ' to ' et_messages' retrun tab in 'doc_check' badi. "
Thank you.
Regards, Sunu -
Regarding Function Module 'SO_NEW_DOCUMENT_SEND_API1'
Hi All,
I am having a issue in using Function Module 'SO_NEW_DOCUMENT_SEND_API1'.
<b>I am presently sending the E-mail as follow:</b>
From: [email protected]
To: [email protected]
Subject: You have Missing Time
Please Do Not Respond To This E-mail ***
BOHAN JAMES P. S25751
07/01/2005 4.00 HRS
07/07/2005 4.00 HRS
07/27/2005 1.50 HRS
For any missing time greater than 30 calendar days, please complete a Salary Request for Labor Hours Transfer Form (SA8250). If you have any questions, please contact Salary Timekeeping on extension 6-5571 or 6-5500.
<b>But the user wants it to be in following way:</b>
From: [email protected] [mailto:[email protected]]
Sent: Monday, August 15, 2005 10:44 AM
To: [email protected]
Subject: You have Missing Time
Please Do Not Respond To This E-mail ***
BOHAN JAMES P. S25751
07/01/2005 4.00 HRS
07/07/2005 4.00 HRS
07/27/2005 1.50 HRS
For any missing time greater than 30 calendar days, please complete a Salary Request for Labor Hours Transfer Form (SA8250). If you have any questions, please contact Salary Timekeeping on extension 6-5571 or 6-5500.
<i>I want following Extra row to be added in when i send Emails to recipients.They should receive Date & Time when i sent that E-mail in following way.</i>
<b>Sent: Monday, August 15, 2005 10:44 AM</b>
Can any body help how can i solve this issue.
Thanks in advance.
Thanks & Regards,
Rayeezuddin.Hi,
check this link:
http://www.sapdevelopment.co.uk/reporting/email/email_sapmail.htm
It has options for date and time while sending a mail.
Best Regards,
Anjali -
Regarding function module in update task
Hi,
I have a function module(Zxxx) which is update type. i have called the fun.module in my program (Zyyy) using the syntax CALL FUNCTION ZXXX IN UPDATE TASK. As I suppose to debug the function module, I activated the update debugging in the debugging screen. But the controll still not goen into the function module. Please let me know solution.
Thanks & regards,
Suresh>
sureshkumar vaniyasekar wrote:
> I activated the update debugging in the debugging screen. But the controll still not goen into the function module.
Hello Suresh,
What do you mean by not going?
If you are trying to do an F5 at the function call, the debugger is not "enter" into the FM. This is because at this point the function call is registered but the FM is not executed.
Update FM calls registered in a particular LUW are executed(in a special "UPD" workprocess) when there is a COMMIT encountered(may be explicit or implicit).
Did you read the online help on [Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm] & [Breakpoint behaviour during Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617cbee68c11d2b2ab080009b43351/content.htm]?
BR,
Suhas -
Regarding Function module HR_MAINTAIN_MASTERDATA.
hi experts,
i have a requirement where in i need to inseert data in to infotype:0000,0001,0105,9010,0041 and update the infotypes:0015,0014,0008,0009 by using function module HR_MAINTAIN_MASTERDATA . i have used ACTIO as 'INS' and 'MOD' (since T589A table doesn't contain the 'UPD' operation).
but using this "MOD' i am unable to update all the infotypes, instead it is throwing the error as entry doesn't exist in T589A for P.
i need to know whether the following code is correct or not and also to overcome the error.. Please let me know the changes needed.
DATA: BEGIN OF IT_INFTY,
INFTY TYPE PPROP-INFTY,
END OF IT_INFTY .
DATA: LV_PERNR TYPE PSPAR-PERNR.
LV_PERNR = '430102'.
if ( IT_INFTY-infty = '0000' or IT_INFTY-infty = '0001'
or IT_INFTY-infty = '9010'
or IT_INFTY-infty = '0105' OR IT_INFTY-infty = '0041' ).
LV_OPERATION = 'INS'.
elseif ( IT_INFTY-infty = '0007' or IT_INFTY-infty = '0008'
or IT_INFTY-infty = '0014' or IT_INFTY-infty = '0015').
LV_OPERATION = 'MOD'.
endif.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = LV_PERNR "WA_SOURCE_DATA-pernr
IMPORTING
RETURN =
LOCKING_USER = sy-uname
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = LV_PERNR
MASSN =
ACTIO = LV_OPERATION "'INS'
TCLAS = 'A'
BEGDA = SY-DATUM
ENDDA = '99991231'
OBJPS =
SEQNR =
SPRPS =
SUBTY = lv_subty
WERKS =
PERSG =
PERSK =
PLANS =
DIALOG_MODE = '2'
LUW_MODE = '1'
NO_EXISTENCE_CHECK = ' '
NO_ENQUEUE = ' '
IMPORTING
RETURN = RC
RETURN1 = RC1
HR_RETURN =
TABLES
PROPOSED_VALUES = PROPOSED_VALUES
MODIFIED_KEYS =
write : / rc-message.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = LV_PERNR "WA_SOURCE_DATA-pernr
IMPORTING
RETURN =
kindly suggest.
regards,
joy.hi,
i have a similar situation wherein i need to use the two operations insert and modifications for the infotypes.
the problem i am facing is ,i need to put the logic in a method and it doesnt allow the usage of with header line. so how can we refer to the fields if the following logic is used.
TYPES : begin of ty_infty,
infty TYPE pprop-infty,
END OF ty_infty.
DATA: it_INFTY TYPE STANDARD TABLE OF TY_INFTY,
proposed_values TYPE pprop occurs 0 with header line,
wa_INFTY TYPE TY_INFTY.
*************************updation of 0000***********************
lv_fval = '01'.
wa_proposed_values-infty = '0000'.
wa_proposed_values-fname = 'P0000-MASSG'.
wa_proposed_values-fval = LV_FVAL.
wa_proposed_values-fname = '00'.
append wa_proposed_values to proposed_values.
it_infty-infty = wa_proposed_values-infty.
clear wa_proposed_values.
***similarly we update the values for other infotypes
if ( it_infty-infty = '0000' or it_infty-infty = '0001'
or it_INFTY-infty = '0041' or it_INFTY-infty = '9010'
or it_INFTY-infty = '0105').
lv_operation = 'INS'.
elseif ( it_INFTY-infty = '0007' or it_INFTY-infty = '0014' ).
"or IT_INFTY-infty = '0014' or IT_INFTY-infty = '0015').
lv_operation = 'MOD'.
endif.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = lv_pernr
IMPORTING
RETURN =
LOCKING_USER = sy-uname
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = lv_pernr
MASSN =
ACTIO = lv_operation
TCLAS = 'A'
BEGDA = SY-DATUM
ENDDA = '99991231'
OBJPS =
DIALOG_MODE = '2'
LUW_MODE = '1'
NO_EXISTENCE_CHECK = ' '
NO_ENQUEUE = ' '
IMPORTING
RETURN = rc
RETURN1 = rc1
HR_RETURN =
TABLES
PROPOSED_VALUES = proposed_values
MODIFIED_KEYS =
write : / rc-message.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = lv_pernr
IMPORTING
RETURN =
here its giving an error that it_infty is a table without headerline and has no field as infty.
how to over come this, please guide me in this regard. if this is not the correct logic please tell me the appropraite one..
thanks in advance,
Durga. -
Regarding Function module call
Hi Guru s
Can any body explain how many Function modules are stored in One function group.
And What happen when I call 1 function module in a F.Group.
Thanks in advance,
Kumar.Hi,
Function group can be defined it as collection of Function
modules. This Function groups are presents in the Packages
where we can create in the SE38. So,that all packages are
consists in the Function Groups.All function groups are
consists Function Modules.This function modules are created
at enhancements/Exists.
A function group can hav any no. of FM's.
there is no restriction.
reward if useful
thanks and regards
suma sailaja -
Regarding function module to convert hours to minutes and seconds to minute
hi all,
is there any function module to convert hours to minutes and seconds to minutes....if so please guided me....i hav req like this...want to convert all those to minutes[seconds and hours]....Hi,
Use FM
SD_CALC_DURATION_FROM_DATETIME
Pass paramters like
I_DATE1 16.09.2008
I_TIME1 10:33:00
I_DATE2 16.09.2008
I_TIME2 19:00:00
and you will get the result as below..
E_TDIFF 8:27
8 hours and 27 minutes...
Now u can use this values of hours and minutes to get the exact wage type values... get the details from HR module and multiply it with the hours and minute and calculate it...
Use Offsets and get the hour and minute value from E_TDIFF
Hope it will solve your problem..
Thanks & Regards,
Naresh -
Regarding Function Module AC_DOCUMENT_RECORD
Hi All,
I am working on one Report in which I am calling the function module
<b>AC_DOCUMENT_RECORD</b>. I am Exporting values for all the parameters to this function except
I_AWSYS, I_AWTYP_INCL,I_AWTYP_EXCL.
These parameters will be treated as Default to SPACE.
Can anyone please tell me what these parameters are and what type of value or what value shall
I Export to these Parameters.
Regards,
RishiDear Rishi,
All these three parameters are optional. You can comment them if you do not want to pass any data. The system would treat them as SPACE.
I_AWSYS - Logical System (Character Type of Length 10: ACCHD-AWSYS)
I_AWTYP_INCL - Reference procedure (Character Type of Length 5 :ACCHD-AWTYP)
I_AWTYP_EXCL - Reference procedure (Character Type of Length 5 :ACCHD-AWTYP)
Regards,
Naveen. -
ABAP Programing help regarding function modules coding
Hi,
i'm currently creating a function module that retrieve a number from a table and add one to it and return back the value to the table.
the codes are as follow:
FUNCTION ZFM_NUMBER
" * " Local Interface:
" EXPORTING
" VALUE (ZZNUMBER) TYPE ZNUMBER
" VALUE (ZENUMBER) TYPE ZNUMBER
SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
END SELECT.
ZENUMBER = ZZNUMBER + 1.
UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
END FUNCTION.
this function module works finely, but now i need to concatenate the number with the year to store it into another table.
i know something about the sysdatum where i select only the first 4 characters...but i'm not sure how could i do that?
do i need to create another function module to call the above function module and concatenate it with the year?
or i just need to continue the codes in the same function module?
and how should i code it?
i'm very new to abap coding and i could'nt get help from anyone in my team. your help is very much appreciated!!!
Thanks,
leesyyhi you can do it in the same function module.
SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
END SELECT.
instead of the above statement use the following statement, it improves performance of your program
SELECT single ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
in the above statement you can also specify some where condition
ZENUMBER = ZZNUMBER + 1.
UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
data: var_date type sy-datum,
var_yyyy(4) type c,
var_numyear(10) type c.
var_date = sy-datum.
var_yyyy = var_date+0(4).
concatenate ZENUMBER var_yyyy into var_numyear.
UPDATE ZTAB_NUMyear SET ZNUMyear = var_numyear WHERE ZNUMBER = ZZNUMBER.
Regards
Sajid
Edited by: shaik sajid on Jan 14, 2010 5:08 AM
Edited by: shaik sajid on Jan 14, 2010 5:09 AM -
Regarding Function Module for Locking ( enque)
Hi,
I am facing a Problem that is when iam running Call transaction one popup is coming because some other user currently editing that Tcode at that time i need to lock tcode using enque specially for table . If suppose some other user editing at that time it will shoe that popup and it will exit from their with out doing any other process For that i need Function module for Lock and Delock.
thanks in advance,
murali krishna.So in this example, I am doing a loop and check for a lock, if I don't get one, I wait for 5 seconds, this loop continues untill 30 seconds, no lock then it quits and gives message.
report zrich_0001.
data: counter type i.
parameters: p_equnr type equi-equnr.
start-of-selection.
clear counter.
do.
Exhausted, no luch in getting a lock, get of of DO loop.
if counter > 6.
sy-subrc = 1.
exit.
endif.
Try for lock
call function 'ENQUEUE_EIEQUI'
exporting
mode_equi = 'E'
mandt = sy-mandt
equnr = p_equnr
_wait = 'X'
exceptions
foreign_lock = 1
system_failure = 2
others = 3.
Got a lock, get out of DO loop.
if sy-subrc = 0.
exit.
endif.
Still here? Then wait another 5 seconds
wait up to 5 seconds.
counter = counter + 1.
enddo.
Report status
case sy-subrc.
when 0.
message s001(00) with 'Lock could not be established'.
when 1.
message i001(00) with 'Lock could not be established'.
endcase.
Regards,
rewards point -
Regarding Function module exits
Hi,
function module exit :EXIT_SAPLAFAR_002
include in function module exit :ZXAFAU02
include exit is implemented :LAFARF70
Main Program :SAPLAFAR
Please help me how to execute this funcion moduel exit, and how to work on it, I could not find out any transaction for it, and provide me some links to understand the use of function module exits.
Thanks & Regards,
vinesh.Hi,
User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
The naming standard of function modules for functionmodule exits is:
EXIT_<program name><3 digit suffix>
The call to a functionmodule exit is implemented as:
CALL CUSTOMER.-FUNCTION <3 digit suffix>
To find a Exit.
Goto Transaction -- Find The Package
SMOD >f4>Use the Package here to Find the Exits In the Package.
Else if you Want to search by Application Area wise ,
There is one more tab to find the Exits in the Respective Application Area.
Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
Now Run ur Transaction to Check if it Triggers.
Thats it..
Suppose you need to find out all the user exits related to a tcode.
1. Execute the Tcode.
2. Open the SAP program.
3. Get the Development Class.
4. Execute Tcode SE84.
5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
6. Enter the Development class and execute.
Check out this thread..
The specified item was not found.
1. Type the transaction : system->status-> <PROG. NAME>
2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
3. Open CMOD utilities->SAP enhancements
EDIT->All selections
4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
5. The displayed list contains the enhancements names for the transaction You were looking for.
6. Create a project in CMOD and the code in default include->activate.
http://www.erpgenie.com/sap/abap/code/abap26.htm
which gives the list of exits for a tcode
http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
For information on Exits, check these links
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.planetsap.com/userexit_main_page.htm
User-Exits
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/ab038.htm
http://www.planetsap.com/userexit_main_page.htm
http://www.sap-basis-abap.com/sapab013.htm
http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
These links will help you to learn more on user exits.
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
http://www.planetsap.com/userexit_main_page.htm
http://www.allsaplinks.com/user_exit.html
www.sap-img.com/abap/what-is-user-exits.htm
Also please check these threads for more details about user exits.
Re: Screen exit
user exit and customer exit
user exit
1. Document on UserExits in FI/CO
http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
2. Finding User Exits...
http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
3. List of all User Exits...
http://www.planetsap.com/userexit_main_page.htm
Reward if Helpful. -
Query regarding Functional Modules
Hi All Experts,
I want to know that, of all the functional modules(e.g. SD, MM, FI, etc., etc.) in SAP which one is the easiest ? Can you all please provide me a complete link to that so that i am able to learn it quickly and have enough knowledge(i.e. satisfactory knowledge) to it ?
Also, i want to know where can i get a good knowledge of SAP-FI module ? I want to know how much time will i take to have a satisfactory knowledge of SAP-FI ? ?HI ,
Check these link on SD module which helps you lot to start of Your SD
http://help.sap.com/saphelp_47x200/helpdata/en/06/57683801b5c412e10000009b38f842/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/8c/df293581dc1f79e10000009b38f889/frameset.htm
http://sap-img.com/sap-sd.htm
http://planetsap.com/logictics_SD_main_page.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/SDSLS/SDSLS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_SD.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/dd/55f33e545a11d1a7020000e829fd11/frameset.htm
http://www.sap-basis-abap.com/sapsd.htm
http://www.sapgenie.com/abap/tables_sd.htm
http://searchsap.techtarget.com/featuredTopic/0,290042,sid21_gci961718,00.html
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/SD_tutorial.html
For MM module
http://www.easymarketplace.de/online-pdfs.php
Best Practices Guide:
http://help.sap.com/bp_bblibrary/500/html/J05_MM_EN_IN.htm
http://help.sap.com/bp_bblibrary/500/html/J24_SDExtend_EN_IN.htm
Configuration Tips:
http://www.sap-basis-abap.com/sapmmpur.htm
http://www.sap-img.com/materials/sap-mm-configuration-tips.htm
http://www.erpgenie.com/sapfunc/mm.htm
Regards
Sridhar Goli -
Regarding Function Module trace.
Hi,
How are you ?. I need a help for Function Module datasources of how to get info of fields related to tables. I tried ST05 of SQL Trace but not showing complete picture and I heard through ST12 can do Function module trace to obtain table names. Can you kindly walk me through of how to Obtain table names for fields for Function Module Datasources through ST12 or any tcode in detail.
Thanks in advance.
Regards
Srinivas M.Hi Srinivas,
I suggest to first have a look at the SAP Help for Business Content DataSource. You might find information on the source tables here.
As a next step you can have a look in the coding of the Function Module or debug it. You have to look to statements like TABLES and SELECT.
As a last step (and maybe time-consuming) execute an SQL Trace using t/code ST05 during executing t/code RSA3 in the Source System.
Best regards,
Sander -
Regarding Function Module concept
Hi All,
Is the Function Module concept meant only for modularity or something to do with the performace also. Please clarify this.
Thank you
Satya PriyaHi Satya,
Function Modules is used for modularity & performance both.
In case you dont have a standard extractor suiting to your needs....you need to do complex selects(involves several tables based on your requirement rather than just a table or view selection) , transform your data(manpuliate your data..)....and pass it through data packets..
If the join condition is not possible in the view .then we go with Function module.
The function module must meet the requirements of a specific interface. The system checks both in Customizing as well as when you use a method in layout, whether the function module is active in the system and whether it meets the requirements of the interface.
Reward points if helpful.
Regards,
Hemant. -
Regarding function module BDC_INSERT
when we use the function module BDC_INSERT , in BDC using sessions , why it picks up the first record agagin and again from BDCDATA internal table though there are multiple records.
with regards
varmaHi ravi,
perform open_group.
loop at itab.
refresh bdcdata.
perform insert_group.
endloop.
perform close_group.
Regards,
Nagaraj
Maybe you are looking for
-
The last update is blocking my Itunes
Two days ago I received an update notice for Itunes. I ran the update. the update failed with a error message. Now I'm not able to open Itunes. I tried to re-install but I aways get the error message Service 'Apple Mobile Device failed to start. Very
-
How to calculate output page size of pdf map request?
Hello, i have a problem regarding requesting a map as pdf and the resulting page size of the pdf in MapViewer version Ver11_B071001. i defined a bbox in srid 82015 that has a width of 297m and a height of 420m. The scale is 1:1000. According to the d
-
I am trying to implement flash player detection using the Flash Player Detection Kit - the actionscript way ie. using the 'flash_detection.as' and the 'flash_detection.swf', (not forgetting the 'update_flash.html' file also! ) I put the swf onto my '
-
I was trying to create a photo stream in iPhoto (attempt to use the iCloud) when this message box came up: "iPhoto cannnot create a new library in this location because you dont have enough access priveleges" What do I have to do to correct this?
-
Word Starter 2010 for MacBook Air 13"
Does Word Starter 2010 come with the MacBook Air 13"?