Calling standard program with logical database
Hi all,
I am trying to call a standard report (RPTBAL00) from a custom program without displaying the selection screen. I want to fill some of the select-options programmatically.
My code is somethig like this
submit RPTBAL00
with pernr-pernr = 'XXX'
with pernr-pnpbegda = '20020101'
with pernr-pnpenddaa = '99991231'
and return.
but the report gets called with defaults.
Does anyone know what I am doing wrong?
Hi
I seem your code is right, but I don't understand which elements are filled with default values.
Anyway this is a little code to submit a report with logical database:
Co.Ge.
loop at so_umskz.
move-corresponding so_umskz to selopt.
append selopt to frange-selopt_t.
endloop.
if sy-subrc = 0.
frange-fieldname = 'UMSKZ'.
append frange to range-frange_t.
endif.
refresh frange-selopt_t.
loop at so_zlsch.
move-corresponding so_zlsch to selopt.
append selopt to frange-selopt_t.
endloop.
if sy-subrc = 0.
frange-fieldname = 'ZLSCH'.
append frange to range-frange_t.
endif.
if not range-frange_t[] is initial.
range-tablename = 'BSIK'.
append range to trange.
call function 'FREE_SELECTIONS_RANGE_2_EX'
exporting
field_ranges = trange
importing
expressions = texpr.
endif.
submit rfitemap
with ................
with free selections texpr and return.
Max
Similar Messages
-
How does works default parameters in a program with logical database PNP?
Hi Friends,
I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
How does works period parameters in a program with logical database PNP?
This it's the program example, i use the default category.
REPORT ZRPHRTEST.
tables: pernr.
infotypes: 0001.
start-of-selection.
get pernr.
write: pernr-pernr, p0001-begda, p0001-endda.
end-of-selection.
write 'fin'.Hi,
Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
Syntax: Tables pernr.
Get pernr.
Try, activate and test. This should solve your problem.
Regards,
Abhijeet -
Copy/create program with logical database
Hi
I need to create a program with the same selection-screen as SAP standard program RPRAPA00.
RPRAPA00 is using a logical database, but even that I have passed in the PNP in the attributes of my own progam, I don't get the selection in the top (buttons, key-date info + selection info).
The rest of my program looks fine.
Any ideas how I get the missing selections into the selection-screen?Hi,
Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
Syntax: Tables pernr.
Get pernr.
Try, activate and test. This should solve your problem.
Regards,
Abhijeet -
HR - Programming without Logical database
Hi All
I have some doubts, I am mainly using Logical database while creting Reports in HR, if I want to use HR function modules and BAPI do they use logical database,
question is when we have to do HR programming with Logical database and when without Logical database.
cheers
AJHi Srinivas
If I am doing some Enhancement on ESS/ MSS , using Webdypros, I cant define Logical database anywhere, so I have to use Function modules or BAPIs ........???
But usually in Reporting you can define the Logical database in the Program attributes.........so I think Logical database can only be used when it can be defined in the program attributes........if you have any other scenarios........please let me know
regards
AJ -
How do i call c++ programs(with visual c++)in oracle?
how do i call c++ programs(with visual c++)in oracle?
how do i store results which produced by c++ programs to oracle?
results include picture(*.gif,*.bmp,*.jpg)and some variables.
please tell me a way.hurry!!!You would have to write your C++ programs as DLLs and then use something like the following:-
CREATE OR REPLACE PROCEDURE messagebeep
(p_uint IN BINARY_INTEGER)
AS EXTERNAL LIBRARY user32 NAME "MessageBeep"
CALLING STANDARD PASCAL;
Within your C++ code you would then access the database to update your tables etc.
The way I see it is that you want processing to go Oracle --> C++ --> Oracle.
Do you really need the C++ layer ?
Hope this helps.
Adrian -
How to call standard report with in zprogram?
Hi Sap experts,
How to call standard report with in zprogram.
For example if country is 'US' then call Zprogram(zprog_US).Inside zprogram call standard report(rhecm_change_proc_status).If country is 'CA' then call zprogram.Inside zprogram call standard report.For same othercountres like 'PR','GB','ES'.Actually HR_ECM_READ_FEATURE_CARGP will having the input as employee id and will return the CAREA(County like 'US','PR'......).Kindly help me what is the procedure?
Regards,
Sujan>
sujan T wrote:
> Thanks for your reply.
>
> What is the logic to call the standard report from zprogram?Inside the zpogram how to call standard report?
>
> Regards,
> Sujan
no special logic is required
If u want to use
RPUAUDOO IN THE ZREPORT.
Put the submit button where ever required
ex: In zreport after certain process reacedu want to call then use
submit rpuaudoo and return.
Regards
Sas -
Problem with Logical Database DDF
Hey All,
I have a problem with Logical Database DDF.
In my program I am typing this
GET KNA1 based on selection screen. It is bringing back everything I want except BRAN1 whereby the field is ''. However in SE16 for KNA1 and for the same KUNNR, the field is populated with 'T180'
I am not understanding this?! I thought LDB where menat to make things easy!!I think it's not used by DDF.
so you must check it with:
check kna1-bran1 in s_bran1.
A. -
Dear all,
While creating SQVI with logical database ( PNPCE - HR Master Record ), I found error at the time of saving
"Global syntax check
-> Selection Criteria
-> Error in parameter PYPARAID
-> Statement concluding with "...TYPE" ended unexpectedly. "
Please Help.
-MaharshiHello,
SQ02 Infoset Query
hope its helps -
ABAP Objects and table processing (with logical databases)
I have a report that is written right now using procedural abap and a logical database. The report is structured follows (high level):
start-of-selection.
get pernr.
perform get_it0001 using wtab.
perform get_it0002 using wtab.
perform get_it0003 using wtab.
append wtab to itab.
end-of-selection.
call function 'reuse_alv_grid_display'
exporting
i_structure_name = 'itabstructure'
tables
t_outtab = itab.
So basically I'm going through a bunch of personnel numbers, getting a few infotypes and outputting to ALV. I don't see where ABAP Objects is going to help me for this particular program.
Can somebody show me where OO ABAP would make this easier? Does it even make sense to use OO when you're processing with a logical database? (Not just PNP, but any logical database in general).
Thanks in advance.Hello Lee
I assume that the routines GET_ITnnnn are written by yourself. For reading infotypes ABAP Objects provides us with same very helpful classes as shown below:
* define data
DATA:
gif_employee type ref to if_pt_employee,
go_employee type ref to cl_pt_employee,
gt_infotypes TYPE tim_tmw_itlist_tab,
go_control TYPE REF TO if_pt_td_control,
go_data TYPE REF TO if_pt_td_base,
go_pnnnn TYPE REF TO if_pt_td_itnnnn,
gt_p0001 TYPE TIM_P0001_TAB,
gt_p0002 TYPE TIM_P0002_TAB,
gt_p0003 TYPE TIM_P0003_TAB.
start-of-selection.
GET pernr.
<b>* Create employee instance</b>
gif_employee = cl_pt_employee=>get_employee( pernr ).
go_employee ?= gif_employee.
<b>* Get master infotypes (0001, 0002)</b>
CALL METHOD go_employee->get_master_data
EXPORTING
im_begda = id_fromdate
im_endda = id_todate
IMPORTING
* EX_I0000 =
EX_I0001 = gt_p0001
EX_I0002 = gt_p0002
* EX_I0007 =
* EX_I0008 =
<b>* Append all other required infotypes to itab</b>
APPEND '0003' TO gt_infotypes.
CALL METHOD go_employee->get_infotypes
EXPORTING
i_itlist = gt_infotypes
i_fromdate = id_fromdate " start date
i_todate = id_todate " end date
* I_FILTER =
i_noauthcheck = 'X'
IMPORTING
e_result = gt_infty_request
e_retcd = gd_retcd.
* Please see documentation of parameter e_retcd...
LOOP AT gt_infty_request INTO go_control.
go_data = go_control->data. <b>" get data object</b>
* Casting
TRY.
go_pnnnn ?= go_data.
CATCH cx_sy_move_cast_error.
CONTINUE.
ENDTRY.
<b>* Convert infotype (semi-transparent -> transparent)</b>
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = lo_pnnnn->prelp
IMPORTING
pnnnn = gs_p0003.
APPEND gs_p0027 TO gt_p0003.
ENDLOOP.
The class CL_PT_EMPLOYEE provides us already with very easy access to so-called master infotypes (000, 0001, 0002, 0007 and 0008). All other infotypes can be read using method GET_INFOTYPES.
Using these classes we have a very convenient and standardized way of accessing all kinds of infotypes.
Regards
Uwe -
Report Parameters with logical database
Hello
I have to read some HR infotypes that are provided with the logical database PNPCE.
Fort his i have written a report that will use my logical database and get some information.
What i need,are some new input parameters on the screen that are added by my report:
parameters: p_persnr type person-pernr,
p_name type p0002-nachn,
p_sname type p0002-vorna.
The problem is that i do not know how to link these parameters to my logical database reading.
When i try to call "get <node>" ,my report is not returning anything.
Is there a way to send my parameters as selection parameters to the logical database?
thank youThe selection screen 1000 is created dynamically during runtime. I doubt change done by SE51 will solve the issue. In fact there is some code which can help on this.
INITIALIZATION.
To restrict the range of PERNRs
PERFORM z_seloption_restrict USING 'PNPPERNR'.
*& Form Z_Seloption_Restrict
* Restrict range in select option
* -->VALUE(SOP_NAME) Name of select option as string
FORM z_seloption_restrict USING value(pv_sop_name).
IF st_restrict-opt_list_tab[] IS INITIAL.
CLEAR st_opt_list.
MOVE: 'EQ' TO st_opt_list-name,
'X' TO st_opt_list-options-eq.
APPEND st_opt_list TO st_restrict-opt_list_tab.
ENDIF.
REFRESH : st_restrict-***_tab.
* READ TABLE st_restrict-***_tab INTO st_asst
* WITH KEY name = pv_sop_name.
* IF sy-subrc NE 0.
CLEAR st_asst.
MOVE: 'S' TO st_asst-kind,
pv_sop_name TO st_asst-name,
'I' TO st_asst-sg_main,
' ' TO st_asst-sg_addy,
'EQ' TO st_asst-op_main.
APPEND st_asst TO st_restrict-***_tab.
* ENDIF.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = st_restrict.
ENDFORM. "Z_Seloption_Restrict -
Need to call an application with in Database trigger
Dear all
I have created a database trigger that reads the new values inserted on my table and append the record on a text file on the operationg system.
I have a software that convert this text file to binary file.
I can call this software using a command prompt
I need to issue this command prompt from within the database trigger
I need to Know is there a package or plsql code that can call an application.
We can do this easly on the form builder using the comman HOST
But I need to issue this command from within SQL PLUS
is there a way
please help
thanks in advanceanother simple way is to write a C program with an exec function that calls the external program.
The C function can be called by the Oracle server as an extproc (like a PL/SQL funtion call).
Check for the extproc Oracle documentation:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b15658/ldr_demo.htm
Sample programs you will find in your $ORACLE_HOME/plsql/demo directory.
Kind regards
Karsten -
Optimization with logical database
Hi all.
I have to optimize a report, and it is using BRM logical database to get data from BKPF and BSEG. Could you say to me if it is the faster way or if it would be better to use a SELECT?
Thanks a lot.
Marta.Hello Marcin,
Once I met with statement that good ABAPers don't use direct SELECT statement, at least they shouldn't have to.
What?? This might be true for HR ABAP, where LDBs are used in abundance
There are so many standard FMs which cover most of SAP db queries.
Most of these std. FMs are generally "not released" & are not performance friendly either.The "released" BAPIs (BAPIGET) don't cater to all your requirements.
I seldom use FMs to fetch the data. I find it easy to implement relevant authority objects & build an optimised SQL construct as per my requirement
Let me know your comments.
BR,
Suhas -
Dear Experts,
I have writen a Z program which converts the format of the output file, i need to execute the standard program rfebck00 after execution is completed i need the final output values back in my Z program for further process..
I tried with the submit and return ...but it is not working ,
I'm getting the output but after I pressed the back button its going to my program but user is not willing to press back button Is there any other way to do the above requirement...
thanks in advance
HemaHi,
Please try to use FM ABAP4_CALL_TRANSACTION to call transaction FCKR (report program RFEBCK00). Perhaps you can setup the table parameter USING_TAB for BDCDATA of back button.
Regards,
Ferry Lianto -
Selection screen for HR report with logical database PNP
Hi All,
I am writing a HR report. And I use the logical database PNP. Also I create a HR report category for this report. In the report category, I can define the selection screen field. But all these fields are selection option format. My question is How can I add parameters, radiobutton group and checkbox in the selection screen. Thanks.
AlexHi Alex,
Sorry for replying so late. Please try this tutorial:
w w w. s a p t e c h n i c a l. c o m -> tutorials -> ABAP-HR -> Creating HR Report category in PNP logical database
Sorry, I put it like this, because direct link doens't let me post the answer. Don't know why.
It can also be something with your custom code in selection screen. Though it works fine for, try to remove COMMENTs and observe the result. Maybe parameters are overlapping somehow. First try this:
SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS RefDate type DATS.
parameter BFlag type c RADIOBUTTON GROUP grp1.
PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
parameters days type i.
PARAMETERS spvsr like PA0001-MSTBR.
selection-SCREEN end of BLOCK blk2.
If that works together with the report category, try to extend it with adding a selection-screen comment, but do this in reversed order (comment goes first and FOR FIELD addition is supplied) like this:
SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS RefDate type DATS.
SELECTION-SCREEN begin of line.
SELECTION-SCREEN COMMENT 3(10) text-003 for field bflag. "FOR FIELD, and goes first
parameter BFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN COMMENT 16(10) text-004 for FIELD fflag. "here two
PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN end of line.
parameters days type i.
PARAMETERS spvsr like PA0001-MSTBR.
selection-SCREEN end of BLOCK blk2.
If still not working, see if text-003 and text-004 are not too long (you expect them to be 10 chars), This may somehow affect selection screen.
You may also try with setting cursor position explicity by:
SELECTION-SCREEN begin of line.
SELECTION-SCREEN POSITION 3.
SELECTION-SCREEN COMMENT (10) text-003 for field bflag.
parameter BFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN POSITION 16.
SELECTION-SCREEN COMMENT (10) text-004 for FIELD fflag. "here two
PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN end of line.
It is really hard to identify where can be a bug as it is working fine for me. Keep trying with different variations, it should finally run with some.
Regards
Marcin -
Problem with logical database DDF in ABAP query
Hi All,
I have created an ABAP query via the transaction SQ01 using the logical database DDF to retrieve customer master data from tables KNA1 & KNB1. The selection screen used is the screen 903 of the logical database DDF. But now the problem is that when I execute the query, I am getting a blank value in the tax code4(KNA1-STCD4) field though there is value in the KNA1 table for this particular field. This field was added to the table by means of a customizing include. Can anyone suggest a way to get around this problem so that I can view the content of the field STCD4 in the query.
Thanks and regards,
Sarath.I think it's not used by DDF.
so you must check it with:
check kna1-bran1 in s_bran1.
A.
Maybe you are looking for
-
Error when selecting system during scheduling of background job in RAR
Hi, I am getting an error when I attempt to schedule a background in RAR. It happens when I go to the multiple system selection option. I select a system and click copy. An error example below appears in the logs even when I dont go ahead and schedul
-
Automator (version 2.04) will not run in snow leopard. Upgrade how?
Hi all - I upgraded to Snow Leopard and find it wonderful. The only trouble I have is using Automator. The version I have is 2.04 and when I launch it, it gives me the following message: "You can't run this version of the application Automator with t
-
Hi, I am using a Java Stored Procedure to invoke a SQL Loader process. The RDBMS Version is 8.1.7 on HP-UX 11. I invoke the procedure by calling: exec runcommand('sqlldr user=scott/tiger@orcl control=/home/mydir/ctlfile.ctl log=/home/mydir/logfile.lo
-
Problem with Vector.contains
Hello, I wrote this code but it doens't work; but it should public class Word { public Word(String v) { _value = new String (v); } public Word() { _value =""; } String _value = null; public boolean equals(Object obj) {
-
Option with GRC 5.3 CUP to consolidate the Login Notif. for Xple Systems
Hi, We are setting up a GRC environment for provisioning accounts for users in Dev and Test SAP systems. We are planning to use a single request to provision accounts to 15-20 systems simultaneously and we are checking ways to consolidate the login