Using SQ02 for writing ABAP programs
Hello,
I am using SQ02 coding section for writing some simple ABAP programs, mainly for reporting purposes. I would like introduce more power into my programs, but SQ02/SQ01 reports return "ACCESS_DENIED" when I for example try to call a function (GUI_DOWNLOAD).
Can You advise how to extend SQ02 authorization to enable function calls?
Maybe You know other place from which You can write programs without a developer key?
Thanks,
Pawel
Hi Uday,
do You mean that I have to first make a recording on cg3y using transaction shdb, then create a function module basing on this recording, and then use this function module in my code?
Pawel
Similar Messages
-
How to filter results of mara without writing abap program
I am running SE16 in SAP ECC searchig MARA table. I want to query such
As ERSDA > u201801/03/2011u2019 OR LEADA > u201801/302/2011u2019, Through form interface, it seems
I can only specify AND for two fields and not OR. Is there a way to specify the complex filter
Without writing ABAP program.
Thanks.Hello,
For simple single table reporting as this just use transaction code SE16 or SE16N. Filter your results as you would in any standard report selection screen using the search bubble option on the selected fields. After inputting the table select "Settings --> Fields For Selection" at the selection screen from the toolbar to add fields for the search. You may then download the results from "System --> List --> Save --> Local File" (Spreadsheet).
Regards,
sifter -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
Question about using TVARV in an ABAP program
Hello gurus, Im sorry about the silly question.
I have a question about using TVARV in an ABAP program.
A program is presenting a problem and I think that in this code:
SELECT SIGN OPTI LOW HIGH
FROM TVARV
INTO TABLE R_1_163431035_VELOCIDADE
WHERE NAME = '1_163431035_VELOCIDADE'
AND TYPE = 'S'.
IF ZMM001-VELOCIDADE_B IN R_1_163431035_VELOCIDADE AND
ZOPERADORAS-OPERADORA = 'ABCD' AND
ZMM001-MATERIAL IN R_1_163431035_PRODUTO.
ELSE.
ENDIF.
What happens is that the value "ZMM001-SPEED" B not exist in "R1_163431035_VELOCIDADE" but the program executes commands under the IF and not under the ELSE, as I imagine it would work. Is this correct ?
I am new to ABAP programming, but I have a lot of XP in other programming languages and this makes no sense to me.
Anyone know where I can find some documentation of the use of "TVARV" in ABAP programs?
I search the Internet if other programmers use TVARV this way, but found nothing, which leads me to think that was a quick and dirty solution that used here.
If this is a bad way to program, what would be the best way?
Regards
Ronaldo.Hi Ronaldo,
But in this case, the range is not empty, there are 17 records, in this way.:
For the column "SING" all values are "E"
It means that the result is false if ZMM001-VELOCIDADE_B has the same value as one of the 17 records (E = exclude).
For instance, if it has value 'C' and one of 17 records matches C, then the result is false.
The "IF" with "IN" using "TVARV" as used in the program of the post above has the same behavior of a selection screen?
Yes, the same behavior as the selection criterion to be exact. You can press the help key in the complex selection dialog for more info.
I know it's a silly and very basic question, but other language that I used, only the SQL has the "IN" operator, but I think they work in different ways, so I would like to understand how it works in ABAP.
Not silly ;-). Yes they work differently.
More info here:
- http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba74635c111d1829f0000e829fbfe/frameset.htm
- http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/frameset.htm
BR
Sandra -
Updating liveCache Data using Function Module or ABAP program.
Is it possible to update APO Live Cache using Function Module or ABAP Program.
Will the aggregation/disaggreagation remain the same if data is modified using Function Module or ABAP Program.
Regards,
Vikasello Vikas,
-> Please click at
http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
& read about 'SAP liveCache'.
As you know objects stored in liveCache in the class containers can be accessed
and manipulated only via LCA routines which are methods of LCA objects.
The registration of the LCA routines is done automatically when
the liveCache is started by the LC10, check the lcinit.log file.
The shared procedures in the LiveCache are written in C++ and shipped
to the customers as binary shared libraries(LCA-Routines) < LCA build >
together with the LiveCache. The original C++ source code of the
libraries is not generally available to the customers.
The LCA routines could be called via "/SAPAPO/OM*" ABAP functions.
-> For SAP liveCache documentation in English:
http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
< -> Database Administration in CCMS: SAP liveCache -> liveCache Assistant ->
liveCache: Monitoring -> Problem Analysis-> DB Procedures >
In transaction LC10 for the LCA connection choose liveCache:Monitoring
then go to Problem Analysis -> DB Procedures=>
The system displays an overview of all database procedures loaded into
liveCache, their input and output parameters, and other details.
-> Tr. /n/SAPAPO/OM16 ( in further releases /n/sapapo/om19 ) is provided by
SAP to get information about data stored in the LiveCache. If you would
like to get your own views, you should write a special report in ABAP using
"/SAPAPO/OM"-development class functionality.
-> There are standard function modules in ABAP available to extract/change data from/in liveCache.
-> In addition to the given information => find more information at:
SCM 4.0 -> http://help.sap.com/saphelp_scm40/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
SCM 4.1 ->
http://help.sap.com/saphelp_scm41/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
SCM 5.0 ->
http://help.sap.com/saphelp_scm50/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
You can go to the Advanced Planner and Optimizer documentation from the above links < Supply Network Planning Run -> Aggregated Planning -> SNP Disaggregation Or SNP aggregation . >.
If you still have open questions on the posted topic =>
Could you please give more information on your application scenario.
Thank you and best regards, Natalia Khlopina -
Need help for writing extract program
hi
i need help for writing extract program to retriew data from legacy system.
i already developed bdc programs for me31k and me21.
my requirement is to write extract program s for those t.codes.
to retriew data from legacy system and stored in flat file.i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
You haven't posted ANY 'java program' for us to help with.
The forum is NOT a coding service. It is to help you with YOUR code.
Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment. -
Is there a SAP training course for HR ABAP programming?
Hi Friends!
I am new to HR ABAP programming. I heard that HR ABAP programming is different from other ABAP related areas. Is there a training program or course offered by SAP decicated only for HR ABAP Programming? If yes, please kindly post the links in your replies and I would be glad to award points.
Note: Please post only relevant links.Welcome to SDN.
Check follwoing links -
<a href="https://websmp209.sap-ag.de/sapidp/011000358700003520202006">https://websmp209.sap-ag.de/sapidp/011000358700003520202006</a>
<a href="https://websmp204.sap-ag.de/sapidp/011000358700003520202006">https://websmp204.sap-ag.de/sapidp/011000358700003520202006</a>
It is the list of all the course in HR -
<a href="http://www50.sap.com/useducation/find/results.asp">http://www50.sap.com/useducation/find/results.asp</a>
Regards,
Amit
Reward all helpful replies.
got it this one is for you -
<a href="http://www50.sap.com/useducation/curriculum/course.asp?cid=60176624">http://www50.sap.com/useducation/curriculum/course.asp?cid=60176624</a>
<a href="http://www50.sap.com/useducation/curriculum/course.asp?cid=60197174">http://www50.sap.com/useducation/curriculum/course.asp?cid=60197174</a>
Message was edited by:
Amit Khare -
Hello,
Is possible to use log4j for writing files?
For example:
I have an application that produce several report txt files is possible at runtime produce them using log4j features?
ThanksDid you ever got an answer for this??? I'm starting a new project with ORACLE 9i and the site have a NAS. It will be very helpfull to know if it's possible and how can it be done.
Thank you,
Ulises Feliciano Troche
GIS Analyst
GMT -
Need to find SAP query for corresponding ABAP program.
Hello SAP Experts,
I have an ABAP program "AQDESYSTQV000001ORDERDETAILS==" in ECC 4.7. We had a client copy recently from ECC 4.7 to ECC 6.0. Now in ECC 6.0 I am unable to find this program in SE38.
Can you please tell me how to create this program in ECC 6.0 ? Also, by the name of this program it is clearly seen that this program is automatically created by using SAP query.
I tried to generate the program using SQ01, but system asks me for the SAP query.
Can you please tell me how to find the SAP Query for the corresponding abap program ? Also, the steps as in how to generate the program in ECC 6.0.
Thanks.Hi Danish,
In the program name, the query name is always attached.
For example : The program name is , AQ10SD==========Z10SD_INVPRODL=
Here the query name is Z10SD_INVPRODL and if you go to transaction SQ01 and enter the query name
then you can find the infoset.
And also you can gernate the program with the help of query name.
Please try the same and let me know if any details are required.
Regards,
Darshana -
How to crate a spool number for the abap program
hi
how to create a spool number for the abap programHi,
Check this thread
how to create a spool requset for 'z program'.
Regards,
Satish -
How to use FTI_TR_CASH_FLOWS ldb in abap programming.
I want to use FTI_TR_CASH_FLOWS logical database in existing ABAP program but i am not able to use this logical data base in the program.Please suggest how to use this logical database in the program.
I have developed a customized report and i want to use logical database "FTI_TR_CASH_FLOWS" into my program . i don't know how to use SAPDBFTI_TR_CASH_FLOWS into my report. how i pass data from my report to this LDB report. plz suggest.
-
Can i use XSD / XML in Abap Programs
Hi friends
I need to validate a xml file against xsd file. Can i validate it in abap program?
Best Regards.
PHi Pedro,
Simple transformations, or ST, is a proprietary SAP programming language that describes the transformation of ABAP data to XML (serialization) and from XML to ABAP data (deserialization).
Check this out...
Simple Transformations - SAP Library
Regards,
Raj
<dead link corrected>
Message was edited by: Manish Kumar -
Fm use for writing idoc programing
hi expects,
can any body help me by providing the fm of idoc .by using it i can write the code for inbound and outbound.
thank youHi Rohit,
Please check this sample code to create an inbound IDoc using FM IDOC_INBOUND_WRITE_TO_DB.
PERFORM FILL_EDIDC.
PERFORM FILL_EDIDD.
CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
EXPORTING
PI_STATUS_MESSAGE = I_EDIDS
IMPORTING
PE_IDOC_NUMBER = DOCNUM
PE_STATE_OF_PROCESSING = STPROC
PE_INBOUND_PROCESS_DATA = I_TEDE2
TABLES
T_DATA_RECORDS = I_EDIDD
CHANGING
PC_CONTROL_RECORD = I_EDIDC
EXCEPTIONS
IDOC_NOT_SAVED = 1
OTHERS = 2.
Also check this sample code to create outbound IDoc using FM MASTER_IDOC_DISTRIBUTE.
REPORT Z_IDOC_SAMPLE
MESSAGE-ID ZLKPL_MSGCLASS
LINE-COUNT 65(5)
LINE-SIZE 132.
*& Report Z_IDOC_SAMPLE *
* REPORT:Z_IDOC_SAMPLE
* This report creates an IDOC and fills it with application data
* The control, data, status records are filled and distributed
* over the ALE Interface
* Parameters
*---Parameter for Object Key
PARAMETERS: P_ENUM LIKE ZAK_EMPLIST-ENUMBER.
*---Parameter for Message type
PARAMETERS: P_MESTYP LIKE EDMSG-MSGTYP OBLIGATORY.
*---Parameter for Destination System
PARAMETERS: P_LOGSYS LIKE TBDLST-LOGSYS.
* Constants
*---Segment Names
DATA: C_EMP_HEADER_SEGMENT LIKE EDIDD-SEGNAM VALUE 'Z1EMPHD',
C_EMP_DETAILS_SEGMENT LIKE EDIDD-SEGNAM VALUE 'Z1EMPDT'.
*---IDoc Type
DATA: C_REPORT_IDOC_TYPE LIKE EDIDC-IDOCTP VALUE 'ZREP01'.
* Data Declarations
*---Idoc Control Record
DATA: CONTROL_RECORD_OUT LIKE EDIDC.
*---Employee Header Data
DATA: FS_EMPHDR_DATA LIKE Z1EMPHD.
*---Employee Details Data
DATA: FS_EMPDET_DATA LIKE Z1EMPDT.
* Database Tables
TABLES: ZAK_EMPLIST.
* Internal Tables
*---Internal table for application data
DATA: IT_EMP LIKE ZAK_EMPLIST OCCURS 0 WITH HEADER LINE.
*---Internal table for Data Records
DATA: IT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
*---Internal table for Communication Idocs generated
DATA: IT_COMM_IDOCS LIKE EDIDC OCCURS 0 WITH HEADER LINE.
* Select Applcation Data
SELECT * FROM ZAK_EMPLIST
WHERE ENUMBER = P_ENUM.
IF SY-SUBRC NE 0 .
MESSAGE E001(ZLKPL_MSGCLASS).
EXIT.
ENDIF.
* Build Control records
CONTROL_RECORD_OUT-MESTYP = P_MESTYP.
CONTROL_RECORD_OUT-IDOCTP = C_REPORT_IDOC_TYPE.
CONTROL_RECORD_OUT-RCVPRT = 'LS'.
CONTROL_RECORD_OUT-RCVPRN = P_LOGSYS.
* Build Data records
*--- Employee Header data
FS_EMPHDR_DATA-ENUMBER = ZAK_EMPLIST-ENUMBER.
*--- Fill the administrative information for the record
IT_EDIDD-SEGNAM = C_EMP_HEADER_SEGMENT.
IT_EDIDD-SDATA = FS_EMPHDR_DATA.
*--- Append the data
APPEND IT_EDIDD.
*--- Employee Details
FS_EMPDET_DATA-ENAME = ZAK_EMPLIST-ENAME.
FS_EMPDET_DATA-EPHONE = ZAK_EMPLIST-EPHONE.
FS_EMPDET_DATA-EDEPT = ZAK_EMPLIST-EDEPT.
*--- Fill the administrative information for the record
IT_EDIDD-SEGNAM = C_EMP_DETAILS_SEGMENT.
IT_EDIDD-SDATA = FS_EMPDET_DATA.
*--- Append the data
APPEND IT_EDIDD.
ENDSELECT.
* Pass Control to the ALE Interface -- IDoc Exporting
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = CONTROL_RECORD_OUT
TABLES
COMMUNICATION_IDOC_CONTROL = IT_COMM_IDOCS
MASTER_IDOC_DATA = IT_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5
IF SY-SUBRC NE 0.
MESSAGE E001(ZLKPL_MSGCLASS).
ELSE.
LOOP AT IT_COMM_IDOCS.
WRITE: / 'IDOC GENERATED', IT_COMM_IDOCS-DOCNUM.
ENDLOOP.
COMMIT WORK.
ENDIF.
Regards,
Ferry Lianto -
Using SUBMIT in an ABAP program.
Hello,
There is a need in my function module where I need to take the help of a transaction wherein I would require the values of an internal table ( which is populated somewhere in the transaction program ) to be passed back to my function module where I intend to use these values to populate in a structure and to do some other mumbo jumbo with it.
So, I did the following:
In my function module, I was able to create a structure which would hold the exact same stuff like the data of the internal table in the transaction program.
I then wrote the following SUBMIT code so it jumps to the transaction program to get the values I need.
EXPORT internaltable TO MEMORY ID c_memory.
SUBMIT ZTRANSACTIONPROGRAM
WITH w_param1 EQ '1000'
WITH w_param2 EQ iw_something
AND RETURN.
IMPORT internaltable FROM MEMORY ID c_memory.
What is happening basically is :- When I debug the code, I find that the execution does go to the transaction program I want it to go. But, soon after it jumps back to the calling FM code. ( Is this because of the return statement I have added here?) And, the internal table which is imported is empty. No values whatsoever.
If I want it to go all the way to the line of code in the transaction program - exactly after which that internal table( which I need ) is getting populated - what would I have to do?
I could insert some code which basically says " Hey! If my calling program is "this"(my FM) -> only then copy this particular internal table at this line ( I would want to insert the code at the place where I would need a data transfer) to the memory id. " Plus, I would want this internal table to be exported so I can import it back to my FM and use it. And, may be an EXIT statement after that? So, I would not want the whole of the transaction program to execute.
Could you help me figure out how I need to code this requirement of mine in the transaction program? Is this doable? Please provide how I would need to code this out in the transaction program.
Would appreciate suggestions and alternatives to this approach.
Thanks & Regards,
Alice.Try this code:
1] code for function module:
data: isel type table of rsparams.
data: xsel type rsparams.
data s_matnr type matnr.
loop at it_matnr into s_matnr. "Select option
xsel-selname = 'S_MAT'.
xsel-kind = 'S'.
xsel-sign = 'I'.
xsel-option = 'EQ'.
xsel-low = s_matnr.
append xsel to isel.
clear: xsel, s_matnr.
endloop.
xsel-selname = 'PB_IND'."Radio button
xsel-kind = 'S'.
xsel-sign = 'I'.
xsel-option = 'EQ'.
xsel-low = 'X'.
append xsel to isel.
clear xsel.
xsel-selname = 'DIADATE'. "Parameters
xsel-kind = 'S'.
xsel-sign = 'I'.
xsel-option = 'EQ'.
xsel-low = sy-datum.
append xsel to isel.
clear xsel.
submit zgk_test_program
with selection-table isel
and return.
import t_display to it_display1 from memory id 't_display'.
free memory id 't_display'.
append lines of it_display1 to it_display.
2] code for program:zgk_test_program
export t_display to memory id 't_display'. "t_display is internal table
leave program. -
Accessinng Table using Native SQL in ABAP Program
Hi Experts,
I need to access a table that is created in Oracle.
But while writing a select query as below:
EXEC sql.
SELECT MAX(ID_EVENTO)
INTO :LV_ID_EVENTO
FROM ZTAB.
ENDEXEC.
I am getting a dump saying "ZTAB doesnot exist" or IF I use ZTAB@ifsap then it dumps saying "Database name is missing a component".
Do I need to add some suffix to the table name like @ifsap to ZTAB?
Also, can I use SY-SUBRC to check to the success and failure for SELECTION OR INSERTION Operation?
Thanks
DepeshHello,
Try using SAP<SID>.ZTAB in your query.
For example SAPC05.ZTAB
Regards,
Yoganand.V
Maybe you are looking for
-
I want to bring the sale order table to BI. What are the activities required to be done in r/3 as well as in bi.
-
Video loading into iphoto as black screen
I have loaded videos from two different cameras. One is fine. The other loaded the videos as black screens. I have downloaded a divx converter per the owner of the camera but it still doesn't work. When I go to Macintosh HD from my desktop and go to
-
Audio stretching is not working
I recently purchased Soundtrack Pro and am going through the Apple Pro Training Service book "Soundtrack Pro". I got to the part about audio stretching, and for the life of me I can't get it to work. The steps I'm taking are: -- Opening the audio fil
-
Hello Could any help me know table related ot Hide keyword
-
when control-clicking on a picture in In-Design to edit original, my .psd file opens in Photoshop, I make my edits but when I click "save" it tells me it can't save because the file is already in use or was left open. This doesn't happen all the time