ABAP Query Extracts
hello experts ,
i am using ABAP query (sq01) infoset ( logical database ).Is it possible to add extract feature in the abap query selection screen . if possible then how?
thanks
vivek
Hi Vivek,
Its not possible. Whenever you activate your query it generates a standard program & its not modifiable.
Regards
Abhii
Similar Messages
-
How to extract the list of BOM materials through ABAP query?
Hello Experts
I want to extract a report from SAP which should contains the following,
1). Main Material with description
2). Sub material with description and quantity
I have tried with the tables MAST, STKO AND STPO but i couldn't able to create the correct ABAP query.
Could you please advise what are the table i should take to get this report.
Thanks in advance.
Regards,
RaghuHi Raghu
Check this below link
how to get BOM Components using ABAP Code?
FM to get all Parent material/BOM of the given material
Let me know if your problem is solved
Regards
Pradeep -
Hi Experts,
I have a data source in which the extraction is using ABAP Query. From RSA2 I got the infoset name. I would like to know if the extraction logic is put inside this infoset. If so how to see the extractor ouput in R/3 and how to debugg the infoset. I can't put break point in infoset. I tried to debugg the extractor through rsa3 and it is not going to the infoset also.
Please help me as I don't have any experience in BI.
Thanks,
Soumya.Hi Soumya,
Infosets are similar to views created on different tables by linking them with one another. So instead of debugging one should look for how this tables have been linked in tcode SQ01.
Hope that helps.
Regards
Mr Kapadia -
How to hide some fields in ABAP Query
Hi,
My ABAP Query has a long list of extracted fields. I wanted to set some of these output to "HIDE".
This allow User the flexibility to decide what fields to show.
How can I set the field to "HIDE" in my query?
Thanks
byeHi Tim,
You can do this by setting the Report layout variant in following steps:
1. First define the parameter on selection screent for report variant.
2. Data decelaration for variant.
3. Value request to get already present variants on report:
4. If doesn't choose the layout take out the default report layout.
5. Initialize the report variant.
6. Apply the variant to the REUSE_ALV_GRID_DISPLAY funtion module.
Here to generate report variant first to open report output and then as per according to user set the layout of report using the layout icon of ALV with summation on value fields (as required) and create layout name.
*Data Deceleration as below:
Data :g_save(1) TYPE c,
** g_default(1) TYPE c,
g_exit(1) TYPE c,
gx_variant TYPE disvariant,
g_variant TYPE disvariant.
*First Define the parameter to give layout of Report variant.
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-003.
PARAMETERS: p_vari TYPE disvariant-variant.
SELECTION-SCREEN END OF BLOCK 3.
* Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
* Selection-Screen Checking
AT SELECTION-SCREEN.
PERFORM pai_of_selection_screen.
INITIALIZATION.
w_repid = sy-repid.
PERFORM variant_init.
* Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
FORM f4_for_variant .
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
** ELSE.
** IF g_exit = space.
** ENDIF.
ENDIF.
ENDFORM. " f4_for_variant
FORM pai_of_selection_screen .
IF NOT p_vari IS INITIAL.
MOVE g_variant TO gx_variant.
MOVE p_vari TO gx_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant.
g_variant = gx_variant.
ELSE.
PERFORM variant_init.
ENDIF.
ENDFORM. " pai_of_selection_screen
FORM variant_init .
CLEAR g_variant.
g_variant-report = w_repid.
ENDFORM. " variant_init
**While Showing report pass the variant :::
g_save = 'A'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_structure_name = 'IT_MAIN'
is_layout = i_layout
is_print = i_print
it_fieldcat = i_fieldcat[]
it_events = i_events[]
i_save = g_save
is_variant = g_variant
TABLES
t_outtab = it_main
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Many Thanks / Himanshu Gupta -
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. -
Hi,
I would like to extract customer details like name,street,city,country,region (which is structure ADDR1_DATA)using customer number.I also would like to use structure RF02D-vkorg and table KNVK-name1 to extract the details. Any help how to extract using an ABAP query? Is there any standard function module or standard logical databases table availble?
Thanks in advance.
Message was edited by: Shiva RamUse the FM BAPI_ADDRESSORG_GETDETAIL
The Import parameterds should be
OBJ_TYPE = 'KNA1'
OBJ_ID = (customer number )
CONTEXT 0001
IV_CURRENT_COMM_DATA X
The FM can be used to get the details for vendor as well as the customer .
In case of vendor use 'LFA1' for OBJ_TYPE.
Let me know if still do not get the required customer data .
Regards,
Vijay . -
Date format in Query Extract - Urgent
Hi,
I'm using Query-Extract (RSCRM_BAPI) to extract query data and store it in separate location.
While extracting the data into .csv ot .txt file, date will be displayed as yyyymm (200807). As per the requirement we should display the date in the format mmm-yyyy (Jul-2008).
Please help me. its very urgent.
Thanks,
VarunHi ,
This issue can be solved by writing a routine in update rules pls take the help of abap experts to solva this
this is not a big issue for them
Hope i have guided u properly
Pls assign me points my boss ??
Regards ,
Subash Balakrishnan -
Adding code in ABAP Query(ABAP HR)
I have created an ABAP Query for getting the Absence details of employee within a specified period.I am populating the fields
Employee number, Organization Unit,Absence start date,Absence hours, Absence enddate.
If an employee is in leave for 10 days, this information will be stored in PA2001 table,and this table is not Organization specific.
During the specified period(20 days), if an employee is under two Organization units(5 days in 1st Org Unit,15 days in 2nd Org Unit). The query is extracting two records for the same employee, because of two Organization units. And while populating the data, the query is getting the Absence information from PA2001 table, and this is causing overlapping of data. So it is showing the Absence details for that employee as 40 days(20 days in 1st Org Unit and 20 days in 2nd Org Unit,Instead of total 20 days). So i would like to add validation over here after extraction of data from the PA2001 table,before displaying the data.
I have tried adding the code in the infoset, at END OF SELECTION Event,but i am not able to change the list, as i am not able to access the tables used by the Query.
Can anybody suggest me where to add the code in the Query, so that i will be able to solve this issue, instead of changing the code in the Report program generated by the Query.you can look at BAPI_PTIMEOVERVIEW_GET
this gives the output back for the selected period so you don't get alle the records back from you're pa2001 table. (only this overview doesn't take into considerationd the distiction the difference between leave and illness)
further on if you consider using the pa2001 table you can loop through the begda and endda and add 1 day for each record and programm the logic how you want to intrepet each day you'reself
I use the data from perws which comes from the function HR_PERSONAL_WORK_SCHEDULE
(which is also used in the BAPI mentioned above)
and from PA0001 you can retrieve how long somebody was in 1 org unit !!
LOOP AT it_2001 WHERE begda BETWEEN i_begda AND i_endda
OR endda BETWEEN i_begda AND i_endda.
h_datum = it_2001-begda.
IF it_2001-awart BETWEEN '0100' AND '0199'.
WHILE h_datum <= it_2001-endda.
READ TABLE it_perws WITH KEY datum = h_datum.
IF sy-subrc = 0.
* you're logic
ENDIF.
CALL FUNCTION 'FKK_DTE_ADD'
EXPORTING
i_base_date = h_datum
i_periode = 'D'
i_period_factor = 1
* I_USE_FACCAL = ' '
* I_WORKDAY_INDICATOR = '-'
IMPORTING
e_datum = h_datum
* EXCEPTIONS
* ERROR_OCCURED = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDWHILE.
kind regards
arthur de smidt
Edited by: A. de Smidt on Jul 16, 2008 8:47 AM -
ABAP Query output to XML file using Business connector
Hi All,
I would request your help on to know, how can I read the output of ABAP query executed in SAP system via Business connector and then generate a XML file.
Also the existing business connector system, generates the XML file in encoding iso-8859-1. Where as customer wants the output XML file in encoding windows-1252.
Please help with your valuable ideas.
Thanks,Hello,
possible solution:
1. create a remote function module (FM) in SAP which returns your needed data
2. create outbound map in BC for this FM
3. call this FM from BC in a flow
3. extract the result to XML (e.g. with service recordToDocument)
CSY -
Customer Notes using abap Query
HI Experts,
Can any body suggest me abap query for extracting customer notes?? I have to go thru only this option.
the text i am supposed to extract is here.......VA42 > goto>header>texts> completion notes ..
READ_TEXT is not a solution for me...i need only ABAP Query..
thanks
sony
Edited by: sony on Jan 6, 2009 1:32 PMhi jay,
thanks for ur reply..but as mentioned read_text is not a solution..
thanks
sony
Edited by: sony on Jan 6, 2009 1:43 PM -
Coding for an additional structure in ABAP Query
I am creating an ABAP query to extract the Purchase Inforecords prices. While linking EINA and EINE Iam able to extract the effective price. When there is a scaled pricing, I want to extract information from KONM or KONW tables. Howeever, can't find a quick answer.
I liked the function module ME_GET_INFORECORD_CONDITIONS that gives the scaled prices for a given PIR information.
I would like to create an additional structure in my abap query and extract this information.
Can some one please provide the coding: I tried the following after creating a new structure called addscale. This did not work. I have limited understanding of ABAP.
CALL FUNCTION 'ME_GET_INFORECORD_CONDITIONS'
EXPORTING
i_ekorg = eine-ekorg
i_esokz = eine-esokz
i_infnr = eine-infnr
i_lifnr = eina-lifnr
i_matnr = eina-matnr
i_matkl = eina-matkl
i_werks = eine-werks
i_vabme = eina-vabme
TABLES
tekomd = addscale.use the following function module you will get the required info.
BAPI_INFORECORD_GETLIST -
how we create abap query can any1 tell me?
Reporting tool :Standard reports
Purpose :Provide solutions for your most frequent reporting requirements
Advantages :Can be used immediately
No developments required
Limitations :Limited flexibility
Output fields cannot be selected as required
HIS
Purpose :Hierarchies are displayed as graphics
Reports are executed using selected structures or substructures, that is, using preselected sets of objects
Advantages :User-friendly method of displaying hierarchical structures
Integration with InfoSet Query and standard reports
No need to switch from one HR application to another if you want to execute reports from different applications
Little training required
Limitations : Limited flexibility
Tool is used to execute standard reports and customer reports
It cannot be used to create reports
InfoSet Query
Purpose :Intuitive, general SAP reporting tool used to create customer reports
Enables you to create reports for all areas of HR
When InfoSet Query is accessed from Human Resources (HR), the Query area and User group parameters already contain values and you can only perform ad hoc reporting. If InfoSet Query is accessed this way, it is called Ad Hoc Query in HR (see HR in InfoSet Query).
Advantages :User-friendly interface
Very easy to use
No programming required
If integrated with SAP Query, you can continue processing queries using SAP Query
Set operations enable you to create sets of objects as required for which data must be output
Can be included in roles using a suitable InfoSet
Limitations :InfoSets and user groups must be defined in SAP Query before you can use InfoSet Query
Multiline lists cannot be displayed
SAP Query
Purpose :General SAP reporting tool used to create customer reports
Individual definition of user groups, InfoSets, and queries
Advantages :Extremely flexible
No programming required
Queries can be provided in the SAP Easy Access menu
Includes numerous options for aggregating data, performing calculations, and displaying graphics
Enables you to display multiline lists
Enables you to define one basic list and several statistics and ranked lists for each query
Limitations :Restricted to data from the R/3 System
Each HR query can process data from just one HR logical database:
PNP: Administration, Time Management, and Payroll
PCH: Generally for all areas, but particularly suitable for reporting on data from Personnel Planning
PAP: Recruitment
Requires much more training than other options
Limitations:Data is extracted from OLTP systems, that is, real-time data is not accessed
Business Information Warehouse
Purpose :Analytical reporting tool used for information and decision-making purposes
Advantages : Extremely flexible
Facilitates complex calculations (calculation of averages, time series comparisons)
Enables you to access non-SAP data
Easy to use
Uses OLAP technology
Includes detailed Business Content (HR extractors, InfoCubes, key figures, and standard queries
i think it is adhoc query not abap query -
Need an understanding of how do we judge or make out that for a particular report we can go for ABAP query and for one we can go for BW report.??? Please provide clear answer with example..
ThanksHi,
Your question is very broad based.
ABAP Query is a simple tool in the hands of the Functional consultants to extract information from the tables directly ( u can use complex logic as well ), Example - List all sales orders within a particular period.
But, BW reports are used not for Transactional analysis but for Strategic reporting. Depends upon the nature of data , users of data, availability of data, you should decide. It needs investment in BW module. Report the total sales by region, product etc with trends and graphs.
Thanks
Siva -
How to create an ABAP Query with OR logical expression in the select-where
Hi,
In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
Please help me on this.. Points will be rewarded.
Thanks a lot.
Regards,
Question ManHi Bhupal, Shanthi, and Saipriya,
Thanks for your replies. But that didn't answer my question.
Bhupal,
You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
Shanthi,
Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
Saipriya,
Like what I have said, this is a standard SAP code so we can't do your suggestion.
I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
Thanks a lot.
Points will be rewarded.
Regards,
Question Man -
Logical database of ABAP query
Hi,
Can anybody please let me know what is the Logical database for ETXDCI, ETXDCH & ETXDCJ (Tax tables) with any sales document tables? I need to develop one ABAP query for the users.
I am a Functional person so I would like to know Can anybody please let me know how I can find out the Logical database?
Your time and help will be really appreciate.
Thanks & Regards,
Niki Shah.Try the BRF logical database.
I found it by searching in which programs the tables were used.
It show program SAPDBBRF which is the program for logical database BRF.
Kind regards,
Arthur Parisius
Maybe you are looking for
-
Im tying to unlock an Iphone 4. the celular company make it by its system, and send me an E mail with the instructions to finsh the process by myself, throug itunes. I did every step, and at the end appers a message telling that my Iphone is unlocked
-
Can't remove registered ephone in call-manager-fallback
This ephone and dn keeps registering so long as call-manager-fallback is not shutdown. RTR001#show ephone registered ephone-1[0] Mac:0FD4.9DA0.D415 TCP socket:[1] activeLine:0 whisperLine:0 REGISTERED in SCCP ver 6/5 max_streams=1 mediaActive:0 whisp
-
Books: Sorting PDF's / Using info fields with PDF's
Since it is possible to manage PDF's in iTunes, I've been importing quite a few (well, just drag and drop). So far, I just changed the Name field to the title of the article or book, the Artist field to the authors name, and picked an appropriate gen
-
Autorun PDF on CD in Acrobat 7 and above
I have a large problem. I am trying to autorun a PDF file (created in Acrobat Pro 9) to Autorun on a CD in Reader 7 and above. I have tried having reader on the CD and it doesnt work. My computer has autorun enabled. I have tested the CD on multiple
-
Mountain lion freezes notifications on screen
My notification center shows me some messages as little windows on top right of my screen. But when I try to close them with the mouse it turns on that color wheel and does nothing! So they remain opened. The only way to make them disappear (and use