Change query using abap
hi all,
i find a situation when i need to change many queries to include a common variable of a characteristic. is it possible to create a program to change query? are there any function modules for this?
thanks.
Hi,
You can run or get an URL for query with ABAP Function modules. but for creation, it may not possible.
As this is a different tool.
Regards,
Ravi Kanth
Similar Messages
-
Rename RKF and CKF in query using ABAP
Hi guys,
I am supposed to rename RKF and CKF in query using ABAP. (RKF: restricted key figures, CKF: calculated key figures)
Right now, I am using FM RSZ_X_COMPONENT_GET to load query definition. I can find and rename all used RKF and CKF technical names and rename them in returned tables and then save it using RSZ_X_COMPONENT_SET.
But I see that both RKF and CKF are reusable elements and they are can be probably used somewhere else.
Can you tell me where can I find information in what header table are they saved or maybe some "where used" table.
What FM am I supposed to use to rename CKF and RKF in given query and also in other parts of SAP system?
Even some information how to get deeply into this problem would be very helpful.
Thanks.Hi,
You can see the query element definitions in RSZ* tables, but not sure if you will be able to find complete info, like a particular RKF is restricted by following selections by looking at the tables. Also, please do not try to change the info directly in the tables even though you seem to have a lot of objects to changes.
Hope this helps... -
Getting an error when i am execution a BI query using ABAP.
Hi Expert,
I am getting an error when i am execution a BI query using ABAP. Its Giving me this Error "The Info Provider properties for GHRGPDM12 are not the same as the system default" and in the error analysis it saying as bellow.
Property Data Integrity has been set differently to the system default.
Current setting: 0 for GHRGPDM12
System default: u2019 7 u2018
As I am very new to BI and have very limited knowledge, so I am not able to understand this problem. Can any one help me to resolving this issue. Previously it as working fine, I am getting this error last 2 days.
when i am debugging , I am getting error from
create instance of cl_rsr_request
CREATE OBJECT r_request
EXPORTING
i_genuniid = p_genuniid.
this FM. Its not able to create the object. Can any one please help me out.
Thanks in advance.
Regards
SatrajitHi,
I am able to solve this problem
Regards
Satrajit -
Execute a query using ABAP (XSLT transformation issue)
Hello,
I made the steps from this blog (part I, II and III).
/people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
When trying to run the XSLT transformation, I got the message that : XML invalid source file.
I am not sure what are the steps for running a transformation, or running it for this case ,maybe something it's not ok. I just run it, did not provide any information.
Any suggestions ? Did anyone use the function module described in this blog ?
Thank you very much in advance.try giving
CALL TRANSFORMATION (`ID`)
SOURCE meta = meta_data[]
output = <ltable>[]
RESULT XML xml_out
OPTIONS xml_header = 'NO'.
and check - sometimes the codepages configured in the BW system tend to cause an issue... I am not sure if the syntax is right though - but you are basically trying to bypass any encoding that is happening in the query transformation....
http://www.sapetabap.com/ovidentia/index.php?tg=fileman&sAction=getFile&inl=1&id=4&gr=Y&path=ABAP%2FABAPENANGLAIS&file=ABAP-XML+Mapping.pdf&idf=41
Edited by: Arun Varadarajan on May 18, 2009 11:28 PM -
Executinga BW query using ABAP
I saw this blog on how to execute a BW query using abap. My question is, where do we create the function module Y_EXECUTE_QUERY? I mean under which function group? Thanks.
This is the blog I was referring to:
/people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i -
Hello ,
1) I used the function module from this link :
/people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
When I run it , I see the metadata correct and this is all. No more data to display.
2) Then I used the code from here :
/people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
MOVE: <variable name> TO wa_var-vnam ,
'I' TO wa_var-sign,
'EQ' TO wa_var-opt,
<variable value> TO wa_var-low .
query_variables = var
FUNCTION z_test_query.
FIELD-SYMBOLS: <outtab> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
TYPE-POOLS: rrx1 .
DATA: wa_var TYPE rrx_var ,
var TYPE STANDARD TABLE OF rrx_var ,
xml_out TYPE string ,
breturn TYPE STANDARD TABLE OF bapiret2 ,
rpt_tech_id(50) ,
wa_meta TYPE zbw_query_output_metadata ,
xslt_error TYPE REF TO cx_xslt_exception ,
is_fieldcat TYPE lvc_s_fcat,
it_fieldcat TYPE lvc_t_fcat,
new_table TYPE REF TO data ,
xslt_message TYPE string ,
meta TYPE STANDARD TABLE OF zbw_query_output_metadata . " this structure was created in the previous part
*fill all the variables like below.
MOVE: 'SEM_PSG01/PSG___00000_080_V1' TO rpt_tech_id .
APPEND wa_var TO var .
CLEAR :xml_out .
REFRESH breturn .
CALL FUNCTION 'Z_QUERY_EXECUTE'
EXPORTING
query_name = rpt_tech_id
IMPORTING
xml_out = xml_out
TABLES
return = breturn
meta = meta
EXCEPTIONS
bad_value_combination = 1
user_not_authorized = 2
unknown_error = 3
query_not_found = 4
OTHERS = 5.
CASE sy-subrc .
WHEN 0 .
CLEAR: is_fieldcat, wa_meta .
REFRESH: it_fieldcat .
LOOP AT meta INTO wa_meta.
is_fieldcat-fieldname = wa_meta-fieldname.
is_fieldcat-outputlen = wa_meta-outputlen .
is_fieldcat-datatype = wa_meta-datatype.
is_fieldcat-scrtext_l = wa_meta-scrtext_l.
APPEND is_fieldcat TO it_fieldcat.
CLEAR : is_fieldcat .
ENDLOOP .
IF NOT it_fieldcat[] IS INITIAL .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <outtab>.
ENDIF .
TRY .
CALL TRANSFORMATION ('Z_GPS_TR')
SOURCE XML xml_out
RESULT outtab = <outtab>.
CATCH cx_xslt_exception INTO xslt_error.
xslt_message = xslt_error->get_text( ).
ENDTRY.
WHEN 1 .
WHEN 2 .
WHEN OTHERS .
ENDCASE .
{ENDFUNCTION.
'Z_GPS_TR' is my transformation (exactly the code from the blog).
'Z_QUERY_EXECUTE' is the function from 1). I did not use variables for the query parameter.
I see with the debugger that <outtab> is filled corectly, with the values from my query. Still , the function, when is runed normally, does not display anything.
3) If I run only the transformation Z_GPS_TR alone, it says invalid source XM source file.
Please, some suggestion? I don't know hot to proceed.
Many thanks.
Edited by: Ariana D on May 19, 2009 11:40 AMHi All
I able to solve this problem
Regards
Satrajit. -
RRi for query using ABAP program
For a report, we are using RRI (jump to target) functionality to see invoices in R/3 system using an ABAP program. I do not have much idea on R/3 systems how invoices are setup in R/3 Dev, test and prod. The ABAP report is done by a backend person. I need to place that in RSBBS. Here, my doubt is that do we need to follow the same procedure for this to move it to production system i.e, first create that RRI and ABAP in respective dev systems and transport both to test and then to Prod? Could anyone please explain me the steps on how this will work in real-time?
Points will be assigned.
ThanksHi,
I am not able to find how the two reports are conncted.
You can check in RSBBS t-code. RRI will be defined here to jump from One Query yo another and many more options.
My work is to copy the parent query a nd do some modification to it. Please let me know how to check and achieve that.
You can do this BEx Query Designer itself.
Regards,
Suman -
Changing query used for details
Hello,
I have generated a table-form with JHS10.2.1, based on a query like
select *
from projects
If the details-button is clicked, I want to see more details then only those of the table projects, so I would like the detail-form to be based on a query like
select prj.*, ot.col_x
from projects prj, other_table ot
where ot.project_number=:1
in which :1 is projects.project_number of the selected record.
How can I achieve this, without needing to prevent some files to be regenerated?
Thanks in advance,
Helmut SteemanHelmut,
You have two ways to generate this:
1. change the ViewObject of the group and join directly with the other_table without using a bind parameter. Set "display in Table" to false for the attributes of the other table.
2. Create a child group for the other table with layout style form and same page to true.
Steven Davelaar,
JHeadstart Team. -
Help! I want to add check number field to a query using ABAP.
I need to select PAYR-CHECT and add this field to a query where BKPF-BELNR = PAYR-REC_BELNR.
How would I write the select statement? HELP!Would this work?
SELECT CHECT FROM PAYR
WHERE REC_BELNR = BKPF-BELNR.
ENDSELECT. -
Execute query with drill down using abap
Hello together,
I need to execute a query using abap and I need the result of the drill down on one characteristic in the query.
I try to use RRX_GRID_CMD_PROCESS to execute query, but I don't understand how to do the drill down.
I thought I have to specify somehow the name of the object on which I need to make the drill down. I tried to send this as a parameter to e_t_drill... but this is not working. I have also seen that
e_t_drill[] = g_sx_buffer-r_request->n_sx_request-drill, but this is empty.
Could you, please explain how to do this?
Thank you,
IulianaOur RKF def is as follows:
Keyfigure: 0deb_cre_lc
Chars:
Posting Keys: 01,02,11,12
Year start date: Restricting it with a variable created on it. Variable is of type Customer exit.This variable
gets value from key date which is entered by user dynamically.
Specified the offsets of Yr start date as 0 to 365.
Regards,
smitha. -
Hi,
I am using the method mentioned by Durairaj (@ /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i )
to execute queries from ABAP.
When I try to execute a query with characteristics in rows and if the characteristics name is large then i get a dump:
'Field symbol has not yet been assigned'
@ <l_field> = wa_set-chavl .
I tried the same for another cahracteristic of lesser length and it works fine.
Initially the chara name was like:
<8 letter dim name>__<7 letter chara name >
when i used a dim name with lesser no of letters:
<7 letter dim name>__<6 letter chara name >
It works fine.
is there any restricition on the lenght of characteristics ?
Thanks,
Message was edited by:
Rithesh VijayakrishnanMatthias,
I have tried to use this method before, but with the follow URL:
/SAP/BC/WebDynpro/SAP/YWEBTEMPLATE_TEST/bi_template_page.htm?&varn1=0pcalmon&varv1=200901&varn2=0p_cocd&varv2=b047&url=/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex
didn't work as I image.
Do I have to transform this url before execute the method?
Tnks for your patience. -
How to use ABAP Class to modify Web Query Result ??
Hi all !
We are using Web Templates to display our Query.
What I would like to do ( and seems a really important issue for our users! ) is to have a "PAGE BREAK" everytime the value of a charateristics change in the report
For Example :
-Page 1-
Division Project
A 1
2
3
-Page 2-
Division Project
B 1
2
3
and so on....
I read threads about using ABAP CLASS but no example what so ever...
We are presently under BW 3.1 but are considering upgrading to 7.0 by the end of the year so if there is a solution to my problem on either version i'd like to know.
If anyone has any information about how I can do this it would be most appreciated
Thx
JB.Hi Yong,
Ravi is right, first check the blogs by Jocelyn, and if you still have specific questions you can ask them. I have used ABAP classes in workflow and I know Mike Pokraka tries to use classes exclusively.
Regards,
Martin -
Change Prg name in classes using abap code
Hello Experts,
I'm having following req:-
I need to change program name using abap code .
I have prepared report which changing prg name & also it is replecting target name into T-code & Programes where source prg name is being used.
My next req is i want to replace sorce prg name in Classes usinf abap coding.
<Priority normalized by moderator>
Thanxs in Advance.
Moderator message : Requirements dumping not allowed, thread locked.
Edited by: Vinod Kumar on Feb 7, 2012 12:32 PMThe application name is not necessarily uniqueue! Customers may create two applications with same name in different systems/clients and transport them into the same target system/client!
You do the mapping with the query:
CL_FDT_FACTORY=>GET_INSTANCE( )->GET_QUERY()->...
There are two methods. One for mapping ID to name and one for name to ID.
There is also a sample report in package SFDT_DEMO_OBJECTS. -
Is there a way to get the company code project profile and the co amount using an Query .
something similar to CJI3 but with the comapny code and project profile.
Or if i have to use ABAP.There are two things. ( Your question is not quite clear, post question clearly, so platform can help you better way )
1. Restrict you report selection based on project Project profile, company code etc. give * in project filed and use dynamic selection functionality
2. If after execution you wanted to display some additional filed
First check change layout option after executing CJI3, if your required field is not there in that case, your requirement can be addressed via Exit COOMEP01 (Actual EXIT_SAPLKAEP_001)
With Regards
Nitin P. -
Hello,
I would like to know how to check change logs for ABAP Query in the Global Area. I had created a query and am not able to find who has changed this. Please provide some valuable suggestion on this.
Regards,
SumitDear Satyen,
Go to menu Edit-->Other user group, choose the user group, where u have assigned the infoset no give the name of ur query and press create button, it will display all the infosets those are assigned with that user group. Now select ur infoset and start developing the query.
see useful tips:
10 Useful Tips on Infoset Queries
Regards,
Abbas.
Maybe you are looking for
-
I installed Firefox 4 beta when it was available as a tester before Firefox 4 was released, so I had two versions of Firefox on my computer. When Firefox 4 was released this week, I installed it and it replaced Firefox 3.6.15. For some reason it seem
-
Recovering emptied trash without Time Machine?
I had a .wav file in the trash that I accidentally deleted. This happened a few hours ago. I do not have time machine set up. Is there any possible way to recover this deleted file? Is there also a way to make time machine work with an external 70gb
-
Switching to Mac - which one for me?
I can't find a suitable place for this question, but my son is starting a job at a tv studio and wants a mac to get into video creation and editing. Which one should he get for this purpose? He has a pc, so he has keyboard, video and mouse. Thanks. p
-
Ok, so im not sure how to use the exec thing at all. part of the code where im having my problem is here rt.exec(new String [] { "mkdir","bob1"}); //should make a directory bob w/e this script is rt.exec(new String [] { "cd","~"});//changes the direc
-
Recovering Windows 7 with recovery disks (4)
I had a crash and re-installed Windows Vista HP, but have an upgrade that once contained a Windows 7 Pro upgrade but the packet but is empty. But I do have (4) recovery disks marked Win7Pro and attempted to use these disks to recover Win7 but stoppe