2007 May 03 4:26 PM
Hallow
I have a problem with declaration of table
I do like that and I have error?
what i have to change?
this is my code & errors
regards
"OBJECTS_TEMP" is not an internal table - the "OCCURS n" specification missing.
I try to add occurs 0 but after that I have error that
"OBJECTS_TEMP" is a table without a header line and therefore has nocomponent called "PLVAR".
<b>DATA: objects_temp TYPE hrsobid.</b>
objects_temp-plvar = '01'.
objects_temp-otype = 'P'.
objects_temp-sobid = pernr.
CALL FUNCTION 'RHPP_Q_PROFILE_READ'
EXPORTING
BEGDA = SY-DATUM
ENDDA = SY-DATUM
WITH_STEXT = 'X'
WITH_QK_INFO = 'X'
CHECK_NOTE = ' '
TABLES
<b>OBJECTS = objects_temp</b>
ERR_OBJECTS =
profile = qualifications_tab
EXCEPTIONS
NO_AUTHORITY = 1
WRONG_OTYPE = 2
OBJECT_NOT_FOUND = 3
UNDEFINED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
regards ENDIF.
2007 May 03 4:28 PM
Try this.
DATA: objects_temp TYPE TABLE OF hrsobid.
data: wa_objects_temp like line of objects_temp.
wa_objects_temp-plvar = '01'.
wa_objects_temp-otype = 'P'.
wa_objects_temp-sobid = pernr.
append wa_objects_temp to objects_temp.
CALL FUNCTION 'RHPP_Q_PROFILE_READ'
* EXPORTING
* BEGDA = SY-DATUM
* ENDDA = SY-DATUM
* WITH_STEXT = 'X'
* WITH_QK_INFO = 'X'
* CHECK_NOTE = ' '
TABLES
OBJECTS = objects_temp
* ERR_OBJECTS =
profile = qualifications_tab
* EXCEPTIONS
* NO_AUTHORITY = 1
* WRONG_OTYPE = 2
* OBJECT_NOT_FOUND = 3
* UNDEFINED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Rich Heilman
<b>DATA: objects_temp TYPE table of hrsobid with header line.</b>
2007 May 03 4:27 PM
Hi,
Declare it like this..
DATA: objects_temp TYPE hrsobid OCCURS 0 WITH HEADER LINE.
Thanks,
Naren
2007 May 03 4:28 PM
Try this.
DATA: objects_temp TYPE TABLE OF hrsobid.
data: wa_objects_temp like line of objects_temp.
wa_objects_temp-plvar = '01'.
wa_objects_temp-otype = 'P'.
wa_objects_temp-sobid = pernr.
append wa_objects_temp to objects_temp.
CALL FUNCTION 'RHPP_Q_PROFILE_READ'
* EXPORTING
* BEGDA = SY-DATUM
* ENDDA = SY-DATUM
* WITH_STEXT = 'X'
* WITH_QK_INFO = 'X'
* CHECK_NOTE = ' '
TABLES
OBJECTS = objects_temp
* ERR_OBJECTS =
profile = qualifications_tab
* EXCEPTIONS
* NO_AUTHORITY = 1
* WRONG_OTYPE = 2
* OBJECT_NOT_FOUND = 3
* UNDEFINED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Rich Heilman
2007 May 03 4:28 PM
Declare it as
DATA: objects_temp TYPE hrsobid occurs 0 with header line.
2007 May 03 4:29 PM
DATA: objects_temp TYPE hrsobid.
<b>change it here....
DATA: objects_temp TYPE hrsobid OCCURS 0 WITH HEADER LINE.
end of change.</b>
objects_temp-plvar = '01'.
objects_temp-otype = 'P'.
objects_temp-sobid = pernr.
CALL FUNCTION 'RHPP_Q_PROFILE_READ'
EXPORTING
BEGDA = SY-DATUM
ENDDA = SY-DATUM
WITH_STEXT = 'X'
WITH_QK_INFO = 'X'
CHECK_NOTE = ' '
TABLES
OBJECTS = objects_temp
ERR_OBJECTS =
profile = qualifications_tab
EXCEPTIONS
NO_AUTHORITY = 1
WRONG_OTYPE = 2
OBJECT_NOT_FOUND = 3
UNDEFINED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2007 May 03 4:29 PM
<b>DATA: objects_temp TYPE table of hrsobid with header line.</b>
2007 May 03 4:32 PM
2007 May 03 4:31 PM
data : objects_temp type table of hrsobid,
rec_hrsobid like line of objects_temp .
rec_hrsobid-plvar = '01'.
rec_hrsobid-otype = 'P'.
rec_hrsobid-sobid = pernr.
append rec_hrsobid to t_hrsobid.
then make your function call..
~Suresh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |