Batch generation of sap query
Hello there,
I am looking for a way to generate program of sap query in one go. There are hundreds of sap queries are used in our system and programs are lost after system upgrade.
So I am wondering if there is a standard program to do it automatically.
Any input is welcome.
Regards,
Kazuya Imabayashi
Dear Mathias,
You have to do the step with the RFC Destination created. Did you select the load type as Initial Download? (Edited to contain the word Download)
Did you check out the following notes for SP07: 1263664, 1268773. Please make sure that you apply all the compulsory notes.
Also try restarting the server and trying the step again.
Also, just as a confirmation, are you doing it from the client you created or client 000. Are the general post installtion stms, initial profiles done?
Regards,
Veera
Edited by: Veeraraagavan R on Jan 9, 2009 9:05 PM
Similar Messages
-
Creation of SAP Query in SQ02 with Single Table With Condition
Hi All,
I want to Create SAP Query in SQ02 using single Table MCHA.
ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
i.e Suppose I am having actual data in MCHA table is like this for Material M1.
Plant Material Batch BatchCreationdate
P1 M1 B1 20.06.2007
P2 M1 B1 04.05.2009
P3 M1 B1 04.05.2009
But I want the Output of SAP Query is like this:
Material Batch BatchCreationdate
M1 B1 20.06.2007
That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
Please help me How write the code on single table in the SAP Query.
Thanks,
Kiran ManyamHi,
Your query should be like this:
Select MATNR CHARG HSDAT
from MCHA
into table t_mcha
where matnr = Materlal number from selection screen.
The structure of t_mcha should contain the fields that you select.
Then sort the table by date ascending
Sort t_mcha by HSDAT.
Hope this solves your problem.
Thanks,
Sowmya -
Sap query and additional fields.
Hello guys.
ABAP it's not my strong skill, but i need to develop some report.
What i need:
input: material, SLED, plant
output: material, SLED, plant, values from characteristic field.
I have created sap query with additional field type c.
Below my code:
TYPES: BEGIN OF charast,
ATNAM(50) TYPE c,
ATWTB(8) TYPE n,
X(50) TYPE n,
C(50) TYPE n,
ATINN(50) TYPE n,
END OF charast.
DATA: char TYPE TABLE OF charast WITH HEADER LINE.
CALL FUNCTION 'VB_BATCH_GET_DETAIL'
EXPORTING
MATNR = MCH1-MATNR
CHARG = MCH1-CHARG
GET_CLASSIFICATION = 'X'
TABLES
CHAR_OF_BATCH = char.
LOOP AT char into TEST (This is an additional field type C.
ENDLOOP.
Questions:
1. How i can return internal table into standard abap type, because i can create additional field only with standart types.
2. Need i fetch exporting parameters before calling FM? Or sap query do it automatically, based on given values on selection screen of the report?
3. How i can return only needed field from FM output? Now, when i'm executing FM via SE37 it's show desired result, but when i'm getting it from code i see strange values.
4. If i don't know exactly return by an FM values, how i can fill structure dynamically?
5. How i can return result of a program not only to additional field but to layout?
Sorry for noob questions and thank you in advance guys!Well, seems like it work fine for me.
Below my crappy, but working code:
DATA: material TYPE MCHB-MATNR,
batch TYPE MCHB-CHARG,
plant TYPE MCHB-WERKS,
sloc TYPE MCHB-LGORT,
gtdt TYPE STANDARD TABLE OF clbatch,
gtdit TYPE clbatch.
SELECT MATNR INTO material FROM MCHB
WHERE MATNR = MCHB-MATNR.
ENDSELECT.
SELECT CHARG INTO batch FROM MCHB
WHERE CHARG = MCHB-CHARG.
ENDSELECT.
SELECT WERKS INTO plant FROM MCHB
WHERE WERKS = MCHB-WERKS.
ENDSELECT.
SELECT LGORT INTO sloc FROM MCHB
WHERE LGORT = MCHB-LGORT.
ENDSELECT.
CALL FUNCTION 'VB_BATCH_GET_DETAIL'
EXPORTING
MATNR = material
CHARG = batch
WERKS = plant
GET_CLASSIFICATION = 'X'
TABLES
CHAR_OF_BATCH = gtdt.
READ TABLE gtdt INTO gtdit
WITH KEY atnam = 'BATCH_SHELF_LIFE_EXPIRY_DATE'.
GTD = gtdit-ATWTB. -
Hi Experts,
I have question regarding ABAP Reports, SAP Query, and Transaction with variant. How are we securing one the above reports that we assign them through pfcg. We can secure custom program by custom transaction or define the auth group in S_PROGRAM auth object but in this case we have to assign SA38 in production. is that correct?
Please help me understand difference between the ABAP reports and SAP query. Is the ABAP reports same as Program or they are different.
Thanks in advance
Faisal
Edited by: Faisal on Jun 30, 2009 11:06 PMHi,
1) End user security (role matrix coordinate with process team)
This role Matrix design is most important where we can put restrictions and use SoD.
2) Secure Table (by auth group)
Table TDDAT and use of transaction se54 for security tables to right auth Groups. Secure s_tabu_dis, s_tabu_cli.
3) Secure program (as you said ABAP reports are referred to Program)
Use of table TPGP and program RSCSAUTH for assignment of groups to Program. SA38 Running of SA38 requires a minimum SUBMIT in user Action. A user having SA38 is dangerous as he/she is now enabled to run any report. Hence protection in Auth Group is needed. Verify each and every program is having authority check statement and Auth Group or not before assigning sa38. As you mentioned its best to avoid SA38 and create CUSTOM TXN for each report.
(We should also SECURE S_DEVELOP in Production properly along with ur points. Please Note).
4) Secure some batch jobs roles for batch job
Secure by s_btch* objects and less access to se36.
5) Create support roles for cutover activity during Go-live
That is always needed. Go ahead.
6) Emergency roles & IT roles for support
This is very much needed as a role of Mitigation and Fire Fighting for Temporary access. Ensure to enable ur audit parameters in RZ10 (rsau* sm20,RSLG* for sm21). Give emergency access but enable audit via sm19 and get audit reports from sm20 and sm21 immediately after the use of emergency access.
There are also other auth objects we need to be care ful which is a long list and hope every body ensures that (s_cts,a_admi,s_trans, tables ssm_cust, prgn,t000) etc and a host of others. Besh wishes. Let us know if any issue.
Regards
Aveek. -
ABAP Coding Help for Subtotal type output - SAP Query
I've created a SAP Query to display a stock overview by storage type using the table LQUA.
The output that I get is:
Material
Description
Plant
WHN
SLOC
Storage Type
Batch
GR Date
Available stock
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
225
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
720
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
I can get a subtotal for each Material, batch and GR date combination by using the ALV grid functionality.
This method adds too much clutter to my query and can't be easily manipulated in Excel afterwards for what I want. I want to condense the results down and just keep a cumulated available stock, e.g:
Material
Description
Plant
WHN
SLOC
Storage Type
Batch
GR Date
Available stock
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
945
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
4,000
How can this be done?Hi,
Please try to use STATISTICS in your SAP Query. you can sort and add your value based on condiiton then it will be show you collect value in SQ01.
Please see the below documents for STATISTICS
https://help.sap.com/saphelp_erp2004/helpdata/en/d2/cb4263455611d189710000e8322d00/content.htm
Regards,
Prasenjit Mishra -
SAP Query:Error 'List is wider than 255 characters '
Hi all,
i m new in SAP Query.
one query is already done.
one change is come out.
requirement is - Add one extra column
when i m going to add one extra coulumn and test it then message is come out.............
List is wider than 255 characters (generation not possible)
Message no. AQ255
Diagnosis
You attempted to define a query where the line width of the generated list is greater than 255 characters.
You define the line width on the Title, Format screen which permits a maximum width of 255 characters. However, when defining statistics and ranked lists, you can implicitly increase this value, since the lines cannot be broken up. This is the case here. An implicit increase in the width of the list would result in a list wider than 255 characters. For this reason, the query cannot be executed.
Procedure
Check which of the statistics or ranked lists is responsible and modify it so that the resulting list width is no greater than 255 characters.
plz help me and suggest me as soon as possiblehi Shafiq ,
i am aslo facing same problem of (List is wider than 255 characters )
There is limitation of 255 characters .. can we extend that .
When we check by editing program in sq01 it show only 255 character limitation .
Regards
Deepak. -
Integrate Sap Query into ESS and MSS
Hello
I have been following this http://scn.sap.com/docs/DOC-50736;IDSactivation=99FDF6E06B5918D0293BF0BE7884FBCB0606A0F376FFD7908517BA7F2738E3A6
for the intergration of SAP Query.
However i am getting stuck at step 6 as it appears RP_MSS_CONVERT_MDT_TO_LPD_CUST
does not exist and ideas what i am missing.
So i have had to convert my MDT scenario using PWPC_CONV_MDT_TO_LPA
From there i have then been able to run program APB_LPD_LPA_CUST_TO_LPD_CUST
which has converted it into a launchpad in LPD_CUST, however once there it has no system alias defined for my applications so they won't launch and the launchpad entries for managers desktop don't give me a system alias option.
Regards
AdamHi Adam,
what release are you on? Do you use any Add-ons? The document you are following is written for EHP6, and I think MSS Add-On 1.0 is also needed as this add-on brings the WD ABAP applications for MSS.
The report you don't have in your system is located in the WDA specific package for MSS, so I think it comes with the Add-on. The transaction you use for launchpad generation is the "old" one, that can be used from Enterprise Portal. Inside portal, you have a launchpad iView with properties for the scenario and the system alias.
Do you have a possibility to install MSS Add-On 1.0? This should solve your problem and let you follow the guide.
Regards,
Marc -
SAP Query (for Insurance) !!
Hi,
I had created few queries using SAP Query. It works perfectly alright in Dev but when transported to Quality one of them fails to work.
My questions are:
1. I did consistency check. Displays no inconsistencies but still one of the queries does not work. It points out to the error listed below. Could you suggest what rtmode-acc_check is and how could I rectify this error.? I do not have much idea about ABAP.
Error line -> if ( ( %rtmode-acc_check = 'X' and sy-dbcnt > %rtmode-acc_number )
2. In quality system, the report generation is taking ages. Any suggestions to speed it up. I have No Optimization Access unchecked.
Thanks and best wishes in advance,
SMReview following link;
http://www.thespot4sap.com/articles/sap_abap_queries_create_the_query.asp
Thanks. -
Change Production order thru a SAP Query
Hello,
i have a SAP Query to recalculate some conversion factors in the routing of a production order.
Because the header unit of the routing is M2 and the routing operation is PC for example.
No i need a idea how it is possible to update the fields in the production order thru this query. I would like to put some codeing in an addidional field which update this values for me.
I found this function module CLOI_CHANGES_UPL_31, but i am not sure if i can update the conversion factors with it.
Also my ABAP knowledge is not the best so it would assist my greatly if you can give me some help.
kind regards,
BernhardSolved.
I use first SM35 to create a record for batch input and after this i use this record in the coding in the query. -
hello friends,
i'm trying to create an SAP query that should output the Material Number of some purchase orders.
i'm choosing Direct Read of Table (MSEG) as my data source for my infoset.
however, inspite of choosing MSEG-MATNR (selection and output) as one of my data field, i could only output the Material Description, and not the Material Number itself.
i believe i am missing out on something. could someone help me?
thanks in advance.
best regards,
albertDear,
Did you try MB51 report with Movement restriction 101.
1. You are preparing query to get PO number and Material document number. That means Purchase orders which have material documents - usually means goods receipts.
If it is true, then try MB51. In this report you will get PO. Nu. / Mat. Nu / Mat. Desc / Batch / Mat. Doc. Nu. / Amount in LC and Currency.
All display you required you will get.. Try this. I hope this will solve your requirement.
Regards,
Syed Hussain.
Edited by: Syed Hussain on Aug 31, 2009 12:32 PM -
Hello ABAP Guru
I need a help here. trying to create SAP query joining three table VBAK VBAP KONV since KONV being cluster table I am not able to do that
thpough I am suceesfully establishe dthe link
VBAK-VBELN=VBAP-VBELN
VBAK-KNUMV=KONV-KNUMV & VBAP-POSNR=KONV-KPOSN
OSS msg says we have to write routine in sap query
but I never used that option
anyone has any clue on how to use cluster table in SAP query?
Thx
PraveenHi,
Inner Join can't be used for cluster tables.
Write a routine in SAP query as follows.
do inner join on vbak,vbap into internal table
itab.
select for konv for all entries itab .
Regards
Amole -
How to call SAP query in a program
Hi experts
I have created a query in SQVI its gives a result. Now i want this query to be used in my program. Is there any FM which gets the quary name and populates the result in iternal table. So that i can use that result.
I know without query you can write using the tables you can fetch the records but i just want to explore a new way to do things. If any body done such type let me know and also give some sample code or process how to achieve it.
Regards
VijayHi Siva
My final option is that only. That you can do any how. But my intension is to learn something new way. How to do copy the query and where to inject the code is there any example in wiki or artical for that. I want to something new. Old way of creating a report program is possible i want to do this way. If some body could help me out.
@ karthik
I have generated the SAP query and i got the program but when i view the code i dont find any select statment or where storing my input data. How to identity that i did in debug mode but am not sure where it pulls the data and where it put in internal table. Can you throw some light with example code or an article.
Regards
Vijay -
SAP QUERY report for vendor line items
Hi
I have created a SAP QUERY report for vendor line items with fields vendor no.,vendor name,amount,company code and period.But there is one line item i donot know from wher system is getting it picked with is not in that vedor account,when i compare with fbl1n.I checked the document number too...the same doc number is twice in my query report.One with correct amount and another with wrong one.How do i chk.Where did i go wrong in creating query.I used logical database KDF.
Please advise.i chked...how do we get the amount displayed in query...it just displays amount no debit credit symbol... i have selected BSEG-DMBTR field but no -/+ sign,how is it done in query,please suggest.
-
Hello everyone,
I need some help in creating a report in SAP Query based on user's processing Vendor Invoices and also Vendor Payments?
I would like to have the following columns to report on:
USNAM u2013 User Name (from BKPF)
BLDAT u2013 Document Date (from BKPF)
BELNR u2013 Document Number (from BKPF)
BUKRS u2013 Company Code (from BKPF)
BLART u2013 Document Type (from BKPF)
LIFNR u2013 Vendor Number (from BSEG)
NAME1 u2013 Vendor Name (from LFA1)
WRBTR u2013 Amount (from BSEG)
Vendor Invoice- I would like to restrict to only document type fields that are KA,KR,RC,RE,RN and ZE
Vendor Payment- I would like to restrict to only document type fields that are ZV,ZS,ZP,ZH and KZ
I have a few questions:
First is i am using a logical database (BRM as BSEG cannot be joined) to select my columns however i do not know how to pull the 'Vendor Name' from LFA1. I understand that this table is not in BRM but is there a way to add any extra tables to work along side the logical database?
Secondly, i have managed to report on all columns except the vendor name (from LFA1) and although i can restrict my output data based on document type fields, i need the report to only show the user's that have process vendor invoices & vendor payments only?
At the moment i have a list of restricted document type but cannot seem to jsut show only those users who have processed both in both processes. For example User A has processed a vendor invoice (which is shown) and the same user may have processed vendor payment (after searching through the long output list!)
I want all users who have doen one of the other process and only interested in those that have done both?
Any feedback is much appreciated and pelase let me know if i have not explained this problem properly (as i am a newbie in this area)
Many thanks
AmarHi Pascal,
Since the IT2501 is a "Simulated Time Infotype" you cannot look at the data in it, but you can confirm the data from the ZL cluster and the data from the employee. Since it is only this employee or a few employees, it is probably not the configuration of the time buckets for the IT2501, but you may want to make sure all time times are captured as you want. Then look at the time entries for this individual or individuals. Did they enter a time type that was not expected or configured? Is all their time approved and passed through Time Evaluation? Finally check the Master Data for the employee - is the Planned Working Time (IT0007) infotype correct or has it been recently changed? Is he in a special Cost Center (IT0027) or Project that is captured differently for time purposes?
Since it just one or a few individuals, I would suspect the Master Data and some inconsistant entry that affects the time cummulation for the IT2501.
Paul -
How can I define Double Click Processing in SAP Query ?
The first question is : How Can I define drill-down for SAP Query report ?
The second one : How can I program Double Click in SAP Query report for Different columns like ALV Grid processing ?you can attach a repot or at tcode etc in an SAP query using report assignment in SQ01 but as far as i remember you cannot attach multiple reports.
regards,
khusro habib
Maybe you are looking for
-
Can't open .zip attachment in Adobe Reader 8.1.2
Dear all, In Adobe Reader 8.1.2 I can't open zip files attached to pdf files any more. I followed some hints in the knowledge base but none of them solved my problem. The registry editing suggestions for rel. 7 doesn't apply to version 8.1.2. and set
-
Reauthentication Problem in Endpoints Using Cisco ISE 1.1
Hi, Can anyone suggest me if laptop/desktop goes on sleep mode or keep connected with interace configured for 802.1X for more than 12 hours it does not work or not connect to Exchange server, Cisco ISE console, office communicator... for re authentic
-
Preview "New From Clipboard" issue
I used Preview's "New from clipboard" feature to send a small piece of a larger .pdf and then emailed that .pdf to a client. He sees the small section on his Mac in Mail, but when he opened it by double-clicking on it, it opens the entire original .p
-
How can I open up an FLA that is CS6?
Hello I have CS4 and CC. I don't know AS3. The scenario: I have a client with a CS6 Flash file that needs updating. CS4 will not open it and CC strips out all AS2. I need FLA to be saved as CS4 or CS3 in order to work on it. Please advise Thank you S
-
I cant access itunes store it says 'review account' i click review but nothing happens. Hep
I enter my acount username and password The itunes says to review my account i click review but nothing happens. Someone help me!