Can I CALL FUNCTION 'SPBT_INITIALIZE' many times ?
Hi ABAP Expert,
I need your advise whether is recommended to calling FUNCTION 'SPBT_INITIALIZE' to get updated information regarding available background process for parallel processing in ABAP.
Because if i just call this program 1 time at the beginning and the report running quite long, the information is not updated anymore.
Please advise.
Thank you in advance
Fernand.
Hi
what you can do is create form and perform
write your code for that FM in Form part and use perform wherever in your program you want to use.
whenever the perform will be triggered it will go to the form part where you are calling the FM.
I hope this way you can use it multiple time without calling it every time from pattern.
But I am not sure whether it is a good approach or not?
thanks
Lalit Gupta
Similar Messages
-
Can we call functional module in a subroutine? Any example?
Can we call functional module in a subroutine? Any example?
sample code....
REPORT ZPL_BDC_PA30.
TABLES : PA0022.
DATA : V_PERNR LIKE PA0022-PERNR,
V_SLABS LIKE PA0022-SLABS.
DATA : FILENAME TYPE STRING.
DATA : BEGIN OF IT_DATA OCCURS 0,
PERNR LIKE PA0022-PERNR, "Personnel Number
SLABS LIKE PA0022-SLABS, "Certificate code
SLABS1 LIKE PA0022-SLABS, "Certificate code new
END OF IT_DATA.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 1 WITH HEADER LINE.
DATA : BEGIN OF IT_ERROR OCCURS 0,
POS LIKE SY-TABIX,
TEXT(40),
END OF IT_ERROR.
PARAMETERS : P_FNAME TYPE DXFIELDS-LONGPATH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
I_LOCATION_FLAG = ' '
I_SERVER = '?'
I_PATH = I_PATH
FILEMASK = '.'
FILEOPERATION = 'R'
IMPORTING
O_LOCATION_FLAG = O_LOCATION_FLAG
O_SERVER = O_SERVER
O_PATH = P_FNAME
ABEND_FLAG = ABEND_FLAG
EXCEPTIONS
RFC_ERROR = 1
ERROR_WITH_GUI = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
START-OF-SELECTION.
FILENAME = P_FNAME.
PERFORM UPLOAD. "Uploading inputfile to internal table.
PERFORM VALIDATE. "validating the values
PERFORM POPULATE_BDC. "Populating bdc internal table
PERFORM ERROR_RECORDS
TABLES IT_ERROR. "Error records
*& Form bdc_fdata
FORM BDC_FDATA USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM. " bdc_fdata
*& Form bdc_hdata
FORM BDC_HDATA USING PROGRAM SCRNO DYNBEGIN.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = SCRNO.
IT_BDCDATA-DYNBEGIN = DYNBEGIN.
APPEND IT_BDCDATA.
ENDFORM. " bdc_hdata
*& Form upload
FORM UPLOAD .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADER
TABLES
DATA_TAB = IT_DATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE I000(BCTRAIN) WITH 'FILE NOT UPLOADED'.
ELSE.
MESSAGE I000(BCTRAIN) WITH 'FILE UPLOADED'.
ENDIF.
ENDFORM. " upload
*& Form populate_bdc
FORM POPULATE_BDC .
LOOP AT IT_DATA .
PERFORM BDC_HDATA USING 'SAPMP50A'
'1000'
'X'.
PERFORM BDC_FDATA USING 'RP50G-PERNR'
IT_DATA-PERNR.
PERFORM BDC_FDATA USING 'RP50G-CHOIC'
'0022'.
PERFORM BDC_FDATA USING 'BDC_OKCODE'
'=MOD'.
PERFORM BDC_HDATA USING 'MP002200'
'2000'
'X'.
PERFORM BDC_FDATA USING 'P0022-SLABS'
IT_DATA-SLABS1.
PERFORM BDC_FDATA USING 'BDC_OKCODE'
'=UPD'.
CALL TRANSACTION 'PA30' USING IT_BDCDATA.
REFRESH IT_BDCDATA.
ENDLOOP.
ENDFORM. " populate_bdc
*& Form validate
FORM VALIDATE .
data : num like sy-tabix,
num1 like sy-tabix.
LOOP AT IT_DATA.
num = num + 1.
num1 = sy-tabix.
SELECT PERNR
FROM PA0022
INTO V_PERNR WHERE
PERNR EQ IT_DATA-PERNR.
ENDSELECT.
IF SY-SUBRC <> 0.
MOVE num TO IT_ERROR-POS.
MOVE 'Invalid Pernr' TO IT_ERROR-TEXT.
APPEND IT_ERROR.
DELETE IT_DATA .
ELSE.
IF IT_DATA-SLABS IS INITIAL.
MOVE num TO IT_ERROR-POS.
MOVE 'Certificate code is initial' TO IT_ERROR-TEXT.
APPEND IT_ERROR.
DELETE IT_DATA.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " validate
*& Form error_records
FORM ERROR_RECORDS TABLES IT_ERRORS.
FORMAT COLOR COL_GROUP.
WRITE : / 'Error in the following records : ' .
FORMAT COLOR COL_NEGATIVE.
LOOP AT IT_ERROR.
WRITE : / IT_ERROR-POS,
IT_ERROR-TEXT.
ENDLOOP.
ENDFORM. " error_records -
Can we call Function Module from Process Chain?
Hello experts,
I have a small question.
Can we call Function Module(SE37) from Process Chain?
If yes can you please provide some example link?
I m new to BI world.
regardsHi,
Create one ABAP program and call the function module from that program. Check the link to know how to call a function module from an ABAP program.
http://help.sap.com/saphelp_wp/helpdata/en/d1/801edb454211d189710000e8322d00/content.htm
http://help.sap.com/saphelp_wp/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm
Then use process type "ABAP Program" in your process chain and add the program you have created. So then this program will be executed via process chain and this program will call the function module.
Indrashis -
Can we call function module in sap script
hi
can we call function module in sap script
i want to use function module HR_TMW_GET_EMPLOYEE_NAME in sapscript
to get Empname by using personal no
pernr no is coming from bseg-pernr table
so how i can use it .
please help me
thanks in advanced.hi,
You can use like this:
PERFORM FUNCTION_MODULE IN PROGRAM SUBROUTINE_POOL
USING &FIELD1&
USING &FIELD2&
CHANGING &FIELD3&
ENDPERFORM.
where function_module is the func. module name defined in program SUBROUTINE_POOL , field1 n field2 are the fields to be passed, and field3 is the value which you want to display...
You have to read field1 & field2 in the pool, process them & get the value of field to be output.
Reward helpful answers.
Regards,
SIddhesh Sanghvi. -
Had same problem with 10.7. I've followed all the suggestions I can find, restored my computer many times, cleaned the registry... this is the worst software install I've ever seen!
I kept getting the reminder to update itunes 11.1.4 on my Windows 7 laptop. I now forget the error message other than it would stop and say something that itunes has stopped working and to do a manual d/l from itunes. That did not work either.
The suggestion to remove the Apple Software Updater from my programs solved this problem. -
How can I call functionality of ALV Grid by event of button outside grid?
Hello,
How can I call functionality of ALV Grid by event of button located outside ALV Grid? For example how to fire printing of this ALV Grid by button click elsewhere on the screen (not in toolbar of ALV Grid).
Best regards,
Josef Motlhi Motl,
these are steps to create a button in ALV and trigger an event from it..
1.Use the parameter i_callback_pf_status_set in the function module REUSE_ALV_GRID_DISPLAY
i_callback_program = gd_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'NEWALVSTATUS'.
endform.
You have to copy the standard ALV pf stauts to 'NEWALVSTATUS' and add your button.
2.You have to do the following to process the new button click.
i_callback_user_command = 'USER_COMMAND'
form user_command using i_ucomm like sy-ucomm
is_selfield type slis_selfield.
case i_ucomm.
3. to copy the standard pf status to a new one.go to the ALV screen and take the menu System -> Status. Then look for the standard pf status. Copy this to Z range and then add your new button.
reward points if helpful
regards
satesh -
My history has been wiped out. I would like to know if there is a way i can see how many times a site was previously visited using my MacBook. Pelase advise. Thansk!
no, i deleted the addresses from my history but was able to pull them up from the cookies. i want to know if i can view how many times the site was viewed ever after it has been deleted out of my history..
thanks! -
How can I call functions in packages using flash builder?
a new guy in flash developnet, I need to find out a way to import multiple packages into frames and call functions. I know how to import packages, but an error occurs error 1120 : access of undefined property. How can ı solve them?
Is there any easy way to add Mediapomise object to the stage form the package? "addChild(loader);" does not work? or ı do not know whether it works or not, ı could not see the photo that ı took from camerauı object in android.
thank youI need to find out a way to import multiple packages into frames
Usually, no matter where you use any classes of any package, the imports happen always in the beginning.
If you have a specific problem with flashbuilder you should post in this forum:
http://forums.adobe.com/community/flash_builder -
Can we call function modules in SAP query or ADHOC query
Hi ,
Can we call afunction moudule in sap query or ADHOC query ?If yes How
An early responce is greatly appreciated
Thanks and best regards
Rajeev ChhabraHello Rajeev Chhabra,
Yes; you can call function module in SAP Query. In InfoSet definition (SQ02), you can create additional field. In this field definition, you can add code snippet where you can function module.
However, this is not possible in Quick Viewer (SQVI) Query.
Thanks,
Venu -
How can use CALL FUNCTION READ_TEXT
Dear SAP Expert,
I am working in Journal Voucher of smart form. I want to show Long Text in SF.
So i am using the READ_TEXT function module to read SAP long text. and use Range of Clear Doc. in driver program.
i have one ITAB which have 20 rows.
problem is that CALL FUNCTION READ_TEXT is not working properly ...........
i WANT store Long text clear Doc. no. wise in my ITAB .
DATA: FORMNAME TYPE TDSFNAME VALUE 'ZFI_S_JOUR_VOUCHER'.
DATA: FM_NAME TYPE RS38L_FNAM.
lv_name = ITAB-BELNR.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = c_id
language = 'E'
name = lv_name
object = c_object
TABLES
lines = lt_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5.
IF sy-subrc = 0.
ELSE.
LOOP AT lt_lines INTO wa_lines.
CONCATENATE ld_text wa_lines-tdline INTO ld_text.
ENDLOOP.
ENDIF.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = FORMNAME
IMPORTING
FM_NAME = FM_NAME.
DATA: V_PRCTR LIKE BSIS-PRCTR.
CALL FUNCTION FM_NAME
EXPORTING
V_TYPE_DES = V_TYPE_DES
P_BUKRS = P_BUKRS
TABLES
IT_BKPF = IT_BKPF
ITAB = Itab
TY_BSIS = TY_BSIS.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " call_smhI [See this |http://wiki.sdn.sap.com/wiki/display/BOBJ/FunctionExampleREAD_TEXTABAPwrapper+function]
Check out the wiki session .
FUNCTION Z_AW_READ_TEXT_ALL.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(ID) TYPE THEAD-TDID
*" REFERENCE(LANGUAGE) TYPE THEAD-TDSPRAS
*" REFERENCE(NAME) TYPE THEAD-TDNAME
*" REFERENCE(OBJECT) TYPE THEAD-TDOBJECT
*" EXPORTING
*" REFERENCE(TEXT) TYPE CHAR2000
DATA BEGIN OF TEXTHEADER.
INCLUDE STRUCTURE THEAD.
DATA END OF TEXTHEADER.
DATA BEGIN OF TEXTLINES OCCURS 10.
INCLUDE STRUCTURE TLINE.
DATA END OF TEXTLINES.
CLEAR TEXTHEADER.
data: l_name type TDOBNAME."TR
l_name = name."TR
CALL FUNCTION 'READ_TEXT'
EXPORTING
OBJECT = OBJECT
ID = ID
LANGUAGE = LANGUAGE
NAME = l_NAME "TR
IMPORTING
HEADER = TEXTHEADER
TABLES
LINES = TEXTLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
LOOP AT TEXTLINES.
CONCATENATE TEXT TEXTLINES into TEXT SEPARATED BY space.
ENDLOOP.
ENDFUNCTION.
Regards,
koolspy. -
How can I call functions from a SWF loaded in to another SWF?
Hi there,
Please excuse my ignorance, I am very new to actionscript and flash.
I have 2 SWF's - a.swf and b.swf.
I load b.swf into a.swf with the following code:
var swfLoader:MovieClipLoader = new MovieClipLoader();
swfLoader.loadClip("b.swf", container_mc);
Now in b.swf, I have a function as follows:
public function sendData(){
trace("I ran the function!");
So I have done a lot of reading, from what I can tell I should be able to run the sendData() function from the code in a.swf, by typing:
container_mc.sendData();
but its not working. What am I doing wrong?
Thanks in advance,
AdamThanks heaps mate, after a bit of trial and error it works! Here is the code that I added:
var loadingListener:Object = new Object();
swfLoader.addListener(loadingListener);
loadingListener.onLoadStart = function(container:MovieClip):Void {
trace("The MovieClip "+container+" started loading");
loadingListener.onLoadInit = function(container:MovieClip):Void
trace("The MovieClip " + container + " has been initialized");
container_mc.test();
Marked your answer as correct :-)
Thanks again, I really appreciate your help.
Cheers
Adam -
IPad 2 wifi only can I call and receive face time
Ipad 2 with wi fi receive and send FaceTime ??
Starting with IOS5 you can create FaceTime calls to other people (with FaceTime set up) via email, not via a telephone number.
-
Help in calling same method many times
hello
I have 3 different list.put statements, each of which I need to call at different parts of the program. I have now been told to put all these statements into a single method , and call that method wherever necessary. how will the method now identify which .put statement that it needs to execute?
I need help..kindly provide.
thanks in advance
aparnaI am unable to post the code currently. Instead, the following:
I have the following,each in 3 different methods of the program,
userList.put(rs.getString("username"));
userList.put(rs1.getString("username"));
userList.put(rs2.getString("username"));Now I would like to put all these 3 statements in to a single method named InOffice(String Phone) --> This method already has an argument 'Phone'.
Now when I need to execute the different userList.put statements wherever necessary in the pgm, I should be able to call this method InOffice, and it should be able to execute only those userList.put statements which are needed at that point of execution.
How do i now go abt this?
Thanks again..
Aparna -
HT5071 How can I know if/how many times my iBook has been downloaded?
any idea how to do that?
Check the reports section for your books in iTunes Connect, or use one of the 3rd party report managers such as AppViz, AppAnnie, etc.
-
How many times can I port my cell number?
I've ported my # once before from one company to another.. Can I do it a second time, now to ATT?
I believe under the FCC regulations you can port your number as many times as you want but... as long as it eliible for portability.
How can you find out?
1. Call AT&T cust service and ask them to look it up in POET or call the Porting Dept.
2.Call your current provider for the same above info.
Maybe you are looking for
-
After effect CS6 app 11.00 won't open with Maverick 10.9.4
Hello, i have just finished updating all the applications on master creative suite but i get a window saying that i can't use this version of the application adobe after effects cs6 app with this version of osx. cld you pls advise what to do? thanks
-
I want to install an older version of OSX
I bought a used Mac Mini (Mid 2010) that has Mountain Lion installed. I want to erase the drive and reinstall Snow Leopard. How do I go about installing an older version of OSX?
-
Qosmio G30: How to install Qosmio player on Win XP?
I bought a new G30 with Vista Ultimate inside. Many applications and devices not run on Vista and I decide to do a migration to XP PRO. Windows working excellent but....... how to install Qosmioplayer on XP PRO (working TV and rest buttons ) . I have
-
I need help downloading the cloud to my phone. When I go to settings and look for icloud...it's not highlighted. What now?
-
Bundle Installation not working
Have just started to deploy ZLM 7.2.1 and its not going so well. Client is RHEL4-WS I created a trial RPM 'simple-test' , created a bundle (Simple Test Bundle) and assigned it to a workstation (sa-aifs224). So far so good, the rpm got installed. Next