on 06-05-2009 9:06 AM
Hi,
I have to fetch phone no,mobile and fax from PA0105.I am using HR_READ_INFOTYPE. I am getting the data into the internal table but not sure how to display the data on the screen.
I have declared the internal table as
DATA it_pa0105 TYPE STANDARD TABLE OF pa0105.
Please suggest how can I get phone no. mobile no and fax no.
DATA DECLARE : USRID TYPE PA0105-USERID,
STATEMENT :
SELECT SINGLE USRID
FROM PA0105
INTO USRID
WHERE PERNR EQ WA_DEV-PERNR
AND ENDDA EQ '99991231'.
DISPLAY
WA_FCAT-FIELDNAME = 'USRID'.
WA_FCAT-REF_TABNAME = 'PA0105'.
WA_FCAT-REF_FIELDNAME = 'USRID'.
WA_FCAT-SELTEXT_L = 'EMAIL ID'.
WA_FCAT-SELTEXT_M = 'EMAIL ID'.
WA_FCAT-SELTEXT_S = 'EMAIL ID'.
WA_FCAT-OUTPUTLEN = '10'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
Sheetal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As said by our Guru dilek
u have not included the sub type inculde than u will get the desired results
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
select single USRID_long from pa0105 into it_active-email where pernr = it_active-sapid and begda le pn-endda and
endda eq '99991231' and subty = '0010'.
Regards
Sheetal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
READ TABLE it_pa0105 WITH KEY SUBTY = '0002'. --> Write here the subty of phone
WRITE it_pa0105-USRID -- phone number
READ TABLE it_pa0105 WITH KEY SUBTY = 'CELL'.
WRITE it_pa0105-USRID -- mobile phone number
READ TABLE it_pa0105 WITH KEY SUBTY = '0005'.
WRITE it_pa0105-USRID -- fax number
Regards,
Dilek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I have declared it as the table with the header line and I am using like this
READ TABLE it_pa0105 WITH KEY SUBTY = '0002'.
wa_card-phone = it_pa0105-USRID.
READ TABLE it_pa0105 WITH KEY SUBTY = 'CELL'.
wa_card-mobile = it_pa0105-USRID.
READ TABLE it_pa0105 WITH KEY SUBTY = '0005'.
wa_card-fax = it_pa0105-USRID.
But in the output I am getting L322546223 in all the 3 fields.Though al the fields have different value in the table.322546223 is the value in the cell field.L is getting appended on its own.the other values are 21255453(phone) and 12121(mobile).Please suggest the solution.
Try the code below.
And make sure that the subtypes are the right subtypes in your system and the personnel number you're trying has PA0105 records.
CLEAR wa_card-phone .
READ TABLE it_pa0105 WITH KEY SUBTY = '0002' ENDDA = "31129999".
wa_card-phone = it_pa0105-USRID.
CLEAR wa_card-mobile.
READ TABLE it_pa0105 WITH KEY SUBTY = 'CELL' ENDDA = "31129999".
wa_card-mobile = it_pa0105-USRID.
CLEAR wa_card-fax .
READ TABLE it_pa0105 WITH KEY SUBTY = '0005' ENDDA = "31129999".
wa_card-fax = it_pa0105-USRID.
Regards,
Dilek
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.