How to edit a standard SAP Query
I need to do authority check for satndard SAP Query....How to do it
If you put code similar the following in the Infoset ---> Extras -> Code -> Start of Selection it should work
CALL FUNCTION 'SD_ORGDATA_AUTHORITY_CHECK'
EXPORTING
I_VKORG = P_VKORG
* I_VTWEG =
* I_SPART =
I_ACTVT = '01'
EXCEPTIONS
NO_AUTHORITY = 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.
So, if the user does not have the proper authorization, it will exit the program. You will need to check with your Security administrator to verify what value to use for the Activity Code.
Similar Messages
-
How show the Extractor's Sap query
Hi masters,
I have a custom extractor in R/3 created with SAP Query method.
By RSA2, if I try to double click on Extractor name it does not succeed nothing!
How can I see the Sap Query created behind The Extractor?
Thanks so much!Hi Martina,
if you want see the infoset in the extractor use sq02.
Bye -
How to call a standard sap transaction in workflow
Dear All,
I want to know how to call a standard sap transaction inside my workflow , please tell me how to get this done .
Kind Regards,
Anshu KumarHi,
You can use the FM - ABAP4_CALL_TRANSACTION u2013 Initiates a transaction in a separate window
inside the method in the BO.
Implement that BO and the method in the Activity of the WF..!!
Use the FM like this:-
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'ZSCREEN_884' - T-Code
SKIP_SCREEN = ' '
MODE_VAL = 'A'
UPDATE_VAL = 'A'
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
If you do not want to use the FM u can use this Statement:-
call transaction 'ZSCREEN_884'. - T_CODE
Check the following links:-
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/delegationandRedefiningmethodsofbusinessobject+BUS1001
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
Let me know if you still face any issues..!!
Regards,
Kanika -
SAP Query: How to filter records from SAP Query output before display
Hi Friends,
Can I delete records from an SAP query basic list before it is displayed?
For example I want to delte all the orders whose system status is "RELEASED" before the basic list of that SAP query is displayed.
I have gone through SAP help and found out that we can write some code in <b>END code</b> section which will execute before the basic list of the query is displayed. But I could not figure out how the code this...following is an excerpt form SAP help.
<b>"The END-OF-SELECTION code consists of two parts (Before list output and After list output). The first part is processed before the list is output and the second part afterwards."</b>
Can anybody help me?
Regards,
Bharat.
Message was edited by:
Bharat Reddy VTry this simple procedure. <b>Hope</b> this should work for you.
You do the slection of the status in the List-Processing. say your final field of status flag is GF_STATUS.
Immediatly after that use this within the List-Processing.
CHECK GF_STATUS EQ '<RELEASED STATUS>'
How it works:
SELECT <> "<-------Query processing(system code).
*< Your code put in the List processing
CHECK GF_STATUS EQ '<RELEASED STATUS>' "< --only released records passed.
*>
ENDSELECT "<-----Query endselect(system code).
Please let me know the result.
Regards,
A.Singh
Message was edited by:
Amarjit Singh -
Class to run standard SAP Query
Hi,
Could you help me with finding standard SAP class to run query created in SQ01?
Thank youHi,
You can create the TCode for the Sap Query and use to run query.
refer the links to create tcode for sap query..
how to create a tcode for abap query
tcode for sap query -
How to edit a standard Portal page in NWDS
I'm looking for a guide explaining how to pull a standard Portal Web Dynpro in to Netweaver Developer Studio, make changes to it, and deploy the changed copy to the Portal.
I have experience with the Portal and with adding ABAP Web Dynpros to it, but I'm new to NWDS and Java Web Dynpros.
I've searched online extensively but haven't been able to find a guide explaining how to access the standard Portal Java content.Hope you mean to edit WebDynpro java application in NWDS. In this case, You need NWDS (on your desktop) and NWDI (to be configured on java server) to modify any standard WebDynpro java application.
Read the below help to understand better:
http://help.sap.com/saphelp_nw70/helpdata/EN/45/68d64260752a78e10000000a155106/frameset.htm -
How to remove duplicates in SAP Query
Dear Frns,
I created a simple SAP query with quickviewer by table join option.
tables are MAST & STPO.
Link is only STLNR.
I am getting a duplicate extra line with same data.
Can anyone suggest me how it happened.
Is there anyway to remove these duplicate lines.
pl suggestHi,
You can sort the internal table and then delete the duplicate entries.
sort itab ascending by STLNR.
delete adjacent duplicates from itab comparing STLNR.
Reward points for useful answers. -
How to change code in SAP Query
Hi Experts !!
In SAP QUERY I am getting the PO with all delivey dates & deliveried Qty but I have to select only single PO with latest delivery date & qty. If there r more than one record for latest delivery date than deliveried QTY must be sum of all QTY (for the latest delivery date). for example :
this is coming
Po delivery date qty
10001 30.06.2009 4
10001 30.06.2009 5
10001 01.05.2009 4
we want
Po delivery date qty
10001 30.06.2009 9
Thanks in advance.
Thanks & Regards
Navneet Singhal>
navneet singhal wrote:
> There is an internal table %G00 in query generated program (AQCSZPCWMM======Z_PCW_ORDER_V2) when I use this table in Code section (END-OF-SELECTION ) system thro msg %G00 is not defined . if I define this table in DATA section than run the query , It gives the DUMP with error %G00 is already decleared.
>
> How can I use %G00 internal table in my code section.
I have the same problem as the OP. I need to get rid of the duplicates and have all sumarized in just one row. I was thinking about this same solution, but when I add code to the END-OF-SELECTION event, this doesn't appears anywhere (but if I add code to any calculated field, yes).
And the problem of the quoted message. I tried using field-symbols but I have errors saying that it's nos a valid table, etc...
Any ideas???
Thanks!!! -
How to Substr field in SAP Query.
Dear Developer,
How to substr any field in SAP Query ?
Regards,
Ujed.Hi Ujed,
if SUBSTR stands for substring, then possibly your question may be how to get the substr method as konown in languages like php in ABAP. If SAP Query points to a SAP query as created in transaction SQ01, then you should explain what you want to achieve.
Note: Better ask a specific question and get am answer you can or which is already generalized.
If I need a substr function, I'd create a functional method for that:
method substr
importing
anyfield type any
offset type i
length type i
returning substring type string.
try.
substring = anyfield+offset(length).
catch cx_root.
* handle error
endtry.
endmethod.
Regards,
Clemens -
How to call a Standard SAP Program in Zprogram.
Hi,
how to call a SAP Standard program in SAP Program?
Do we have to use any funtion module and pass paramters?
I want to call a Standard SAP prg in to my prgram? can anyone explain me or give the piece of code to call standard prg.
Thanks & RegardsAgain, ABAP related questions should be asked in the ABAP forum.
To answer you question, if the standard program is a report program, you can use the SUBMIT statement and pass parameters using the WITH Extention.
Submit <report>
with p_fld = 'X'
and return.
Please make sure to award points for helpful answers and mark your posts as solved when solved completely. Thanks.
Regards,
RIch Heilman -
Folks,
I have given up....Really need some advice....
I need a report example: Order Number, Order Type, Order Date, Customer number, Net Price, Total order cost
I can get all I need from file VBAK, EXCEPT total order cost, which is at the line level (VBAP). Now I need to show one line per order and sum the cost field (VBAP/WAVWR)...
How can I accomplish this in SAP Query? IS this even possible?Hi,
I am sure about SAP Query...
But check this program which might satisfy your requirement..
Declarations.
TYPE-POOLS: slis.
DATA: BEGIN OF wa_data,
vbeln LIKE vbak-vbeln,
auart LIKE vbak-auart,
audat LIKE vbak-audat,
kunnr LIKE vbak-kunnr,
netwr LIKE vbak-netwr,
wavwr LIKE vbap-wavwr,
waerk LIKE vbak-waerk,
posnr LIKE vbap-posnr,
END OF wa_data.
DATA: itab LIKE wa_data OCCURS 0 WITH HEADER LINE.
DATA: itab_final LIKE wa_data OCCURS 0 WITH HEADER LINE.
DATA: v_tabix TYPE sytabix.
DATA: t_fieldcat TYPE slis_t_fieldcat_alv.
Selection-screen.
PARAMETERS: p_erdat LIKE vbak-erdat OBLIGATORY.
START-OF-SELECTION.
Get the data
SELECT avbeln aauart
aaudat akunnr
anetwr bwavwr
awaerk bposnr
INTO TABLE itab
FROM vbak AS a INNER JOIN vbap AS b
ON avbeln = bvbeln
WHERE a~erdat = p_erdat.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'No data found'.
LEAVE LIST-PROCESSING.
ENDIF.
SORT itab BY vbeln.
Sum the cost.
LOOP AT itab.
Store the tabix.
v_tabix = sy-tabix.
wa_data = itab.
AT END OF vbeln.
SUM.
modify the cost.
MOVE wa_data TO itab_final.
MOVE itab-wavwr TO itab_final-wavwr.
APPEND itab_final.
CLEAR itab_final.
ENDAT.
ENDLOOP.
SHow the report.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'WA_DATA'
i_inclname = v_repid
CHANGING
ct_fieldcat = t_fieldcat.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = t_fieldcat
TABLES
t_outtab = itab_final.
Thanks,
Naren -
Hi guys,
I need to modify the transaction ME80FN, which is a SAP Query. I want to make a clone of the SAP Query, if isn't possible to modify the program AQZZ/SAPQUERY/MEME80FN========. I haven't deal with SAP Queries before. Can anyone please tell me the steps to accomplish this?
Thanks,
RaulieHaven't worked with queries, but I think you should be able to make a copy on SQ01...anyway, querys are still ABAP programs, so you could the copy the code of AQZZ/SAPQUERY/MEME80FN======== paste it on a Z program and make the needed modifications...
Greetings,
Blag. -
Retrieve a corrupted standard SAP query (SQ01)
Hi experts,
We have an standard query that is giving a dump because an user has modified and transported it to consolidation and production systems.
I don't know if there's a way to compare versions and retrieve versions. Right now we have accessed to client 000 and we are analysing if it's feasible to retrieve the 000 version. The query is defined as GLOBAL (client independent) and it's assigned to an standard package /SAPQUERY/FIAQ.
I'm on the right way or maybe there's another solution that we're not taking into account?
More ideas would be appreciated.
Ismael
Message was edited by:
Ismael MateoThanks for the answer Barry, this is clear.
But the problem is that all the systems are overwritten with the modified version (Development, Consolidation and Production) and we don't have the original version anywhere, therefore we can't export/import it.
As the query is a global query (not client dependent), a modification in the query also affects to the other clients. In this case this modification has been transported to all systems as well...
To correct that situation we want to identify the changes done by the user or retrieve the old version.
One solution would be to create one transport request from an external SAP system, with the same SAP version(ECC 5.0), and transport it to our system.
Before trying with this solution we want to know if there's any SAP standard tool to retrieve/compare query versions. -
How to log in standard sap way in a jsp/servlet project
Hi expert,
To log and trace in sap standard mechanism always confuse me a lot.
Is there any how-to document for j2ee project?
I know for wdj you can add log configuration by select 'create log configuration file' in context menu, but I can not find this for a j2ee project.
I would like to see the log in LogViewer of VA, put all logs together in sap management make sense in our project.
Thank you for your hints.
WilliamHi,
f
ile=new FileLog("f:/WebServiceTrace/trace2.%g.log", 800000, 10, new TraceFormatter());
The above code specifies the path for your log file.
Then add this file as a log location and then log the traces. For this you can use the following code like:
Location location=Location.getLocation(className);
location.addLog(file);
location.setEffectiveSeverity(Severity.ALL);
location.entering(methodName); -
How to enhance the standard web query template in BW 3.5
hello experts,
How can I enhance the standard web template in BW 3.5? I can see that in 3.5 0QUERY_TEMPLATE is not longer the standard web template, the new standard template looks completely different with new functionalities etc. I can't follow the steps in the How To guide as this refers to 0QUERY_TEMPLATE. Also in transaction RSCUSTV11, it's got now only two options: style sheet and template attributes but no longer web template.
Any help would be much appreciated.
Many thanks,
InmaMany thanks for your help.
I managed to set a new standard web template based on 0ADHOC but now I've found a new issue: in the WAD, I have created a new web template also copied from 0ADHOC. This web template will embed a query and the web report will be executed from WAD, not from BEx. The problem is that the different buttons (Save View, Bookmark, Variable Screen, Export Excel, Export to CSV, etc)don't seem to work when I click on them once the report is showing the results.
Can you please give me any idea on what's happening and if there's anything else I should do?
Many thanks in advance.
Inma
Maybe you are looking for
-
Cannot load secure websites such as Edward Jones
the Edward Jones site won't load . Every site connected to this investment site won't load but I don't receive an error message
-
How do I see more image alt-text in Fennec?
If I press and hold a link or picture on a webpage, a little menu pops up. This menu has at most two lines of text for the alt-text/tooltip/link destination. Even in landscape mode, this can be insufficient for the full text. How do I make it show mo
-
I don't want my password "remembered" when opening my email box.
I checking the "remember my password" box when I set up my email account. Now I don't want my password "remembered" when I open my email...how do I edit the "remember" feature?
-
JavaServer Faces: How-to avoid users entering application URLs directly
Hi Frank, I have read your article and implement it but have problem in redirecting the user to the login page... the code snippet is: if (((HttpServletRequest)request).getMethod().equalsIgnoreCase("GET") && !isAllowedPage(request)){ HttpServletRespo
-
If anyone with more intelligence can help I would be extremely grateful. I am creating a flash project that selects at random 25 questions from a MYSQL database. Some of these questions are text, some refer to a diagram that is an image. I am looking