Profile Parameter to execute Abap Program at user logon.
Hi Experts
I've written a small printer selection program to change the users profile parameter.
Is there another profile parameter that can be given to execute this program automatically
when the user logs on.....The reason why I'm looking for a profile parameter to do this is, that only
certain users need to have this happen at logon.
Kind Regards
Vic
Hi Javi,
I don't think you need a custom process chain for this. You can use delivered Process Chain for logic and hard-code your script name in the package. In that script you can call BADI that has your ABAP program inside.
You can find guides how to build BADI here:[How to Pass Parameters to Custom Logic BADI using START_BADI|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f4252d-98ca-2b10-e689-f85085ae2d12] or here [Creating Custom Script Logic Keyword BADI's - BPC NW|Creating Custom Script Logic Keyword BADI's - BPC NW;.
Method IF_UJ_CUSTOM_LOGIC~EXECUTE has IT_CV as one of parameters. In your script you probably have to use *XDIM_MEMBERSET to get parameters from DM prompt. IT_CV will have all XDIM members.
Please let me know if you have any other questions.
Regards,
Gersh
Similar Messages
-
Error in executing ABAP program. Error occurred when creating dataset
hi,
when I use LKM SAP ERP to Oracle (SQLLDR) to extract data from SAP ERP server. I execute my interface, and it's stop at extract data step.
This is message:
java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset/abc/ZODI_13001_6001_GLOBAL.txt
I tried others path name, tried slash or backslash. This is content in code tab
OdiSAPAbapExecute "-UPLOAD=1" "-EXECUTE=1" "-EXECUTEBASE_RKM=0" "-ZRFC_RUN_INSTALL=1" "-ABAP_PROGRAM_NAME=ZODI_13001_6001" "-HOST=10.86.87.24" "-USER=sv_hoa" "-PASSWORD=<@=snpRef.getInfo("SRC_PASS") @>" "-SAP_CLIENT=800" "-SAP_LANGUAGE=EN" "-SAP_SYSTEM_NUMBER=02" "-SAP_FUNCTION_GROUP_NAME=ZODI_FGR_13001" "-CONNECTION_POOL_NAME=SAP_ODI_ERP_POOL_10.86.87.24" "-CONNECTION_POOL_SIZE=10" "-FILE_DELIMITER=<@=""+(char)8@>" "-FILE_NAME=ZODI_13001_6001_GLOBAL.txt" "-FTP_HOST=10.86.82.108" "-FTP_USER=anh" "-FTP_PASSWORD=<@=sFtpPassword@>" "-FTP_PASSIVE_MODE=1" "-FTP_TRANSFER_TIMEOUT=100000" "-ODI_VARIABLE_NAMES=" "-ODI_VARIABLE_VALUES=" "-USER_ABAP_PARAMETER_NAMES=IV_DELIMITER,CHAR3;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_MAX_ROW_CNT,SYTABIX;IV_FETCH_BATCH_SIZE,SYTABIX;" "-USER_ABAP_PARAMETER_VALUES=<Value>" "-USER_ABAP_PARAMETER_SEPARATOR=<Value>" "-ABAP_TABLE_PARAMETERS=RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2" "-ABAP_EXPORT_PARAMETERS=ERRORMESSAGE;SY-MSGV1" "-LOG_FILE_NAME=C:\Users\anh\AppData\Local\Temp\SapAbapExecuteOpenTool_13001.log" "-FTP_PATH=/abc/" "-DEV_CLASS=ZODI_DEVCLASS" "-MAX_ROW_COUNT=" "-FETCH_BATCH_SIZE=100000" "-HASH_VALUE_MARKER=HVM" "-ABAP_PROGRAM_BODY=
*Final Type declarations
TYPES : BEGIN OF ty_final,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final.
*Final Temp Type Declarations
TYPES : BEGIN OF ty_final_tmp,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID ,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH ,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH ,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH ,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI ,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU ,
END OF ty_final_tmp.
*Final Target Type Declarations
TYPES : BEGIN OF ty_final_target,
C0_Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
C5_Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final_target.
* Table type for Y03HOCSINH
TYPES : BEGIN OF ty_Y03HOCSINH,
HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_Y03HOCSINH.
TYPES: BEGIN OF gs_text,
line(843) TYPE c,
END OF gs_text.
*Structure Declarations
DATA: wa_final_string TYPE string,
wa_final TYPE ty_final,
wa_final_target TYPE ty_final_target,
wa_Y03HOCSINH TYPE ty_Y03HOCSINH,
*Table Declarations
tt_final TYPE STANDARD TABLE OF ty_final,
tt_Y03HOCSINH TYPE STANDARD TABLE OF ty_Y03HOCSINH,
tt_final_target TYPE STANDARD TABLE
OF ty_final_target,
tt_final_tmp TYPE STANDARD TABLE OF ty_final_tmp,
tt_final_tmp1 TYPE STANDARD TABLE OF ty_final,
gt_result TYPE STANDARD TABLE OF gs_text,
*Variable Declarations
lv_path TYPE string,
lv_flag TYPE char1,
C0_Y03HOCSINH_HOCSINH_ID TYPE
STRING,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
STRING,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
STRING,
C3_Y03HOCSINH_GIOI_TINH TYPE
STRING,
C4_Y03HOCSINH_DIA_CHI TYPE
STRING,
C5_Y03HOCSINH_GHI_CHU TYPE
STRING,
wa_final_tmp TYPE ty_final_tmp,
lv_file TYPE string,
lv_datum TYPE sy-datum,
lv_date TYPE char10,
wa_result TYPE string,
lv_delimiter type string,
lv_cnt TYPE sytabix,
*-Cursor Declaration
lv_Y03HOCSINH_dbcur TYPE cursor,
lv_tabix_frm TYPE sy-tabix.
lv_delimiter = iv_delimiter.
IF iv_hashvalue = 'HVM'.
*Open/delete output file
CONCATENATE iv_path iv_filename INTO lv_path.
*Check for file existence, if found, delete it
OPEN DATASET lv_path FOR INPUT
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
DELETE DATASET lv_path.
ENDIF.
*Open/create output file
OPEN DATASET lv_path FOR APPENDING
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
*Batch Processing
OPEN CURSOR WITH HOLD lv_Y03HOCSINH_dbcur FOR
SELECT HOCSINH_ID
MA_HOC_SINH
TEN_HOC_SINH
GIOI_TINH
DIA_CHI
GHI_CHU
FROM Y03HOCSINH.
DO.
*Check for the counter, only for first batch
*process new line is required...
lv_cnt = lv_cnt + 1.
REFRESH tt_Y03HOCSINH.
FETCH NEXT CURSOR lv_Y03HOCSINH_dbcur
APPENDING TABLE tt_Y03HOCSINH
PACKAGE SIZE IV_FETCH_BATCH_SIZE.
IF NOT tt_Y03HOCSINH IS INITIAL.
ELSE.
EXIT.
ENDIF.
LOOP AT tt_Y03HOCSINH INTO wa_Y03HOCSINH.
MOVE wa_Y03HOCSINH-HOCSINH_ID
TO wa_final_tmp-Y03HOCSINH_HOCSINH_ID.
MOVE wa_Y03HOCSINH-MA_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_MA_HOC_SINH.
MOVE wa_Y03HOCSINH-TEN_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_Y03HOCSINH-GIOI_TINH
TO wa_final_tmp-Y03HOCSINH_GIOI_TINH.
MOVE wa_Y03HOCSINH-DIA_CHI
TO wa_final_tmp-Y03HOCSINH_DIA_CHI.
MOVE wa_Y03HOCSINH-GHI_CHU
TO wa_final_tmp-Y03HOCSINH_GHI_CHU.
APPEND wa_final_tmp TO tt_final_tmp.
ENDLOOP.
free : tt_Y03HOCSINH.
LOOP AT tt_final_tmp INTO wa_final_tmp.
MOVE wa_final_tmp-Y03HOCSINH_HOCSINH_ID
TO wa_final_target-C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_tmp-Y03HOCSINH_MA_HOC_SINH
TO wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH
TO wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_GIOI_TINH
TO wa_final_target-C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_tmp-Y03HOCSINH_DIA_CHI
TO wa_final_target-C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_tmp-Y03HOCSINH_GHI_CHU
TO wa_final_target-C5_Y03HOCSINH_GHI_CHU.
Append wa_final_target to tt_final_target.
ENDLOOP.
free : tt_final_tmp.
Clear wa_final_target.
IF NOT iv_max_row_cnt IS INITIAL.
Loop at tt_final_target into
wa_final_target TO iv_max_row_cnt.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ELSE.
Loop at tt_final_target into wa_final_target.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ENDIF.
free : tt_final_target.
IF NOT gt_result IS INITIAL.
CLEAR wa_result.
LOOP AT gt_result INTO wa_result.
TRANSFER wa_result TO lv_path.
ENDLOOP.
ENDIF.
REFRESH gt_result.
*End of main loop for batching
ENDDO.
*Close dataset
CLOSE DATASET lv_path.
CLOSE CURSOR lv_Y03HOCSINH_dbcur.
ELSE.
DATA: lv_mesg TYPE string.
CLEAR et_file_return.
et_file_return-type = 'E'.
CONCATENATE
'Error occurred when creating dataset' lv_path
INTO lv_mesg.
et_file_return-message = lv_mesg.
Append et_file_return.
ENDIF.
ELSE.
CLEAR et_file_return.
et_file_return-type = 'E'.
et_file_return-message =
'Installed ABAP program does not match interface definition'.
APPEND et_file_return.
ENDIF.
Thanks for helpr u able to figure it out..........i got the same error .......can someone help me fix this issue
-
Execute ABAP Program - Error in Open File Cust_Dim.dat
HI All,
I am trying to Implement scenario of Data Service designer for Extract SAP Application data (page no. 181 Onwards). It is for transfer data from SAP ECC - KNA1 to MSSQL table.
I have Data Service server install on my system.
I have implement all the steps. When I execute job server. I am getting error like
"Execute ABAP program <C:/Program Files/Business Objects/BusinessObjects Data Services/ZCUSTDIM_1.aba> error < Open File Error -- C:\Program Files\Business Objects\/Cust_Dim.dat>"
Does anyone knows about this? I have tried to find lot in SDN but didn't find any solution.
Thanks
RatnakarHi all
I was having the exact same problem as the one explained here.
I was a little mixed up because I assigned full privileges on the destination folder to one specific account called installsap
I used this account for installing SAP BO Data Services. This account is the one configured on the Business Objects Data Services Service:
However, I kept getting the same error, as if this account had not enough privileges over the folder.
I saw that there is another Service called Server Intelligent Agent. I went through its configuration Properties by using the Central Configuration Manager, specifically within the Log On As Property and it seemed like a non specific System Account was configured there.
Then I open the services.msc (Windows application) in order to see this very same service configuration and it had NOTHING specified there, nor a Local System Account nor an specific user account.
So, I stopped the service and specified the installsap account I used for the Business Objects Data Services Service. After that I verified I could see this configuration through the Central Configuration Manager and now both tools showed the same.
Then I started the SIA Service retried again executing the ABAP Data Flow and the Error in Open File was gone.
It is how the SIA Service configuration looks like.
By the way, I am not sure if the "Job Server Service" which was cited before in this thread is the same as the Server Intelligence Agent Service I modified
Besides, although I've been using DS for quite a considerable amount of time, I have never heard of such "Job Server Service". Let me know if I am wrong.
Anyways it worked for me and I hope it works for someone else who faces the same error.
Best regards! -
How to set a Executable ABAP Program to run as a Background Batch Job
Hi
Currently I had a Executable ABAP Program which when executed prompts for user to enter selection once entered and executed it will delete user entered selections from a Table.
Now my requirment is to enhance that program to run it as a BACKGROUND BATCH JOB so that there will be an entry in SM37 when the program is executed
How can i achieve thisHi,
Please refer this link .
It has the steps.
http://sapient.wordpress.com/2007/06/19/how-do-you-set-up-background-jobs-in-sap/
Regards,
SuryaD. -
[EDIT 20140207]:
I found that the default domain policy sets "run these programs at user logon" and (other than I expected) not BOTH GPO settings become active, but the setting from the default domain policy overrides the setting from my new GPO. So I think I have
found the answer myself.
When on our W2k8-R2 DC I create a new GPO and configure
"Computer Configuration/Policies/Windows Settings/Administrative Templates/System/Logon/run these programs at user logon" to "c:\windows\system32\notepad.exe" (just for testing) it won't take effect on Win 7 SP1, no matter what the Security
Filtering options are.
It seems other settings (in the very same GPO) become active but "run these programs at user login" from the computer policies section doesn't. I configure the very same setting in the section "user policies" instead and add "Authenticated
Users" to Security Filtering, the program will be started. But that's not what I need.
I can reproduce the issue, here are the exact steps:
create a new group "group-a" for later security filtering
create a new GPO
in the new GPO set "Computer Configuration/Policies/Windows Settings/Administrative Templates/System/Logon/run these programs at user logon" to "c:\windows\system32\notepad.exe"
for setting the scope remove "authenticated users" from Security Filtering and add "group-a" instead
link the GPO to the domain root
make "test computer" a member of "group-a"
on "test computer" run "gpupdate /force", reboot, log in
Issue: notepad is not being started.
What I'm aiming for is obvious: Depending on the membership of group-a I want to configure certain programs that should be started whenever a user logs in.
gpresult /R returns that it would be applying the GPO. (It actually is but the setting "run these programs at user login" is not being applied.)
For debugging I started MMC / RSoP on one of the machines on which the GPO should have been applied and found that "run these programs at user login" is not set (which seems to be the reason why the GPO won't work on the machines).
Searching the web I found similar reports
[1] [2] but no solution was found and the user used a workaround instead.
If I change the GPO so that I use the very same setting in "user configuration" instead of "computer configuration" it works as long as I add "authenticated users" to the Security Filtering. But then the GPO is applied to all users
and not only to the ones using computers which are members of group-a. According to this howto [3] I should not remove "authenticated users" but alter the security setting instead. However, the howto seems to be aimed ad w2k3 and using Win2k8 I cannot
find security settings "apply" for "authenticated users" so I cannot remove that setting, there's only "read" or "read and modify".
So two questions:
1. Why doesn't it work when using "computer settings"
2. What about that Security Filtering with removing "authenticated users" and using group-a instead?
T.
[1] http://social.technet.microsoft.com/Forums/windows/en-US/0e280490-fba6-4ced-aba5-ae49c60e44bd/computer-gpo-run-these-programs-at-user-logon-not-working-as-intended-on-win7-clients?forum=w7itproinstall
[2] http://social.technet.microsoft.com/Forums/windows/en-US/8cb78bf8-33ec-461e-8604-32d82d016685/run-these-programs-at-user-logon?forum=winserverGP
[3] http://www.grouppolicy.biz/2010/05/how-to-apply-a-group-policy-object-to-individual-users-or-computer/Hi,
sounds like you find the answer already.
If you have any further question, please feel free to let me know.
Have a nice day!
If you have any feedback on our support, please click
here
Alex Zhao
TechNet Community Support -
Authorization to execute ABAP program
Hi,
I would like to execute one ABAP program, so what authorizations i need to have please le tme know? It is developed by our developers i want to test the program in produvction server.
Thanks
praveenPraveen,
which authorizations you need depend of course on many things.
But if you not will be using the transaction method mentioned earlier in the post you have to extend your own ABAP with own authorization checks.
You can reuse SAP-authorizations or create your own authorizations as well. It all depends on what you are trying to achieve. Some times it is wise to reuse, and some times it is wise to create own authorizations.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/52/67167f439b11d1896f0000e8322d00/frameset.htm
Good luck!
//freppe -
Execute ABAP program on R3 and export data to BI
Hi All,
I would like to know if there are steps to execute the remote program on R3 side and return the data to BI? I read a few
articles in there but couldn't figure how to do that yet. Could some one point me to the source/documents that I can read about?
Thanks in advance,
TaiIf you have an ABAP program on BW, you can call the Function Module on ECC through RFC and it will retireve the data. Depending on data volume and how sophisticated you want to get, you can even packetize the extraction so as to not put a huge strain on your ECC and BW resources.
This is typically the technology behind how standard content and generic R3/ECC DataSources extract data from an R3/ECC system and into a BW system.
For modeling purposes, if the data you want to extract is on a table in R3/ECC, you'd be better off creating a generic DataSource, if a standard content DataSource doesn't already exist. RFC enabled Function Modules are good for reading flat files on a R3/ECC server to load into BW. -
Executing ABAP program in RFC to File
Hi,
In the RFC to File, the RFc is called in the ABAP program.
So when i am executing the ABAP program for the 1st time it doesnt reach PI, only when clicking the execute button multiple times execution reaches PI and a message ID is created along with the required data.
what is the problem? why is it not reaching PI when i execute at the first time itself?Hi Ravi,
Thanks for the response.
>>> First u have check RFC destinatios wheter it working or not. 1) U r program ID should match with RFc destination and RFC adapter configurations.
I have tested the RFC destinations and it works fine. I have also given the same Program ID in adapter configuration
>>>2)should write commit work at last in the Abap Program.
Commit is present at the end of the ABAP program
Cache refresh was also done. But still facing the same problem.
>>>5)Check in SM58 .
And we are getting the following errors randomly:
Server repository could not create function template for 'ZFN_EXTRACT
Commit fault: com.sap.aii.adapter.rfc.afcommunication.RfcChannelMismatchE -
Database parameter in an ABAP program
Hi Everyone,
Can you tell me if we can set a DB parameter like the one below:
ALTER SESSION SET "_B_TREE_BITMAP_PLANS" = FALSE
in an ABAP program?
if yes then do let me know.
Regards,
SugopaHi,
Looks like you cannot use this statement at ABAP Program level but at OS Level only -
Call or Execute, ABAP program with variant
REPORT Z_call_ABAP_program NO STANDARD PAGE HEADING.
TABLES : BKPF , INDX.
PARAMETERS : ZBUKRS LIKE BKPF-BUKRS OBLIGATORY DEFAULT '0001',
ZGJAHR LIKE BKPF-GJAHR OBLIGATORY DEFAULT '1995'.
SELECT-OPTIONS : ZPERIOD FOR BKPF-MONAT OBLIGATORY.
DATA : BEGIN OF CHECK_TAB OCCURS 100,
CLIENT LIKE BSEG-MANDT ,
COMPANY LIKE BKPF-BUKRS ,
FINYR LIKE BKPF-GJAHR ,
MONAT LIKE BKPF-MONAT ,
LDDT LIKE BKPF-CPUDT ,
END OF CHECK_TAB.
DATA : BEGIN OF CHECK_TABO OCCURS 100,
CLIENT LIKE BSEG-MANDT ,
COMPANY LIKE BKPF-BUKRS ,
FINYR LIKE BKPF-GJAHR ,
MONAT LIKE BKPF-MONAT ,
LDDT LIKE BKPF-CPUDT ,
END OF CHECK_TABO.
DATA : BEGIN OF CT_KEY ,
CLIENT LIKE BSEG-MANDT ,
COMPANY LIKE BKPF-BUKRS ,
FINYR LIKE BKPF-GJAHR ,
MONAT LIKE BKPF-MONAT ,
LDDT LIKE BKPF-CPUDT ,
END OF CT_KEY.
START-OF-SELECTION.
IMPORT CHECK_TAB FROM DATABASE INDX(VP) ID 'CDSDATE'.
LOOP AT CHECK_TAB.
MOVE-CORRESPONDING CHECK_TAB TO CHECK_TABO. APPEND CHECK_TABO.
ENDLOOP.
LOOP AT CHECK_TAB.
IF CHECK_TAB-FINYR = ZGJAHR AND CHECK_TAB-MONAT IN ZPERIOD AND
CHECK_TAB-COMPANY = ZBUKRS.
CLEAR CT_KEY.
MOVE: CHECK_TAB-CLIENT TO CT_KEY-CLIENT ,
CHECK_TAB-COMPANY TO CT_KEY-COMPANY,
CHECK_TAB-FINYR TO CT_KEY-FINYR ,
CHECK_TAB-MONAT TO CT_KEY-MONAT ,
CHECK_TAB-LDDT TO CT_KEY-LDDT.
EXPORT : CHECK_TAB CT_KEY TO MEMORY.
SUBMIT ZCDSDTUP
WITH YCLIENT = SY-MANDT
WITH YCOMPANY = ZBUKRS
WITH YFINYR = ZGJAHR
WITH YMONAT = CHECK_TAB-MONAT
WITH YLDDT = CHECK_TAB-LDDT
VIA SELECTION-SCREEN AND RETURN.
IMPORT CHECK_TAB FROM MEMORY .
ENDIF.
ENDLOOP.
SKIP 2.
WRITE :/2 'Position Before Update'. ULINE /2(53).
WRITE :/4 'Client' , 11 'Comp.' , 18 'Fin.Yr.' , 27 'Period' ,
35 'Data Downloaded upto'. SKIP 1.
LOOP AT CHECK_TABO.
IF CHECK_TABO-FINYR = ZGJAHR AND CHECK_TABO-MONAT IN ZPERIOD AND
CHECK_TABO-COMPANY = ZBUKRS.
WRITE :/5 CHECK_TABO-CLIENT,11 CHECK_TABO-COMPANY,19 CHECK_TABO-FINYR,
29 CHECK_TABO-MONAT, 38 CHECK_TABO-LDDT.
ENDIF.
ENDLOOP.
SKIP 3.
WRITE :/2 'Position After Update'. ULINE /2(53).
WRITE :/4 'Client' , 11 'Comp.' , 18 'Fin.Yr.' , 27 'Period' , 35 'Data Downloaded upto'. SKIP 1.
LOOP AT CHECK_TAB.
IF CHECK_TAB-FINYR = ZGJAHR AND CHECK_TAB-MONAT IN ZPERIOD AND
CHECK_TAB-COMPANY = ZBUKRS.
WRITE :/5 CHECK_TAB-CLIENT ,11 CHECK_TAB-COMPANY , 19 CHECK_TAB-FINYR,
29 CHECK_TAB-MONAT , 38 CHECK_TAB-LDDT.
ENDIF.
ENDLOOP.
SKIP 3. ULINE.
WRITE :/7 'PLEASE CONFIRM CAREFULLY THE ABOVE DATES ' ,
/5 'BEFORE RUNNING THE DATA DOWNLOAD PROGRAM FOR CDS.'.
EXPORT CHECK_TAB TO DATABASE INDX(VP) ID 'CDSDATE'.You will haev to add the varaint also in the object entry in the transport request.
For this
goto Se38 - > select progfram - > click on radio button for varaints - > Cick on Display - > Utilities -> transport request - > and execute.
This wil include the varaint also with the program name in the transport request and allow you to directly execute the program after transport to be executed with a varaint.
Regards,
Mansi. -
Close a transaction through ABAP program without user log off.
Hi,
I have to write an ABAP program that will check if a particular transaction (for example tcode VA01) is running than it must close the transaction.
Please give me your inputs or sample code if possible.
Thanks for your suggestions.
--SanjaySanjay,
Check with this how much it is going to help you out..
PARAMETERS: p_user LIKE sy-uname.
DATA: gt_user_info TYPE TABLE OF /sdf/user_context,
wa_uinfo LIKE /sdf/user_context.
START-OF-SELECTION.
CALL FUNCTION '/SDF/MON_USER_MEMORY'
TABLES
modes = gt_user_info.
CHECK NOT gt_user_info IS INITIAL.
LOOP AT gt_user_info INTO wa_uinfo WHERE uname EQ p_user.
IF wa_uinfo-tcode = 'VA01'.
CALL FUNCTION 'TRANSACTION_ABORT'
EXPORTING
transaction_id = transaction_id
EXCEPTIONS
OTHERS = 1.
EXIT.
ENDIF.
ENDLOOP.
Regards,
CK -
How to get the name of an executing ABAP query in run time
Hi ABAP Gurus,
I need to get the ABAP query name when it's running. For example we can get the current executing ABAP program name from SY-REPID.
My tried logic - every query generates an ABAP program like AQZZUGQUERY. 'UG' stands for user-group name and the length specified for it is 12, if the length of the user-group name is less than 12, then the rest will be filled by '='. Next 'QUERY' stands for ABAP query name and the length specified for it is 14, if less, then the rest will be filled in with '=' in the right. I've tried to extract the query name by using cut and trip (offset) operations.
But somehow this logic is not working - always it's picking up the function name as checked in debug mode.
Guys - Can you please provide me the solution on this.
Thanks & regards,
Jayanta Bej.Guys,
I've cracked the issue. Instead of retrieving the query name from sy-repid, I've retrieved it from sy-cprog and the problem is resolved.
Thanks guys for your quick responses.
Thanks and regards,
Jayanta Bej. -
Error:Dataflows abap program
Hi,
Dataservices 4.2
Sql server 2008
SAP (4.6
I make a migration of dataservices 11.5 towards 4.2 on new waiter.
when I try to execute my dataflow abap, I have this message error :
error:"RFC Call Receive error<Function/BODS/ABAP_RUB:RFC_ABAP_EXCEPTION( PROGRAM_DOES_NOT_EXIT)aucun numéro de pager n'est généré pour cette adresse
I have make install on the Server SAP 2 functions ( K900187.R22 and R900187.R22) which allowed me to import my SAP tables on the datastore and
reading the data.
I use "execute preloaded " option for execute my dataflows
since migration the dataflows abap do not function any more
it would have installations or configuration has to make on the Server SAP
Somebody has an idea
Thanks youDear Marie,
You will have to have to import the new ABAP Program group "BODS/BOS" which you can find in the local install folder...
Here are some details:
Installing Functions on the SAP Server
SAP BusinessObjects Data Services provides functions that support the use of the ABAP, BAPI, and
IDoc interfaces on SAP servers. You will need some or all of these functions in the normal operation
of the software in an SAP environment. These functions perform such operations as dynamically loading
and executing ABAP programs from Data Services, efficiently running preloaded ABAP programs,
allowing for seamless metadata browsing and importing from SAP servers, and reporting the status of
running jobs. Some of these functions read data from SAP NetWeaver BW sources.
You must upload the provided functions to your SAP server in a production environment. It is
recommended that you always upload the functions to your SAP server whether you are in a
development, test, or production environment. The functions provide seamless integration between
Data Services and SAP servers.
The default installation places two function module files for SAP servers in the ...\Data
Services\Admin\R3_Functions\transport directory. You then upload these files to SAP servers
using the SAP Correction and Transport System (CTS) or manually. Using CTS allows for version
control as the functions evolve across releases.
The installation provides two versions of transport files (depending on the server version you are using)
to install the functions on the SAP server. To obtain the names of the latest transport files for installing
or upgrading these SAP server functions, see the readme.txt file
And I've found those files and text files in the local install folder....in:
Program Files\SAP BusinessObjects\Data Services\admin\R3_Functions
(that's where I've installed it).
There you'll find some descriptive txt as how to proceed.
After installing, it might happen that the executing user is missing some authorizations.
Here my authorizations team helped me by tracing the user and then adding the necessary rights.
Sure hope this will help you.
Notes to check:
see SAP Note 1919255
Note 1916294 -
Profile parameter.....activate
Dear all,
After Ecc 6.0 installation......we want to activate one profile parameter na in RZ10, RZ11. Can anyone guide me how to activate that profile parameter, give the profile parameter name also..... Thanks in advanceHi Harish,
To activate the profiles please do the foll:
Go to t.code RZ10 and enter the profile name you want to activate, use the pushbutton to display profiles that are available then choose the profile and activate it. Stop and restart the SAP instance for the profile through CCMS.
ABAP program RSPARAM helps you to find out the Parameters which are active for a given SAP instance.
Hope it helps.
Regards,
Raghu -
Problem in using function module parameters in abap program
i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND' i got the problem using the function module parameters in my abap program.
these are the parameters inside fm
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_FIELDCAT) TYPE AIND_FCAT
*" VALUE(I_FIELDS) TYPE TABLE OPTIONAL
*" VALUE(I_OBLIGATORY_FIELDS) TYPE TABLE OPTIONAL
*" EXPORTING
*" VALUE(E_INFOSTRUC) TYPE AIND_DESC
*" REFERENCE(E_ALL_FIELDS) TYPE TABLE
*" REFERENCE(E_MATCHING_FIELDS) TYPE TABLE
*" EXCEPTIONS
*" NO_INFOSTRUC_FOUND
i want to declare E_ALL_FIELDS parameter in my abap program,
i have declared as
data: E_ALL_FIELDS TYPE TABLE.
but the system throws error that
'type of field 'TABLE' is generic .no table line has been specified'.
i want to use it in my abap program how can i declare in my abap program .You have to declare the table using any specific type.
The type table in the FM is generic so you can pass any type you need.
For instance:
TYPES: BEGIN OF ty_fields,
fieldname LIKE dfies-fieldname,
END OF ty_fields,
TYPES: TY_T_GLU1 LIKE GLU1 OCCURS 0,
ty_t_fields type ty_fields occurs 0.
DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
lt_matching_fields TYPE ty_t_fields WITH HEADER LINE.
CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
EXPORTING
i_fieldcat = ft_fieldcat-fieldcat
i_fields = ft_fields_filled[]
IMPORTING
e_infostruc = lv_info_struct_name
e_all_fields = lt_info_struct_fields[]
e_matching_fields = lt_matching_fields[]
EXCEPTIONS
no_infostruc_found = 1.
Maybe you are looking for
-
How to convert .iso to .img
i am being driven absolutely madd by my computer. all i want to do is a simple task, yet hours of my life have now been drained. so to save the rest of my time as well as others in the future, how does one convert a .iso file to .img on a mac? (yes,
-
How can I download the original Apple version of Java 6 please?
I have an iMac OSX 10.10.1 Yosemite with Java 1.8.0_25. How can I download the original Apple version of Java 6 please? All my attempts are referred to the latest version of Java, which I already have! Catch 22! Thanks
-
I have a KT3 mainboard. I bought 2pcs Samsung PC2700 DDR ECC RAM (K4H560838D-TCB3). If i use it the system don't boot. What is the solving?
-
Post Author: Marta_P CA Forum: General Hi! I have a question: how add banner page for report? I have to send information to the printer who is printing the report. Thx Marta P.
-
I cannot do anything online because I constantly get the "connection has been reset" message. This has never happened before. I followed instructions on Firefox help page for this message and it only made it worse!