Problem with using Logical Database PNP
Hello everybody!
When I use the logical database PNP in my program,a warning message appeared during the syntax check with Unicode checks actived.The message looks like below:
<b>Include DBPNPCOM.
In Unicode programs,the "-" character cannot appear in names,as it does here in the name "PNP-SW-FOUND".
Include DBPNPCOM.
In Unicode programs,the "-" character cannot appear in names,as it does here in the name "PNP-SY-TABIX".</b>
Anybody know how to deal with this problem?
Regards
Brian Liu
Hi,
You can either ignore the warnings or uncheck the 'Unicode checks Active' checkbox in the program attributes. In fact you get the same warnings off most standard SAP HR Reports.
Good luck,
Suresh Datti
Similar Messages
-
Problem in Using Logical Database PNP
Hi Guru's,
I am using PNP logical database and rp_provide_from_last
macros statements to fetch data from PA Tables.
When i am doing extended syntax check it is showing more
than 60 error's in ECC 6.0 for below statements:
1) Tables: Pernr
2) Infotypes: 0001,0002. and
3) RP_PROVIDE_FROM_LAST statements.
Could any please provide soloution how to clear all these.
Its very urgent.
Thanks in advance.
Regards,
SunilHi Ramesh,
These are the type of error messages in exetnded syntax check:
The current ABAP command is obsolete
In the OO context either an INTO or an ASSIGNING specification or the addition
"TRANSPORTING NO FIELDS" must be used . be used. be used. be used. be used. be
used.
Internal Message Code: READ 018
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Program: Z_INT_I_PY_BONUSPAYMENT Include: Z_PY_F01_BONUSPAYMENT Row: 279
The current ABAP command is obsolete
At "LOOP AT itab" one of the additions "INTO", "ASSIGNING" or "TRANSPORTING NO
FIELDS" is required in the OO context . .
Internal Message Code: LOOP 012
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Program: Z_INT_I_PY_BONUSPAYMENT Include: Z_PY_F01_BONUSPAYMENT Row: 282
The current ABAP command is obsolete
In the OO context either an INTO or an ASSIGNING specification or the addition
"TRANSPORTING NO FIELDS" must be used . be used. be used. be used. be used. be
used.
Internal Message Code: READ 018
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Program: Z_INT_I_PY_BONUSPAYMENT Include: Z_PY_F01_BONUSPAYMENT Row: 282
The current ABAP command is obsolete
At "LOOP AT itab" one of the additions "INTO", "ASSIGNING" or "TRANSPORTING NO
FIELDS" is required in the OO context . .
Internal Message Code: LOOP 012
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Please suggest me some way to clear these if it is possible. -
To use logical database PNP in class builder
Hi
Inside the class builder (SE24), i have a created a method.
Now while implementing that method, that is between method and endmethod
statement can i implement logical database PNP or PNPCE.
If 'yes' how to use it.
if 'no' what is the other way to implement authorization.
Pls help meHello,
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.
Vasanth -
How to hide selection fields when using logical database PNP
hi.
i m using a logical database PNP and report catagory 1PY_DEF in my program.
but when i execute it , it shows to selection box. one name is period and second is selections.
but i just want to show only period box selection fields , not the selection box fields.
how it iz possible.HI,
In my case i haved used the PNP logical database..in the selection box i don't wnat to display Contorling area,Cost Center & Organizational Unit. i have written this code to hide those fields..
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CS 'PNPKOKRS' OR
screen-name CS 'PNPKOSTL' OR
screen-name CS 'PNPORGEH'.
screen-active = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP.
Try modify hide the total block instead of individual fields in that block. -
Radio Button problem when using Logical Databases.
Hi,
I have a report that uses logical database PCH. I'd like to default the reporting period radio button so that when the report is run it is defaulted to today.
The name of the screenfield is PCHZTR_D so I set
PCHZTR_D = 'X'.
in the initialisation event but this doesn't work.
Any suggestions how I can get the reporting period to default to 'today' programmatically.
I don't want to use a variant.
Thanks,
PaulTry doing it in the AT SELECTION-SCREEN output Event.
report zrich_0001.
nodes: objec.
<b>at selection-screen output.
PCHZTR_A = space.
PCHZTR_D = 'X'.</b>
REgards,
Rich HEilman -
Problem with using Postgres database in java.
Hi ,
I am using netbean netbean IDE 6.1.5 and postgres as my database.
I want to pass a date to a query in java like-
"select count(\"JOBID\") from emp
to_char(\"STARTTIME\",'yyyy-MM-dd')=" + datestr
where STARTTIME is a date field,
but when I run the program it gives the error
error: operator does not exist: text = integer
even if I use this query
ResultSet result1= stmt.executeQuery("select count(\"JOBID\") frrom emp "+
" where to_date(\"STARTTIME\",'YYYY-MM-DD HH:MI:SS')=" + sqlDate);
WHERE STARTDATE is string and
sqlDate=java.sql.Date sqlDate
it gives
error:error: operator does not exist: date = integer
please help
moniUse PreparedStatement instead of Statement all the way. Not only it is faster and saves you from any SQL injection risks, but it also eases setting complex Java objects in a SQL query. It has for example a setDate() method.
Prepare here: [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]. -
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 -
Logical database PNP not retrieving data for custom infotypes.
Hi all,
I am using logical database PNP in a program. I have declared infotypes as follows:
INFOTYPES: 0001, 0002, 0041, 9801, 9840.
The problem is that the logical database is retrieving data for the standard infotypes but not for the custom infotypes. Any explanation as to why data for custom infotypes is not being retireved and how this can be solved will be greatly appreciated.
regards,
Hamzasolved
-
Logical Database PNP cannot fetch correct data?
I use logical database PNP fetch HR master data.
PA0001 has records with company code = 0960 .
But can not fetch data using GET PERNR.
however
PA0001 has not records with company code = 0770 .
But it got so many data using GET PERNR.
WHY..............
person originally transferd from 0770 to 0960, It is OK.I belive this is not concurent employment why we need to use
PNPCE
Please be specific about your question
Regards -
Selection screen for logical database PNP..
hi all,
I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
i have been looking all around and i got few of the below methods.
its good to use a report category.
somewhere it says include it in ur program using selection screen block..
can you please guide me which is the best way and what would be a perfect solution?
thanks in advance,
ReenaHi reeena,
1. simple
2. u want to
a) add ur own fields
b) suppress some fields
3. a) is simple, just add your parameters,
in your program, and they will appear
b) use SCREEN logic
4. just copy paste to get a taste of it
(it will HIDE the PAYROLL AREA field)
and add MATNR field
5.
report abc.
TABLES : PERNR.
PARAMETERS : MATNR LIKE MARA-MATNR.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME CS 'ABKRS'.
SCREEN-INVISIBLE = '1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
regards,
amit m. -
Selection screen and logical database PNP
hi all,
I am having a requirement to produce a HR Report where i need to use logical database PNP. Now the issue is i need to supress some of the elements of standard selection screen of PNP and add a couple of fields of mine.
i have been looking all around and i got few of the below methods.
its good to use a report category.
somewhere it says include it in ur program using selection screen block..
can you please guide me which is the best way and what would be a perfect solution?
thanks in advance,
ReenaIn the Program Attributes, click on the pushbutton 'HR Report Category'.Click on the 'Create' icon in the pop-up window that comes up. You will get a list of all the available Report Categories. Go through the list & if you don't find one that suits you, select one that is closest & click on the 'Copy As' icon in the menu bar..
Now, you can remove the unwanted fields & add yours for selection. save it & and attach it to report in the attributes.
~Suresh -
Logical database PNP (Suppress message)
Hi,
we are having 1 report which is using logical database PNP
this is being shown in ALV
when the user runs the report the output is shown and after pressing BACK button the below lines are being shown
Personnel numbers skipped by the database driver
Reason 1: insufficient authorization, no. skipped personnel nos.:
this is being done by logical databse program SAPDBPNP
is there any way to supress this mesasge
thanking you in advance
regards
Sai easwarI belive this is not concurent employment why we need to use
PNPCE
Please be specific about your question
Regards -
Regarding logical database PNP
Hi all:
I am learning to use logical database PNP,
Originally, there are some buttons like 'Further selection' 'selection helps ' 'Sort order' at the top of selection screen. How could I control them? If I just use some of them , like 'Further selection' , How could I remove the other two from the selection screen ?
what's more, How could I add button like 'Org. struture' at the top which doesn't exsit originally?
Thank you very much!Hi,
You need to select the appropriate Hr Report Catageory in the Program Atrributes. If you did not find the suitable one you can create the new as per your requirement and assign it in the Hr Report Catageory of the Program attribute.
Edited by: Avinash Kodarapu on Mar 11, 2009 3:56 PM -
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 -
Logical Database PNP. HR and Unicode
Hi,
currently we are checking all programs to make them unicode compliant. Using the logical database PNP a lot of macros is loaded automatically. One of them is
rp_provide_from_last (or rp_provide_from_frst) to get the last record in a specifed time-interval. The existance is stated in varaible named pnp-sw-found, it is 0 if no record was found and 1 if there is one in existance.
Checking the program (normal syntach check and extended syntax check) leads to the warning that varaibale names with a hyphen are no longer allowed in unicode programs if its not a structure (and pnp-sw-found is not). The program is doing well, and transaction UCCHECK does not mention this error/warning at all. Has someone experience with that issue and perhaps a solution?
cu
RainerThanks for the answers so far. Using PNPCE does not resolve my problem, cause we have a lot of own written reports and i just want to avoid to change them all.
And using PNPCE idoes not solve the problem, that i have to use pnp-sw-found, this one is still in existance and gives still the warning that thois is not unicode compliant.
Switching off the unicode flag is no good idea if we wanna go for unicode.
Anyone else with experience in unicode in the HR Area?
Maybe you are looking for
-
Need help making basic php gallery.
Hi guys, Thanks for checking out my post... I want to create a gallery, using php, for a client site similar to the one at http://www.danwheldon.com/gallery.cfm where you click on a thumbnail and it refreshes the page with the larger image within the
-
Rome Total War won't let me play at resolutions higher than 1024x768
Laptop is a GE70 2PE Apache Pro Every other game lets me play up to 1920x1080 but for some strange reason RTW won't go higher than 1024x768. And yes I forced the the game to use the Nvidia GPU in the Nvidia Controll panel. And yes I'm in "High Perfor
-
Userexit for updating sales order user status based on Production Order
Hi. My clients requirent is Sales order user status should get updated based on production order creation,GR for PO creation etc. Basically depending on PO & GR For PO,various user stauts in sales order should get updated. Can you please suggest me s
-
How to re-trigger workitem in SAP
Hi All, When employee submitted leave request, it has not gone to correct line manager. We have applied OSS note. Now we have logically deleted work items. Now we would like to re-trigger same workitem. Could you please advice how to re-trigger. Rega
-
10.4.6 server: print jobs vanish (mac & pc)
setup: - private network (192.168.1.1/24) - 1 mac os x server, 1 lpd printer with static addresses - 1 mac os x client, 1 winxp client with dhcp addresses (from router) services on server: - afp (for network homedirectories, mac only) - open director