Gui_download Function module is not working in Background Scheduling
Hi Experts,
Function modules like GUI_DOWNLOAD are not working in background scheduled jobs, It is raising an exception. Though it is working fine in foreground execution.
Please provide me solution for this challenging task.
you could be rated well for this question.
Thanks,
Rama Krishna.
Hello,
work with open dataset and close dataset...
just loop over itab and transfer itab field for field into a string field separated by ;
Here is an extract of coding:
OPEN DATASET p_dath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT itab_pos.
CLEAR satz.
MOVE itab_pos-vbeln TO satz-vbeln.
MOVE ';' TO satz-fill1.
MOVE itab_pos-kunnr TO satz-kunnr.
MOVE ';' TO satz-fill2.
MOVE itab_pos-ktgrd TO satz-ktgrd.
MOVE ';' TO satz-fill3.
MOVE itab_pos-fkdat TO satz-fkdat.
MOVE ';' TO satz-fill4.
MOVE itab_pos-budat TO satz-budat.
MOVE ';' TO satz-fill5.
MOVE itab_pos-cpudt TO satz-cpudt.
MOVE ';' TO satz-fill6.
MOVE itab_pos-fkimg TO satz-fkimg.
MOVE ';' TO satz-fill7.
MOVE itab_pos-netwr TO satz-netwr.
MOVE ';' TO satz-fill8.
MOVE itab_pos-vrkme TO satz-vrkme.
MOVE ';' TO satz-fill9.
MOVE itab_pos-ktgrm TO satz-ktgrm.
MOVE ';' TO satz-fill10.
MOVE itab_pos-matnr TO satz-matnr.
MOVE ';' TO satz-fill11.
MOVE itab_pos-mattxt TO satz-mattxt.
MOVE ';' TO satz-fill12.
MOVE itab_pos-gewei TO satz-gewei.
MOVE ';' TO satz-fill13.
MOVE itab_pos-brgew TO satz-brgew.
TRANSFER satz TO p_dath.
ENDLOOP.
CLOSE DATASET p_dath.
It is not so comfortable as it is with GUI_DOWNLOAD but it works in background!
Similar Messages
-
Function Module (ENQUEUE_ES_PROG) not working in Background
I scheduled a job which runs every 15 mins in the the background to fetch data from an external system,depending on the data volume ,the program can sometimes run for over 15 minutes.To avoid data conflict I used a function module ENQUEUE_ES_PROG on the program to first check if the job started is still running before another job gets kicked.The problem I have is the fact that this function module does not seem to work in the background but in the looks perfect in foreground. Does anyone have a clue on how to use this FM for background job?
Hello Mochabo,
Consider the following scenario:
Your job is running for more than 15 minutes. Since it is running in the background, it will be executed by a work-process of type BACKGROUND. If there's only one BACKGROUND work process configured for your application server, then the second job will have to be waiting till the first one finishes and releases the background work process.
But when you are executing this in the foreground, the DIALOG work-process does the processing. So you are not finding any problem.
So, to my knowledge, there will be a problem when there's only one BACKGROUND work process. Please go to transaction SM50 and see how many of them are configured for the current application server.
Also, in case there's only one BACKGROUND work-process, you will not have toworry that the second job will start before the first has finished. It simply can't. It has got to wait.
Hope this explanation helps.
Regards,
Anand Mandalika. -
Function module is not working properly in background
Hi all,
i have used one Function module 'PRICING' in user exit SAPMV45A to calculate pricing for sales order.
i am using BAPI_SALESORDER_CHANGE to change the sales order pricing.
when i run the program in foreground, all condition records for pricing is updated correctly. but it is not updating
correctly when i run the program in background.
Please tell me wheather 'PRICING' or 'BAPI_SALESORDER_CHANGE' function module is not working properly in background ?
or any other reason?
Thanks
babuHi Pabitra,
Can you provide some more information as to the type of error you are getting? Or can you check the log entries and give some more information so that it would be possible to provide a solution.
And, try to put questions in proper Forum for quick and prompt reply.
Hope this helps.
Thanks,
Samantak. -
Hi All,
When i execute the function module SAPWL_GET_SUMMARY_STATISTIC in CRM ABAP 6.0 passing the values below,
PERIODTYPE
HOSTID
STARTDATE
it's not showing any values in the summary.
it's showing the exporting parameters as,
RFC_ERROR_TYPE L
SUMMARY_AVAILABLE N
HITLISTS_N_PROFILES_AVAILABLE A
if this function module will not work means kindly provide me the solution for calculating
Average Response Time as in tcode st03 - Instance - total - Workload Overview.
Average CPU Time and some more fileds.
Regards,
SureshHi
I used the FM mentioned and found the details as below:
VKORG
TABNAME TVKO
FIELDNAME VKORG
LANGU EN
POSITION 0001
OFFSET 000006
DOMNAME VKORG
ROLLNAME VKORG
CHECKTABLE
VTEXT
TABNAME TVKOT
FIELDNAME VTEXT
LANGU EN
POSITION 0002
OFFSET 000014
DOMNAME TEXT20
ROLLNAME VTXTK
CHECKTABLE
LENG 000020
Shiva -
Check Function Module is not working
Hi All Expert,
I'm new in workflow and develop custom workflow for Transaction FB65 ( Vendor Credit Memo) and using business object FIPP , event CREATED.
Actually requirement is that when user click on park button in FB65 then should be trigger workflow only for particular vendor code .
Now my workflow is working fine for all vendor code.
For particular vendor code, I have created an new entries in SWE2 and assigning a check function module to that
Refer Link : http://www.****************/Tutorials/Workflow/checkfunctionmodule/demo.htm
and also same entries create in SWETYPV But Check Function Module is not working before workflow trigger.
Appreciate your help and support.
Regards
SaurabhHi
: Check FM : ZWF_DR_CR_MEMO
SourceCode :
FUNCTION ZWF_DR_CR_MEMO.
*"*"Local Interface:
*" IMPORTING
*" VALUE(OBJTYPE) LIKE SWETYPECOU-OBJTYPE
*" VALUE(OBJKEY) LIKE SWEINSTCOU-OBJKEY
*" VALUE(EVENT) LIKE SWETYPECOU-EVENT
*" VALUE(RECTYPE) LIKE SWETYPECOU-RECTYPE
*" EXPORTING
*" REFERENCE(RESULT) TYPE C
*" TABLES
*" EVENT_CONTAINER STRUCTURE SWCONT
*" EXCEPTIONS
*" NOT_TRIGGERED
BREAK-POINT.
TABLES : VBSEGK.
DATA : LV_VEND TYPE VBSEG-LIFNR.
CLEAR : LV_VEND.
SELECT SINGLE LIFNR FROM VBSEGK INTO LV_VEND WHERE BELNR EQ OBJKEY.
if sy-subrc eq 0
IF LV_VEND = '0000120510'.
RAISE NOT_TRIGGERED.
ENDIF
endif.
ENDFUNCTION. -
Function module is not working
Hi Experts,
There is one function module "RH_READ_INFTY_1001" is working fine with developement server but not working with Quality server.
In development server the value of sy-subrc is 0. But in quality server it is not working.
Error comes NO MSGTYPE " " FOUND.
Thanks....Hi,
I guess the message type is not getting populated.
Use your own message
Message 'Error' TYPE 'E'. "--> Message type must be in CAPS
Regards -
RFC Function module is not working in program while Background
Hi All,
we have a one program in BI system which is calling RFC function module. it is executing the program in foreground very well. Same program we have executed in background , it is not working at all. Thiis RFC function module exists in R/3 4.6c system.Hello Raju,
Transactional call of a remote-capable function module specified in func using the RFC interface. You can use the addition DESTINATION to specify an individual destination in dest. If the destination has not been specified, the destination NONE is used implicitly. Character-type data objects are expected for func and dest.
When the transactional call is made, the name of the called function, together with the destination and the actual parameters given in parameter list, are registered for the current SAP LUW in the database tables ARFCSSTATE and ARFCSDATA of the current SAP system under a unique transaction ID (abbreviated as TID, stored in a structure of type ARFCTID from the ABAP Dictionary, view using transaction SM58). Following this registration, the program making the call is continued by way of the statement CALL FUNCTION.
When executing the COMMIT WORK statement, the function modules registered for the current SAP LUW are started in the sequence in which they were registered. The statement ROLLBACK WORKdeletes all previous registrations of the current SAP LUW.
If the specified destination is not available for COMMIT WORK, an executable called RSARFCSE is started in the background. This attempts to start the functional modules registered for an SAP LUW in their destination, every 15 minutes up to a total of 30 times. You can make changes to these parameters using transaction SM59. If the destination does not become available within the given time, this is noted in the database table ARFCSDATA as a CPICERR entry. By default, this entry in database table ARFCSSTATE is deleted after 8 days.
Thanks and Regards,
SAP Shori -
Hi All,
I have used a function module PTRA_WEB_EXPENSE_REPORT_GET_2 in a custom fumction module which i am developing fetch the travel expense data . The function module PTRA_WEB_EXPENSE_REPORT_GET_2 returns the travel expense data based on the employee and the trip number. I want to fetch the travel expense data for a given set of employees and trip number and hence i have used this function module inside a loop statement.
The function module returns the travel expense data for the employee and trip in the first loop pass. From the second loop passs it doesn't return the value. I have also checked this in se37 and the same thing happens. Value is returned for the fist employee but for the next employee we have to go to initial screen of se37 and execute the Func. module again.
I debugged this function module and found that the value of the employee and the trip number is stored in the global variable. The value passed for the employee and trip is compared with the correspomding value in the global variable and if they are not same an error message is returned. Since we are using in a loop , each time a different value is passed for the employee and trip and the check fails .
Is there any way to clear the value in the global parameters or is there any other function module which can be used to clear the values of the global variables?
Thanks!
Regards
Manipal ParkalaHello Archana,
May be we can try several ways...
1) can you try calling function module BUFFER_REFRESH_ALL ??
after each call...
2) May be u can call Function module "PTRA_WEB_EXPENSE_REPORT_GET_2 " in background task or seperate task , it will load the function group everytime when u call it in loop.
***DO let us know if it does not work.
thanks
~Raj -
User Exit for Variable which calls to a Function Module is NOT working ???
Hi all,
I have a created a variable 'ZNBUSDAY' with Processing Type 'Customer Exit' on 0SCL_DELDAT (Date). The query is on 0PUR_C04 and passing 0SCL_DELDAT to Function Module Z_WORKDAY to get the Next Business Day by using the company Calendar(30). The following code is NOT working and what is WRONG with it, PLEASE? The FM is working FINE.
DATA: wa_calendar(2) TYPE c value '30',
wa_znbusday like sy-datum,
0scl_deldat like sy-datum,
p_days TYPE i value 1.
case i_vnam.
when 'ZNBUSDAY'.
CLEAR wa_znbusday.
CALL FUNCTION 'Z_WORKDAY'
EXPORTING
CURR_DATE = 0scl_deldat
NUMBER_DAYS = p_days
CALENDAR = wa_calendar
IMPORTING
WORK_DAY = wa_znbusday
l_s_range-low = wa_znbusday.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
append l_s_range to e_t_range.
endcase.
Thanks,
Venkat.Hi Venkat,
Looks like you're only assigning type sy-datum to 0scl_deldat but not the actual value. Try the following:
DATA: wa_calendar(2) TYPE c value '30',
wa_znbusday like sy-datum,
0scl_deldat like sy-datum,
p_days TYPE i value 1.
case i_vnam.
when 'ZNBUSDAY'.
CLEAR wa_znbusday.
0scl_deldat = sy-datum.
CALL FUNCTION 'Z_WORKDAY'
EXPORTING
CURR_DATE = 0scl_deldat
NUMBER_DAYS = p_days
CALENDAR = wa_calendar
IMPORTING
WORK_DAY = wa_znbusday
l_s_range-low = wa_znbusday.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
append l_s_range to e_t_range.
endcase.
Kind regards,
Alex -
Function module MAM25_011_getdetail not working
hi,
I m using Function Module Mam25_011_getdetail which is already designed in SAP.
I want to execute it but when I m executing it, it is asking me for user and notification number.... I have notification Number but i didn't have any idea about user. which user i fill there. I m using ECC 6.0 IDES Demo version and online version of SAP for this. but it is not working... pleas help me
Edited by: Thomas Zloch on Apr 25, 2011 10:47 PM exclamation marks removedNo still I m not getting any Value A return value in this
this Function Module is already created in SAP system You can also chk it there
with name MAM25_011_getlist (in IDES DEMO)
Or MAM30_011_getlist (real Time System)
Please Chk It and reply
I need it very much -
Function Module "SO_OBJECT_SEND" not working in ECC6
Hi experts,
We have upgraded our SAP version from 4.6c to EEC6, in 4.6C one of our
Z program has used function module u201CSO_OBJECT_SENDu201D for sending mails
to external user. But the same prog throws error in SOST "Message cannot be processed as it cannot be
converted ".
If I try with another FM u201CSO_NEW_DOCUMENT_ATT_SEND_AP1u201D is not fulfill our requirement. ie. we can send the mail to external user but we cannot send output List as attachement.
Our requirement is first we have to convert the list into a object and
send that object to external user. We are using following FM for
sending mails.
SAVE_LIST - Save the list as Object.
TABLE_COMPRESS u2013 Compress the object to compressed attachment.
SO_OBJECT_SENT u2013 Finally send the attachment to external user.
Pl. suggest me, how to sort it out.
Thanks,
Regards
M.VeerabadranHi
Answer is pure assumption
Pls check the OSS Note 170175 - SAPconnect: Message not convertable
Pls take opinion from SAP / BASIS before implementing the note
Regards
Madhan D -
Function module END_TIME_DETERMINE not working correctly
Hi,
I have a task within a workflow which is used to determine the deadline date and time. Within the method there is a call to function module 'END_TIME_DETERMINE'. Sometimes this is not calculating the correct date and time in the production system. This is not happening always. When I am debugging the method or the function module its giving the correct date and time. An example for this is as below.
The function module is taking sy-datum and sy-uzeit as input parameters and exporting new dates and times based on the no. of hours in l_deadlinehours
l_startdate = sy-datum.
l_starttime = sy-uzeit.
CALL FUNCTION 'END_TIME_DETERMINE'
EXPORTING
DURATION = l_deadlinehours
UNIT = 'H'
FACTORY_CALENDAR =
IMPORTING
END_DATE = l_enddate
END_TIME = l_endtime
CHANGING
START_DATE = l_startdate
START_TIME = l_starttime
EXCEPTIONS
FACTORY_CALENDAR_NOT_FOUND = 1
DATE_OUT_OF_CALENDAR_RANGE = 2
DATE_NOT_VALID = 3
UNIT_CONVERSION_ERROR = 4
SI_UNIT_MISSING = 5
PARAMETERS_NO_VALID = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
An example where it has gone wrong is :
Current date: 28.01.2008 Current time: 04:27:11
l_deadlinehours = 12
New date: 20.10.0427 New time: 20:01:28.
Can anyone pls suggest why this could be happening?
regards,
AbhishekDoes it happen for certain users? Maybe there is something from how you handle the dates in your workflow. Maybe the date settings are different for certain users - check their user master.
Regards,
Karri -
GUI_DOWNLOAD does not work for background printing
Hi,
Need some help urgently.
Function moduel GUI_DOWNLOAD does not work for background printing. I want to know how this issue can be handled or we have to use some other function module.
We are using this in a report and i get the error dump OBJECTS_OBJREF_NOT_ASSIGNED when we run this report in background.
Kindly suggest.
Best Regards,
Abbasiyou can not use gui_download in background.
Try searching first, this thing has been posted a thousand times already -
Function module "GM_DOCUMENT_REVERSE" not found. after Patch Update
Hi Abapers/Basis
After patch update i am not able to do FBCJ reversal entry getting below error message.
Runtime Errors CALL_FUNCTION_NOT_FOUND
Exception CX_SY_DYN_CALL_ILLEGAL_FUNC
Date and Time 25.05.2011 14:43:26
Short text
Function module "GM_DOCUMENT_REVERSE" not found.
What happened?
The function module "GM_DOCUMENT_REVERSE" is called,
but cannot be found in the library.
Error in the ABAP Application Program
The current ABAP program "SAPLRWCL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
Error analysis
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 "CALL_DISPATCHER_STORNO_R" "(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:
The program "SAPLRWCL" contains the CALL FUNCTION statement.
The name of the function module to be called is "GM_DOCUMENT_REVERSE".
No function module exists with the name "GM_DOCUMENT_REVERSE".
All function modules are listed in the Function Library (SE37).
Possible reasons:
a) Wrong name specified. Pay particular attention to
upper/lower case and underscores ("_").
or
b) Transport error
c) In the case of an enqueue/dequeue module,
the lock object may not have been activated
(ABAP/4 Dictionary).
How to correct the error
Check the last transports to the SAP System.
Is the program "SAPLRWCL" currently being changed?
If an enqueue/dequeue module is involved, is the activation
of the lock object missing in the ABAP/4 Dictionary?
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"CALL_FUNCTION_NOT_FOUND" "CX_SY_DYN_CALL_ILLEGAL_FUNC"
"SAPLRWCL" or "LRWCLF10"
"CALL_DISPATCHER_STORNO_R"
Function modules with names similar to "GM_DOCUMENT_REVERSE":
GM_DOCUMENT_CLOSE
GM_DOCUMENT_RECORD
GM_DOCUMENT_DELETE
GM_DOCUMENT_POST
GM_DOCUMENT_CHECK
G_DOCUMENT_RECORD
GJ_DOCUMENT_RECORD
GM_DOCUMENT_PROJECT
GET_DOCUMENTS
GM_DOCUMENT_DISPLAY
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
Moderator message: please don't just dump your dumps, search for SAP notes or open a call with SAP instead.
Edited by: Thomas Zloch on May 25, 2011 2:16 PMHi Karthik,
Thank you for ur reply.
I did not implement any user exit/ badi. Dump is saying that my smarform function module does not exist in the se37 library.
I have excuted my form through se38, that time is working fine. When i tried through output type it is going to dump.
Regards,
Kusuma. -
Issue with gui_download function module
Hi All,
I have an issue with gui_download function module that it is creating one extra line while downloading my internal table data into text file,which i donot want.i have searched for various threads but couldnot get the proper reply.Or please provide me some other Function Module which will not create one extra line.Please help.part 2
INCLUDE RPPPXD00.
DATA : BEGIN OF COMMON PART A.
INCLUDE RPPPXD10.
DATA : END OF COMMON PART.
INCLUDE PC2RXTW0.
INCLUDE RPC2RX00.
DATA : BEGIN OF COMMON PART B.
INCLUDE RPC2CD00.
DATA : END OF COMMON PART.
INCLUDE RPPPXM00.
INCLUDE RPCMGR00.
AT SELECTION-SCREEN OUTPUT.
CONCATENATE SY-DATUM2(6) SY-UZEIT0(4) INTO REF_NO.
LOOP AT SCREEN.
IF R1 = 'X'.
IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
SCREEN-NAME = 'BTC' OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT'"SOC BY ANKITA"
OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
IF R2 = 'X'.
IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
SCREEN-NAME = 'BTC' OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
IF R3 = 'X'.
IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
IF R4 = 'X'.
IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'"SOC BY ANKITA
OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'BTC' OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
START-OF-SELECTION.
SELECT SINGLE * FROM T549Q WHERE PERMO = '01'
AND PABRJ = PRD+0(4)
AND PABRP = PRD+4(2).
FR_DT = T549Q-BEGDA.
TO_DT = T549Q-ENDDA.
CONCATENATE FR_DT0(4) FR_DT4(2) INTO FR_P.
CONCATENATE TO_DT0(4) TO_DT4(2) INTO TO_P.
PN-PAPER = PRD.
PN-PERMO = '01'.
GET PERNR.
RP-PROVIDE-FROM-LAST P0003 SPACE PN-BEGDA PN-ENDDA.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND EQ 1.
SN = SN + 1.
ITAB1-SNO = SN.
ITCC-SNO = SN.
ITAB1-ENO = PERNR-PERNR.
ITAB1-NAM = PERNR-ENAME.
ELSE.
REJECT.
ENDIF.
RP-INIT-BUFFER.
RP-SEL-CALC.
CALL FUNCTION 'RP_EVALUATION_PERIODS'
EXPORTING
LAST_CALCULATED_DAY = P0003-ABRDT
LAST_DAY_IN_PERIOD = TO_DT
RETROCALCULATED_DAY = RP-SEL-CALC-RRDAT
TABLES
DIR = RGDIR
EVP = EVP
EXCEPTIONS
RGDIR_EMPTY = 1
INTERNAL_ERROR = 2
OTHERS = 3.
DESCRIBE TABLE EVP LINES LIN.
IF LIN > 0.
LOOP AT EVP.
IF EVP-IAPER = TO_P AND EVP-PAPER = TO_P.
RX-KEY-PERNR = PERNR-PERNR.
UNPACK EVP-SEQNR TO RX-KEY-SEQNO.
RP-IMP-C2-TN.
READ TABLE BT INDEX 1.
READ TABLE WPBP INDEX 1.
READ TABLE TAX INDEX 1."CHANGES BY ANKITA
ITAB1-BAC = BT-BANKN.
ITAB1-BKEY = BT-BANKL .
ITAB1-DEP = WPBP-KOSTL.
ITAB1-BETRG = BT-BETRG."CHANGES BY ANKITA
ITAB1-TAXID = TAX-TAXID."CHANGES BY ANKITA
YEAR = VERSC-PAYDT+0(4) - 11.
MONTH = VERSC-PAYDT+4(2).
DAY = VERSC-PAYDT+6(2).
CONCATENATE YEAR MONTH DAY INTO ITAB1-PDT.
ITAB1-PDT = VERSC-PAYDT - 110000.
ITCC-DEP = WPBP-KOSTL.
LOOP AT RT WHERE LGART = '/559'.
ITAB1-BTFR = RT-BETRG.
ITCC-BTFR = RT-BETRG.
IF EVP-SRTZA = 'P'.
ITAB1-BTFR = ITAB1-BTFR - RT-BETRG.
ELSE.
ITAB1-BTFR = ITAB1-BTFR + RT-BETRG.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
APPEND: ITAB1, ITCC.
CLEAR: ITAB1, ITCC.
END-OF-SELECTION.
CONCATENATE 'Prepared By:' ` ` PREPBY INTO PREPBY.
CONCATENATE 'Approved By:' ` ` APROBY INTO APROBY.
IF R1 = 'X'.
FORMAT COLOR 2.
ULINE (127).
NEW-LINE.
WRITE: 2 'Sr No.', 10 'Emp Num', 27 'Name'.
WRITE: 57 'Department'.
WRITE: 72 ' Transfer Amount' RIGHT-JUSTIFIED.
WRITE: 92 'Bank Key', 107 'Bank AC. Number'.
WRITE:1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
NEW-LINE.
ULINE (127).
NEW-LINE.
FORMAT COLOR OFF.
LOOP AT ITAB1.
SN = SY-TABIX.
WRITE: 2 SN, 10 ITAB1-ENO, 27 ITAB1-NAM.
WRITE: 57 ITAB1-DEP.
WRITE: 72 ITAB1-BTFR.
WRITE: 92 ITAB1-BKEY, 107 ITAB1-BAC.
WRITE: 1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
ULINE (127).
NEW-LINE.
ENDLOOP.
SKIP 4.
ULINE 90(32).
NEW-LINE.
WRITE: 90 PREPBY.
SKIP 4.
ULINE 90(32).
NEW-LINE.
WRITE: 90 APROBY.
ENDIF.
IF R2 = 'X'.
LOOP AT ITCC.
COLLECT ITCC INTO ITCOL.
ENDLOOP.
FORMAT COLOR 2.
ULINE (44).
NEW-LINE.
WRITE:2 'Sr No.', 9 'Department'.
WRITE: 27 'Transfer Amount ' RIGHT-JUSTIFIED.
WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
NEW-LINE.
ULINE (44).
NEW-LINE.
FORMAT COLOR OFF.
LOOP AT ITCOL.
SN = SY-TABIX.
WRITE: 2 SN, 9 ITCOL-DEP, 27 ITCOL-BTFR.
WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
NEW-LINE.
ULINE (44).
NEW-LINE.
ENDLOOP.
ENDIF.
IF R3 = 'X'.
LOOP AT ITAB1.
CLEAR: ITTF, P3, P11, P13, P6, V_BAC.
LEN = STRLEN( ITAB1-BKEY ).
IF LEN < 3.
CONCATENATE ITAB1-BKEY '***' INTO P3.
ELSE.
LEN = LEN - 3.
LEN = 3.
P3 = ITAB1-BKEY+LEN(3).
ENDIF.
CLEAR LEN.
V_BAC = ITAB1-BAC.
REPLACE ALL OCCURRENCES OF '-' IN ITAB1-BAC WITH ''.
CONDENSE ITAB1-BAC NO-GAPS.
LEN = STRLEN( ITAB1-BAC )."if length of acc num > limit
IF LEN > 11.
IT_FAIL-EN = ITAB1-ENO.
IT_FAIL-BA = V_BAC.
APPEND IT_FAIL.
CLEAR: IT_FAIL.
CONTINUE.
ENDIF.
P11 = ITAB1-BAC.
CONCATENATE P11 '***********' INTO P11.
above step is for putting '' in place of unfilled chars of P11.
P13 = ITAB1-BTFR * 100.
P6 = ITAB1-PDT+2(6).
CONCATENATE ` ` P3 P11 BTC P13 P6 INTO STR.
ITTF-ROW = STR.
APPEND ITTF.
ENDLOOP.
IF ITTF[] IS NOT INITIAL.
CONCATENATE FLN SY-DATUM SY-UZEIT '.txt' INTO FILEPATH.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FILEPATH
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITTF
OTHERS = 22
SKIP 2.
IF SY-SUBRC <> 0.
WRITE:/ 'Unable to Download file at ', FILEPATH.
ELSE.
WRITE:/ 'File with following data downloaded at ', FILEPATH.
NEW-LINE.
SKIP 2.
LOOP AT ITTF.
WRITE:/ ITTF.
ENDLOOP.
ENDIF.
ELSE.
WRITE 'No Data, no file was downloaded'.
ENDIF.
IF IT_FAIL[] IS NOT INITIAL.
SKIP 2.
FORMAT COLOR 2.
WRITE 'Acc. No. of following employees exceeded the length limit'.
WRITE:/ 'So their entry was not created in the file'.
SKIP 1.
WRITE : 'Employee Number', 20 'Bank Acc. No.'.
FORMAT COLOR OFF.
LOOP AT IT_FAIL.
NEW-LINE.
WRITE : IT_FAIL-EN, 20 IT_FAIL-BA.
ENDLOOP.
ENDIF.
ENDIF.
IF R4 = 'X'."CHANGES BY ANKITA
WRITE:/ 'ERROR LOG - BANK A/C NO. CONTAINS ALPHANUMERIC'.
WRITE:/ 'EMPID' COLOR COL_POSITIVE,12 '|',15 'Receiving Bank Code' COLOR COL_POSITIVE,
40 '|','Receiver A/C No' COLOR COL_POSITIVE.
PERFORM EXTRACT_DATA.
SKIP 2.
ENDIF."EOC
RP-READ-PAYROLL-DIR.
Edited by: ANKITA BHARDWAJ on Dec 9, 2009 10:36 AM
Maybe you are looking for
-
How to figure out the cause of kernel panics?
Hi, I've recently been experiencing kernel panics, and I would greatly appreciate it if someone could help me find out the reason why. Before I go into more detail, I have a 13-inch, mid 2012 Macbook Pro running OS X Mavericks (10.9.3). Here are some
-
Hello! I'm currently involved with a project that requires analysis of images from several hundred stations along the Alaskan seafloor. Each station has three top down (PV) images of the seafloor taken and three images (SPI) that are taken below the
-
Error Code 1000 when trying to run Backup Assistant Plus.
I am getting backup failed and Error Code 1000 when trying to run Backup Assistant Plus. Have not been able to backup for several weeks.Droid Razr Maxx.
-
Hello, I have a new Mac Book Pro and I am unable to get Adobe flash player to work. When I install it it says it has been installed. But where do I see the application that it is there?
-
Sharing of Objects across applications
Hi, Is it possible to reference an object initialized by another application? For example, I have a Logger object that I instantiated from App1. Then I decided to come up with App2. I want to use in App2, the same logger innstance I am using in App1.